mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-06 06:32:56 +01:00
Merge branch 'anyc-testing'
This commit is contained in:
@@ -286,7 +286,7 @@ enum {
|
||||
} WINDOW_CLASS;
|
||||
|
||||
enum PROMPT_MODE {
|
||||
PM_SAVE_BEFORE_LOAD,
|
||||
PM_SAVE_BEFORE_LOAD = 0,
|
||||
PM_SAVE_BEFORE_QUIT,
|
||||
PM_SAVE_BEFORE_QUIT2,
|
||||
PM_QUIT
|
||||
|
||||
@@ -309,7 +309,7 @@ static void window_options_mousedown()
|
||||
// populate the list with the sound devices
|
||||
for (i = 0; i < gAudioDeviceCount; i++) {
|
||||
gDropdownItemsFormat[i] = 1142;
|
||||
gDropdownItemsArgs[i] = 1170 | ((uint64)gAudioDevices[i].name << 16);
|
||||
gDropdownItemsArgs[i] = 1170 | ((uint64)(intptr_t)gAudioDevices[i].name << 16);
|
||||
}
|
||||
gDropdownItemsChecked |= (1 << RCT2_GLOBAL(0x9AF280, uint32));
|
||||
break;
|
||||
|
||||
@@ -117,6 +117,12 @@ void window_save_prompt_open()
|
||||
|
||||
prompt_mode = RCT2_GLOBAL(RCT2_ADDRESS_SAVE_PROMPT_MODE, uint16);
|
||||
|
||||
// do not show save prompt if we're in the title demo and click on load game
|
||||
if (prompt_mode != PM_QUIT && RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & SCREEN_FLAGS_TITLE_DEMO) {
|
||||
game_load_or_quit_no_save_prompt();
|
||||
return;
|
||||
}
|
||||
|
||||
// Check if window is already open
|
||||
window = window_bring_to_front_by_id(WC_SAVE_PROMPT, 0);
|
||||
if (window == NULL) {
|
||||
@@ -146,14 +152,13 @@ void window_save_prompt_open()
|
||||
y,
|
||||
(uint32*)window_save_prompt_events,
|
||||
WC_SAVE_PROMPT,
|
||||
0
|
||||
WF_TRANSPARENT | WF_STICK_TO_FRONT
|
||||
);
|
||||
|
||||
window->widgets = widgets;
|
||||
window->enabled_widgets = enabled_widgets;
|
||||
window_init_scroll_widgets(window);
|
||||
window->colours[0] = 154;
|
||||
window->flags |= WF_TRANSPARENT;
|
||||
|
||||
// Pause the game
|
||||
RCT2_GLOBAL(0x009DEA6E, uint8) |= 2;
|
||||
@@ -170,6 +175,12 @@ void window_save_prompt_open()
|
||||
window_save_prompt_widgets[WIDX_LABEL].image = prompt_mode + STR_SAVE_BEFORE_LOADING;
|
||||
|
||||
if (!gGeneral_config.confirmation_prompt) {
|
||||
/* game_load_or_quit_no_save_prompt() will exec requested task and close this window
|
||||
* immediately again.
|
||||
* TODO restructure these functions when we're sure game_load_or_quit_no_save_prompt()
|
||||
* and game_load_or_quit() are not called by the original binary anymore.
|
||||
*/
|
||||
|
||||
if (RCT2_GLOBAL(RCT2_ADDRESS_SCREEN_FLAGS, uint8) & 0x0D) {
|
||||
game_load_or_quit_no_save_prompt();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user