libretro, fix classic_arm builds, minor cleanup
authorkub <derkub@gmail.com>
Tue, 19 Apr 2022 22:00:43 +0000 (00:00 +0200)
committerkub <derkub@gmail.com>
Tue, 19 Apr 2022 22:00:43 +0000 (00:00 +0200)
Makefile.libretro
platform/common/common.mak
platform/common/mp3_drmp3.c
platform/libretro/libretro.c

index 967a0c3..0a85968 100644 (file)
@@ -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
index b4de24a..550de72 100644 (file)
@@ -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
 
index c22c6ac..5ce5d53 100644 (file)
@@ -9,10 +9,13 @@
 #include <stdio.h>
 
 #include <pico/pico_int.h>
+
+#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"
index 61ba22b..7e6fd95 100644 (file)
@@ -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)