X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fscreens.c;h=533cf4c4ce2cb84338297ff56d9de7ec122911a5;hb=5f29516b5acf64df0acb0efeb20f64c2945fc74b;hp=d027efa27227ff95e00338bc6a1c8d457683932f;hpb=84115b315d6a5954ca0add6b21b9c4f08631211f;p=rocksndiamonds.git diff --git a/src/screens.c b/src/screens.c index d027efa2..533cf4c4 100644 --- a/src/screens.c +++ b/src/screens.c @@ -8630,11 +8630,6 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick) { 282, 210, MARKER_AXIS_Y, "righty", }, }; - unsigned int event_frame_delay = 0; - unsigned int event_frame_delay_value = GAME_FRAME_DELAY; - - ResetDelayCounter(&event_frame_delay); - if (!bitmaps_initialized) { controller = LoadCustomImage("joystick/controller.png"); @@ -8766,6 +8761,12 @@ static boolean ConfigureJoystickMapButtonsAndAxes(SDL_Joystick *joystick) screen_initialized = TRUE; + unsigned int event_frame_delay = 0; + unsigned int event_frame_delay_value = GAME_FRAME_DELAY; + + // reset frame delay counter directly after updating screen + ResetDelayCounter(&event_frame_delay); + while (NextValidEvent(&event)) { switch (event.type) @@ -9745,6 +9746,10 @@ static void CreateScreenMenubuttons(void) int type = GD_TYPE_NORMAL_BUTTON; boolean checked = FALSE; + // do not use touch buttons if overlay touch buttons are disabled + if (is_touch_button && !setup.touch.overlay_buttons) + continue; + event_mask = menubutton_info[i].event_mask; x = (is_touch_button ? pos->x : mSX + GDI_ACTIVE_POS(pos->x));