libkwineffects: move linux kernel version query out of GLPlatform
It has nothing to do with OpenGLmaster
parent
e0c7878357
commit
a5df88b0de
@ -0,0 +1,28 @@
|
||||
/*
|
||||
KWin - the KDE window manager
|
||||
This file is part of the KDE project.
|
||||
|
||||
SPDX-FileCopyrightText: 2023 Xaver Hugl <xaver.hugl@gmail.com>
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
*/
|
||||
#pragma once
|
||||
#include "libkwineffects/version.h"
|
||||
|
||||
#include <sys/utsname.h>
|
||||
|
||||
namespace KWin
|
||||
{
|
||||
|
||||
inline static Version linuxKernelVersion()
|
||||
{
|
||||
struct utsname name;
|
||||
uname(&name);
|
||||
|
||||
if (qstrcmp(name.sysname, "Linux") == 0) {
|
||||
return Version::parseString(name.release);
|
||||
}
|
||||
return Version(0, 0, 0);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue