mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-05-21 00:24:08 +00:00
spiral:: fixed the crash when leaving spiral
This commit is contained in:
parent
2eaff9ac46
commit
8c776a29e9
@ -179,9 +179,6 @@ namespace spiral {
|
|||||||
|
|
||||||
void loop(vector<SDL_Surface*> _band) {
|
void loop(vector<SDL_Surface*> _band) {
|
||||||
|
|
||||||
bool saveGL = vid.usingGL;
|
|
||||||
if(saveGL) { vid.usingGL = false; setvideomode(); }
|
|
||||||
|
|
||||||
band = _band;
|
band = _band;
|
||||||
out = s;
|
out = s;
|
||||||
precompute();
|
precompute();
|
||||||
@ -189,6 +186,10 @@ namespace spiral {
|
|||||||
shiftx = shifty = 0;
|
shiftx = shifty = 0;
|
||||||
velx=1; vely=1;
|
velx=1; vely=1;
|
||||||
bool dosave = false;
|
bool dosave = false;
|
||||||
|
|
||||||
|
bool saveGL = vid.usingGL;
|
||||||
|
if(saveGL) switchGL(); // { vid.usingGL = false; setvideomode(); }
|
||||||
|
|
||||||
while(true) {
|
while(true) {
|
||||||
|
|
||||||
time_t timer;
|
time_t timer;
|
||||||
@ -228,7 +229,7 @@ namespace spiral {
|
|||||||
|
|
||||||
breakloop:
|
breakloop:
|
||||||
quickmap.clear();
|
quickmap.clear();
|
||||||
if(saveGL) { vid.usingGL = true; setvideomode(); }
|
if(saveGL) switchGL(); // { vid.usingGL = true; setvideomode(); }
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user