[-] Win32: Unlink Wer.lib.
Write to the registry instead.
This commit is contained in:
parent
07720f0379
commit
5fa8720c9b
@ -62,7 +62,6 @@
|
|||||||
"Dbghelp.lib",
|
"Dbghelp.lib",
|
||||||
"ws2_32.lib",
|
"ws2_32.lib",
|
||||||
"Ntdll.lib",
|
"Ntdll.lib",
|
||||||
"Wer.lib",
|
|
||||||
"wintrust.lib",
|
"wintrust.lib",
|
||||||
"Winmm.lib",
|
"Winmm.lib",
|
||||||
"Iphlpapi.lib"
|
"Iphlpapi.lib"
|
||||||
|
@ -27,7 +27,9 @@
|
|||||||
#include <Source/Grug/AuGrug.hpp>
|
#include <Source/Grug/AuGrug.hpp>
|
||||||
#include <Source/Exit/AuExit.hpp>
|
#include <Source/Exit/AuExit.hpp>
|
||||||
|
|
||||||
|
#if 0
|
||||||
#include <WerApi.h>
|
#include <WerApi.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
static thread_local int gDebugLocked = 0;
|
static thread_local int gDebugLocked = 0;
|
||||||
|
|
||||||
@ -512,6 +514,7 @@ namespace Aurora::Debug
|
|||||||
|
|
||||||
static void DisableWindowsErrorReporting()
|
static void DisableWindowsErrorReporting()
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
// Windows has this annoying watchdog that triggers when your main loop doesnt respond after a while
|
// Windows has this annoying watchdog that triggers when your main loop doesnt respond after a while
|
||||||
// It's aggressive in its approach, giving the users a choice to forcefully terminate as soon as they spam click a busy app,
|
// It's aggressive in its approach, giving the users a choice to forcefully terminate as soon as they spam click a busy app,
|
||||||
// or never at all. latterly, its not uncommon for the app to not come back up, bc win32.
|
// or never at all. latterly, its not uncommon for the app to not come back up, bc win32.
|
||||||
@ -527,6 +530,26 @@ namespace Aurora::Debug
|
|||||||
// This isn't what we want, but it's probably what the user wants
|
// This isn't what we want, but it's probably what the user wants
|
||||||
// MSFT is such a loving company, they'll do almost nothing to ensure they wont steal all your data
|
// MSFT is such a loving company, they'll do almost nothing to ensure they wont steal all your data
|
||||||
WerAddExcludedApplication(AuLocale::ConvertFromUTF8(procName).c_str(), false);
|
WerAddExcludedApplication(AuLocale::ConvertFromUTF8(procName).c_str(), false);
|
||||||
|
#else
|
||||||
|
|
||||||
|
// This implementation doesn't require a single IAT entry to a pointless dll
|
||||||
|
AuString procName;
|
||||||
|
if (!Process::GetProcName(procName))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto procNameWide = AuLocale::ConvertFromUTF8(procName);
|
||||||
|
|
||||||
|
HKEY hKey;
|
||||||
|
if (::RegOpenKeyExW(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\Windows Error Reporting\\ExcludedApplications", 0, KEY_WRITE, &hKey) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
DWORD bioluminescenceReductionFactor { 1 };
|
||||||
|
(void)::RegSetValueExW(hKey, procNameWide.c_str(), 0, REG_DWORD, (const BYTE *)&bioluminescenceReductionFactor, sizeof(DWORD));
|
||||||
|
::RegCloseKey(hKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitWin32()
|
void InitWin32()
|
||||||
|
Loading…
Reference in New Issue
Block a user