Merge remote-tracking branch 'upstream/master' into patch-7

This commit is contained in:
Mark W. Kidd 2019-01-19 12:36:33 -05:00
commit 8542ecd79c
932 changed files with 12417 additions and 11076 deletions

2
.gitignore vendored
View File

@ -11,6 +11,8 @@
.tmp
.tmp.c
.tmp.cxx
.moc.h
.moc.cpp
config.log
/.project
/.externalToolBuilders/

View File

@ -10,7 +10,9 @@ matrix:
- g++-mingw-w64-i686
- mingw-w64-i686-dev
script:
- CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
- make
env: CROSS_COMPILE=i686-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: mingw-x64
addons:
apt:
@ -18,41 +20,34 @@ matrix:
- g++-mingw-w64-x86-64
- mingw-w64-x86-64-dev
script:
- CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501" ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 && make HAVE_ZLIB=1 HAVE_BUILTINZLIB=1 HAVE_RPNG=1
- ./configure --disable-d3d8 --disable-d3d9 --disable-d3d10 --disable-d3d11 --disable-d3d12 --enable-builtinzlib
- make
env: CROSS_COMPILE=x86_64-w64-mingw32- CFLAGS="-D_WIN32_WINNT=0x0501"
- compiler: gcc
addons:
# Install a more recent gcc than the default
apt:
packages:
- g++-7
sources:
- ubuntu-toolchain-r-test
# Install a more recent gcc than the default
before_install:
- sudo apt-get install -y g++-8
env: CC=gcc-8 CXX=g++-8
- compiler: clang
addons:
# Install a more recent clang than the default
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.8
packages:
- clang-3.8
env: COMPILER_NAME=clang-3.8 CXX=clang++-3.8 CC=clang-3.8
# Install a more recent clang than the default
before_install:
- sudo apt-get install -y libstdc++-7-dev
- sudo apt-get install -y clang-6.0
env: CC=clang-6.0 CXX=clang++-6.0
- os: osx
osx_image: xcode8
script:
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
- xcodebuild -target RetroArch -configuration Release -project pkg/apple/RetroArch.xcodeproj
- os: osx
osx_image: xcode9.3
script:
- cd ~/
- brew update
- brew install --force-bottle qt5
- git clone --depth=50 https://github.com/libretro/libretro-super
- cd libretro-super/travis
- ./build-retroarch-metal.sh
- xcodebuild -target RetroArchQt -configuration Release -project pkg/apple/RetroArch_Metal.xcodeproj
deploy:
skip_cleanup: true
provider: script
script: cd ../retroarch; bash travis_metal_deploy.sh
script: bash travis_metal_deploy.sh
on:
branch: master
@ -67,19 +62,13 @@ env:
addons:
apt:
packages:
- curl
- 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
- libsdl2-dev
- libusb-1.0-0-dev
- qt5-default
- qt5-qmake
- qtbase5-dev-tools
- qtbase5-dev
- qtdeclarative5-dev
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty-6.0
coverity_scan:
project:
name: "RetroArch"

View File

@ -25,6 +25,7 @@ Amiga1200Gamer (amigagamer)
Andre Leiradella (leiradel)
Andrés (fr500)
Anthony J. Bentley (bentley)
Antonio Jose Ramos Marquez (psxdev)
AridRayne
Arto Vainiolehto (arakerlu)
asako (asakous)

View File

@ -1,22 +1,28 @@
# 1.7.6 (future)
- ANDROID: Fix Xperia Play input binding
- CHEEVOS: Reset when hardcore mode is toggled
- COMMON: Add new JSON playlist format
- CORE UPDATER: Allow sideloading cores from the menu
- CPU FILTERS: Add Normal2x filter.
- DATE: Add Date / Time style options.
- DEBUGGING: Add an integrated crash handler for debug builds (see https://docs.libretro.com/tech/debugging)
- DISCORD: Register the application name properly.
- DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster.
- INPUT: Add new menu toggle (hold start button for 2 seconds)
- INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver.
- LOCALIZATION: Add Greek translation.
- LOCALIZATION: Update German translation.
- LOCALIZATION: Update Italian translation.
- LOCALIZATION: Update Japanese translation.
- LOCALIZATION: Update Simplified Chinese translation.
- LOCALIZATION: Update Spanish translation.
- MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now)
- MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly.
- MIDI: Add a Linux ALSA driver for MIDI.
- NETPLAY: Force fast-save-states when netlay is enabled
- NETPLAY: Allow quick joining subsystem lobbies
- PS2: Initial PlayStation2 port.
- PS4: Initial PlayStation4 port.
- RECORDING: Implement recording options in the menu complete with quality profiles, streaming, and proper file naming
- SCANNER: Fix GDI disc scanning.
- SHADERS: Fix auto shader preset loading on D3D10, D3D11, D3D12
@ -33,7 +39,10 @@
- WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows
- WINDOWS: Remember window size and position if so desired
- WINDOWS: SSL/TLS connections now work properly.
- UWP: Initial UWP port.
- XBONE: Initial Xbox One port.
- XMB/OZONE: Add more icons
- ???: Easter Egg
# 1.7.5
- CAMERA: Fix Video4Linux2 driver that broke years ago.

View File

@ -16,28 +16,35 @@ include config.mk
TARGET = retroarch
OBJ :=
LIBS :=
DEF_FLAGS :=
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
OBJDIR_BASE := obj-unix
ifeq ($(DEBUG), 1)
OBJDIR := $(OBJDIR_BASE)/debug
CFLAGS ?= -O0 -g
CXXFLAGS ?= -O0 -g
DEFINES += -DDEBUG -D_DEBUG
else
OBJDIR := $(OBJDIR_BASE)/release
CFLAGS ?= -O3
CXXFLAGS ?= -O3
DEF_FLAGS += -ffast-math
endif
OBJ :=
LIBS :=
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
ifneq ($(findstring BSD,$(OS)),)
CFLAGS += -DBSD
DEF_FLAGS += -DBSD
LDFLAGS += -L/usr/local/lib
UDEV_CFLAGS += -I/usr/local/include/libepoll-shim
UDEV_LIBS += -lepoll-shim
endif
ifneq ($(findstring DOS,$(OS)),)
CFLAGS += -march=i386
DEF_FLAGS += -march=i386
LDFLAGS += -lemu
endif
@ -77,15 +84,8 @@ ifneq ($(V),1)
Q := @
endif
ifeq ($(DEBUG), 1)
OPTIMIZE_FLAG = -O0 -g
DEFINES += -DDEBUG -D_DEBUG
else
OPTIMIZE_FLAG = -O3 -ffast-math
endif
ifeq ($(HAVE_DRMINGW), 1)
CFLAGS += -DHAVE_DRMINGW
DEF_FLAGS += -DHAVE_DRMINGW
LDFLAGS += $(DRMINGW_LIBS)
endif
@ -93,10 +93,10 @@ ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows
endif
CFLAGS += -Wall $(OPTIMIZE_FLAG) $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
DEF_FLAGS += -Wall $(INCLUDE_DIRS) -I. -Ideps -Ideps/stb
APPEND_CFLAGS := $(CFLAGS)
CXXFLAGS += $(APPEND_CFLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
CFLAGS += $(DEF_FLAGS)
CXXFLAGS += $(DEF_FLAGS) -std=c++11 -D__STDC_CONSTANT_MACROS
OBJCFLAGS := $(CFLAGS) -D__STDC_CONSTANT_MACROS
ifeq ($(HAVE_CXX), 1)
@ -171,7 +171,7 @@ all: $(TARGET) config.mk
$(MOC_SRC):
@$(if $(Q), $(shell echo echo MOC $<),)
$(eval MOC_TMP := $(patsubst %.h,%_moc.cpp,$@))
$(Q)$(MOC) -o $(MOC_TMP) $<
$(Q)QT_SELECT=$(QT_VERSION) $(MOC) -o $(MOC_TMP) $<
$(foreach x,$(join $(addsuffix :,$(MOC_SRC)),$(MOC_HEADERS)),$(eval $x))

View File

@ -4,7 +4,7 @@ LIBRETRO_COMM_DIR := $(ROOT_DIR)/libretro-common
WANT_WGL = 0
ifeq ($(HAVE_STACK_USAGE), 1)
CFLAGS += -fstack-usage
DEF_FLAGS += -fstack-usage
endif
ifeq ($(HAVE_GL_CONTEXT),)
@ -31,11 +31,6 @@ ifeq ($(HAVE_VIDEO_PROCESSOR), 1)
DEFINES += -DHAVE_VIDEO_PROCESSOR
endif
ifeq ($(HAVE_MENU), 1)
DEFINES += -DHAVE_MENU
HAVE_MENU_COMMON = 1
endif
ifeq ($(HAVE_SOCKET_LEGACY), 1)
DEFINES += -DHAVE_SOCKET_LEGACY
endif
@ -65,13 +60,11 @@ ifeq ($(HAVE_PRESERVE_DYLIB),1)
endif
ifeq ($(GL_DEBUG), 1)
CFLAGS += -DGL_DEBUG
CXXFLAGS += -DGL_DEBUG
DEF_FLAGS += -DGL_DEBUG
endif
ifeq ($(VULKAN_DEBUG), 1)
CFLAGS += -DVULKAN_DEBUG
CXXFLAGS += -DVULKAN_DEBUG
DEF_FLAGS += -DVULKAN_DEBUG
endif
ifeq ($(HAVE_HARD_FLOAT), 1)
@ -83,23 +76,23 @@ ifeq ($(TDM_GCC),)
endif
ifeq ($(HAVE_FILE_LOGGER), 1)
CFLAGS += -DHAVE_FILE_LOGGER
DEF_FLAGS += -DHAVE_FILE_LOGGER
endif
ifeq ($(HAVE_SHADERPIPELINE), 1)
CFLAGS += -DHAVE_SHADERPIPELINE
DEF_FLAGS += -DHAVE_SHADERPIPELINE
endif
CFLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR)
DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR)
# Switches
#
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
CFLAGS += -DHAVE_NETPLAYDISCOVERY
DEF_FLAGS += -DHAVE_NETPLAYDISCOVERY
endif
ifeq ($(HAVE_NETLOGGER), 1)
CFLAGS += -DHAVE_LOGGER
DEF_FLAGS += -DHAVE_LOGGER
DEFINES += -DHAVE_LOGGER
OBJ += network/net_logger.o
endif
@ -151,7 +144,7 @@ endif
# General object files
DEFINES += -DHAVE_DR_MP3
CFLAGS += -DHAVE_DR_MP3
DEF_FLAGS += -DHAVE_DR_MP3
OBJ += frontend/frontend.o \
frontend/frontend_driver.o \
@ -196,6 +189,7 @@ OBJ += frontend/frontend.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_windowsmmap.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_orbis.o \
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \
$(LIBRETRO_COMM_DIR)/file/file_path.o \
file_path_special.o \
@ -342,14 +336,14 @@ ifeq ($(HAVE_QT), 1)
ui/drivers/qt/ui_qt_browser_window.o \
ui/drivers/qt/ui_qt_load_core_window.o \
ui/drivers/qt/ui_qt_msg_window.o \
ui/drivers/qt/flowlayout.o \
ui/drivers/qt/gridview.o \
ui/drivers/qt/shaderparamsdialog.o \
ui/drivers/qt/coreoptionsdialog.o \
ui/drivers/qt/filedropwidget.o \
ui/drivers/qt/coreinfodialog.o \
ui/drivers/qt/playlistentrydialog.o \
ui/drivers/qt/viewoptionsdialog.o \
ui/drivers/qt/playlist.o \
ui/drivers/qt/qt_playlist.o \
ui/drivers/qt/updateretroarch.o \
ui/drivers/qt/thumbnaildownload.o \
ui/drivers/qt/thumbnailpackdownload.o \
@ -357,7 +351,7 @@ ifeq ($(HAVE_QT), 1)
MOC_HEADERS += ui/drivers/ui_qt.h \
ui/drivers/qt/ui_qt_load_core_window.h \
ui/drivers/qt/flowlayout.h \
ui/drivers/qt/gridview.h \
ui/drivers/qt/shaderparamsdialog.h \
ui/drivers/qt/coreoptionsdialog.h \
ui/drivers/qt/filedropwidget.h \
@ -644,7 +638,7 @@ ifeq ($(HAVE_NEON),1)
$(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16_neon.o
endif
HW_CONTEXT_MENU_DRIVERS=$(HAVE_RGUI)
HW_CONTEXT_MENU_DRIVERS=$(HAVE_MENU)
ifeq ($(HW_CONTEXT_MENU_DRIVERS),0)
ifeq ($(HAVE_GL_CONTEXT),1)
@ -661,6 +655,10 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
HAVE_ZARCH = 0
endif
ifeq ($(HAVE_RGUI),)
HAVE_RGUI = 1
endif
ifeq ($(HAVE_MATERIALUI),)
HAVE_MATERIALUI = 1
endif
@ -682,6 +680,7 @@ ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
endif
else
HAVE_ZARCH ?= 0
HAVE_RGUI ?= 0
HAVE_MATERIALUI ?= 0
HAVE_NUKLEAR ?= 0
HAVE_XMB ?= 0
@ -689,53 +688,57 @@ else
HAVE_OZONE ?= 0
endif
ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/rgui.o
DEFINES += -DHAVE_MENU -DHAVE_RGUI
ifeq ($(HAVE_MENU), 1)
DEFINES += -DHAVE_MENU
HAVE_MENU_COMMON = 1
ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/rgui.o
DEFINES += -DHAVE_RGUI
endif
ifeq ($(HAVE_MATERIALUI), 1)
OBJ += menu/drivers/materialui.o
DEFINES += -DHAVE_MATERIALUI
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nuklear/nk_common.o
OBJ += menu/drivers/nuklear/nk_menu.o
OBJ += menu/drivers/nuklear/nk_wnd_debug.o
OBJ += menu/drivers/nuklear.o
OBJ += menu/drivers/nuklear/nk_common.o \
menu/drivers/nuklear/nk_menu.o \
menu/drivers/nuklear/nk_wnd_debug.o \
menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_ZARCH), 1)
OBJ += menu/drivers/zarch.o
DEFINES += -DHAVE_ZARCH
HAVE_ASSETS = 1
endif
endif
ifeq ($(HAVE_XMB), 1)
OBJ += menu/drivers/xmb.o
DEFINES += -DHAVE_XMB
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_XMB), 1)
OBJ += menu/drivers/xmb.o
DEFINES += -DHAVE_XMB
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone/ozone.o
OBJ += menu/drivers/ozone/ozone_entries.o
OBJ += menu/drivers/ozone/ozone_display.o
OBJ += menu/drivers/ozone/ozone_texture.o
OBJ += menu/drivers/ozone/ozone_theme.o
OBJ += menu/drivers/ozone/ozone_sidebar.o
DEFINES += -DHAVE_OZONE
HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone/ozone.o \
menu/drivers/ozone/ozone_entries.o \
menu/drivers/ozone/ozone_display.o \
menu/drivers/ozone/ozone_texture.o \
menu/drivers/ozone/ozone_theme.o \
menu/drivers/ozone/ozone_sidebar.o
DEFINES += -DHAVE_OZONE
HAVE_ASSETS = 1
endif
ifeq ($(HAVE_STRIPES), 1)
OBJ += menu/drivers/stripes.o
DEFINES += -DHAVE_STRIPES
ifeq ($(HAVE_STRIPES), 1)
OBJ += menu/drivers/stripes.o
DEFINES += -DHAVE_STRIPES
endif
endif
ifeq ($(HAVE_LAKKA), 1)
@ -746,6 +749,8 @@ ifeq ($(HAVE_LAKKA_SWITCH), 1)
DEFINES += -DHAVE_LAKKA_SWITCH
endif
OBJ += menu/menu_shader.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/menu_driver.o \
menu/menu_content.o \
@ -753,7 +758,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/menu_entries.o \
menu/menu_setting.o \
menu/menu_networking.o \
menu/menu_shader.o \
menu/widgets/menu_filebrowser.o \
menu/widgets/menu_dialog.o \
menu/widgets/menu_input_dialog.o \
@ -780,9 +784,12 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/cbs/menu_cbs_contentlist_switch.o \
menu/menu_displaylist.o \
menu/menu_animation.o \
menu/drivers_display/menu_display_null.o \
menu/drivers/menu_generic.o \
menu/drivers/null.o
ifeq ($(HAVE_MENU_COMMON),1)
OBJ += menu/drivers_display/menu_display_null.o
endif
endif
ifeq ($(HAVE_OVERLAY), 1)
@ -832,14 +839,14 @@ ifeq ($(HAVE_VITA2D), 1)
$(DEPS_DIR)/libvita2d/shader/texture_f_gxp.o \
$(DEPS_DIR)/libvita2d/shader/texture_tint_f_gxp.o
ifeq ($(HAVE_MENU),1)
ifeq ($(HAVE_MENU_COMMON),1)
OBJ += menu/drivers_display/menu_display_vita2d.o
endif
OBJ += gfx/drivers/vita2d_gfx.o \
gfx/drivers_font/vita2d_font.o
CFLAGS += -I$(DEPS_DIR)/libvita2d/include
DEF_FLAGS += -I$(DEPS_DIR)/libvita2d/include
endif
ifeq ($(TARGET), retroarch_3ds)
@ -940,7 +947,7 @@ endif
ifeq ($(HAVE_DBUS), 1)
LIBS += $(DBUS_LIBS)
CFLAGS += $(DBUS_CFLAGS)
DEF_FLAGS += $(DBUS_CFLAGS)
OBJ += gfx/common/dbus_common.o
endif
@ -1035,7 +1042,7 @@ endif
ifeq ($(HAVE_SIXEL), 1)
DEFINES += -DHAVE_SIXEL
CFLAGS += -I/usr/include/sixel
DEF_FLAGS += -I/usr/include/sixel
OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \
gfx/drivers_context/sixel_ctx.o
LIBS += -lsixel
@ -1047,7 +1054,7 @@ endif
ifeq ($(HAVE_PLAIN_DRM), 1)
OBJ += gfx/drivers/drm_gfx.o
CFLAGS += -I/usr/include/libdrm
DEF_FLAGS += -I/usr/include/libdrm
LIBS += -ldrm
endif
@ -1116,8 +1123,11 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
gfx/common/metal/MenuDisplay.o \
gfx/common/metal_common.o \
gfx/drivers/metal.o \
menu/drivers_display/menu_display_metal.o \
gfx/drivers_font/metal_raster_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_metal.o
endif
endif
ifeq ($(HAVE_MPV), 1)
@ -1299,16 +1309,20 @@ endif
ifeq ($(HAVE_D3D10), 1)
OBJ += gfx/drivers/d3d10.o \
gfx/common/d3d10_common.o \
gfx/drivers_font/d3d10_font.o \
menu/drivers_display/menu_display_d3d10.o
gfx/drivers_font/d3d10_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d10.o
endif
DEFINES += -DHAVE_D3D10
endif
ifeq ($(HAVE_D3D11), 1)
OBJ += gfx/drivers/d3d11.o \
gfx/common/d3d11_common.o \
gfx/drivers_font/d3d11_font.o \
menu/drivers_display/menu_display_d3d11.o
gfx/drivers_font/d3d11_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d11.o
endif
DEFINES += -DHAVE_D3D11
HAVE_SLANG = 1
HAVE_GLSLANG = 1
@ -1318,8 +1332,10 @@ endif
ifeq ($(HAVE_D3D12), 1)
OBJ += gfx/drivers/d3d12.o \
gfx/common/d3d12_common.o \
gfx/drivers_font/d3d12_font.o \
menu/drivers_display/menu_display_d3d12.o
gfx/drivers_font/d3d12_font.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_d3d12.o
endif
DEFINES += -DHAVE_D3D12
HAVE_SLANG = 1
HAVE_GLSLANG = 1
@ -1330,7 +1346,7 @@ ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),)
INCLUDE_DIRS += -isystemgfx/include/dxsdk
OBJ += gfx/common/d3dcompiler_common.o \
gfx/common/dxgi_common.o
CFLAGS += -Wno-unknown-pragmas
DEF_FLAGS += -Wno-unknown-pragmas
endif
ifeq ($(HAVE_D3D8), 1)
@ -1446,7 +1462,7 @@ OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o
ifeq ($(HAVE_7ZIP),1)
CFLAGS += -I$(DEPS_DIR)/7zip
DEF_FLAGS += -I$(DEPS_DIR)/7zip
HAVE_COMPRESSION = 1
DEFINES += -DHAVE_7ZIP -D_7ZIP_ST
7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \
@ -1475,8 +1491,8 @@ endif
ifeq ($(HAVE_BUILTINFLAC),1)
HAVE_FLAC = 1
DEFINES += -DHAVE_DR_FLAC -I$(DEPS_DIR)
CFLAGS += -DHAVE_DR_FLAC
CFLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include
DEF_FLAGS += -DHAVE_DR_FLAC
DEF_FLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include
DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
-DFLAC_PACKAGE_VERSION="\"retroarch\""
FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \
@ -1534,7 +1550,7 @@ ifeq ($(HAVE_ZLIB), 1)
endif
ifeq ($(HAVE_CHD), 1)
CFLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr
DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr
DEFINES += -DHAVE_CHD -DWANT_SUBCODE -DWANT_RAW_DATA_SECTOR
OBJ += $(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_bitstream.o \
$(LIBRETRO_COMM_DIR)/formats/libchdr/libchdr_cdrom.o \
@ -1586,6 +1602,12 @@ ifdef HAVE_COMPRESSION
DEFINES += -DHAVE_COMPRESSION
endif
# Easter Egg
ifeq ($(HAVE_EASTEREGG),1)
DEFINES += -DHAVE_EASTEREGG
OBJ += cores/libretro-gong/gong.o
endif
# Video4Linux 2
ifeq ($(HAVE_V4L2),1)
@ -1753,9 +1775,11 @@ ifneq ($(findstring Win32,$(OS)),)
OBJ += gfx/drivers/gdi_gfx.o \
gfx/drivers_context/gdi_ctx.o \
gfx/drivers_font/gdi_font.o \
gfx/display_servers/dispserv_win32.o \
menu/drivers_display/menu_display_gdi.o
gfx/display_servers/dispserv_win32.o
ifeq ($(HAVE_MENU_COMMON), 1)
OBJ += menu/drivers_display/menu_display_gdi.o
endif
LIBS += -lmsimg32 -lhid -lsetupapi
endif
@ -1826,7 +1850,7 @@ endif
ifeq ($(WANT_IOSUHAX), 1)
DEFINES += -I$(DEPS_DIR)/libiosuhax
CFLAGS += -I$(DEPS_DIR)/libiosuhax
DEF_FLAGS += -I$(DEPS_DIR)/libiosuhax
OBJ += $(DEPS_DIR)/libiosuhax/iosuhax.o \
$(DEPS_DIR)/libiosuhax/iosuhax_devoptab.o \
$(DEPS_DIR)/libiosuhax/iosuhax_disc_interface.o
@ -1834,7 +1858,7 @@ endif
ifeq ($(WANT_LIBFAT), 1)
DEFINES += -I$(DEPS_DIR)/libfat/include
CFLAGS += -I$(DEPS_DIR)/libfat/include
DEF_FLAGS += -I$(DEPS_DIR)/libfat/include
OBJ += $(DEPS_DIR)/libfat/cache.o \
$(DEPS_DIR)/libfat/directory.o \
$(DEPS_DIR)/libfat/disc.o \
@ -1868,7 +1892,7 @@ endif
# Help at https://modmyclassic.com/comp
ifeq ($(HAVE_CLASSIC), 1)
CFLAGS += -DHAVE_CLASSIC
DEF_FLAGS += -DHAVE_CLASSIC
endif
ifeq ($(HAVE_C_A7A7), 1)
@ -1880,12 +1904,11 @@ ifeq ($(HAVE_C_A7A7), 1)
-fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
-fmerge-all-constants -fno-math-errno \
-marm -mtune=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
CFLAGS += $(C_A7A7_OPT)
CXXFLAGS += $(C_A7A7_OPT)
DEF_FLAGS += $(C_A7A7_OPT)
ifeq ($(shell echo `$(CC) -dumpversion` "< 4.9" | bc -l), 1)
CFLAGS += -march=armv7-a
DEF_FLAGS += -march=armv7-a
else
CFLAGS += -march=armv7ve
DEF_FLAGS += -march=armv7ve
# If gcc is 5.0 or later
ifeq ($(shell echo `$(CC) -dumpversion` ">= 5" | bc -l), 1)
LDFLAGS += -static-libgcc -static-libstdc++
@ -1894,6 +1917,6 @@ ifeq ($(HAVE_C_A7A7), 1)
endif
ifeq ($(HAVE_HAKCHI), 1)
CFLAGS += -DHAVE_HAKCHI
DEF_FLAGS += -DHAVE_HAKCHI
endif
##################################

View File

@ -62,6 +62,7 @@ else
HAVE_RPNG = 1
HAVE_RJPEG = 1
HAVE_RBMP = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_ZLIB = 1
HAVE_7ZIP = 1
@ -80,6 +81,7 @@ else
#HAVE_BUILTINMBEDTLS = 1
include Makefile.common
CFLAGS += $(DEF_FLAGS)
BLACKLIST :=
BLACKLIST += input/input_overlay.o
BLACKLIST += tasks/task_overlay.o
@ -105,7 +107,6 @@ MAKEROM_ARGS_COMMON = -rsf $(APP_RSF) -exefslogo -elf $(TARGET).elf -icon $(TARG
INCDIRS := -I$(CTRULIB)/include
LIBDIRS := -L. -L$(CTRULIB)/lib
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -marm -mfpu=vfp -mtp=soft
CFLAGS += -mword-relocations \
@ -149,7 +150,6 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
CFLAGS += -std=gnu99 -ffast-math
LIBS := $(WHOLE_START) -lretro_ctr $(WHOLE_END) -lm
ifeq ($(DEBUG), 1)
@ -158,7 +158,6 @@ else
LIBS += -lctru
endif
ifeq ($(BUILD_3DSX), 1)
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
endif
@ -268,7 +267,6 @@ $(TARGET).3ds: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
$(TARGET).cia: $(TARGET).elf $(TARGET).bnr $(TARGET).icn $(APP_RSF)
$(MAKEROM) -f cia -o $@ $(MAKEROM_ARGS_COMMON) -DAPP_ENCRYPTED=false
clean:
rm -f $(OBJ)
rm -f $(TARGET).3dsx
@ -282,5 +280,3 @@ clean:
rm -f ctr/3dsx_custom_crt0.o
.PHONY: clean

View File

@ -27,6 +27,7 @@ OBJ := ctr/ctr_system.o \
frontend/drivers/platform_null.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/compat/compat_strcasestr.o \
libretro-common/compat/fopen_utf8.o \
libretro-common/file/file_path.o \
libretro-common/string/stdstring.o \
libretro-common/lists/string_list.o \
@ -94,10 +95,8 @@ LDFLAGS += -specs=ctr/3dsx_custom.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
CFLAGS += -std=gnu99 -ffast-math
LIBS := -lctru -lm
ifeq ($(BUILD_3DSX), 1)
TARGET_3DSX := $(TARGET).3dsx $(TARGET).smdh
endif
@ -220,5 +219,3 @@ clean:
rm -f ctr/3dsx_custom_crt0.o
.PHONY: clean

View File

@ -16,6 +16,7 @@ HAVE_OPENGLES = 1
HAVE_RJPEG = 0
HAVE_RPNG = 1
HAVE_EMSCRIPTEN = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_SDL = 0
HAVE_SDL2 = 0
@ -57,7 +58,7 @@ endif
include Makefile.common
CFLAGS += -Ideps/libz -Ideps -Ideps/stb
CFLAGS += $(DEF_FLAGS) -Ideps/libz -Ideps -Ideps/stb
libretro = libretro_emscripten.bc
ifneq ($(V), 1)

View File

@ -430,8 +430,8 @@ else ifeq ($(platform), windows_msvc2005_x86)
CXX = cl.exe
LD = link.exe
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")
@ -479,7 +479,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2010_,,$(platform))
@ -550,7 +550,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2012_,,$(platform))
@ -625,7 +625,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2013_,,$(platform))
@ -700,7 +700,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
LD = link.exe
PLATCFLAGS += -D_WIN32 -D__STDC_CONSTANT_MACROS -D_MBCS
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32
PLATCFLAGS += -D__i686__ -D__SSE__ -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_WARNINGS -D_WINDOWS -DHAVE_CC_RESAMPLER -DHAVE_GL_SYNC -DHAVE_GLSL -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_OPENGL -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DWIN32 -DHAVE_EASTEREGG
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib iphlpapi.lib
PlatformSuffix = $(subst windows_msvc2015_,,$(platform))
@ -1074,7 +1074,6 @@ overlays-checkout:
$(GIT) clone git://github.com/libretro/common-overlays.git $(OVERLAY_DIR); \
fi
clean:
rm -f $(EXT_TARGET)
rm -f $(EXT_INTER_TARGET)

