mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Merge pull request #1660
* make extra sure progress dialog crash handler is in the foregroud
This commit is contained in:
parent
1c059aae7c
commit
4b601f15c7
2 changed files with 3 additions and 0 deletions
|
|
@ -188,6 +188,8 @@ LONG exception_handler(EXCEPTION_POINTERS* ex)
|
||||||
if (DWORD written; !WriteFile(g_crashhandler_pipe_write, &g_startInfo.TroubleshootingPackData[0], static_cast<DWORD>(std::span(g_startInfo.TroubleshootingPackData).size_bytes()), &written, nullptr) || std::span(g_startInfo.TroubleshootingPackData).size_bytes() != written)
|
if (DWORD written; !WriteFile(g_crashhandler_pipe_write, &g_startInfo.TroubleshootingPackData[0], static_cast<DWORD>(std::span(g_startInfo.TroubleshootingPackData).size_bytes()), &written, nullptr) || std::span(g_startInfo.TroubleshootingPackData).size_bytes() != written)
|
||||||
return EXCEPTION_CONTINUE_SEARCH;
|
return EXCEPTION_CONTINUE_SEARCH;
|
||||||
|
|
||||||
|
AllowSetForegroundWindow(GetProcessId(g_crashhandler_process));
|
||||||
|
|
||||||
HANDLE waitHandles[] = { g_crashhandler_process, g_crashhandler_event };
|
HANDLE waitHandles[] = { g_crashhandler_process, g_crashhandler_event };
|
||||||
DWORD waitResult = WaitForMultipleObjects(2, waitHandles, FALSE, INFINITE);
|
DWORD waitResult = WaitForMultipleObjects(2, waitHandles, FALSE, INFINITE);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -773,6 +773,7 @@ int main() {
|
||||||
{
|
{
|
||||||
SetWindowPos(hwndProgressDialog, HWND_TOPMOST, 0, 0, 0, 0,
|
SetWindowPos(hwndProgressDialog, HWND_TOPMOST, 0, 0, 0, 0,
|
||||||
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
|
SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW);
|
||||||
|
SetForegroundWindow(hwndProgressDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
pOleWindow->Release();
|
pOleWindow->Release();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue