fixed nasty bug that caused empty screen on game elements info screen
authorHolger Schemel <info@artsoft.org>
Mon, 3 Apr 2023 08:34:27 +0000 (10:34 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 3 Apr 2023 08:34:39 +0000 (10:34 +0200)
No, this was not meant to be an April Fools' Day joke.

src/screens.c

index 47b37a34777ea812cc35ee3ff5bc94bf5aaaa31a..60637697a30ee9e9f381995712c0f55e7dc9bc63 100644 (file)
 #define MENU_SCREEN_INFO_SPACE_BOTTOM  (menu.bottom_spacing_info[info_mode])
 #define MENU_SCREEN_INFO_SPACE_LINE    (menu.line_spacing_info[info_mode])
 #define MENU_SCREEN_INFO_SPACE_EXTRA   (menu.extra_spacing_info[info_mode])
-#define MENU_SCREEN_INFO_TILE_SIZE     (menu.tile_size_info[info_mode])
+#define MENU_SCREEN_INFO_TILE_SIZE_RAW (menu.tile_size_info[info_mode])
+#define MENU_SCREEN_INFO_TILE_SIZE     (MENU_SCREEN_INFO_TILE_SIZE_RAW > 0 ? \
+                                        MENU_SCREEN_INFO_TILE_SIZE_RAW : TILEY)
 #define MENU_SCREEN_INFO_ENTRY_SIZE_RAW        (menu.list_entry_size_info[info_mode])
 #define MENU_SCREEN_INFO_ENTRY_SIZE    (MAX(MENU_SCREEN_INFO_ENTRY_SIZE_RAW, \
                                             MENU_SCREEN_INFO_TILE_SIZE))