projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added stopping screen fading if "Escape" key event is pending
[rocksndiamonds.git]
/
src
/
libgame
/
sdl.c
diff --git
a/src/libgame/sdl.c
b/src/libgame/sdl.c
index 4108b2b531c533825c092df0ceab9fb1fd596d90..1614b1e2fe4a316130af2ee2d8c0c6baa3483134 100644
(file)
--- a/
src/libgame/sdl.c
+++ b/
src/libgame/sdl.c
@@
-1225,6
+1225,9
@@
void SDLFadeRectangle(int x, int y, int width, int height,
draw_border_function();
UpdateScreen_WithFrameDelay(&dst_rect2);
draw_border_function();
UpdateScreen_WithFrameDelay(&dst_rect2);
+
+ if (PendingEscapeKeyEvent())
+ break;
}
}
}
}
}
}
@@
-1281,6
+1284,9
@@
void SDLFadeRectangle(int x, int y, int width, int height,
// only update the region of the screen that is affected from fading
UpdateScreen_WithFrameDelay(&dst_rect2);
// only update the region of the screen that is affected from fading
UpdateScreen_WithFrameDelay(&dst_rect2);
+
+ if (PendingEscapeKeyEvent())
+ break;
}
}
else // fading in, fading out or cross-fading
}
}
else // fading in, fading out or cross-fading
@@
-1307,6
+1313,9
@@
void SDLFadeRectangle(int x, int y, int width, int height,
// only update the region of the screen that is affected from fading
UpdateScreen_WithFrameDelay(&dst_rect);
// only update the region of the screen that is affected from fading
UpdateScreen_WithFrameDelay(&dst_rect);
+
+ if (PendingEscapeKeyEvent())
+ break;
}
}
}
}