Add System_Notify

This commit is contained in:
Henrik Rydgård committed 2023-03-21 13:37:16 +01:00
1 parent ac5855cdf8
commit 06fcc9ccd7
21 files changed
+95 -47

No files matched your search

+19
View File
@@ -74,6 +74,7 @@
#include "Windows/Debugger/CtrlDisAsmView.h"
#include "Windows/Debugger/CtrlMemView.h"
#include "Windows/Debugger/CtrlRegisterList.h"
#include "Windows/Debugger/DebuggerShared.h"
#include "Windows/InputBox.h"
#include "Windows/WindowsHost.h"
@@ -369,6 +370,24 @@ bool System_GetPropertyBool(SystemProperty prop) {
}
}
static BOOL PostDialogMessage(Dialog *dialog, UINT message, WPARAM wParam = 0, LPARAM lParam = 0) {
return PostMessage(dialog->GetDlgHandle(), message, wParam, lParam);
}
void System_Notify(SystemNotification notification) {
switch (notification) {
case SystemNotification::BOOT_DONE:
if (g_symbolMap)
g_symbolMap->SortSymbols();
PostMessage(MainWindow::GetHWND(), WM_USER + 1, 0, 0);
bool mode = !g_Config.bAutoRun;
if (disasmWindow)
PostDialogMessage(disasmWindow, WM_DEB_SETDEBUGLPARAM, 0, (LPARAM)mode);
break;
}
}
void System_SendMessage(const char *command, const char *parameter) {
if (!strcmp(command, "finish")) {
if (!NativeIsRestarting()) {