mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Fixed overlay on x64
They are not longer available with GetWindowLong. There is a new function GetWindowLongPtr. GWLP* must be used.
This commit is contained in:
parent
5a0653d080
commit
0fa2d82c67
2 changed files with 4 additions and 7 deletions
|
@ -396,7 +396,7 @@ void Hook_Manager::create_hook(const char* libname)
|
||||||
|
|
||||||
bool Hook_Manager::stop_retry()
|
bool Hook_Manager::stop_retry()
|
||||||
{
|
{
|
||||||
// Retry 200 times, we look for rendering functions so its actually: "retry for 200 frames"
|
// Retry or not
|
||||||
bool stop = ++_hook_retries >= max_hook_retries;
|
bool stop = ++_hook_retries >= max_hook_retries;
|
||||||
|
|
||||||
if (stop)
|
if (stop)
|
||||||
|
|
|
@ -14,16 +14,13 @@ HWND GetGameWindow()
|
||||||
{
|
{
|
||||||
if (!GetParent(hWnd))
|
if (!GetParent(hWnd))
|
||||||
{
|
{
|
||||||
#if defined(_WIN64)
|
if (GetModuleHandle(NULL) == (HMODULE)GetWindowLongPtr(hWnd, GWLP_HINSTANCE))
|
||||||
if (GetModuleHandle(NULL) == (HINSTANCE)GetWindowLong(hWnd, GWLP_HINSTANCE))
|
|
||||||
break;
|
break;
|
||||||
#elif defined(_WIN32)
|
|
||||||
if (GetModuleHandle(NULL) == (HINSTANCE)GetWindowLong(hWnd, GWL_HINSTANCE))
|
|
||||||
break;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
hWnd = GetWindow(hWnd, GW_HWNDNEXT);
|
hWnd = GetWindow(hWnd, GW_HWNDNEXT);
|
||||||
}
|
}
|
||||||
|
if (!hWnd)
|
||||||
|
PRINT_DEBUG("Failed to get game window HWND\n");
|
||||||
return hWnd;
|
return hWnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue