diff --git a/OpenParrot/src/Utility/GameDetect.cpp b/OpenParrot/src/Utility/GameDetect.cpp index 69f05ff..6f9362d 100644 --- a/OpenParrot/src/Utility/GameDetect.cpp +++ b/OpenParrot/src/Utility/GameDetect.cpp @@ -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. diff --git a/OpenParrot/src/Utility/GameDetect.h b/OpenParrot/src/Utility/GameDetect.h index d1ea48e..708e0ad 100644 --- a/OpenParrot/src/Utility/GameDetect.h +++ b/OpenParrot/src/Utility/GameDetect.h @@ -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(); diff --git a/OpenParrot/src/Utility/GameID.h b/OpenParrot/src/Utility/GameID.h index b3d0e9c..3b763f7 100644 --- a/OpenParrot/src/Utility/GameID.h +++ b/OpenParrot/src/Utility/GameID.h @@ -90,5 +90,6 @@ enum class GameID Yatagarasu, Exception, KOF2002, - BlazBlueCF201 + BlazBlueCF201, + LinuxEmulation }; \ No newline at end of file diff --git a/OpenParrot/src/dllmain.cpp b/OpenParrot/src/dllmain.cpp index 009e616..187d4b9 100644 --- a/OpenParrot/src/dllmain.cpp +++ b/OpenParrot/src/dllmain.cpp @@ -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)