Skip to content

Commit

Permalink
Merge pull request #30 from retro-wertz/update
Browse files Browse the repository at this point in the history
update for retroachievement compatibility
  • Loading branch information
inactive123 committed Aug 29, 2017
2 parents ead816b + 52723f7 commit 67b70b4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions libretro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1294,6 +1294,9 @@ void retro_init(void)
else
log_cb = NULL;

bool achievements = true;
environ_cb(RETRO_ENVIRONMENT_SET_SUPPORT_ACHIEVEMENTS, &achievements);

CDUtility_Init();

const char *dir = NULL;
Expand Down Expand Up @@ -1954,6 +1957,9 @@ void *retro_get_memory_data(unsigned type)

switch (type)
{
case RETRO_MEMORY_SYSTEM_RAM:
data = BaseRAM;
break;
case RETRO_MEMORY_SAVE_RAM:
if (IsPopulous)
data = (uint8_t*)(ROMSpace + 0x40 * 8192);
Expand All @@ -1973,6 +1979,9 @@ size_t retro_get_memory_size(unsigned type)

switch (type)
{
case RETRO_MEMORY_SYSTEM_RAM:
size = IsSGX ? 32768 : 8192;
break;
case RETRO_MEMORY_SAVE_RAM:
if (IsPopulous)
size = 32768;
Expand Down

0 comments on commit 67b70b4

Please sign in to comment.