X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=e82d3667b42958144a01fdce30e24a70a3b8cec9;hp=42277b02e6c1947d5e0176b11657638aa68a7e49;hb=e43c14095cf443505e6c0d0bc140eab2993c98a4;hpb=f6bcc10ce7b517f04eb5cddf01c9ec29ee729b7e diff --git a/src/events.c b/src/events.c index 42277b02..e82d3667 100644 --- a/src/events.c +++ b/src/events.c @@ -66,7 +66,7 @@ static int FilterEventsExt(const Event *event) /* do no reset mouse cursor before all pending events have been processed */ if (gfx.cursor_mode == cursor_mode_last && - ((effectiveGameStatus() == GAME_MODE_TITLE && + ((game_status == GAME_MODE_TITLE && gfx.cursor_mode == CURSOR_NONE) || (game_status == GAME_MODE_PLAYING && gfx.cursor_mode == CURSOR_PLAYFIELD))) @@ -208,7 +208,7 @@ void EventLoop(void) } else { - if (effectiveGameStatus() == GAME_MODE_TITLE) + if (game_status == GAME_MODE_TITLE) { /* when showing title screens, hide mouse pointer (if not moved) */ @@ -218,7 +218,8 @@ void EventLoop(void) SetMouseCursor(CURSOR_NONE); } } - else if (game_status == GAME_MODE_PLAYING && !tape.pausing) + else if (game_status == GAME_MODE_PLAYING && (!tape.pausing || + tape.single_step)) { /* when playing, display a special mouse pointer inside the playfield */ @@ -407,9 +408,6 @@ void HandleButtonEvent(ButtonEvent *event) void HandleMotionEvent(MotionEvent *event) { - if (!PointerInWindow(window)) - return; /* window and pointer are on different screens */ - if (button_status == MB_RELEASED && game_status != GAME_MODE_EDITOR) return; @@ -1554,28 +1552,6 @@ void HandleKey(Key key, int key_status) } break; -#if 0 - case KSYM_s: - if (!global.fps_slowdown) - { - global.fps_slowdown = TRUE; - global.fps_slowdown_factor = 2; - printf("fps slowdown enabled -- display only every 2nd frame\n"); - } - else if (global.fps_slowdown_factor == 2) - { - global.fps_slowdown_factor = 4; - printf("fps slowdown enabled -- display only every 4th frame\n"); - } - else - { - global.fps_slowdown = FALSE; - global.fps_slowdown_factor = 1; - printf("fps slowdown disabled\n"); - } - break; -#endif - case KSYM_v: printf("::: currently using game engine version %d\n", game.engine_version);