X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=f2f645933e6be727a2e8bb39a4637fffe4740e59;hb=02a095de0eb40735cb15b3f043c1639dbd883ce1;hp=a7732a8e857ae91e289e1c860faea4b9daf5742d;hpb=7ef815fdafe95d07ab7b2527033900890b50d370;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index a7732a8e..f2f64593 100644 --- a/src/events.c +++ b/src/events.c @@ -408,6 +408,7 @@ void ClearEventQueue(void) button_status = MB_RELEASED; break; + case EVENT_FINGERRELEASE: case EVENT_KEYRELEASE: ClearPlayerAction(); break; @@ -443,6 +444,9 @@ void ClearPlayerAction(void) stored_player[i].snap_action = 0; } + // simulate finger release events for still pressed virtual buttons + overlay.grid_button_action = JOY_NO_ACTION; + ClearTouchInfo(); ClearJoystickState(); ClearPlayerMouseAction(); @@ -669,19 +673,10 @@ void HandleWindowEvent(WindowEvent *event) // check if screen orientation has changed (should always be true here) if (nr != GRID_ACTIVE_NR()) { - int x, y; - if (game_status == GAME_MODE_SETUP) RedrawSetupScreenAfterScreenRotation(nr); - nr = GRID_ACTIVE_NR(); - - overlay.grid_xsize = setup.touch.grid_xsize[nr]; - overlay.grid_ysize = setup.touch.grid_ysize[nr]; - - for (x = 0; x < MAX_GRID_XSIZE; x++) - for (y = 0; y < MAX_GRID_YSIZE; y++) - overlay.grid_button[x][y] = setup.touch.grid_button[nr][x][y]; + SetOverlayGridSizeAndButtons(); } } } @@ -1754,7 +1749,7 @@ void HandleButton(int mx, int my, int button, int button_nr) break; case GAME_MODE_PSEUDO_TYPENAME: - HandleTypeName(0, KSYM_Return); + HandleTypeName(KSYM_Return); break; case GAME_MODE_LEVELS: @@ -1895,6 +1890,10 @@ static void HandleKeysSpecial(Key key) { global.show_frames_per_second = !global.show_frames_per_second; } + else if (strSuffix(cheat_input, ":xsn")) + { + tile_cursor.xsn_debug = TRUE; + } } else if (game_status == GAME_MODE_PLAYING) { @@ -2298,7 +2297,7 @@ void HandleKey(Key key, int key_status) switch (game_status) { case GAME_MODE_PSEUDO_TYPENAME: - HandleTypeName(0, key); + HandleTypeName(key); break; case GAME_MODE_TITLE: