From 01df5b915fe47221015af49d0127d020f6637718 Mon Sep 17 00:00:00 2001 From: JoseAaronLopezGarcia Date: Thu, 12 Dec 2024 15:44:59 +0100 Subject: [PATCH] fix umd video sleep/resume --- core/inferno/inferno.h | 2 +- core/inferno/main.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/inferno/inferno.h b/core/inferno/inferno.h index e6195caf1..21b0e1c09 100644 --- a/core/inferno/inferno.h +++ b/core/inferno/inferno.h @@ -44,7 +44,7 @@ extern SceUID g_umd_cbid; extern int g_umd_error_status; extern int g_drive_status; -extern const char *g_iso_fn; +extern char g_iso_fn[255]; extern int g_game_fix_type; extern SceUID g_drive_status_evf; extern void *g_sector_buf; diff --git a/core/inferno/main.c b/core/inferno/main.c index 55057571b..49dbda13e 100644 --- a/core/inferno/main.c +++ b/core/inferno/main.c @@ -38,7 +38,7 @@ extern int sceKernelSetQTGP3(void *unk0); extern char *GetUmdFile(); // 00002790 -const char *g_iso_fn = NULL; +char g_iso_fn[255]; // 0x00002248 u8 g_umddata[16] = { @@ -60,7 +60,8 @@ int setup_umd_device(void) { int ret; - g_iso_fn = GetUmdFile(); + memset(g_iso_fn, 0, sizeof(g_iso_fn)); + strncpy(g_iso_fn, GetUmdFile(), sizeof(g_iso_fn)); infernoSetDiscType(sctrlSEGetDiscType()); ret = sceIoAddDrv(&g_iodrv);