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