diff options
| author | xolatile | 2025-08-10 00:19:46 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-10 00:19:46 +0200 |
| commit | 757096e7df15c14b9b10352fa91663483f9e34f8 (patch) | |
| tree | dcad789d0abd8be76463277dc01bf32c4e6a527b /src/engine/main.cpp | |
| parent | b2c89d7060e99a36c8c7ac897b7386686c74deac (diff) | |
| download | xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst | |
all
Diffstat (limited to 'src/engine/main.cpp')
| -rw-r--r-- | src/engine/main.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/engine/main.cpp b/src/engine/main.cpp index aa9b2fe..83aebaa 100644 --- a/src/engine/main.cpp +++ b/src/engine/main.cpp @@ -249,7 +249,7 @@ void renderbackground(const char *caption, Texture *mapshot, const char *mapname } } glDisable(GL_BLEND); - if(!restore) swapbuffers(false); + if(!restore) swapbuffers(); } if(!restore) setbackgroundinfo(caption, mapshot, mapname, mapinfo); } @@ -338,7 +338,7 @@ void renderprogress(float bar, const char *text, GLuint tex, bool background) { bgquad(x, y, sz, sz); glDisable(GL_BLEND); } - swapbuffers(false); + swapbuffers(); } int keyrepeatmask = 0, textinputmask = 0; @@ -659,6 +659,7 @@ template <int SIZE> static inline bool pumpevents(queue<SDL_Event, SIZE> &events static int interceptkeysym = 0; static int interceptevents(void *data, SDL_Event *event) { + (void) data; switch(event->type) { case SDL_MOUSEMOTION: return 0; case SDL_KEYDOWN: @@ -812,7 +813,7 @@ void checkinput() { if(mousemoved) resetmousemotion(); } -void swapbuffers(bool overlay) { +void swapbuffers() { gle::disable(); SDL_GL_SwapWindow(screen); } @@ -877,11 +878,6 @@ COMMANDN(getfps, getfps_, "i"); bool inbetweenframes = false, renderedframe = true; -static bool findarg(int argc, char **argv, const char *str) { - for(int i = 1; i<argc; i++) if(strstr(argv[i], str)==argv[i]) return true; - return false; -} - static int clockrealbase = 0, clockvirtbase = 0; static void clockreset() { clockrealbase = SDL_GetTicks(); clockvirtbase = totalmillis; } VARFP(clockerror, 990000, 1000000, 1010000, clockreset()); |
