mirror of https://github.com/OpenRCT2/OpenRCT2.git
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:
parent
23b5af6145
commit
6ed84ddabd
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue