Block exit button from terminating the installer while it's in progress. (#300)

* Block exit button from terminating the installer while it's in progress.

* Fix quit prompt not appearing when closing the game from the taskbar.

---------

Co-authored-by: Skyth <19259897+blueskythlikesclouds@users.noreply.github.com>
This commit is contained in:
Darío
2025-02-06 19:21:18 -03:00
committed by GitHub
parent e7cc5a858e
commit 266d436c28
7 changed files with 45 additions and 15 deletions

View File

@@ -6973,14 +6973,14 @@ PPC_FUNC(sub_82E328D8)
class SDLEventListenerForPSOCaching : public SDLEventListener
{
public:
void OnSDLEvent(SDL_Event* event) override
bool OnSDLEvent(SDL_Event* event) override
{
if (event->type != SDL_QUIT)
return;
return false;
std::lock_guard lock(g_pipelineCacheMutex);
if (g_pipelineStatesToCache.empty())
return;
return false;
FILE* f = fopen("send_this_file_to_skyth.txt", "ab");
if (f != nullptr)
@@ -7095,6 +7095,8 @@ public:
fclose(f);
}
return false;
}
};
SDLEventListenerForPSOCaching g_sdlEventListenerForPSOCaching;