diff --git a/stepmania/src/RageDisplay_Null.h b/stepmania/src/RageDisplay_Null.h index 376256479f..73183f2b3c 100644 --- a/stepmania/src/RageDisplay_Null.h +++ b/stepmania/src/RageDisplay_Null.h @@ -7,7 +7,6 @@ class RageDisplay_Null: public RageDisplay { public: RageDisplay_Null( VideoModeParams p ); - void Update( float fDeltaTime ) { } void ResolutionChanged() { } const PixelFormatDesc *GetPixelFormatDesc(PixelFormat pf) const; diff --git a/stepmania/src/RageDisplay_OGL.cpp b/stepmania/src/RageDisplay_OGL.cpp index 49b06980e6..4910af7c19 100644 --- a/stepmania/src/RageDisplay_OGL.cpp +++ b/stepmania/src/RageDisplay_OGL.cpp @@ -484,45 +484,6 @@ CString RageDisplay_OGL::Init( VideoModeParams p, bool bAllowUnacceleratedRender #include #endif -void RageDisplay_OGL::Update(float fDeltaTime) -{ - wind->Update(); - - if( PREFSMAN->m_bDisableScreenSaver ) - { - /* Disable the screensaver. */ -#if defined(UNIX) && defined(HAVE_LIBXTST) - ASSERT( g_X11Display ); - - /* This causes flicker. */ - // XForceScreenSaver( g_X11Display, ScreenSaverReset ); - - /* - * Instead, send a null relative mouse motion, to trick X into thinking there has been - * user activity. - * - * This also handles XScreenSaver; XForceScreenSaver only handles the internal X11 - * screen blanker. - * - * This will delay the X blanker, DPMS and XScreenSaver from activating, and will - * disable the blanker and XScreenSaver if they're already active (unless XSS is - * locked). For some reason, it doesn't un-blank DPMS if it's already active. - */ - - XLockDisplay( g_X11Display ); - - int event_base, error_base, major, minor; - if( XTestQueryExtension( g_X11Display, &event_base, &error_base, &major, &minor ) ) - { - XTestFakeRelativeMotionEvent( g_X11Display, 0, 0, 0 ); - XSync( g_X11Display, False ); - } - - XUnlockDisplay( g_X11Display ); -#endif - } -} - bool RageDisplay_OGL::IsSoftwareRenderer() { #if defined(WIN32) @@ -774,6 +735,42 @@ void RageDisplay_OGL::EndFrame() wind->SwapBuffers(); ProcessStatsOnFlip(); + + wind->Update(); + + if( PREFSMAN->m_bDisableScreenSaver ) + { + /* Disable the screensaver. */ +#if defined(UNIX) && defined(HAVE_LIBXTST) + ASSERT( g_X11Display ); + + /* This causes flicker. */ + // XForceScreenSaver( g_X11Display, ScreenSaverReset ); + + /* + * Instead, send a null relative mouse motion, to trick X into thinking there has been + * user activity. + * + * This also handles XScreenSaver; XForceScreenSaver only handles the internal X11 + * screen blanker. + * + * This will delay the X blanker, DPMS and XScreenSaver from activating, and will + * disable the blanker and XScreenSaver if they're already active (unless XSS is + * locked). For some reason, it doesn't un-blank DPMS if it's already active. + */ + + XLockDisplay( g_X11Display ); + + int event_base, error_base, major, minor; + if( XTestQueryExtension( g_X11Display, &event_base, &error_base, &major, &minor ) ) + { + XTestFakeRelativeMotionEvent( g_X11Display, 0, 0, 0 ); + XSync( g_X11Display, False ); + } + + XUnlockDisplay( g_X11Display ); +#endif + } } RageSurface* RageDisplay_OGL::CreateScreenshot() diff --git a/stepmania/src/RageDisplay_OGL.h b/stepmania/src/RageDisplay_OGL.h index e9a452bf41..cc28a90ebb 100644 --- a/stepmania/src/RageDisplay_OGL.h +++ b/stepmania/src/RageDisplay_OGL.h @@ -9,7 +9,6 @@ public: RageDisplay_OGL(); virtual ~RageDisplay_OGL(); CString Init( VideoModeParams p, bool bAllowUnacceleratedRenderer ); - void Update(float fDeltaTime); bool IsSoftwareRenderer(); void ResolutionChanged();