mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
fix the menubar height growing issue too
This commit is contained in:
parent
e050ca89c7
commit
defe82c9ce
@ -624,6 +624,7 @@ static void win32_set_position_from_config(void)
|
|||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||||
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||||
|
int menu_bar_height = GetSystemMetrics(SM_CYMENU);
|
||||||
if (!settings->bools.video_window_save_positions)
|
if (!settings->bools.video_window_save_positions)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -638,6 +639,7 @@ static void win32_save_position(void)
|
|||||||
RECT rect;
|
RECT rect;
|
||||||
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
int border_thickness = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||||
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
int title_bar_height = GetSystemMetrics(SM_CYCAPTION);
|
||||||
|
int menu_bar_height = GetSystemMetrics(SM_CYMENU);
|
||||||
WINDOWPLACEMENT placement;
|
WINDOWPLACEMENT placement;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
memset(&placement, 0, sizeof(placement));
|
memset(&placement, 0, sizeof(placement));
|
||||||
@ -660,7 +662,7 @@ static void win32_save_position(void)
|
|||||||
settings->uints.window_position_x = g_win32_pos_x;
|
settings->uints.window_position_x = g_win32_pos_x;
|
||||||
settings->uints.window_position_y = g_win32_pos_y;
|
settings->uints.window_position_y = g_win32_pos_y;
|
||||||
settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2;
|
settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2;
|
||||||
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height;
|
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user