mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -07:00
Fix broken UI in windowed mode for Polaris Chord (#372)
This commit is contained in:
@@ -230,7 +230,13 @@ namespace overlay::windows {
|
||||
auto const register_fn = reinterpret_cast<decltype(&LdrRegisterDllNotification)>
|
||||
(GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "LdrRegisterDllNotification"));
|
||||
|
||||
auto callback = [] CALLBACK (ULONG reason, PCLDR_DLL_NOTIFICATION_DATA data, PVOID ctx) {
|
||||
auto callback =
|
||||
#ifdef _MSC_VER
|
||||
static_cast<PLDR_DLL_NOTIFICATION_FUNCTION>([]
|
||||
#else
|
||||
[] CALLBACK
|
||||
#endif
|
||||
(ULONG reason, PCLDR_DLL_NOTIFICATION_DATA data, PVOID ctx) {
|
||||
if (reason == LDR_DLL_NOTIFICATION_REASON_LOADED) {
|
||||
auto const dll = strtolower(std::filesystem::path({
|
||||
data->Loaded.FullDllName->Buffer,
|
||||
@@ -241,7 +247,11 @@ namespace overlay::windows {
|
||||
static_cast<PatchManager*>(ctx)->reload_local_patches(true);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
)
|
||||
#endif
|
||||
;
|
||||
|
||||
if (register_fn && NT_SUCCESS(register_fn(0, callback, this, &ldr_notify_cookie))) {
|
||||
log_info("patchmanager", "registered for DLL load notifications");
|
||||
|
||||
Reference in New Issue
Block a user