-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
36 lines (29 loc) · 953 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <windows.h>
int main() {
puts("Starting game via Steam...\n");
system("start \"\" steam://rungameid/250900");
puts("Started game, waiting for window...");
HWND window;
do {
Sleep(1000);
window = FindWindowA(nullptr, "Binding of Isaac: Repentance");
} while (window == nullptr);
puts("Found window, waiting for next launch state...");
// Wait until game fully start, just for reliability reason
LPRECT rect;
do {
GetWindowRect(window, rect);
Sleep(100);
} while((rect->right - rect->left) < 1200);
puts("Game started, sleeping for 1 second...");
Sleep(1000);
puts("Applying patch...");
if (SetWindowLongPtrA(window, GWL_STYLE, WS_VISIBLE | WS_CLIPSIBLINGS) == 0) {
printf("an error occurred while settings props, %d", GetLastError());
return 1;
}
CloseHandle(window);
puts("Done!");
return 0;
}