From 3001d9492c6e7e83e82843a4b9c6186b0b58f5e5 Mon Sep 17 00:00:00 2001 From: RSDuck Date: Sat, 17 Aug 2019 16:50:48 +0200 Subject: abandon pipelining on jit fixes Golden Sun Dawn this makes the cpu state incompatible between interpreter and JIT. That's why switching cpu mode requires a restart(not requiring is stupid anyway) and the pipeline is manually filled when making a save state. --- src/libui_sdl/libui/windows/stddialogs.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/libui_sdl/libui/windows') diff --git a/src/libui_sdl/libui/windows/stddialogs.cpp b/src/libui_sdl/libui/windows/stddialogs.cpp index d0fd506..7537015 100644 --- a/src/libui_sdl/libui/windows/stddialogs.cpp +++ b/src/libui_sdl/libui/windows/stddialogs.cpp @@ -136,7 +136,7 @@ char *uiSaveFile(uiWindow *parent, const char* filter, const char* initpath) // TODO switch to TaskDialogIndirect()? -static void msgbox(HWND parent, const char *title, const char *description, TASKDIALOG_COMMON_BUTTON_FLAGS buttons, PCWSTR icon) +static int msgbox(HWND parent, const char *title, const char *description, TASKDIALOG_COMMON_BUTTON_FLAGS buttons, PCWSTR icon) { WCHAR *wtitle, *wdescription; HRESULT hr; @@ -144,12 +144,15 @@ static void msgbox(HWND parent, const char *title, const char *description, TASK wtitle = toUTF16(title); wdescription = toUTF16(description); - hr = TaskDialog(parent, NULL, NULL, wtitle, wdescription, buttons, icon, NULL); + int result; + hr = TaskDialog(parent, NULL, NULL, wtitle, wdescription, buttons, icon, &result); if (hr != S_OK) logHRESULT(L"error showing task dialog", hr); uiFree(wdescription); uiFree(wtitle); + + return result; } void uiMsgBox(uiWindow *parent, const char *title, const char *description) @@ -165,3 +168,13 @@ void uiMsgBoxError(uiWindow *parent, const char *title, const char *description) msgbox(windowHWND(parent), title, description, TDCBF_OK_BUTTON, TD_ERROR_ICON); enableAllWindowsExcept(parent); } + +int uiMsgBoxConfirm(uiWindow * parent, const char *title, const char *description) +{ + disableAllWindowsExcept(parent); + int result = + msgbox(windowHWND(parent), title, description, TDCBF_OK_BUTTON | TDCBF_CANCEL_BUTTON, TD_WARNING_ICON); + enableAllWindowsExcept(parent); + + return result == IDOK; +} \ No newline at end of file -- cgit v1.2.3