View File

@ -22,7 +22,7 @@ OBJ :=
# For threading we need to overwrite some vars with global defines because devkitPro's includes
# make it hard for us. This works for the pthread wrapper
DEFINES_THREAD := -Dpthread_t=Thread -Dpthread_mutex_t=Mutex -Dpthread_mutexattr_t='void*' -Dpthread_attr_t=int -Dpthread_cond_t=CondVar -Dpthread_condattr_t='int' -D_SYS__PTHREADTYPES_H_
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD)
DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSOLE -DRARCH_INTERNAL -DGLOBAL_CONFIG_DIR='"/switch"' $(DEFINES_THREAD) -DHAVE_STB_VORBIS
HAVE_CC_RESAMPLER = 1
HAVE_MENU_COMMON = 1
@ -41,6 +41,8 @@ HAVE_NETWORKING = 1
HAVE_NETPLAYDISCOVERY = 1
HAVE_STB_FONT = 1
HAVE_CHEEVOS = 1
HAVE_CHD = 1
HAVE_STB_VORBIS = 1
# RetroArch libnx useful flags
HAVE_THREADS = 1

View File

@ -45,7 +45,6 @@ export CXX := $(PREFIX)g++
export AR := $(PREFIX)ar
export OBJCOPY := $(PREFIX)objcopy
ISVC=$(or $(VCBUILDHELPER_COMMAND),$(MSBUILDEXTENSIONSPATH32),$(MSBUILDEXTENSIONSPATH))
#---------------------------------------------------------------------------------
@ -131,7 +130,6 @@ INCLUDES := $(DEFINCS) \
MACHDEP := -DBIGENDIAN -DGEKKO -mcpu=750 -meabi -msdata=eabi -mhard-float -ffunction-sections -fdata-sections
ifeq ($(PLATFORM),wii)
MACHDEP += -DHW_RVL
endif
@ -159,7 +157,6 @@ VPATH := $(LWIPDIR) \
$(LIBWIIKEYB) \
$(STUBSDIR)
#---------------------------------------------------------------------------------
SOURCES_LWIP := $(LWIPDIR)/network.c \
$(LWIPDIR)/netio.c \
@ -264,7 +261,6 @@ SOURCES_OGC_ASM := $(OGCDIR)/cache_asm.S \
$(OGCDIR)/system_asm.S \
$(OGCDIR)/video_asm.S
ifneq ($(BUILD_LITE), 1)
SOURCES_OGC += $(OGCDIR)/dvd.c
endif

View File

@ -7,7 +7,6 @@ ARCH = amd64
BUILD_DIR = objs/msvc
CXX_BUILD = 0
WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING)
WindowsSDKVersion := 10.0.14393.0\$(NOTHING)
VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING)
@ -30,6 +29,7 @@ HAVE_WINMM := 1
HAVE_RPNG := 1
HAVE_ZLIB := 1
WANT_ZLIB := 1
HAVE_MENU := 1
HAVE_RGUI := 1
HAVE_XMB := 1
HAVE_MATERIALUI := 1
@ -59,7 +59,7 @@ HAVE_IMAGEVIEWER := 1
include Makefile.common
INCLUDE_DIRS := $(patsubst -isystem%,-I%,$(INCLUDE_DIRS))
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(CFLAGS))
CFLAGS := $(filter-out -Wno-unknown-pragmas,$(DEF_FLAGS))
CXXFLAGS := $(filter-out -fpermissive -Wno-switch -Wno-sign-compare -fno-strict-aliasing -Wno-maybe-uninitialized -Wno-reorder -Wno-parentheses,$(CXXFLAGS))
LIBS := $(filter-out -lstdc++,$(LIBS))
@ -90,14 +90,12 @@ ifeq ($(ARCH),x86)
CROSS =
endif
INCLUDE := $(VCINSTALLDIR)include;$(VCINSTALLDIR)atlmfc\include;$(WindowsSdkDir)include\$(WindowsSDKVersion)ucrt;$(WindowsSdkDir)include\$(WindowsSDKVersion)shared;$(WindowsSdkDir)include\$(WindowsSDKVersion)um;
LIB := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);$(WindowsSdkDir)lib\$(WindowsSDKVersion)ucrt\$(TARGET_ARCH2);$(WindowsSdkDir)lib\$(WindowsSDKVersion)um\$(TARGET_ARCH2);C:\Program Files (x86)\NVIDIA Corporation\Cg\lib.$(TARGET_ARCH2);C:\Program Files (x86)\Microsoft DirectX SDK (February 2010)\Lib\$(TARGET_ARCH2);
LIBPATH := $(VCINSTALLDIR)LIB\$(CROSS);$(VCINSTALLDIR)atlmfc\lib\$(CROSS);
PATH := $(shell IFS=$$'\n'; cygpath "$(VCINSTALLDIR)bin\\$(CROSS)"):$(shell IFS=$$'\n'; cygpath "$(WindowsSdkDir)\bin\\$(ARCH2)"):$(PATH)
export INCLUDE := $(INCLUDE)
export LIB := $(LIB)
export LIBPATH := $(LIBPATH)
@ -144,7 +142,6 @@ RC = rc.exe
LIBS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib
LDFLAGS += -nologo -wx -nxcompat -machine:$(TARGET_ARCH2)
ifeq ($(DEBUG),1)
FLAGS += -GS -Gy -Od -RTC1 -D_SECURE_SCL=1 -Zi
FLAGS += -MDd
@ -155,7 +152,6 @@ else
FLAGS += -MD
endif
ifeq ($(DEBUG),1)
BUILD_DIR := $(BUILD_DIR)-debug
endif
@ -170,7 +166,6 @@ ifneq ($(V), 1)
Q := @
endif
ifeq ($(GRIFFIN_BUILD), 1)
OBJ := griffin/griffin.o griffin/griffin_cpp.o
DEFINES += -DHAVE_GRIFFIN -DUSE_MATH_DEFINES
@ -188,9 +183,6 @@ OBJ := $(patsubst %rarch.o,%rarch.res,$(OBJ))
OBJ := $(addprefix $(BUILD_DIR)/,$(OBJ))
OBJ := $(OBJ:.o=.obj)
LDFLAGS += -WX -SUBSYSTEM:WINDOWS -ENTRY:mainCRTStartup
DEFINES := $(patsubst -f%,,$(DEFINES))
@ -198,7 +190,6 @@ LDFLAGS := $(patsubst -l%,%.lib,$(LDFLAGS))
LIBS := $(filter-out -lm,$(LIBS))
LIBS := $(patsubst -l%,%.lib,$(LIBS))
#$(info INCLUDE_DIRS : $(INCLUDE_DIRS))
#$(info DEFINES : $(DEFINES))
#$(info CFLAGS : $(CFLAGS))

View File

@ -29,7 +29,7 @@ else
HAVE_RJPEG := 1
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_ZLIB := 0
HAVE_ZLIB := 1
HAVE_OVERLAY := 1
HAVE_7ZIP := 1
HAVE_EGL := 1
@ -55,16 +55,16 @@ else
endif
include Makefile.common
CFLAGS += $(DEF_FLAGS)
BLACKLIST :=
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
#OBJ += input/drivers/psp_input.o
#OBJ += input/drivers_joypad/psp_joypad.o
#OBJ += audio/drivers/psp_audio.o
OBJ += input/drivers/ps4_input.o
OBJ += input/drivers_joypad/ps4_joypad.o
OBJ += audio/drivers/psp_audio.o
#OBJ += frontend/drivers/platform_orbis.o
endif
ifeq ($(strip $(PS4SDK)),)
$(error "Please set PS4SDK in your environment. export PS4SDK=<path to>ps4sdk")
endif
@ -120,10 +120,9 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
endif
CXXFLAGS := $(CFLAGS)
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
TARGETS := $(TARGET).elf
@ -131,7 +130,6 @@ TARGETS := $(TARGET).elf
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
POSTCOMPILE = mv -f $*.Tdepend $*.depend
all: $(TARGETS)
%.o: %.cpp
@ -144,7 +142,6 @@ all: $(TARGETS)
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.o: %.S
%.o: %.S %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
@ -167,4 +164,4 @@ clean:
.PHONY: clean all
.PRECIOUS: %.depend
-include $(OBJ:.o=.depend)
-include $(OBJ:.o=.depend)

View File

@ -52,4 +52,3 @@ clean:
rm -f $(BINDIR)/retroarch-joyconfig
rm -f $(PNDDIR)/readme.html
rm -f retroarch

View File

@ -2,11 +2,11 @@ BUILD_PRX = 0
DEBUG = 0
HAVE_KERNEL_PRX = 0
HAVE_LOGGER = 0
HAVE_FILE_LOGGER = 1
HAVE_FILE_LOGGER = 0
HAVE_THREADS = 0
BIG_STACK = 0
WHOLE_ARCHIVE_LINK = 0
PS2_IP = 192.168.2.150
MUTE_WARNINGS = 0
PS2_IP = 192.168.1.150
#Configuration for IRX
EE_BIN2O = bin2o
@ -20,31 +20,30 @@ ifeq ($(DEBUG), 1)
RARCH_DEFINES += -DDEBUG
else
OPTIMIZE_LV := -O2
LDFLAGS := -s
endif
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
WHOLE_START := -Wl,--whole-archive
WHOLE_END := -Wl,--no-whole-archive
ifeq ($(MUTE_WARNINGS), 1)
DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses
endif
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
GPVAL = -G0
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant
ASFLAGS = $(CFLAGS)
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_IMAGEVIEWER -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
LIBDIR =
LDFLAGS = -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L. -s
LIBS += $(WHOLE_START) -lretro_ps2 $(WHOLE_END)
LIBS += -lgskit -ldmakit -lpad -lmc -lhdd -lsdl -lc -lfileXio -lpatches -lpoweroff -ldebug -lc
LDFLAGS += -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L.
LIBS += -lretro_ps2 -lgskit -ldmakit -lgskit_toolkit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
#IRX modules
# IRX modules - modules have to be in IRX_DIR
IRX = iomanX.irx fileXio.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
IRX_OBJ = $(IRX:.irx=.o)
EE_OBJS += $(IRX_OBJ)
@ -67,12 +66,13 @@ endif
CFLAGS += $(RARCH_DEFINES)
# Missing objecst on the PS2SDK
EE_OBJS += ps2/compat_ctype.o
EE_OBJS += ps2/compat_files/compat_ctype.o ps2/compat_files/time.o
#EE_OBJS = griffin/griffin.o bootstrap/ps2/kernel_functions.o
EE_OBJS += griffin/griffin.o
EE_CFLAGS = $(CFLAGS)
EE_CXXFLAGS = $(CFLAGS)
EE_LDFLAGS = $(LDFLAGS)
EE_LIBS = $(LIBS)
EE_ASFLAGS = $(ASFLAGS)
@ -108,10 +108,7 @@ $(EE_IRX_OBJ):
include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal
#Linking with C++
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)

View File

@ -55,6 +55,7 @@ PPU_SRCS = frontend/frontend_salamander.c \
libretro-common/encodings/encoding_utf.c \
libretro-common/compat/compat_strl.c \
libretro-common/compat/compat_strcasestr.c \
libretro-common/compat/fopen_utf8.c \
libretro-common/streams/file_stream.c \
libretro-common/vfs/vfs_implementation.c \
libretro-common/file/config_file.c \

View File

@ -128,4 +128,3 @@ clean:
rm -f $(OBJ)
.PHONY: clean

View File

