automatically add needed dll override for Linux/macOS/Android (WINE)

This commit is contained in:
FunkyFr3sh
2025-01-05 07:06:01 -03:00
committed by majcosta
parent f471b74f5b
commit fd6ffd8d69
4 changed files with 91 additions and 0 deletions
+10
View File
@@ -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())