Skip to content

Commit eba41a2

Browse files
committed
Fx minor bugs.
1 parent e86f8cc commit eba41a2

3 files changed

Lines changed: 17 additions & 6 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@echo off
2+
3+
START WinSplitPlus64.exe ^
4+
-Player 1 ^
5+
-winclass ^
6+
-winname ^
7+
-mutex "Mutex Game" ^
8+
-width 960 ^
9+
-height 1080 ^
10+
-posx 0 ^
11+
-posy 0 ^
12+
"C:\Game\Game.exe" -window

WinSplitPlusApp/WinSplitPlus.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ copy "$(ProjectDir)Examples\BatFileExample.txt" "$(TargetDir)"</Command>
174174
</Link>
175175
<PostBuildEvent>
176176
<Command>copy "$(SolutionDir)lib\EasyHook\EasyHook64.dll" "$(TargetDir)"
177-
copy "$(ProjectDir)Examples\BatFileExample.txt" "$(TargetDir)"</Command>
177+
copy "$(ProjectDir)Examples\BatFileExample64.txt" "$(TargetDir)"</Command>
178178
</PostBuildEvent>
179179
</ItemDefinitionGroup>
180180
<ItemGroup>

WinSplitPlusApp/main.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -161,11 +161,10 @@ int wmain(int argc, wchar_t* argv[])
161161
FindClose(hFind);
162162
}
163163

164-
// 3. Check if we found any DLLs
165164
if (dllsToInject.empty()) {
166-
Sleep(7000);
167165
std::wcerr << L"Error: No .dll files found in " << pluginsDir << std::endl;
168166
std::wcerr << L"Please ensure a 'plugins' folder exists next to WinSplitPlus.exe and contains your hook DLLs." << std::endl;
167+
Sleep(7000);
169168
//system("pause");
170169
return 1;
171170
}
@@ -197,9 +196,9 @@ int wmain(int argc, wchar_t* argv[])
197196
&si, // StartupInfo
198197
&pi // ProcessInfo
199198
)) {
200-
Sleep(7000);
201199
std::wcerr << L"Failed to create process: " << GetLastError() << std::endl;
202200
std::wcerr << L"Command: " << fullCommandLine << std::endl;
201+
Sleep(7000);
203202
//system("pause");
204203
return 1;
205204
}
@@ -222,14 +221,14 @@ int wmain(int argc, wchar_t* argv[])
222221

223222
if (nt != 0) {
224223
std::wcerr << L"Failed to inject DLL " << dllPath << L": " << RtlGetLastErrorString() << std::endl;
224+
Sleep(5000);
225225
allInjectionsSucceeded = false;
226-
// We can choose to stop or continue; let's continue
227226
}
228227
}
229228

230229
if (!allInjectionsSucceeded) {
231-
Sleep(3000);
232230
std::wcerr << L"Warning: One or more DLLs failed to inject. Attempting to resume process anyway." << std::endl;
231+
Sleep(5000);
233232
}
234233
else {
235234
std::wcout << L"All injections successful." << std::endl;

0 commit comments

Comments
 (0)