Skip to content

Commit

Permalink
main: window title search test
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxor4d committed Dec 25, 2024
1 parent 219e304 commit b35e056
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@ DWORD WINAPI find_window_loop(LPVOID)
while (!main_window)
{
// get main window hwnd
if (!main_window) {
if (!main_window) // should really use 'EnumWindows' here
{
main_window = FindWindowA(nullptr, IS_LATEST_BUILD ? "Portal 2 - Direct3D 9" : "PORTAL 2");

if (!main_window) {
main_window = FindWindowA(nullptr, IS_LATEST_BUILD ? "PORTAL 2 - Direct3D 9" : "PORTAL 2");
}
}

Sleep(100); T += 100;
Expand Down

0 comments on commit b35e056

Please sign in to comment.