@ -49,7 +49,6 @@ endif
CFLAGS += $(RARCH_DEFINES)
EXTRA_TARGETS = EBOOT.PBP
PSP_EBOOT_TITLE = RetroArch PSP1

View File

@ -42,6 +42,7 @@ OBJS = frontend/frontend_salamander.o \
libretro-common/lists/dir_list.o \
libretro-common/file/retro_dirent.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/compat/fopen_utf8.o \
libretro-common/compat/compat_strl.o \
libretro-common/compat/compat_strcasestr.o \
libretro-common/file/config_file.o \

View File

@ -34,13 +34,13 @@ else
HAVE_DYNAMIC = 1
include Makefile.common
BLACKLIST :=
CFLAGS += $(DEF_FLAGS)
BLACKLIST :=
BLACKLIST += input/input_overlay.o
BLACKLIST += tasks/task_overlay.o
BLACKLIST += tasks/task_overlay.o
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
endif
ifeq ($(strip $(LIBTRANSISTOR_HOME)),)
$(error "Please set LIBTRANSISTOR_HOME in your environment. export LIBTRANSISTOR_HOME=<path/to/libtransistor/dist/>")
endif

View File

@ -55,6 +55,7 @@ else
endif
include Makefile.common
CFLAGS += $(DEF_FLAGS)
BLACKLIST :=
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
@ -64,7 +65,6 @@ else
OBJ += frontend/drivers/platform_psp.o
endif
ifeq ($(strip $(VITASDK)),)
$(error "Please set VITASDK in your environment. export VITASDK=<path to>vitasdk")
endif
@ -127,7 +127,6 @@ TARGETS := $(TARGET).vpk
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
POSTCOMPILE = mv -f $*.Tdepend $*.depend
all: $(TARGETS)
%.o: %.cpp
@ -140,7 +139,6 @@ all: $(TARGETS)
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.o: %.S
%.o: %.S %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)

View File

@ -44,6 +44,7 @@ OBJS = frontend/frontend_salamander.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/compat/compat_strl.o \
libretro-common/compat/compat_strcasestr.o \
libretro-common/compat/fopen_utf8.o \
libretro-common/file/config_file.o \
libretro-common/streams/file_stream.o \
libretro-common/vfs/vfs_implementation.o \

View File

@ -67,6 +67,7 @@ OBJ = frontend/frontend_salamander.o \
libretro-common/encodings/encoding_utf.o \
libretro-common/compat/compat_strl.o \
libretro-common/compat/compat_strcasestr.o \
libretro-common/compat/fopen_utf8.o \
libretro-common/file/config_file.o \
file_path_str.o \
verbosity.o \

View File

@ -64,6 +64,7 @@ ifeq ($(SALAMANDER_BUILD),1)
OBJ += frontend/drivers/platform_null.o
OBJ += libretro-common/encodings/encoding_utf.o
OBJ += libretro-common/compat/compat_strcasestr.o
OBJ += libretro-common/compat/fopen_utf8.o
OBJ += libretro-common/file/file_path.o
OBJ += libretro-common/string/stdstring.o
OBJ += libretro-common/lists/string_list.o
@ -115,6 +116,7 @@ endif
HAVE_RPNG = 1
HAVE_RJPEG = 1
HAVE_RBMP = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_ZLIB = 1
HAVE_7ZIP = 1
@ -241,7 +243,6 @@ ifneq ($(WANT_IOSUHAX), 1)
LIBS += -liosuhax
endif
RPX_OBJ = $(BUILD_DIR)/wiiu/system/stubs_rpl.o
HBL_ELF_OBJ = $(BUILD_DIR)/wiiu/system/dynamic.o $(BUILD_DIR)/wiiu/system/stubs_elf.o
@ -263,13 +264,11 @@ endif
DEPFLAGS = -MT $@ -MMD -MP -MF $(BUILD_DIR)/$*.depend
all: $(TARGETS)
%: $(BUILD_DIR)/%
cp $< $@
$(BUILD_DIR)/%.o: %.cpp %.depend
@$(if $(Q), echo CXX $<,)
@mkdir -p $(dir $@)

View File

@ -12,6 +12,7 @@ HAVE_NETPLAYDISCOVERY = 1
HAVE_STDIN_CMD = 1
HAVE_COMMAND = 1
HAVE_THREADS = 1
HAVE_MENU = 1
HAVE_RGUI = 1
HAVE_MATERIALUI = 1
HAVE_7ZIP = 1
@ -102,7 +103,6 @@ else
WINDRES = windres
endif
libretro ?= -lretro
ifeq ($(DYNAMIC), 1)
@ -123,7 +123,7 @@ else
CXXFLAGS += -O3 -ffast-math
endif
CFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps
CFLAGS += $(DEF_FLAGS) -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps
CXXFLAGS += -Wall -Wno-unused-result -Wno-unused-variable -I. -Ideps -std=c++98 -D__STDC_CONSTANT_MACROS
ifeq ($(CXX_BUILD), 1)
CFLAGS += -std=c++98 -xc++ -D__STDC_CONSTANT_MACROS
@ -172,4 +172,3 @@ clean:
rm -f *.d
.PHONY: all install uninstall clean

View File

