diff --git a/.travis.yml b/.travis.yml index be5eeb2880..32591afa84 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ addons: - curl - pkg-config - libglu1-mesa-dev - - freeglut3-mesa + - freeglut3-dev - mesa-common-dev - libsdl1.2-dev - libsdl-image1.2-dev diff --git a/Makefile b/Makefile index bd050a315b..c31e4bdb95 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ HAVE_FILE_LOGGER=1 +HAVE_CC_RESAMPLER=1 NEED_CXX_LINKER=0 MISSING_DECLS =0 diff --git a/Makefile.common b/Makefile.common index 0a7aa6b374..bbcc702598 100644 --- a/Makefile.common +++ b/Makefile.common @@ -199,7 +199,7 @@ OBJ += frontend/frontend.o \ managers/cheat_manager.o \ core_info.o \ $(LIBRETRO_COMM_DIR)/file/config_file.o \ - config_file_userdata.o \ + $(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \ tasks/task_screenshot.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \ gfx/drivers_shader/shader_null.o \ @@ -210,12 +210,11 @@ OBJ += frontend/frontend.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \ gfx/font_driver.o \ gfx/video_filter.o \ - audio/audio_resampler_driver.o \ + $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o \ audio/audio_dsp_filter.o \ - audio/drivers_resampler/sinc_resampler.o \ - audio/drivers_resampler/nearest_resampler.o \ - audio/drivers_resampler/null_resampler.o \ - audio/drivers_resampler/cc_resampler.o \ + $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o \ + $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \ + $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/null_resampler.o \ location/drivers/nulllocation.o \ camera/drivers/nullcamera.o \ wifi/drivers/nullwifi.o \ @@ -232,6 +231,11 @@ OBJ += frontend/frontend.o \ performance_counters.o \ verbosity.o +ifeq ($(HAVE_CC_RESAMPLER), 1) +DEFINES += -DHAVE_CC_RESAMPLER +OBJ += audio/drivers_resampler/cc_resampler.o +endif + ifeq ($(HAVE_LANGEXTRA), 1) DEFINES += -DHAVE_LANGEXTRA DEFINES += -finput-charset=UTF-8 @@ -272,8 +276,13 @@ endif # Qt +ifeq ($(HAVE_QT_WRAPPER), 1) +OBJ += ui/drivers/ui_qt.o +LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -L./ui/drivers/qt/build/release/ +LIBS += -lwrapper +endif + ifeq ($(HAVE_QT), 1) -HAVE_QT_WRAPPER=0 OBJ += ui/drivers/ui_qt.o \ ui/drivers/qt/ui_qt_application.o \ ui/drivers/qt/ui_qt_window.o \ @@ -283,13 +292,6 @@ OBJ += ui/drivers/ui_qt.o \ ifneq ($(findstring Linux,$(OS)),) DEFINES += -I/usr/include/qt -fPIC endif - -# TODO/FIXME - figure out which libraries we need to link against -LIBS += -lQt5Quick -lQt5Widgets -lQt5Gui -lQt5Qml -lQt5Network -lQt5Core -L./ui/drivers/qt/wrapper/build/release - -ifeq ($(HAVE_QT_WRAPPER), 1) -LIBS += -lwrapper -endif endif ifeq ($(HAVE_SSA),1) @@ -418,7 +420,7 @@ endif # Audio Resamplers ifeq ($(HAVE_NEON),1) - OBJ += audio/drivers_resampler/sinc_resampler_neon.o \ + OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \ audio/drivers_resampler/cc_resampler_neon.o # When compiled without this, tries to attempt to compile sinc lerp, # which will error out @@ -429,12 +431,12 @@ ifeq ($(HAVE_NEON),1) DEFINES += -DSINC_LOWER_QUALITY endif -OBJ += $(LIBRETRO_COMM_DIR)/conversion/s16_to_float.o \ - $(LIBRETRO_COMM_DIR)/conversion/float_to_s16.o +OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \ + $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o ifeq ($(HAVE_NEON),1) - OBJ += $(LIBRETRO_COMM_DIR)/conversion/s16_to_float_neon.o \ - $(LIBRETRO_COMM_DIR)/conversion/float_to_s16_neon.o + OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.o \ + $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o endif ifneq ($(findstring Win32,$(OS)),) @@ -518,6 +520,7 @@ ifeq ($(HAVE_MENU_COMMON), 1) menu/menu_navigation.o \ menu/menu_setting.o \ menu/menu_shader.o \ + menu/widgets/menu_filebrowser.o \ menu/widgets/menu_dialog.o \ menu/widgets/menu_input_dialog.o \ menu/widgets/menu_input_bind_dialog.o \ diff --git a/Makefile.ctr b/Makefile.ctr index a5f9939eb5..ba6139c5be 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -44,9 +44,10 @@ endif DEFINES := ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o - DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB else + HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 HAVE_RTGA = 1 HAVE_RPNG = 1 diff --git a/Makefile.emscripten b/Makefile.emscripten index d63c16aae4..1b420651c7 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -9,6 +9,7 @@ OBJ := DEFINES := -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD) DEFINES += -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_EGL -DHAVE_OVERLAY -DHAVE_GLSL -DHAVE_FILTERS_BUILTIN +HAVE_CC_RESAMPLER = 1 HAVE_EGL = 1 HAVE_OPENGLES = 1 HAVE_RJPEG = 0 diff --git a/Makefile.griffin b/Makefile.griffin index e0c234d14c..5c9d62ec3a 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -1,6 +1,7 @@ DEBUG = 0 HAVE_LOGGER = 0 HAVE_FILE_LOGGER = 0 +HAVE_CC_RESAMPLER = 1 WHOLE_ARCHIVE_LINK = 0 BIG_STACK = 1 PC_DEVELOPMENT_IP_ADDRESS = 255.255.255.255 @@ -218,18 +219,19 @@ else ifeq ($(platform), vita) -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub \ -lSceMotion_stub -lSceAppMgr_stub -lpng -lm -lc - PLATEXTRA := deps/libvita2d/shader/compiled/clear_v_gxp.o \ - deps/libvita2d/shader/compiled/clear_f_gxp.o \ - deps/libvita2d/shader/compiled/color_v_gxp.o \ - deps/libvita2d/shader/compiled/color_f_gxp.o \ - deps/libvita2d/shader/compiled/texture_v_gxp.o \ - deps/libvita2d/shader/compiled/texture_f_gxp.o \ - deps/libvita2d/shader/compiled/texture_tint_f_gxp.o - PLATOBJS += libretro-common/conversion/s16_to_float_neon.o \ - libretro-common/conversion/float_to_s16_neon.o \ - memory/neon/memcpy-neon.o \ - audio/drivers_resampler/sinc_resampler_neon.o \ - audio/drivers_resampler/cc_resampler_neon.o + PLATEXTRA := deps/libvita2d/shader/compiled/clear_v_gxp.o \ + deps/libvita2d/shader/compiled/clear_f_gxp.o \ + deps/libvita2d/shader/compiled/color_v_gxp.o \ + deps/libvita2d/shader/compiled/color_f_gxp.o \ + deps/libvita2d/shader/compiled/texture_v_gxp.o \ + deps/libvita2d/shader/compiled/texture_f_gxp.o \ + deps/libvita2d/shader/compiled/texture_tint_f_gxp.o + PLATOBJS += \ + libretro-common/audio/conversion/s16_to_float_neon.o \ + libretro-common/audio/conversion/float_to_s16_neon.o \ + memory/neon/memcpy-neon.o \ + libretro-common/audio/resampler/drivers/sinc_resampler_neon.o \ + audio/drivers_resampler/cc_resampler_neon.o LIBDIRS += -L. LDFLAGS += -Wl,-q diff --git a/Makefile.ps3 b/Makefile.ps3 index 1b3cb4dc2b..4af7a1e088 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -68,7 +68,7 @@ ifeq ($(HAVE_RLAUNCH), 1) DEFINES += -DHAVE_RLAUNCH endif -DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY +DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER ifeq ($(HAVE_GCMGL), 1) DEFINES += -DHAVE_GCMGL diff --git a/Makefile.psl1ght b/Makefile.psl1ght index f570901a16..2ca0fefbef 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -89,7 +89,7 @@ ifeq ($(HAVE_FILE_LOGGER), 1) CFLAGS += -DHAVE_FILE_LOGGER endif -SHARED_FLAGS := -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts +SHARED_FLAGS := -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_FBO -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER CFLAGS += -std=gnu99 $(SHARED_FLAGS) CXXFLAGS += $(SHARED_FLAGS) diff --git a/Makefile.psp1 b/Makefile.psp1 index 924366b7e1..f88d5062cb 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -23,7 +23,7 @@ INCDIR = deps/zlib deps/7zip libretro-common/include CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math ASFLAGS = $(CFLAGS) -RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP +RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DSINC_LOWEST_QUALITY -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER LIBDIR = LDFLAGS = diff --git a/Makefile.wiiu b/Makefile.wiiu index 26a80520e1..83bbdb4fa6 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -20,7 +20,7 @@ DEFINES := ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB - DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB + DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER # DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI else HAVE_MENU_COMMON = 1 diff --git a/Makefile.win b/Makefile.win index df7f2502dc..a198553aa7 100644 --- a/Makefile.win +++ b/Makefile.win @@ -32,6 +32,7 @@ HAVE_CG := 1 HAVE_LIBXML2 := 0 HAVE_ZLIB := 1 WANT_ZLIB := 1 +HAVE_CC_RESAMPLER := 1 ifeq ($(HAVE_CG), 1) CG_LIBS := -lcg -lcgGL diff --git a/README.md b/README.md index 444d9985c4..07a4cee642 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,5 @@ [![Build Status](https://travis-ci.org/libretro/RetroArch.svg?branch=master)](https://travis-ci.org/libretro/RetroArch) - - Coverity Scan Build Status - +[![Coverity Scan Build Status](https://scan.coverity.com/projects/8936/badge.svg)](https://scan.coverity.com/projects/retroarch) # RetroArch @@ -24,11 +21,11 @@ interface to include support for emulators and/or game engines. libretro is comp ## Binaries -Latest Windows binaries are currently hosted on the buildbot -(http://buildbot.libretro.com/). +Latest Windows binaries are currently hosted on the [buildbot](http://buildbot.libretro.com/). ## Support -To reach developers, either make an issue here on Github, make a thread on the [forum](http://www.libretro.com/forums/), +To reach developers, either make an issue here on GitHub, make a thread on the [forum](http://www.libretro.com/forums/), or visit our IRC channel: #retroarch @ irc.freenode.org. ## Documentation @@ -119,10 +116,11 @@ A sample configuration file is installed to /etc/retroarch.cfg. This is the syst RetroArch will on startup create a config file in $XDG\_CONFIG\_HOME/retroarch/retroarch.cfg if doesn't exist. Users only need to configure a certain option if the desired value deviates from the value defined in config.def.h. -To configure joypads, use the built-in menu or the retroarch-joyconfig command-line tool. +To configure joypads, use the built-in menu or the `retroarch-joyconfig` command-line tool. ## Compiling and installing -Linux
+**Linux** + - Prerequisites: ```bash sudo apt-get install -y make git-core curl g++ pkg-config libglu1-mesa-dev freeglut3-dev mesa-common-dev libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev @@ -133,7 +131,8 @@ sudo apt-get install -y make git-core curl g++ pkg-config libglu1-mesa-dev freeg make ``` -Mac
+**Mac** + - Prerequisites: [XCode](https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CB4QFjAA&url=https%3A%2F%2Fitunes.apple.com%2Fus%2Fapp%2Fxcode%2Fid497799835%3Fmt%3D12&ei=ZmfeVNPtIILVoASBnoCYBw&usg=AFQjCNGrxKmVtXUdvUU3MhqZhP4MHT6Gtg&sig2=RIXKsWQ79YTQBt_lK5fdKA&bvm=bv.85970519,d.cGU), [Cg](https://developer.nvidia.com/cg-toolkit-download). - You can open the project (**pkg/apple/RetroArch.xcodeproj**) in the Xcode IDE and build (**⌘-B**) and run (**⌘-R**) it there. Or you can use the command line... - Debug: @@ -151,62 +150,63 @@ xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch open ./pkg/apple/build/Release/RetroArch.app/ ``` -PC
+**PC** + Instructions for compiling on PC can be found in the [wiki](https://github.com/Themaister/RetroArch/wiki). -PlayStation 3
+**PlayStation 3** RetroArch PS3 needs to be compiled in the following order: 1) Compile RetroArch Salamander -make -f Makefile.ps3.salamander + make -f Makefile.ps3.salamander 2) Finally, compile RetroArch packed together with the GUI: -make -f Makefile.ps3 + make -f Makefile.ps3 -PlayStation 3 - Creating a PKG installable file
+**PlayStation 3 - Creating a PKG installable file** You can add `pkg` as a parameter in order to make a PKG file - for example: -make -f Makefile.ps3 pkg + make -f Makefile.ps3 pkg This creates an NPDRM package. This can be installed on debug PS3s. To make a non-NPDRM package that can be installed on a jailbroken/CFW PS3 (such as PSGroove or PS3 CFWs and other 3.55 CFW derivatives), do: -make -f Makefile.ps3 pkg-signed + make -f Makefile.ps3 pkg-signed If you're using Kmeaw 3.55 firmware, the package needs to be signed: -make -f Makefile.ps3 pkg-signed-cfw + make -f Makefile.ps3 pkg-signed-cfw -NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch PS3. This file needs to be called `libretro_ps3.a`. +NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch PS3. This file needs to be called ***`libretro_ps3.a`***. - Xbox 360 (XeXDK)
+**Xbox 360 (XeXDK)** You will need Microsoft Visual Studio 2010 installed (or higher) in order to compile RetroArch 360. The solution file can be found at the following location: -pkg/msvc-360/RetroArch-360.sln + pkg/msvc-360/RetroArch-360.sln NOTE: A pre-existing libretro library needs to be present in the `pkg/msvc-360/RetroArch-360/Release` directory in order to link RetroArch 360. This file needs to be -called `libretro_xdk360.lib`. +called ***`libretro_xdk360.lib`***. - Xbox 360 (Libxenon)
+**Xbox 360 (Libxenon)** You will need to have the libxenon libraries and a working Devkit Xenon toolchain installed in order to compile RetroArch 360 Libxenon. -make -f Makefile.xenon + make -f Makefile.xenon -NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch 360 Libxenon. This file needs to be called `libretro_xenon360.a`. +NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch 360 Libxenon. This file needs to be called ***`libretro_xenon360.a`***. - Wii
+**Wii** You will need to have the libogc libraries and a working Devkit PPC toolchain installed in order to compile RetroArch Wii. -make -f Makefile.griffin platform=wii + make -f Makefile.griffin platform=wii -NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch Wii. This file needs to be called `libretro_wii.a`. +NOTE: A pre-existing libretro library needs to be present in the root directory in order to link RetroArch Wii. This file needs to be called ***`libretro_wii.a`***. diff --git a/audio/audio_driver.c b/audio/audio_driver.c index b951515f80..5f1b89287d 100644 --- a/audio/audio_driver.c +++ b/audio/audio_driver.c @@ -19,8 +19,9 @@ #include #include -#include -#include +#include