treesummaryrefslogcommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f7a1438..5e6eba3 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -160,10 +160,14 @@ void WriteGameExes()
PROCESS_INFORMATION StartOBS()
{
+ // delete .sentinel folder to stop obs from displaying
+ // error message on startup
+ system("del %appdata%\\obs-studio\\.sentinel /Q");
+
PROCESS_INFORMATION pi;
STARTUPINFOA sui;
GetStartupInfoA(&sui);
- CreateProcessA(nullptr, "C:\\Program Files\\obs-studio\\bin\\64bit\\obs64.exe --disable-shutdown-check",
+ CreateProcessA(nullptr, "C:\\Program Files\\obs-studio\\bin\\64bit\\obs64.exe",
nullptr, nullptr, false, NORMAL_PRIORITY_CLASS, nullptr, "C:\\Program Files\\obs-studio\\bin\\64bit", &sui, &pi);
return pi;
}
@@ -245,6 +249,8 @@ WinMain(HINSTANCE hInstance,
});
window.handlers[WM_QUERYENDSESSION].push_back([&pi_obs](HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
StopOBS(pi_obs);
+ }); window.handlers[WM_ENDSESSION].push_back([&pi_obs](HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
+ StopOBS(pi_obs);
});
window.handlers[WM_CLOSE].push_back([&pi_obs](HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {
StopOBS(pi_obs);