Star Wars Prevent top most
Star Wars Prevent top most
This commit is contained in:
parent
483dfc20bd
commit
12ad7aae1f
@ -97,6 +97,33 @@ static unsigned int Hook_hasp_write(int hasp_handle, int hasp_fileid, unsigned i
|
|||||||
return HASP_STATUS_OK;
|
return HASP_STATUS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOL (*WINAPI g_origSetWindowPos)(
|
||||||
|
HWND hWnd,
|
||||||
|
HWND hWndInsertAfter,
|
||||||
|
int X,
|
||||||
|
int Y,
|
||||||
|
int cx,
|
||||||
|
int cy,
|
||||||
|
UINT uFlags
|
||||||
|
);
|
||||||
|
|
||||||
|
BOOL SetWindowPosHook(
|
||||||
|
HWND hWnd,
|
||||||
|
HWND hWndInsertAfter,
|
||||||
|
int X,
|
||||||
|
int Y,
|
||||||
|
int cx,
|
||||||
|
int cy,
|
||||||
|
UINT uFlags
|
||||||
|
)
|
||||||
|
{
|
||||||
|
if((DWORD_PTR)hWndInsertAfter && (DWORD_PTR)HWND_TOPMOST)
|
||||||
|
{
|
||||||
|
return g_origSetWindowPos(hWnd, HWND_TOP, X, Y, cx, cy, uFlags);
|
||||||
|
}
|
||||||
|
return g_origSetWindowPos(hWnd, hWndInsertAfter, X, Y, cx, cy, uFlags);
|
||||||
|
}
|
||||||
|
|
||||||
extern LPCSTR hookPort;
|
extern LPCSTR hookPort;
|
||||||
|
|
||||||
static InitFunction StarWarsJapEs3XFunc([]()
|
static InitFunction StarWarsJapEs3XFunc([]()
|
||||||
@ -171,6 +198,7 @@ static InitFunction StarWarsEs3XLauncherFunc([]()
|
|||||||
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_encrypt", Hook_hasp_encrypt, NULL);
|
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_encrypt", Hook_hasp_encrypt, NULL);
|
||||||
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_logout", Hook_hasp_logout, NULL);
|
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_logout", Hook_hasp_logout, NULL);
|
||||||
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_login", Hook_hasp_login, NULL);
|
MH_CreateHookApi(L"hasp_windows_x64_100610.dll", "hasp_login", Hook_hasp_login, NULL);
|
||||||
|
MH_CreateHookApi(L"user32.dll", "SetWindowPos", SetWindowPosHook, (void**)&g_origSetWindowPos);
|
||||||
MH_EnableHook(MH_ALL_HOOKS);
|
MH_EnableHook(MH_ALL_HOOKS);
|
||||||
|
|
||||||
// Ignore Projector Error
|
// Ignore Projector Error
|
||||||
@ -192,7 +220,6 @@ static InitFunction StarWarsEs3XLauncherFunc([]()
|
|||||||
injector::MakeNOP(imageBase + 0x342B3, 6);
|
injector::MakeNOP(imageBase + 0x342B3, 6);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
hookPort = "COM3";
|
hookPort = "COM3";
|
||||||
}, GameID::StarWarsEs3XLauncher);
|
}, GameID::StarWarsEs3XLauncher);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user