mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-23 06:44:38 +01:00
Fix #3936: 'Close all windows' shortcut leaves one window when top toolbar is hidden
Close all windows was missing out the last window in the list. Normally this would be the toolbar which is why the bug only appears when toolbars are hidden.
This commit is contained in:
@@ -827,7 +827,7 @@ void window_close_all()
|
||||
|
||||
window_close_by_class(WC_DROPDOWN);
|
||||
|
||||
for (w = g_window_list; w < RCT2_LAST_WINDOW; w++){
|
||||
for (w = g_window_list; w <= RCT2_LAST_WINDOW; w++) {
|
||||
if (!(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))) {
|
||||
window_close(w);
|
||||
w = g_window_list;
|
||||
@@ -841,7 +841,7 @@ void window_close_all_except_class(rct_windowclass cls)
|
||||
|
||||
window_close_by_class(WC_DROPDOWN);
|
||||
|
||||
for (w = g_window_list; w < RCT2_LAST_WINDOW; w++){
|
||||
for (w = g_window_list; w <= RCT2_LAST_WINDOW; w++){
|
||||
if (w->classification != cls && !(w->flags & (WF_STICK_TO_BACK | WF_STICK_TO_FRONT))) {
|
||||
window_close(w);
|
||||
w = g_window_list;
|
||||
|
||||
Reference in New Issue
Block a user