From fb9387a38e5429f509b6e042461217f0d41712ef Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Sun, 28 Nov 2010 17:23:13 +0000 Subject: [PATCH] Fix for linux screensaver inhibit caused by a misinterpretation of the window id. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6493 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DSPCore/Src/DSPEmitter.cpp | 2 -- Source/Core/DolphinWX/Src/X11Utils.cpp | 12 +----------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/Source/Core/DSPCore/Src/DSPEmitter.cpp b/Source/Core/DSPCore/Src/DSPEmitter.cpp index 05cf877f7b..74e3613ecc 100644 --- a/Source/Core/DSPCore/Src/DSPEmitter.cpp +++ b/Source/Core/DSPCore/Src/DSPEmitter.cpp @@ -379,8 +379,6 @@ void DSPEmitter::CompileDispatcher() // Don't use the % operator in the inner loop. It's slow. int STACKALIGN DSPEmitter::RunForCycles(int cycles) { - const int idle_cycles = DSP_IDLE_SKIP_CYCLES; - while (!(g_dsp.cr & CR_HALT)) { // Compile the block if needed diff --git a/Source/Core/DolphinWX/Src/X11Utils.cpp b/Source/Core/DolphinWX/Src/X11Utils.cpp index ad721739c4..1990088de2 100644 --- a/Source/Core/DolphinWX/Src/X11Utils.cpp +++ b/Source/Core/DolphinWX/Src/X11Utils.cpp @@ -102,18 +102,8 @@ Display *XDisplayFromHandle(void *Handle) #if defined(HAVE_XDG_SCREENSAVER) && HAVE_XDG_SCREENSAVER void InhibitScreensaver(Display *dpy, Window win, bool suspend) { - // Get X server window id - Atom actual_type; - int actual_format, status; - unsigned long nitems, bytes_after; - unsigned char *prop; - - status = XGetWindowProperty(dpy, win, XInternAtom(dpy, "_NET_FRAME_WINDOW", True), - 0, 125000, False, AnyPropertyType, - &actual_type, &actual_format, &nitems, &bytes_after, &prop); - char id[11]; - snprintf(id, sizeof(id), "0x%lx", *(unsigned long *)prop & 0xffffffff); + snprintf(id, sizeof(id), "0x%lx", win); // Call xdg-screensaver char *argv[4] = {