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:
Ted John 2016-09-18 23:27:02 +01:00
parent 23b5af6145
commit 6ed84ddabd
1 changed files with 2 additions and 2 deletions

View File

@ -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;