Skip to content

Commit

Permalink
Add support for RetroArch cheats.
Browse files Browse the repository at this point in the history
  • Loading branch information
rohit-n authored and davidgfnet committed Feb 4, 2024
1 parent 3f2c0a4 commit 85a2ac6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libretro/libretro.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,6 +1158,8 @@ void* retro_get_memory_data(unsigned id)
{
if (id == RETRO_MEMORY_SAVE_RAM)
return gamepak_backup;
else if (id == RETRO_MEMORY_SYSTEM_RAM)
return ewram;

return NULL;
}
Expand All @@ -1166,6 +1168,8 @@ size_t retro_get_memory_size(unsigned id)
{
if (id == RETRO_MEMORY_SAVE_RAM)
return 0x20000; /* Assume 128KiB, biggest possible save */
else if (id == RETRO_MEMORY_SYSTEM_RAM)
return 0x40000;

return 0;
}
Expand Down

0 comments on commit 85a2ac6

Please sign in to comment.