summaryrefslogtreecommitdiff
path: root/src/engine/main.cpp
diff options
context:
space:
mode:
authorxolatile2025-08-10 00:19:46 +0200
committerxolatile2025-08-10 00:19:46 +0200
commit757096e7df15c14b9b10352fa91663483f9e34f8 (patch)
treedcad789d0abd8be76463277dc01bf32c4e6a527b /src/engine/main.cpp
parentb2c89d7060e99a36c8c7ac897b7386686c74deac (diff)
downloadxolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz
xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst
all
Diffstat (limited to 'src/engine/main.cpp')
-rw-r--r--src/engine/main.cpp12
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());