X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftools.c;h=606652248307a0eb8a1b05964695d43c2e066781;hb=063fcfffebc7960fedb0e468a6b20821e387d403;hp=b2668d026ae34c8e02ce56f9d5785ac0fe3aaec1;hpb=d3e24bbfb70edb9a805806345eede28c7129baf8;p=rocksndiamonds.git diff --git a/src/tools.c b/src/tools.c index b2668d02..60665224 100644 --- a/src/tools.c +++ b/src/tools.c @@ -1042,8 +1042,9 @@ void FadeIn(int fade_mask) FADE_SXSIZE = FULL_SXSIZE; FADE_SYSIZE = FULL_SYSIZE; - if (game_status == GAME_MODE_PLAYING && - strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS)) + // activate virtual buttons depending on upcoming game status + if (strEqual(setup.touch.control_type, TOUCH_CONTROL_VIRTUAL_BUTTONS) && + game_status == GAME_MODE_PLAYING && !tape.playing) SetOverlayActive(TRUE); SetScreenStates_AfterFadingIn(); @@ -4386,7 +4387,7 @@ static int RequestHandleEvents(unsigned int req_state) break; default: - HandleKeysDebug(key); + HandleKeysDebug(key, KEY_PRESSED); break; } @@ -9441,11 +9442,14 @@ void ChangeViewportPropertiesIfNeeded(void) struct RectWithBorder *vp_door_3 = &viewport.door_2[GAME_MODE_EDITOR]; int new_win_xsize = vp_window->width; int new_win_ysize = vp_window->height; - int border_size = vp_playfield->border_size; - int new_sx = vp_playfield->x + border_size; - int new_sy = vp_playfield->y + border_size; - int new_sxsize = vp_playfield->width - 2 * border_size; - int new_sysize = vp_playfield->height - 2 * border_size; + int border_left = vp_playfield->border_left; + int border_right = vp_playfield->border_right; + int border_top = vp_playfield->border_top; + int border_bottom = vp_playfield->border_bottom; + int new_sx = vp_playfield->x + border_left; + int new_sy = vp_playfield->y + border_top; + int new_sxsize = vp_playfield->width - border_left - border_right; + int new_sysize = vp_playfield->height - border_top - border_bottom; int new_real_sx = vp_playfield->x; int new_real_sy = vp_playfield->y; int new_full_sxsize = vp_playfield->width;