Merge pull request #8294 from Wiimpathy/WiiOverlayFix

Wii: Don't init overlay when RAM is beyond 72MB.
This commit is contained in:
Twinaphex 2019-02-15 17:29:15 +01:00 committed by GitHub
commit f54f246247
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2145,6 +2145,12 @@ TODO: Add a setting for these tweaks */
break;
case CMD_EVENT_OVERLAY_INIT:
{
#if defined(GEKKO)
/* Avoid a crash at startup or even when toggling overlay in rgui */
uint64_t memory_used = frontend_driver_get_used_memory();
if(memory_used > (72 * 1024 * 1024))
break;
#endif
settings_t *settings = config_get_ptr();
command_event(CMD_EVENT_OVERLAY_DEINIT, NULL);
#ifdef HAVE_OVERLAY