1
0
mirror of synced 2025-02-22 21:19:56 +01:00

Add Linux Support for OpenParrot

- OpenParrot is now able to be loaded with the ElfLoader once changes are made. No game profiles added yet.
This commit is contained in:
Reaver 2020-08-07 00:06:39 +03:00
parent 456252541f
commit 9dd7158f28
4 changed files with 28 additions and 1 deletions

View File

@ -9,6 +9,12 @@ X2Type GameDetect::X2Type = X2Type::None;
static char newCrc[0x400];
static char errorBuffer[256];
#if _M_IX86
void GameDetect::DetectCurrentLinuxGame()
{
}
#endif
void GameDetect::DetectCurrentGame()
{
// TODO: move all game detection bound to crcResult immediately below to use the newCrcResult switch at end with its new CRC instead.

View File

@ -7,6 +7,7 @@ class GameDetect
public:
static GameID currentGame;
static void DetectCurrentGame();
static void DetectCurrentLinuxGame();
static X2Type X2Type;
static bool IsTypeX();
static bool IsNesicaGame();

View File

@ -90,5 +90,6 @@ enum class GameID
Yatagarasu,
Exception,
KOF2002,
BlazBlueCF201
BlazBlueCF201,
LinuxEmulation
};

View File

@ -91,6 +91,25 @@ static void RunMain()
InitFunction::RunFunctions(GameDetect::currentGame);
}
void* (*g_makeCall)(void* call);
#if _M_IX86
extern "C" __declspec(dllexport) void InitLinux(void* (*makeCall)(void*))
{
g_makeCall = makeCall;
if (!config.load_file("teknoparrot.ini"))
{
//MessageBoxA(NULL, V("Failed to open config.ini"), V("TeknoParrot",) MB_OK);
//std::_Exit(0);
}
GameDetect::DetectCurrentLinuxGame();
InitFunction::RunFunctions(GameID::Global);
InitFunction::RunFunctions(GameID::LinuxEmulation);
InitFunction::RunFunctions(GameDetect::currentGame);
}
#endif
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
if (ul_reason_for_call == DLL_PROCESS_ATTACH)