@ -119,9 +119,12 @@ static const audio_driver_t *audio_drivers[] = {
#ifdef EMSCRIPTEN
&audio_rwebaudio,
#endif
#if defined(PSP) || defined(VITA)
#if defined(PSP) || defined(VITA) || defined(ORBIS)
&audio_psp,
#endif
#if defined(PS2)
&audio_ps2,
#endif
#ifdef _3DS
&audio_ctr_csnd,
&audio_ctr_dsp,
@ -134,7 +137,7 @@ static const audio_driver_t *audio_drivers[] = {
NULL,
};
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_STREAMS] = {{0}};
static struct audio_mixer_stream audio_mixer_streams[AUDIO_MIXER_MAX_SYSTEM_STREAMS] = {{0}};
static size_t audio_driver_chunk_size = 0;
static size_t audio_driver_chunk_nonblock_size = 0;
@ -200,14 +203,14 @@ enum resampler_quality audio_driver_get_resampler_quality(void)
audio_mixer_stream_t *audio_driver_mixer_get_stream(unsigned i)
{
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1))
return NULL;
return &audio_mixer_streams[i];
}
const char *audio_driver_mixer_get_stream_name(unsigned i)
{
if (i > (AUDIO_MIXER_MAX_STREAMS-1))
if (i > (AUDIO_MIXER_MAX_SYSTEM_STREAMS-1))
return "N/A";
if (!string_is_empty(audio_mixer_streams[i].name))
return audio_mixer_streams[i].name;
@ -389,12 +392,11 @@ static bool audio_driver_deinit_internal(void)
return true;
}
static void audio_driver_mixer_init(unsigned out_rate)
static void audio_driver_mixer_init(unsigned audio_out_rate)
{
audio_mixer_init(out_rate);
audio_mixer_init(audio_out_rate);
}
static bool audio_driver_init_internal(bool audio_cb_inited)
{
unsigned new_rate = 0;
@ -633,7 +635,6 @@ static void audio_driver_flush(const int16_t *data, size_t samples)
src_data.data_in = audio_driver_input_data;
src_data.input_frames = samples >> 1;
if (audio_driver_dsp)
{
struct retro_dsp_data dsp_data;
@ -1052,7 +1053,7 @@ static int audio_mixer_find_index(audio_mixer_sound_t *sound)
{
unsigned i;
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
{
audio_mixer_sound_t *handle = audio_mixer_streams[i].handle;
if (handle == sound)
@ -1111,6 +1112,11 @@ static void audio_mixer_play_stop_sequential_cb(
if (!string_is_empty(audio_mixer_streams[i].name))
free(audio_mixer_streams[i].name);
if (i < AUDIO_MIXER_MAX_STREAMS)
audio_mixer_streams[i].type = AUDIO_STREAM_TYPE_USER;
else
audio_mixer_streams[i].type = AUDIO_STREAM_TYPE_SYSTEM;
audio_mixer_streams[i].name = NULL;
audio_mixer_streams[i].state = AUDIO_STREAM_STATE_NONE;
audio_mixer_streams[i].volume = 0.0f;
@ -1121,7 +1127,7 @@ static void audio_mixer_play_stop_sequential_cb(
i++;
for (; i < AUDIO_MIXER_MAX_STREAMS; i++)
for (; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
{
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_STOPPED)
{
@ -1138,10 +1144,11 @@ static void audio_mixer_play_stop_sequential_cb(
}
}
bool audio_driver_mixer_get_free_stream_slot(unsigned *id)
static bool audio_driver_mixer_get_free_stream_slot(unsigned *id, enum audio_mixer_stream_type type)
{
unsigned i;
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
unsigned i = (type == AUDIO_STREAM_TYPE_USER) ? 0 : AUDIO_MIXER_MAX_STREAMS;
unsigned count = (type == AUDIO_STREAM_TYPE_USER) ? AUDIO_MIXER_MAX_STREAMS : AUDIO_MIXER_MAX_SYSTEM_STREAMS;
for (; i < count; i++)
{
if (audio_mixer_streams[i].state == AUDIO_STREAM_STATE_NONE)
{
@ -1161,9 +1168,22 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
audio_mixer_stop_cb_t stop_cb = audio_mixer_play_stop_cb;
bool looped = false;
void *buf = NULL;
if (!audio_driver_mixer_get_free_stream_slot(&free_slot))
if (params->stream_type == AUDIO_STREAM_TYPE_NONE)
return false;
switch (params->slot_selection_type)
{
case AUDIO_MIXER_SLOT_SELECTION_MANUAL:
free_slot = params->slot_selection_idx;
break;
case AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC:
default:
if (!audio_driver_mixer_get_free_stream_slot(
&free_slot, params->stream_type))
return false;
break;
}
if (params->state == AUDIO_STREAM_STATE_NONE)
return false;
@ -1229,6 +1249,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
audio_mixer_streams[free_slot].buf = buf;
audio_mixer_streams[free_slot].handle = handle;
audio_mixer_streams[free_slot].voice = voice;
audio_mixer_streams[free_slot].type = params->stream_type;
audio_mixer_streams[free_slot].state = params->state;
audio_mixer_streams[free_slot].volume = params->volume;
audio_mixer_streams[free_slot].stop_cb = stop_cb;
@ -1238,7 +1259,7 @@ bool audio_driver_mixer_add_stream(audio_mixer_stream_params_t *params)
enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i)
{
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return AUDIO_STREAM_STATE_NONE;
return audio_mixer_streams[i].state;
@ -1248,7 +1269,7 @@ static void audio_driver_mixer_play_stream_internal(unsigned i, unsigned type)
{
bool set_state = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return;
switch (audio_mixer_streams[i].state)
@ -1290,7 +1311,7 @@ void audio_driver_mixer_play_stream_sequential(unsigned i)
float audio_driver_mixer_get_stream_volume(unsigned i)
{
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return 0.0f;
return audio_mixer_streams[i].volume;
@ -1300,7 +1321,7 @@ void audio_driver_mixer_set_stream_volume(unsigned i, float vol)
{
audio_mixer_voice_t *voice = NULL;
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return;
audio_mixer_streams[i].volume = vol;
@ -1315,7 +1336,7 @@ void audio_driver_mixer_stop_stream(unsigned i)
{
bool set_state = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return;
switch (audio_mixer_streams[i].state)
@ -1345,7 +1366,7 @@ void audio_driver_mixer_remove_stream(unsigned i)
{
bool destroy = false;
if (i >= AUDIO_MIXER_MAX_STREAMS)
if (i >= AUDIO_MIXER_MAX_SYSTEM_STREAMS)
return;
switch (audio_mixer_streams[i].state)
@ -1387,7 +1408,7 @@ static void audio_driver_mixer_deinit(void)
audio_mixer_active = false;
for (i = 0; i < AUDIO_MIXER_MAX_STREAMS; i++)
for (i = 0; i < AUDIO_MIXER_MAX_SYSTEM_STREAMS; i++)
{
audio_driver_mixer_stop_stream(i);
audio_driver_mixer_remove_stream(i);
@ -1501,7 +1522,6 @@ error:
return false;
}
bool audio_driver_stop(void)
{
if (!current_audio || !current_audio->stop
@ -1591,7 +1611,6 @@ void audio_set_bool(enum audio_action action, bool val)
}
}
void audio_set_float(enum audio_action action, float val)
{
switch (action)

View File

@ -37,6 +37,8 @@ RETRO_BEGIN_DECLS
#define AUDIO_MIXER_MAX_STREAMS 16
#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS+4)
enum audio_action
{
AUDIO_ACTION_NONE = 0,
@ -48,6 +50,19 @@ enum audio_action
AUDIO_ACTION_MIXER
};
enum audio_mixer_slot_selection_type
{
AUDIO_MIXER_SLOT_SELECTION_AUTOMATIC = 0,
AUDIO_MIXER_SLOT_SELECTION_MANUAL
};
enum audio_mixer_stream_type
{
AUDIO_STREAM_TYPE_NONE = 0,
AUDIO_STREAM_TYPE_USER,
AUDIO_STREAM_TYPE_SYSTEM
};
enum audio_mixer_state
{
AUDIO_STREAM_STATE_NONE = 0,
@ -62,6 +77,8 @@ typedef struct audio_mixer_stream
audio_mixer_sound_t *handle;
audio_mixer_voice_t *voice;
audio_mixer_stop_cb_t stop_cb;
enum audio_mixer_stream_type stream_type;
enum audio_mixer_type type;
enum audio_mixer_state state;
float volume;
void *buf;
@ -163,6 +180,9 @@ typedef struct audio_driver
typedef struct audio_mixer_stream_params
{
float volume;
enum audio_mixer_slot_selection_type slot_selection_type;
unsigned slot_selection_idx;
enum audio_mixer_stream_type stream_type;
enum audio_mixer_type type;
enum audio_mixer_state state;
void *buf;

View File

@ -43,4 +43,3 @@ bool audio_init_thread(const audio_driver_t **out_driver, void **out_data,
const audio_driver_t *driver);
#endif

View File

@ -219,7 +219,6 @@ static int check_pcm_status(void *data, int channel_type)
return ret;
}
static ssize_t alsa_qsa_write(void *data, const void *buf, size_t size)
{
alsa_t *alsa = (alsa_t*)data;
@ -328,7 +327,6 @@ static void alsa_qsa_set_nonblock_state(void *data, bool state)
alsa->nonblock = state;
}
static bool alsa_qsa_use_float(void *data)
{
alsa_t *alsa = (alsa_t*)data;

View File

@ -15,7 +15,6 @@
*/
#include <stdlib.h>
#if TARGET_OS_IPHONE
#include <AudioToolbox/AudioToolbox.h>
#else

View File

@ -56,7 +56,6 @@ static void ctr_csnd_audio_update_playpos(ctr_csnd_audio_t* ctr)
ctr->cpu_ticks_last += samples_played * CTR_CSND_CPU_TICKS_PER_SAMPLE;
}
Result csndPlaySound_custom(int chn, u32 flags, float vol, float pan,
void* data0, void* data1, u32 size)
{
@ -289,7 +288,6 @@ static size_t ctr_csnd_audio_buffer_size(void *data)
return CTR_CSND_AUDIO_COUNT;
}
audio_driver_t audio_ctr_csnd = {
ctr_csnd_audio_init,
ctr_csnd_audio_write,

View File

@ -195,7 +195,6 @@ static size_t ctr_dsp_audio_buffer_size(void *data)
return CTR_DSP_AUDIO_COUNT;
}
audio_driver_t audio_ctr_dsp = {
ctr_dsp_audio_init,
ctr_dsp_audio_write,
@ -211,4 +210,3 @@ audio_driver_t audio_ctr_dsp = {
ctr_dsp_audio_write_avail,
ctr_dsp_audio_buffer_size
};

View File

@ -51,7 +51,6 @@
#pragma comment(lib, "dxguid")
#endif
typedef struct dsound
{
LPDIRECTSOUND ds;
@ -174,7 +173,6 @@ static DWORD CALLBACK dsound_thread(PVOID data)
/* No space to write, or we don't have data in our fifo,
* but we can wait some time before it underruns ... */
/* We could opt for using the notification interface,
* but it is not guaranteed to work, so use high
* priority sleeping patterns.

View File

@ -232,7 +232,6 @@ static bool sl_start(void *data, bool is_shutdown)
return sl->is_paused ? false : true;
}
static ssize_t sl_write(void *data, const void *buf_, size_t size)
{
sl_t *sl = (sl_t*)data;

293
audio/drivers/ps2_audio.c Normal file
View File

@ -0,0 +1,293 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2017 - Francisco Javier Trujillo Mata
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <malloc.h>
#include <stdio.h>
#include <string.h>
#include <kernel.h>
#include <audsrv.h>
#include "../audio_driver.h"
typedef struct ps2_audio
{
fifo_buffer_t* buffer;
bool nonblocking;
volatile bool running;
int worker_thread;
int lock;
int cond_lock;
} ps2_audio_t;
static ps2_audio_t *backup_ps2;
static u8 audioThreadStack[4 * 1024] __attribute__ ((aligned(16)));
#define AUDIO_OUT_BUFFER 2 * 1024
#define AUDIO_BUFFER 64 * 1024
#define AUDIO_CHANNELS 2
#define AUDIO_BITS 16
#define AUDIO_PRIORITY 0x7F /* LOWER VALUE GRATHER PRIORITY*/
static void audioMainLoop(void *data)
{
char out_tmp[AUDIO_OUT_BUFFER];
ps2_audio_t* ps2 = backup_ps2;
while (ps2->running)
{
size_t size;
WaitSema(ps2->lock);
size = MIN(fifo_read_avail(ps2->buffer), sizeof(out_tmp));
fifo_read(ps2->buffer, out_tmp, size);
iSignalSema(ps2->lock);
iSignalSema(ps2->cond_lock);
audsrv_wait_audio(size);
audsrv_play_audio(out_tmp, size);
}
audsrv_stop_audio();
ExitDeleteThread();
}
static void audioCreateThread(ps2_audio_t *ps2)
{
int ret;
ee_thread_t thread;
thread.func=&audioMainLoop;
thread.stack=audioThreadStack;
thread.stack_size=sizeof(audioThreadStack);
thread.gp_reg=&_gp;
thread.initial_priority=AUDIO_PRIORITY;
thread.attr=thread.option=0;
/*Backup the PS2 content to be used in the thread */
backup_ps2 = ps2;
ps2->running = true;
ps2->worker_thread = CreateThread(&thread);
if (ps2->worker_thread >= 0) {
ret = StartThread(ps2->worker_thread, NULL);
if (ret < 0) {
printf("sound_init: StartThread returned %d\n", ret);
}
} else {
printf("CreateThread failed: %d\n", ps2->worker_thread);
}
}
static void audioStopNDeleteThread(ps2_audio_t *ps2)
{
ps2->running = false;
if (ps2->worker_thread) {
ps2->worker_thread = 0;
}
}
static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
{
int err;
struct audsrv_fmt_t format;
format.bits = AUDIO_BITS;
format.freq = rate;
format.channels = AUDIO_CHANNELS;
err = audsrv_set_format(&format);
if (err){
printf("set format returned %d\n", err);
printf("audsrv returned error string: %s\n", audsrv_get_error_string());
}
audsrv_set_volume(MAX_VOLUME);
}
static void audioCreateSemas(ps2_audio_t *ps2)
{
ee_sema_t lock_info;
ee_sema_t cond_lock_info;
lock_info.max_count = 1;
lock_info.init_count = 1;
lock_info.option = 0;
ps2->lock = CreateSema(&lock_info);
cond_lock_info.init_count = 1;
cond_lock_info.max_count = 1;
cond_lock_info.option = 0;
ps2->cond_lock = CreateSema(&cond_lock_info);
}
static void *ps2_audio_init(const char *device,
unsigned rate, unsigned latency,
unsigned block_frames,
unsigned *new_rate)
{
ps2_audio_t *ps2 = (ps2_audio_t*)calloc(1, sizeof(ps2_audio_t));
if (!ps2)
return NULL;
ps2->buffer = fifo_new(AUDIO_BUFFER);
audioConfigure(ps2, rate);
audioCreateSemas(ps2);
audioCreateThread(ps2);
return ps2;
}
static void ps2_audio_free(void *data)
{
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if(!ps2)
return;
if(ps2->running){
audioStopNDeleteThread(ps2);
if (ps2->lock){
iDeleteSema(ps2->lock);
ps2->lock = 0;
}
if (ps2->cond_lock){
iDeleteSema(ps2->cond_lock);
ps2->cond_lock = 0;
}
}
fifo_free(ps2->buffer);
free(ps2);
}
static ssize_t ps2_audio_write(void *data, const void *buf, size_t size)
{
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (!ps2->running)
return -1;
if (ps2->nonblocking){
if (fifo_write_avail(ps2->buffer) < size)
return 0;
}
while (fifo_write_avail(ps2->buffer) < size) {
WaitSema(ps2->cond_lock);
}
WaitSema(ps2->lock);
fifo_write(ps2->buffer, buf, size);
iSignalSema(ps2->lock);
return size;
}
static bool ps2_audio_alive(void *data)
{
bool alive = false;
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (ps2) {
alive = ps2->running;
}
return alive;
}
static bool ps2_audio_stop(void *data)
{
bool stop = true;
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (ps2) {
audioStopNDeleteThread(ps2);
audsrv_stop_audio();
}
return stop;
}
static bool ps2_audio_start(void *data, bool is_shutdown)
{
ps2_audio_t* ps2 = (ps2_audio_t*)data;
bool start = true;
if (ps2) {
if (!ps2->running && !ps2->worker_thread) {
audioCreateThread(ps2);
}
}
return start;
}
static void ps2_audio_set_nonblock_state(void *data, bool toggle)
{
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (ps2) {
ps2->nonblocking = toggle;
}
}
static bool ps2_audio_use_float(void *data)
{
return false;
}
static size_t ps2_audio_write_avail(void *data)
{
ps2_audio_t* ps2 = (ps2_audio_t*)data;
if (ps2 && ps2->running) {
size_t size;
WaitSema(ps2->lock);
size = AUDIO_BUFFER - fifo_read_avail(ps2->buffer);
iSignalSema(ps2->lock);
return size;
}
return 0;
}
static size_t ps2_audio_buffer_size(void *data)
{
return AUDIO_BUFFER;
}
audio_driver_t audio_ps2 = {
ps2_audio_init,
ps2_audio_write,
ps2_audio_stop,
ps2_audio_start,
ps2_audio_alive,
ps2_audio_set_nonblock_state,
ps2_audio_free,
ps2_audio_use_float,
"ps2",
NULL,
NULL,
ps2_audio_write_avail,
ps2_audio_buffer_size
};

View File

@ -16,21 +16,28 @@
*/
#include <stdint.h>
#if defined(VITA) || defined(PSP)
#include <malloc.h>
#endif
#include <stdio.h>
#include <string.h>
#include <rthreads/rthreads.h>
#include <queues/fifo_queue.h>
#ifdef VITA
#if defined(VITA)
#include <psp2/kernel/processmgr.h>
#include <psp2/kernel/threadmgr.h>
#include <psp2/kernel/sysmem.h>
#include <psp2/audioout.h>
#else
#elif defined(PSP)
#include <pspkernel.h>
#include <pspaudio.h>
#elif defined(ORBIS)
#include <audioout.h>
#define SCE_AUDIO_OUT_PORT_TYPE_MAIN 0
#define SCE_AUDIO_OUT_MODE_STEREO 1
#define SceUID uint32_t
#endif
#include "../audio_driver.h"
@ -64,10 +71,14 @@ static void audioMainLoop(void *data)
{
psp_audio_t* psp = (psp_audio_t*)data;
#ifdef VITA
#if defined(VITA)
int port = sceAudioOutOpenPort(
SCE_AUDIO_OUT_PORT_TYPE_MAIN, AUDIO_OUT_COUNT,
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
#elif defined(ORBIS)
int port = sceAudioOutOpen(0xff,
SCE_AUDIO_OUT_PORT_TYPE_MAIN, 0, AUDIO_OUT_COUNT,
psp->rate, SCE_AUDIO_OUT_MODE_STEREO);
#else
sceAudioSRCChReserve(AUDIO_OUT_COUNT, psp->rate, 2);
#endif
@ -95,7 +106,7 @@ static void audioMainLoop(void *data)
scond_signal(psp->cond);
slock_unlock(psp->cond_lock);
#ifdef VITA
#if defined(VITA) || defined(ORBIS)
sceAudioOutOutput(port,
cond ? (psp->zeroBuffer)
: (psp->buffer + read_pos_2));
@ -105,8 +116,10 @@ static void audioMainLoop(void *data)
#endif
}
#ifdef VITA
#if defined(VITA)
sceAudioOutReleasePort(port);
#elif defined(ORBIS)
sceAudioOutClose(port);
#else
sceAudioSRCChRelease();
#endif
@ -127,12 +140,23 @@ static void *psp_audio_init(const char *device,
(void)device;
(void)latency;
#ifdef ORBIS
psp->buffer = (uint32_t*)
malloc(AUDIO_BUFFER_SIZE * sizeof(uint32_t));
#else
/* Cache aligned, not necessary but helpful. */
psp->buffer = (uint32_t*)
memalign(64, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
#endif
memset(psp->buffer, 0, AUDIO_BUFFER_SIZE * sizeof(uint32_t));
#ifdef ORBIS
psp->zeroBuffer = (uint32_t*)
malloc(AUDIO_OUT_COUNT * sizeof(uint32_t));
#else
psp->zeroBuffer = (uint32_t*)
memalign(64, AUDIO_OUT_COUNT * sizeof(uint32_t));
#endif
memset(psp->zeroBuffer, 0, AUDIO_OUT_COUNT * sizeof(uint32_t));
psp->read_pos = 0;
@ -228,7 +252,6 @@ static bool psp_audio_alive(void *data)
return psp->running;
}
static bool psp_audio_stop(void *data)
{
psp_audio_t* psp = (psp_audio_t*)data;
@ -294,7 +317,6 @@ static size_t psp_buffer_size(void *data)
return AUDIO_BUFFER_SIZE /** sizeof(uint32_t)*/;
}
audio_driver_t audio_psp = {
psp_audio_init,
psp_audio_write,
@ -304,8 +326,10 @@ audio_driver_t audio_psp = {
psp_audio_set_nonblock_state,
psp_audio_free,
psp_audio_use_float,
#ifdef VITA
#if defined(VITA)
"vita",
#elif defined(ORBIS)
"orbis",
#else
"psp",
#endif

View File

@ -80,7 +80,6 @@ static void mainLoop(void* data)
RARCH_LOG("[Audio]: start mainLoop cpu %u tid %u\n", svcGetCurrentProcessorNumber(), swa->thread.handle);
while (swa->running)
{
size_t buf_avail, avail, to_write;

View File

@ -296,7 +296,6 @@
#define SNDRV_PCM_MMAP_OFFSET_STATUS 0x80000000
#define SNDRV_PCM_MMAP_OFFSET_CONTROL 0x81000000
/** Audio sample format of a PCM.
* The first letter specifiers whether the sample is signed or unsigned.
* The letter 'S' means signed. The letter 'U' means unsigned.

View File

@ -30,16 +30,12 @@
#include <audioclient.h>
#ifdef _MSC_VER
/* IID_IAudioClient 1CB9AD4C-DBFA-4c32-B178-C2F568A703B2 */
static const GUID IID_IAudioClient = { 0x1CB9AD4C, 0xDBFA, 0xB178, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2 };
/* IID_IAudioRenderClient F294ACFC-3146-4483-A7BF-ADDCA7C260E2 */
static const GUID IID_IAudioRenderClient = { 0xF294ACFC, 0x3146, 0x4483, 0xA7BF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2 };
/* IID_IMMDeviceEnumerator A95664D2-9614-4F35-A746-DE8DB63617E6 */
static const GUID IID_IMMDeviceEnumerator = { 0xA95664D2, 0x9614, 0x4F35, 0xA746, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6 };
/* CLSID_MMDeviceEnumerator BCDE0395-E52F-467C-8E3D-C4579291692E */
static const GUID CLSID_MMDeviceEnumerator = { 0xBCDE0395, 0xE52F, 0x467C, 0x8E3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E };
/* KSDATAFORMAT_SUBTYPE_IEEE_FLOAT 00000003-0000-0010-8000-00aa00389b71 */
static const GUID KSDATAFORMAT_SUBTYPE_IEEE_FLOAT = { 0x00000003, 0x0000, 0x0010, 0x8000, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 };
DEFINE_GUID(IID_IAudioClient, 0x1CB9AD4C, 0xDBFA, 0x4C32, 0xB1, 0x78, 0xC2, 0xF5, 0x68, 0xA7, 0x03, 0xB2);
DEFINE_GUID(IID_IAudioRenderClient, 0xF294ACFC, 0x3146, 0x4483, 0xA7, 0xBF, 0xAD, 0xDC, 0xA7, 0xC2, 0x60, 0xE2);
DEFINE_GUID(IID_IMMDeviceEnumerator, 0xA95664D2, 0x9614, 0x4F35, 0xA7, 0x46, 0xDE, 0x8D, 0xB6, 0x36, 0x17, 0xE6);
DEFINE_GUID(CLSID_MMDeviceEnumerator, 0xBCDE0395, 0xE52F, 0x467C, 0x8E, 0x3D, 0xC4, 0x57, 0x92, 0x91, 0x69, 0x2E);
#undef KSDATAFORMAT_SUBTYPE_IEEE_FLOAT
DEFINE_GUID(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT, 0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71);
#endif
#include <lists/string_list.h>
@ -593,7 +589,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
unsigned u1, unsigned *u2)
{
HRESULT hr;
bool com_initialized = false;
UINT32 frame_count = 0;
REFERENCE_TIME dev_period = 0;
BYTE *dest = NULL;
@ -605,11 +600,6 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
WASAPI_CHECK(w, "Out of memory", return NULL);
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
WASAPI_HR_CHECK(hr, "CoInitializeEx", goto error);
com_initialized = true;
w->device = wasapi_init_device(dev_id);
if (!w->device && dev_id)
w->device = wasapi_init_device(NULL);
@ -689,8 +679,6 @@ error:
if (w->buffer)
fifo_free(w->buffer);
free(w);
if (com_initialized)
CoUninitialize();
return NULL;
}
@ -902,7 +890,6 @@ static void wasapi_free(void *wh)
_IAudioClient_Stop(w->client);
WASAPI_RELEASE(w->client);
WASAPI_RELEASE(w->device);
CoUninitialize();
if (w->buffer)
fifo_free(w->buffer);
free(w);

View File

@ -318,7 +318,6 @@ static size_t ax_audio_buffer_size(void* data)
return AX_AUDIO_COUNT;
}
audio_driver_t audio_ax =
{
ax_audio_init,

View File

@ -201,11 +201,6 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
{
xaudio2_t *handle = NULL;
WAVEFORMATEX wfx = {0};
#if !defined(_XBOX) && !defined(__WINRT__)
HRESULT hr = CoInitialize(NULL);
if (FAILED(hr))
return NULL;
#endif
#if defined(__cplusplus) && !defined(CINTERFACE)
handle = new xaudio2;
@ -256,9 +251,6 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
error:
xaudio2_free(handle);
#if !defined(_XBOX) && !defined(__WINRT__)
CoUninitialize();
#endif
return NULL;
}
@ -408,10 +400,6 @@ static void xa_free(void *data)
if (xa->xa)
xaudio2_free(xa->xa);
free(xa);
#if !defined(_XBOX) && !defined(__WINRT__)
CoUninitialize();
#endif
}
static size_t xa_write_avail(void *data)

View File

@ -169,7 +169,6 @@ typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback;
typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice;
#endif
typedef struct XAUDIO2_BUFFER
{
UINT32 Flags;
@ -361,4 +360,3 @@ static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_
#pragma pack(pop)
#endif

View File

@ -55,7 +55,6 @@ typedef struct rarch_CC_resampler
void (*process)(void *re, struct resampler_data *data);
} rarch_CC_resampler_t;
#ifdef _MIPS_ARCH_ALLEGREX
static void resampler_CC_process(void *re_, struct resampler_data *data)
{
@ -115,7 +114,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
"vadd.q c720, c720, c620 \n"
"vadd.s s730, s730, s730[1] \n"
"mfv %0, s730 \n"
@ -216,7 +214,6 @@ static void resampler_CC_downsample(void *re_, struct resampler_data *data)
vec_ww1 = _mm_mul_ps(vec_w1, vec_w1);
vec_ww2 = _mm_mul_ps(vec_w2, vec_w2);
vec_ww1 = _mm_mul_ps(vec_ww1, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww1));
vec_ww2 = _mm_mul_ps(vec_ww2, _mm_sub_ps(_mm_set_ps1(3.0),vec_ww2));
@ -307,7 +304,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
vec_ww1 = _mm_mul_ps(vec_w1, vec_w1);
vec_ww2 = _mm_mul_ps(vec_w2, vec_w2);
vec_ww1 = _mm_mul_ps(vec_ww1,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww1));
vec_ww2 = _mm_mul_ps(vec_ww2,_mm_sub_ps(_mm_set_ps1(3.0),vec_ww2));
@ -349,7 +345,6 @@ static void resampler_CC_upsample(void *re_, struct resampler_data *data)
data->output_frames = outp - (audio_frame_float_t*)data->data_out;
}
#elif defined (__ARM_NEON__) && !defined(DONT_WANT_ARM_OPTIMIZATIONS)
#define CC_RESAMPLER_IDENT "NEON"
@ -492,7 +487,6 @@ static void resampler_CC_process(void *re_, struct resampler_data *data)
re->process(re_, data);
}
static void *resampler_CC_init(const struct resampler_config *config,
double bandwidth_mod,
enum resampler_quality quality,

View File

@ -46,7 +46,6 @@
#define NETWORK_COMPAT_HEADERS 1
#endif
#ifdef NETWORK_COMPAT_HEADERS
#include <sys/socket.h>
#include <netdb.h>
@ -158,7 +157,6 @@ static int rsnd_poll(struct pollfd *fd, int numfd, int timeout);
static void rsnd_cb_thread(void *thread_data);
static void rsnd_thread(void *thread_data);
/* Determine whether we're running big- or little endian */
static INLINE int rsnd_is_little_endian(void)
{
@ -242,7 +240,6 @@ static int rsnd_connect_server( rsound_t *rd )
rd->conn_type = RSD_CONN_TCP;
rd->conn.socket = net_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if ( rd->conn.socket < 0 )
goto error;
@ -312,7 +309,6 @@ static int rsnd_send_header_info(rsound_t *rd)
#define FRAMESIZE 34
#define FORMAT 42
uint32_t temp_rate = rd->rate;
uint16_t temp_channels = rd->channels;
@ -980,7 +976,6 @@ static int rsnd_close_ctl(rsound_t *rd)
return 0;
}
// Sends delay info request to server on the ctl socket. This code section isn't critical, and will work if it works.
// It will never block.
static int rsnd_send_info_query(rsound_t *rd)
@ -1296,7 +1291,6 @@ static int rsnd_reset(rsound_t *rd)
return 0;
}
int rsd_stop(rsound_t *rd)
{
retro_assert(rd != NULL);
@ -1403,7 +1397,6 @@ int rsd_exec(rsound_t *rsound)
return fd;
}
/* ioctl()-ish param setting :D */
int rsd_set_param(rsound_t *rd, enum rsd_settings option, void* param)
{
@ -1493,7 +1486,6 @@ void rsd_delay_wait(rsound_t *rd)
/* Latency of stream in ms */
int latency_ms = rsd_delay_ms(rd);
/* Should we sleep for a while to keep the latency low? */
if ( rd->max_latency < latency_ms )
{

View File

@ -46,7 +46,6 @@ void _init_vita_heap(void) {
_newlib_vm_memblock = 0;
}
// Create a mutex to use inside _sbrk_r
if (sceKernelCreateLwMutex((struct SceKernelLwMutexWork*)_newlib_sbrk_mutex, "sbrk mutex", 0, 0, 0) < 0) {
goto failure;

View File

@ -2081,7 +2081,7 @@ void cheevos_populate_menu(void *data)
cheevo_t *cheevo = cheevos_locals.core.cheevos;
end = cheevo + cheevos_locals.core.count;
if(settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable
if(settings->bools.cheevos_enable && settings->bools.cheevos_hardcore_mode_enable
&& cheevos_loaded)
{
if (!cheevos_hardcore_paused)
@ -2571,10 +2571,11 @@ enum
static int cheevos_iterate(coro_t *coro)
{
ssize_t num_read = 0;
size_t to_read = 4096;
uint8_t *buffer = NULL;
const char *end = NULL;
const int SNES_HEADER_LEN = 0x200;
ssize_t num_read = 0;
size_t to_read = 4096;
uint8_t *buffer = NULL;
const char *end = NULL;
static const uint32_t genesis_exts[] =
{
@ -2612,18 +2613,16 @@ static int cheevos_iterate(coro_t *coro)
static cheevos_finder_t finders[] =
{
{SNES_MD5, "SNES (8Mb padding)", snes_exts},
{SNES_MD5, "SNES (discards header)", snes_exts},
{GENESIS_MD5, "Genesis (6Mb padding)", genesis_exts},
{LYNX_MD5, "Atari Lynx (only first 512 bytes)", lynx_exts},
{NES_MD5, "NES (discards VROM)", NULL},
{NES_MD5, "NES (discards header)", NULL},
{GENERIC_MD5, "Generic (plain content)", NULL},
{FILENAME_MD5, "Generic (filename)", NULL}
};
CORO_ENTER();
cheevos_locals.addrs_patched = false;
coro->settings = config_get_ptr();
@ -2902,30 +2901,21 @@ found:
MD5_Init(&coro->md5);
coro->offset = 0;
/* Checks for the existence of a headered SNES file.
Unheadered files fall back to GENERIC_MD5. */
if (coro->len < 0x2000 || coro->len % 0x2000 != SNES_HEADER_LEN)
{
coro->gameid = 0;
CORO_RET();
}
coro->offset = 512;
coro->count = 0;
CORO_GOSUB(EVAL_MD5);
if (coro->count == 0)
{
MD5_Final(coro->hash, &coro->md5);
coro->gameid = 0;
CORO_RET();
}
if (coro->count < size_in_megabytes(8))
{
/*
* Inputs: CHEEVOS_VAR_MD5, CHEEVOS_VAR_OFFSET, CHEEVOS_VAR_COUNT
* Outputs: CHEEVOS_VAR_MD5
*/
coro->offset = 0;
coro->count = size_in_megabytes(8) - coro->count;
CORO_GOSUB(FILL_MD5);
}
MD5_Final(coro->hash, &coro->md5);
CORO_GOTO(GET_GAMEID);
/**************************************************************************
@ -2987,12 +2977,8 @@ found:
*************************************************************************/
CORO_SUB(NES_MD5)
/* Note about the references to the FCEU emulator below. There is no
* core-specific code in this function, it's rather Retro Achievements
* specific code that must be followed to the letter so we compute
* the correct ROM hash. Retro Achievements does indeed use some
* FCEU related method to compute the hash, since its NES emulator
* is based on it. */
/* Checks for the existence of a headered NES file.
Unheadered files fall back to GENERIC_MD5. */
if (coro->len < sizeof(coro->header))
{
@ -3012,37 +2998,11 @@ found:
CORO_RET();
}
{
size_t romsize = 256;
/* from FCEU core - compute size using the cart mapper */
int mapper = (coro->header.rom_type >> 4) | (coro->header.rom_type2 & 0xF0);
if (coro->header.rom_size)
romsize = next_pow2(coro->header.rom_size);
/* for games not to the power of 2, so we just read enough
* PRG rom from it, but we have to keep ROM_size to the power of 2
* since PRGCartMapping wants ROM_size to be to the power of 2
* so instead if not to power of 2, we just use head.ROM_size when
* we use FCEU_read. */
coro->round = mapper != 53 && mapper != 198 && mapper != 228;
coro->bytes = coro->round ? romsize : coro->header.rom_size;
}
/* from FCEU core - check if Trainer included in ROM data */
MD5_Init(&coro->md5);
coro->offset = sizeof(coro->header) + (coro->header.rom_type & 4
? sizeof(coro->header) : 0);
coro->count = 0x4000 * coro->bytes;
coro->offset = sizeof(coro->header);
coro->count = coro->len - coro->offset;
CORO_GOSUB(EVAL_MD5);
if (coro->count < 0x4000 * coro->bytes)
{
coro->offset = 0xff;
coro->count = 0x4000 * coro->bytes - coro->count;
CORO_GOSUB(FILL_MD5);
}
MD5_Final(coro->hash, &coro->md5);
CORO_GOTO(GET_GAMEID);

View File

@ -42,7 +42,7 @@
#ifdef HAVE_CHEEVOS
#include "cheevos/cheevos.h"
#ifdef HAVE_NEW_CHEEVOS
#include "cheevos/fixup.h"
#include "cheevos-new/fixup.h"
#else
#include "cheevos/var.h"
#endif
@ -244,8 +244,6 @@ static const struct cmd_map map[] = {
};
#endif
bool command_set_shader(const char *arg)
{
char msg[256];
@ -273,7 +271,6 @@ bool command_set_shader(const char *arg)
#endif
}
#if defined(HAVE_COMMAND) && defined(HAVE_CHEEVOS)
#define SMY_CMD_STR "READ_CORE_RAM"
static bool command_read_ram(const char *arg)
@ -426,7 +423,6 @@ static bool command_network_init(command_t *handle, uint16_t port)
msg_hash_to_str(MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT),
(unsigned short)port);
if (fd < 0)
goto error;
@ -1150,7 +1146,6 @@ static void command_event_init_cheats(void)
cheat_manager_alloc_if_empty() ;
cheat_manager_load_game_specific_cheats() ;
if (settings != NULL && settings->bools.apply_cheats_after_load)
cheat_manager_apply_cheats();
}
@ -1347,7 +1342,6 @@ static bool command_event_init_core(enum rarch_core_type *data)
if(settings->bools.auto_shaders_enable)
config_load_shader_preset();
/* reset video format to libretro's default */
video_driver_set_pixel_format(RETRO_PIXEL_FORMAT_0RGB1555);
@ -1370,7 +1364,6 @@ static bool command_event_init_core(enum rarch_core_type *data)
if (!core_load(settings->uints.input_poll_type_behavior))
return false;
rarch_ctl(RARCH_CTL_SET_FRAME_LIMIT, NULL);
return true;
}
@ -1634,7 +1627,6 @@ static void command_event_save_current_config(enum override_type type)
break;
}
if (!string_is_empty(msg))
runloop_msg_queue_push(msg, 1, 180, true);
}
@ -1834,9 +1826,6 @@ void command_playlist_update_write(
**/
bool command_event(enum event_command cmd, void *data)
{
#ifdef HAVE_DISCORD
static bool discord_inited = false;
#endif
bool boolean = false;
switch (cmd)
@ -2031,9 +2020,6 @@ bool command_event(enum event_command cmd, void *data)
path_clear(RARCH_PATH_CORE);
rarch_ctl(RARCH_CTL_SYSTEM_INFO_FREE, NULL);
#endif
core_unload_game();
if (!rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
core_unload();
#ifdef HAVE_DISCORD
if (discord_is_inited)
{
@ -2986,26 +2972,24 @@ TODO: Add a setting for these tweaks */
if (!settings->bools.discord_enable)
return false;
if (discord_inited)
if (discord_is_ready())
return true;
discord_init();
discord_inited = true;
}
#endif
break;
case CMD_EVENT_DISCORD_DEINIT:
#ifdef HAVE_DISCORD
if (!discord_inited)
if (!discord_is_ready())
return false;
discord_shutdown();
discord_inited = false;
#endif
break;
case CMD_EVENT_DISCORD_UPDATE:
#ifdef HAVE_DISCORD
if (!data || !discord_inited)
if (!data || !discord_is_ready())
return false;
{

View File

@ -1,7 +1,7 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2016 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@ -302,6 +302,7 @@ static bool quick_menu_show_save_content_dir_overrides = true;
static bool kiosk_mode_enable = false;
static bool menu_horizontal_animation = true;
static bool menu_show_online_updater = true;
static bool menu_show_load_core = true;
static bool menu_show_load_content = true;
@ -379,6 +380,7 @@ static const uint32_t menu_bg_dark_color = 0xc0202020;
static const uint32_t menu_bg_light_color = 0xc0404040;
static const uint32_t menu_border_dark_color = 0xc0204020;
static const uint32_t menu_border_light_color = 0xc0408040;
static unsigned rgui_color_theme = RGUI_THEME_CUSTOM;
#else
static bool default_block_config_read = false;
@ -400,9 +402,11 @@ static bool default_screenshots_in_content_dir = false;
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3;
#elif defined(PS2)
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_HOLD_START;
#elif defined(VITA)
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L1_R1_START_SELECT;
#elif defined(SWITCH)
#elif defined(SWITCH) || defined(ORBIS)
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_START_SELECT;
#else
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_NONE;
@ -685,6 +689,9 @@ static const uint16_t network_remote_base_port = 55400;
/* Number of entries that will be kept in content history playlist file. */
static const unsigned default_content_history_size = 100;
/* File format to use when writing playlists to disk */
static const bool playlist_use_old_format = false;
/* Show Menu start-up screen on boot. */
static const bool default_menu_show_start_screen = true;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2014-2017 - Jean-André Santoni
* Copyright (C) 2015-2017 - Andrés Suárez
* Copyright (C) 2016-2017 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@ -218,6 +218,7 @@ enum input_driver_enum
INPUT_X,
INPUT_WAYLAND,
INPUT_DINPUT,
INPUT_PS4,
INPUT_PS3,
INPUT_PSP,
INPUT_PS2,
@ -244,6 +245,7 @@ enum joypad_driver_enum
JOYPAD_GX,
JOYPAD_WIIU,
JOYPAD_XDK,
JOYPAD_PS4,
JOYPAD_PSP,
JOYPAD_PS2,
JOYPAD_CTR,
@ -371,7 +373,7 @@ static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_XENON360;
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WII;
#elif defined(WIIU)
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_WIIU;
#elif defined(PSP) || defined(VITA)
#elif defined(PSP) || defined(VITA) || defined(ORBIS)
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PSP;
#elif defined(PS2)
static enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS2;
@ -453,6 +455,8 @@ static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_SDL2;
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_RWEBINPUT;
#elif defined(_WIN32)
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_DINPUT;
#elif defined(ORBIS)
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS4;
#elif defined(__CELLOS_LV2__)
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_PS3;
#elif defined(PSP) || defined(VITA)
@ -499,6 +503,8 @@ static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_GX;
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_WIIU;
#elif defined(_XBOX)
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_XDK;
#elif defined(ORBIS)
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PS4;
#elif defined(PSP) || defined(VITA)
static enum joypad_driver_enum JOYPAD_DEFAULT_DRIVER = JOYPAD_PSP;
#elif defined(PS2)
@ -687,8 +693,10 @@ const char *config_get_default_audio(void)
case AUDIO_WIIU:
return "AX";
case AUDIO_PSP:
#ifdef VITA
#if defined(VITA)
return "vita";
#elif defined(ORBIS)
return "orbis";
#else
return "psp";
#endif
@ -843,6 +851,8 @@ const char *config_get_default_input(void)
{
case INPUT_ANDROID:
return "android";
case INPUT_PS4:
return "ps4";
case INPUT_PS3:
return "ps3";
case INPUT_PSP:
@ -909,6 +919,8 @@ const char *config_get_default_joypad(void)
switch (default_driver)
{
case JOYPAD_PS4:
return "ps4";
case JOYPAD_PS3:
return "ps3";
case JOYPAD_XINPUT:
@ -962,7 +974,6 @@ const char *config_get_default_joypad(void)
return "null";
}
/**
* config_get_default_camera:
*
@ -1122,6 +1133,9 @@ static struct config_array_setting *populate_settings_array(settings_t *settings
unsigned count = 0;
struct config_array_setting *tmp = (struct config_array_setting*)calloc(1, (*size + 1) * sizeof(struct config_array_setting));
if (!tmp)
return NULL;
/* Arrays */
SETTING_ARRAY("playlist_names", settings->arrays.playlist_names, false, NULL, true);
SETTING_ARRAY("playlist_cores", settings->arrays.playlist_cores, false, NULL, true);
@ -1167,6 +1181,9 @@ static struct config_path_setting *populate_settings_path(settings_t *settings,
global_t *global = global_get_ptr();
struct config_path_setting *tmp = (struct config_path_setting*)calloc(1, (*size + 1) * sizeof(struct config_path_setting));
if (!tmp)
return NULL;
/* Paths */
#ifdef HAVE_XMB
SETTING_PATH("xmb_font", settings->paths.path_menu_xmb_font, false, NULL, true);
@ -1395,11 +1412,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
#ifdef GEKKO
SETTING_BOOL("video_vfilter", &settings->bools.video_vfilter, true, video_vfilter, false);
#endif
#ifdef HAVE_MENU
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
#ifdef HAVE_THREADS
SETTING_BOOL("threaded_data_runloop_enable", &settings->bools.threaded_data_runloop_enable, true, threaded_data_runloop_enable, false);
#endif
#ifdef HAVE_MENU
SETTING_BOOL("menu_unified_controls", &settings->bools.menu_unified_controls, true, false, false);
SETTING_BOOL("menu_throttle_framerate", &settings->bools.menu_throttle_framerate, true, true, false);
SETTING_BOOL("menu_linear_filter", &settings->bools.menu_linear_filter, true, true, false);
SETTING_BOOL("menu_horizontal_animation", &settings->bools.menu_horizontal_animation, true, true, false);
@ -1545,6 +1562,8 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("video_3ds_lcd_bottom", &settings->bools.video_3ds_lcd_bottom, true, video_3ds_lcd_bottom, false);
#endif
SETTING_BOOL("playlist_use_old_format", &settings->bools.playlist_use_old_format, true, playlist_use_old_format, false);
*size = count;
return tmp;
@ -1555,6 +1574,9 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
unsigned count = 0;
struct config_float_setting *tmp = (struct config_float_setting*)calloc(1, (*size + 1) * sizeof(struct config_float_setting));
if (!tmp)
return NULL;
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, aspect_ratio, false);
SETTING_FLOAT("video_scale", &settings->floats.video_scale, false, 0.0f, false);
SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, crt_refresh_rate, false);
@ -1591,6 +1613,9 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
unsigned count = 0;
struct config_uint_setting *tmp = (struct config_uint_setting*)malloc((*size + 1) * sizeof(struct config_uint_setting));
if (!tmp)
return NULL;
#ifdef HAVE_NETWORKING
SETTING_UINT("streaming_mode", &settings->uints.streaming_mode, true, STREAMING_MODE_TWITCH, false);
#endif
@ -1627,6 +1652,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
SETTING_UINT("menu_timedate_style", &settings->uints.menu_timedate_style, true, menu_timedate_style, false);
SETTING_UINT("rgui_menu_color_theme", &settings->uints.menu_rgui_color_theme, true, rgui_color_theme, false);
#ifdef HAVE_LIBNX
SETTING_UINT("split_joycon_p1", &settings->uints.input_split_joycon[0], true, 0, false);
SETTING_UINT("split_joycon_p2", &settings->uints.input_split_joycon[1], true, 0, false);
@ -1715,6 +1741,9 @@ static struct config_size_setting *populate_settings_size(settings_t *settings,
unsigned count = 0;
struct config_size_setting *tmp = (struct config_size_setting*)calloc((*size + 1), sizeof(struct config_size_setting));
if (!tmp)
return NULL;
SETTING_SIZE("rewind_buffer_size", &settings->sizes.rewind_buffer_size, true, rewind_buffer_size, false);
*size = count;
@ -1727,6 +1756,9 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
unsigned count = 0;
struct config_int_setting *tmp = (struct config_int_setting*)calloc((*size + 1), sizeof(struct config_int_setting));
if (!tmp)
return NULL;
SETTING_INT("state_slot", &settings->ints.state_slot, false, 0 /* TODO */, false);
#ifdef HAVE_NETWORKING
SETTING_INT("netplay_check_frames", &settings->ints.netplay_check_frames, true, netplay_check_frames, false);
@ -2267,7 +2299,6 @@ static config_file_t *open_default_config_file(void)
/* Try to create a new config file. */
conf = config_file_new(NULL);
if (conf)
{
/* Since this is a clean config file, we can
@ -2275,7 +2306,7 @@ static config_file_t *open_default_config_file(void)
fill_pathname_resolve_relative(conf_path, app_path,
file_path_str(FILE_PATH_MAIN_CONFIG), path_size);
config_set_bool(conf, "config_save_on_exit", true);
saved = config_file_write(conf, conf_path);
saved = config_file_write(conf, conf_path, true);
}
if (!saved)
@ -2311,7 +2342,7 @@ static config_file_t *open_default_config_file(void)
if (conf)
{
config_set_bool(conf, "config_save_on_exit", true);
saved = config_file_write(conf, conf_path);
saved = config_file_write(conf, conf_path, true);
}
if (!saved)
@ -2386,7 +2417,7 @@ static config_file_t *open_default_config_file(void)
{
/* Since this is a clean config file, we can safely use config_save_on_exit. */
config_set_bool(conf, "config_save_on_exit", true);
saved = config_file_write(conf, conf_path);
saved = config_file_write(conf, conf_path, true);
}
if (!saved)
@ -2633,7 +2664,6 @@ static void config_get_hex_base(config_file_t *conf,
}
#endif
/**
* config_load:
* @path : path to be read from.
@ -2708,11 +2738,11 @@ static bool config_load_file(const char *path, bool set_defaults,
while (extra_path)
{
bool ret = config_append_file(conf, extra_path);
bool result = config_append_file(conf, extra_path);
RARCH_LOG("Config: appending config \"%s\"\n", extra_path);
if (!ret)
if (!result)
RARCH_ERR("Config: failed to append config \"%s\"\n", extra_path);
extra_path = strtok_r(NULL, "|", &save);
}
@ -2840,7 +2870,6 @@ static bool config_load_file(const char *path, bool set_defaults,
CONFIG_GET_INT_BASE(conf, settings, uints.led_map[i], buf);
}
/* Hexadecimal settings */
if (config_get_hex(conf, "video_message_color", &msg_color))
@ -3024,7 +3053,6 @@ static bool config_load_file(const char *path, bool set_defaults,
}
}
if (!string_is_empty(settings->paths.directory_screenshot))
{
if (string_is_equal(settings->paths.directory_screenshot, "default"))
@ -3091,7 +3119,6 @@ static bool config_load_file(const char *path, bool set_defaults,
if (settings->floats.fastforward_ratio < 0.0f)
configuration_set_float(settings, settings->floats.fastforward_ratio, 0.0f);
#ifdef HAVE_LAKKA
settings->bools.ssh_enable = filestream_exists(LAKKA_SSH_PATH);
settings->bools.samba_enable = filestream_exists(LAKKA_SAMBA_PATH);
@ -3187,7 +3214,6 @@ static bool config_load_file(const char *path, bool set_defaults,
ret = true;
end:
if (conf)
config_file_free(conf);
@ -3498,7 +3524,6 @@ bool config_load_remap(void)
malloc(PATH_MAX_LENGTH * sizeof(char));
remap_directory[0] = core_path[0] = game_path[0] = '\0';
strlcpy(remap_directory,
settings->paths.directory_input_remapping,
path_size);
@ -3565,7 +3590,6 @@ bool config_load_remap(void)
input_remapping_set_defaults(false);
}
/* Create a new config file from core_path */
new_conf = config_file_new(core_path);
@ -3791,8 +3815,6 @@ static void parse_config_file(void)
path_get(RARCH_PATH_CONFIG));
}
static void save_keybind_key(config_file_t *conf, const char *prefix,
const char *base, const struct retro_keybind *bind)
{
@ -4046,13 +4068,12 @@ static bool config_save_keybinds_file(const char *path)
for (i = 0; i < MAX_USERS; i++)
save_keybinds_user(conf, i);
ret = config_file_write(conf, path);
ret = config_file_write(conf, path, true);
config_file_free(conf);
return ret;
}
#endif
/**
* config_save_autoconf_profile:
* @path : Path that shall be written to.
@ -4155,7 +4176,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
&input_config_binds[user][i], false, false);
}
ret = config_file_write(conf, autoconf_file);
ret = config_file_write(conf, autoconf_file, false);
config_file_free(conf);
free(buf);
@ -4170,7 +4191,6 @@ error:
return false;
}
/**
* config_save_file:
* @path : Path that shall be written to.
@ -4378,7 +4398,6 @@ bool config_save_file(const char *path)
settings->uints.menu_border_light_color);
#endif
video_driver_save_settings(conf);
#ifdef HAVE_LAKKA
@ -4405,7 +4424,7 @@ bool config_save_file(const char *path)
for (i = 0; i < MAX_USERS; i++)
save_keybinds_user(conf, i);
ret = config_file_write(conf, path);
ret = config_file_write(conf, path, true);
config_file_free(conf);
return ret;
@ -4651,7 +4670,6 @@ bool config_save_overrides(int override_type)
config_set_int(conf, cfg, overrides->uints.input_joypad_map[i]);
}
/* blacklist these since they are handled by remaps */
/* to-do: add setting to control blacklisting
if (settings->uints.input_libretro_device[i]
@ -4677,17 +4695,17 @@ bool config_save_overrides(int override_type)
case OVERRIDE_CORE:
/* Create a new config file from core_path */
RARCH_LOG ("[overrides] path %s\n", core_path);
ret = config_file_write(conf, core_path);
ret = config_file_write(conf, core_path, true);
break;
case OVERRIDE_GAME:
/* Create a new config file from core_path */
RARCH_LOG ("[overrides] path %s\n", game_path);
ret = config_file_write(conf, game_path);
ret = config_file_write(conf, game_path, true);
break;
case OVERRIDE_CONTENT_DIR:
/* Create a new config file from content_path */
RARCH_LOG ("[overrides] path %s\n", content_path);
ret = config_file_write(conf, content_path);
ret = config_file_write(conf, content_path, true);
break;
default:
break;
@ -4736,7 +4754,7 @@ bool config_save_overrides(int override_type)
/* Replaces currently loaded configuration file with
* another one. Will load a dummy core to flush state
* properly. */
bool config_replace(bool config_save_on_exit, char *path)
bool config_replace(bool config_replace_save_on_exit, char *path)
{
content_ctx_info_t content_info = {0};
@ -4748,7 +4766,7 @@ bool config_replace(bool config_save_on_exit, char *path)
if (string_is_equal(path, path_get(RARCH_PATH_CONFIG)))
return false;
if (config_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG))
if (config_replace_save_on_exit && !path_is_empty(RARCH_PATH_CONFIG))
config_save_file(path_get(RARCH_PATH_CONFIG));
path_set(RARCH_PATH_CONFIG, path);

View File

@ -2,7 +2,7 @@
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2016 - Daniel De Matteis
* Copyright (C) 2014-2016 - Jean-André Santoni
* Copyright (C) 2016 - Brad Parker
* Copyright (C) 2016-2019 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
@ -300,6 +300,7 @@ typedef struct settings
bool video_window_save_positions;
bool sustained_performance_mode;
bool playlist_use_old_format;
} bools;
struct
@ -410,6 +411,7 @@ typedef struct settings
unsigned menu_bg_light_color;
unsigned menu_border_dark_color;
unsigned menu_border_light_color;
unsigned menu_rgui_color_theme;
unsigned menu_xmb_layout;
unsigned menu_xmb_shader_pipeline;
unsigned menu_xmb_scale_factor;

4
configure vendored
View File

@ -11,3 +11,7 @@ cat /dev/null > config.log
. qb/qb.comp.sh
. qb/qb.libs.sh
. qb/qb.moc.sh
. qb/qb.make.sh

View File

@ -82,10 +82,13 @@ bool content_reset_savestate_backups(void);
bool content_undo_load_buf_is_empty(void);
bool content_undo_save_buf_is_empty(void);
/* Clears the pending subsystem rom buffer*/
/* Checks if launched from the commandline */
bool content_launched_from_cli(void);
/* Clears the pending subsystem rom buffer */
bool content_is_subsystem_pending_load(void);
/* Clears the pending subsystem rom buffer*/
/* Clears the pending subsystem rom buffer */
void content_clear_subsystem(void);
/* Set the current subsystem*/
@ -106,6 +109,9 @@ void content_set_subsystem_info(void);
/* Get the path to the last selected subsystem rom */
char* content_get_subsystem_rom(unsigned index);
/* Sets the subsystem by name */
bool content_set_subsystem_by_name(const char* subsystem_name);
RETRO_END_DECLS
#endif

View File

@ -134,7 +134,6 @@ bool core_set_default_callbacks(struct retro_callbacks *cbs)
return true;
}
bool core_deinit(void *data)
{
struct retro_callbacks *cbs = (struct retro_callbacks*)data;
@ -402,7 +401,6 @@ bool core_unload(void)
return true;
}
bool core_unload_game(void)
{
video_driver_free_hw_context();

View File

@ -201,7 +201,7 @@ static bool core_info_list_iterate(
if (!current_path)
return false;
info_path_base = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
info_path_base = (char*)malloc(info_path_base_size);
info_path_base[0] = '\0';
@ -230,17 +230,15 @@ static bool core_info_list_iterate(
static core_info_list_t *core_info_list_new(const char *path,
const char *libretro_info_dir,
const char *exts,
bool show_hidden_files)
bool dir_show_hidden_files)
{
size_t i;
core_info_t *core_info = NULL;
core_info_list_t *core_info_list = NULL;
const char *path_basedir = libretro_info_dir;
struct string_list *contents = string_list_new();
bool ok;
ok = dir_list_append(contents, path, exts,
false, show_hidden_files, false, false);
bool ok = dir_list_append(contents, path, exts,
false, dir_show_hidden_files, false, false);
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
/* UWP: browse the optional packages for additional cores */
@ -249,7 +247,7 @@ static core_info_list_t *core_info_list_new(const char *path,
for (i = 0; i < core_packages->size; i++)
{
dir_list_append(contents, core_packages->elems[i].data, exts,
false, show_hidden_files, false, false);
false, dir_show_hidden_files, false, false);
}
string_list_free(core_packages);
#else
@ -574,7 +572,11 @@ static bool core_info_list_update_missing_firmware_internal(
if (!info)
return false;
path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
path = (char*)malloc(path_size);
if (!path)
return false;
path[0] = '\0';
for (i = 0; i < info->firmware_count; i++)
@ -676,12 +678,12 @@ void core_info_deinit_list(void)
}
bool core_info_init_list(const char *path_info, const char *dir_cores,
const char *exts, bool show_hidden_files)
const char *exts, bool dir_show_hidden_files)
{
if (!(core_info_curr_list = core_info_list_new(dir_cores,
!string_is_empty(path_info) ? path_info : dir_cores,
exts,
show_hidden_files)))
dir_show_hidden_files)))
return false;
return true;
}
@ -797,13 +799,13 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
void core_info_get_name(const char *path, char *s, size_t len,
const char *path_info, const char *dir_cores,
const char *exts, bool show_hidden_files)
const char *exts, bool dir_show_hidden_files)
{
size_t i;
const char *path_basedir = !string_is_empty(path_info) ?
path_info : dir_cores;
struct string_list *contents = dir_list_new(
dir_cores, exts, false, show_hidden_files, false, false);
dir_cores, exts, false, dir_show_hidden_files, false, false);
if (!contents)
return;

View File

@ -24,7 +24,8 @@ enum rarch_core_type
CORE_TYPE_MPV,
CORE_TYPE_IMAGEVIEWER,
CORE_TYPE_NETRETROPAD,
CORE_TYPE_VIDEO_PROCESSOR
CORE_TYPE_VIDEO_PROCESSOR,
CORE_TYPE_GONG
};
#endif

View File

@ -223,5 +223,3 @@ void libretro_dummy_retro_cheat_set(unsigned idx,
(void)enabled;
(void)code;
}

View File

@ -360,6 +360,62 @@ size_t libretro_videoprocessor_retro_get_memory_size(unsigned id);
#endif
#ifdef HAVE_EASTEREGG
/* Internal gong core. */
void libretro_gong_retro_init(void);
void libretro_gong_retro_deinit(void);
unsigned libretro_gong_retro_api_version(void);
void libretro_gong_retro_get_system_info(struct retro_system_info *info);
void libretro_gong_retro_get_system_av_info(struct retro_system_av_info *info);
void libretro_gong_retro_set_environment(retro_environment_t cb);
void libretro_gong_retro_set_video_refresh(retro_video_refresh_t cb);
void libretro_gong_retro_set_audio_sample(retro_audio_sample_t cb);
void libretro_gong_retro_set_audio_sample_batch(retro_audio_sample_batch_t cb);
void libretro_gong_retro_set_input_poll(retro_input_poll_t cb);
void libretro_gong_retro_set_input_state(retro_input_state_t cb);
void libretro_gong_retro_set_controller_port_device(unsigned port, unsigned device);
void libretro_gong_retro_reset(void);
void libretro_gong_retro_run(void);
size_t libretro_gong_retro_serialize_size(void);
bool libretro_gong_retro_serialize(void *data, size_t size);
bool libretro_gong_retro_unserialize(const void *data, size_t size);
void libretro_gong_retro_cheat_reset(void);
void libretro_gong_retro_cheat_set(unsigned index, bool enabled, const char *code);
bool libretro_gong_retro_load_game(const struct retro_game_info *game);
bool libretro_gong_retro_load_game_special(unsigned game_type,
const struct retro_game_info *info, size_t num_info);
void libretro_gong_retro_unload_game(void);
unsigned libretro_gong_retro_get_region(void);
void *libretro_gong_retro_get_memory_data(unsigned id);
size_t libretro_gong_retro_get_memory_size(unsigned id);
#endif
RETRO_END_DECLS
#endif

View File

@ -195,7 +195,7 @@ CFLAGS += -D__LIBRETRO__
include Makefile.common
CFLAGS += $(DEFINES) $(INCFLAGS) $(GLFLAGS)
CFLAGS += $(DEFINES) $(INCFLAGS) $(GLFLAGS) $(DEF_FLAGS)
CFLAGS += -Wall $(fpic)
ifeq ($(DEBUG), 1)
@ -226,4 +226,3 @@ clean:
rm -f $(TARGET)
.PHONY: clean

View File

@ -16,7 +16,6 @@ AVUTIL_DIR := $(BASE_DIR)/libavutil
SWSCALE_DIR := $(BASE_DIR)/libswscale
SWRESAMPLE_DIR := $(BASE_DIR)/libswresample
INCFLAGS += -I$(BASE_DIR) -I$(CORE_DIR) -I$(LIBRETRO_COMM_DIR)/include -I$(LIBRETRO_COMM_DIR)/include/compat
LIBRETRO_SOURCE += $(CORE_DIR)/ffmpeg_core.c \

View File

@ -134,7 +134,6 @@ endif
LIBS += -lm
ifeq ($(HAVE_NEON),1)
DEFINES += -DHAVE_NEON=1
else
@ -163,7 +162,6 @@ CPUOPTS += -DARCH_BFIN=0
#We can reasonably assume MMX will be there on all x86 CPUs from 1997 and up at least
#SSE2 can be assumed from Pentium 4 and up - can be switched on or off with the switch HAVE_SSE2
ifeq ($(ARCH_X86),1)
CPUOPTS += -DHAVE_AMD3DNOW_INLINE=0
CPUOPTS += -DHAVE_AMD3DNOWEXT_EXTERNAL=0
@ -756,7 +754,6 @@ else
DEFINES += -DCONFIG_LIBSPEEX_ENCODER=0
endif
ifeq ($(HAVE_LIBOPUS),1)
DEFINES += -DCONFIG_LIBOPUS_ENCODER=1 \
-DCONFIG_OPUS_PARSER=1 \
@ -1265,7 +1262,6 @@ DEFINES += -DCONFIG_LIBOPUS_DECODER=0
DEFINES += -DCONFIG_OPUS_MUXER=0
endif
#libavutil
ifeq ($(INTERNAL_LIBAVUTIL),1)
DEFINES += -DHAVE_AV_CONFIG_H
@ -1336,7 +1332,6 @@ ifeq ($(ARCH_ARM),1)
LIBAVUTIL_SOURCE += $(filter-out $(AVUTIL_BLACKLIST),$(wildcard $(AVUTIL_DIR)/arm/*.c))
endif
ifeq ($(ARCH_PPC),1)
LIBAVUTIL_SOURCE += $(AVUTIL_DIR)/ppc/cpu.c \
$(AVUTIL_DIR)/ppc/float_dsp_init.c
@ -1468,7 +1463,6 @@ else
DEFINES += -DCONFIG_XVMC=0
endif
AVCODEC_BLACKLIST := \
$(AVCODEC_DIR)/arm/neontest.c \
$(AVCODEC_DIR)/vda.c \

View File

@ -693,7 +693,6 @@ void CORE_PREFIX(retro_run)(void)
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D, frames[0].tex);
glBindBuffer(GL_ARRAY_BUFFER, vbo);
glVertexAttribPointer(vertex_loc, 2, GL_FLOAT, GL_FALSE,
4 * sizeof(GLfloat), (const GLvoid*)(0 * sizeof(GLfloat)));
@ -1664,7 +1663,6 @@ error:
return false;
}
unsigned CORE_PREFIX(retro_get_region)(void)
{
return RETRO_REGION_NTSC;

View File

@ -10,4 +10,3 @@ static const char *fragment_source = GLSL(
gl_FragColor = vec4(pow(mix(pow(texture2D(sTex0, vTex).rgb, vec3(2.2)), pow(texture2D(sTex1, vTex).rgb, vec3(2.2)), uMix), vec3(1.0 / 2.2)), 1.0);
}
);

View File

@ -9,4 +9,3 @@ static const char *vertex_source = GLSL(
gl_Position = vec4(aVertex, 0.0, 1.0); vTex = aTexCoord;
}
);

View File

@ -10,4 +10,3 @@ static const char *fragment_source = GLSL(
gl_FragColor = vec4(pow(mix(pow(texture2D(sTex0, vTex).bgr, vec3(2.2)), pow(texture2D(sTex1, vTex).bgr, vec3(2.2)), uMix), vec3(1.0 / 2.2)), 1.0);
}
);

View File

@ -2,4 +2,3 @@
global: retro_*;
local: *;
};

696
cores/libretro-gong/gong.c Normal file
View File

@ -0,0 +1,696 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2018 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
/* Libretro port by Brad Parker,
Original source code by Dan Zaidan: https://danzaidan.itch.io/
Original license:
"You can do whatever you want with the code, but I am providing it as is without any warranty whatsoever."
*/
#include <stdlib.h>
#include <libretro.h>
#include <retro_math.h>
#include <retro_inline.h>
#ifdef RARCH_INTERNAL
#include "internal_cores.h"
#define GONG_CORE_PREFIX(s) libretro_gong_##s
#else
#define GONG_CORE_PREFIX(s) s
#endif
#define WIDTH 356
#define HEIGHT 200
#define FPS (60000.0f / 1000.0f)
static retro_log_printf_t GONG_CORE_PREFIX(log_cb);
static retro_video_refresh_t GONG_CORE_PREFIX(video_cb);
static retro_input_poll_t GONG_CORE_PREFIX(input_poll_cb);
static retro_input_state_t GONG_CORE_PREFIX(input_state_cb);
static retro_audio_sample_t GONG_CORE_PREFIX(audio_cb);
static retro_audio_sample_batch_t GONG_CORE_PREFIX(audio_batch_cb);
static retro_environment_t GONG_CORE_PREFIX(environ_cb);
static const char *GONG_CORE_PREFIX(valid_extensions) = "gong";
static float player1_py = 0.0f;
static float player1_dpy = 0.0f;
static float player2_py = 0.0f;
static float player2_dpy = 0.0f;
static float player2_speed = 0.0f;
static float ball_px = 0.0f;
static float ball_py = 0.0f;
static float ball_dpx = 0.0f;
static float ball_dpy = 0.0f;
static float ball_speed = 0.0f;
static bool is_initialized = 0;
static unsigned player1_score = 0;
static unsigned player2_score = 0;
static float current_play_points = 0.0f;
static unsigned char *video_buf = NULL;
enum
{
B_MOVE_UP,
B_MOVE_DOWN,
B_SPEED_UP,
B_COUNT /* This should always be in the bottom */
};
typedef struct
{
int half_transition_count;
bool ended_down;
} Game_Button_State;
typedef struct
{
Game_Button_State buttons[B_COUNT];
float last_dt;
} Game_Input;
static Game_Input g_input = {0};
typedef struct
{
/* Pixels are always 32-bit wide, memory order XX BB GG RR */
int width;
int height;
int pitch;
void *memory;
} Game_Offscreen_Buffer;
static Game_Offscreen_Buffer game_buffer = {0};
static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer);
static const struct retro_controller_description pads[] = {
{ "Joypad", RETRO_DEVICE_JOYPAD },
{ NULL, 0 },
};
static const struct retro_controller_info ports[] = {
{ pads, 1 },
{ 0 },
};
struct retro_input_descriptor desc[] = {
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_UP, "D-Pad Up" },
{ 0, RETRO_DEVICE_JOYPAD, 0, RETRO_DEVICE_ID_JOYPAD_DOWN, "D-Pad Down" },
{ 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y, "Left Analog Y" },
{ 0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y, "Right Analog Y" },
{ 0 },
};
static INLINE bool pressed(Game_Button_State state)
{
return state.half_transition_count > 1 ||
(state.half_transition_count == 1 && state.ended_down);
}
static INLINE bool is_down(Game_Button_State state)
{
return state.ended_down;
}
void GONG_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)
{
info->library_name = "gong";
info->library_version = "v1.0";
info->need_fullpath = false;
info->block_extract = false;
info->valid_extensions = GONG_CORE_PREFIX(valid_extensions);
}
void GONG_CORE_PREFIX(retro_get_system_av_info)(struct retro_system_av_info *info)
{
info->geometry.base_width = WIDTH;
info->geometry.base_height = HEIGHT;
info->geometry.max_width = WIDTH;
info->geometry.max_height = HEIGHT;
info->geometry.aspect_ratio = 16.0f / 9.0f;
info->timing.fps = FPS;
info->timing.sample_rate = 44100.0;
}
void GONG_CORE_PREFIX(retro_init)(void)
{
struct retro_log_callback log;
if (GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log))
GONG_CORE_PREFIX(log_cb) = log.log;
else
GONG_CORE_PREFIX(log_cb) = NULL;
video_buf = (unsigned char*)calloc(1, WIDTH * HEIGHT * sizeof(unsigned));
game_buffer.width = WIDTH;
game_buffer.height = HEIGHT;
game_buffer.pitch = WIDTH * sizeof(unsigned);
game_buffer.memory = video_buf;
g_input.last_dt = 1.0f / FPS;
}
void GONG_CORE_PREFIX(retro_deinit)(void)
{
if (video_buf)
free(video_buf);
video_buf = NULL;
game_buffer.memory = NULL;
}
void GONG_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
{
bool no_content = true;
static const struct retro_variable vars[] = {
{ NULL, NULL },
};
GONG_CORE_PREFIX(environ_cb) = cb;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content);
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
cb(RETRO_ENVIRONMENT_SET_CONTROLLER_INFO, (void*)ports);
}
void GONG_CORE_PREFIX(retro_set_video_refresh)(retro_video_refresh_t cb)
{
GONG_CORE_PREFIX(video_cb) = cb;
}
void GONG_CORE_PREFIX(retro_set_audio_sample)(retro_audio_sample_t cb)
{
GONG_CORE_PREFIX(audio_cb) = cb;
}
void GONG_CORE_PREFIX(retro_set_audio_sample_batch)(retro_audio_sample_batch_t cb)
{
GONG_CORE_PREFIX(audio_batch_cb) = cb;
}
void GONG_CORE_PREFIX(retro_set_input_poll)(retro_input_poll_t cb)
{
GONG_CORE_PREFIX(input_poll_cb) = cb;
}
void GONG_CORE_PREFIX(retro_set_input_state)(retro_input_state_t cb)
{
GONG_CORE_PREFIX(input_state_cb) = cb;
}
void GONG_CORE_PREFIX(retro_set_controller_port_device)(unsigned a, unsigned b)
{
}
void GONG_CORE_PREFIX(retro_reset)(void)
{
player1_py = 0.0f;
player1_dpy = 0.0f;
player2_py = 0.0f;
player2_dpy = 0.0f;
player2_speed = 0.0f;
player1_score = 0;
player2_score = 0;
is_initialized = 0;
}
size_t GONG_CORE_PREFIX(retro_serialize_size)(void)
{
return 0;
}
bool GONG_CORE_PREFIX(retro_serialize)(void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
bool GONG_CORE_PREFIX(retro_unserialize)(const void *data, size_t size)
{
(void)data;
(void)size;
return false;
}
void GONG_CORE_PREFIX(retro_cheat_reset)(void)
{
}
void GONG_CORE_PREFIX(retro_cheat_set)(unsigned a, bool b, const char * c)
{
}
bool GONG_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
{
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_XRGB8888;
if (!GONG_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
{
if (GONG_CORE_PREFIX(log_cb))
GONG_CORE_PREFIX(log_cb)(RETRO_LOG_INFO, "XRGB8888 is not supported.\n");
return false;
}
return true;
}
bool GONG_CORE_PREFIX(retro_load_game_special)(unsigned a, const struct retro_game_info *b, size_t c)
{
return false;
}
void GONG_CORE_PREFIX(retro_unload_game)(void)
{
}
unsigned GONG_CORE_PREFIX(retro_get_region)(void)
{
return RETRO_REGION_NTSC;
}
void* GONG_CORE_PREFIX(retro_get_memory_data)(unsigned id)
{
return NULL;
}
size_t GONG_CORE_PREFIX(retro_get_memory_size)(unsigned id)
{
return 0;
}
static void process_joypad(Game_Button_State *new_state, bool is_down)
{
if (new_state->ended_down != is_down)
{
new_state->ended_down = is_down;
new_state->half_transition_count += 1;
}
}
static bool is_key_up_or_down(int16_t input, int16_t not_input, int key)
{
if (input & (1 << key) || not_input & (1 << key))
return true;
return false;
}
void GONG_CORE_PREFIX(retro_run)(void)
{
uint16_t input = 0;
uint16_t not_input = 0;
static uint16_t previnput = 0;
uint16_t realinput = 0;
int i = 0;
int16_t analogYLeft1 = 0;
int16_t analogYRight1 = 0;
GONG_CORE_PREFIX(input_poll_cb)();
for (i = 0; i < 16; i++)
{
if (GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, i))
{
realinput |= 1 << i;
}
}
analogYLeft1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
analogYRight1 = GONG_CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 5000.0f;
if (analogYLeft1 > 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
else if (analogYRight1 > 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN);
if (analogYLeft1 < 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
else if (analogYRight1 < 0)
realinput |= (1 << RETRO_DEVICE_ID_JOYPAD_UP);
input = realinput & ~previnput;
not_input = previnput & ~realinput;
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_UP))
process_joypad(&g_input.buttons[B_MOVE_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_UP));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
process_joypad(&g_input.buttons[B_MOVE_DOWN], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN));
if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_A))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_A));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_B))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_B));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_X))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_X));
else if (is_key_up_or_down(input, not_input, RETRO_DEVICE_ID_JOYPAD_Y))
process_joypad(&g_input.buttons[B_SPEED_UP], realinput & (1 << RETRO_DEVICE_ID_JOYPAD_Y));
previnput = realinput;
game_update_and_render(&g_input, &game_buffer);
GONG_CORE_PREFIX(video_cb)(video_buf, WIDTH, HEIGHT, WIDTH * sizeof(uint32_t));
}
unsigned GONG_CORE_PREFIX(retro_api_version)(void)
{
return RETRO_API_VERSION;
}
static void draw_rect_in_pixels(Game_Offscreen_Buffer *buffer, unsigned color, int min_x, int min_y, int max_x, int max_y)
{
int y;
min_x = MAX(min_x, 0);
min_y = MAX(min_y, 0);
max_x = MIN(max_x, buffer->width);
max_y = MIN(max_y, buffer->height);
for (y = min_y; y < max_y; y++)
{
int x;
for (x = min_x; x < max_x; x++)
{
unsigned *pixel = (unsigned*)((unsigned char*)buffer->memory + ((buffer->width * (buffer->height - y - 1) + x) * sizeof(unsigned)));
*pixel++ = color;
}
}
}
static void clear(Game_Offscreen_Buffer *buffer, unsigned color)
{
draw_rect_in_pixels(buffer, color, 0, 0, buffer->width, buffer->height);
}
static void draw_rect(Game_Offscreen_Buffer *buffer, unsigned color, float x, float y, float half_size_x, float half_size_y)
{
/* @Hardcoded to always keep the playing field area on screen, no matter the aspect ratio */
float scale = .01f;
float relative_axis = (float)buffer->height;
int min_x, min_y, max_x, max_y;
if ((float)buffer->width / (float)buffer->height < 1.77f)
{
relative_axis = (float)buffer->width;
scale = .0056f;
}
half_size_x *= relative_axis * scale;
half_size_y *= relative_axis * scale;
x *= relative_axis * scale;
y *= relative_axis * scale;
x = x + buffer->width / 2;
y = y + buffer->height / 2;
min_x = (unsigned)(x - half_size_x);
min_y = (unsigned)(y - half_size_y);
max_x = (unsigned)(x + half_size_x);
max_y = (unsigned)(y + half_size_y);
draw_rect_in_pixels(buffer, color, min_x, min_y, max_x, max_y);
}
static void draw_number(Game_Offscreen_Buffer *buffer, unsigned number, unsigned color, float x, float y)
{
float at_x = x;
do {
unsigned alg = number % 10;
number /= 10;
switch (alg)
{
case 0:
{
draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
}
case 1:
{
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f);
break;
}
case 2:
{
draw_rect(buffer, color, at_x - 2.f, y - 2.f, .5f, 2.f);
draw_rect(buffer, color, at_x + 2.f, y + 2.f, .5f, 2.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
}
case 3:
{
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
};
case 4:
{
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f);
draw_rect(buffer, color, at_x - 2.f, y+2.5f, .5f, 2.f);
break;
};
case 5:
{
draw_rect(buffer, color, at_x + 2.f, y-2.f, .5f, 2.f);
draw_rect(buffer, color, at_x - 2.f, y+2.f, .5f, 2.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
};
case 6:
{
draw_rect(buffer, color, at_x + 2.f, y-2.f, .5f, 2.f);
draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
};
case 7:
{
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.5f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
break;
};
case 8:
{
draw_rect(buffer, color, at_x - 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
break;
};
case 9:
{
draw_rect(buffer, color, at_x - 2.f, y + 2.f, .5f, 2.f);
draw_rect(buffer, color, at_x + 2.f, y, .5f, 4.f);
draw_rect(buffer, color, at_x, y + 4.f, 2.5f, .5f);
draw_rect(buffer, color, at_x, y, 2.5f, .5f);
draw_rect(buffer, color, at_x, y - 4.f, 2.5f, .5f);
break;
};
default:
break;
}
at_x -= 7.f;
} while(number > 0);
}
static void game_update_and_render(Game_Input *input, Game_Offscreen_Buffer *draw_buffer)
{
const float initial_ball_speed = 80.f;
float playing_field_x = 85.f;
float playing_field_y = 48.f;
float player_size_x = 2.5f;
float player_size_y = 10.f;
if (!is_initialized)
{
is_initialized = 1;
ball_px = 0;
ball_py = 0;
ball_dpx = initial_ball_speed;
ball_dpy = 0;
current_play_points = 10.f;
player2_speed = 80.f;
}
{
float speed = 80.f;
player1_dpy = 0.f;
if (is_down(input->buttons[B_SPEED_UP]))
speed = 150.f;
if (is_down(input->buttons[B_MOVE_UP]))
{
if (player1_py < playing_field_y - player_size_y)
{
player1_dpy = speed;
}
if (player1_py < -playing_field_y + player_size_y)
{
player1_py = -playing_field_y + player_size_y;
player1_dpy = 0.f;
}
}
if (is_down(input->buttons[B_MOVE_DOWN]))
{
if (player1_py > -playing_field_y + player_size_y)
{
player1_dpy = -speed;
}
if (player1_py < -playing_field_y + player_size_y)
{
player1_py = -playing_field_y + player_size_y;
player1_dpy = 0.f;
}
}
player1_py += player1_dpy * input->last_dt;
}
{
player2_dpy = (ball_py - player2_py) * 100.f;
player2_dpy = MIN(player2_dpy, player2_speed);
player2_dpy = MAX(player2_dpy, -player2_speed);
player2_py += player2_dpy * input->last_dt;
if (player2_py < -playing_field_y + player_size_y)
{
player2_py = -playing_field_y + player_size_y;
player2_dpy = 0.f;
}
if (player2_py > playing_field_y - player_size_y)
{
player2_py = playing_field_y - player_size_y;
player2_dpy = 0.f;
}
}
ball_px += ball_dpx * input->last_dt;
if (ball_dpx > 0)
{
ball_dpx += 10.f * input->last_dt;
}
else
{
ball_dpx -= 10.f * input->last_dt;
}
ball_py += ball_dpy * input->last_dt;
if (ball_py > playing_field_y - 1.f)
{
ball_py = playing_field_y - 1.f;
ball_dpy *= -1.f;
}
else if (ball_py < -playing_field_y + 1)
{
ball_py = -playing_field_y + 1.f;
ball_dpy *= -1;
}
if (ball_px > 80.f - 2.5f - 1.f) /* @Hardcoded */
{
if ((ball_py >= (player2_py - 10.f)) && (ball_py <= (player2_py + 10.f)))
{
ball_dpx *= -1.f;
ball_px = 80.f - 2.5f - 1.f; /* @Hardcoded */
ball_dpy = (ball_py - player2_py) + player2_dpy;
++current_play_points;
}
else if (ball_px >= playing_field_x - 1)
{
ball_px = 0;
ball_py = 0;
ball_dpy = 0;
ball_dpx = -initial_ball_speed;
player2_score += (unsigned)current_play_points;
current_play_points = 10.f;
}
}
else if (ball_px < -80 + 2.5f + 1.f) /* @Hardcoded */
{
if ((ball_py >= (player1_py - 10.f)) && (ball_py <= (player1_py + 10.f)))
{
ball_dpx *= -1.f;
ball_px = -80 + 2.5f + 1.f; /* @Hardcoded */
ball_dpy = (ball_py - player1_py) + player1_dpy;
++current_play_points;
}
else if (ball_px <= -playing_field_x + 1)
{
ball_px = 0;
ball_py = 0;
ball_dpy = 0;
ball_dpx = initial_ball_speed;
player1_score += (unsigned)current_play_points;
current_play_points = 10.f;
player2_speed += current_play_points * 0.01f;
}
}
clear(draw_buffer, 0x021077);
draw_rect(draw_buffer, 0x000530, 0.f, 0.f, playing_field_x, playing_field_y);
draw_rect(draw_buffer, 0x00ffff, -80.f, player1_py, player_size_x, player_size_y);
draw_rect(draw_buffer, 0x00ffff, 80.f, player2_py, player_size_x, player_size_y);
draw_rect(draw_buffer, 0xffff00, ball_px, ball_py, 1.f, 1.f);
draw_number(draw_buffer, (unsigned)current_play_points, 0xaaaaaa, 0.f, 38.f);
draw_number(draw_buffer, player1_score, 0xff6611, 20.f, 38.f);
draw_number(draw_buffer, player2_score, 0xff6611, -20.f, 38.f);
}

View File

@ -0,0 +1 @@
#include "../internal_cores.h"

View File

@ -0,0 +1,4 @@
{
global: retro_*;
local: *;
};

View File

@ -275,7 +275,6 @@ static bool imageviewer_load(const char *path, int image_index)
process_new_image = true;
return true;
}
@ -293,7 +292,6 @@ bool IMAGE_CORE_PREFIX(retro_load_game)(const struct retro_game_info *info)
dir_list_sort(file_list, false);
free(dir);
if (!IMAGE_CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_PIXEL_FORMAT, &fmt))
{
if (IMAGE_CORE_PREFIX(log_cb))
@ -312,7 +310,6 @@ bool IMAGE_CORE_PREFIX(retro_load_game_special)(unsigned a, const struct retro_g
return false;
}
void IMAGE_CORE_PREFIX(retro_unload_game)(void)
{
imageviewer_free_image();
@ -335,7 +332,6 @@ size_t IMAGE_CORE_PREFIX(retro_get_memory_size)(unsigned id)
return 0;
}
void IMAGE_CORE_PREFIX(retro_run)(void)
{
bool first_image = false;

View File

@ -103,7 +103,6 @@ else
SHARED := -shared -static-libgcc -static-libstdc++ -s -Wl,--version-script=link.T -Wl,--no-undefined
endif
LDFLAGS += $(LIBM)
ifeq ($(platform), win)
@ -146,4 +145,3 @@ clean:
rm -f $(OBJECTS) $(TARGET)
.PHONY: clean

View File

@ -2,4 +2,3 @@
global: retro_*;
local: *;
};

View File

@ -276,7 +276,6 @@ void NETRETROPAD_CORE_PREFIX(retro_set_environment)(retro_environment_t cb)
enum retro_pixel_format fmt = RETRO_PIXEL_FORMAT_RGB565;
cb(RETRO_ENVIRONMENT_SET_VARIABLES, (void*)vars);
NETRETROPAD_CORE_PREFIX(environ_cb) = cb;
bool no_content = true;
cb(RETRO_ENVIRONMENT_SET_SUPPORT_NO_GAME, &no_content);
@ -379,7 +378,6 @@ void NETRETROPAD_CORE_PREFIX(retro_run)(void)
pixel += 65;
}
NETRETROPAD_CORE_PREFIX(video_cb)(frame_buf, 320, 240, 640);
retro_sleep(4);

View File

@ -144,4 +144,3 @@ clean:
rm -f $(OBJECTS) $(TARGET)
.PHONY: clean

View File

@ -2,4 +2,3 @@
global: retro_*;
local: *;
};

View File

@ -102,7 +102,6 @@ static uint32_t *frame_prev2;
static uint32_t *frame_prev3;
static uint32_t *frame_curr;
// Frametime debug messages
struct timeval ft_prevtime = { 0 }, ft_prevtime2 = { 0 };
char *ft_info = NULL, *ft_info2 = NULL;
@ -660,7 +659,6 @@ void source_v4l2_normal(int width, int height) {
v4l2_frame_times(bufcp);
}
void source_v4l2_alternate_hack(int width, int height) {
struct v4l2_buffer bufcp;
struct v4l2_format fmt;

View File

@ -5,4 +5,3 @@
*startfile:
ctr/3dsx_custom_crt0%O%s crti%O%s crtbegin%O%s

View File

@ -72,4 +72,3 @@ ClrLoop:
bne ClrLoop
bx lr

View File

@ -1,7 +1,6 @@
/* from https://github.com/smealum/ctrulib
* modified to allow reducing __linear_heap_size at runtime */
#include <3ds.h>
#include <stdlib.h>
#include <3ds/util/rbtree.h>
@ -245,7 +244,6 @@ extern "C" u32 ctr_get_linear_unused(void)
return __linear_heap + __linear_heap_size - sLinearPool_maxaddr;
}
extern "C" void ctr_linear_free_pages(u32 pages)
{
if(sLinearPool.last->base + sLinearPool.last->size != (u8*)__linear_heap + __linear_heap_size)

View File

@ -379,7 +379,6 @@ static void do_memchunkhax2(void)
APT_SetAppCpuTimeLimit(mch2.old_cpu_time_limit);
}
static void gspwn(u32 dst, u32 src, u32 size, u8* flush_buffer)
{
extern Handle gspEvents[GSPGPU_EVENT_MAX];

View File

@ -93,7 +93,6 @@ void __attribute__((weak)) __libctru_init(void (*retAddr)(void))
__system_allocateHeaps();
}
Result __sync_fini(void) __attribute__((weak));
extern char** __system_argv;
@ -299,7 +298,6 @@ void wait_for_input(void)
}
}
long sysconf(int name)
{
switch (name)
@ -310,4 +308,3 @@ long sysconf(int name)
return -1;
}

View File

@ -5,14 +5,12 @@
#include "mini-hb-menu/common.h"
extern const loaderFuncs_s loader_Ninjhax1;
extern const loaderFuncs_s loader_Ninjhax2;
extern const loaderFuncs_s loader_Rosalina;
static void (*launch_3dsx)(const char* path, argData_s* args, executableMetadata_s* em);
static int exec_3dsx_actual(const char* path, const char** args, bool appendPath){
struct stat sBuff;
argData_s newProgramArgs;

View File

@ -4,16 +4,13 @@
#include <sys/stat.h>
#include <3ds.h>
#define FILE_CHUNK_SIZE 4096
typedef struct{
u32 argc;
char args[0x300 - 0x4];
}ciaParam;
char argvHmac[0x20] = {0x1d, 0x78, 0xff, 0xb9, 0xc5, 0xbc, 0x78, 0xb7, 0xac, 0x29, 0x1d, 0x3e, 0x16, 0xd0, 0xcf, 0x53, 0xef, 0x12, 0x58, 0x83, 0xb6, 0x9e, 0x2f, 0x79, 0x47, 0xf9, 0x35, 0x61, 0xeb, 0x50, 0xd7, 0x67};

View File

@ -35,7 +35,6 @@ void GPU_SetFloatUniform(GPU_SHADER_TYPE type, u32 startreg, u32* data, u32 numr
GPUCMD_AddWrites(GPUREG_VSH_FLOATUNIFORM_DATA+regOffset, data, numreg*4);
}
//takes PAs as arguments
void GPU_SetViewport(u32* depthBuffer, u32* colorBuffer, u32 x, u32 y, u32 w, u32 h)
{
@ -307,7 +306,6 @@ void GPU_FinishDrawing()
GPUCMD_AddWrite(GPUREG_EARLYDEPTH_CLEAR, 0x00000001);
}
void GPU_Finalize(void)
{
GPUCMD_AddMaskedWrite(GPUREG_PRIMITIVE_CONFIG, 0x8, 0x00000000);

View File

@ -148,7 +148,6 @@ char *bin_to_hex_alloc(const uint8_t *data, size_t len)
return ret;
}
static int database_cursor_iterate(libretrodb_cursor_t *cur,
database_info_t *db_info)
{

View File

@ -129,20 +129,20 @@ public class DiscordRpc
FreeMem();
}
_presence.state = StrToPtr(state, 128);
_presence.details = StrToPtr(details, 128);
_presence.state = StrToPtr(state);
_presence.details = StrToPtr(details);
_presence.startTimestamp = startTimestamp;
_presence.endTimestamp = endTimestamp;
_presence.largeImageKey = StrToPtr(largeImageKey, 32);
_presence.largeImageText = StrToPtr(largeImageText, 128);
_presence.smallImageKey = StrToPtr(smallImageKey, 32);
_presence.smallImageText = StrToPtr(smallImageText, 128);
_presence.partyId = StrToPtr(partyId, 128);
_presence.largeImageKey = StrToPtr(largeImageKey);
_presence.largeImageText = StrToPtr(largeImageText);
_presence.smallImageKey = StrToPtr(smallImageKey);
_presence.smallImageText = StrToPtr(smallImageText);
_presence.partyId = StrToPtr(partyId);
_presence.partySize = partySize;
_presence.partyMax = partyMax;
_presence.matchSecret = StrToPtr(matchSecret, 128);
_presence.joinSecret = StrToPtr(joinSecret, 128);
_presence.spectateSecret = StrToPtr(spectateSecret, 128);
_presence.matchSecret = StrToPtr(matchSecret);
_presence.joinSecret = StrToPtr(joinSecret);
_presence.spectateSecret = StrToPtr(spectateSecret);
_presence.instance = instance;
return _presence;
@ -152,16 +152,18 @@ public class DiscordRpc
/// Returns a pointer to a representation of the given string with a size of maxbytes
/// </summary>
/// <param name="input">String to convert</param>
/// <param name="maxbytes">Max number of bytes to use</param>
/// <returns>Pointer to the UTF-8 representation of <see cref="input"/></returns>
private IntPtr StrToPtr(string input, int maxbytes)
private IntPtr StrToPtr(string input)
{
if (string.IsNullOrEmpty(input)) return IntPtr.Zero;
var convstr = StrClampBytes(input, maxbytes);
var convbytecnt = Encoding.UTF8.GetByteCount(convstr);
var buffer = Marshal.AllocHGlobal(convbytecnt);
var convbytecnt = Encoding.UTF8.GetByteCount(input);
var buffer = Marshal.AllocHGlobal(convbytecnt + 1);
for (int i = 0; i < convbytecnt + 1; i++)
{
Marshal.WriteByte(buffer, i , 0);
}
_buffers.Add(buffer);
Marshal.Copy(Encoding.UTF8.GetBytes(convstr), 0, buffer, convbytecnt);
Marshal.Copy(Encoding.UTF8.GetBytes(input), 0, buffer, convbytecnt);
return buffer;
}
@ -181,30 +183,6 @@ public class DiscordRpc
return Encoding.UTF8.GetString(Encoding.UTF8.GetBytes(str));
}
/// <summary>
/// Clamp the string to the given byte length preserving null termination
/// </summary>
/// <param name="toclamp">string to clamp</param>
/// <param name="maxbytes">max bytes the resulting string should have (including null termination)</param>
/// <returns>null terminated string with a byte length less or equal to <see cref="maxbytes"/></returns>
private static string StrClampBytes(string toclamp, int maxbytes)
{
var str = StrToUtf8NullTerm(toclamp);
var strbytes = Encoding.UTF8.GetBytes(str);
if (strbytes.Length <= maxbytes)
{
return str;
}
var newstrbytes = new byte[] { };
Array.Copy(strbytes, 0, newstrbytes, 0, maxbytes - 1);
newstrbytes[newstrbytes.Length - 1] = 0;
newstrbytes[newstrbytes.Length - 2] = 0;
return Encoding.UTF8.GetString(newstrbytes);
}
/// <summary>
/// Free the allocated memory for conversion to <see cref="RichPresenceStruct"/>
/// </summary>

View File

@ -24,6 +24,16 @@ struct FDiscordUserData {
FString avatar;
};
/**
* Valid response codes for Respond function
*/
UENUM(BlueprintType)
enum class EDiscordJoinResponseCodes : uint8
{
DISCORD_REPLY_NO UMETA(DisplayName="No"),
DISCORD_REPLY_YES UMETA(DisplayName="Yes"),
DISCORD_REPLY_IGNORE UMETA(DisplayName="Ignore")
};
DECLARE_LOG_CATEGORY_EXTERN(Discord, Log, All);

View File

@ -33,9 +33,11 @@ extern "C" DISCORD_EXPORT void Discord_Register(const char* applicationId, const
char exePath[1024];
if (!command || !command[0]) {
if (readlink("/proc/self/exe", exePath, sizeof(exePath)) <= 0) {
ssize_t size = readlink("/proc/self/exe", exePath, sizeof(exePath));
if (size <= 0 || size >= (ssize_t)sizeof(exePath)) {
return;
}
exePath[size] = '\0';
command = exePath;
}

View File

@ -89,10 +89,11 @@ public:
keepRunning.store(true);
ioThread = std::thread([&]() {
const std::chrono::duration<int64_t, std::milli> maxWait{500LL};
Discord_UpdateConnection();
while (keepRunning.load()) {
Discord_UpdateConnection();
std::unique_lock<std::mutex> lock(waitForIOMutex);
waitForIOActivity.wait_for(lock, maxWait);
Discord_UpdateConnection();
}
});
}

2
deps/mbedtls/dhm.c vendored
View File

@ -530,7 +530,7 @@ static int load_file( const char *path, unsigned char **buf, size_t *n )
*n = (size_t) size;
if( *n + 1 == 0 ||
( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL )
( *buf = (unsigned char*)mbedtls_calloc( 1, *n + 1 ) ) == NULL )
{
fclose( f );
return( MBEDTLS_ERR_DHM_ALLOC_FAILED );

4
deps/mbedtls/ecp.c vendored
View File

@ -811,7 +811,7 @@ static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp,
}
#endif
if( ( c = mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL )
if( ( c = (mbedtls_mpi*)mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL )
return( MBEDTLS_ERR_ECP_ALLOC_FAILED );
mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi );
@ -1406,7 +1406,7 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R,
if( T == NULL )
{
T = mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) );
T = (mbedtls_ecp_point*)mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) );
if( T == NULL )
{
ret = MBEDTLS_ERR_ECP_ALLOC_FAILED;

View File

@ -578,7 +578,7 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len )
if( ret < 0 )
{
if( net_would_block( ctx ) != 0 )
if( net_would_block((const mbedtls_net_context*)ctx) != 0 )
return( MBEDTLS_ERR_SSL_WANT_WRITE );
#if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \

9
dirs.c
View File

@ -25,7 +25,6 @@
#include "dirs.h"
#include "command.h"
#include "configuration.h"
#include "command.h"
#include "defaults.h"
#include "list_special.h"
#include "file_path_special.h"
@ -289,6 +288,10 @@ void dir_set(enum rarch_dir_type type, const char *path)
static void check_defaults_dir_create_dir(const char *path)
{
char *new_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
if (!new_path)
return;
new_path[0] = '\0';
fill_pathname_expand_special(new_path,
path,
@ -309,7 +312,11 @@ void dir_check_defaults(void)
/* early return for people with a custom folder setup
so it doesn't create unnecessary directories
*/
#ifdef ORBIS
if (filestream_exists("host0:app/custom.ini"))
#else
if (filestream_exists("custom.ini"))
#endif
return;
for (i = 0; i < DEFAULT_DIR_LAST; i++)

View File

@ -37,25 +37,116 @@
#include "../cheevos/cheevos.h"
#endif
static int FrustrationLevel = 0;
#ifdef HAVE_MENU
#include "../../menu/widgets/menu_input_dialog.h"
#include "../../menu/menu_cbs.h"
#endif
#include <net/net_http.h>
#include "../network/net_http_special.h"
#include "../tasks/tasks_internal.h"
#include <streams/file_stream.h>
#include <file/file_path.h>
#include "../file_path_special.h"
static int64_t start_time = 0;
static int64_t pause_time = 0;
static int64_t ellapsed_time = 0;
static bool discord_ready = false;
static bool discord_avatar_ready = false;
static unsigned discord_status = 0;
struct netplay_room *room;
static char user_id[128];
static char user_name[128];
static char party_name[128];
static char user_avatar[PATH_MAX_LENGTH];
static char cdn_url[] = "https://cdn.discordapp.com/avatars";
DiscordRichPresence discord_presence;
char* discord_get_own_username(void)
{
return user_name;
}
char* discord_get_own_avatar(void)
{
return user_avatar;
}
bool discord_avatar_is_ready(void)
{
/*To-Do: fix-me, prevent lockups in ozone due to unfinished code*/
return false;
}
void discord_avatar_set_ready(bool ready)
{
discord_avatar_ready = ready;
}
bool discord_is_ready(void)
{
return discord_ready;
}
#ifdef HAVE_MENU
static bool discord_download_avatar(
const char* user_id, const char* avatar_id)
{
static char url[PATH_MAX_LENGTH];
static char url_encoded[PATH_MAX_LENGTH];
static char full_path[PATH_MAX_LENGTH];
static char buf[PATH_MAX_LENGTH];
file_transfer_t *transf = NULL;
fill_pathname_application_special(buf,
sizeof(buf),
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS);
fill_pathname_join(full_path, buf, avatar_id, sizeof(full_path));
strlcpy(user_avatar, avatar_id, sizeof(user_avatar));
if(filestream_exists(full_path))
return true;
if (string_is_empty(avatar_id))
return false;
snprintf(url, sizeof(url), "%s/%s/%s.png", cdn_url, user_id, avatar_id);
net_http_urlencode_full(url_encoded, url, sizeof(url_encoded));
snprintf(buf, sizeof(buf), "%s.png", avatar_id);
transf = (file_transfer_t*)calloc(1, sizeof(*transf));
transf->enum_idx = MENU_ENUM_LABEL_CB_DISCORD_AVATAR;
strlcpy(transf->path, buf, sizeof(transf->path));
RARCH_LOG("[Discord] downloading avatar from: %s\n", url_encoded);
task_push_http_transfer(url_encoded, true, NULL, cb_generic_download, transf);
return false;
}
#endif
static void handle_discord_ready(const DiscordUser* connectedUser)
{
strlcpy(user_name, connectedUser->username, sizeof(user_name));
strlcpy(party_name, connectedUser->username, sizeof(user_name));
strlcat(party_name, "|", sizeof(party_name));
strlcat(party_name, connectedUser->discriminator, sizeof(party_name));
RARCH_LOG("[Discord] connected to user: %s#%s - avatar id: %s\n",
connectedUser->username,
connectedUser->discriminator,
connectedUser->userId);
#ifdef HAVE_MENU
discord_download_avatar(connectedUser->userId, connectedUser->avatar);
#endif
}
static void handle_discord_disconnected(int errcode, const char* message)
@ -68,24 +159,71 @@ static void handle_discord_error(int errcode, const char* message)
RARCH_LOG("[Discord] error (%d: %s)\n", errcode, message);
}
static void handle_discord_join_cb(void *task_data, void *user_data, const char *err)
{
struct netplay_room *room;
char tmp_hostname[32];
http_transfer_data_t *data = (http_transfer_data_t*)task_data;
if (!data || err)
goto finish;
data->data = (char*)realloc(data->data, data->len + 1);
data->data[data->len] = '\0';
netplay_rooms_parse(data->data);
room = netplay_room_get(0);
if (room)
{
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
deinit_netplay();
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL);
snprintf(tmp_hostname, sizeof(tmp_hostname), "%s|%d",
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address,
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port);
RARCH_LOG("[Discord] joining lobby at: %s\n", tmp_hostname);
task_push_netplay_crc_scan(room->gamecrc,
room->gamename, tmp_hostname, room->corename, room->subsystem_name);
}
finish:
if (err)
RARCH_ERR("%s: %s\n", msg_hash_to_str(MSG_DOWNLOAD_FAILED), err);
if (data)
{
if (data->data)
free(data->data);
free(data);
}
if (user_data)
free(user_data);
}
static void handle_discord_join(const char* secret)
{
RARCH_LOG("[Discord] join (%s)\n", secret);
char url [2048] = "http://lobby.libretro.com/";
char tmp_hostname[32];
static struct string_list *list = NULL;
RARCH_LOG("[Discord] join secret: (%s)\n", secret);
list = string_split(secret, "|");
char tmp_hostname[32];
strlcat(url, list->elems[0].data, sizeof(url));
strlcat(url, "/", sizeof(url));
RARCH_LOG("[Discord] querying lobby id: %s at %s\n", list->elems[0].data, url);
snprintf(tmp_hostname,
sizeof(tmp_hostname),
"%s|%s", list->elems[0].data, list->elems[1].data);
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
deinit_netplay();
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL);
task_push_netplay_crc_scan(atoi(list->elems[3].data),
list->elems[2].data,
tmp_hostname, list->elems[4].data);
task_push_http_transfer(url, true, NULL, handle_discord_join_cb, NULL);
}
static void handle_discord_spectate(const char* secret)
@ -93,14 +231,54 @@ static void handle_discord_spectate(const char* secret)
RARCH_LOG("[Discord] spectate (%s)\n", secret);
}
static void handle_discord_join_response(void *ignore, const char *line)
{
/* To-Do: needs in-game widgets
if (strstr(line, "yes"))
Discord_Respond(user_id, DISCORD_REPLY_YES);
#ifdef HAVE_MENU
menu_input_dialog_end();
rarch_menu_running_finished();
#endif
*/
}
static void handle_discord_join_request(const DiscordUser* request)
{
int response = -1;
char yn[4];
RARCH_LOG("[Discord] join request from %s#%s - %s\n",
static char url[PATH_MAX_LENGTH];
static char url_encoded[PATH_MAX_LENGTH];
static char filename[PATH_MAX_LENGTH];
char buf[PATH_MAX_LENGTH];
#ifdef HAVE_MENU
menu_input_ctx_line_t line;
#endif
RARCH_LOG("[Discord] join request from %s#%s - %s %s\n",
request->username,
request->discriminator,
request->userId);
request->userId,
request->avatar);
#ifdef HAVE_MENU
discord_download_avatar(request->userId, request->avatar);
/* To-Do: needs in-game widgets
rarch_menu_running();
*/
memset(&line, 0, sizeof(line));
snprintf(buf, sizeof(buf), "%s %s?", msg_hash_to_str(MSG_DISCORD_CONNECTION_REQUEST), request->username);
line.label = buf;
line.label_setting = "no_setting";
line.cb = handle_discord_join_response;
/* To-Do: needs in-game widgets
To-Do: bespoke dialog, should show while in-game and have a hotkey to accept
To-Do: show avatar of the user connecting
if (!menu_input_dialog_start(&line))
return;
*/
#endif
}
void discord_update(enum discord_presence presence)
@ -121,8 +299,8 @@ void discord_update(enum discord_presence presence)
switch (presence)
{
case DISCORD_PRESENCE_MENU:
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU);
discord_presence.largeImageKey = "base";
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU);
discord_presence.largeImageKey = "base";
discord_presence.largeImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NO_CORE);
discord_presence.instance = 0;
break;
@ -137,9 +315,9 @@ void discord_update(enum discord_presence presence)
case DISCORD_PRESENCE_GAME:
if (core_info)
{
const char *system_id = core_info->system_id ? core_info->system_id : "core";
char *label = NULL;
const char *system_id = core_info->system_id
? core_info->system_id : "core";
char *label = NULL;
playlist_t *current_playlist = playlist_get_cached();
if (current_playlist)
@ -164,13 +342,13 @@ void discord_update(enum discord_presence presence)
pause_time = 0;
ellapsed_time = 0;
discord_presence.smallImageKey = "playing";
discord_presence.smallImageKey = "playing";
discord_presence.smallImageText = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING);
discord_presence.startTimestamp = start_time;
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME);
discord_presence.details = msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME);
discord_presence.state = label;
discord_presence.instance = 0;
discord_presence.state = label;
discord_presence.instance = 0;
}
break;
case DISCORD_PRESENCE_NETPLAY_HOSTING:
@ -183,19 +361,18 @@ void discord_update(enum discord_presence presence)
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address,
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port);
char party_id[128];
snprintf(party_id, sizeof(party_id), "%d|%s", room->id, room->nickname);
char join_secret[128];
snprintf(join_secret, sizeof(join_secret), "%s|%d|%s|%u|%s",
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_address : room->address,
room->host_method == NETPLAY_HOST_METHOD_MITM ? room->mitm_port : room->port,
room->gamename, room->gamecrc, room->corename);
RARCH_LOG("%s\n", join_secret);
discord_presence.joinSecret = strdup(join_secret);
discord_presence.spectateSecret = "SPECSPECSPEC";
discord_presence.partyId = party_id;
discord_presence.partyMax = 0;
discord_presence.partySize = 0;
{
char join_secret[128];
snprintf(join_secret, sizeof(join_secret), "%d|%s", room->id, room->nickname);
discord_presence.joinSecret = strdup(join_secret);
/* discord_presence.spectateSecret = "SPECSPECSPEC"; */
discord_presence.partyId = strdup(party_name);
discord_presence.partyMax = 0;
discord_presence.partySize = 0;
RARCH_LOG("[Discord] join secret: %s\n", join_secret);
RARCH_LOG("[Discord] party id: %s\n", party_name);
}
break;
case DISCORD_PRESENCE_NETPLAY_HOSTING_STOPPED:
case DISCORD_PRESENCE_NETPLAY_CLIENT:
@ -212,7 +389,9 @@ void discord_update(enum discord_presence presence)
void discord_init(void)
{
char command[PATH_MAX_LENGTH];
settings_t *settings = config_get_ptr();
DiscordEventHandlers handlers;
RARCH_LOG("[Discord] initializing ..\n");
@ -226,13 +405,13 @@ void discord_init(void)
handlers.spectateGame = handle_discord_spectate;
handlers.joinRequest = handle_discord_join_request;
/* To-Do: Add the arguments RetroArch was started with to the register URI*/
const char command[256] = "retroarch";
Discord_Initialize(settings->arrays.discord_app_id, &handlers, 0, NULL);
Discord_Register(settings->arrays.discord_app_id, NULL);
discord_ready = true;
strlcpy(command, get_retroarch_launch_arguments(), sizeof(command));
RARCH_LOG("[Discord] registering startup command: %s\n", command);
Discord_Register(settings->arrays.discord_app_id, command);
discord_ready = true;
}
void discord_shutdown(void)
@ -243,7 +422,7 @@ void discord_shutdown(void)
discord_ready = false;
}
void discord_run_callbacks()
void discord_run_callbacks(void)
{
Discord_RunCallbacks();
}
}

View File

@ -55,4 +55,14 @@ void discord_update(enum discord_presence presence);
void discord_run_callbacks();
bool discord_is_ready();
void discord_avatar_set_ready(bool ready);
bool discord_avatar_is_ready();
char* discord_get_own_username(void);
char* discord_get_own_avatar(void);
#endif /* __RARCH_DISCORD_H */

View File

@ -192,4 +192,3 @@ fi
for core in $cores; do
buildCore $core
done

View File

@ -35,6 +35,7 @@
#include "wifi/wifi_driver.h"
#include "led/led_driver.h"
#include "midi/midi_driver.h"
#include "command.h"
#include "configuration.h"
#include "core_info.h"
#include "driver.h"
@ -385,6 +386,10 @@ void drivers_init(int flags)
if (flags & DRIVER_MENU_MASK)
menu_driver_init(video_is_threaded);
}
#else
/* Qt uses core info, even if the menu is disabled */
command_event(CMD_EVENT_CORE_INFO_INIT, NULL);
command_event(CMD_EVENT_LOAD_CORE_PERSIST, NULL);
#endif
if (flags & (DRIVER_VIDEO_MASK | DRIVER_AUDIO_MASK))
@ -403,7 +408,6 @@ void drivers_init(int flags)
midi_driver_init();
}
/**
* uninit_drivers:
* @flags : Bitmask of drivers to deinitialize.

View File

@ -108,10 +108,18 @@ static dylib_t lib_handle;
#define SYMBOL_VIDEOPROCESSOR(x) current_core->x = libretro_videoprocessor_##x
#endif
#ifdef HAVE_EASTEREGG
#define SYMBOL_GONG(x) current_core->x = libretro_gong_##x
#endif
static bool ignore_environment_cb = false;
static bool core_set_shared_context = false;
static bool *load_no_content_hook = NULL;
struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS];
struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS];
unsigned subsystem_current_count;
const struct retro_subsystem_info *libretro_find_subsystem_info(
const struct retro_subsystem_info *info, unsigned num_info,
const char *ident)
@ -173,7 +181,6 @@ void libretro_free_system_info(struct retro_system_info *info)
memset(info, 0, sizeof(*info));
}
static bool environ_cb_get_system_info(unsigned cmd, void *data)
{
rarch_system_info_t *system = runloop_get_system_info();
@ -236,7 +243,6 @@ static bool environ_cb_get_system_info(unsigned cmd, void *data)
subsystem_data[i].roms = subsystem_data_roms[i];
}
subsystem_current_count = size <= SUBSYSTEM_MAX_SUBSYSTEMS ? size : SUBSYSTEM_MAX_SUBSYSTEMS;
#if 0
RARCH_LOG("Subsystems: %d\n", subsystem_current_count);
@ -777,6 +783,43 @@ bool init_libretro_sym_custom(enum rarch_core_type type, struct retro_core_t *cu
SYMBOL_VIDEOPROCESSOR(retro_get_region);
SYMBOL_VIDEOPROCESSOR(retro_get_memory_data);
SYMBOL_VIDEOPROCESSOR(retro_get_memory_size);
#endif
break;
case CORE_TYPE_GONG:
#ifdef HAVE_EASTEREGG
SYMBOL_GONG(retro_init);
SYMBOL_GONG(retro_deinit);
SYMBOL_GONG(retro_api_version);
SYMBOL_GONG(retro_get_system_info);
SYMBOL_GONG(retro_get_system_av_info);
SYMBOL_GONG(retro_set_environment);
SYMBOL_GONG(retro_set_video_refresh);
SYMBOL_GONG(retro_set_audio_sample);
SYMBOL_GONG(retro_set_audio_sample_batch);
SYMBOL_GONG(retro_set_input_poll);
SYMBOL_GONG(retro_set_input_state);
SYMBOL_GONG(retro_set_controller_port_device);
SYMBOL_GONG(retro_reset);
SYMBOL_GONG(retro_run);
SYMBOL_GONG(retro_serialize_size);
SYMBOL_GONG(retro_serialize);
SYMBOL_GONG(retro_unserialize);
SYMBOL_GONG(retro_cheat_reset);
SYMBOL_GONG(retro_cheat_set);
SYMBOL_GONG(retro_load_game);
SYMBOL_GONG(retro_load_game_special);
SYMBOL_GONG(retro_unload_game);
SYMBOL_GONG(retro_get_region);
SYMBOL_GONG(retro_get_memory_data);
SYMBOL_GONG(retro_get_memory_size);
#endif
break;
}
@ -1884,9 +1927,10 @@ bool rarch_environment_cb(unsigned cmd, void *data)
case RETRO_ENVIRONMENT_GET_VFS_INTERFACE:
{
const uint32_t supported_vfs_version = 1;
const uint32_t supported_vfs_version = 3;
static struct retro_vfs_interface vfs_iface =
{
{
/* VFS API v1 */
retro_vfs_file_get_path_impl,
retro_vfs_file_open_impl,
retro_vfs_file_close_impl,
@ -1896,15 +1940,32 @@ bool rarch_environment_cb(unsigned cmd, void *data)
retro_vfs_file_read_impl,
retro_vfs_file_write_impl,
retro_vfs_file_flush_impl,
retro_vfs_file_remove_impl
retro_vfs_file_remove_impl,
retro_vfs_file_rename_impl,
/* VFS API v2 */
retro_vfs_file_truncate_impl,
/* VFS API v3 */
retro_vfs_stat_impl,
retro_vfs_mkdir_impl,
retro_vfs_opendir_impl,
retro_vfs_readdir_impl,
retro_vfs_dirent_get_name_impl,
retro_vfs_dirent_is_dir_impl,
retro_vfs_closedir_impl
};
struct retro_vfs_interface_info *vfs_iface_info = (struct retro_vfs_interface_info *) data;
if (vfs_iface_info->required_interface_version <= supported_vfs_version)
{
RARCH_LOG("Core requested VFS version >= v%d, providing v%d\n", vfs_iface_info->required_interface_version, supported_vfs_version);
vfs_iface_info->required_interface_version = supported_vfs_version;
vfs_iface_info->iface = &vfs_iface;
}
else
{
RARCH_WARN("Core requested VFS version v%d which is higher than what we support (v%d)\n", vfs_iface_info->required_interface_version, supported_vfs_version);
return false;
}
break;
}

