mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Finish Mojave fixes
This commit is contained in:
parent
1c9c3aca2c
commit
88c3867ff5
1 changed files with 6 additions and 7 deletions
|
|
@ -557,22 +557,21 @@ bool Oneshot::msgbox(int type, const char *body, const char *title)
|
||||||
#ifdef OS_W32
|
#ifdef OS_W32
|
||||||
PlaySoundW((LPCWSTR)sound, NULL, SND_ALIAS_ID | SND_ASYNC);
|
PlaySoundW((LPCWSTR)sound, NULL, SND_ALIAS_ID | SND_ASYNC);
|
||||||
#endif
|
#endif
|
||||||
int *button;
|
int button;
|
||||||
|
|
||||||
#ifdef OS_OSX
|
#ifdef OS_OSX
|
||||||
|
int *btn = &button;
|
||||||
|
|
||||||
// Message boxes and UI changes must be performed from the main thread on macOS Mojave and above.
|
// Message boxes and UI changes must be performed from the main thread on macOS Mojave and above.
|
||||||
// This block ensures the message box will show from the main thread.
|
// This block ensures the message box will show from the main thread.
|
||||||
dispatch_sync(dispatch_get_main_queue(),
|
dispatch_sync(dispatch_get_main_queue(),
|
||||||
^{ SDL_ShowMessageBox(&data, button); }
|
^{ SDL_ShowMessageBox(&data, btn); }
|
||||||
);
|
);
|
||||||
|
|
||||||
// dispatch_block_wait(dispatch_get_main_queue(), DISPATCH_TIME_FOREVER);
|
|
||||||
*button = 1; // XXX Setting the button's value doesn't seem to work.
|
|
||||||
#else
|
#else
|
||||||
SDL_ShowMessageBox(&data, button);
|
SDL_ShowMessageBox(&data, &button);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return (*button) ? true : false;
|
return button ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string Oneshot::textinput(const char* prompt, int char_limit, const char* fontName) {
|
std::string Oneshot::textinput(const char* prompt, int char_limit, const char* fontName) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue