diff --git a/loader/launcher/windows/Bootstrapper.cpp b/loader/launcher/windows/Bootstrapper.cpp index 58785017..72923a14 100644 --- a/loader/launcher/windows/Bootstrapper.cpp +++ b/loader/launcher/windows/Bootstrapper.cpp @@ -15,7 +15,7 @@ int loadGeode() { return 0; } -DWORD WINAPI load(PVOID _) { +DWORD WINAPI load(void*) { auto workingDir = ghc::filesystem::current_path(); auto updatesDir = workingDir / "geode" / "update"; auto resourcesDir = workingDir / "geode" / "resources"; @@ -23,22 +23,22 @@ DWORD WINAPI load(PVOID _) { auto error = std::error_code(); if (ghc::filesystem::exists(updatesDir / "Geode.dll", error) && !error) { - ghc::filesystem::rename( - updatesDir / "Geode.dll", - workingDir / "Geode.dll", error - ); - if (error) { + ghc::filesystem::rename( + updatesDir / "Geode.dll", + workingDir / "Geode.dll", error + ); + if (error) { showError("Unable to update Geode: Unable to move Geode.dll - " + error.message()); return error.value(); } - } + } - if (ghc::filesystem::exists(updatesDir / "resources", error) && !error) { - ghc::filesystem::remove_all(resourcesDir / "geode.loader", error); + if (ghc::filesystem::exists(updatesDir / "resources", error) && !error) { + ghc::filesystem::remove_all(resourcesDir / "geode.loader", error); - if (error) { + if (error) { showError("Unable to update Geode resources: " + error.message()); - } else { + } else { ghc::filesystem::rename( updatesDir / "resources", resourcesDir / "geode.loader", error @@ -47,12 +47,12 @@ DWORD WINAPI load(PVOID _) { showError("Unable to update Geode resources: " + error.message()); } } - } + } return loadGeode(); } -BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID _) { +BOOL WINAPI DllMain(HINSTANCE module, DWORD reason, LPVOID) { if (reason == DLL_PROCESS_ATTACH) { HANDLE handle = CreateThread(NULL, 0, load, module, 0, NULL); if (handle)