mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-27 03:31:49 +01:00
Allow SYSTEM_RAM to be queried in games that do not have SRAM
This commit is contained in:
parent
997360b114
commit
ac67b0a430
@ -2189,13 +2189,10 @@ unsigned retro_get_region(void) { return vdp_pal ? RETRO_REGION_PAL : RETRO_REGI
|
||||
|
||||
void *retro_get_memory_data(unsigned id)
|
||||
{
|
||||
if (!sram.on)
|
||||
return NULL;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_MEMORY_SAVE_RAM:
|
||||
return sram.sram;
|
||||
return sram.on ? sram.sram : NULL;
|
||||
case RETRO_MEMORY_SYSTEM_RAM:
|
||||
return work_ram;
|
||||
default:
|
||||
@ -2207,13 +2204,13 @@ size_t retro_get_memory_size(unsigned id)
|
||||
{
|
||||
int i;
|
||||
|
||||
if (!sram.on)
|
||||
return 0;
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_MEMORY_SAVE_RAM:
|
||||
{
|
||||
if (!sram.on)
|
||||
return 0;
|
||||
|
||||
/* if emulation is not running, we assume the frontend is requesting SRAM size for loading */
|
||||
if (!is_running)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user