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
This commit is contained in:
parent
f370650660
commit
fb9387a38e
|
@ -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
|
||||
|
|
|
@ -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] = {
|
||||
|
|
Loading…
Reference in New Issue