in-game menus now adapt to hdmi changes

This commit is contained in:
Shaun Inman 2023-03-03 23:01:03 -05:00
parent f196202ce3
commit f3bc6d68ea
5 changed files with 38 additions and 29 deletions

View file

@ -1325,21 +1325,9 @@ int main (int argc, char *argv[]) {
POW_update(&dirty, &show_setting, NULL, NULL);
static int had_hdmi = -1;
int has_hdmi = GetHDMI();
if (had_hdmi!=has_hdmi) dirty = 1;
int resized = GFX_autosize(&screen, &dirty);
if (dirty) {
if (had_hdmi!=has_hdmi) {
if (has_hdmi) {
screen = GFX_resize(HDMI_MENU_WIDTH,FIXED_HEIGHT,HDMI_MENU_WIDTH*FIXED_BPP);
}
else {
screen = GFX_resize(FIXED_WIDTH,FIXED_HEIGHT,FIXED_PITCH);
}
had_hdmi = has_hdmi;
}
else GFX_clear(screen); // resizing clears the screen
if (!resized) GFX_clear(screen); // resizing clears the screen
int ox;
int oy;