View File

@ -151,11 +151,10 @@ void uninit_libretro_sym(struct retro_core_t *core);
/* Arbitrary 10 roms for each subsystem limit */
#define SUBSYSTEM_MAX_SUBSYSTEM_ROMS 10
struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS];
struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS];
unsigned subsystem_current_count;
extern struct retro_subsystem_info subsystem_data[SUBSYSTEM_MAX_SUBSYSTEMS];
extern struct retro_subsystem_rom_info subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS][SUBSYSTEM_MAX_SUBSYSTEM_ROMS];
extern unsigned subsystem_current_count;
RETRO_END_DECLS
#endif

View File

@ -338,6 +338,31 @@ void fill_pathname_application_special(char *s,
}
#endif
break;
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_DISCORD_AVATARS:
{
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
settings_t *settings = config_get_ptr();
s1[0] = s2[0] = '\0';
fill_pathname_join(s1,
settings->paths.directory_thumbnails,
"discord",
len);
fill_pathname_join(s2,
s1, "avatars",
PATH_MAX_LENGTH * sizeof(char)
);
fill_pathname_slash(s2,
PATH_MAX_LENGTH * sizeof(char)
);
strlcpy(s, s2, len);
free(s1);
free(s2);
}
break;
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES:
{
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));

Some files were not shown because too many files have changed in this diff Show More