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 1
1
/* ****************************************************************************
2
2
*
3
- * PROJECT: Multi Theft Auto v1.0
4
- * (Shared logic for modifications)
3
+ * PROJECT: Multi Theft Auto
5
4
* LICENSE: See LICENSE in the top level directory
6
5
* FILE: ceflauncher/Main.cpp
7
6
* PURPOSE: CEF launcher entry point
8
7
*
8
+ * Multi Theft Auto is available from https://multitheftauto.com/
9
+ *
9
10
*****************************************************************************/
11
+
10
12
#define WIN32_LEAN_AND_MEAN
11
13
#include < Windows.h>
12
14
#include < delayimp.h>
@@ -44,5 +46,20 @@ int _declspec(dllexport) InitCEF()
44
46
sandboxInfo = scopedSandbox.sandbox_info ();
45
47
#endif
46
48
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
+
47
64
return CefExecuteProcess (mainArgs, app, sandboxInfo);
48
65
}
You can’t perform that action at this time.
0 commit comments