From bb622bdf5b0de5cae50f8738d110e2b636c4d8bf Mon Sep 17 00:00:00 2001 From: BearOso Date: Mon, 7 Sep 2020 10:57:17 -0500 Subject: [PATCH] Add a compat.cpp file for compatibility symbols. --- gtk/meson.build | 1 + libretro/Makefile.common | 1 + snes9x.cpp | 68 +--------------------------------------- unix/Makefile.in | 2 +- 4 files changed, 4 insertions(+), 68 deletions(-) diff --git a/gtk/meson.build b/gtk/meson.build index b9e35029..39df4ea2 100644 --- a/gtk/meson.build +++ b/gtk/meson.build @@ -421,6 +421,7 @@ srcs += [ '../netplay.cpp', '../server.cpp', '../loadzip.cpp', + '../compat.cpp', 'src/gtk_netplay_dialog.cpp', 'src/gtk_netplay_dialog.h', 'src/gtk_netplay.cpp', diff --git a/libretro/Makefile.common b/libretro/Makefile.common index 511f748f..af800249 100644 --- a/libretro/Makefile.common +++ b/libretro/Makefile.common @@ -61,4 +61,5 @@ SOURCES_CXX := $(CORE_DIR)/apu/apu.cpp \ $(CORE_DIR)/sha256.cpp \ $(CORE_DIR)/bml.cpp \ $(CORE_DIR)/movie.cpp \ + $(CORE_DIR)/compat.cpp \ $(CORE_DIR)/libretro/libretro.cpp diff --git a/snes9x.cpp b/snes9x.cpp index b5407ceb..c96c52d4 100644 --- a/snes9x.cpp +++ b/snes9x.cpp @@ -764,70 +764,4 @@ char * S9xParseArgs (char **argv, int argc) S9xVerifyControllers(); return (rom_filename); -} - -#ifndef __WIN32__ -void _splitpath(const char *path, char *drive, char *dir, char *fname, char *ext) -{ - char *slash = strrchr((char *)path, SLASH_CHAR); - char *dot = strrchr((char *)path, '.'); - - *drive = '\0'; - - if (dot && slash && dot < slash) - { - dot = 0; - } - - if (!slash) - { - *dir = '\0'; - strcpy(fname, path); - - if (dot) - { - fname[dot - path] = '\0'; - strcpy(ext, dot + 1); - } - else - { - *ext = '\0'; - } - } - else - { - strcpy(dir, path); - dir[slash - path] = '\0'; - strcpy(fname, slash + 1); - - if (dot) - { - fname[(dot - slash) - 1] = '\0'; - strcpy(ext, dot + 1); - } - else - { - *ext = '\0'; - } - } -} - -void _makepath(char *path, const char *drive, const char *dir, const char *fname, const char *ext) -{ - if (dir && *dir) - { - strcpy(path, dir); - strcat(path, "/"); - } - else - *path = '\0'; - - strcat(path, fname); - - if (ext && *ext) - { - strcat(path, "."); - strcat(path, ext); - } -} -#endif // __WIN32__ \ No newline at end of file +} \ No newline at end of file diff --git a/unix/Makefile.in b/unix/Makefile.in index fcef9483..852fd39e 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -8,7 +8,7 @@ OS = `uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"` BUILDDIR = . -OBJECTS = ../apu/apu.o ../apu/bapu/dsp/sdsp.o ../apu/bapu/smp/smp.o ../apu/bapu/smp/smp_state.o ../bsx.o ../c4.o ../c4emu.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../fxinst.o ../fxemu.o ../gfx.o ../globals.o ../logger.o ../memmap.o ../msu1.o ../movie.o ../obc1.o ../ppu.o ../stream.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../tileimpl-n1x1.o ../tileimpl-n2x1.o ../tileimpl-h2x1.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o ../statemanager.o ../sha256.o ../bml.o unix.o x11.o +OBJECTS = ../apu/apu.o ../apu/bapu/dsp/sdsp.o ../apu/bapu/smp/smp.o ../apu/bapu/smp/smp_state.o ../bsx.o ../c4.o ../c4emu.o ../cheats.o ../cheats2.o ../clip.o ../conffile.o ../controls.o ../cpu.o ../cpuexec.o ../cpuops.o ../crosshairs.o ../dma.o ../dsp.o ../dsp1.o ../dsp2.o ../dsp3.o ../dsp4.o ../fxinst.o ../fxemu.o ../gfx.o ../globals.o ../logger.o ../memmap.o ../msu1.o ../movie.o ../obc1.o ../ppu.o ../stream.o ../sa1.o ../sa1cpu.o ../screenshot.o ../sdd1.o ../sdd1emu.o ../seta.o ../seta010.o ../seta011.o ../seta018.o ../snapshot.o ../snes9x.o ../spc7110.o ../srtc.o ../tile.o ../tileimpl-n1x1.o ../tileimpl-n2x1.o ../tileimpl-h2x1.o ../filter/2xsai.o ../filter/blit.o ../filter/epx.o ../filter/hq2x.o ../filter/snes_ntsc.o ../statemanager.o ../sha256.o ../bml.o ../compat.o unix.o x11.o DEFS = -DMITSHM ifdef S9XDEBUGGER