From 5f51800082b430029afffb35e61ec32e03f3cd1f Mon Sep 17 00:00:00 2001 From: nibs Date: Thu, 27 Feb 2020 01:48:19 -0500 Subject: [PATCH] show error for unsupported konami games --- OpenParrot/src/Utility/GameDetect.cpp | 8 ++++++++ OpenParrot/src/dllmain.cpp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/OpenParrot/src/Utility/GameDetect.cpp b/OpenParrot/src/Utility/GameDetect.cpp index 19285ca..0f6d71d 100644 --- a/OpenParrot/src/Utility/GameDetect.cpp +++ b/OpenParrot/src/Utility/GameDetect.cpp @@ -26,6 +26,14 @@ void GameDetect::DetectCurrentGame(bool konami) if (file_exists("popn.dll")) KonamiGame = KonamiGame::HelloPopnMusic; + if (KonamiGame == KonamiGame::None) + { + MessageBoxA(0, "Unsupported Konami Game!", "Error", MB_ICONERROR); + Sleep(100); + ExitProcess(0); + return; + } + return; } uint32_t crcResult = GetCRC32(GetModuleHandle(nullptr), 0x400); diff --git a/OpenParrot/src/dllmain.cpp b/OpenParrot/src/dllmain.cpp index 77a68c9..1d093d5 100644 --- a/OpenParrot/src/dllmain.cpp +++ b/OpenParrot/src/dllmain.cpp @@ -95,7 +95,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser { if (ul_reason_for_call == DLL_PROCESS_ATTACH) { - // SpiceTools + // SpiceTools detection if (GameDetect::file_exists("spice.exe") || GameDetect::file_exists("spice64.exe")) { GameDetect::DetectCurrentGame(true);