mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #455. Since there is no reason to show both quit windows may as well just close the previous one.
This commit is contained in:
parent
4a77bec8fa
commit
f37928c06a
|
@ -125,7 +125,10 @@ void window_save_prompt_open()
|
|||
|
||||
// Check if window is already open
|
||||
window = window_bring_to_front_by_id(WC_SAVE_PROMPT, 0);
|
||||
if (window == NULL) {
|
||||
if (window){
|
||||
window_close(window);
|
||||
}
|
||||
|
||||
if (prompt_mode == PM_QUIT) {
|
||||
widgets = window_quit_prompt_widgets;
|
||||
enabled_widgets =
|
||||
|
@ -146,8 +149,8 @@ void window_save_prompt_open()
|
|||
}
|
||||
|
||||
window = window_create(
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) / 2) - x/2,
|
||||
max(28, (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16) / 2) - y/2),
|
||||
(RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_WIDTH, sint16) / 2) - x / 2,
|
||||
max(28, (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_HEIGHT, sint16) / 2) - y / 2),
|
||||
x,
|
||||
y,
|
||||
(uint32*)window_save_prompt_events,
|
||||
|
@ -164,7 +167,6 @@ void window_save_prompt_open()
|
|||
RCT2_GLOBAL(0x009DEA6E, uint8) |= 2;
|
||||
pause_sounds();
|
||||
window_invalidate_by_id(0x80 | WC_TOP_TOOLBAR, 0);
|
||||
}
|
||||
|
||||
stringId = prompt_mode + STR_LOAD_GAME;
|
||||
if (stringId == STR_LOAD_GAME && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 2)
|
||||
|
|
Loading…
Reference in New Issue