mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-12-23 12:20:54 -06:00
Prevent game from closing whilst autosaving (#967)
This commit is contained in:
@@ -8,6 +8,7 @@ public:
|
|||||||
static inline bool s_isInit;
|
static inline bool s_isInit;
|
||||||
static inline bool s_isMissingDLC;
|
static inline bool s_isMissingDLC;
|
||||||
static inline bool s_isLoading;
|
static inline bool s_isLoading;
|
||||||
|
static inline bool s_isSaving;
|
||||||
static inline bool s_isWerehog;
|
static inline bool s_isWerehog;
|
||||||
static inline bool s_isSaveDataCorrupt;
|
static inline bool s_isSaveDataCorrupt;
|
||||||
|
|
||||||
|
|||||||
@@ -97,6 +97,8 @@ PPC_FUNC(sub_824E5170)
|
|||||||
|
|
||||||
__imp__sub_824E5170(ctx, base);
|
__imp__sub_824E5170(ctx, base);
|
||||||
|
|
||||||
|
App::s_isSaving = pSaveIcon->m_IsVisible;
|
||||||
|
|
||||||
if (pSaveIcon->m_IsVisible)
|
if (pSaveIcon->m_IsVisible)
|
||||||
{
|
{
|
||||||
App::s_isSaveDataCorrupt = false;
|
App::s_isSaveDataCorrupt = false;
|
||||||
|
|||||||
@@ -34,8 +34,14 @@ int Window_OnSDLEvent(void*, SDL_Event* event)
|
|||||||
switch (event->type)
|
switch (event->type)
|
||||||
{
|
{
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
|
{
|
||||||
|
if (App::s_isSaving)
|
||||||
|
break;
|
||||||
|
|
||||||
App::Exit();
|
App::Exit();
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SDL_KEYDOWN:
|
case SDL_KEYDOWN:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user