X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=b4f7594837de7fedf1a1cb8b93260437e4605962;hb=9ac63ed68417dba413c129c1c14c179f2437fd44;hp=aade635e02388745f5679e3336d1f11ffb731e80;hpb=242a824bccbe43d9a4d6f1405943c59a86ffd262;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index aade635e..b4f75948 100644 --- a/src/events.c +++ b/src/events.c @@ -673,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(); } } } @@ -1758,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: @@ -1899,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) { @@ -2302,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: @@ -2552,6 +2547,7 @@ void HandleJoystick(void) } if (newbutton && (game_status == GAME_MODE_PSEUDO_TYPENAME || + game_status == GAME_MODE_PSEUDO_TYPENAMES || anyTextGadgetActive())) { // leave name input in main menu or text input gadget