Removing dependencies on MainWindow.

This commit is contained in:
Ben Vanik
2015-07-01 08:02:22 -07:00
parent 4732378ba9
commit 9efccc5f4a
17 changed files with 123 additions and 98 deletions

View File

@@ -67,7 +67,7 @@ SHIM_CALL XamShowMessageBoxUI_shim(PPCContext* ppc_context,
TASKDIALOGCONFIG config = {0};
config.cbSize = sizeof(config);
config.hInstance = GetModuleHandle(nullptr);
config.hwndParent = kernel_state->emulator()->main_window()->hwnd();
config.hwndParent = kernel_state->emulator()->display_window()->hwnd();
config.dwFlags = TDF_ALLOW_DIALOG_CANCELLATION | // esc to exit
TDF_POSITION_RELATIVE_TO_WINDOW; // center in window
config.dwCommonButtons = 0;
@@ -120,7 +120,7 @@ SHIM_CALL XamShowDirtyDiscErrorUI_shim(PPCContext* ppc_context,
XELOGD("XamShowDirtyDiscErrorUI(%d)", user_index);
int button_pressed = 0;
TaskDialog(kernel_state->emulator()->main_window()->hwnd(),
TaskDialog(kernel_state->emulator()->display_window()->hwnd(),
GetModuleHandle(nullptr), L"Disc Read Error",
L"Game is claiming to be unable to read game data!", nullptr,
TDCBF_CLOSE_BUTTON, TD_ERROR_ICON, &button_pressed);