mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
automatically add needed dll override for Linux/macOS/Android (WINE)
This commit is contained in:
+10
@@ -49,6 +49,7 @@
|
||||
#include "Lua Interpreter.h"
|
||||
#include "connect.h"
|
||||
#include "english.h"
|
||||
#include "wine.h"
|
||||
|
||||
#include "BuildDefines.h"
|
||||
#include "Intro.h"
|
||||
@@ -766,7 +767,16 @@ int PASCAL HandledWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR pC
|
||||
HWND hPrevInstanceWindow;
|
||||
UINT32 uiTimer = 0;
|
||||
|
||||
// Make sure the game works out of the box on Linux/macOS/Android (WINE)
|
||||
if (wine_add_dll_overrides())
|
||||
{
|
||||
/* newly added dll overrides only work after a restart */
|
||||
char exe_path[MAX_PATH] = { 0 };
|
||||
GetModuleFileNameA(NULL, exe_path, _countof(exe_path));
|
||||
|
||||
ShellExecuteA(NULL, "open", exe_path, pCommandLine, NULL, sCommandShow);
|
||||
return 0;
|
||||
}
|
||||
|
||||
vfs::Log::setSharedString( getGameID() );
|
||||
//if(!vfs::Aspects::getMutexFactory())
|
||||
|
||||
Reference in New Issue
Block a user