From fa0a4c6342af2d5357fc5ef51980e056aa0e409b Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Thu, 14 Jul 2022 03:20:33 +0300 Subject: [PATCH] sdl2: Fix compile See osdn #45096 Signed-off-by: Marko Lindqvist --- client/gui-sdl2/gui_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/client/gui-sdl2/gui_main.c b/client/gui-sdl2/gui_main.c index 8691c63f0c..365a1acd12 100644 --- a/client/gui-sdl2/gui_main.c +++ b/client/gui-sdl2/gui_main.c @@ -401,7 +401,7 @@ static Uint16 main_mouse_button_up_handler(SDL_MouseButtonEvent *button_event, #ifdef UNDER_CE #define SCROLL_MAP_AREA 8 #else - #define SCROLL_MAP_AREA 1 + #define SCROLL_MAP_AREA 1 #endif /**********************************************************************//** @@ -486,12 +486,14 @@ static void update_button_hold_state(void) **************************************************************************/ static int check_scroll_area(int x, int y) { - SDL_Rect rect_north = {.x = 0, .y = 0, .w = main_data.map->w, .y = SCROLL_MAP_AREA}; + SDL_Rect rect_north = {.x = 0, .y = 0, + .w = main_data.map->w, .h = SCROLL_MAP_AREA}; SDL_Rect rect_east = {.x = main_data.map->w - SCROLL_MAP_AREA, .y = 0, .w = SCROLL_MAP_AREA, .h = main_data.map->h}; SDL_Rect rect_south = {.x = 0, .y = main_data.map->h - SCROLL_MAP_AREA, .w = main_data.map->w, .h = SCROLL_MAP_AREA}; - SDL_Rect rect_west = {.x = 0, .y = 0, .w = SCROLL_MAP_AREA, .h = main_data.map->h}; + SDL_Rect rect_west = {.x = 0, .y = 0, + .w = SCROLL_MAP_AREA, .h = main_data.map->h}; if (is_in_rect_area(x, y, &rect_north)) { is_map_scrolling = TRUE; -- 2.35.1