From 14907ad3052fb8cf2ea162a55e1a7c234661a47f Mon Sep 17 00:00:00 2001 From: Vinyl Darkscratch Date: Tue, 6 Mar 2018 01:46:04 -0800 Subject: [PATCH] Disable non-implemented window fade in Linux --- src/graphics.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/graphics.cpp b/src/graphics.cpp index c612636..ddbbcf0 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -52,6 +52,14 @@ #define DEF_SCREEN_H (rgssVer == 1 ? 480 : 416) #define DEF_FRAMERATE (rgssVer == 1 ? 40 : 60) +#if defined _WIN32 + #define OS_W32 +#elif defined __APPLE__ + #define OS_OSX +#else + #define OS_LINUX +#endif + struct PingPong { TEXFBO rt[2]; @@ -816,7 +824,9 @@ void Graphics::transition(int duration, simpleShader.setProg(prog); } - if (p->threadData->exiting) SDL_SetWindowOpacity(p->threadData->window, 1.0f - prog); + #ifndef OS_LINUX + if (p->threadData->exiting) SDL_SetWindowOpacity(p->threadData->window, 1.0f - prog); + #endif /* Draw the composed frame to a buffer first * (we need this because we're skipping PingPong) */