mirror of
https://github.com/bsnes-emu/bsnes.git
synced 2025-09-09 11:21:06 +02:00
hiro/qt: Add #if guards to X11 code
This is a backport from ares:
b85395fe7b
Co-authored-by: invertego <invertego@users.noreply.github.com>
This commit is contained in:
committed by
Screwtapello
parent
ec8aed3f3b
commit
f83bc75270
2
hiro/qt/application.cpp
Executable file → Normal file
2
hiro/qt/application.cpp
Executable file → Normal file
@@ -34,6 +34,7 @@ auto pApplication::quit() -> void {
|
||||
QApplication::quit();
|
||||
qtApplication = nullptr; //note: deleting QApplication will crash libQtGui
|
||||
|
||||
#if defined(DISPLAY_XORG)
|
||||
if(state().display) {
|
||||
if(state().screenSaverXDG && state().screenSaverWindow) {
|
||||
//this needs to run synchronously, so that XUnmapWindow() won't happen before xdg-screensaver is finished
|
||||
@@ -44,6 +45,7 @@ auto pApplication::quit() -> void {
|
||||
XCloseDisplay(state().display);
|
||||
state().display = nullptr;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
auto pApplication::setScreenSaver(bool screenSaver) -> void {
|
||||
|
2
hiro/qt/header.hpp
Executable file → Normal file
2
hiro/qt/header.hpp
Executable file → Normal file
@@ -3,6 +3,7 @@
|
||||
#include <QtWidgets>
|
||||
#undef foreach
|
||||
|
||||
#if defined(DISPLAY_XORG)
|
||||
#include <nall/xorg/guard.hpp>
|
||||
#define XK_MISCELLANY
|
||||
#define XK_LATIN1
|
||||
@@ -11,3 +12,4 @@
|
||||
#undef XK_MISCELLANY
|
||||
#undef XK_LATIN1
|
||||
#include <nall/xorg/guard.hpp>
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user