diff --git a/src/graphics.cpp b/src/graphics.cpp index ad44dc2..6adb2de 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -52,14 +52,6 @@ #define DEF_FRAMERATE (60) -#if defined _WIN32 - #define OS_W32 -#elif defined __APPLE__ - #define OS_OSX -#else - #define OS_LINUX -#endif - struct PingPong{ TEXFBO rt[2]; uint8_t srcInd, dstInd; @@ -438,8 +430,8 @@ struct GraphicsPrivate{ RGSSThreadData *threadData; SDL_GLContext glCtx; - int frameRate; - int frameCount; + unsigned int frameRate; + unsigned int frameCount; int brightness; bool smooth; @@ -738,7 +730,7 @@ void Graphics::transition(int duration, const char *filename, int vague){ simpleShader.setProg(prog); } - #ifndef OS_LINUX + #ifndef __linux__ || BSD || __unix__ if (p->threadData->exiting) SDL_SetWindowOpacity(p->threadData->window, 1.0f - prog); #endif @@ -906,10 +898,7 @@ void Graphics::reset(){ /* Dispose all live Disposables */ IntruListLink *iter; - for (iter = p->dispList.begin(); - iter != p->dispList.end(); - iter = iter->next) - { + for (iter = p->dispList.begin(); iter != p->dispList.end(); iter = iter->next){ iter->data->dispose(); } diff --git a/src/graphics.h b/src/graphics.h index cb4de50..5bfcca0 100644 --- a/src/graphics.h +++ b/src/graphics.h @@ -36,9 +36,7 @@ class Graphics{ public: void update(bool limitFps = true); void freeze(); - void transition(int duration = 8, - const char *filename = "", - int vague = 40); + void transition(int duration = 8, const char *filename = "", int vague = 40); void frameReset(); DECL_ATTR( FrameRate, int ) @@ -68,8 +66,7 @@ public: /* Repaint screen with static image until exitCond * is set. Observes reset flag on top of shutdown * if "checkReset" */ - void repaintWait(const AtomicFlag &exitCond, - bool checkReset = true); + void repaintWait(const AtomicFlag &exitCond, bool checkReset = true); const TEX::ID &obscuredTex() const;