Merge commit 'ab49034205261e8e50708d097ec22151f153a801'
This commit is contained in:
commit
2bda598ac6
@ -74,6 +74,12 @@ else ifeq ($(platform), linux-portable)
|
||||
fpic := -fPIC -nostdlib
|
||||
SHARED := -shared -Wl,--version-script=$(CORE_DIR)/libretro/link.T
|
||||
LIBM :=
|
||||
# Nintendo Switch (libtransistor)
|
||||
else ifeq ($(platform), switch)
|
||||
TARGET := $(TARGET_NAME)_libretro_$(platform).a
|
||||
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||
CFLAGS += -Wl,-q -Wall -O3 -fno-short-enums -fno-optimize-sibling-calls
|
||||
STATIC_LINKING=1
|
||||
else ifneq (,$(findstring osx,$(platform)))
|
||||
TARGET := $(TARGET_NAME)_libretro.dylib
|
||||
fpic := -fPIC
|
||||
|
@ -451,21 +451,24 @@ void *retro_get_memory_data(unsigned type)
|
||||
void* data;
|
||||
switch(type)
|
||||
{
|
||||
case RETRO_MEMORY_SYSTEM_RAM:
|
||||
data = gb.ram;
|
||||
break;
|
||||
case RETRO_MEMORY_SAVE_RAM:
|
||||
if (gb.cartridge_type->has_battery && gb.mbc_ram_size != 0)
|
||||
data = gb.mbc_ram;
|
||||
else
|
||||
data = NULL;
|
||||
break;
|
||||
case RETRO_MEMORY_VIDEO_RAM:
|
||||
data = gb.vram;
|
||||
break;
|
||||
case RETRO_MEMORY_RTC:
|
||||
if(gb.cartridge_type->has_battery)
|
||||
data = &gb.rtc_real;
|
||||
else
|
||||
data = NULL;
|
||||
break;
|
||||
default:
|
||||
data = NULL;
|
||||
break;
|
||||
}
|
||||
|
||||
return data;
|
||||
@ -476,12 +479,18 @@ size_t retro_get_memory_size(unsigned type)
|
||||
size_t size;
|
||||
switch(type)
|
||||
{
|
||||
case RETRO_MEMORY_SYSTEM_RAM:
|
||||
size = gb.ram_size;
|
||||
break;
|
||||
case RETRO_MEMORY_SAVE_RAM:
|
||||
if (gb.cartridge_type->has_battery && gb.mbc_ram_size != 0)
|
||||
size = gb.mbc_ram_size;
|
||||
else
|
||||
size = 0;
|
||||
break;
|
||||
case RETRO_MEMORY_VIDEO_RAM:
|
||||
size = gb.vram_size;
|
||||
break;
|
||||
case RETRO_MEMORY_RTC:
|
||||
if(gb.cartridge_type->has_battery)
|
||||
size = sizeof (gb.rtc_real);
|
||||
|
Loading…
Reference in New Issue
Block a user