else if (key == setup.shortcut.load_game)
TapeQuickLoad();
else if (key == setup.shortcut.toggle_pause)
- TapeTogglePause(TAPE_TOGGLE_MANUAL);
+ TapeTogglePause(TAPE_TOGGLE_MANUAL | TAPE_TOGGLE_PLAY_PAUSE);
HandleTapeButtonKeys(key);
HandleSoundButtonKeys(key);
}
}
-void TapeTogglePause(boolean toggle_manual)
+void TapeTogglePause(boolean toggle_mode)
{
+ if (tape.playing && tape.pausing && (toggle_mode & TAPE_TOGGLE_PLAY_PAUSE))
+ {
+ // continue playing in normal mode
+ tape.fast_forward = FALSE;
+ tape.warp_forward = FALSE;
+ tape.deactivate_display = FALSE;
+
+ tape.pause_before_end = FALSE;
+ }
+
tape.pausing = !tape.pausing;
- if (tape.single_step && toggle_manual)
+ if (tape.single_step && (toggle_mode & TAPE_TOGGLE_MANUAL))
tape.single_step = FALSE;
DrawVideoDisplayCurrentState();
{
if (tape.pausing) /* PAUSE -> PLAY */
{
- // continue playing in normal mode
- tape.fast_forward = FALSE;
- tape.warp_forward = FALSE;
- tape.deactivate_display = FALSE;
-
- tape.pause_before_end = FALSE;
-
- TapeTogglePause(TAPE_TOGGLE_MANUAL);
+ TapeTogglePause(TAPE_TOGGLE_MANUAL | TAPE_TOGGLE_PLAY_PAUSE);
}
else if (!tape.fast_forward) /* PLAY -> FFWD */
{
/* values for TapeTogglePause() */
-#define TAPE_TOGGLE_MANUAL TRUE
-#define TAPE_TOGGLE_AUTOMATIC FALSE
+#define TAPE_TOGGLE_AUTOMATIC 0
+#define TAPE_TOGGLE_MANUAL (1 << 0)
+#define TAPE_TOGGLE_PLAY_PAUSE (1 << 1)
/* values for tape properties */
#define MAX_TAPE_LEN (1000 * FRAMES_PER_SECOND) /* max.time x fps */