From: kub Date: Tue, 19 Apr 2022 22:00:43 +0000 (+0200) Subject: libretro, fix classic_arm builds, minor cleanup X-Git-Tag: v2.00~311 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=36b2f2931f1a7d753983af960463400fbe19be29;p=picodrive.git libretro, fix classic_arm builds, minor cleanup --- diff --git a/Makefile.libretro b/Makefile.libretro index 967a0c37..0a859684 100644 --- a/Makefile.libretro +++ b/Makefile.libretro @@ -334,7 +334,7 @@ else ifeq ($(platform), classic_armv7_a7) fpic := -fPIC SHARED := -shared -Wl,--no-undefined,-Bsymbolic CFLAGS += -Ofast \ - -flto=4 -fwhole-program -fuse-linker-plugin \ + -flto=4 -fuse-linker-plugin \ -fdata-sections -ffunction-sections -Wl,--gc-sections \ -fno-stack-protector -fno-ident -fomit-frame-pointer \ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ @@ -363,7 +363,7 @@ else ifeq ($(platform), classic_armv8_a35) fpic := -fPIC SHARED := -shared -Wl,--no-undefined,-Bsymbolic CFLAGS += -Ofast \ - -flto -fwhole-program -fuse-linker-plugin \ + -flto -fuse-linker-plugin \ -fdata-sections -ffunction-sections -Wl,--gc-sections \ -fno-stack-protector -fno-ident -fomit-frame-pointer \ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \ @@ -715,4 +715,4 @@ include Makefile ifeq ($(platform), osx) pico/cd/libchdr/src/libchdr_chd.o: CFLAGS += -D__MACTYPES__=1 -endif \ No newline at end of file +endif diff --git a/platform/common/common.mak b/platform/common/common.mak index b4de24ae..550de72f 100644 --- a/platform/common/common.mak +++ b/platform/common/common.mak @@ -200,8 +200,8 @@ $(FR)cpu/cyclone/Cyclone.h: $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/$(CYCLONE_CONFIG) @echo building Cyclone... - @export CC=$(CYCLONE_CC) CXX=$(CYCLONE_CXX) CFLAGS=-O2; \ - make -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) HAVE_ARMv6=$(HAVE_ARMv6) + @export CC=$(CYCLONE_CC) CXX=$(CYCLONE_CXX) CFLAGS=-O2 CXXFLAGS=-O2 CPPFLAGS="" LDFLAGS="" && \ + make -C $(R)cpu/cyclone/ CONFIG_FILE=../$(CYCLONE_CONFIG) HAVE_ARMv6=$(HAVE_ARMv6) $(FR)cpu/cyclone/Cyclone.s: $(FR)cpu/cyclone/*.cpp $(FR)cpu/cyclone/*.h diff --git a/platform/common/mp3_drmp3.c b/platform/common/mp3_drmp3.c index c22c6ac4..5ce5d533 100644 --- a/platform/common/mp3_drmp3.c +++ b/platform/common/mp3_drmp3.c @@ -9,10 +9,13 @@ #include #include + +#ifdef USE_LIBRETRO_VFS // Ugh, drmp3 tries to use wfopen on windows, which breaks libretro VFS... #define __acrt_iob_func __acrt_iob_func2 #define _wfopen_s(p,m) NULL #define _wfopen(p,m) NULL +#endif #define DR_MP3_IMPLEMENTATION #include "dr_libs/dr_mp3.h" #include "mp3.h" diff --git a/platform/libretro/libretro.c b/platform/libretro/libretro.c index 61ba22bd..7e6fd952 100644 --- a/platform/libretro/libretro.c +++ b/platform/libretro/libretro.c @@ -616,7 +616,7 @@ void retro_set_environment(retro_environment_t cb) static const struct retro_system_content_info_override content_overrides[] = { { - "gen|smd|md|32x|sms|68k|sgd|pco", /* extensions */ + "gen|smd|md|32x|sms|gg|sg|68k|sgd|pco", /* extensions */ #if defined(LOW_MEMORY) true, /* need_fullpath */ #else @@ -2276,7 +2276,7 @@ void retro_run(void) buff = (char*)vout_buf + vout_offset; #endif - video_cb((short *)buff, vout_width, vout_height, vout_width * 2); + video_cb((short *)buff, vout_width, vout_height, vout_width * 2); } void retro_init(void)