File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 11/* ****************************************************************************
22 *
3- * PROJECT: Multi Theft Auto v1.0
4- * (Shared logic for modifications)
3+ * PROJECT: Multi Theft Auto
54 * LICENSE: See LICENSE in the top level directory
65 * FILE: ceflauncher/Main.cpp
76 * PURPOSE: CEF launcher entry point
87 *
8+ * Multi Theft Auto is available from https://multitheftauto.com/
9+ *
910 *****************************************************************************/
11+
1012#define WIN32_LEAN_AND_MEAN
1113#include < Windows.h>
1214#include < delayimp.h>
@@ -44,5 +46,20 @@ int _declspec(dllexport) InitCEF()
4446 sandboxInfo = scopedSandbox.sandbox_info ();
4547#endif
4648
49+ if (HANDLE job = CreateJobObjectW (nullptr , nullptr ); job != nullptr )
50+ {
51+ JOBOBJECT_EXTENDED_LIMIT_INFORMATION limits{};
52+ limits.BasicLimitInformation .LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE;
53+
54+ if (SetInformationJobObject (job, JobObjectExtendedLimitInformation, &limits, sizeof (limits)))
55+ {
56+ AssignProcessToJobObject (job, GetCurrentProcess ());
57+ }
58+ else
59+ {
60+ CloseHandle (job);
61+ }
62+ }
63+
4764 return CefExecuteProcess (mainArgs, app, sandboxInfo);
4865}
You can’t perform that action at this time.
0 commit comments