1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-10 15:59:53 +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() {
if(!sagmode) return;
int t1 = SDL_GetTicks();
#if CAP_SDL && !CAP_SDL2
int last = -1;
#endif
for(int i=0; i<ipturn; i++) {
numiter++;
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 t = t2 - t1;