fix god awful indentation in this file

This commit is contained in:
matcool 2022-10-11 13:14:13 -03:00
parent 66285aeadf
commit 9338440a97
No known key found for this signature in database
GPG key ID: BF58756086D7AB1C

View file

@ -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)