1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

rogueviz::sag:: added CAP_SDL guards

This commit is contained in:
Zeno Rogue 2023-01-08 16:02:32 +01:00
parent b6c257a264
commit 4ff8f4b68a

View File

@ -475,10 +475,16 @@ namespace sag {
void iterate() { void iterate() {
if(!sagmode) return; if(!sagmode) return;
int t1 = SDL_GetTicks(); int t1 = SDL_GetTicks();
#if CAP_SDL && !CAP_SDL2
int last = -1; int last = -1;
#endif
for(int i=0; i<ipturn; i++) { for(int i=0; i<ipturn; i++) {
numiter++; numiter++;
sag::saiter(); sag::saiter();
#if CAP_SDL && !CAP_SDL2
int q = i * sag_ittime / ipturn;
if(q > last) { last = 1; SDL_PumpEvents(); }
#endif
} }
int t2 = SDL_GetTicks(); int t2 = SDL_GetTicks();
int t = t2 - t1; int t = t2 - t1;