mirror of
https://github.com/libretro/RetroArch
synced 2025-02-09 00:40:09 +00:00
commit
e86b873c1b
21
.travis.yml
21
.travis.yml
@ -34,6 +34,8 @@ matrix:
|
||||
env: DISABLE_MENU=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_OVERLAY=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: DISABLE_CDROM=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
env: ENABLE_GLES=1 CC=gcc-8 CXX=g++-8
|
||||
- compiler: gcc
|
||||
@ -61,6 +63,21 @@ matrix:
|
||||
script: bash travis_metal_deploy.sh
|
||||
on:
|
||||
branch: master
|
||||
- language: android
|
||||
# Android builds are only supported on Trusty
|
||||
dist: trusty
|
||||
android:
|
||||
components:
|
||||
- tools
|
||||
- build-tools-28.0.3
|
||||
- android-28
|
||||
install:
|
||||
- echo y | sdkmanager "ndk-bundle"
|
||||
before_script:
|
||||
- export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
|
||||
script:
|
||||
- cd pkg/android/phoenix
|
||||
- ./gradlew assembleNormalRelease
|
||||
|
||||
before_install:
|
||||
- |
|
||||
@ -89,6 +106,10 @@ script:
|
||||
if [ -n "$DISABLE_OVERLAY" ]; then
|
||||
ARGS="$ARGS --disable-overlay"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$DISABLE_CDROM" ]; then
|
||||
ARGS="$ARGS --disable-cdrom"
|
||||
fi
|
||||
- |
|
||||
if [ -n "$ENABLE_GLES" ]; then
|
||||
ARGS="$ARGS --enable-opengles"
|
||||
|
1109
CHANGES.md
1109
CHANGES.md
File diff suppressed because it is too large
Load Diff
6
Makefile
6
Makefile
@ -1,6 +1,6 @@
|
||||
HAVE_FILE_LOGGER=1
|
||||
HAVE_CC_RESAMPLER=1
|
||||
NEED_CXX_LINKER=0
|
||||
NEED_GOLD_LINKER=0
|
||||
MISSING_DECLS =0
|
||||
|
||||
ifneq ($(C90_BUILD),)
|
||||
@ -25,6 +25,10 @@ DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(NEED_GOLD_LINKER), 1)
|
||||
LDFLAGS += -fuse-ld=gold
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
CFLAGS ?= -O0 -g
|
||||
|
@ -68,7 +68,6 @@ retroarch:
|
||||
|
||||
@echo "*********************************************************************"
|
||||
@echo "*** Classic ARM7 Cortex A7 build and packages built successfully! ***"
|
||||
@echo "****************** Winner, Winner, Chicken Dinner! ******************"
|
||||
@echo "*********************************************************************"
|
||||
clean:
|
||||
rm -rf obj-unix
|
||||
|
342
Makefile.common
342
Makefile.common
@ -39,10 +39,6 @@ ifeq ($(HAVE_SOCKET_LEGACY), 1)
|
||||
DEFINES += -DHAVE_SOCKET_LEGACY
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HID), 1)
|
||||
DEFINES += -DHAVE_HID
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBRETRODB), 1)
|
||||
DEFINES += -DHAVE_LIBRETRODB
|
||||
endif
|
||||
@ -64,11 +60,11 @@ ifeq ($(HAVE_PRESERVE_DYLIB),1)
|
||||
endif
|
||||
|
||||
ifeq ($(GL_DEBUG), 1)
|
||||
DEF_FLAGS += -DGL_DEBUG
|
||||
DEFINES += -DGL_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(VULKAN_DEBUG), 1)
|
||||
DEF_FLAGS += -DVULKAN_DEBUG
|
||||
DEFINES += -DVULKAN_DEBUG
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FLOATHARD), 1)
|
||||
@ -86,23 +82,22 @@ ifeq ($(TDM_GCC),)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_FILE_LOGGER), 1)
|
||||
DEF_FLAGS += -DHAVE_FILE_LOGGER
|
||||
DEFINES += -DHAVE_FILE_LOGGER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SHADERPIPELINE), 1)
|
||||
DEF_FLAGS += -DHAVE_SHADERPIPELINE
|
||||
DEFINES += -DHAVE_SHADERPIPELINE
|
||||
endif
|
||||
|
||||
DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR)
|
||||
INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include -I$(DEPS_DIR)
|
||||
|
||||
# Switches
|
||||
#
|
||||
ifeq ($(HAVE_NETPLAYDISCOVERY), 1)
|
||||
DEF_FLAGS += -DHAVE_NETPLAYDISCOVERY
|
||||
DEFINES += -DHAVE_NETPLAYDISCOVERY
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETLOGGER), 1)
|
||||
DEF_FLAGS += -DHAVE_LOGGER
|
||||
DEFINES += -DHAVE_LOGGER
|
||||
OBJ += network/net_logger.o
|
||||
endif
|
||||
@ -153,14 +148,14 @@ ifneq ($(GIT_VERSION),)
|
||||
endif
|
||||
|
||||
# General object files
|
||||
DEFINES += -DHAVE_DR_MP3
|
||||
DEF_FLAGS += -DHAVE_DR_MP3
|
||||
ifeq ($(HAVE_DR_MP3), 1)
|
||||
DEFINES += -DHAVE_DR_MP3
|
||||
endif
|
||||
|
||||
OBJ += frontend/frontend_driver.o \
|
||||
frontend/drivers/platform_null.o \
|
||||
retroarch.o \
|
||||
paths.o \
|
||||
command.o \
|
||||
msg_hash.o \
|
||||
intl/msg_hash_us.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/task_queue.o \
|
||||
@ -201,8 +196,11 @@ else ifneq ($(findstring Darwin,$(OS)),)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_orbis)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/file/nbio/nbio_orbis.o
|
||||
endif
|
||||
|
||||
OBJ += \
|
||||
$(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 \
|
||||
@ -236,7 +234,6 @@ OBJ += \
|
||||
tasks/task_screenshot.o \
|
||||
tasks/task_powerstate.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \
|
||||
gfx/video_shader_parse.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \
|
||||
$(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \
|
||||
@ -262,15 +259,15 @@ OBJ += \
|
||||
$(LIBRETRO_COMM_DIR)/features/features_cpu.o \
|
||||
performance_counters.o \
|
||||
verbosity.o \
|
||||
midi/drivers/null_midi.o
|
||||
midi/drivers/null_midi.o \
|
||||
$(LIBRETRO_COMM_DIR)/playlists/label_sanitization.o
|
||||
|
||||
|
||||
ifeq ($(HAVE_AUDIOMIXER), 1)
|
||||
DEFINES += -DHAVE_AUDIOMIXER
|
||||
OBJ += \
|
||||
tasks/task_audio_mixer.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mix.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o
|
||||
DEFINES += -DHAVE_AUDIOMIXER
|
||||
OBJ += tasks/task_audio_mixer.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mix.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
@ -282,11 +279,15 @@ endif
|
||||
ifeq ($(HAVE_CC_RESAMPLER), 1)
|
||||
DEFINES += -DHAVE_CC_RESAMPLER
|
||||
OBJ += audio/drivers_resampler/cc_resampler.o
|
||||
|
||||
ifeq ($(HAVE_NEON),1)
|
||||
OBJ += audio/drivers_resampler/cc_resampler_neon.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LANGEXTRA), 1)
|
||||
DEFINES += -DHAVE_LANGEXTRA
|
||||
DEFINES += -finput-charset=UTF-8
|
||||
DEF_FLAGS += -finput-charset=UTF-8
|
||||
|
||||
OBJ += intl/msg_hash_de.o \
|
||||
intl/msg_hash_eo.o \
|
||||
@ -327,10 +328,27 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
OBJ += cores/libretro-imageviewer/image_core.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
HAVE_HLSL = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_GLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
ifeq ($(HAVE_SLANG), 1)
|
||||
HAVE_SHADERS_COMMON = 1
|
||||
endif
|
||||
|
||||
# Qt WIMP GUI
|
||||
|
||||
ifeq ($(HAVE_OPENSSL), 1)
|
||||
DEFINES += $(OPENSSL_CFLAGS)
|
||||
DEF_FLAGS += $(OPENSSL_CFLAGS)
|
||||
LIBS += $(OPENSSL_LIBS)
|
||||
endif
|
||||
|
||||
@ -342,7 +360,6 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/ui_qt_load_core_window.o \
|
||||
ui/drivers/qt/ui_qt_msg_window.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 \
|
||||
@ -353,17 +370,16 @@ ifeq ($(HAVE_QT), 1)
|
||||
ui/drivers/qt/thumbnaildownload.o \
|
||||
ui/drivers/qt/thumbnailpackdownload.o \
|
||||
ui/drivers/qt/playlistthumbnaildownload.o
|
||||
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
||||
OBJ += ui/drivers/qt/shaderparamsdialog.o
|
||||
endif
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
OBJ += ui/drivers/qt/settingswidgets.o \
|
||||
ui/drivers/qt/options/achievements.o \
|
||||
ui/drivers/qt/options/audio.o \
|
||||
ui/drivers/qt/options/configuration.o \
|
||||
ui/drivers/qt/options/core.o \
|
||||
ui/drivers/qt/options/directory.o \
|
||||
ui/drivers/qt/options/drivers.o \
|
||||
ui/drivers/qt/options/generic.o \
|
||||
ui/drivers/qt/options/input.o \
|
||||
ui/drivers/qt/options/latency.o \
|
||||
ui/drivers/qt/options/logging.o \
|
||||
ui/drivers/qt/options/network.o \
|
||||
ui/drivers/qt/options/osd.o \
|
||||
ui/drivers/qt/options/playlists.o \
|
||||
@ -378,25 +394,28 @@ ifeq ($(HAVE_QT), 1)
|
||||
MOC_HEADERS += ui/drivers/ui_qt.h \
|
||||
ui/drivers/qt/ui_qt_load_core_window.h \
|
||||
ui/drivers/qt/gridview.h \
|
||||
ui/drivers/qt/shaderparamsdialog.h \
|
||||
ui/drivers/qt/coreoptionsdialog.h \
|
||||
ui/drivers/qt/filedropwidget.h \
|
||||
ui/drivers/qt/coreinfodialog.h \
|
||||
ui/drivers/qt/playlistentrydialog.h \
|
||||
ui/drivers/qt/viewoptionsdialog.h
|
||||
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
||||
MOC_HEADERS += ui/drivers/qt/shaderparamsdialog.h
|
||||
endif
|
||||
ifeq ($(HAVE_MENU), 1)
|
||||
MOC_HEADERS += ui/drivers/qt/settingswidgets.h \
|
||||
ui/drivers/qt/options/options.h
|
||||
endif
|
||||
|
||||
DEFINES += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS) -DHAVE_MAIN
|
||||
#DEFINES += $(QT5WEBENGINE_CFLAGS)
|
||||
DEFINES += -DHAVE_MAIN
|
||||
DEF_FLAGS += $(QT5CORE_CFLAGS) $(QT5GUI_CFLAGS) $(QT5WIDGETS_CFLAGS) $(QT5CONCURRENT_CFLAGS) $(QT5NETWORK_CFLAGS)
|
||||
#DEF_FLAGS += $(QT5WEBENGINE_CFLAGS)
|
||||
LIBS += $(QT5CORE_LIBS) $(QT5GUI_LIBS) $(QT5WIDGETS_LIBS) $(QT5CONCURRENT_LIBS) $(QT5NETWORK_LIBS)
|
||||
#LIBS += $(QT5WEBENGINE_LIBS)
|
||||
NEED_CXX_LINKER = 1
|
||||
|
||||
ifneq ($(findstring Linux,$(OS)),)
|
||||
DEFINES += -fPIC
|
||||
DEF_FLAGS += -fPIC
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -585,7 +604,7 @@ ifeq ($(HAVE_ALSA), 1)
|
||||
endif
|
||||
|
||||
LIBS += $(ALSA_LIBS)
|
||||
DEFINES += $(ALSA_CFLAGS)
|
||||
DEF_FLAGS += $(ALSA_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_TINYALSA), 1)
|
||||
@ -596,7 +615,7 @@ endif
|
||||
ifeq ($(HAVE_ROAR), 1)
|
||||
OBJ += audio/drivers/roar.o
|
||||
LIBS += $(ROAR_LIBS)
|
||||
DEFINES += $(ROAR_CFLAGS)
|
||||
DEF_FLAGS += $(ROAR_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_AL), 1)
|
||||
@ -615,13 +634,13 @@ endif
|
||||
ifeq ($(HAVE_JACK),1)
|
||||
OBJ += audio/drivers/jack.o
|
||||
LIBS += $(JACK_LIBS)
|
||||
DEFINES += $(JACK_CFLAGS)
|
||||
DEF_FLAGS += $(JACK_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_PULSE), 1)
|
||||
OBJ += audio/drivers/pulse.o
|
||||
LIBS += $(PULSE_LIBS)
|
||||
DEFINES += $(PULSE_CFLAGS)
|
||||
DEF_FLAGS += $(PULSE_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OSS_LIB), 1)
|
||||
@ -630,7 +649,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_RSOUND), 1)
|
||||
OBJ += audio/drivers/rsound.o
|
||||
DEFINES += $(RSOUND_CFLAGS)
|
||||
DEF_FLAGS += $(RSOUND_CFLAGS)
|
||||
LIBS += $(RSOUND_LIBS)
|
||||
endif
|
||||
|
||||
@ -642,6 +661,7 @@ ifeq ($(HAVE_DSOUND), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WASAPI), 1)
|
||||
HAVE_MMDEVAPI = 1
|
||||
OBJ += audio/drivers/wasapi.o
|
||||
DEFINES += -DHAVE_WASAPI
|
||||
LIBS += -lole32 -lksuser
|
||||
@ -653,6 +673,10 @@ ifeq ($(HAVE_XAUDIO), 1)
|
||||
LIBS += -lole32
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MMDEVAPI), 1)
|
||||
OBJ += audio/common/mmdevice_common.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_WINMM), 1)
|
||||
OBJ += midi/drivers/winmm_midi.o
|
||||
DEFINES += -DHAVE_WINMM
|
||||
@ -663,7 +687,6 @@ endif
|
||||
|
||||
ifeq ($(HAVE_NEON),1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler_neon.o \
|
||||
audio/drivers_resampler/cc_resampler_neon.o \
|
||||
memory/neon/memcpy-neon.o
|
||||
|
||||
DEFINES += -DHAVE_NEON
|
||||
@ -770,14 +793,16 @@ ifeq ($(HAVE_LAKKA_SWITCH), 1)
|
||||
DEFINES += -DHAVE_LAKKA_SWITCH
|
||||
endif
|
||||
|
||||
OBJ += menu/menu_shader.o
|
||||
# Does not depend on HAVE_MENU
|
||||
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
||||
OBJ += menu/menu_shader.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/menu_driver.o \
|
||||
menu/menu_content.o \
|
||||
menu/menu_entries.o \
|
||||
menu/menu_setting.o \
|
||||
menu/menu_networking.o \
|
||||
menu/widgets/menu_filebrowser.o \
|
||||
menu/widgets/menu_dialog.o \
|
||||
menu/widgets/menu_input_dialog.o \
|
||||
@ -805,11 +830,8 @@ ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
menu/menu_animation.o \
|
||||
menu/drivers/menu_generic.o \
|
||||
menu/drivers/null.o \
|
||||
menu/menu_thumbnail_path.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON),1)
|
||||
OBJ += menu/drivers_display/menu_display_null.o
|
||||
endif
|
||||
menu/menu_thumbnail_path.o \
|
||||
menu/drivers_display/menu_display_null.o
|
||||
|
||||
ifeq ($(HAVE_MENU_WIDGETS), 1)
|
||||
OBJ += menu/widgets/menu_widgets.o
|
||||
@ -819,7 +841,7 @@ endif
|
||||
ifeq ($(HAVE_OVERLAY), 1)
|
||||
DEFINES += -DHAVE_OVERLAY
|
||||
OBJ += tasks/task_overlay.o \
|
||||
led/drivers/led_overlay.o
|
||||
led/drivers/led_overlay.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIDEO_LAYOUT), 1)
|
||||
@ -842,12 +864,11 @@ endif
|
||||
ifeq ($(HAVE_FREETYPE), 1)
|
||||
OBJ += gfx/drivers_font_renderer/freetype.o
|
||||
LIBS += $(FREETYPE_LIBS)
|
||||
DEFINES += $(FREETYPE_CFLAGS)
|
||||
DEF_FLAGS += $(FREETYPE_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.o \
|
||||
$(LIBRETRO_COMM_DIR)/rthreads/rsemaphore.o \
|
||||
gfx/video_thread_wrapper.o \
|
||||
audio/audio_thread_wrapper.o
|
||||
DEFINES += -DHAVE_THREADS
|
||||
@ -881,7 +902,7 @@ ifeq ($(HAVE_VITA2D), 1)
|
||||
OBJ += gfx/drivers/vita2d_gfx.o \
|
||||
gfx/drivers_font/vita2d_font.o
|
||||
|
||||
DEF_FLAGS += -I$(DEPS_DIR)/libvita2d/include
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/libvita2d/include
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_3ds)
|
||||
@ -891,6 +912,45 @@ ifeq ($(TARGET), retroarch_3ds)
|
||||
input/drivers_joypad/ctr_joypad.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_orbis)
|
||||
OBJ += input/drivers/ps4_input.o \
|
||||
input/drivers_joypad/ps4_joypad.o \
|
||||
audio/drivers/psp_audio.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_vita)
|
||||
OBJ += input/drivers/psp_input.o \
|
||||
input/drivers_joypad/psp_joypad.o \
|
||||
audio/drivers/psp_audio.o \
|
||||
frontend/drivers/platform_psp.o
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_wiiu)
|
||||
OBJ += gfx/drivers/gx2_gfx.o \
|
||||
gfx/drivers_font/wiiu_font.o \
|
||||
menu/drivers_display/menu_display_wiiu.o \
|
||||
input/drivers/wiiu_input.o \
|
||||
input/drivers_joypad/wiiu_joypad.o \
|
||||
input/drivers_joypad/wiiu/wpad_driver.o \
|
||||
input/drivers_joypad/wiiu/kpad_driver.o \
|
||||
input/drivers_joypad/wiiu/pad_functions.o \
|
||||
audio/drivers/wiiu_audio.o \
|
||||
frontend/drivers/platform_wiiu.o
|
||||
|
||||
ifeq ($(WIIU_HID),1)
|
||||
DEFINES += -DWIIU_HID
|
||||
INCLUDE_DIRS += -Iinput/include
|
||||
OBJ += input/drivers_joypad/wiiu/hidpad_driver.o
|
||||
OBJ += input/drivers_hid/wiiu_hid.o
|
||||
OBJ += input/connect/joypad_connection.o \
|
||||
input/common/hid/hid_device_driver.o \
|
||||
input/common/hid/device_wiiu_gca.o \
|
||||
input/common/hid/device_ds3.o \
|
||||
input/common/hid/device_ds4.o \
|
||||
input/common/hid/device_null.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET), retroarch_switch)
|
||||
ifeq ($(HAVE_LIBNX), 1)
|
||||
OBJ += menu/drivers_display/menu_display_switch.o \
|
||||
@ -920,10 +980,7 @@ ifeq ($(HAVE_WAYLAND), 1)
|
||||
gfx/common/wayland/xdg-shell-unstable-v6.o \
|
||||
gfx/common/wayland/idle-inhibit-unstable-v1.o \
|
||||
gfx/common/wayland/xdg-decoration-unstable-v1.o
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
DEFINES += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
DEF_FLAGS += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS)
|
||||
LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS)
|
||||
|
||||
endif
|
||||
@ -945,8 +1002,6 @@ endif
|
||||
|
||||
ifeq ($(HAVE_OPENDINGUX_FBDEV), 1)
|
||||
OBJ += gfx/drivers_context/opendingux_fbdev_ctx.o
|
||||
DEFINES += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_X11), 1)
|
||||
@ -957,9 +1012,10 @@ ifeq ($(HAVE_X11), 1)
|
||||
gfx/display_servers/dispserv_x11.o
|
||||
|
||||
LIBS += $(X11_LIBS) $(XEXT_LIBS) $(XF86VM_LIBS) $(XINERAMA_LIBS) $(XRANDR_LIBS)
|
||||
DEFINES += -DHAVE_X11 $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
||||
DEFINES += -DHAVE_X11
|
||||
DEF_FLAGS += $(X11_CFLAGS) $(XEXT_CFLAGS) $(XF86VM_CFLAGS) $(XINERAMA_CFLAGS)
|
||||
ifeq ($(HAVE_XCB),1)
|
||||
LIBS += -lX11-xcb
|
||||
LIBS += -lX11-xcb
|
||||
endif
|
||||
ifneq ($(HAVE_OPENGLES), 1)
|
||||
OBJ += gfx/drivers_context/x_ctx.o
|
||||
@ -967,12 +1023,12 @@ ifeq ($(HAVE_X11), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XCB),1)
|
||||
DEFINES += $(XCB_CFLAGS)
|
||||
LIBS += $(XCB_LIBS)
|
||||
DEF_FLAGS += $(XCB_CFLAGS)
|
||||
LIBS += $(XCB_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XKBCOMMON), 1)
|
||||
DEFINES += $(XKBCOMMON_CFLAGS)
|
||||
DEF_FLAGS += $(XKBCOMMON_CFLAGS)
|
||||
OBJ += input/drivers_keyboard/keyboard_event_xkb.o
|
||||
LIBS += $(XKBCOMMON_LIBS)
|
||||
endif
|
||||
@ -984,24 +1040,17 @@ ifeq ($(HAVE_DBUS), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_UDEV), 1)
|
||||
DEFINES += $(UDEV_CFLAGS)
|
||||
DEF_FLAGS += $(UDEV_CFLAGS)
|
||||
LIBS += $(UDEV_LIBS)
|
||||
OBJ += input/drivers/udev_input.o \
|
||||
input/drivers_joypad/udev_joypad.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LIBUSB), 1)
|
||||
ifeq ($(HAVE_THREADS), 1)
|
||||
ifeq ($(HAVE_HID), 1)
|
||||
DEFINES += -DHAVE_LIBUSB
|
||||
OBJ += input/drivers_hid/libusb_hid.o
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
LIBS += -lusb
|
||||
else
|
||||
LIBS += -lusb-1.0
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
DEFINES += -DHAVE_LIBUSB
|
||||
OBJ += input/drivers_hid/libusb_hid.o
|
||||
DEF_FLAGS += $(LIBUSB_CFLAGS)
|
||||
LIBS += $(LIBUSB_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_IOHIDMANAGER), 1)
|
||||
@ -1052,14 +1101,15 @@ OBJ += gfx/drivers_context/gfx_null_ctx.o
|
||||
ifeq ($(HAVE_KMS), 1)
|
||||
HAVE_AND_WILL_USE_DRM = 1
|
||||
OBJ += gfx/drivers_context/drm_ctx.o
|
||||
DEFINES += $(GBM_CFLAGS) $(DRM_CFLAGS) $(EGL_CFLAGS)
|
||||
LIBS += $(GBM_LIBS) $(DRM_LIBS) $(EGL_LIBS)
|
||||
DEF_FLAGS += $(GBM_CFLAGS) $(DRM_CFLAGS)
|
||||
LIBS += $(GBM_LIBS) $(DRM_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CACA), 1)
|
||||
DEFINES += -DHAVE_CACA
|
||||
OBJ += gfx/drivers/caca_gfx.o gfx/drivers_font/caca_font.o
|
||||
LIBS += -lcaca
|
||||
LIBS += $(CACA_LIBS)
|
||||
DEF_FLAGS += $(CACA_CFLAGS)
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_caca.o
|
||||
@ -1068,10 +1118,11 @@ endif
|
||||
|
||||
ifeq ($(HAVE_SIXEL), 1)
|
||||
DEFINES += -DHAVE_SIXEL
|
||||
DEF_FLAGS += -I/usr/include/sixel
|
||||
INCLUDE_DIRS += -I/usr/include/sixel
|
||||
OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \
|
||||
gfx/drivers_context/sixel_ctx.o
|
||||
LIBS += -lsixel
|
||||
LIBS += $(SIXEL_LIBS)
|
||||
DEF_FLAGS += $(SIXEL_CFLAGS)
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_sixel.o
|
||||
@ -1080,7 +1131,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_PLAIN_DRM), 1)
|
||||
OBJ += gfx/drivers/drm_gfx.o
|
||||
DEF_FLAGS += -I/usr/include/libdrm
|
||||
INCLUDE_DIRS += -I/usr/include/libdrm
|
||||
LIBS += -ldrm
|
||||
endif
|
||||
|
||||
@ -1112,8 +1163,6 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
|
||||
ifeq ($(HAVE_VIDEOCORE), 1)
|
||||
OBJ += gfx/drivers_context/vc_egl_ctx.o
|
||||
DEFINES += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_EMSCRIPTEN), 1)
|
||||
@ -1122,21 +1171,15 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
|
||||
ifeq ($(HAVE_MALI_FBDEV), 1)
|
||||
OBJ += gfx/drivers_context/mali_fbdev_ctx.o
|
||||
DEFINES += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VIVANTE_FBDEV), 1)
|
||||
OBJ += gfx/drivers_context/vivante_fbdev_ctx.o
|
||||
DEFINES += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_X11), 1)
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
OBJ += gfx/drivers_context/xegl_ctx.o
|
||||
DEFINES += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1148,7 +1191,8 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
ifeq ($(HAVE_FFMPEG), 1)
|
||||
ifneq ($(HAVE_OPENGLES), 1)
|
||||
OBJ += cores/libretro-ffmpeg/ffmpeg_fft.o
|
||||
DEFINES += -I$(DEPS_DIR) -DHAVE_GL_FFT
|
||||
DEFINES += -DHAVE_GL_FFT
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -1171,13 +1215,15 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
|
||||
ifeq ($(HAVE_MPV), 1)
|
||||
OBJ += cores/libretro-mpv/mpv-libretro.o
|
||||
DEFINES += -I$(DEPS_DIR) -DHAVE_MPV
|
||||
DEFINES += -DHAVE_MPV
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)
|
||||
LIBS += -lmpv
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGLES), 1)
|
||||
DEFINES += -DHAVE_OPENGLES
|
||||
LIBS += $(OPENGLES_LIBS)
|
||||
DEFINES += $(OPENGLES_CFLAGS) -DHAVE_OPENGLES
|
||||
DEF_FLAGS += $(OPENGLES_CFLAGS)
|
||||
ifeq ($(HAVE_OPENGLES3), 1)
|
||||
DEFINES += -DHAVE_OPENGLES3
|
||||
else
|
||||
@ -1198,14 +1244,11 @@ ifeq ($(HAVE_GL_CONTEXT), 1)
|
||||
LIBS += $(GL_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GL_MODERN), 1)
|
||||
DEFINES += -DHAVE_GLSL
|
||||
OBJ += gfx/drivers_shader/shader_glsl.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_EGL), 1)
|
||||
DEFINES += -DHAVE_EGL $(EGL_CFLAGS)
|
||||
DEFINES += -DHAVE_EGL
|
||||
DEF_FLAGS += $(EGL_CFLAGS)
|
||||
LIBS += $(EGL_LIBS)
|
||||
OBJ += gfx/common/egl_common.o
|
||||
endif
|
||||
@ -1213,12 +1256,12 @@ endif
|
||||
ifeq ($(HAVE_SDL2), 1)
|
||||
HAVE_SDL_COMMON = 1
|
||||
OBJ += gfx/drivers/sdl2_gfx.o
|
||||
DEFINES += $(SDL2_CFLAGS)
|
||||
DEF_FLAGS += $(SDL2_CFLAGS)
|
||||
LIBS += $(SDL2_LIBS)
|
||||
else ifeq ($(HAVE_SDL), 1)
|
||||
HAVE_SDL_COMMON = 1
|
||||
OBJ += gfx/drivers/sdl_gfx.o
|
||||
DEFINES += $(SDL_CFLAGS)
|
||||
DEF_FLAGS += $(SDL_CFLAGS)
|
||||
LIBS += $(SDL_LIBS)
|
||||
endif
|
||||
|
||||
@ -1231,7 +1274,7 @@ ifeq ($(HAVE_SDL_COMMON), 1)
|
||||
OBJ += gfx/drivers_context/sdl_gl_ctx.o
|
||||
endif
|
||||
|
||||
DEFINES += $(BSD_LOCAL_INC)
|
||||
INCLUDE_DIRS += $(BSD_LOCAL_INC)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XSHM), 1)
|
||||
@ -1250,8 +1293,11 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
OBJ += gfx/drivers/vulkan.o \
|
||||
gfx/common/vulkan_common.o \
|
||||
$(LIBRETRO_COMM_DIR)/vulkan/vulkan_symbol_wrapper.o \
|
||||
gfx/drivers_font/vulkan_raster_font.o \
|
||||
gfx/drivers_shader/shader_vulkan.o
|
||||
gfx/drivers_font/vulkan_raster_font.o
|
||||
|
||||
ifeq ($(HAVE_SLANG), 1)
|
||||
OBJ += gfx/drivers_shader/shader_vulkan.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_VULKAN_DISPLAY), 1)
|
||||
OBJ += gfx/drivers_context/khr_display_ctx.o
|
||||
@ -1262,24 +1308,17 @@ ifeq ($(HAVE_VULKAN), 1)
|
||||
NEED_CXX_LINKER = 1
|
||||
DEFINES += -DHAVE_VULKAN
|
||||
INCLUDE_DIRS += -Igfx/include
|
||||
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_OPENGL_CORE), 1)
|
||||
OBJ += gfx/drivers/gl_core.o \
|
||||
gfx/drivers_font/gl_core_raster_font.o \
|
||||
gfx/drivers_shader/shader_gl_core.o
|
||||
gfx/drivers_shader/shader_gl_core.o
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += menu/drivers_display/menu_display_gl_core.o
|
||||
endif
|
||||
|
||||
DEFINES += -DHAVE_OPENGL_CORE
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
NEED_CXX_LINKER = 1
|
||||
endif
|
||||
|
||||
@ -1290,7 +1329,7 @@ endif
|
||||
ifeq ($(HAVE_EXYNOS), 1)
|
||||
OBJ += gfx/drivers/exynos_gfx.o
|
||||
LIBS += $(DRM_LIBS) $(EXYNOS_LIBS)
|
||||
DEFINES += $(DRM_CFLAGS) $(EXYNOS_CFLAGS)
|
||||
DEF_FLAGS += $(DRM_CFLAGS) $(EXYNOS_CFLAGS)
|
||||
HAVE_AND_WILL_USE_DRM = 1
|
||||
endif
|
||||
|
||||
@ -1310,20 +1349,14 @@ endif
|
||||
|
||||
ifeq ($(HAVE_VG), 1)
|
||||
OBJ += gfx/drivers/vg.o
|
||||
DEFINES += $(VG_CFLAGS)
|
||||
DEF_FLAGS += $(VG_CFLAGS)
|
||||
LIBS += $(VG_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XVIDEO), 1)
|
||||
OBJ += gfx/drivers/xvideo.o
|
||||
LIBS += $(XVIDEO_LIBS)
|
||||
DEFINES += $(XVIDEO_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
DEFINES += -DHAVE_CG
|
||||
OBJ += gfx/drivers_shader/shader_gl_cg.o
|
||||
LIBS += $(CG_LIBS)
|
||||
DEF_FLAGS += $(XVIDEO_CFLAGS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D9), 1)
|
||||
@ -1344,13 +1377,10 @@ ifeq ($(HAVE_D3D9), 1)
|
||||
LIBS += -lcgD3D9
|
||||
OBJ += gfx/drivers_renderchain/d3d9_cg_renderchain.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HLSL), 1)
|
||||
OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D10), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d10.o \
|
||||
gfx/common/d3d10_common.o \
|
||||
gfx/drivers_font/d3d10_font.o
|
||||
@ -1361,6 +1391,7 @@ ifeq ($(HAVE_D3D10), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D11), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d11.o \
|
||||
gfx/common/d3d11_common.o \
|
||||
gfx/drivers_font/d3d11_font.o
|
||||
@ -1368,12 +1399,10 @@ ifeq ($(HAVE_D3D11), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d11.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D11
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_D3D12), 1)
|
||||
HAVE_D3D_COMMON = 1
|
||||
OBJ += gfx/drivers/d3d12.o \
|
||||
gfx/common/d3d12_common.o \
|
||||
gfx/drivers_font/d3d12_font.o
|
||||
@ -1381,9 +1410,6 @@ ifeq ($(HAVE_D3D12), 1)
|
||||
OBJ += menu/drivers_display/menu_display_d3d12.o
|
||||
endif
|
||||
DEFINES += -DHAVE_D3D12
|
||||
HAVE_SLANG = 1
|
||||
HAVE_GLSLANG = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
endif
|
||||
|
||||
ifneq ($(findstring 1, $(HAVE_D3D10) $(HAVE_D3D11) $(HAVE_D3D12)),)
|
||||
@ -1441,6 +1467,22 @@ ifeq ($(HAVE_D3D_COMMON), 1)
|
||||
OBJ += gfx/common/d3d_common.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
DEFINES += -DHAVE_CG
|
||||
OBJ += gfx/drivers_shader/shader_gl_cg.o
|
||||
LIBS += $(CG_LIBS)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GLSL), 1)
|
||||
DEFINES += -DHAVE_GLSL
|
||||
OBJ += gfx/drivers_shader/shader_glsl.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HLSL),1)
|
||||
DEFINES += -DHAVE_HLSL
|
||||
OBJ += gfx/drivers_renderchain/d3d9_hlsl_renderchain.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SLANG),1)
|
||||
DEFINES += -DHAVE_SLANG
|
||||
OBJ += gfx/drivers_shader/slang_process.o
|
||||
@ -1449,6 +1491,10 @@ ifeq ($(HAVE_SLANG),1)
|
||||
OBJ += gfx/drivers_shader/slang_reflection.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SHADERS_COMMON), 1)
|
||||
OBJ += gfx/video_shader_parse.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_GLSLANG), 1)
|
||||
DEFINES += -DHAVE_GLSLANG
|
||||
|
||||
@ -1508,7 +1554,7 @@ OBJ += $(LIBRETRO_COMM_DIR)/file/archive_file.o \
|
||||
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.o
|
||||
|
||||
ifeq ($(HAVE_7ZIP),1)
|
||||
DEF_FLAGS += -I$(DEPS_DIR)/7zip
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/7zip
|
||||
HAVE_COMPRESSION = 1
|
||||
DEFINES += -DHAVE_7ZIP -D_7ZIP_ST
|
||||
7ZOBJ = $(DEPS_DIR)/7zip/7zIn.o \
|
||||
@ -1536,11 +1582,9 @@ endif
|
||||
|
||||
ifeq ($(HAVE_BUILTINFLAC),1)
|
||||
HAVE_FLAC = 1
|
||||
DEFINES += -DHAVE_DR_FLAC -I$(DEPS_DIR)
|
||||
DEF_FLAGS += -DHAVE_DR_FLAC
|
||||
DEF_FLAGS += -DHAVE_FLAC -I$(DEPS_DIR)/libFLAC/include
|
||||
DEFINES += -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
|
||||
DEFINES += -DHAVE_FLAC -DHAVE_DR_FLAC -DHAVE_STDINT_H -DHAVE_LROUND -DFLAC__HAS_OGG=0 \
|
||||
-DFLAC_PACKAGE_VERSION="\"retroarch\""
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR) -I$(DEPS_DIR)/libFLAC/include
|
||||
FLACOBJ = $(DEPS_DIR)/libFLAC/bitmath.o \
|
||||
$(DEPS_DIR)/libFLAC/bitreader.o \
|
||||
$(DEPS_DIR)/libFLAC/cpu.o \
|
||||
@ -1585,7 +1629,6 @@ ifeq ($(HAVE_BUILTINZLIB), 1)
|
||||
$(DEPS_DIR)/libz/uncompr.o \
|
||||
$(DEPS_DIR)/libz/zutil.o
|
||||
INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include/compat/zlib
|
||||
DEFINES += -DWANT_ZLIB
|
||||
else ifeq ($(HAVE_ZLIB),1)
|
||||
HAVE_ZLIB_COMMON = 1
|
||||
LIBS += $(ZLIB_LIBS)
|
||||
@ -1598,7 +1641,7 @@ ifeq ($(HAVE_ZLIB_COMMON), 1)
|
||||
HAVE_COMPRESSION = 1
|
||||
|
||||
ifeq ($(HAVE_CHD), 1)
|
||||
DEF_FLAGS += -I$(LIBRETRO_COMM_DIR)/formats/libchdr
|
||||
INCLUDE_DIRS += -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 \
|
||||
@ -1690,7 +1733,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
tasks/task_netplay_find_content.o
|
||||
|
||||
ifeq ($(HAVE_MENU_COMMON), 1)
|
||||
OBJ += tasks/task_pl_thumbnail_download.o
|
||||
OBJ += tasks/task_pl_thumbnail_download.o \
|
||||
menu/menu_networking.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_SSL), 1)
|
||||
@ -1725,8 +1769,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
|
||||
# RetroAchievements
|
||||
ifeq ($(HAVE_CHEEVOS), 1)
|
||||
DEFINES += -DHAVE_CHEEVOS \
|
||||
-Ideps/rcheevos/include
|
||||
DEFINES += -DHAVE_CHEEVOS
|
||||
INCLUDE_DIRS += -Ideps/rcheevos/include
|
||||
|
||||
OBJ += cheevos-new/cheevos.o \
|
||||
cheevos-new/badges.o \
|
||||
@ -1749,8 +1793,8 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
|
||||
ifeq ($(HAVE_LUA), 1)
|
||||
DEFINES += -DHAVE_LUA \
|
||||
-DLUA_32BITS \
|
||||
-Ideps/lua/src
|
||||
-DLUA_32BITS
|
||||
INCLUDE_DIRS += -Ideps/lua/src
|
||||
OBJ += deps/lua/src/lapi.o \
|
||||
deps/lua/src/lcode.o \
|
||||
deps/lua/src/lctype.o \
|
||||
@ -1793,7 +1837,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
ifeq ($(HAVE_DISCORD), 1)
|
||||
NEED_CXX_LINKER = 1
|
||||
DEFINES += -DHAVE_DISCORD
|
||||
DEFINES += -Ideps/discord-rpc/include/ -Ideps/discord-rpc/thirdparty/rapidjson-1.1.0/include/
|
||||
INCLUDE_DIRS += -Ideps/discord-rpc/include/ -Ideps/discord-rpc/thirdparty/rapidjson-1.1.0/include/
|
||||
|
||||
ifneq ($(HAVE_THREADS), 1)
|
||||
DEFINES += -DDISCORD_DISABLE_IO_THREAD
|
||||
@ -1831,7 +1875,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
ifeq ($(HAVE_BUILTINMINIUPNPC), 1)
|
||||
HAVE_MINIUPNPC = 1
|
||||
DEFINES += -DHAVE_MINIUPNPC -DHAVE_BUILTINMINIUPNPC -DMINIUPNPC_SET_SOCKET_TIMEOUT -DMINIUPNPC_GET_SRC_ADDR
|
||||
DEFINES += -I$(DEPS_DIR)
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)
|
||||
OBJ += $(DEPS_DIR)/miniupnpc/igd_desc_parse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpreplyparse.o \
|
||||
$(DEPS_DIR)/miniupnpc/upnpcommands.o \
|
||||
@ -1875,8 +1919,10 @@ ifeq ($(HAVE_FFMPEG), 1)
|
||||
cores/libretro-ffmpeg/ffmpeg_core.o
|
||||
|
||||
LIBS += $(AVCODEC_LIBS) $(AVFORMAT_LIBS) $(AVUTIL_LIBS) $(SWSCALE_LIBS) $(SWRESAMPLE_LIBS) $(FFMPEG_LIBS)
|
||||
DEFINES += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) $(SWRESAMPLE_CFLAGS)
|
||||
DEFINES += -Wno-deprecated-declarations -DHAVE_FFMPEG -Iffmpeg
|
||||
DEFINES += -DHAVE_FFMPEG
|
||||
DEF_FLAGS += $(AVCODEC_CFLAGS) $(AVFORMAT_CFLAGS) $(AVUTIL_CFLAGS) $(SWSCALE_CFLAGS) $(SWRESAMPLE_CFLAGS) \
|
||||
-Wno-deprecated-declarations
|
||||
INCLUDE_DIRS += -Iffmpeg
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_COMPRESSION), 1)
|
||||
@ -1926,7 +1972,7 @@ endif
|
||||
|
||||
ifeq ($(WANT_IOSUHAX), 1)
|
||||
DEFINES += -DHAVE_IOSUHAX
|
||||
DEF_FLAGS += -I$(DEPS_DIR)/libiosuhax
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/libiosuhax
|
||||
OBJ += $(DEPS_DIR)/libiosuhax/iosuhax.o \
|
||||
$(DEPS_DIR)/libiosuhax/iosuhax_devoptab.o \
|
||||
$(DEPS_DIR)/libiosuhax/iosuhax_disc_interface.o
|
||||
@ -1934,7 +1980,7 @@ endif
|
||||
|
||||
ifeq ($(WANT_LIBFAT), 1)
|
||||
DEFINES += -DHAVE_LIBFAT
|
||||
DEF_FLAGS += -I$(DEPS_DIR)/libfat/include
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/libfat/include
|
||||
OBJ += $(DEPS_DIR)/libfat/cache.o \
|
||||
$(DEPS_DIR)/libfat/directory.o \
|
||||
$(DEPS_DIR)/libfat/disc.o \
|
||||
@ -1968,7 +2014,7 @@ endif
|
||||
# Help at https://modmyclassic.com/comp
|
||||
|
||||
ifeq ($(HAVE_CLASSIC), 1)
|
||||
DEF_FLAGS += -DHAVE_CLASSIC
|
||||
DEFINES += -DHAVE_CLASSIC
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_C_A7A7), 1)
|
||||
@ -1993,6 +2039,6 @@ ifeq ($(HAVE_C_A7A7), 1)
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_HAKCHI), 1)
|
||||
DEF_FLAGS += -DHAVE_HAKCHI
|
||||
DEFINES += -DHAVE_HAKCHI
|
||||
endif
|
||||
##################################
|
||||
|
@ -51,7 +51,7 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
#DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_SOCKET_LEGACY -DHAVE_THREADS
|
||||
#-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL
|
||||
#ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file
|
||||
@ -133,7 +133,6 @@ endif
|
||||
|
||||
CFLAGS += -I. \
|
||||
-Ideps \
|
||||
-Ideps/libz \
|
||||
-Ideps/7zip \
|
||||
-Ideps/stb \
|
||||
-Ilibretro-common/include \
|
||||
|
@ -83,7 +83,7 @@ else
|
||||
CFLAGS += -O3
|
||||
endif
|
||||
|
||||
CFLAGS += -I. -Ideps/libz -Ideps/7zip -Ideps/stb -Ilibretro-common/include
|
||||
CFLAGS += -I. -Ideps/7zip -Ideps/stb -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
|
||||
#CFLAGS += -DRARCH_INTERNAL
|
||||
CFLAGS += -DRARCH_CONSOLE -DIS_SALAMANDER
|
||||
|
@ -24,7 +24,6 @@ HAVE_RGUI = 1
|
||||
HAVE_SDL = 0
|
||||
HAVE_SDL2 = 0
|
||||
HAVE_ZLIB = 1
|
||||
WANT_ZLIB = 0
|
||||
HAVE_SHADERPIPELINE = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
@ -35,10 +34,6 @@ PRECISE_F32 = 1
|
||||
|
||||
OBJDIR := obj-emscripten
|
||||
|
||||
ifneq ($(NATIVE_ZLIB),)
|
||||
WANT_ZLIB = 0
|
||||
endif
|
||||
|
||||
#if you compile with SDL2 flag add this Emscripten flag "-s USE_SDL=2" to LDFLAGS:
|
||||
|
||||
LIBS := -s USE_ZLIB=1
|
||||
@ -61,7 +56,7 @@ endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
CFLAGS += $(DEF_FLAGS) -Ideps/libz -Ideps -Ideps/stb
|
||||
CFLAGS += $(DEF_FLAGS) -Ideps -Ideps/stb
|
||||
libretro = libretro_emscripten.bc
|
||||
|
||||
ifneq ($(V), 1)
|
||||
|
@ -117,7 +117,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).dol
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Ideps/libz -Iwii/libogc/include
|
||||
INCLUDE += -I. -I$(DEVKITPRO)/libogc/include -Iwii/libogc/include
|
||||
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
CFLAGS += -DEXTERNAL_LIBOGC
|
||||
@ -195,9 +195,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
HAVE_IBXM := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
RARCH_CONSOLE = 1
|
||||
|
||||
@ -275,9 +273,7 @@ else ifeq ($(platform), vita)
|
||||
EXT_TARGET := $(TARGET_NAME)_$(platform).velf
|
||||
EXT_INTER_TARGET := $(TARGET_NAME)_$(platform).elf
|
||||
MACHDEP := -DVITA
|
||||
WANT_ZLIB := 1
|
||||
INCLUDE += -Ideps/libvita2d/include
|
||||
INCLUDE += -Ideps/libz
|
||||
PLATCFLAGS := -mfloat-abi=hard -fsingle-precision-constant \
|
||||
-mword-relocations -fno-unwind-tables -fno-asynchronous-unwind-tables -ftree-vectorize -fno-optimize-sibling-calls
|
||||
LIBS += -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub\
|
||||
@ -309,7 +305,6 @@ else ifeq ($(platform), vita)
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_VITA2D := 1
|
||||
@ -328,11 +323,10 @@ else ifeq ($(platform), windows_msvc6_x86)
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
@ -371,13 +365,11 @@ else ifeq ($(platform), windows_msvc2003_x86)
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
@ -421,13 +413,11 @@ else ifeq ($(platform), windows_msvc2005_x86)
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_NETPLAYDISCOVERY := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_VIDEO_LAYOUT := 0
|
||||
HAVE_MATERIALUI := 1
|
||||
@ -473,9 +463,7 @@ else ifneq (,$(findstring windows_msvc2010,$(platform)))
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
@ -549,9 +537,7 @@ else ifneq (,$(findstring windows_msvc2012,$(platform)))
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
@ -629,9 +615,7 @@ else ifneq (,$(findstring windows_msvc2013,$(platform)))
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
@ -709,9 +693,7 @@ else ifneq (,$(findstring windows_msvc2015,$(platform)))
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
@ -804,9 +786,7 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
HAVE_RJPEG := 1
|
||||
HAVE_RBMP := 1
|
||||
HAVE_RTGA := 1
|
||||
HAVE_BUILTINZLIB := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_NETWORKING := 1
|
||||
HAVE_NETWORK_CMD := 1
|
||||
@ -834,7 +814,7 @@ else ifneq (,$(findstring unix,$(platform)))
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring msvc,$(platform)))
|
||||
CFLAGS += -W2 $(MACHDEP) $(PLATCFLAGS)
|
||||
CFLAGS += -W3 $(MACHDEP) $(PLATCFLAGS)
|
||||
else
|
||||
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(PLATCFLAGS) $(INCLUDE)
|
||||
INCLUDE += -I./libretro-common/include \
|
||||
@ -899,11 +879,7 @@ endif
|
||||
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
CFLAGS += -DHAVE_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_ZLIB), 1)
|
||||
CFLAGS += -DWANT_ZLIB
|
||||
CFLAGS += -I./libretro-common/include/compat/zlib
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RPNG), 1)
|
||||
|
@ -61,6 +61,7 @@ ifeq ($(HAVE_OPENGL), 1)
|
||||
HAVE_OZONE = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_GLSL = 1
|
||||
else
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
@ -113,7 +114,7 @@ APP_ICON := pkg/libnx/retroarch.jpg
|
||||
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIE -mcpu=cortex-a57+crc+fp+simd
|
||||
|
||||
CFLAGS := -g -Wall -O3 -ffast-math -ffunction-sections \
|
||||
$(ARCH) $(DEFINES) -Ideps -Ideps/libz -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
$(ARCH) $(DEFINES) $(INCLUDE_DIRS) -I$(LIBNX)/include -I$(PORTLIBS)/include/ -include $(LIBNX)/include/switch.h #$(shell $(PORTLIBS)/bin/freetype-config --cflags)
|
||||
|
||||
CFLAGS += $(INCLUDE) -DSWITCH=1 -DHAVE_LIBNX=1 -DNXLINK=1 -DHAVE_SHADERPIPELINE -DHAVE_UPDATE_ASSETS -DHAVE_STB_FONT #-DHAVE_FREETYPE
|
||||
|
||||
@ -126,6 +127,9 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11
|
||||
ASFLAGS := -g $(ARCH)
|
||||
LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs $(ARCH) -Wl,--allow-multiple-definition -Wl,-Map,$(notdir $*.map)
|
||||
|
||||
# add things from Makefile.common
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
|
||||
LIBS := -lswresample -lavformat -lavcodec -lavutil -lswscale -lstdc++ -lbz2 -lpng -lz -lnx -lm
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
|
@ -31,7 +31,6 @@ HAVE_WINMM := 1
|
||||
|
||||
HAVE_RPNG := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_MENU := 1
|
||||
HAVE_RGUI := 1
|
||||
HAVE_XMB := 1
|
||||
|
@ -15,7 +15,7 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib
|
||||
|
||||
LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound
|
||||
DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL
|
||||
DEFINES += -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__
|
||||
DEFINES += $(INCDIRS)
|
||||
DEFINES += -D__OPENPANDORA__ -DPANDORA
|
||||
DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize
|
||||
|
@ -17,7 +17,7 @@ ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
@ -35,6 +35,7 @@ else
|
||||
HAVE_7ZIP := 1
|
||||
HAVE_EGL := 1
|
||||
HAVE_MENU_WIDGETS := 1
|
||||
HAVE_GLSL := 1
|
||||
HAVE_OPENGLES := 1
|
||||
HAVE_NETWORKING := 0
|
||||
HAVE_SOCKET_LEGACY := 0
|
||||
@ -59,11 +60,6 @@ else
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
BLACKLIST :=
|
||||
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
|
||||
|
||||
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)),)
|
||||
@ -83,7 +79,7 @@ STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
INCDIRS := -I. -Ideps/7zip -Ilibretro-common/include -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -m64 -DORBIS
|
||||
|
@ -31,13 +31,13 @@ ifeq ($(MUTE_WARNINGS), 1)
|
||||
endif
|
||||
|
||||
INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include -I$(CDVD_DIR)/ee
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include -Ideps -Ideps/stb -Ideps/7zip
|
||||
INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
|
||||
GPVAL = -G0
|
||||
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
|
||||
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG
|
||||
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
|
@ -36,7 +36,6 @@ LDDIRS = -L. -L$(CELL_SDK)/target/ppu/lib/PSGL/RSX/ultra-opt
|
||||
INCDIRS = -I. \
|
||||
-Idefines \
|
||||
-Ideps \
|
||||
-Ideps/libz \
|
||||
-Ideps/stb \
|
||||
-Ideps/rcheevos/include \
|
||||
-Ilibretro-common/include \
|
||||
@ -120,7 +119,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA
|
||||
|
||||
#DEFINES += -DHAVE_IMAGEVIEWER
|
||||
|
||||
|
@ -111,7 +111,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l
|
||||
PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe
|
||||
|
||||
#DEFINES += -DHAVE_VIDEO_LAYOUT
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
|
@ -24,7 +24,7 @@ endif
|
||||
|
||||
STRIP = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-strip.exe
|
||||
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ideps/libz
|
||||
INCFLAGS = -I. -Idefines -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
DEFINES = -D__CELLOS_LV2__ -DIS_SALAMANDER -DRARCH_CONSOLE -DHAVE_SYSUTILS -DHAVE_SYSMODULES -DHAVE_RARCH_EXEC
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
|
@ -17,7 +17,7 @@ ELF_TARGET := retroarch_psl1ght.elf
|
||||
EBOOT_PATH = pkg/ps3/USRDIR/EBOOT.BIN
|
||||
CORE_PATH = pkg/ps3/USRDIR/cores/CORE.SELF
|
||||
|
||||
INCLUDE := -I. -I$(PS3DEV)/ppu/include -Ideps/libz -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
INCLUDE := -I. -I$(PS3DEV)/ppu/include -Ips3/gcmgl/include/export -Ips3/include -Ideps -Ideps/stb -Ilibretro-common/include/compat/zlib
|
||||
LIBDIRS := -L$(PS3DEV)/ppu/lib -L$(PS3DEV)/portlibs/ppu/lib -L.
|
||||
|
||||
MACHDEP := -D__CELLOS_LV2__ -D__PSL1GHT__
|
||||
@ -92,7 +92,7 @@ endif
|
||||
SHARED_FLAGS :=
|
||||
|
||||
#SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER
|
||||
SHARED_FLAGS += -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
@ -21,11 +21,11 @@ ifeq ($(WHOLE_ARCHIVE_LINK), 1)
|
||||
WHOLE_END := -Wl,--no-whole-archive
|
||||
endif
|
||||
|
||||
INCDIR = deps deps/stb deps/libz deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include libretro-common/include/compat/zlib
|
||||
INCDIR = deps deps/stb deps/7zip deps/pthreads deps/pthreads/platform/psp deps/pthreads/platform/helper libretro-common/include libretro-common/include/compat/zlib
|
||||
CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant
|
||||
ASFLAGS = $(CFLAGS)
|
||||
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
|
||||
|
||||
LIBDIR =
|
||||
LDFLAGS =
|
||||
|
@ -11,7 +11,7 @@ DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_DYNAMIC
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA
|
||||
DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC
|
||||
else
|
||||
HAVE_AUDIOMIXER = 1
|
||||
@ -47,7 +47,7 @@ endif
|
||||
|
||||
include $(LIBTRANSISTOR_HOME)/libtransistor.mk
|
||||
|
||||
INCDIRS := -I. -Ideps -Ideps/libz -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/
|
||||
INCDIRS := -I. -Ideps -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb -I$(LIBTRANSISTOR_HOME)/build/sdl2_install/include/SDL2/
|
||||
LIBDIRS := -L.
|
||||
|
||||
TARGETS := $(TARGET).nro
|
||||
|
@ -12,15 +12,17 @@ PC_DEVELOPMENT_UDP_PORT =
|
||||
OBJ :=
|
||||
|
||||
DEFINES :=
|
||||
INCDIRS :=
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER -DHAVE_UPDATE_ASSETS
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER -DHAVE_UPDATE_ASSETS
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
endif
|
||||
INCDIRS += -I. -Ideps/7zip -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb
|
||||
else
|
||||
|
||||
HAVE_NEON := 1
|
||||
@ -60,11 +62,7 @@ else
|
||||
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 += frontend/drivers/platform_psp.o
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(VITASDK)),)
|
||||
@ -84,7 +82,6 @@ STRIP := $(PREFIX)strip
|
||||
NM := $(PREFIX)nm
|
||||
LD := $(CXX)
|
||||
|
||||
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Ideps/stb
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
|
@ -30,7 +30,7 @@ ELF2DOL = $(DEVKITPPC)/bin/elf2dol$(EXE_EXT)
|
||||
DOL_TARGET := retroarch-salamander_wii.dol
|
||||
ELF_TARGET := retroarch-salamander_wii.elf
|
||||
|
||||
INCLUDE := -I. -Ilibretro-common/include -Ideps/libz
|
||||
INCLUDE := -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib
|
||||
ifeq ($(EXTERNAL_LIBOGC), 1)
|
||||
INCLUDE += -I$(DEVKITPRO)/libogc/include
|
||||
LIBDIRS := -L$(DEVKITPRO)/libogc/lib/wii -L.
|
||||
|
@ -93,8 +93,6 @@ endif
|
||||
OBJ += gfx/drivers/gx2_shaders/snow.o
|
||||
OBJ += gfx/drivers/gx2_shaders/snow_simple.o
|
||||
OBJ += gfx/drivers/gx2_shaders/snowflake.o
|
||||
OBJ += gfx/drivers_shader/slang_preprocess.o
|
||||
OBJ += gfx/drivers_shader/glslang_util.o
|
||||
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
@ -104,16 +102,19 @@ endif
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax
|
||||
# pad_functions uses wiiu/input.h
|
||||
INCDIRS += -Iinput/include
|
||||
INCDIRS += -Ideps/SPIRV-Cross
|
||||
|
||||
DEFINES += -DHAVE_AUDIOMIXER
|
||||
DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_RGUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER
|
||||
DEFINES += -DHAVE_SPIRV_CROSS -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY
|
||||
#DEFINES += -DWANT_IFADDRS
|
||||
#DEFINES += -DHAVE_FREETYPE
|
||||
DEFINES += -DHAVE_XMB -DHAVE_MATERIALUI
|
||||
DEFINES += -DHAVE_HID
|
||||
DEFINES += -DWANT_LIBFAT -DHAVE_LIBFAT -DWANT_IOSUHAX -DHAVE_IOSUHAX
|
||||
DEFINES += -DSPIRV_CROSS_EXCEPTIONS_TO_ASSERTIONS
|
||||
|
||||
# $(GRIFFIN_BUILD),0
|
||||
else
|
||||
@ -140,6 +141,8 @@ endif
|
||||
HAVE_CHEEVOS = 1
|
||||
#WANT_IFADDRS = 1
|
||||
HAVE_OVERLAY = 1
|
||||
HAVE_SPIRV_CROSS = 1
|
||||
HAVE_SLANG = 1
|
||||
HAVE_VIDEO_LAYOUT = 0
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
@ -149,31 +152,6 @@ endif
|
||||
include Makefile.common
|
||||
DEFINES += $(DEF_FLAGS)
|
||||
INCDIRS += $(INCLUDE_DIRS)
|
||||
|
||||
OBJ += gfx/drivers/gx2_gfx.o
|
||||
OBJ += gfx/drivers_font/wiiu_font.o
|
||||
OBJ += menu/drivers_display/menu_display_wiiu.o
|
||||
OBJ += input/drivers/wiiu_input.o
|
||||
OBJ += input/drivers_joypad/wiiu_joypad.o
|
||||
OBJ += input/drivers_joypad/wiiu/wpad_driver.o
|
||||
OBJ += input/drivers_joypad/wiiu/kpad_driver.o
|
||||
OBJ += input/drivers_joypad/wiiu/pad_functions.o
|
||||
INCDIRS += -Iinput/include
|
||||
|
||||
OBJ += audio/drivers/wiiu_audio.o
|
||||
OBJ += frontend/drivers/platform_wiiu.o
|
||||
|
||||
ifeq ($(WIIU_HID),1)
|
||||
DEFINES += -DWIIU_HID
|
||||
OBJ += input/drivers_joypad/wiiu/hidpad_driver.o
|
||||
OBJ += input/drivers_hid/wiiu_hid.o
|
||||
OBJ += input/connect/joypad_connection.o \
|
||||
input/common/hid/hid_device_driver.o \
|
||||
input/common/hid/device_wiiu_gca.o \
|
||||
input/common/hid/device_ds3.o \
|
||||
input/common/hid/device_ds4.o \
|
||||
input/common/hid/device_null.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -203,7 +181,7 @@ CFLAGS := -mcpu=750 -meabi -mhard-float
|
||||
CFLAGS += -ffast-math -Werror=implicit-function-declaration
|
||||
CFLAGS += -ffunction-sections -fdata-sections
|
||||
#CFLAGS += -fomit-frame-pointer -mword-relocations
|
||||
#CFLAGS += -Wall
|
||||
#CFLAGS += -Wall
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
CFLAGS += -O0 -g
|
||||
@ -212,7 +190,6 @@ else
|
||||
endif
|
||||
|
||||
ASFLAGS := $(CFLAGS) -mregnames
|
||||
CXXFLAGS = $(CFLAGS) -fno-rtti -fno-exceptions
|
||||
|
||||
#-----------------------------
|
||||
# Linking/library flags
|
||||
@ -256,7 +233,7 @@ ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>devkitPRO")
|
||||
endif
|
||||
|
||||
export PATH := $(PATH):$(DEVKITPPC)/bin
|
||||
export PATH := $(PATH):$(DEVKITPPC)/bin
|
||||
|
||||
PREFIX := powerpc-eabi-
|
||||
|
||||
|
@ -34,7 +34,6 @@ HAVE_FFMPEG := 0
|
||||
|
||||
HAVE_CG := 1
|
||||
HAVE_ZLIB := 1
|
||||
WANT_ZLIB := 1
|
||||
HAVE_CC_RESAMPLER := 1
|
||||
|
||||
ifeq ($(HAVE_CG), 1)
|
||||
|
136
audio/common/mmdevice_common.c
Normal file
136
audio/common/mmdevice_common.c
Normal file
@ -0,0 +1,136 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* 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 <stdlib.h>
|
||||
|
||||
#include <encodings/utf.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
#include "mmdevice_common.h"
|
||||
#include "mmdevice_common_inline.h"
|
||||
|
||||
void *mmdevice_list_new(void *u)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT i;
|
||||
PROPVARIANT prop_var;
|
||||
union string_list_elem_attr attr;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
UINT dev_count = 0;
|
||||
IMMDevice *device = NULL;
|
||||
LPWSTR dev_id_wstr = NULL;
|
||||
IPropertyStore *prop_store = NULL;
|
||||
bool br = false;
|
||||
bool prop_var_init = false;
|
||||
char *dev_id_str = NULL;
|
||||
char *dev_name_str = NULL;
|
||||
struct string_list *sl = string_list_new();
|
||||
|
||||
if (!sl)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
#ifdef __cplusplus
|
||||
hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#else
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#endif
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator,
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IMMDeviceCollection_GetCount(collection, &dev_count);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = _IMMDeviceCollection_Item(collection, i, &device);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IMMDevice_GetId(device, &dev_id_wstr);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
if (!(dev_id_str = utf16_to_utf8_string_alloc(dev_id_wstr)))
|
||||
goto error;
|
||||
|
||||
hr = _IMMDevice_OpenPropertyStore(device, STGM_READ, &prop_store);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
PropVariantInit(&prop_var);
|
||||
prop_var_init = true;
|
||||
hr = _IPropertyStore_GetValue(
|
||||
prop_store, PKEY_Device_FriendlyName,
|
||||
&prop_var);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
if (!(dev_name_str = utf16_to_utf8_string_alloc(prop_var.pwszVal)))
|
||||
goto error;
|
||||
|
||||
br = string_list_append(sl, dev_name_str, attr);
|
||||
if (!br)
|
||||
goto error;
|
||||
if (dev_id_str)
|
||||
sl->elems[sl->size-1].userdata = dev_id_str;
|
||||
|
||||
PropVariantClear(&prop_var);
|
||||
prop_var_init = false;
|
||||
if (dev_id_wstr)
|
||||
CoTaskMemFree(dev_id_wstr);
|
||||
if (dev_name_str)
|
||||
free(dev_name_str);
|
||||
dev_name_str = NULL;
|
||||
dev_id_wstr = NULL;
|
||||
IFACE_RELEASE(prop_store);
|
||||
IFACE_RELEASE(device);
|
||||
}
|
||||
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
|
||||
return sl;
|
||||
|
||||
error:
|
||||
if (dev_id_str)
|
||||
free(dev_id_str);
|
||||
if (dev_name_str)
|
||||
free(dev_name_str);
|
||||
dev_id_str = NULL;
|
||||
dev_name_str = NULL;
|
||||
if (prop_var_init)
|
||||
PropVariantClear(&prop_var);
|
||||
IFACE_RELEASE(prop_store);
|
||||
if (dev_id_wstr)
|
||||
CoTaskMemFree(dev_id_wstr);
|
||||
dev_id_wstr = NULL;
|
||||
IFACE_RELEASE(device);
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
|
||||
return NULL;
|
||||
}
|
27
audio/common/mmdevice_common.h
Normal file
27
audio/common/mmdevice_common.h
Normal file
@ -0,0 +1,27 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef _MMDEVICE_COMMON_H
|
||||
#define _MMDEVICE_COMMON_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
void *mmdevice_list_new(void *u);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
114
audio/common/mmdevice_common_inline.h
Normal file
114
audio/common/mmdevice_common_inline.h
Normal file
@ -0,0 +1,114 @@
|
||||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
#ifndef _MMDEVICE_COMMON_INLINE_H
|
||||
#define _MMDEVICE_COMMON_INLINE_H
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
#include <propidl.h>
|
||||
#include <initguid.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <mmreg.h>
|
||||
#include <audioclient.h>
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
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
|
||||
|
||||
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); /* DEVPROP_TYPE_STRING */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define _IMMDeviceCollection_Item(This,nDevice,ppdevice) (This)->Item(nDevice,ppdevice)
|
||||
#define _IAudioClient_Start(This) ( (This)->Start() )
|
||||
#define _IAudioClient_Stop(This) ( (This)->Stop() )
|
||||
#define _IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \
|
||||
( (This)->GetCurrentPadding(pNumPaddingFrames) )
|
||||
#define _IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \
|
||||
( (This)->GetBuffer(NumFramesRequested,ppData) )
|
||||
#define _IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \
|
||||
( (This)->ReleaseBuffer(NumFramesWritten,dwFlags) )
|
||||
#define _IAudioClient_GetService(This,riid,ppv) ( (This)->GetService(riid,ppv) )
|
||||
#define _IAudioClient_SetEventHandle(This,eventHandle) ( (This)->SetEventHandle(eventHandle) )
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->GetBufferSize(pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->GetStreamLatency(phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->GetDevicePeriod(phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->Activate(iid,(dwClsCtx),pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->EnumAudioEndpoints(dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->GetDefaultAudioEndpoint(dataFlow,role,ppEndpoint)
|
||||
#define _IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) (This)->OpenPropertyStore(stgmAccess,ppProperties)
|
||||
#define _IMMDevice_GetId(This,ppstrId) ((This)->GetId(ppstrId))
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->GetValue(key,pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->GetCount(cProps) )
|
||||
#else
|
||||
#define _IMMDeviceCollection_Item(This,nDevice,ppdevice) (This)->lpVtbl->Item(This,nDevice,ppdevice)
|
||||
#define _IAudioClient_Start(This) ( (This)->lpVtbl -> Start(This) )
|
||||
#define _IAudioClient_Stop(This) ( (This)->lpVtbl -> Stop(This) )
|
||||
#define _IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \
|
||||
( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) )
|
||||
#define _IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \
|
||||
( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) )
|
||||
#define _IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \
|
||||
( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) )
|
||||
#define _IAudioClient_GetService(This,riid,ppv) ( (This)->lpVtbl -> GetService(This,&(riid),ppv) )
|
||||
#define _IAudioClient_SetEventHandle(This,eventHandle) ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) )
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->lpVtbl->Activate(This,&(iid),dwClsCtx,pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->lpVtbl->EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->lpVtbl->GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)
|
||||
#define _IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) (This)->lpVtbl->OpenPropertyStore(This,stgmAccess,ppProperties)
|
||||
#define _IMMDevice_GetId(This,ppstrId) (This)->lpVtbl->GetId(This,ppstrId)
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->lpVtbl -> GetValue(This,&(key),pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->lpVtbl -> GetCount(This,cProps) )
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
#ifndef IFACE_RELEASE
|
||||
#define IFACE_RELEASE(iface) \
|
||||
if (iface) \
|
||||
{ \
|
||||
iface->Release(); \
|
||||
iface = NULL; \
|
||||
}
|
||||
#endif
|
||||
#else
|
||||
#ifndef IFACE_RELEASE
|
||||
#define IFACE_RELEASE(iface) \
|
||||
if (iface) \
|
||||
{ \
|
||||
iface->lpVtbl->Release(iface);\
|
||||
iface = NULL; \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
@ -35,7 +35,9 @@
|
||||
#ifdef HAVE_THREADS
|
||||
#include <rthreads/rthreads.h>
|
||||
#endif
|
||||
#include <lists/string_list.h>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
@ -73,17 +75,15 @@ typedef struct dsound
|
||||
volatile bool thread_alive;
|
||||
} dsound_t;
|
||||
|
||||
/* Forward declarations */
|
||||
static void *dsound_list_new(void *u);
|
||||
|
||||
static INLINE unsigned write_avail(unsigned read_ptr,
|
||||
unsigned write_ptr, unsigned buffer_size)
|
||||
{
|
||||
return (read_ptr + buffer_size - write_ptr) % buffer_size;
|
||||
}
|
||||
|
||||
static INLINE void get_positions(dsound_t *ds, DWORD *read_ptr, DWORD *write_ptr)
|
||||
{
|
||||
IDirectSoundBuffer_GetCurrentPosition(ds->dsb, read_ptr, write_ptr);
|
||||
}
|
||||
|
||||
#define CHUNK_SIZE 256
|
||||
|
||||
struct audio_lock
|
||||
@ -97,51 +97,44 @@ struct audio_lock
|
||||
static INLINE bool grab_region(dsound_t *ds, uint32_t write_ptr,
|
||||
struct audio_lock *region)
|
||||
{
|
||||
const char *err = NULL;
|
||||
HRESULT res = IDirectSoundBuffer_Lock(ds->dsb, write_ptr, CHUNK_SIZE,
|
||||
®ion->chunk1, ®ion->size1, ®ion->chunk2, ®ion->size2, 0);
|
||||
|
||||
if (res == DSERR_BUFFERLOST)
|
||||
{
|
||||
res = IDirectSoundBuffer_Restore(ds->dsb);
|
||||
if (res != DS_OK)
|
||||
if ((res = IDirectSoundBuffer_Restore(ds->dsb)) != DS_OK)
|
||||
return false;
|
||||
|
||||
res = IDirectSoundBuffer_Lock(ds->dsb, write_ptr, CHUNK_SIZE,
|
||||
®ion->chunk1, ®ion->size1, ®ion->chunk2, ®ion->size2, 0);
|
||||
if (res != DS_OK)
|
||||
if ((res = IDirectSoundBuffer_Lock(ds->dsb, write_ptr, CHUNK_SIZE,
|
||||
®ion->chunk1, ®ion->size1, ®ion->chunk2, ®ion->size2, 0)) != DS_OK)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (res == DS_OK)
|
||||
return true;
|
||||
|
||||
#ifdef DEBUG
|
||||
switch (res)
|
||||
{
|
||||
case DSERR_BUFFERLOST:
|
||||
err = "DSERR_BUFFERLOST";
|
||||
RARCH_WARN("[DirectSound error]: %s\n", "DSERR_BUFFERLOST");
|
||||
break;
|
||||
case DSERR_INVALIDCALL:
|
||||
err = "DSERR_INVALIDCALL";
|
||||
RARCH_WARN("[DirectSound error]: %s\n", "DSERR_INVALIDCALL");
|
||||
break;
|
||||
case DSERR_INVALIDPARAM:
|
||||
err = "DSERR_INVALIDPARAM";
|
||||
RARCH_WARN("[DirectSound error]: %s\n", "DSERR_INVALIDPARAM");
|
||||
break;
|
||||
case DSERR_PRIOLEVELNEEDED:
|
||||
err = "DSERR_PRIOLEVELNEEDED";
|
||||
RARCH_WARN("[DirectSound error]: %s\n", "DSERR_PRIOLEVELNEEDED");
|
||||
break;
|
||||
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
RARCH_WARN("[DirectSound error]: %s\n", err);
|
||||
return false;
|
||||
}
|
||||
|
||||
static INLINE void release_region(dsound_t *ds, const struct audio_lock *region)
|
||||
{
|
||||
IDirectSoundBuffer_Unlock(ds->dsb, region->chunk1,
|
||||
region->size1, region->chunk2, region->size2);
|
||||
}
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
static void dsound_thread(void *data)
|
||||
#else
|
||||
@ -153,15 +146,16 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
|
||||
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
|
||||
|
||||
get_positions(ds, NULL, &write_ptr);
|
||||
IDirectSoundBuffer_GetCurrentPosition(ds->dsb, NULL, &write_ptr);
|
||||
write_ptr = (write_ptr + ds->buffer_size / 2) % ds->buffer_size;
|
||||
|
||||
while (ds->thread_alive)
|
||||
{
|
||||
bool is_pull = false;
|
||||
struct audio_lock region;
|
||||
DWORD read_ptr, avail, fifo_avail;
|
||||
get_positions(ds, &read_ptr, NULL);
|
||||
|
||||
IDirectSoundBuffer_GetCurrentPosition(ds->dsb, &read_ptr, NULL);
|
||||
avail = write_avail(read_ptr, write_ptr, ds->buffer_size);
|
||||
|
||||
EnterCriticalSection(&ds->crit);
|
||||
@ -192,12 +186,8 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
{
|
||||
/* Got space to write, but nothing in FIFO (underrun),
|
||||
* fill block with silence. */
|
||||
|
||||
memset(region.chunk1, 0, region.size1);
|
||||
memset(region.chunk2, 0, region.size2);
|
||||
|
||||
release_region(ds, ®ion);
|
||||
write_ptr = (write_ptr + region.size1 + region.size2) % ds->buffer_size;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -210,11 +200,16 @@ static DWORD CALLBACK dsound_thread(PVOID data)
|
||||
fifo_read(ds->buffer, region.chunk2, region.size2);
|
||||
LeaveCriticalSection(&ds->crit);
|
||||
|
||||
release_region(ds, ®ion);
|
||||
write_ptr = (write_ptr + region.size1 + region.size2) % ds->buffer_size;
|
||||
|
||||
SetEvent(ds->event);
|
||||
is_pull = true;
|
||||
}
|
||||
|
||||
IDirectSoundBuffer_Unlock(ds->dsb, region.chunk1,
|
||||
region.size1, region.chunk2, region.size2);
|
||||
write_ptr = (write_ptr + region.size1 + region.size2)
|
||||
% ds->buffer_size;
|
||||
|
||||
if (is_pull)
|
||||
SetEvent(ds->event);
|
||||
}
|
||||
|
||||
ExitThread(0);
|
||||
@ -308,52 +303,86 @@ static void dsound_free(void *data)
|
||||
free(ds);
|
||||
}
|
||||
|
||||
struct dsound_dev
|
||||
{
|
||||
unsigned device;
|
||||
unsigned total_count;
|
||||
LPGUID guid;
|
||||
};
|
||||
|
||||
static BOOL CALLBACK enumerate_cb(LPGUID guid, LPCSTR desc, LPCSTR module, LPVOID context)
|
||||
{
|
||||
struct dsound_dev *dev = (struct dsound_dev*)context;
|
||||
union string_list_elem_attr attr;
|
||||
struct string_list *list = (struct string_list*)context;
|
||||
|
||||
RARCH_LOG("\t%u: %s\n", dev->total_count, desc);
|
||||
attr.i = 0;
|
||||
|
||||
string_list_append(list, desc, attr);
|
||||
|
||||
if (guid)
|
||||
{
|
||||
unsigned i;
|
||||
LPGUID guid_copy = (LPGUID)malloc(sizeof(GUID) * 1);
|
||||
guid_copy->Data1 = guid->Data1;
|
||||
guid_copy->Data2 = guid->Data2;
|
||||
guid_copy->Data3 = guid->Data3;
|
||||
for (i = 0; i < 8; i++)
|
||||
guid_copy->Data4[i] = guid->Data4[i];
|
||||
|
||||
list->elems[list->size-1].userdata = guid_copy;
|
||||
}
|
||||
|
||||
if (dev->device == dev->total_count)
|
||||
dev->guid = guid;
|
||||
dev->total_count++;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void *dsound_init(const char *device, unsigned rate, unsigned latency,
|
||||
static void *dsound_init(const char *dev, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
WAVEFORMATEX wfx = {0};
|
||||
DSBUFFERDESC bufdesc = {0};
|
||||
struct dsound_dev dev = {0};
|
||||
dsound_t *ds = (dsound_t*)calloc(1, sizeof(*ds));
|
||||
LPGUID selected_device = NULL;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
DSBUFFERDESC bufdesc = {0};
|
||||
int32_t idx_found = -1;
|
||||
struct string_list *list = (struct string_list*)dsound_list_new(NULL);
|
||||
dsound_t *ds = (dsound_t*)calloc(1, sizeof(*ds));
|
||||
|
||||
if (!ds)
|
||||
goto error;
|
||||
|
||||
InitializeCriticalSection(&ds->crit);
|
||||
|
||||
if (device)
|
||||
dev.device = strtoul(device, NULL, 0);
|
||||
if (dev)
|
||||
{
|
||||
/* Search for device name first */
|
||||
if (list && list->elems)
|
||||
{
|
||||
if (list->elems)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
if (string_is_equal(dev, list->elems[i].data))
|
||||
{
|
||||
idx_found = i;
|
||||
selected_device = (LPGUID)list->elems[idx_found].userdata;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Index was not found yet based on name string,
|
||||
* just assume id is a one-character number index. */
|
||||
|
||||
RARCH_LOG("DirectSound devices:\n");
|
||||
#ifndef _XBOX
|
||||
#ifdef UNICODE
|
||||
DirectSoundEnumerate((LPDSENUMCALLBACKW)enumerate_cb, &dev);
|
||||
#else
|
||||
DirectSoundEnumerate((LPDSENUMCALLBACKA)enumerate_cb, &dev);
|
||||
#endif
|
||||
#endif
|
||||
if (idx_found == -1 && isdigit(dev[0]))
|
||||
{
|
||||
idx_found = strtoul(dev, NULL, 0);
|
||||
RARCH_LOG("[DirectSound]: Fallback, device index is a single number index instead: %d.\n", idx_found);
|
||||
|
||||
if (DirectSoundCreate(dev.guid, &ds->ds, NULL) != DS_OK)
|
||||
if (idx_found != -1)
|
||||
{
|
||||
if (idx_found < (int32_t)list->size)
|
||||
{
|
||||
RARCH_LOG("[DirectSound]: Corresponding name: %s\n", list->elems[idx_found].data);
|
||||
selected_device = (LPGUID)list->elems[idx_found].userdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (DirectSoundCreate(selected_device, &ds->ds, NULL) != DS_OK)
|
||||
goto error;
|
||||
|
||||
#ifndef _XBOX
|
||||
@ -407,10 +436,13 @@ static void *dsound_init(const char *device, unsigned rate, unsigned latency,
|
||||
if (!dsound_start_thread(ds))
|
||||
goto error;
|
||||
|
||||
string_list_free(list);
|
||||
return ds;
|
||||
|
||||
error:
|
||||
RARCH_ERR("[DirectSound] Error occurred in init.\n");
|
||||
if (list)
|
||||
string_list_free(list);
|
||||
dsound_free(ds);
|
||||
return NULL;
|
||||
}
|
||||
@ -512,6 +544,32 @@ static bool dsound_use_float(void *data)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void *dsound_list_new(void *u)
|
||||
{
|
||||
struct string_list *sl = string_list_new();
|
||||
|
||||
if (!sl)
|
||||
return NULL;
|
||||
|
||||
#ifndef _XBOX
|
||||
#ifdef UNICODE
|
||||
DirectSoundEnumerate((LPDSENUMCALLBACKW)enumerate_cb, sl);
|
||||
#else
|
||||
DirectSoundEnumerate((LPDSENUMCALLBACKA)enumerate_cb, sl);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
return sl;
|
||||
}
|
||||
|
||||
static void dsound_device_list_free(void *u, void *slp)
|
||||
{
|
||||
struct string_list *sl = (struct string_list*)slp;
|
||||
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
}
|
||||
|
||||
audio_driver_t audio_dsound = {
|
||||
dsound_init,
|
||||
dsound_write,
|
||||
@ -522,8 +580,8 @@ audio_driver_t audio_dsound = {
|
||||
dsound_free,
|
||||
dsound_use_float,
|
||||
"dsound",
|
||||
NULL,
|
||||
NULL,
|
||||
dsound_list_new,
|
||||
dsound_device_list_free,
|
||||
dsound_write_avail,
|
||||
dsound_buffer_size,
|
||||
};
|
||||
|
@ -152,7 +152,7 @@ static void *sl_init(const char *device, unsigned rate, unsigned latency,
|
||||
|
||||
fmt_pcm.formatType = SL_DATAFORMAT_PCM;
|
||||
fmt_pcm.numChannels = 2;
|
||||
fmt_pcm.samplesPerSec = rate * 1000; // Samplerate is in milli-Hz.
|
||||
fmt_pcm.samplesPerSec = rate * 1000; /* Samplerate is in milli-Hz. */
|
||||
fmt_pcm.bitsPerSample = 16;
|
||||
fmt_pcm.containerSize = 16;
|
||||
fmt_pcm.channelMask = SL_SPEAKER_FRONT_LEFT | SL_SPEAKER_FRONT_RIGHT;
|
||||
|
@ -45,7 +45,8 @@ static void audioConfigure(ps2_audio_t *ps2, unsigned rate)
|
||||
|
||||
err = audsrv_set_format(&format);
|
||||
|
||||
if (err){
|
||||
if (err)
|
||||
{
|
||||
printf("set format returned %d\n", err);
|
||||
printf("audsrv returned error string: %s\n", audsrv_get_error_string());
|
||||
}
|
||||
@ -71,7 +72,7 @@ static void *ps2_audio_init(const char *device,
|
||||
static void ps2_audio_free(void *data)
|
||||
{
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
if(!ps2)
|
||||
if (!ps2)
|
||||
return;
|
||||
|
||||
ps2->running = false;
|
||||
@ -123,9 +124,7 @@ static bool ps2_audio_start(void *data, bool is_shutdown)
|
||||
bool start = true;
|
||||
|
||||
if (ps2)
|
||||
{
|
||||
ps2->running = true;
|
||||
}
|
||||
|
||||
return start;
|
||||
}
|
||||
@ -148,9 +147,7 @@ static size_t ps2_audio_write_avail(void *data)
|
||||
ps2_audio_t* ps2 = (ps2_audio_t*)data;
|
||||
|
||||
if (ps2 && ps2->running)
|
||||
{
|
||||
return AUDIO_BUFFER;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -15,135 +15,17 @@
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32_WINNT
|
||||
#undef _WIN32_WINNT
|
||||
#endif
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include <windows.h>
|
||||
#include <winerror.h>
|
||||
#include <propidl.h>
|
||||
#include <initguid.h>
|
||||
#include <mmdeviceapi.h>
|
||||
#include <mmreg.h>
|
||||
#include <audioclient.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
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>
|
||||
#include <queues/fifo_queue.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../common/mmdevice_common.h"
|
||||
#include "../common/mmdevice_common_inline.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 14); /* DEVPROP_TYPE_STRING */
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define _IMMDeviceCollection_Item(This,nDevice,ppdevice) (This)->Item(nDevice,ppdevice)
|
||||
#define _IAudioClient_Start(This) ( (This)->Start() )
|
||||
#define _IAudioClient_Stop(This) ( (This)->Stop() )
|
||||
#define _IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \
|
||||
( (This)->GetCurrentPadding(pNumPaddingFrames) )
|
||||
#define _IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \
|
||||
( (This)->GetBuffer(NumFramesRequested,ppData) )
|
||||
#define _IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \
|
||||
( (This)->ReleaseBuffer(NumFramesWritten,dwFlags) )
|
||||
#define _IAudioClient_GetService(This,riid,ppv) ( (This)->GetService(riid,ppv) )
|
||||
#define _IAudioClient_SetEventHandle(This,eventHandle) ( (This)->SetEventHandle(eventHandle) )
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->GetBufferSize(pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->GetStreamLatency(phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->GetDevicePeriod(phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->Activate(iid,(dwClsCtx),pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->EnumAudioEndpoints(dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->GetDefaultAudioEndpoint(dataFlow,role,ppEndpoint)
|
||||
#define _IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) (This)->OpenPropertyStore(stgmAccess,ppProperties)
|
||||
#define _IMMDevice_GetId(This,ppstrId) ((This)->GetId(ppstrId))
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->GetValue(key,pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->GetCount(cProps) )
|
||||
#else
|
||||
#define _IMMDeviceCollection_Item(This,nDevice,ppdevice) (This)->lpVtbl->Item(This,nDevice,ppdevice)
|
||||
#define _IAudioClient_Start(This) ( (This)->lpVtbl -> Start(This) )
|
||||
#define _IAudioClient_Stop(This) ( (This)->lpVtbl -> Stop(This) )
|
||||
#define _IAudioClient_GetCurrentPadding(This,pNumPaddingFrames) \
|
||||
( (This)->lpVtbl -> GetCurrentPadding(This,pNumPaddingFrames) )
|
||||
#define _IAudioRenderClient_GetBuffer(This,NumFramesRequested,ppData) \
|
||||
( (This)->lpVtbl -> GetBuffer(This,NumFramesRequested,ppData) )
|
||||
#define _IAudioRenderClient_ReleaseBuffer(This,NumFramesWritten,dwFlags) \
|
||||
( (This)->lpVtbl -> ReleaseBuffer(This,NumFramesWritten,dwFlags) )
|
||||
#define _IAudioClient_GetService(This,riid,ppv) ( (This)->lpVtbl -> GetService(This,&(riid),ppv) )
|
||||
#define _IAudioClient_SetEventHandle(This,eventHandle) ( (This)->lpVtbl -> SetEventHandle(This,eventHandle) )
|
||||
#define _IAudioClient_GetBufferSize(This,pNumBufferFrames) ( (This)->lpVtbl -> GetBufferSize(This,pNumBufferFrames) )
|
||||
#define _IAudioClient_GetStreamLatency(This,phnsLatency) ( (This)->lpVtbl -> GetStreamLatency(This,phnsLatency) )
|
||||
#define _IAudioClient_GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) ( (This)->lpVtbl -> GetDevicePeriod(This,phnsDefaultDevicePeriod,phnsMinimumDevicePeriod) )
|
||||
#define _IMMDevice_Activate(This,iid,dwClsCtx,pActivationParams,ppv) ((This)->lpVtbl->Activate(This,&(iid),dwClsCtx,pActivationParams,ppv))
|
||||
#define _IMMDeviceEnumerator_EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices) (This)->lpVtbl->EnumAudioEndpoints(This,dataFlow,dwStateMask,ppDevices)
|
||||
#define _IMMDeviceEnumerator_GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint) (This)->lpVtbl->GetDefaultAudioEndpoint(This,dataFlow,role,ppEndpoint)
|
||||
#define _IMMDevice_OpenPropertyStore(This,stgmAccess,ppProperties) (This)->lpVtbl->OpenPropertyStore(This,stgmAccess,ppProperties)
|
||||
#define _IMMDevice_GetId(This,ppstrId) (This)->lpVtbl->GetId(This,ppstrId)
|
||||
#define _IPropertyStore_GetValue(This,key,pv) ( (This)->lpVtbl -> GetValue(This,&(key),pv) )
|
||||
#define _IMMDeviceCollection_GetCount(This,cProps) ( (This)->lpVtbl -> GetCount(This,cProps) )
|
||||
#endif
|
||||
|
||||
#define WASAPI_WARN(bool_exp, err_str, warn_exp) \
|
||||
if (!(bool_exp)) { \
|
||||
RARCH_WARN("[WASAPI]: %s.\n", err_str); \
|
||||
warn_exp; }
|
||||
|
||||
#define WASAPI_CHECK(bool_exp, err_str, err_exp) \
|
||||
if (!(bool_exp)) { \
|
||||
RARCH_ERR("[WASAPI]: %s.\n", err_str); \
|
||||
err_exp; }
|
||||
|
||||
#define WASAPI_HR_CHECK(hr, fun_str, err_exp) \
|
||||
if (FAILED(hr)) { \
|
||||
RARCH_ERR("[WASAPI]: %s failed with error 0x%.8X.\n", fun_str, hr); \
|
||||
err_exp; }
|
||||
|
||||
#define WASAPI_HR_WARN(hr, fun_str, warn_exp) \
|
||||
if (FAILED(hr)) { \
|
||||
RARCH_WARN("[WASAPI]: %s failed with error 0x%.8X.\n", fun_str, hr); \
|
||||
warn_exp; }
|
||||
|
||||
#define WASAPI_SR_CHECK(bool_exp, fun_str, err_exp) \
|
||||
if (!(bool_exp)) { \
|
||||
RARCH_ERR("[WASAPI]: %s failed with error %d.\n", fun_str, GetLastError()); \
|
||||
err_exp; }
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define WASAPI_RELEASE(iface) \
|
||||
if(iface) \
|
||||
{ \
|
||||
iface->Release(); \
|
||||
iface = NULL; \
|
||||
}
|
||||
#else
|
||||
#define WASAPI_RELEASE(iface) \
|
||||
if(iface) \
|
||||
{ \
|
||||
iface->lpVtbl->Release(iface);\
|
||||
iface = NULL; \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define WASAPI_FREE(ptr)\
|
||||
if(ptr) {\
|
||||
free(ptr);\
|
||||
ptr = NULL; }\
|
||||
|
||||
#define WASAPI_CO_FREE(ptr)\
|
||||
if(ptr) {\
|
||||
CoTaskMemFree(ptr);\
|
||||
ptr = NULL; }\
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool exclusive;
|
||||
@ -158,38 +40,6 @@ typedef struct
|
||||
fifo_buffer_t *buffer; /* NULL in unbuffered shared mode */
|
||||
} wasapi_t;
|
||||
|
||||
static bool wasapi_check_device_id(IMMDevice *device, const char *id)
|
||||
{
|
||||
HRESULT hr;
|
||||
bool result = false;
|
||||
LPWSTR dev_id = NULL, dev_cmp_id = NULL;
|
||||
int id_length = MultiByteToWideChar(CP_ACP, 0, id, -1, NULL, 0);
|
||||
|
||||
WASAPI_SR_CHECK(id_length > 0, "MultiByteToWideChar", goto error);
|
||||
|
||||
dev_cmp_id = (LPWSTR)malloc(id_length * sizeof(WCHAR));
|
||||
WASAPI_CHECK(dev_cmp_id, "Out of memory", goto error);
|
||||
|
||||
id_length = MultiByteToWideChar(CP_ACP, 0, id, -1, dev_cmp_id, id_length);
|
||||
WASAPI_SR_CHECK(id_length > 0, "MultiByteToWideChar", goto error);
|
||||
|
||||
hr = _IMMDevice_GetId(device, &dev_id);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::GetId", goto error);
|
||||
|
||||
result = lstrcmpW(dev_cmp_id, dev_id) == 0 ? true : false;
|
||||
|
||||
WASAPI_CO_FREE(dev_id);
|
||||
WASAPI_FREE(dev_cmp_id);
|
||||
|
||||
return result;
|
||||
|
||||
error:
|
||||
WASAPI_CO_FREE(dev_id);
|
||||
WASAPI_FREE(dev_cmp_id);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static IMMDevice *wasapi_init_device(const char *id)
|
||||
{
|
||||
HRESULT hr;
|
||||
@ -214,48 +64,85 @@ static IMMDevice *wasapi_init_device(const char *id)
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#endif
|
||||
WASAPI_HR_CHECK(hr, "CoCreateInstance", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
if (id)
|
||||
{
|
||||
int32_t idx_found = -1;
|
||||
struct string_list *list = (struct string_list*)mmdevice_list_new(NULL);
|
||||
|
||||
/* Search for device name first */
|
||||
if (list)
|
||||
{
|
||||
if (list->elems)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
RARCH_LOG("[WASAPI]: %d : %s\n", i, list->elems[i].data);
|
||||
if (string_is_equal(id, list->elems[i].data))
|
||||
{
|
||||
idx_found = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Index was not found yet based on name string,
|
||||
* just assume id is a one-character number index. */
|
||||
|
||||
if (idx_found == -1 && isdigit(id[0]))
|
||||
{
|
||||
idx_found = strtoul(id, NULL, 0);
|
||||
RARCH_LOG("[WASAPI]: Fallback, device index is a single number index instead: %d.\n", idx_found);
|
||||
|
||||
}
|
||||
}
|
||||
string_list_free(list);
|
||||
}
|
||||
|
||||
if (idx_found == -1)
|
||||
idx_found = 0;
|
||||
|
||||
hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator,
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::EnumAudioEndpoints",
|
||||
goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IMMDeviceCollection_GetCount(collection, &dev_count);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::GetCount", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = _IMMDeviceCollection_Item(collection, i, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::Item", continue);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
if (wasapi_check_device_id(device, id))
|
||||
if (i == idx_found)
|
||||
break;
|
||||
|
||||
WASAPI_RELEASE(device);
|
||||
IFACE_RELEASE(device);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
hr = _IMMDeviceEnumerator_GetDefaultAudioEndpoint(
|
||||
enumerator, eRender, eConsole, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::GetDefaultAudioEndpoint",
|
||||
goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!device)
|
||||
goto error;
|
||||
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
|
||||
return device;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
IFACE_RELEASE(collection);
|
||||
IFACE_RELEASE(enumerator);
|
||||
|
||||
if (id)
|
||||
{
|
||||
@ -271,7 +158,7 @@ error:
|
||||
|
||||
static unsigned wasapi_pref_rate(unsigned i)
|
||||
{
|
||||
const unsigned r[] = { 48000, 44100, 96000, 192000 };
|
||||
const unsigned r[] = { 48000, 44100, 96000, 192000, 32000 };
|
||||
|
||||
if (i >= sizeof(r) / sizeof(unsigned))
|
||||
return 0;
|
||||
@ -317,7 +204,8 @@ static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
HRESULT hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
/* once for float, once for pcm (requested first) */
|
||||
for (i = 0; i < 2; ++i)
|
||||
@ -346,11 +234,12 @@ static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
HRESULT hr;
|
||||
WASAPI_RELEASE(client);
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
#ifdef __cplusplus
|
||||
hr = client->Initialize(AUDCLNT_SHAREMODE_SHARED,
|
||||
@ -375,7 +264,8 @@ static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Initialize", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
*float_fmt = float_fmt_res;
|
||||
*rate = rate_res;
|
||||
@ -383,7 +273,7 @@ static IAudioClient *wasapi_init_client_sh(IMMDevice *device,
|
||||
return client;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(client);
|
||||
IFACE_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -402,10 +292,12 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
HRESULT hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
hr = _IAudioClient_GetDevicePeriod(client, NULL, &minimum_period);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetDevicePeriod", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
/* buffer_duration is in 100ns units */
|
||||
buffer_duration = latency * 10000.0;
|
||||
@ -438,13 +330,15 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
if (hr == AUDCLNT_E_BUFFER_SIZE_NOT_ALIGNED)
|
||||
{
|
||||
hr = _IAudioClient_GetBufferSize(client, &buffer_length);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetBufferSize", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
WASAPI_RELEASE(client);
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
buffer_duration = 10000.0 * 1000.0 / rate_res * buffer_length + 0.5;
|
||||
#ifdef __cplusplus
|
||||
@ -459,11 +353,12 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
}
|
||||
if (hr == AUDCLNT_E_ALREADY_INITIALIZED)
|
||||
{
|
||||
WASAPI_RELEASE(client);
|
||||
IFACE_RELEASE(client);
|
||||
hr = _IMMDevice_Activate(device,
|
||||
IID_IAudioClient,
|
||||
CLSCTX_ALL, NULL, (void**)&client);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::Activate", return NULL);
|
||||
if (FAILED(hr))
|
||||
return NULL;
|
||||
|
||||
#ifdef __cplusplus
|
||||
hr = client->Initialize(AUDCLNT_SHAREMODE_EXCLUSIVE,
|
||||
@ -477,11 +372,11 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
}
|
||||
if (hr != AUDCLNT_E_UNSUPPORTED_FORMAT)
|
||||
{
|
||||
WASAPI_WARN(hr != AUDCLNT_E_DEVICE_IN_USE,
|
||||
"Device already in use", goto error);
|
||||
if (hr == AUDCLNT_E_DEVICE_IN_USE)
|
||||
goto error;
|
||||
|
||||
WASAPI_WARN(hr != AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED,
|
||||
"Exclusive mode disabled", goto error);
|
||||
if (hr == AUDCLNT_E_EXCLUSIVE_MODE_NOT_ALLOWED)
|
||||
goto error;
|
||||
|
||||
i = 2; /* break from outer loop too */
|
||||
break;
|
||||
@ -494,7 +389,8 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Initialize", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
*float_fmt = float_fmt_res;
|
||||
*rate = rate_res;
|
||||
@ -502,7 +398,7 @@ static IAudioClient *wasapi_init_client_ex(IMMDevice *device,
|
||||
return client;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(client);
|
||||
IFACE_RELEASE(client);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
@ -538,7 +434,8 @@ static IAudioClient *wasapi_init_client(IMMDevice *device, bool *exclusive,
|
||||
}
|
||||
}
|
||||
|
||||
WASAPI_CHECK(client, "Failed to initialize client", return NULL);
|
||||
if (!client)
|
||||
return NULL;
|
||||
|
||||
/* next calls are allowed to fail (we losing info only) */
|
||||
|
||||
@ -596,11 +493,12 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
bool float_format = settings->bools.audio_wasapi_float_format;
|
||||
int sh_buffer_length = settings->ints.audio_wasapi_sh_buffer_length;
|
||||
wasapi_t *w = (wasapi_t*)calloc(1, sizeof(wasapi_t));
|
||||
|
||||
if (!w)
|
||||
return NULL;
|
||||
|
||||
w->exclusive = settings->bools.audio_wasapi_exclusive_mode;
|
||||
|
||||
WASAPI_CHECK(w, "Out of memory", return NULL);
|
||||
|
||||
w->device = wasapi_init_device(dev_id);
|
||||
w->device = wasapi_init_device(dev_id);
|
||||
if (!w->device && dev_id)
|
||||
w->device = wasapi_init_device(NULL);
|
||||
if (!w->device)
|
||||
@ -612,14 +510,17 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
goto error;
|
||||
|
||||
hr = _IAudioClient_GetBufferSize(w->client, &frame_count);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetBufferSize", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
w->frame_size = float_format ? 8 : 4;
|
||||
w->frame_size = float_format ? 8 : 4;
|
||||
w->engine_buffer_size = frame_count * w->frame_size;
|
||||
|
||||
if (w->exclusive)
|
||||
{
|
||||
w->buffer = fifo_new(w->engine_buffer_size);
|
||||
WASAPI_CHECK(w->buffer, "Out of memory", goto error);
|
||||
if (!w->buffer)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[WASAPI]: Intermediate buffer length is %u frames (%.1fms).\n",
|
||||
frame_count, (double)frame_count * 1000.0 / rate);
|
||||
@ -629,13 +530,15 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
if (sh_buffer_length < 0)
|
||||
{
|
||||
hr = _IAudioClient_GetDevicePeriod(w->client, &dev_period, NULL);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetDevicePeriod", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
sh_buffer_length = dev_period * rate / 10000000;
|
||||
}
|
||||
|
||||
w->buffer = fifo_new(sh_buffer_length * w->frame_size);
|
||||
WASAPI_CHECK(w->buffer, "Out of memory", goto error);
|
||||
if (!w->buffer)
|
||||
goto error;
|
||||
|
||||
RARCH_LOG("[WASAPI]: Intermediate buffer length is %u frames (%.1fms).\n",
|
||||
sh_buffer_length, (double)sh_buffer_length * 1000.0 / rate);
|
||||
@ -646,34 +549,40 @@ static void *wasapi_init(const char *dev_id, unsigned rate, unsigned latency,
|
||||
}
|
||||
|
||||
w->write_event = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
WASAPI_SR_CHECK(w->write_event, "CreateEventA", goto error);
|
||||
if (!w->write_event)
|
||||
goto error;
|
||||
|
||||
hr = _IAudioClient_SetEventHandle(w->client, w->write_event);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::SetEventHandle", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IAudioClient_GetService(w->client,
|
||||
IID_IAudioRenderClient, (void**)&w->renderer);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetService", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IAudioRenderClient_GetBuffer(w->renderer, frame_count, &dest);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IAudioRenderClient_ReleaseBuffer(
|
||||
w->renderer, frame_count,
|
||||
AUDCLNT_BUFFERFLAGS_SILENT);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", goto error);
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
|
||||
hr = _IAudioClient_Start(w->client);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Start", goto error);
|
||||
w->running = true;
|
||||
if (FAILED(hr))
|
||||
goto error;
|
||||
w->running = true;
|
||||
w->blocking = settings->bools.audio_sync;
|
||||
|
||||
return w;
|
||||
|
||||
error:
|
||||
WASAPI_RELEASE(w->renderer);
|
||||
WASAPI_RELEASE(w->client);
|
||||
WASAPI_RELEASE(w->device);
|
||||
IFACE_RELEASE(w->renderer);
|
||||
IFACE_RELEASE(w->client);
|
||||
IFACE_RELEASE(w->device);
|
||||
if (w->write_event)
|
||||
CloseHandle(w->write_event);
|
||||
if (w->buffer)
|
||||
@ -689,13 +598,15 @@ static bool wasapi_flush(wasapi_t * w, const void * data, size_t size)
|
||||
UINT32 frame_count = size / w->frame_size;
|
||||
HRESULT hr = _IAudioRenderClient_GetBuffer(
|
||||
w->renderer, frame_count, &dest);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", return false)
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
memcpy(dest, data, size);
|
||||
hr = _IAudioRenderClient_ReleaseBuffer(
|
||||
w->renderer, frame_count,
|
||||
0);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", return false);
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -706,13 +617,15 @@ static bool wasapi_flush_buffer(wasapi_t * w, size_t size)
|
||||
UINT32 frame_count = size / w->frame_size;
|
||||
HRESULT hr = _IAudioRenderClient_GetBuffer(
|
||||
w->renderer, frame_count, &dest);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::GetBuffer", return false)
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
fifo_read(w->buffer, dest, size);
|
||||
hr = _IAudioRenderClient_ReleaseBuffer(
|
||||
w->renderer, frame_count,
|
||||
0);
|
||||
WASAPI_HR_CHECK(hr, "IAudioRenderClient::ReleaseBuffer", return false);
|
||||
if (FAILED(hr))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -735,20 +648,20 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
if (w->blocking)
|
||||
{
|
||||
ir = WaitForSingleObject(w->write_event, INFINITE);
|
||||
WASAPI_SR_CHECK(ir == WAIT_OBJECT_0, "WaitForSingleObject", return -1);
|
||||
if (!(ir == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return -1);
|
||||
if (FAILED(hr))
|
||||
return -1;
|
||||
|
||||
read_avail = fifo_read_avail(w->buffer);
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
written = read_avail < write_avail ? read_avail : write_avail;
|
||||
if (written)
|
||||
{
|
||||
if (!wasapi_flush_buffer(w, written))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
write_avail = fifo_write_avail(w->buffer);
|
||||
@ -761,11 +674,13 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
if (w->blocking)
|
||||
{
|
||||
ir = WaitForSingleObject(w->write_event, INFINITE);
|
||||
WASAPI_SR_CHECK(ir == WAIT_OBJECT_0, "WaitForSingleObject", return -1);
|
||||
if (!(ir == WAIT_OBJECT_0))
|
||||
return -1;
|
||||
}
|
||||
|
||||
hr = _IAudioClient_GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return -1);
|
||||
if (FAILED(hr))
|
||||
return -1;
|
||||
|
||||
write_avail = w->engine_buffer_size - padding * w->frame_size;
|
||||
if (!write_avail)
|
||||
@ -773,10 +688,8 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
|
||||
written = size < write_avail ? size : write_avail;
|
||||
if (written)
|
||||
{
|
||||
if (!wasapi_flush(w, data, written))
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return written;
|
||||
@ -784,20 +697,19 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size)
|
||||
|
||||
static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size)
|
||||
{
|
||||
ssize_t writen = 0;
|
||||
ssize_t written = 0;
|
||||
size_t write_avail = fifo_write_avail(w->buffer);
|
||||
|
||||
if (!write_avail)
|
||||
{
|
||||
DWORD ir = WaitForSingleObject(
|
||||
w->write_event, w->blocking ? INFINITE : 0);
|
||||
if (ir != WAIT_OBJECT_0 && w->blocking)
|
||||
{
|
||||
RARCH_ERR("[WASAPI]: WaitForSingleObject failed with error %d.\n", GetLastError());
|
||||
return -1;
|
||||
}
|
||||
if (ir != WAIT_OBJECT_0)
|
||||
{
|
||||
if (w->blocking)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!wasapi_flush_buffer(w, w->engine_buffer_size))
|
||||
return -1;
|
||||
@ -805,10 +717,10 @@ static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size)
|
||||
write_avail = w->engine_buffer_size;
|
||||
}
|
||||
|
||||
writen = size < write_avail ? size : write_avail;
|
||||
fifo_write(w->buffer, data, writen);
|
||||
written = size < write_avail ? size : write_avail;
|
||||
fifo_write(w->buffer, data, written);
|
||||
|
||||
return writen;
|
||||
return written;
|
||||
}
|
||||
|
||||
static ssize_t wasapi_write(void *wh, const void *data, size_t size)
|
||||
@ -841,7 +753,8 @@ static bool wasapi_stop(void *wh)
|
||||
{
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
HRESULT hr = _IAudioClient_Stop(w->client);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Stop", return !w->running);
|
||||
if (FAILED(hr))
|
||||
return !w->running;
|
||||
|
||||
w->running = false;
|
||||
|
||||
@ -856,7 +769,8 @@ static bool wasapi_start(void *wh, bool u)
|
||||
if (hr == AUDCLNT_E_NOT_STOPPED)
|
||||
return true;
|
||||
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::Start", return w->running);
|
||||
if (FAILED(hr))
|
||||
return w->running;
|
||||
|
||||
w->running = true;
|
||||
|
||||
@ -885,11 +799,11 @@ static void wasapi_free(void *wh)
|
||||
wasapi_t *w = (wasapi_t*)wh;
|
||||
HANDLE write_event = w->write_event;
|
||||
|
||||
WASAPI_RELEASE(w->renderer);
|
||||
IFACE_RELEASE(w->renderer);
|
||||
if (w->client)
|
||||
_IAudioClient_Stop(w->client);
|
||||
WASAPI_RELEASE(w->client);
|
||||
WASAPI_RELEASE(w->device);
|
||||
IFACE_RELEASE(w->client);
|
||||
IFACE_RELEASE(w->device);
|
||||
if (w->buffer)
|
||||
fifo_free(w->buffer);
|
||||
free(w);
|
||||
@ -901,7 +815,8 @@ static void wasapi_free(void *wh)
|
||||
}
|
||||
|
||||
/* If event isn't signaled log and leak */
|
||||
WASAPI_CHECK(ir == WAIT_OBJECT_0, "Memory leak in wasapi_free", return);
|
||||
if (!(ir == WAIT_OBJECT_0))
|
||||
return;
|
||||
|
||||
CloseHandle(write_event);
|
||||
}
|
||||
@ -913,125 +828,12 @@ static bool wasapi_use_float(void *wh)
|
||||
return w->frame_size == 8;
|
||||
}
|
||||
|
||||
static void *wasapi_device_list_new(void *u)
|
||||
{
|
||||
HRESULT hr;
|
||||
UINT i;
|
||||
PROPVARIANT prop_var;
|
||||
int ir;
|
||||
union string_list_elem_attr attr;
|
||||
IMMDeviceEnumerator *enumerator = NULL;
|
||||
IMMDeviceCollection *collection = NULL;
|
||||
UINT dev_count = 0;
|
||||
IMMDevice *device = NULL;
|
||||
LPWSTR dev_id_wstr = NULL;
|
||||
IPropertyStore *prop_store = NULL;
|
||||
bool prop_var_init = false;
|
||||
bool br = false;
|
||||
char *dev_id_str = NULL;
|
||||
char *dev_name_str = NULL;
|
||||
struct string_list *sl = string_list_new();
|
||||
|
||||
WASAPI_CHECK(sl, "string_list_new failed", return NULL);
|
||||
|
||||
attr.i = 0;
|
||||
#ifdef __cplusplus
|
||||
hr = CoCreateInstance(CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#else
|
||||
hr = CoCreateInstance(&CLSID_MMDeviceEnumerator, NULL, CLSCTX_ALL,
|
||||
&IID_IMMDeviceEnumerator, (void **)&enumerator);
|
||||
#endif
|
||||
WASAPI_HR_CHECK(hr, "CoCreateInstance", goto error);
|
||||
|
||||
hr = _IMMDeviceEnumerator_EnumAudioEndpoints(enumerator,
|
||||
eRender, DEVICE_STATE_ACTIVE, &collection);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceEnumerator::EnumAudioEndpoints", goto error);
|
||||
|
||||
hr = _IMMDeviceCollection_GetCount(collection, &dev_count);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::GetCount", goto error);
|
||||
|
||||
for (i = 0; i < dev_count; ++i)
|
||||
{
|
||||
hr = _IMMDeviceCollection_Item(collection, i, &device);
|
||||
WASAPI_HR_CHECK(hr, "IMMDeviceCollection::Item", goto error);
|
||||
|
||||
hr = _IMMDevice_GetId(device, &dev_id_wstr);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::GetId", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, dev_id_wstr, -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
dev_id_str = (char *)malloc(ir);
|
||||
WASAPI_CHECK(dev_id_str, "Out of memory", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, dev_id_wstr, -1,
|
||||
dev_id_str, ir, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
hr = _IMMDevice_OpenPropertyStore(device, STGM_READ, &prop_store);
|
||||
WASAPI_HR_CHECK(hr, "IMMDevice::OpenPropertyStore", goto error);
|
||||
|
||||
PropVariantInit(&prop_var);
|
||||
prop_var_init = true;
|
||||
hr = _IPropertyStore_GetValue(prop_store, PKEY_Device_FriendlyName,
|
||||
&prop_var);
|
||||
WASAPI_HR_CHECK(hr, "IPropertyStore::GetValue", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, prop_var.pwszVal, -1,
|
||||
NULL, 0, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
dev_name_str = (char *)malloc(ir);
|
||||
WASAPI_CHECK(dev_name_str, "Out of memory", goto error);
|
||||
|
||||
ir = WideCharToMultiByte(CP_ACP, 0, prop_var.pwszVal, -1,
|
||||
dev_name_str, ir, NULL, NULL);
|
||||
WASAPI_SR_CHECK(ir, "WideCharToMultiByte", goto error);
|
||||
|
||||
RARCH_LOG("[WASAPI]: %s %s\n", dev_name_str, dev_id_str);
|
||||
|
||||
br = string_list_append(sl, dev_id_str, attr);
|
||||
WASAPI_CHECK(br, "string_list_append failed", goto error);
|
||||
|
||||
PropVariantClear(&prop_var);
|
||||
prop_var_init = false;
|
||||
WASAPI_CO_FREE(dev_id_wstr);
|
||||
WASAPI_FREE(dev_id_str);
|
||||
WASAPI_FREE(dev_name_str);
|
||||
WASAPI_RELEASE(prop_store);
|
||||
WASAPI_RELEASE(device);
|
||||
}
|
||||
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
|
||||
return sl;
|
||||
|
||||
error:
|
||||
WASAPI_FREE(dev_id_str);
|
||||
WASAPI_FREE(dev_name_str);
|
||||
if (prop_var_init)
|
||||
PropVariantClear(&prop_var);
|
||||
WASAPI_RELEASE(prop_store);
|
||||
WASAPI_CO_FREE(dev_id_wstr);
|
||||
WASAPI_RELEASE(device);
|
||||
WASAPI_RELEASE(collection);
|
||||
WASAPI_RELEASE(enumerator);
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
|
||||
RARCH_ERR("[WASAPI]: Device enumeration failed.\n");
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void wasapi_device_list_free(void *u, void *slp)
|
||||
{
|
||||
struct string_list *sl = (struct string_list*)slp;
|
||||
|
||||
string_list_free(sl);
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
}
|
||||
|
||||
static size_t wasapi_write_avail(void *wh)
|
||||
@ -1044,7 +846,8 @@ static size_t wasapi_write_avail(void *wh)
|
||||
return fifo_write_avail(w->buffer);
|
||||
|
||||
hr = _IAudioClient_GetCurrentPadding(w->client, &padding);
|
||||
WASAPI_HR_CHECK(hr, "IAudioClient::GetCurrentPadding", return 0);
|
||||
if (FAILED(hr))
|
||||
return 0;
|
||||
|
||||
return w->engine_buffer_size - padding * w->frame_size;
|
||||
}
|
||||
@ -1069,7 +872,7 @@ audio_driver_t audio_wasapi = {
|
||||
wasapi_free,
|
||||
wasapi_use_float,
|
||||
"wasapi",
|
||||
wasapi_device_list_new,
|
||||
mmdevice_list_new,
|
||||
wasapi_device_list_free,
|
||||
wasapi_write_avail,
|
||||
wasapi_buffer_size
|
||||
|
@ -28,6 +28,9 @@
|
||||
|
||||
#include <compat/msvc.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <encodings/utf.h>
|
||||
#include <lists/string_list.h>
|
||||
|
||||
#if defined(_MSC_VER) && (_WIN32_WINNT <= _WIN32_WINNT_WIN2K)
|
||||
/* needed for CoInitializeEx */
|
||||
@ -36,6 +39,10 @@
|
||||
|
||||
#include "xaudio.h"
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
#include "../common/mmdevice_common.h"
|
||||
#endif
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
@ -59,6 +66,9 @@ typedef struct
|
||||
size_t bufsize;
|
||||
} xa_t;
|
||||
|
||||
/* Forward declarations */
|
||||
static void *xa_list_new(void *u);
|
||||
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
struct xaudio2 : public IXAudio2VoiceCallback
|
||||
#else
|
||||
@ -126,29 +136,6 @@ const struct IXAudio2VoiceCallbackVtbl voice_vtable = {
|
||||
};
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static void xaudio2_enumerate_devices(xaudio2_t *xa)
|
||||
{
|
||||
uint32_t dev_count = 0;
|
||||
unsigned i = 0;
|
||||
|
||||
(void)xa;
|
||||
(void)i;
|
||||
(void)dev_count;
|
||||
#ifndef _XBOX
|
||||
IXAudio2_GetDeviceCount(xa->pXAudio2, &dev_count);
|
||||
fprintf(stderr, "XAudio2 devices:\n");
|
||||
|
||||
for (i = 0; i < dev_count; i++)
|
||||
{
|
||||
XAUDIO2_DEVICE_DETAILS dev_detail;
|
||||
IXAudio2_GetDeviceDetails(xa->pXAudio2, i, &dev_detail);
|
||||
fwprintf(stderr, L"\t%u: %s\n", i, dev_detail.DisplayName);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static void xaudio2_set_wavefmt(WAVEFORMATEX *wfx,
|
||||
unsigned channels, unsigned samplerate)
|
||||
{
|
||||
@ -197,20 +184,22 @@ static void xaudio2_free(xaudio2_t *handle)
|
||||
}
|
||||
|
||||
static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
size_t size, unsigned device)
|
||||
size_t size, const char *device)
|
||||
{
|
||||
xaudio2_t *handle = NULL;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
|
||||
int32_t idx_found = -1;
|
||||
WAVEFORMATEX wfx = {0};
|
||||
struct string_list *list = NULL;
|
||||
#if defined(__cplusplus) && !defined(CINTERFACE)
|
||||
handle = new xaudio2;
|
||||
xaudio2_t *handle = new xaudio2;
|
||||
#else
|
||||
handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
xaudio2_t *handle = (xaudio2_t*)calloc(1, sizeof(*handle));
|
||||
#endif
|
||||
|
||||
if (!handle)
|
||||
goto error;
|
||||
|
||||
list = (struct string_list*)xa_list_new(NULL);
|
||||
|
||||
#if !defined(__cplusplus) || defined(CINTERFACE)
|
||||
handle->lpVtbl = &voice_vtable;
|
||||
#endif
|
||||
@ -218,11 +207,56 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
if (FAILED(XAudio2Create(&handle->pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR)))
|
||||
goto error;
|
||||
|
||||
if (device)
|
||||
{
|
||||
/* Search for device name first */
|
||||
if (list && list->elems)
|
||||
{
|
||||
if (list->elems)
|
||||
{
|
||||
unsigned i;
|
||||
for (i = 0; i < list->size; i++)
|
||||
{
|
||||
if (string_is_equal(device, list->elems[i].data))
|
||||
{
|
||||
idx_found = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Index was not found yet based on name string,
|
||||
* just assume id is a one-character number index. */
|
||||
|
||||
if (idx_found == -1)
|
||||
{
|
||||
if (isdigit(device[0]))
|
||||
{
|
||||
RARCH_LOG("[XAudio2]: Fallback, device index is a single number index instead: %d.\n", idx_found);
|
||||
idx_found = strtoul(device, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (idx_found == -1)
|
||||
idx_found = 0;
|
||||
|
||||
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, (LPCWSTR)(uintptr_t)device, NULL, AudioCategory_GameEffects)))
|
||||
goto error;
|
||||
{
|
||||
wchar_t *temp = NULL;
|
||||
if (device)
|
||||
temp = utf8_to_utf16_string_alloc((const char*)list->elems[idx_found].userdata);
|
||||
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, (LPCWSTR)(uintptr_t)temp, NULL, AudioCategory_GameEffects)))
|
||||
{
|
||||
free(temp);
|
||||
goto error;
|
||||
}
|
||||
if (temp)
|
||||
free(temp);
|
||||
}
|
||||
#else
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL)))
|
||||
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, idx_found, NULL)))
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
@ -247,16 +281,65 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
|
||||
XAUDIO2_COMMIT_NOW)))
|
||||
goto error;
|
||||
|
||||
if (list)
|
||||
string_list_free(list);
|
||||
return handle;
|
||||
|
||||
error:
|
||||
if (list)
|
||||
string_list_free(list);
|
||||
xaudio2_free(handle);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static size_t xaudio2_write(xaudio2_t *handle, const uint8_t *buffer, size_t bytes_)
|
||||
static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
unsigned bytes = bytes_;
|
||||
size_t bufsize;
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
if (!xa)
|
||||
return NULL;
|
||||
|
||||
if (latency < 8)
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
||||
xa->xa = xaudio2_new(rate, 2, xa->bufsize, device);
|
||||
if (!xa->xa)
|
||||
{
|
||||
RARCH_ERR("Failed to init XAudio2.\n");
|
||||
free(xa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return xa;
|
||||
}
|
||||
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
unsigned bytes;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
xaudio2_t *handle = xa->xa;
|
||||
const uint8_t *buffer = (const uint8_t*)buf;
|
||||
|
||||
if (xa->nonblock)
|
||||
{
|
||||
size_t avail = XAUDIO2_WRITE_AVAILABLE(xa->xa);
|
||||
|
||||
if (avail == 0)
|
||||
return 0;
|
||||
if (avail < size)
|
||||
size = avail;
|
||||
}
|
||||
|
||||
bytes = size;
|
||||
|
||||
while (bytes)
|
||||
{
|
||||
@ -289,7 +372,11 @@ static size_t xaudio2_write(xaudio2_t *handle, const uint8_t *buffer, size_t byt
|
||||
|
||||
if (FAILED(IXAudio2SourceVoice_SubmitSourceBuffer(
|
||||
handle->pSourceVoice, &xa2buffer, NULL)))
|
||||
{
|
||||
if (size > 0)
|
||||
return -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
InterlockedIncrement((LONG volatile*)&handle->buffers);
|
||||
handle->bufptr = 0;
|
||||
@ -297,62 +384,7 @@ static size_t xaudio2_write(xaudio2_t *handle, const uint8_t *buffer, size_t byt
|
||||
}
|
||||
}
|
||||
|
||||
return bytes_;
|
||||
}
|
||||
|
||||
static void *xa_init(const char *device, unsigned rate, unsigned latency,
|
||||
unsigned block_frames,
|
||||
unsigned *new_rate)
|
||||
{
|
||||
size_t bufsize;
|
||||
unsigned device_index = 0;
|
||||
xa_t *xa = (xa_t*)calloc(1, sizeof(*xa));
|
||||
if (!xa)
|
||||
return NULL;
|
||||
|
||||
if (latency < 8)
|
||||
latency = 8; /* Do not allow shenanigans. */
|
||||
|
||||
bufsize = latency * rate / 1000;
|
||||
|
||||
RARCH_LOG("[XAudio2]: Requesting %u ms latency, using %d ms latency.\n",
|
||||
latency, (int)bufsize * 1000 / rate);
|
||||
|
||||
xa->bufsize = bufsize * 2 * sizeof(float);
|
||||
|
||||
if (device)
|
||||
device_index = strtoul(device, NULL, 0);
|
||||
|
||||
xa->xa = xaudio2_new(rate, 2, xa->bufsize, device_index);
|
||||
if (!xa->xa)
|
||||
{
|
||||
RARCH_ERR("Failed to init XAudio2.\n");
|
||||
free(xa);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return xa;
|
||||
}
|
||||
|
||||
static ssize_t xa_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
size_t ret;
|
||||
xa_t *xa = (xa_t*)data;
|
||||
|
||||
if (xa->nonblock)
|
||||
{
|
||||
size_t avail = XAUDIO2_WRITE_AVAILABLE(xa->xa);
|
||||
|
||||
if (avail == 0)
|
||||
return 0;
|
||||
if (avail < size)
|
||||
size = avail;
|
||||
}
|
||||
|
||||
ret = xaudio2_write(xa->xa, (const uint8_t*)buf, size);
|
||||
if (ret == 0 && size > 0)
|
||||
return -1;
|
||||
return ret;
|
||||
return size;
|
||||
}
|
||||
|
||||
static bool xa_stop(void *data)
|
||||
@ -414,6 +446,58 @@ static size_t xa_buffer_size(void *data)
|
||||
return xa->bufsize;
|
||||
}
|
||||
|
||||
static void xa_device_list_free(void *u, void *slp)
|
||||
{
|
||||
struct string_list *sl = (struct string_list*)slp;
|
||||
|
||||
if (sl)
|
||||
string_list_free(sl);
|
||||
}
|
||||
|
||||
static void *xa_list_new(void *u)
|
||||
{
|
||||
#if defined(_XBOX) || !(_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
|
||||
unsigned i;
|
||||
union string_list_elem_attr attr;
|
||||
uint32_t dev_count = 0;
|
||||
IXAudio2 *ixa2 = NULL;
|
||||
struct string_list *sl = string_list_new();
|
||||
|
||||
if (!sl)
|
||||
return NULL;
|
||||
|
||||
attr.i = 0;
|
||||
|
||||
if (FAILED(XAudio2Create(&ixa2, 0, XAUDIO2_DEFAULT_PROCESSOR)))
|
||||
return NULL;
|
||||
|
||||
IXAudio2_GetDeviceCount(ixa2, &dev_count);
|
||||
|
||||
for (i = 0; i < dev_count; i++)
|
||||
{
|
||||
XAUDIO2_DEVICE_DETAILS dev_detail;
|
||||
if (IXAudio2_GetDeviceDetails(ixa2, i, &dev_detail) == S_OK)
|
||||
{
|
||||
char *str = utf16_to_utf8_string_alloc(dev_detail.DisplayName);
|
||||
|
||||
if (str)
|
||||
{
|
||||
string_list_append(sl, str, attr);
|
||||
free(str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IXAudio2_Release(ixa2);
|
||||
|
||||
return sl;
|
||||
#elif defined(__WINRT__)
|
||||
return NULL;
|
||||
#else
|
||||
return mmdevice_list_new(u);
|
||||
#endif
|
||||
}
|
||||
|
||||
audio_driver_t audio_xa = {
|
||||
xa_init,
|
||||
xa_write,
|
||||
@ -424,8 +508,8 @@ audio_driver_t audio_xa = {
|
||||
xa_free,
|
||||
xa_use_float,
|
||||
"xaudio",
|
||||
NULL,
|
||||
NULL,
|
||||
xa_list_new,
|
||||
xa_device_list_free,
|
||||
xa_write_avail,
|
||||
xa_buffer_size,
|
||||
};
|
||||
|
@ -314,6 +314,8 @@ DECLARE_INTERFACE_(IXAudio2, IUnknown)
|
||||
#define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice()
|
||||
#define IXAudio2_Release(handle) handle->Release()
|
||||
#define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g)
|
||||
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->GetDeviceCount(puCount)
|
||||
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->GetDeviceDetails(Index, pDeviceDetails)
|
||||
#define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f)
|
||||
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
|
||||
#else
|
||||
|
File diff suppressed because it is too large
Load Diff
48
command.h
48
command.h
@ -72,11 +72,8 @@ enum event_command
|
||||
CMD_EVENT_REWIND_INIT,
|
||||
/* Toggles rewind. */
|
||||
CMD_EVENT_REWIND_TOGGLE,
|
||||
/* Deinitializes autosave. */
|
||||
CMD_EVENT_AUTOSAVE_DEINIT,
|
||||
/* Initializes autosave. */
|
||||
CMD_EVENT_AUTOSAVE_INIT,
|
||||
CMD_EVENT_AUTOSAVE_STATE,
|
||||
/* Stops audio. */
|
||||
CMD_EVENT_AUDIO_STOP,
|
||||
/* Starts audio. */
|
||||
@ -101,10 +98,6 @@ enum event_command
|
||||
CMD_EVENT_OVERLAY_NEXT,
|
||||
/* Deinitializes overlay. */
|
||||
CMD_EVENT_DSP_FILTER_INIT,
|
||||
/* Deinitializes graphics filter. */
|
||||
CMD_EVENT_DSP_FILTER_DEINIT,
|
||||
/* Deinitializes GPU recoring. */
|
||||
CMD_EVENT_GPU_RECORD_DEINIT,
|
||||
/* Initializes recording system. */
|
||||
CMD_EVENT_RECORD_INIT,
|
||||
/* Deinitializes recording system. */
|
||||
@ -121,19 +114,12 @@ enum event_command
|
||||
CMD_EVENT_CORE_DEINIT,
|
||||
/* Initializes core. */
|
||||
CMD_EVENT_CORE_INIT,
|
||||
/* Set audio blocking state. */
|
||||
CMD_EVENT_AUDIO_SET_BLOCKING_STATE,
|
||||
/* Set audio nonblocking state. */
|
||||
CMD_EVENT_AUDIO_SET_NONBLOCKING_STATE,
|
||||
/* Apply video state changes. */
|
||||
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES,
|
||||
/* Set video blocking state. */
|
||||
CMD_EVENT_VIDEO_SET_BLOCKING_STATE,
|
||||
/* Set video nonblocking state. */
|
||||
CMD_EVENT_VIDEO_SET_NONBLOCKING_STATE,
|
||||
/* Sets current aspect ratio index. */
|
||||
CMD_EVENT_VIDEO_SET_ASPECT_RATIO,
|
||||
CMD_EVENT_RESET_CONTEXT,
|
||||
/* Restarts RetroArch. */
|
||||
CMD_EVENT_RESTART_RETROARCH,
|
||||
/* Shutdown the OS */
|
||||
@ -152,7 +138,6 @@ enum event_command
|
||||
CMD_EVENT_UNPAUSE,
|
||||
/* Unpauses retroArch. */
|
||||
CMD_EVENT_PAUSE,
|
||||
CMD_EVENT_PAUSE_CHECKS,
|
||||
CMD_EVENT_MENU_RESET_TO_DEFAULT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG,
|
||||
CMD_EVENT_MENU_SAVE_CURRENT_CONFIG_OVERRIDE_CORE,
|
||||
@ -166,20 +151,8 @@ enum event_command
|
||||
CMD_EVENT_SHADERS_APPLY_CHANGES,
|
||||
/* A new shader preset has been loaded */
|
||||
CMD_EVENT_SHADER_PRESET_LOADED,
|
||||
/* Initializes shader directory. */
|
||||
CMD_EVENT_SHADER_DIR_INIT,
|
||||
/* Deinitializes shader directory. */
|
||||
CMD_EVENT_SHADER_DIR_DEINIT,
|
||||
/* Initializes controllers. */
|
||||
CMD_EVENT_CONTROLLERS_INIT,
|
||||
/* Initializes cheats. */
|
||||
CMD_EVENT_CHEATS_INIT,
|
||||
/* Deinitializes cheats. */
|
||||
CMD_EVENT_CHEATS_DEINIT,
|
||||
/* Apply cheats. */
|
||||
CMD_EVENT_CHEATS_APPLY,
|
||||
/* Deinitializes network system. */
|
||||
CMD_EVENT_NETWORK_DEINIT,
|
||||
/* Initializes network system. */
|
||||
CMD_EVENT_NETWORK_INIT,
|
||||
/* Initializes netplay system with a string or no host specified. */
|
||||
@ -196,22 +169,6 @@ enum event_command
|
||||
CMD_EVENT_NETPLAY_ENABLE_HOST,
|
||||
/* Disconnect from the netplay host. */
|
||||
CMD_EVENT_NETPLAY_DISCONNECT,
|
||||
/* Initializes BSV movie. */
|
||||
CMD_EVENT_BSV_MOVIE_INIT,
|
||||
/* Deinitializes BSV movie. */
|
||||
CMD_EVENT_BSV_MOVIE_DEINIT,
|
||||
/* Initializes command interface. */
|
||||
CMD_EVENT_COMMAND_INIT,
|
||||
/* Deinitialize command interface. */
|
||||
CMD_EVENT_COMMAND_DEINIT,
|
||||
/* Initializes remote gamepad interface. */
|
||||
CMD_EVENT_REMOTE_INIT,
|
||||
/* Deinitializes remote gamepad interface. */
|
||||
CMD_EVENT_REMOTE_DEINIT,
|
||||
/* Initializes keyboard to gamepad mapper interface. */
|
||||
CMD_EVENT_MAPPER_INIT,
|
||||
/* Deinitializes keyboard to gamepad mapper interface. */
|
||||
CMD_EVENT_MAPPER_DEINIT,
|
||||
/* Reinitializes audio driver. */
|
||||
CMD_EVENT_AUDIO_REINIT,
|
||||
/* Resizes windowed scale. Will reinitialize video driver. */
|
||||
@ -235,16 +192,11 @@ enum event_command
|
||||
CMD_EVENT_UI_COMPANION_TOGGLE,
|
||||
/* Toggles fullscreen mode. */
|
||||
CMD_EVENT_FULLSCREEN_TOGGLE,
|
||||
CMD_EVENT_PERFCNT_REPORT_FRONTEND_LOG,
|
||||
CMD_EVENT_VOLUME_UP,
|
||||
CMD_EVENT_VOLUME_DOWN,
|
||||
CMD_EVENT_MIXER_VOLUME_UP,
|
||||
CMD_EVENT_MIXER_VOLUME_DOWN,
|
||||
CMD_EVENT_DISABLE_OVERRIDES,
|
||||
CMD_EVENT_RESTORE_REMAPS,
|
||||
CMD_EVENT_RESTORE_DEFAULT_SHADER_PRESET,
|
||||
CMD_EVENT_DISCORD_INIT,
|
||||
CMD_EVENT_DISCORD_DEINIT,
|
||||
CMD_EVENT_DISCORD_UPDATE,
|
||||
CMD_EVENT_OSK_TOGGLE,
|
||||
CMD_EVENT_RECORDING_TOGGLE,
|
||||
|
82
config.def.h
82
config.def.h
@ -53,6 +53,46 @@
|
||||
#define DEFAULT_ASPECT_RATIO -1.0f
|
||||
#endif
|
||||
|
||||
#if defined(ANDROID)
|
||||
#define DEFAULT_MAX_PADS 8
|
||||
#define ANDROID_KEYBOARD_PORT DEFAULT_MAX_PADS
|
||||
#elif defined(_3DS)
|
||||
#define DEFAULT_MAX_PADS 1
|
||||
#elif defined(SWITCH) || defined(HAVE_LIBNX)
|
||||
#define DEFAULT_MAX_PADS 8
|
||||
#elif defined(WIIU)
|
||||
#ifdef WIIU_HID
|
||||
#define DEFAULT_MAX_PADS 16
|
||||
#else
|
||||
#define DEFAULT_MAX_PADS 5
|
||||
#endif
|
||||
#elif defined(DJGPP)
|
||||
#define DEFAULT_MAX_PADS 1
|
||||
#define DOS_KEYBOARD_PORT DEFAULT_MAX_PADS
|
||||
#elif defined(XENON)
|
||||
#define DEFAULT_MAX_PADS 4
|
||||
#elif defined(VITA) || defined(SN_TARGET_PSP2)
|
||||
#define DEFAULT_MAX_PADS 4
|
||||
#elif defined(PSP)
|
||||
#define DEFAULT_MAX_PADS 1
|
||||
#elif defined(PS2)
|
||||
#define DEFAULT_MAX_PADS 2
|
||||
#elif defined(GEKKO) || defined(HW_RVL)
|
||||
#define DEFAULT_MAX_PADS 4
|
||||
#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__))
|
||||
#define DEFAULT_MAX_PADS 8
|
||||
#elif defined(__QNX__)
|
||||
#define DEFAULT_MAX_PADS 8
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
#define DEFAULT_MAX_PADS 7
|
||||
#elif defined(_XBOX)
|
||||
#define DEFAULT_MAX_PADS 4
|
||||
#elif defined(HAVE_XINPUT) && !defined(HAVE_DINPUT)
|
||||
#define DEFAULT_MAX_PADS 4
|
||||
#else
|
||||
#define DEFAULT_MAX_PADS 16
|
||||
#endif
|
||||
|
||||
#if defined(RARCH_MOBILE) || defined(HAVE_LIBNX)
|
||||
#define DEFAULT_POINTER_ENABLE true
|
||||
#else
|
||||
@ -322,6 +362,10 @@ 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;
|
||||
#ifdef HAVE_CDROM
|
||||
static bool menu_show_load_disc = true;
|
||||
static bool menu_show_dump_disc = true;
|
||||
#endif
|
||||
static bool menu_show_information = true;
|
||||
static bool menu_show_configurations = true;
|
||||
static bool menu_show_help = true;
|
||||
@ -418,7 +462,7 @@ static bool rgui_extended_ascii = false;
|
||||
#define DEFAULT_BLOCK_CONFIG_READ false
|
||||
#endif
|
||||
|
||||
static bool automatically_add_content_to_playlist = false;
|
||||
#define DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST false
|
||||
|
||||
static bool default_game_specific_options = true;
|
||||
static bool default_auto_overrides_enable = true;
|
||||
@ -457,15 +501,16 @@ static unsigned input_backtouch_toggle = false;
|
||||
#define DEFAULT_ALL_USERS_CONTROL_MENU false
|
||||
|
||||
#if defined(ANDROID) || defined(_WIN32)
|
||||
static bool menu_swap_ok_cancel_buttons = true;
|
||||
#define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS true
|
||||
#else
|
||||
static bool menu_swap_ok_cancel_buttons = false;
|
||||
#define DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS false
|
||||
#endif
|
||||
|
||||
static bool quit_press_twice = true;
|
||||
#define DEFAULT_QUIT_PRESS_TWICE true
|
||||
|
||||
static bool default_log_to_file = false;
|
||||
static bool log_to_file_timestamp = false;
|
||||
#define DEFAULT_LOG_TO_FILE false
|
||||
|
||||
#define DEFAULT_LOG_TO_FILE_TIMESTAMP false
|
||||
|
||||
/* Crop overscanned frames. */
|
||||
#define DEFAULT_CROP_OVERSCAN true
|
||||
@ -522,12 +567,13 @@ static const float message_bgcolor_opacity = 1.0f;
|
||||
* If your monitor does not run at 60Hz, or something close to it,
|
||||
* disable VSync, and leave this at its default. */
|
||||
#ifdef _3DS
|
||||
static const float refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
||||
static const float crt_refresh_rate = (32730.0 * 8192.0) / 4481134.0 ;
|
||||
#define DEFAULT_REFRESH_RATE ((32730.0 * 8192.0) / 4481134.0)
|
||||
#elif defined(RARCH_CONSOLE)
|
||||
#define DEFAULT_REFRESH_RATE (60/1.001)
|
||||
#else
|
||||
static const float refresh_rate = 60/1.001;
|
||||
static const float crt_refresh_rate = 60/1.001;
|
||||
#define DEFAULT_REFRESH_RATE (60)
|
||||
#endif
|
||||
#define DEFAULT_CRT_REFRESH_RATE (DEFAULT_REFRESH_RATE)
|
||||
|
||||
/* Allow games to set rotation. If false, rotation requests are
|
||||
* honored, but ignored.
|
||||
@ -746,6 +792,10 @@ static const bool network_on_demand_thumbnails = false;
|
||||
/* Number of entries that will be kept in content history playlist file. */
|
||||
static const unsigned default_content_history_size = 100;
|
||||
|
||||
/* Number of entries that will be kept in content favorites playlist file.
|
||||
* -1 == 'unlimited' (99999) */
|
||||
static const int default_content_favorites_size = 100;
|
||||
|
||||
/* Sort all playlists (apart from histories) alphabetically */
|
||||
static const bool playlist_sort_alphabetical = true;
|
||||
|
||||
@ -771,18 +821,18 @@ static const bool playlist_fuzzy_archive_match = false;
|
||||
/* Show Menu start-up screen on boot. */
|
||||
static const bool default_menu_show_start_screen = true;
|
||||
|
||||
static const bool menu_dpi_override_enable = false;
|
||||
#define DEFAULT_MENU_DPI_OVERRIDE_ENABLE false
|
||||
|
||||
#ifdef RARCH_MOBILE
|
||||
static const unsigned menu_dpi_override_value = 72;
|
||||
#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 72
|
||||
#elif defined(__CELLOS_LV2__)
|
||||
static const unsigned menu_dpi_override_value = 360;
|
||||
#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 360
|
||||
#else
|
||||
static const unsigned menu_dpi_override_value = 200;
|
||||
#define DEFAULT_MENU_DPI_OVERRIDE_VALUE 200
|
||||
#endif
|
||||
|
||||
/* Log level for libretro cores (GET_LOG_INTERFACE). */
|
||||
static const unsigned libretro_log_level = 1;
|
||||
#define DEFAULT_LIBRETRO_LOG_LEVEL 1
|
||||
|
||||
#ifndef RARCH_DEFAULT_PORT
|
||||
#define RARCH_DEFAULT_PORT 55435
|
||||
@ -856,6 +906,8 @@ static const bool content_runtime_log = false;
|
||||
/* Keep track of how long each content has been running for over time (ignores core) */
|
||||
static const bool content_runtime_log_aggregate = false;
|
||||
|
||||
#define DEFAULT_UI_MENUBAR_ENABLE true
|
||||
|
||||
#if defined(__QNX__) || defined(_XBOX1) || defined(_XBOX360) || defined(__CELLOS_LV2__) || (defined(__MACH__) && defined(IOS)) || defined(ANDROID) || defined(WIIU) || defined(HAVE_NEON) || defined(GEKKO) || defined(__ARM_NEON__)
|
||||
static enum resampler_quality audio_resampler_quality_level = RESAMPLER_QUALITY_LOWER;
|
||||
#elif defined(PSP) || defined(_3DS) || defined(VITA) || defined(PS2)
|
||||
|
@ -22,217 +22,217 @@
|
||||
|
||||
/* User 1 */
|
||||
static const struct retro_keybind retro_keybinds_1[] = {
|
||||
/* | RetroPad button | enum | keyboard key | m-btn | js btn | js axis | */
|
||||
/* | RetroPad button | enum | keyboard key | m-btn | js btn | js axis | */
|
||||
#ifdef __QNX__
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_v, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_b, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_d, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_j, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_g, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_v, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_b, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_d, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_j, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_g, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_AI_SERVICE, MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_AI_SERVICE, MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
#else
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_RSHIFT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_RETURN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UP, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_DOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_LEFT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_RIGHT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_x, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_q, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_RSHIFT, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_RETURN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UP, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_DOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_LEFT, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_RIGHT, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_x, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_q, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_F4, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_F2, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_ESCAPE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_F7, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_F6, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_p, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_m, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_n, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_y, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_t, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_F3, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_F10, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_KP_MINUS,NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_F11, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_F5, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_AI_SERVICE, MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SLOWMOTION_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SLOWMOTION_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_F4, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_F2, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_ESCAPE, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_F7, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_F6, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_BSV_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_p, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_m, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_n, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_y, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_t, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_FPS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, RETROK_F3, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_SEND_DEBUG_INFO, MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, RETROK_F10, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_NETPLAY_HOST_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_KP_MINUS, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_F11, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_UI_COMPANION_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, RETROK_F5, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_RECORDING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_STREAMING_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_AI_SERVICE, MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Users 2 to MAX_USERS */
|
||||
static const struct retro_keybind retro_keybinds_rest[] = {
|
||||
/* | RetroPad button | desc | keyboard key | js btn | js axis | */
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
/* | RetroPad button | desc | keyboard key | js btn | js axis | */
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE, AXIS_NONE, AXIS_NONE, NULL, NULL },
|
||||
};
|
||||
|
||||
#endif
|
||||
|
112
configuration.c
112
configuration.c
@ -33,7 +33,6 @@
|
||||
#endif
|
||||
|
||||
#include "file_path_special.h"
|
||||
#include "input/input_driver.h"
|
||||
#include "configuration.h"
|
||||
#include "content.h"
|
||||
#include "config.def.h"
|
||||
@ -51,7 +50,7 @@
|
||||
#include "tasks/task_content.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
|
||||
#include "../list_special.h"
|
||||
#include "list_special.h"
|
||||
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#include "uwp/uwp_func.h"
|
||||
@ -1325,7 +1324,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
unsigned count = 0;
|
||||
|
||||
SETTING_BOOL("crt_switch_resolution_use_custom_refresh_rate", &settings->bools.crt_switch_custom_refresh_enable, true, false, false);
|
||||
SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, automatically_add_content_to_playlist, false);
|
||||
SETTING_BOOL("automatically_add_content_to_playlist", &settings->bools.automatically_add_content_to_playlist, true, DEFAULT_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST, false);
|
||||
SETTING_BOOL("ui_companion_start_on_boot", &settings->bools.ui_companion_start_on_boot, true, ui_companion_start_on_boot, false);
|
||||
SETTING_BOOL("ui_companion_enable", &settings->bools.ui_companion_enable, true, ui_companion_enable, false);
|
||||
SETTING_BOOL("ui_companion_toggle", &settings->bools.ui_companion_toggle, false, ui_companion_toggle, false);
|
||||
@ -1333,7 +1332,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("video_gpu_record", &settings->bools.video_gpu_record, true, DEFAULT_GPU_RECORD, false);
|
||||
SETTING_BOOL("input_remap_binds_enable", &settings->bools.input_remap_binds_enable, true, true, false);
|
||||
SETTING_BOOL("all_users_control_menu", &settings->bools.input_all_users_control_menu, true, DEFAULT_ALL_USERS_CONTROL_MENU, false);
|
||||
SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, menu_swap_ok_cancel_buttons, false);
|
||||
SETTING_BOOL("menu_swap_ok_cancel_buttons", &settings->bools.input_menu_swap_ok_cancel_buttons, true, DEFAULT_MENU_SWAP_OK_CANCEL_BUTTONS, false);
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_BOOL("netplay_public_announce", &settings->bools.netplay_public_announce, true, DEFAULT_NETPLAY_PUBLIC_ANNOUNCE, false);
|
||||
SETTING_BOOL("netplay_start_as_spectator", &settings->bools.netplay_start_as_spectator, false, netplay_start_as_spectator, false);
|
||||
@ -1370,7 +1369,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, DEFAULT_STATISTICS_SHOW, false);
|
||||
SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, DEFAULT_FRAMECOUNT_SHOW, false);
|
||||
SETTING_BOOL("memory_show", &settings->bools.video_memory_show, true, DEFAULT_MEMORY_SHOW, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, true, false);
|
||||
SETTING_BOOL("ui_menubar_enable", &settings->bools.ui_menubar_enable, true, DEFAULT_UI_MENUBAR_ENABLE, false);
|
||||
SETTING_BOOL("suspend_screensaver_enable", &settings->bools.ui_suspend_screensaver_enable, true, true, false);
|
||||
SETTING_BOOL("rewind_enable", &settings->bools.rewind_enable, true, DEFAULT_REWIND_ENABLE, false);
|
||||
SETTING_BOOL("vrr_runloop_enable", &settings->bools.vrr_runloop_enable, true, DEFAULT_VRR_RUNLOOP_ENABLE, false);
|
||||
@ -1442,7 +1441,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
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);
|
||||
SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, menu_dpi_override_enable, false);
|
||||
SETTING_BOOL("dpi_override_enable", &settings->bools.menu_dpi_override_enable, true, DEFAULT_MENU_DPI_OVERRIDE_ENABLE, false);
|
||||
SETTING_BOOL("menu_pause_libretro", &settings->bools.menu_pause_libretro, true, true, false);
|
||||
SETTING_BOOL("menu_savestate_resume", &settings->bools.menu_savestate_resume, true, menu_savestate_resume, false);
|
||||
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, DEFAULT_MOUSE_ENABLE, false);
|
||||
@ -1495,6 +1494,10 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("content_show_playlists", &settings->bools.menu_content_show_playlists, true, content_show_playlists, false);
|
||||
SETTING_BOOL("menu_show_load_core", &settings->bools.menu_show_load_core, true, menu_show_load_core, false);
|
||||
SETTING_BOOL("menu_show_load_content", &settings->bools.menu_show_load_content, true, menu_show_load_content, false);
|
||||
#ifdef HAVE_CDROM
|
||||
SETTING_BOOL("menu_show_load_disc", &settings->bools.menu_show_load_disc, true, menu_show_load_disc, false);
|
||||
SETTING_BOOL("menu_show_dump_disc", &settings->bools.menu_show_dump_disc, true, menu_show_dump_disc, false);
|
||||
#endif
|
||||
SETTING_BOOL("menu_show_information", &settings->bools.menu_show_information, true, menu_show_information, false);
|
||||
SETTING_BOOL("menu_show_configurations", &settings->bools.menu_show_configurations, true, menu_show_configurations, false);
|
||||
SETTING_BOOL("menu_show_latency", &settings->bools.menu_show_latency, true, true, false);
|
||||
@ -1611,16 +1614,16 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
SETTING_BOOL("playlist_sort_alphabetical", &settings->bools.playlist_sort_alphabetical, true, playlist_sort_alphabetical, false);
|
||||
SETTING_BOOL("playlist_fuzzy_archive_match", &settings->bools.playlist_fuzzy_archive_match, true, playlist_fuzzy_archive_match, false);
|
||||
|
||||
SETTING_BOOL("quit_press_twice", &settings->bools.quit_press_twice, true, quit_press_twice, false);
|
||||
SETTING_BOOL("quit_press_twice", &settings->bools.quit_press_twice, true, DEFAULT_QUIT_PRESS_TWICE, false);
|
||||
SETTING_BOOL("vibrate_on_keypress", &settings->bools.vibrate_on_keypress, true, vibrate_on_keypress, false);
|
||||
SETTING_BOOL("enable_device_vibration", &settings->bools.enable_device_vibration, true, enable_device_vibration, false);
|
||||
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, DEFAULT_OZONE_COLLAPSE_SIDEBAR, false);
|
||||
#endif
|
||||
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, default_log_to_file, false);
|
||||
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
|
||||
SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, log_to_file_timestamp, false);
|
||||
SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, DEFAULT_LOG_TO_FILE_TIMESTAMP, false);
|
||||
SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, true, false, false);
|
||||
|
||||
*size = count;
|
||||
@ -1638,8 +1641,8 @@ static struct config_float_setting *populate_settings_float(settings_t *settings
|
||||
|
||||
SETTING_FLOAT("video_aspect_ratio", &settings->floats.video_aspect_ratio, true, DEFAULT_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);
|
||||
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, refresh_rate, false);
|
||||
SETTING_FLOAT("crt_video_refresh_rate", &settings->floats.crt_video_refresh_rate, true, DEFAULT_CRT_REFRESH_RATE, false);
|
||||
SETTING_FLOAT("video_refresh_rate", &settings->floats.video_refresh_rate, true, DEFAULT_REFRESH_RATE, false);
|
||||
SETTING_FLOAT("audio_rate_control_delta", audio_get_float_ptr(AUDIO_ACTION_RATE_CONTROL_DELTA), true, DEFAULT_RATE_CONTROL_DELTA, false);
|
||||
SETTING_FLOAT("audio_max_timing_skew", &settings->floats.audio_max_timing_skew, true, DEFAULT_MAX_TIMING_SKEW, false);
|
||||
SETTING_FLOAT("audio_volume", &settings->floats.audio_volume, true, DEFAULT_AUDIO_VOLUME, false);
|
||||
@ -1699,7 +1702,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("rewind_granularity", &settings->uints.rewind_granularity, true, DEFAULT_REWIND_GRANULARITY, false);
|
||||
SETTING_UINT("rewind_buffer_size_step", &settings->uints.rewind_buffer_size_step, true, DEFAULT_REWIND_BUFFER_SIZE_STEP, false);
|
||||
SETTING_UINT("autosave_interval", &settings->uints.autosave_interval, true, DEFAULT_AUTOSAVE_INTERVAL, false);
|
||||
SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, libretro_log_level, false);
|
||||
SETTING_UINT("libretro_log_level", &settings->uints.libretro_log_level, true, DEFAULT_LIBRETRO_LOG_LEVEL, false);
|
||||
SETTING_UINT("keyboard_gamepad_mapping_type",&settings->uints.input_keyboard_gamepad_mapping_type, true, 1, false);
|
||||
SETTING_UINT("input_poll_type_behavior", &settings->uints.input_poll_type_behavior, true, 2, false);
|
||||
SETTING_UINT("video_monitor_index", &settings->uints.video_monitor_index, true, DEFAULT_MONITOR_INDEX, false);
|
||||
@ -1721,7 +1724,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
SETTING_UINT("video_overscan_correction_bottom", &settings->uints.video_overscan_correction_bottom, true, DEFAULT_VIDEO_OVERSCAN_CORRECTION_BOTTOM, false);
|
||||
#endif
|
||||
#ifdef HAVE_MENU
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, menu_dpi_override_value, false);
|
||||
SETTING_UINT("dpi_override_value", &settings->uints.menu_dpi_override_value, true, DEFAULT_MENU_DPI_OVERRIDE_VALUE, false);
|
||||
SETTING_UINT("menu_thumbnails", &settings->uints.menu_thumbnails, true, menu_thumbnails_default, false);
|
||||
SETTING_UINT("menu_left_thumbnails", &settings->uints.menu_left_thumbnails, true, menu_left_thumbnails_default, false);
|
||||
SETTING_UINT("menu_thumbnail_upscale_threshold", &settings->uints.menu_thumbnail_upscale_threshold, true, menu_thumbnail_upscale_threshold, false);
|
||||
@ -1878,6 +1881,7 @@ static struct config_int_setting *populate_settings_int(settings_t *settings, in
|
||||
#ifdef HAVE_D3D12
|
||||
SETTING_INT("d3d12_gpu_index", &settings->ints.d3d12_gpu_index, true, DEFAULT_D3D12_GPU_INDEX, false);
|
||||
#endif
|
||||
SETTING_INT("content_favorites_size", &settings->ints.content_favorites_size, true, default_content_favorites_size, false);
|
||||
|
||||
*size = count;
|
||||
|
||||
@ -2048,7 +2052,7 @@ void config_set_defaults(void)
|
||||
settings->floats.video_msg_color_b = ((message_color >> 0) & 0xff) / 255.0f;
|
||||
|
||||
if (g_defaults.settings.video_refresh_rate > 0.0 &&
|
||||
g_defaults.settings.video_refresh_rate != refresh_rate)
|
||||
g_defaults.settings.video_refresh_rate != DEFAULT_REFRESH_RATE)
|
||||
settings->floats.video_refresh_rate = g_defaults.settings.video_refresh_rate;
|
||||
|
||||
if (DEFAULT_AUDIO_DEVICE)
|
||||
@ -3123,6 +3127,21 @@ static bool config_load_file(const char *path, settings_t *settings)
|
||||
if (!config_entry_exists(conf, "user_language"))
|
||||
msg_hash_set_uint(MSG_HASH_USER_LANGUAGE, frontend_driver_get_user_language());
|
||||
|
||||
/* If this is the first run of an existing installation
|
||||
* after the independent favourites playlist size limit was
|
||||
* added, set the favourites limit according to the current
|
||||
* history playlist size limit. (Have to do this, otherwise
|
||||
* users with large custom history size limits may lose
|
||||
* favourites entries when updating RetroArch...) */
|
||||
if ( config_entry_exists(conf, "content_history_size") &&
|
||||
!config_entry_exists(conf, "content_favorites_size"))
|
||||
{
|
||||
if (settings->uints.content_history_size > 999)
|
||||
settings->ints.content_favorites_size = -1;
|
||||
else
|
||||
settings->ints.content_favorites_size = (int)settings->uints.content_history_size;
|
||||
}
|
||||
|
||||
ret = true;
|
||||
end:
|
||||
if (conf)
|
||||
@ -3386,7 +3405,7 @@ bool config_unload_override(void)
|
||||
*
|
||||
* Returns: false if there was an error or no action was performed.
|
||||
*/
|
||||
bool config_load_remap(void)
|
||||
bool config_load_remap(const char *directory_input_remapping)
|
||||
{
|
||||
size_t path_size = PATH_MAX_LENGTH * sizeof(char);
|
||||
config_file_t *new_conf = NULL;
|
||||
@ -3394,7 +3413,6 @@ bool config_load_remap(void)
|
||||
char *core_path = NULL;
|
||||
char *game_path = NULL;
|
||||
char *content_path = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const char *core_name = system ? system->info.library_name : NULL;
|
||||
const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME);
|
||||
@ -3406,7 +3424,7 @@ bool config_load_remap(void)
|
||||
|
||||
/* Remap directory: remap_directory.
|
||||
* Try remap directory setting, no fallbacks defined */
|
||||
if (string_is_empty(settings->paths.directory_input_remapping))
|
||||
if (string_is_empty(directory_input_remapping))
|
||||
return false;
|
||||
|
||||
if (!string_is_empty(rarch_path_basename))
|
||||
@ -3427,9 +3445,7 @@ 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);
|
||||
strlcpy(remap_directory, directory_input_remapping, path_size);
|
||||
RARCH_LOG("[Remaps]: remap directory: %s\n", remap_directory);
|
||||
|
||||
/* Concatenate strings into full paths for core_path, game_path */
|
||||
@ -3451,55 +3467,32 @@ bool config_load_remap(void)
|
||||
file_path_str(FILE_PATH_REMAP_EXTENSION),
|
||||
path_size);
|
||||
|
||||
/* Create a new config file from game_path */
|
||||
new_conf = config_file_new_from_path_to_string(game_path);
|
||||
input_remapping_set_defaults(false);
|
||||
|
||||
/* If a game remap file exists, load it. */
|
||||
if (new_conf)
|
||||
if ((new_conf = config_file_new_from_path_to_string(game_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: game-specific remap found at %s.\n", game_path);
|
||||
if (input_remapping_load_file(new_conf, game_path))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(
|
||||
MSG_GAME_REMAP_FILE_LOADED), 1, 100, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_GAME_ACTIVE, NULL);
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[Remaps]: no game-specific remap found at %s.\n", game_path);
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
/* Create a new config file from content_path */
|
||||
new_conf = config_file_new_from_path_to_string(content_path);
|
||||
|
||||
/* If a content-dir remap file exists, load it. */
|
||||
if (new_conf)
|
||||
if ((new_conf = config_file_new_from_path_to_string(content_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: content-dir-specific remap found at %s.\n", content_path);
|
||||
if (input_remapping_load_file(new_conf, content_path))
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(
|
||||
MSG_GAME_REMAP_FILE_LOADED), 1, 100, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
rarch_ctl(RARCH_CTL_SET_REMAPS_CONTENT_DIR_ACTIVE, NULL);
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[Remaps]: no content-dir-specific remap found at %s.\n", content_path);
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
/* Create a new config file from core_path */
|
||||
new_conf = config_file_new_from_path_to_string(core_path);
|
||||
|
||||
/* If a core remap file exists, load it. */
|
||||
if (new_conf)
|
||||
if ((new_conf = config_file_new_from_path_to_string(core_path)))
|
||||
{
|
||||
RARCH_LOG("[Remaps]: core-specific remap found at %s.\n", core_path);
|
||||
if (input_remapping_load_file(new_conf, core_path))
|
||||
@ -3508,11 +3501,6 @@ bool config_load_remap(void)
|
||||
goto success;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[Remaps]: no core-specific remap found at %s.\n", core_path);
|
||||
input_remapping_set_defaults(false);
|
||||
}
|
||||
|
||||
new_conf = NULL;
|
||||
|
||||
@ -3523,6 +3511,9 @@ bool config_load_remap(void)
|
||||
return false;
|
||||
|
||||
success:
|
||||
runloop_msg_queue_push(msg_hash_to_str(
|
||||
MSG_GAME_REMAP_FILE_LOADED), 1, 100, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
free(content_path);
|
||||
free(remap_directory);
|
||||
free(core_path);
|
||||
@ -4139,23 +4130,6 @@ bool config_save_overrides(int override_type)
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_joypad_index", i + 1);
|
||||
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]
|
||||
!= overrides->uints.input_libretro_device[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_libretro_device_p%u", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_libretro_device[i]);
|
||||
}
|
||||
|
||||
if (settings->uints.input_analog_dpad_mode[i]
|
||||
!= overrides->uints.input_analog_dpad_mode[i])
|
||||
{
|
||||
snprintf(cfg, sizeof(cfg), "input_player%u_analog_dpad_mode", i + 1);
|
||||
config_set_int(conf, cfg, overrides->uints.input_analog_dpad_mode[i]);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
ret = false;
|
||||
|
@ -164,6 +164,8 @@ typedef struct settings
|
||||
bool menu_show_core_updater;
|
||||
bool menu_show_load_core;
|
||||
bool menu_show_load_content;
|
||||
bool menu_show_load_disc;
|
||||
bool menu_show_dump_disc;
|
||||
bool menu_show_information;
|
||||
bool menu_show_configurations;
|
||||
bool menu_show_help;
|
||||
@ -399,6 +401,7 @@ typedef struct settings
|
||||
#ifdef HAVE_D3D12
|
||||
int d3d12_gpu_index;
|
||||
#endif
|
||||
int content_favorites_size;
|
||||
} ints;
|
||||
|
||||
struct
|
||||
@ -784,7 +787,7 @@ bool config_unload_override(void);
|
||||
* Returns: false if there was an error or no action was performed.
|
||||
*
|
||||
*/
|
||||
bool config_load_remap(void);
|
||||
bool config_load_remap(const char *directory_input_remapping);
|
||||
|
||||
/**
|
||||
* config_save_autoconf_profile:
|
||||
|
6
configure
vendored
6
configure
vendored
@ -2,14 +2,12 @@
|
||||
|
||||
PACKAGE_NAME=retroarch
|
||||
|
||||
cat /dev/null > config.log
|
||||
|
||||
. qb/qb.init.sh
|
||||
|
||||
. qb/qb.system.sh
|
||||
|
||||
. qb/qb.params.sh
|
||||
|
||||
. qb/qb.system.sh
|
||||
|
||||
. qb/qb.comp.sh
|
||||
|
||||
. qb/qb.libs.sh
|
||||
|
25
core.h
25
core.h
@ -153,10 +153,6 @@ typedef struct retro_callbacks
|
||||
retro_input_poll_t poll_cb;
|
||||
} retro_callbacks_t;
|
||||
|
||||
bool core_load(unsigned poll_type_behavior);
|
||||
|
||||
bool core_unload(void);
|
||||
|
||||
bool core_set_default_callbacks(struct retro_callbacks *cbs);
|
||||
|
||||
bool core_set_rewind_callbacks(void);
|
||||
@ -172,39 +168,22 @@ bool core_set_poll_type(unsigned type);
|
||||
/* Runs the core for one frame. */
|
||||
bool core_run(void);
|
||||
|
||||
bool core_init(void);
|
||||
|
||||
bool core_unload_game(void);
|
||||
|
||||
bool core_reset(void);
|
||||
|
||||
bool core_set_environment(retro_ctx_environ_info_t *info);
|
||||
|
||||
bool core_serialize_size(retro_ctx_size_info_t *info);
|
||||
|
||||
uint64_t core_serialization_quirks(void);
|
||||
|
||||
void core_set_serialization_quirks(uint64_t quirks);
|
||||
|
||||
bool core_serialize(retro_ctx_serialize_info_t *info);
|
||||
|
||||
bool core_unserialize(retro_ctx_serialize_info_t *info);
|
||||
|
||||
bool core_init_symbols(enum rarch_core_type *type);
|
||||
|
||||
bool core_set_cheat(retro_ctx_cheat_info_t *info);
|
||||
|
||||
bool core_reset_cheat(void);
|
||||
|
||||
bool core_api_version(retro_ctx_api_info_t *api);
|
||||
|
||||
bool core_get_region(retro_ctx_region_info_t *info);
|
||||
|
||||
bool core_get_memory(retro_ctx_memory_info_t *info);
|
||||
|
||||
/* Initialize system A/V information. */
|
||||
bool core_get_system_av_info(struct retro_system_av_info *av_info);
|
||||
|
||||
/* Get system A/V information. */
|
||||
bool core_get_system_info(struct retro_system_info *system);
|
||||
|
||||
@ -214,10 +193,6 @@ bool core_set_controller_port_device(retro_ctx_controller_info_t *pad);
|
||||
|
||||
bool core_has_set_input_descriptor(void);
|
||||
|
||||
void core_uninit_symbols(void);
|
||||
|
||||
void core_free_retro_game_info(struct retro_game_info *dest);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
286
core_info.c
286
core_info.c
@ -27,6 +27,7 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "core_info.h"
|
||||
@ -41,6 +42,16 @@ static const struct string_list *core_info_tmp_list = NULL;
|
||||
static core_info_t *core_info_current = NULL;
|
||||
static core_info_list_t *core_info_curr_list = NULL;
|
||||
|
||||
enum compare_op
|
||||
{
|
||||
COMPARE_OP_EQUAL,
|
||||
COMPARE_OP_NOT_EQUAL,
|
||||
COMPARE_OP_LESS,
|
||||
COMPARE_OP_LESS_EQUAL,
|
||||
COMPARE_OP_GREATER,
|
||||
COMPARE_OP_GREATER_EQUAL
|
||||
};
|
||||
|
||||
static void core_info_list_resolve_all_extensions(
|
||||
core_info_list_t *core_info_list)
|
||||
{
|
||||
@ -163,6 +174,7 @@ static void core_info_list_free(core_info_list_t *core_info_list)
|
||||
free(info->categories);
|
||||
free(info->databases);
|
||||
free(info->notes);
|
||||
free(info->required_hw_api);
|
||||
string_list_free(info->supported_extensions_list);
|
||||
string_list_free(info->authors_list);
|
||||
string_list_free(info->note_list);
|
||||
@ -170,6 +182,7 @@ static void core_info_list_free(core_info_list_t *core_info_list)
|
||||
string_list_free(info->licenses_list);
|
||||
string_list_free(info->categories_list);
|
||||
string_list_free(info->databases_list);
|
||||
string_list_free(info->required_hw_api_list);
|
||||
config_file_free((config_file_t*)info->config_data);
|
||||
|
||||
for (j = 0; j < info->firmware_count; j++)
|
||||
@ -420,6 +433,16 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
if (config_get_string(conf, "required_hw_api", &tmp)
|
||||
&& !string_is_empty(tmp))
|
||||
{
|
||||
core_info[i].required_hw_api = strdup(tmp);
|
||||
core_info[i].required_hw_api_list = string_split(core_info[i].required_hw_api, "|");
|
||||
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
}
|
||||
|
||||
if (tmp)
|
||||
free(tmp);
|
||||
tmp = NULL;
|
||||
@ -460,7 +483,7 @@ static core_info_list_t *core_info_list_new(const char *path,
|
||||
*
|
||||
* Data in *info is invalidated when the
|
||||
* core_info_list is freed. */
|
||||
static bool core_info_list_get_info(core_info_list_t *core_info_list,
|
||||
bool core_info_list_get_info(core_info_list_t *core_info_list,
|
||||
core_info_t *out_info, const char *path)
|
||||
{
|
||||
size_t i;
|
||||
@ -1008,3 +1031,264 @@ void core_info_qsort(core_info_list_t *core_info_list, enum core_info_list_qsort
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
static bool core_info_compare_api_version(int sys_major, int sys_minor, int major, int minor, enum compare_op op)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
case COMPARE_OP_EQUAL:
|
||||
if (sys_major == major && sys_minor == minor)
|
||||
return true;
|
||||
break;
|
||||
case COMPARE_OP_NOT_EQUAL:
|
||||
if (!(sys_major == major && sys_minor == minor))
|
||||
return true;
|
||||
break;
|
||||
case COMPARE_OP_LESS:
|
||||
if (sys_major < major || (sys_major == major && sys_minor < minor))
|
||||
return true;
|
||||
break;
|
||||
case COMPARE_OP_LESS_EQUAL:
|
||||
if (sys_major < major || (sys_major == major && sys_minor <= minor))
|
||||
return true;
|
||||
break;
|
||||
case COMPARE_OP_GREATER:
|
||||
if (sys_major > major || (sys_major == major && sys_minor > minor))
|
||||
return true;
|
||||
break;
|
||||
case COMPARE_OP_GREATER_EQUAL:
|
||||
if (sys_major > major || (sys_major == major && sys_minor >= minor))
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool core_info_hw_api_supported(core_info_t *info)
|
||||
{
|
||||
#ifdef RARCH_INTERNAL
|
||||
unsigned i;
|
||||
enum gfx_ctx_api sys_api;
|
||||
gfx_ctx_flags_t sys_flags = {0};
|
||||
const char *sys_api_version_str = video_driver_get_gpu_api_version_string();
|
||||
int sys_api_version_major = 0;
|
||||
int sys_api_version_minor = 0;
|
||||
|
||||
enum api_parse_state
|
||||
{
|
||||
STATE_API_NAME,
|
||||
STATE_API_COMPARE_OP,
|
||||
STATE_API_VERSION
|
||||
};
|
||||
|
||||
if (!info || !info->required_hw_api_list || info->required_hw_api_list->size == 0)
|
||||
return true;
|
||||
|
||||
sys_api = video_context_driver_get_api();
|
||||
video_context_driver_get_flags(&sys_flags);
|
||||
|
||||
for (i = 0; i < info->required_hw_api_list->size; i++)
|
||||
{
|
||||
char api_str[32] = {0};
|
||||
char version[16] = {0};
|
||||
char major_str[16] = {0};
|
||||
char minor_str[16] = {0};
|
||||
const char *cur_api = info->required_hw_api_list->elems[i].data;
|
||||
int api_pos = 0;
|
||||
int major_str_pos = 0;
|
||||
int minor_str_pos = 0;
|
||||
int cur_api_len = 0;
|
||||
int j = 0;
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
bool found_major = false;
|
||||
bool found_minor = false;
|
||||
enum compare_op op = COMPARE_OP_GREATER_EQUAL;
|
||||
enum api_parse_state state = STATE_API_NAME;
|
||||
|
||||
if (string_is_empty(cur_api))
|
||||
continue;
|
||||
|
||||
cur_api_len = strlen(cur_api);
|
||||
|
||||
for (j = 0; j < cur_api_len; j++)
|
||||
{
|
||||
if (cur_api[j] == ' ')
|
||||
continue;
|
||||
|
||||
switch (state)
|
||||
{
|
||||
case STATE_API_NAME:
|
||||
{
|
||||
if (isupper(cur_api[j]) || islower(cur_api[j]))
|
||||
api_str[api_pos++] = cur_api[j];
|
||||
else
|
||||
{
|
||||
j--;
|
||||
state = STATE_API_COMPARE_OP;
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case STATE_API_COMPARE_OP:
|
||||
{
|
||||
if (j < cur_api_len - 1 && !(cur_api[j] >= '0' && cur_api[j] <= '9'))
|
||||
{
|
||||
if (cur_api[j] == '=' && cur_api[j + 1] == '=')
|
||||
{
|
||||
op = COMPARE_OP_EQUAL;
|
||||
j++;
|
||||
}
|
||||
else if (cur_api[j] == '=')
|
||||
op = COMPARE_OP_EQUAL;
|
||||
else if (cur_api[j] == '!' && cur_api[j + 1] == '=')
|
||||
{
|
||||
op = COMPARE_OP_NOT_EQUAL;
|
||||
j++;
|
||||
}
|
||||
else if (cur_api[j] == '<' && cur_api[j + 1] == '=')
|
||||
{
|
||||
op = COMPARE_OP_LESS_EQUAL;
|
||||
j++;
|
||||
}
|
||||
else if (cur_api[j] == '>' && cur_api[j + 1] == '=')
|
||||
{
|
||||
op = COMPARE_OP_GREATER_EQUAL;
|
||||
j++;
|
||||
}
|
||||
else if (cur_api[j] == '<')
|
||||
op = COMPARE_OP_LESS;
|
||||
else if (cur_api[j] == '>')
|
||||
op = COMPARE_OP_GREATER;
|
||||
}
|
||||
|
||||
state = STATE_API_VERSION;
|
||||
|
||||
break;
|
||||
}
|
||||
case STATE_API_VERSION:
|
||||
{
|
||||
if (!found_minor && cur_api[j] >= '0' && cur_api[j] <= '9' && cur_api[j] != '.')
|
||||
{
|
||||
found_major = true;
|
||||
|
||||
if (major_str_pos < sizeof(major_str) - 1)
|
||||
major_str[major_str_pos++] = cur_api[j];
|
||||
}
|
||||
else if (found_major && found_minor && cur_api[j] >= '0' && cur_api[j] <= '9')
|
||||
{
|
||||
if (minor_str_pos < sizeof(minor_str) - 1)
|
||||
minor_str[minor_str_pos++] = cur_api[j];
|
||||
}
|
||||
else if (cur_api[j] == '.')
|
||||
found_minor = true;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
sscanf(major_str, "%d", &major);
|
||||
sscanf(minor_str, "%d", &minor);
|
||||
snprintf(version, sizeof(version), "%d.%d", major, minor);
|
||||
#if 0
|
||||
printf("Major: %d\n", major);
|
||||
printf("Minor: %d\n", minor);
|
||||
printf("API: %s\n", api_str);
|
||||
printf("Version: %s\n", version);
|
||||
fflush(stdout);
|
||||
#endif
|
||||
|
||||
if ((string_is_equal_noncase(api_str, "opengl") && sys_api == GFX_CTX_OPENGL_API) ||
|
||||
(string_is_equal_noncase(api_str, "openglcompat") && sys_api == GFX_CTX_OPENGL_API) ||
|
||||
(string_is_equal_noncase(api_str, "openglcompatibility") && sys_api == GFX_CTX_OPENGL_API))
|
||||
{
|
||||
/* system is running a core context while compat is requested */
|
||||
if (sys_flags.flags & (1 << GFX_CTX_FLAGS_GL_CORE_CONTEXT))
|
||||
return false;
|
||||
|
||||
sscanf(sys_api_version_str, "%d.%d", &sys_api_version_major, &sys_api_version_minor);
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "openglcore") && sys_api == GFX_CTX_OPENGL_API)
|
||||
{
|
||||
sscanf(sys_api_version_str, "%d.%d", &sys_api_version_major, &sys_api_version_minor);
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "opengles") && sys_api == GFX_CTX_OPENGL_ES_API)
|
||||
{
|
||||
sscanf(sys_api_version_str, "OpenGL ES %d.%d", &sys_api_version_major, &sys_api_version_minor);
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "direct3d8") && sys_api == GFX_CTX_DIRECT3D8_API)
|
||||
{
|
||||
sys_api_version_major = 8;
|
||||
sys_api_version_minor = 0;
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "direct3d9") && sys_api == GFX_CTX_DIRECT3D9_API)
|
||||
{
|
||||
sys_api_version_major = 9;
|
||||
sys_api_version_minor = 0;
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "direct3d10") && sys_api == GFX_CTX_DIRECT3D10_API)
|
||||
{
|
||||
sys_api_version_major = 10;
|
||||
sys_api_version_minor = 0;
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "direct3d11") && sys_api == GFX_CTX_DIRECT3D11_API)
|
||||
{
|
||||
sys_api_version_major = 11;
|
||||
sys_api_version_minor = 0;
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "direct3d12") && sys_api == GFX_CTX_DIRECT3D12_API)
|
||||
{
|
||||
sys_api_version_major = 12;
|
||||
sys_api_version_minor = 0;
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "vulkan") && sys_api == GFX_CTX_VULKAN_API)
|
||||
{
|
||||
sscanf(sys_api_version_str, "%d.%d", &sys_api_version_major, &sys_api_version_minor);
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
else if (string_is_equal_noncase(api_str, "metal") && sys_api == GFX_CTX_METAL_API)
|
||||
{
|
||||
sscanf(sys_api_version_str, "%d.%d", &sys_api_version_major, &sys_api_version_minor);
|
||||
|
||||
if (core_info_compare_api_version(sys_api_version_major, sys_api_version_minor, major, minor, op))
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
|
@ -55,6 +55,7 @@ typedef struct
|
||||
char *categories;
|
||||
char *databases;
|
||||
char *notes;
|
||||
char *required_hw_api;
|
||||
struct string_list *categories_list;
|
||||
struct string_list *databases_list;
|
||||
struct string_list *note_list;
|
||||
@ -62,6 +63,7 @@ typedef struct
|
||||
struct string_list *authors_list;
|
||||
struct string_list *permissions_list;
|
||||
struct string_list *licenses_list;
|
||||
struct string_list *required_hw_api_list;
|
||||
core_info_firmware_t *firmware;
|
||||
void *userdata;
|
||||
} core_info_t;
|
||||
@ -142,6 +144,11 @@ bool core_info_unsupported_content_path(const char *path);
|
||||
|
||||
void core_info_qsort(core_info_list_t *core_info_list, enum core_info_list_qsort_type qsort_type);
|
||||
|
||||
bool core_info_list_get_info(core_info_list_t *core_info_list,
|
||||
core_info_t *out_info, const char *path);
|
||||
|
||||
bool core_info_hw_api_supported(core_info_t *info);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* CORE_INFO_H_ */
|
||||
|
@ -5,7 +5,6 @@ ifeq ($(INTERNAL_ZLIB),0)
|
||||
HAVE_ZLIB = 1
|
||||
else
|
||||
HAVE_ZLIB = 1
|
||||
DEFINES += -DWANT_ZLIB
|
||||
INCFLAGS += -I$(DEPS_DIR)/libz
|
||||
DEPS_SOURCE += $(wildcard $(DEPS_DIR)/libz/*.c)
|
||||
endif
|
||||
|
@ -72,7 +72,7 @@ static struct string_list *image_file_list;
|
||||
static const char* IMAGE_CORE_PREFIX(valid_extensions) = "jpg|jpeg|png|bmp|psd|tga|gif|hdr|pic|ppm|pgm";
|
||||
#else
|
||||
|
||||
static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
|
||||
static const char image_formats[] =
|
||||
|
||||
#ifdef HAVE_RJPEG
|
||||
"|jpg|jpeg"
|
||||
@ -95,6 +95,9 @@ static const char* IMAGE_CORE_PREFIX(valid_extensions) = 1+ /* to remove the fir
|
||||
#endif
|
||||
;
|
||||
|
||||
/* to remove the first |, the alternative is 25 extra lines of ifdef/etc */
|
||||
static const char* IMAGE_CORE_PREFIX(valid_extensions) = image_formats + 1;
|
||||
|
||||
#endif
|
||||
|
||||
void IMAGE_CORE_PREFIX(retro_get_system_info)(struct retro_system_info *info)
|
||||
|
11
deps/SPIRV-Cross/spirv_glsl.cpp
vendored
11
deps/SPIRV-Cross/spirv_glsl.cpp
vendored
@ -28,6 +28,9 @@
|
||||
#include <langinfo.h>
|
||||
#endif
|
||||
#include <locale.h>
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include <retro_miscellaneous.h>
|
||||
#endif
|
||||
|
||||
using namespace spv;
|
||||
using namespace SPIRV_CROSS_NAMESPACE;
|
||||
@ -1087,7 +1090,11 @@ uint32_t CompilerGLSL::type_to_packed_alignment(const SPIRType &type, const Bits
|
||||
|
||||
// In std140, struct alignment is rounded up to 16.
|
||||
if (packing_is_vec4_padded(packing))
|
||||
#if defined(RARCH_INTERNAL)
|
||||
alignment = MAX(alignment, 16u);
|
||||
#else
|
||||
alignment = max(alignment, 16u);
|
||||
#endif
|
||||
|
||||
return alignment;
|
||||
}
|
||||
@ -1311,7 +1318,11 @@ bool CompilerGLSL::buffer_is_packing_standard(const SPIRType &type, BufferPackin
|
||||
uint32_t begin_word = offset / 16;
|
||||
uint32_t end_word = (offset + packed_size - 1) / 16;
|
||||
if (begin_word != end_word)
|
||||
#if defined(RARCH_INTERNAL)
|
||||
packed_alignment = MAX(packed_alignment, 16u);
|
||||
#else
|
||||
packed_alignment = max(packed_alignment, 16u);
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32_t alignment = max(packed_alignment, pad_alignment);
|
||||
|
12
deps/SPIRV-Cross/spirv_msl.cpp
vendored
12
deps/SPIRV-Cross/spirv_msl.cpp
vendored
@ -21,6 +21,10 @@
|
||||
#include <assert.h>
|
||||
#include <numeric>
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include <retro_miscellaneous.h>
|
||||
#endif
|
||||
|
||||
using namespace spv;
|
||||
using namespace SPIRV_CROSS_NAMESPACE;
|
||||
using namespace std;
|
||||
@ -2552,7 +2556,11 @@ bool CompilerMSL::is_member_packable(SPIRType &ib_type, uint32_t index, uint32_t
|
||||
uint32_t md_elem_cnt = 1;
|
||||
size_t last_elem_idx = mbr_type.array.size() - 1;
|
||||
for (uint32_t i = 0; i < last_elem_idx; i++)
|
||||
#ifdef RARCH_INTERNAL
|
||||
md_elem_cnt *= MAX(to_array_size_literal(mbr_type, i), 1u);
|
||||
#else
|
||||
md_elem_cnt *= max(to_array_size_literal(mbr_type, i), 1u);
|
||||
#endif
|
||||
|
||||
uint32_t unpacked_array_stride = unpacked_mbr_size * md_elem_cnt;
|
||||
uint32_t array_stride = type_struct_member_array_stride(ib_type, index);
|
||||
@ -8486,7 +8494,11 @@ size_t CompilerMSL::get_declared_struct_member_size_msl(const SPIRType &struct_t
|
||||
if (!type.array.empty())
|
||||
{
|
||||
uint32_t array_size = to_array_size_literal(type);
|
||||
#ifdef RARCH_INTERNAL
|
||||
return type_struct_member_array_stride(struct_type, index) * MAX(array_size, 1u);
|
||||
#else
|
||||
return type_struct_member_array_stride(struct_type, index) * max(array_size, 1u);
|
||||
#endif
|
||||
}
|
||||
|
||||
if (type.basetype == SPIRType::Struct)
|
||||
|
8
deps/discord-rpc/src/serialization.h
vendored
8
deps/discord-rpc/src/serialization.h
vendored
@ -2,7 +2,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifndef __MINGW32__
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
|
||||
#pragma warning(disable : 4061) // enum is not explicitly handled by a case label
|
||||
@ -10,15 +10,15 @@
|
||||
#pragma warning(disable : 4464) // relative include path contains
|
||||
#pragma warning(disable : 4668) // is not defined as a preprocessor macro
|
||||
#pragma warning(disable : 6313) // Incorrect operator
|
||||
#endif // __MINGW32__
|
||||
#endif // _MSC_VER
|
||||
|
||||
#include "rapidjson/document.h"
|
||||
#include "rapidjson/stringbuffer.h"
|
||||
#include "rapidjson/writer.h"
|
||||
|
||||
#ifndef __MINGW32__
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif // __MINGW32__
|
||||
#endif // _MSC_VER
|
||||
|
||||
// if only there was a standard library function for this
|
||||
template <size_t Len>
|
||||
|
@ -1936,7 +1936,7 @@ private:
|
||||
if (count) {
|
||||
GenericValue* e = static_cast<GenericValue*>(allocator.Malloc(count * sizeof(GenericValue)));
|
||||
SetElementsPointer(e);
|
||||
std::memcpy(e, values, count * sizeof(GenericValue));
|
||||
std::memcpy(static_cast<void*>(e), static_cast<void*>(values), count * sizeof(GenericValue));
|
||||
}
|
||||
else
|
||||
SetElementsPointer(0);
|
||||
@ -1949,7 +1949,7 @@ private:
|
||||
if (count) {
|
||||
Member* m = static_cast<Member*>(allocator.Malloc(count * sizeof(Member)));
|
||||
SetMembersPointer(m);
|
||||
std::memcpy(m, members, count * sizeof(Member));
|
||||
std::memcpy(static_cast<void*>(m), static_cast<void*>(members), count * sizeof(Member));
|
||||
}
|
||||
else
|
||||
SetMembersPointer(0);
|
||||
|
2
deps/glslang/glslang/SPIRV/bitutils.h
vendored
2
deps/glslang/glslang/SPIRV/bitutils.h
vendored
@ -26,7 +26,7 @@ Dest BitwiseCast(Src source) {
|
||||
Dest dest;
|
||||
static_assert(sizeof(source) == sizeof(dest),
|
||||
"BitwiseCast: Source and destination must have the same size");
|
||||
std::memcpy(&dest, &source, sizeof(dest));
|
||||
std::memcpy(static_cast<void*>(&dest), static_cast<void*>(&source), sizeof(dest));
|
||||
return dest;
|
||||
}
|
||||
|
||||
|
@ -84,8 +84,10 @@ NVIDIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#define _CRT_SECURE_NO_WARNINGS
|
||||
#endif
|
||||
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/)
|
||||
#ifndef snprintf
|
||||
#define snprintf sprintf_s
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <cassert>
|
||||
#include <cstdlib>
|
||||
|
25
deps/libvita2d/include/vita2d.h
vendored
25
deps/libvita2d/include/vita2d.h
vendored
@ -35,6 +35,10 @@ typedef struct vita2d_texture {
|
||||
SceGxmTexture gxm_tex;
|
||||
SceUID data_UID;
|
||||
SceUID palette_UID;
|
||||
SceGxmRenderTarget *gxm_rtgt;
|
||||
SceGxmColorSurface gxm_sfc;
|
||||
SceGxmDepthStencilSurface gxm_sfd;
|
||||
SceUID depth_UID;
|
||||
} vita2d_texture;
|
||||
|
||||
typedef struct vita2d_font vita2d_font;
|
||||
@ -42,6 +46,7 @@ typedef struct vita2d_pgf vita2d_pgf;
|
||||
|
||||
int vita2d_init();
|
||||
int vita2d_init_advanced(unsigned int temp_pool_size);
|
||||
int vita2d_init_advanced_with_msaa(unsigned int temp_pool_size, SceGxmMultisampleMode msaa);
|
||||
void vita2d_wait_rendering_done();
|
||||
int vita2d_fini();
|
||||
|
||||
@ -49,6 +54,7 @@ void vita2d_clear_screen();
|
||||
void vita2d_swap_buffers();
|
||||
|
||||
void vita2d_start_drawing();
|
||||
void vita2d_start_drawing_advanced(vita2d_texture *target, unsigned int flags);
|
||||
void vita2d_end_drawing();
|
||||
|
||||
int vita2d_common_dialog_update();
|
||||
@ -56,10 +62,21 @@ int vita2d_common_dialog_update();
|
||||
void vita2d_set_clear_color(unsigned int color);
|
||||
unsigned int vita2d_get_clear_color();
|
||||
|
||||
void vita2d_set_clear_color(unsigned int color);
|
||||
unsigned int vita2d_get_clear_color();
|
||||
void vita2d_set_vblank_wait(int enable);
|
||||
void *vita2d_get_current_fb();
|
||||
SceGxmContext *vita2d_get_context();
|
||||
SceGxmShaderPatcher *vita2d_get_shader_patcher();
|
||||
const uint16_t *vita2d_get_linear_indices();
|
||||
|
||||
void vita2d_set_region_clip(SceGxmRegionClipMode mode, unsigned int x_min, unsigned int y_min, unsigned int x_max, unsigned int y_max);
|
||||
void vita2d_enable_clipping();
|
||||
void vita2d_disable_clipping();
|
||||
int vita2d_get_clipping_enabled();
|
||||
void vita2d_set_clip_rectangle(int x_min, int y_min, int x_max, int y_max);
|
||||
void vita2d_get_clip_rectangle(int *x_min, int *y_min, int *x_max, int *y_max);
|
||||
void vita2d_set_blend_mode_add(int enable);
|
||||
|
||||
void *vita2d_pool_malloc(unsigned int size);
|
||||
void *vita2d_pool_memalign(unsigned int size, unsigned int alignment);
|
||||
@ -70,9 +87,14 @@ void vita2d_draw_pixel(float x, float y, unsigned int color);
|
||||
void vita2d_draw_line(float x0, float y0, float x1, float y1, unsigned int color);
|
||||
void vita2d_draw_rectangle(float x, float y, float w, float h, unsigned int color);
|
||||
void vita2d_draw_fill_circle(float x, float y, float radius, unsigned int color);
|
||||
void vita2d_draw_array(SceGxmPrimitiveType mode, const vita2d_color_vertex *vertices, size_t count);
|
||||
|
||||
void vita2d_texture_set_alloc_memblock_type(SceKernelMemBlockType type);
|
||||
SceKernelMemBlockType vita2d_texture_get_alloc_memblock_type();
|
||||
vita2d_texture *vita2d_create_empty_texture(unsigned int w, unsigned int h);
|
||||
vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int h, SceGxmTextureFormat format);
|
||||
vita2d_texture *vita2d_create_empty_texture_rendertarget(unsigned int w, unsigned int h, SceGxmTextureFormat format);
|
||||
|
||||
void vita2d_free_texture(vita2d_texture *texture);
|
||||
|
||||
unsigned int vita2d_texture_get_width(const vita2d_texture *texture);
|
||||
@ -93,6 +115,7 @@ void vita2d_draw_texture_part(const vita2d_texture *texture, float x, float y, f
|
||||
void vita2d_draw_texture_part_scale(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale);
|
||||
void vita2d_draw_texture_scale_rotate_hotspot(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y);
|
||||
void vita2d_draw_texture_scale_rotate(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad);
|
||||
void vita2d_draw_texture_part_scale_rotate(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad);
|
||||
|
||||
void vita2d_draw_texture_tint(const vita2d_texture *texture, float x, float y, unsigned int color);
|
||||
void vita2d_draw_texture_tint_rotate(const vita2d_texture *texture, float x, float y, float rad, unsigned int color);
|
||||
@ -102,6 +125,8 @@ void vita2d_draw_texture_tint_part(const vita2d_texture *texture, float x, float
|
||||
void vita2d_draw_texture_tint_part_scale(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, unsigned int color);
|
||||
void vita2d_draw_texture_tint_scale_rotate_hotspot(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y, unsigned int color);
|
||||
void vita2d_draw_texture_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, unsigned int color);
|
||||
void vita2d_draw_texture_part_tint_scale_rotate(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad, unsigned int color);
|
||||
void vita2d_draw_array_textured(const vita2d_texture *texture, SceGxmPrimitiveType mode, const vita2d_texture_vertex *vertices, size_t count, unsigned int color);
|
||||
|
||||
/** ADVANCED **/
|
||||
void vita2d_texture_set_wvp(float x, float y, float width, float height);
|
||||
|
2
deps/libvita2d/source/utils.c
vendored
2
deps/libvita2d/source/utils.c
vendored
@ -1,4 +1,4 @@
|
||||
#include "utils.h"
|
||||
#include "../include/utils.h"
|
||||
#include <math.h>
|
||||
#include <string.h>
|
||||
|
||||
|
348
deps/libvita2d/source/vita2d.c
vendored
348
deps/libvita2d/source/vita2d.c
vendored
@ -6,8 +6,8 @@
|
||||
#include <psp2/sysmodule.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include "vita2d.h"
|
||||
#include "utils.h"
|
||||
#include "../include/vita2d.h"
|
||||
#include "../include/utils.h"
|
||||
|
||||
#ifdef DEBUG_BUILD
|
||||
# include <stdio.h>
|
||||
@ -25,7 +25,6 @@
|
||||
#define DISPLAY_PIXEL_FORMAT SCE_DISPLAY_PIXELFORMAT_A8B8G8R8
|
||||
#define DISPLAY_BUFFER_COUNT 3
|
||||
#define DISPLAY_MAX_PENDING_SWAPS 2
|
||||
#define MSAA_MODE SCE_GXM_MULTISAMPLE_NONE
|
||||
#define DEFAULT_TEMP_POOL_SIZE (1 * 1024 * 1024)
|
||||
|
||||
typedef struct vita2d_display_data {
|
||||
@ -56,8 +55,14 @@ static const SceGxmProgram *const textureTintFragmentProgramGxp = &texture_tint_
|
||||
|
||||
static int vita2d_initialized = 0;
|
||||
static float clear_color[4] = {0.0f, 0.0f, 0.0f, 1.0f};
|
||||
static unsigned int clear_color_u = 0xff000000;
|
||||
static unsigned int clear_color_u = 0xFF000000;
|
||||
static int clip_rect_x_min = 0;
|
||||
static int clip_rect_y_min = 0;
|
||||
static int clip_rect_x_max = DISPLAY_WIDTH;
|
||||
static int clip_rect_y_max = DISPLAY_HEIGHT;
|
||||
static int vblank_wait = 1;
|
||||
static int drawing = 0;
|
||||
static int clipping_enabled = 0;
|
||||
|
||||
static SceUID vdmRingBufferUid;
|
||||
static SceUID vertexRingBufferUid;
|
||||
@ -72,8 +77,10 @@ static SceUID displayBufferUid[DISPLAY_BUFFER_COUNT];
|
||||
static SceGxmColorSurface displaySurface[DISPLAY_BUFFER_COUNT];
|
||||
static SceGxmSyncObject *displayBufferSync[DISPLAY_BUFFER_COUNT];
|
||||
static SceUID depthBufferUid;
|
||||
static SceUID stencilBufferUid;
|
||||
static SceGxmDepthStencilSurface depthSurface;
|
||||
static void *depthBufferData = NULL;
|
||||
static void *stencilBufferData = NULL;
|
||||
|
||||
static unsigned int backBufferIndex = 0;
|
||||
static unsigned int frontBufferIndex = 0;
|
||||
@ -95,9 +102,9 @@ static SceUID patcherVertexUsseUid;
|
||||
static SceUID patcherFragmentUsseUid;
|
||||
|
||||
static SceUID clearVerticesUid;
|
||||
static SceUID clearIndicesUid;
|
||||
static SceUID linearIndicesUid;
|
||||
static vita2d_clear_vertex *clearVertices = NULL;
|
||||
static uint16_t *clearIndices = NULL;
|
||||
static uint16_t *linearIndices = NULL;
|
||||
|
||||
/* Shared with other .c */
|
||||
float _vita2d_ortho_matrix[4*4];
|
||||
@ -112,6 +119,17 @@ const SceGxmProgramParameter *_vita2d_colorWvpParam = NULL;
|
||||
const SceGxmProgramParameter *_vita2d_textureWvpParam = NULL;
|
||||
const SceGxmProgramParameter *_vita2d_textureTintColorParam = NULL;
|
||||
|
||||
typedef struct vita2d_fragment_programs {
|
||||
SceGxmFragmentProgram *color;
|
||||
SceGxmFragmentProgram *texture;
|
||||
SceGxmFragmentProgram *textureTint;
|
||||
} vita2d_fragment_programs;
|
||||
|
||||
struct {
|
||||
vita2d_fragment_programs blend_mode_normal;
|
||||
vita2d_fragment_programs blend_mode_add;
|
||||
} _vita2d_fragmentPrograms;
|
||||
|
||||
// Temporary memory pool
|
||||
static void *pool_addr = NULL;
|
||||
static SceUID poolUid;
|
||||
@ -149,12 +167,54 @@ static void display_callback(const void *callback_data)
|
||||
}
|
||||
}
|
||||
|
||||
int vita2d_init()
|
||||
static void _vita2d_free_fragment_programs(vita2d_fragment_programs *out)
|
||||
{
|
||||
return vita2d_init_advanced(DEFAULT_TEMP_POOL_SIZE);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, out->color);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, out->texture);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, out->textureTint);
|
||||
}
|
||||
|
||||
int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
static void _vita2d_make_fragment_programs(vita2d_fragment_programs *out,
|
||||
const SceGxmBlendInfo *blend_info, SceGxmMultisampleMode msaa)
|
||||
{
|
||||
int err;
|
||||
(void)err;
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
colorFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
msaa,
|
||||
blend_info,
|
||||
colorVertexProgramGxp,
|
||||
&out->color);
|
||||
|
||||
VITA2D_DEBUG("color sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
textureFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
msaa,
|
||||
blend_info,
|
||||
textureVertexProgramGxp,
|
||||
&out->texture);
|
||||
|
||||
VITA2D_DEBUG("texture sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
textureTintFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
msaa,
|
||||
blend_info,
|
||||
textureVertexProgramGxp,
|
||||
&out->textureTint);
|
||||
|
||||
VITA2D_DEBUG("texture_tint sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
}
|
||||
|
||||
static int vita2d_init_internal(unsigned int temp_pool_size, SceGxmMultisampleMode msaa)
|
||||
{
|
||||
int err;
|
||||
unsigned int i, x, y;
|
||||
@ -227,7 +287,7 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
renderTargetParams.width = DISPLAY_WIDTH;
|
||||
renderTargetParams.height = DISPLAY_HEIGHT;
|
||||
renderTargetParams.scenesPerFrame = 1;
|
||||
renderTargetParams.multisampleMode = MSAA_MODE;
|
||||
renderTargetParams.multisampleMode = msaa;
|
||||
renderTargetParams.multisampleLocations = 0;
|
||||
renderTargetParams.driverMemBlock = -1; // Invalid UID
|
||||
|
||||
@ -258,7 +318,7 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
&displaySurface[i],
|
||||
DISPLAY_COLOR_FORMAT,
|
||||
SCE_GXM_COLOR_SURFACE_LINEAR,
|
||||
(MSAA_MODE == SCE_GXM_MULTISAMPLE_NONE) ? SCE_GXM_COLOR_SURFACE_SCALE_NONE : SCE_GXM_COLOR_SURFACE_SCALE_MSAA_DOWNSCALE,
|
||||
(msaa == SCE_GXM_MULTISAMPLE_NONE) ? SCE_GXM_COLOR_SURFACE_SCALE_NONE : SCE_GXM_COLOR_SURFACE_SCALE_MSAA_DOWNSCALE,
|
||||
SCE_GXM_OUTPUT_REGISTER_SIZE_32BIT,
|
||||
DISPLAY_WIDTH,
|
||||
DISPLAY_HEIGHT,
|
||||
@ -274,11 +334,11 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
const unsigned int alignedHeight = ALIGN(DISPLAY_HEIGHT, SCE_GXM_TILE_SIZEY);
|
||||
unsigned int sampleCount = alignedWidth*alignedHeight;
|
||||
unsigned int depthStrideInSamples = alignedWidth;
|
||||
if (MSAA_MODE == SCE_GXM_MULTISAMPLE_4X) {
|
||||
if (msaa == SCE_GXM_MULTISAMPLE_4X) {
|
||||
// samples increase in X and Y
|
||||
sampleCount *= 4;
|
||||
depthStrideInSamples *= 2;
|
||||
} else if (MSAA_MODE == SCE_GXM_MULTISAMPLE_2X) {
|
||||
} else if (msaa == SCE_GXM_MULTISAMPLE_2X) {
|
||||
// samples increase in Y only
|
||||
sampleCount *= 2;
|
||||
}
|
||||
@ -291,6 +351,14 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
||||
&depthBufferUid);
|
||||
|
||||
// allocate the stencil buffer
|
||||
stencilBufferData = gpu_alloc(
|
||||
SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE,
|
||||
4*sampleCount,
|
||||
SCE_GXM_DEPTHSTENCIL_SURFACE_ALIGNMENT,
|
||||
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
||||
&stencilBufferUid);
|
||||
|
||||
// create the SceGxmDepthStencilSurface structure
|
||||
err = sceGxmDepthStencilSurfaceInit(
|
||||
&depthSurface,
|
||||
@ -298,7 +366,19 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
SCE_GXM_DEPTH_STENCIL_SURFACE_TILED,
|
||||
depthStrideInSamples,
|
||||
depthBufferData,
|
||||
NULL);
|
||||
stencilBufferData);
|
||||
|
||||
// set the stencil test reference (this is currently assumed to always remain 1 after here for region clipping)
|
||||
sceGxmSetFrontStencilRef(_vita2d_context, 1);
|
||||
// set the stencil function (this wouldn't actually be needed, as the set clip rectangle function has to call this at the begginning of every scene)
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_ALWAYS,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
0xFF,
|
||||
0xFF);
|
||||
|
||||
// set buffer sizes for this sample
|
||||
const unsigned int patcherBufferSize = 64*1024;
|
||||
@ -393,8 +473,18 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
.alphaFunc = SCE_GXM_BLEND_FUNC_ADD,
|
||||
.colorSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA,
|
||||
.colorDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
|
||||
.alphaSrc = SCE_GXM_BLEND_FACTOR_SRC_ALPHA,
|
||||
.alphaDst = SCE_GXM_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA,
|
||||
.colorMask = SCE_GXM_COLOR_MASK_ALL
|
||||
};
|
||||
|
||||
static const SceGxmBlendInfo blend_info_add = {
|
||||
.colorFunc = SCE_GXM_BLEND_FUNC_ADD,
|
||||
.alphaFunc = SCE_GXM_BLEND_FUNC_ADD,
|
||||
.colorSrc = SCE_GXM_BLEND_FACTOR_ONE,
|
||||
.colorDst = SCE_GXM_BLEND_FACTOR_ONE,
|
||||
.alphaSrc = SCE_GXM_BLEND_FACTOR_ONE,
|
||||
.alphaDst = SCE_GXM_BLEND_FACTOR_ZERO,
|
||||
.alphaDst = SCE_GXM_BLEND_FACTOR_ONE,
|
||||
.colorMask = SCE_GXM_COLOR_MASK_ALL
|
||||
};
|
||||
|
||||
@ -428,7 +518,7 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
shaderPatcher,
|
||||
clearFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
MSAA_MODE,
|
||||
msaa,
|
||||
NULL,
|
||||
clearVertexProgramGxp,
|
||||
&clearFragmentProgram);
|
||||
@ -443,12 +533,20 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
SCE_GXM_MEMORY_ATTRIB_READ,
|
||||
&clearVerticesUid);
|
||||
|
||||
clearIndices = (uint16_t *)gpu_alloc(
|
||||
// Allocate a 64k * 2 bytes = 128 KiB buffer and store all possible
|
||||
// 16-bit indices in linear ascending order, so we can use this for
|
||||
// all drawing operations where we don't want to use indexing.
|
||||
linearIndices = (uint16_t *)gpu_alloc(
|
||||
SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE,
|
||||
3*sizeof(uint16_t),
|
||||
2,
|
||||
UINT16_MAX*sizeof(uint16_t),
|
||||
sizeof(uint16_t),
|
||||
SCE_GXM_MEMORY_ATTRIB_READ,
|
||||
&clearIndicesUid);
|
||||
&linearIndicesUid);
|
||||
|
||||
// Range of i must be greater than uint16_t, this doesn't endless-loop
|
||||
for (uint32_t i=0; i<=UINT16_MAX; ++i) {
|
||||
linearIndices[i] = i;
|
||||
}
|
||||
|
||||
clearVertices[0].x = -1.0f;
|
||||
clearVertices[0].y = -1.0f;
|
||||
@ -457,10 +555,6 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
clearVertices[2].x = -1.0f;
|
||||
clearVertices[2].y = 3.0f;
|
||||
|
||||
clearIndices[0] = 0;
|
||||
clearIndices[1] = 1;
|
||||
clearIndices[2] = 2;
|
||||
|
||||
const SceGxmProgramParameter *paramColorPositionAttribute = sceGxmProgramFindParameterByName(colorVertexProgramGxp, "aPosition");
|
||||
VITA2D_DEBUG("aPosition sceGxmProgramFindParameterByName(): %p\n", paramColorPositionAttribute);
|
||||
|
||||
@ -498,17 +592,6 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
|
||||
VITA2D_DEBUG("color sceGxmShaderPatcherCreateVertexProgram(): 0x%08X\n", err);
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
colorFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
MSAA_MODE,
|
||||
&blend_info,
|
||||
colorVertexProgramGxp,
|
||||
&_vita2d_colorFragmentProgram);
|
||||
|
||||
VITA2D_DEBUG("color sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
|
||||
|
||||
const SceGxmProgramParameter *paramTexturePositionAttribute = sceGxmProgramFindParameterByName(textureVertexProgramGxp, "aPosition");
|
||||
VITA2D_DEBUG("aPosition sceGxmProgramFindParameterByName(): %p\n", paramTexturePositionAttribute);
|
||||
@ -547,27 +630,12 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
|
||||
VITA2D_DEBUG("texture sceGxmShaderPatcherCreateVertexProgram(): 0x%08X\n", err);
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
textureFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
MSAA_MODE,
|
||||
&blend_info,
|
||||
textureVertexProgramGxp,
|
||||
&_vita2d_textureFragmentProgram);
|
||||
// Create variations of the fragment program based on blending mode
|
||||
_vita2d_make_fragment_programs(&_vita2d_fragmentPrograms.blend_mode_normal, &blend_info, msaa);
|
||||
_vita2d_make_fragment_programs(&_vita2d_fragmentPrograms.blend_mode_add, &blend_info_add, msaa);
|
||||
|
||||
VITA2D_DEBUG("texture sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
|
||||
err = sceGxmShaderPatcherCreateFragmentProgram(
|
||||
shaderPatcher,
|
||||
textureTintFragmentProgramId,
|
||||
SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4,
|
||||
MSAA_MODE,
|
||||
&blend_info,
|
||||
textureVertexProgramGxp,
|
||||
&_vita2d_textureTintFragmentProgram);
|
||||
|
||||
VITA2D_DEBUG("texture_tint sceGxmShaderPatcherCreateFragmentProgram(): 0x%08X\n", err);
|
||||
// Default to "normal" blending mode (non-additive)
|
||||
vita2d_set_blend_mode_add(0);
|
||||
|
||||
// find vertex uniforms by name and cache parameter information
|
||||
_vita2d_clearClearColorParam = sceGxmProgramFindParameterByName(clearFragmentProgramGxp, "uClearColor");
|
||||
@ -590,6 +658,7 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
sizeof(void *),
|
||||
SCE_GXM_MEMORY_ATTRIB_READ,
|
||||
&poolUid);
|
||||
|
||||
|
||||
matrix_init_orthographic(_vita2d_ortho_matrix, 0.0f, DISPLAY_WIDTH, DISPLAY_HEIGHT, 0.0f, 0.0f, 1.0f);
|
||||
|
||||
@ -605,6 +674,21 @@ int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vita2d_init()
|
||||
{
|
||||
return vita2d_init_internal(DEFAULT_TEMP_POOL_SIZE, SCE_GXM_MULTISAMPLE_NONE);
|
||||
}
|
||||
|
||||
int vita2d_init_advanced(unsigned int temp_pool_size)
|
||||
{
|
||||
return vita2d_init_internal(temp_pool_size, SCE_GXM_MULTISAMPLE_NONE);
|
||||
}
|
||||
|
||||
int vita2d_init_advanced_with_msaa(unsigned int temp_pool_size, SceGxmMultisampleMode msaa)
|
||||
{
|
||||
return vita2d_init_internal(temp_pool_size, msaa);
|
||||
}
|
||||
|
||||
void vita2d_wait_rendering_done()
|
||||
{
|
||||
sceGxmFinish(_vita2d_context);
|
||||
@ -625,12 +709,13 @@ int vita2d_fini()
|
||||
// clean up allocations
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, clearFragmentProgram);
|
||||
sceGxmShaderPatcherReleaseVertexProgram(shaderPatcher, clearVertexProgram);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, _vita2d_colorFragmentProgram);
|
||||
sceGxmShaderPatcherReleaseVertexProgram(shaderPatcher, _vita2d_colorVertexProgram);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, _vita2d_textureFragmentProgram);
|
||||
sceGxmShaderPatcherReleaseFragmentProgram(shaderPatcher, _vita2d_textureTintFragmentProgram);
|
||||
sceGxmShaderPatcherReleaseVertexProgram(shaderPatcher, _vita2d_textureVertexProgram);
|
||||
gpu_free(clearIndicesUid);
|
||||
|
||||
_vita2d_free_fragment_programs(&_vita2d_fragmentPrograms.blend_mode_normal);
|
||||
_vita2d_free_fragment_programs(&_vita2d_fragmentPrograms.blend_mode_add);
|
||||
|
||||
gpu_free(linearIndicesUid);
|
||||
gpu_free(clearVerticesUid);
|
||||
|
||||
// wait until display queue is finished before deallocating display buffers
|
||||
@ -647,8 +732,9 @@ int vita2d_fini()
|
||||
sceGxmSyncObjectDestroy(displayBufferSync[i]);
|
||||
}
|
||||
|
||||
// free the depth buffer
|
||||
// free the depth and stencil buffer
|
||||
gpu_free(depthBufferUid);
|
||||
gpu_free(stencilBufferUid);
|
||||
|
||||
// unregister programs and destroy shader patcher
|
||||
sceGxmShaderPatcherUnregisterProgram(shaderPatcher, clearFragmentProgramId);
|
||||
@ -701,7 +787,7 @@ void vita2d_clear_screen()
|
||||
|
||||
// draw the clear triangle
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, clearVertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLES, SCE_GXM_INDEX_FORMAT_U16, clearIndices, 3);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLES, SCE_GXM_INDEX_FORMAT_U16, linearIndices, 3);
|
||||
}
|
||||
|
||||
void vita2d_swap_buffers()
|
||||
@ -723,23 +809,129 @@ void vita2d_swap_buffers()
|
||||
|
||||
void vita2d_start_drawing()
|
||||
{
|
||||
/* Reset the temporary memory pool */
|
||||
vita2d_pool_reset();
|
||||
vita2d_start_drawing_advanced(NULL, 0);
|
||||
}
|
||||
|
||||
sceGxmBeginScene(
|
||||
void vita2d_start_drawing_advanced(vita2d_texture *target, unsigned int flags)
|
||||
{
|
||||
|
||||
if (target == NULL) {
|
||||
sceGxmBeginScene(
|
||||
_vita2d_context,
|
||||
0,
|
||||
flags,
|
||||
renderTarget,
|
||||
NULL,
|
||||
NULL,
|
||||
displayBufferSync[backBufferIndex],
|
||||
&displaySurface[backBufferIndex],
|
||||
&depthSurface);
|
||||
} else {
|
||||
sceGxmBeginScene(
|
||||
_vita2d_context,
|
||||
flags,
|
||||
target->gxm_rtgt,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&target->gxm_sfc,
|
||||
&target->gxm_sfd);
|
||||
}
|
||||
|
||||
drawing = 1;
|
||||
// in the current way, the library keeps the region clip across scenes
|
||||
if (clipping_enabled) {
|
||||
vita2d_set_clip_rectangle(clip_rect_x_min, clip_rect_y_min, clip_rect_x_max, clip_rect_y_max);
|
||||
}
|
||||
}
|
||||
|
||||
void vita2d_end_drawing()
|
||||
{
|
||||
sceGxmEndScene(_vita2d_context, NULL, NULL);
|
||||
drawing = 0;
|
||||
}
|
||||
|
||||
void vita2d_enable_clipping()
|
||||
{
|
||||
clipping_enabled = 1;
|
||||
vita2d_set_clip_rectangle(clip_rect_x_min, clip_rect_y_min, clip_rect_x_max, clip_rect_y_max);
|
||||
}
|
||||
|
||||
void vita2d_disable_clipping()
|
||||
{
|
||||
clipping_enabled = 0;
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_ALWAYS,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
0xFF,
|
||||
0xFF);
|
||||
}
|
||||
|
||||
int vita2d_get_clipping_enabled()
|
||||
{
|
||||
return clipping_enabled;
|
||||
}
|
||||
|
||||
void vita2d_set_clip_rectangle(int x_min, int y_min, int x_max, int y_max)
|
||||
{
|
||||
clip_rect_x_min = x_min;
|
||||
clip_rect_y_min = y_min;
|
||||
clip_rect_x_max = x_max;
|
||||
clip_rect_y_max = y_max;
|
||||
// we can only draw during a scene, but we can cache the values since they're not going to have any visible effect till the scene starts anyways
|
||||
if(drawing) {
|
||||
// clear the stencil buffer to 0
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_NEVER,
|
||||
SCE_GXM_STENCIL_OP_ZERO,
|
||||
SCE_GXM_STENCIL_OP_ZERO,
|
||||
SCE_GXM_STENCIL_OP_ZERO,
|
||||
0xFF,
|
||||
0xFF);
|
||||
vita2d_draw_rectangle(0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT, 0);
|
||||
// set the stencil to 1 in the desired region
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_NEVER,
|
||||
SCE_GXM_STENCIL_OP_REPLACE,
|
||||
SCE_GXM_STENCIL_OP_REPLACE,
|
||||
SCE_GXM_STENCIL_OP_REPLACE,
|
||||
0xFF,
|
||||
0xFF);
|
||||
vita2d_draw_rectangle(x_min, y_min, x_max - x_min, y_max - y_min, 0);
|
||||
if(clipping_enabled) {
|
||||
// set the stencil function to only accept pixels where the stencil is 1
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_EQUAL,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
0xFF,
|
||||
0xFF);
|
||||
} else {
|
||||
sceGxmSetFrontStencilFunc(
|
||||
_vita2d_context,
|
||||
SCE_GXM_STENCIL_FUNC_ALWAYS,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
SCE_GXM_STENCIL_OP_KEEP,
|
||||
0xFF,
|
||||
0xFF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void vita2d_get_clip_rectangle(int *x_min, int *y_min, int *x_max, int *y_max)
|
||||
{
|
||||
*x_min = clip_rect_x_min;
|
||||
*y_min = clip_rect_y_min;
|
||||
*x_max = clip_rect_x_max;
|
||||
*y_max = clip_rect_y_max;
|
||||
}
|
||||
|
||||
int vita2d_common_dialog_update()
|
||||
@ -769,7 +961,8 @@ void vita2d_set_clear_color(unsigned int color)
|
||||
clear_color_u = color;
|
||||
}
|
||||
|
||||
unsigned int vita2d_get_clear_color(){
|
||||
unsigned int vita2d_get_clear_color()
|
||||
{
|
||||
return clear_color_u;
|
||||
}
|
||||
|
||||
@ -783,6 +976,21 @@ void *vita2d_get_current_fb()
|
||||
return displayBufferData[frontBufferIndex];
|
||||
}
|
||||
|
||||
SceGxmContext *vita2d_get_context()
|
||||
{
|
||||
return _vita2d_context;
|
||||
}
|
||||
|
||||
SceGxmShaderPatcher *vita2d_get_shader_patcher()
|
||||
{
|
||||
return shaderPatcher;
|
||||
}
|
||||
|
||||
const uint16_t *vita2d_get_linear_indices()
|
||||
{
|
||||
return linearIndices;
|
||||
}
|
||||
|
||||
void vita2d_set_region_clip(SceGxmRegionClipMode mode, unsigned int x_min, unsigned int y_min, unsigned int x_max, unsigned int y_max)
|
||||
{
|
||||
sceGxmSetRegionClip(_vita2d_context, mode, x_min, y_min, x_max, y_max);
|
||||
@ -818,3 +1026,13 @@ void vita2d_pool_reset()
|
||||
{
|
||||
pool_index = 0;
|
||||
}
|
||||
|
||||
void vita2d_set_blend_mode_add(int enable)
|
||||
{
|
||||
vita2d_fragment_programs *in = enable ? &_vita2d_fragmentPrograms.blend_mode_add
|
||||
: &_vita2d_fragmentPrograms.blend_mode_normal;
|
||||
|
||||
_vita2d_colorFragmentProgram = in->color;
|
||||
_vita2d_textureFragmentProgram = in->texture;
|
||||
_vita2d_textureTintFragmentProgram = in->textureTint;
|
||||
}
|
4
deps/libvita2d/source/vita2d_draw.c
vendored
4
deps/libvita2d/source/vita2d_draw.c
vendored
@ -1,6 +1,6 @@
|
||||
#include <math.h>
|
||||
#include "vita2d.h"
|
||||
#include "shared.h"
|
||||
#include "../include/vita2d.h"
|
||||
#include "../include/shared.h"
|
||||
|
||||
void vita2d_draw_pixel(float x, float y, unsigned int color)
|
||||
{
|
||||
|
288
deps/libvita2d/source/vita2d_texture.c
vendored
288
deps/libvita2d/source/vita2d_texture.c
vendored
@ -2,11 +2,12 @@
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
#include "vita2d.h"
|
||||
#include "utils.h"
|
||||
#include "shared.h"
|
||||
#include "../include/vita2d.h"
|
||||
#include "../include/utils.h"
|
||||
#include "../include/shared.h"
|
||||
|
||||
#define GXM_TEX_MAX_SIZE 4096
|
||||
static SceKernelMemBlockType MemBlockType = SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW;
|
||||
|
||||
static int tex_format_to_bytespp(SceGxmTextureFormat format)
|
||||
{
|
||||
@ -36,12 +37,22 @@ static int tex_format_to_bytespp(SceGxmTextureFormat format)
|
||||
}
|
||||
}
|
||||
|
||||
void vita2d_texture_set_alloc_memblock_type(SceKernelMemBlockType type)
|
||||
{
|
||||
MemBlockType = (type == 0) ? SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW : type;
|
||||
}
|
||||
|
||||
SceKernelMemBlockType vita2d_texture_get_alloc_memblock_type()
|
||||
{
|
||||
return MemBlockType;
|
||||
}
|
||||
|
||||
vita2d_texture *vita2d_create_empty_texture(unsigned int w, unsigned int h)
|
||||
{
|
||||
return vita2d_create_empty_texture_format(w, h, SCE_GXM_TEXTURE_FORMAT_A8B8G8R8);
|
||||
}
|
||||
|
||||
vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int h, SceGxmTextureFormat format)
|
||||
static vita2d_texture *_vita2d_create_empty_texture_format_advanced(unsigned int w, unsigned int h, SceGxmTextureFormat format, unsigned int isRenderTarget)
|
||||
{
|
||||
if (w > GXM_TEX_MAX_SIZE || h > GXM_TEX_MAX_SIZE)
|
||||
return NULL;
|
||||
@ -50,14 +61,16 @@ vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int
|
||||
if (!texture)
|
||||
return NULL;
|
||||
|
||||
memset(texture, 0, sizeof(vita2d_texture));
|
||||
|
||||
const int tex_size = w * h * tex_format_to_bytespp(format);
|
||||
|
||||
/* Allocate a GPU buffer for the texture */
|
||||
void *texture_data = gpu_alloc(
|
||||
SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW,
|
||||
MemBlockType,
|
||||
tex_size,
|
||||
SCE_GXM_TEXTURE_ALIGNMENT,
|
||||
SCE_GXM_MEMORY_ATTRIB_READ,
|
||||
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
||||
&texture->data_UID);
|
||||
|
||||
if (!texture_data) {
|
||||
@ -66,7 +79,7 @@ vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int
|
||||
}
|
||||
|
||||
/* Clear the texture */
|
||||
//memset(texture_data, 0, tex_size);
|
||||
memset(texture_data, 0, tex_size);
|
||||
|
||||
/* Create the gxm texture */
|
||||
sceGxmTextureInitLinear(
|
||||
@ -82,7 +95,7 @@ vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int
|
||||
const int pal_size = 256 * sizeof(uint32_t);
|
||||
|
||||
void *texture_palette = gpu_alloc(
|
||||
SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW,
|
||||
MemBlockType,
|
||||
pal_size,
|
||||
SCE_GXM_PALETTE_ALIGNMENT,
|
||||
SCE_GXM_MEMORY_ATTRIB_READ,
|
||||
@ -94,19 +107,107 @@ vita2d_texture *vita2d_create_empty_texture_format(unsigned int w, unsigned int
|
||||
return NULL;
|
||||
}
|
||||
|
||||
//memset(texture_palette, 0, pal_size);
|
||||
memset(texture_palette, 0, pal_size);
|
||||
|
||||
sceGxmTextureSetPalette(&texture->gxm_tex, texture_palette);
|
||||
} else {
|
||||
texture->palette_UID = 0;
|
||||
}
|
||||
|
||||
if (isRenderTarget) {
|
||||
|
||||
int err = sceGxmColorSurfaceInit(
|
||||
&texture->gxm_sfc,
|
||||
SCE_GXM_COLOR_FORMAT_A8B8G8R8,
|
||||
SCE_GXM_COLOR_SURFACE_LINEAR,
|
||||
SCE_GXM_COLOR_SURFACE_SCALE_NONE,
|
||||
SCE_GXM_OUTPUT_REGISTER_SIZE_32BIT,
|
||||
w,
|
||||
h,
|
||||
w,
|
||||
texture_data
|
||||
);
|
||||
|
||||
if (err < 0) {
|
||||
vita2d_free_texture(texture);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// create the depth/stencil surface
|
||||
const uint32_t alignedWidth = ALIGN(w, SCE_GXM_TILE_SIZEX);
|
||||
const uint32_t alignedHeight = ALIGN(h, SCE_GXM_TILE_SIZEY);
|
||||
uint32_t sampleCount = alignedWidth*alignedHeight;
|
||||
uint32_t depthStrideInSamples = alignedWidth;
|
||||
|
||||
// allocate it
|
||||
void *depthBufferData = gpu_alloc(
|
||||
SCE_KERNEL_MEMBLOCK_TYPE_USER_RW_UNCACHE,
|
||||
4*sampleCount,
|
||||
SCE_GXM_DEPTHSTENCIL_SURFACE_ALIGNMENT,
|
||||
SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE,
|
||||
&texture->depth_UID);
|
||||
|
||||
// create the SceGxmDepthStencilSurface structure
|
||||
err = sceGxmDepthStencilSurfaceInit(
|
||||
&texture->gxm_sfd,
|
||||
SCE_GXM_DEPTH_STENCIL_FORMAT_S8D24,
|
||||
SCE_GXM_DEPTH_STENCIL_SURFACE_TILED,
|
||||
depthStrideInSamples,
|
||||
depthBufferData,
|
||||
NULL);
|
||||
|
||||
if (err < 0) {
|
||||
vita2d_free_texture(texture);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
SceGxmRenderTarget *tgt = NULL;
|
||||
|
||||
// set up parameters
|
||||
SceGxmRenderTargetParams renderTargetParams;
|
||||
memset(&renderTargetParams, 0, sizeof(SceGxmRenderTargetParams));
|
||||
renderTargetParams.flags = 0;
|
||||
renderTargetParams.width = w;
|
||||
renderTargetParams.height = h;
|
||||
renderTargetParams.scenesPerFrame = 1;
|
||||
renderTargetParams.multisampleMode = SCE_GXM_MULTISAMPLE_NONE;
|
||||
renderTargetParams.multisampleLocations = 0;
|
||||
renderTargetParams.driverMemBlock = -1;
|
||||
|
||||
// create the render target
|
||||
err = sceGxmCreateRenderTarget(&renderTargetParams, &tgt);
|
||||
|
||||
texture->gxm_rtgt = tgt;
|
||||
|
||||
if (err < 0) {
|
||||
vita2d_free_texture(texture);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return texture;
|
||||
}
|
||||
|
||||
vita2d_texture * vita2d_create_empty_texture_format(unsigned int w, unsigned int h, SceGxmTextureFormat format)
|
||||
{
|
||||
return _vita2d_create_empty_texture_format_advanced(w, h, format, 0);
|
||||
}
|
||||
|
||||
vita2d_texture * vita2d_create_empty_texture_rendertarget(unsigned int w, unsigned int h, SceGxmTextureFormat format)
|
||||
{
|
||||
return _vita2d_create_empty_texture_format_advanced(w, h, format, 1);
|
||||
}
|
||||
|
||||
void vita2d_free_texture(vita2d_texture *texture)
|
||||
{
|
||||
if (texture) {
|
||||
if (texture->gxm_rtgt) {
|
||||
sceGxmDestroyRenderTarget(texture->gxm_rtgt);
|
||||
}
|
||||
if (texture->depth_UID) {
|
||||
gpu_free(texture->depth_UID);
|
||||
}
|
||||
if (texture->palette_UID) {
|
||||
gpu_free(texture->palette_UID);
|
||||
}
|
||||
@ -178,7 +279,6 @@ static inline void set_texture_wvp_uniform()
|
||||
{
|
||||
void *vertex_wvp_buffer;
|
||||
sceGxmReserveVertexDefaultUniformBuffer(_vita2d_context, &vertex_wvp_buffer);
|
||||
//matrix_init_orthographic(_vita2d_ortho_matrix, 0.0f, DISPLAY_WIDTH, DISPLAY_HEIGHT, 0.0f, 0.0f, 1.0f);
|
||||
sceGxmSetUniformDataF(vertex_wvp_buffer, _vita2d_textureWvpParam, 0, 16, _vita2d_ortho_matrix);
|
||||
}
|
||||
|
||||
@ -205,10 +305,6 @@ static inline void draw_texture_generic(const vita2d_texture *texture, float x,
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = vita2d_texture_get_width(texture);
|
||||
const float h = vita2d_texture_get_height(texture);
|
||||
|
||||
@ -236,16 +332,11 @@ static inline void draw_texture_generic(const vita2d_texture *texture, float x,
|
||||
vertices[3].u = 1.0f;
|
||||
vertices[3].v = 1.0f;
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture(const vita2d_texture *texture, float x, float y)
|
||||
@ -284,10 +375,6 @@ static inline void draw_texture_rotate_hotspot_generic(const vita2d_texture *tex
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = vita2d_texture_get_width(texture);
|
||||
const float h = vita2d_texture_get_height(texture);
|
||||
|
||||
@ -325,16 +412,11 @@ static inline void draw_texture_rotate_hotspot_generic(const vita2d_texture *tex
|
||||
vertices[i].y = _x*s + _y*c + y;
|
||||
}
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_rotate_hotspot(const vita2d_texture *texture, float x, float y, float rad, float center_x, float center_y)
|
||||
@ -358,10 +440,6 @@ static inline void draw_texture_scale_generic(const vita2d_texture *texture, flo
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = x_scale * vita2d_texture_get_width(texture);
|
||||
const float h = y_scale * vita2d_texture_get_height(texture);
|
||||
|
||||
@ -389,16 +467,11 @@ static inline void draw_texture_scale_generic(const vita2d_texture *texture, flo
|
||||
vertices[3].u = 1.0f;
|
||||
vertices[3].v = 1.0f;
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_scale(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale)
|
||||
@ -423,10 +496,6 @@ static inline void draw_texture_part_generic(const vita2d_texture *texture, floa
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = vita2d_texture_get_width(texture);
|
||||
const float h = vita2d_texture_get_height(texture);
|
||||
|
||||
@ -459,16 +528,11 @@ static inline void draw_texture_part_generic(const vita2d_texture *texture, floa
|
||||
vertices[3].u = u1;
|
||||
vertices[3].v = v1;
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_part(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h)
|
||||
@ -492,10 +556,6 @@ static inline void draw_texture_part_scale_generic(const vita2d_texture *texture
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = vita2d_texture_get_width(texture);
|
||||
const float h = vita2d_texture_get_height(texture);
|
||||
|
||||
@ -531,16 +591,11 @@ static inline void draw_texture_part_scale_generic(const vita2d_texture *texture
|
||||
vertices[3].u = u1;
|
||||
vertices[3].v = v1;
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_part_scale(const vita2d_texture *texture, float x, float y, float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale)
|
||||
@ -564,10 +619,6 @@ static inline void draw_texture_scale_rotate_hotspot_generic(const vita2d_textur
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
4 * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
|
||||
const float w = x_scale * vita2d_texture_get_width(texture);
|
||||
const float h = y_scale * vita2d_texture_get_height(texture);
|
||||
const float center_x_scaled = x_scale * center_x;
|
||||
@ -607,16 +658,11 @@ static inline void draw_texture_scale_rotate_hotspot_generic(const vita2d_textur
|
||||
vertices[i].y = _x*s + _y*c + y + center_y_scaled;
|
||||
}
|
||||
|
||||
indices[0] = 0;
|
||||
indices[1] = 1;
|
||||
indices[2] = 2;
|
||||
indices[3] = 3;
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_scale_rotate_hotspot(const vita2d_texture *texture, float x, float y, float x_scale, float y_scale, float rad, float center_x, float center_y)
|
||||
@ -650,43 +696,95 @@ void vita2d_draw_texture_tint_scale_rotate(const vita2d_texture *texture, float
|
||||
vita2d_texture_get_height(texture)/2.0f, color);
|
||||
}
|
||||
|
||||
void vita2d_texture_set_wvp(float x, float y, float width, float height)
|
||||
static inline void draw_texture_part_scale_rotate_generic(const vita2d_texture *texture, float x, float y,
|
||||
float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad)
|
||||
{
|
||||
void *vertex_wvp_buffer;
|
||||
matrix_init_orthographic(_vita2d_ortho_matrix, x, width, height, y, 0.0f, 1.0f);
|
||||
sceGxmReserveVertexDefaultUniformBuffer(_vita2d_context, &vertex_wvp_buffer);
|
||||
sceGxmSetUniformDataF(vertex_wvp_buffer, _vita2d_textureWvpParam, 0, 16, _vita2d_ortho_matrix);
|
||||
}
|
||||
vita2d_texture_vertex *vertices = (vita2d_texture_vertex *)vita2d_pool_memalign(
|
||||
4 * sizeof(vita2d_texture_vertex), // 4 vertices
|
||||
sizeof(vita2d_texture_vertex));
|
||||
|
||||
void vita2d_texture_set_program(){
|
||||
set_texture_program();
|
||||
}
|
||||
const float w_full = vita2d_texture_get_width(texture);
|
||||
const float h_full = vita2d_texture_get_height(texture);
|
||||
|
||||
void vita2d_texture_set_tint_program(){
|
||||
set_texture_tint_program();
|
||||
}
|
||||
const float w_half = (tex_w * x_scale) / 2.0f;
|
||||
const float h_half = (tex_h * y_scale) / 2.0f;
|
||||
|
||||
void vita2d_texture_set_tint_color_uniform(unsigned int color){
|
||||
set_texture_tint_color_uniform(color);
|
||||
}
|
||||
const float u0 = tex_x / w_full;
|
||||
const float v0 = tex_y / h_full;
|
||||
const float u1 = (tex_x + tex_w) / w_full;
|
||||
const float v1 = (tex_y + tex_h) / h_full;
|
||||
|
||||
vertices[0].x = -w_half;
|
||||
vertices[0].y = -h_half;
|
||||
vertices[0].z = +0.5f;
|
||||
vertices[0].u = u0;
|
||||
vertices[0].v = v0;
|
||||
|
||||
void vita2d_draw_texture_part_generic(const vita2d_texture *texture, SceGxmPrimitiveType type, vita2d_texture_vertex *vertices, unsigned int num_vertices)
|
||||
{
|
||||
vertices[1].x = w_half;
|
||||
vertices[1].y = -h_half;
|
||||
vertices[1].z = +0.5f;
|
||||
vertices[1].u = u1;
|
||||
vertices[1].v = v0;
|
||||
|
||||
uint16_t *indices = (uint16_t *)vita2d_pool_memalign(
|
||||
num_vertices * sizeof(uint16_t), // 4 indices
|
||||
sizeof(uint16_t));
|
||||
vertices[2].x = -w_half;
|
||||
vertices[2].y = h_half;
|
||||
vertices[2].z = +0.5f;
|
||||
vertices[2].u = u0;
|
||||
vertices[2].v = v1;
|
||||
|
||||
for(int n = 0; n < num_vertices; n++){
|
||||
indices[n] = n;
|
||||
vertices[3].x = w_half;
|
||||
vertices[3].y = h_half;
|
||||
vertices[3].z = +0.5f;
|
||||
vertices[3].u = u1;
|
||||
vertices[3].v = v1;
|
||||
|
||||
const float c = cosf(rad);
|
||||
const float s = sinf(rad);
|
||||
int i;
|
||||
for (i = 0; i < 4; ++i) { // Rotate and translate
|
||||
float _x = vertices[i].x;
|
||||
float _y = vertices[i].y;
|
||||
vertices[i].x = _x*c - _y*s + x;
|
||||
vertices[i].y = _x*s + _y*c + y;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, type, SCE_GXM_INDEX_FORMAT_U16, indices, 4);
|
||||
sceGxmDraw(_vita2d_context, SCE_GXM_PRIMITIVE_TRIANGLE_STRIP, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), 4);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_part_scale_rotate(const vita2d_texture *texture, float x, float y,
|
||||
float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad)
|
||||
{
|
||||
set_texture_program();
|
||||
set_texture_wvp_uniform();
|
||||
draw_texture_part_scale_rotate_generic(texture, x, y,
|
||||
tex_x, tex_y, tex_w, tex_h, x_scale, y_scale, rad);
|
||||
}
|
||||
|
||||
void vita2d_draw_texture_part_tint_scale_rotate(const vita2d_texture *texture, float x, float y,
|
||||
float tex_x, float tex_y, float tex_w, float tex_h, float x_scale, float y_scale, float rad, unsigned int color)
|
||||
{
|
||||
set_texture_tint_program();
|
||||
set_texture_wvp_uniform();
|
||||
set_texture_tint_color_uniform(color);
|
||||
draw_texture_part_scale_rotate_generic(texture, x, y,
|
||||
tex_x, tex_y, tex_w, tex_h, x_scale, y_scale, rad);
|
||||
}
|
||||
|
||||
void vita2d_draw_array_textured(const vita2d_texture *texture, SceGxmPrimitiveType mode, const vita2d_texture_vertex *vertices, size_t count, unsigned int color)
|
||||
{
|
||||
set_texture_tint_program();
|
||||
set_texture_wvp_uniform();
|
||||
set_texture_tint_color_uniform(color);
|
||||
|
||||
sceGxmSetBackPolygonMode(_vita2d_context, SCE_GXM_POLYGON_MODE_TRIANGLE_FILL);
|
||||
|
||||
// Set the texture to the TEXUNIT0
|
||||
sceGxmSetFragmentTexture(_vita2d_context, 0, &texture->gxm_tex);
|
||||
|
||||
sceGxmSetVertexStream(_vita2d_context, 0, vertices);
|
||||
sceGxmDraw(_vita2d_context, mode, SCE_GXM_INDEX_FORMAT_U16, vita2d_get_linear_indices(), count);
|
||||
}
|
||||
|
2
deps/libz/adler32.c
vendored
2
deps/libz/adler32.c
vendored
@ -8,7 +8,7 @@
|
||||
#define ZLIB_INTERNAL
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
|
||||
#define BASE 65521UL /* largest prime smaller than 65536 */
|
||||
#define NMAX 5552
|
||||
|
2
deps/libz/deflate.h
vendored
2
deps/libz/deflate.h
vendored
@ -13,7 +13,7 @@
|
||||
#ifndef DEFLATE_H
|
||||
#define DEFLATE_H
|
||||
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
|
||||
/* define NO_GZIP when compiling if you want to disable gzip header and
|
||||
trailer creation by deflate(). NO_GZIP would be used to avoid linking in
|
||||
|
4
deps/libz/gzguts.h
vendored
4
deps/libz/gzguts.h
vendored
@ -105,7 +105,9 @@
|
||||
termination of the result -- however this is only used in gzlib.c where
|
||||
the result is assured to fit in the space provided */
|
||||
#ifdef _MSC_VER
|
||||
# define snprintf _snprintf
|
||||
#ifndef snprintf
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef local
|
||||
|
628
deps/libz/infback.c
vendored
628
deps/libz/infback.c
vendored
@ -1,628 +0,0 @@
|
||||
/* infback.c -- inflate using a call-back interface
|
||||
* Copyright (C) 1995-2011 Mark Adler
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/*
|
||||
This code is largely copied from inflate.c. Normally either infback.o or
|
||||
inflate.o would be linked into an application--not both. The interface
|
||||
with inffast.c is retained so that optimized assembler-coded versions of
|
||||
inflate_fast() can be used with either inflate.c or infback.c.
|
||||
*/
|
||||
|
||||
#include <compat/zutil.h>
|
||||
#include "inftrees.h"
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
|
||||
/* function prototypes */
|
||||
static void fixedtables (struct inflate_state FAR *state);
|
||||
|
||||
/*
|
||||
strm provides memory allocation functions in zalloc and zfree, or
|
||||
Z_NULL to use the library memory allocation functions.
|
||||
|
||||
windowBits is in the range 8..15, and window is a user-supplied
|
||||
window and output buffer that is 2**windowBits bytes.
|
||||
*/
|
||||
int inflateBackInit_(z_streamp strm, int windowBits, unsigned char FAR *window, const char *version, int stream_size)
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
|
||||
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
|
||||
stream_size != (int)(sizeof(z_stream)))
|
||||
return Z_VERSION_ERROR;
|
||||
if (strm == Z_NULL || window == Z_NULL ||
|
||||
windowBits < 8 || windowBits > 15)
|
||||
return Z_STREAM_ERROR;
|
||||
strm->msg = Z_NULL; /* in case we return an error */
|
||||
if (strm->zalloc == (alloc_func)0) {
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zalloc = zcalloc;
|
||||
strm->opaque = (voidpf)0;
|
||||
#endif
|
||||
}
|
||||
if (strm->zfree == Z_NULL)
|
||||
#ifdef Z_SOLO
|
||||
return Z_STREAM_ERROR;
|
||||
#else
|
||||
strm->zfree = zcfree;
|
||||
#endif
|
||||
state = (struct inflate_state FAR *)ZALLOC(strm, 1,
|
||||
sizeof(struct inflate_state));
|
||||
if (state == Z_NULL) return Z_MEM_ERROR;
|
||||
Tracev((stderr, "inflate: allocated\n"));
|
||||
strm->state = (struct internal_state FAR *)state;
|
||||
state->dmax = 32768U;
|
||||
state->wbits = windowBits;
|
||||
state->wsize = 1U << windowBits;
|
||||
state->window = window;
|
||||
state->wnext = 0;
|
||||
state->whave = 0;
|
||||
return Z_OK;
|
||||
}
|
||||
|
||||
/*
|
||||
Return state with length and distance decoding tables and index sizes set to
|
||||
fixed code decoding. Normally this returns fixed tables from inffixed.h.
|
||||
If BUILDFIXED is defined, then instead this routine builds the tables the
|
||||
first time it's called, and returns those tables the first time and
|
||||
thereafter. This reduces the size of the code by about 2K bytes, in
|
||||
exchange for a little execution time. However, BUILDFIXED should not be
|
||||
used for threaded applications, since the rewriting of the tables and virgin
|
||||
may not be thread-safe.
|
||||
*/
|
||||
static void fixedtables(struct inflate_state FAR *state)
|
||||
{
|
||||
#ifdef BUILDFIXED
|
||||
static int virgin = 1;
|
||||
static code *lenfix, *distfix;
|
||||
static code fixed[544];
|
||||
|
||||
/* build fixed huffman tables if first call (may not be thread safe) */
|
||||
if (virgin) {
|
||||
unsigned sym, bits;
|
||||
static code *next;
|
||||
|
||||
/* literal/length table */
|
||||
sym = 0;
|
||||
while (sym < 144) state->lens[sym++] = 8;
|
||||
while (sym < 256) state->lens[sym++] = 9;
|
||||
while (sym < 280) state->lens[sym++] = 7;
|
||||
while (sym < 288) state->lens[sym++] = 8;
|
||||
next = fixed;
|
||||
lenfix = next;
|
||||
bits = 9;
|
||||
inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work);
|
||||
|
||||
/* distance table */
|
||||
sym = 0;
|
||||
while (sym < 32) state->lens[sym++] = 5;
|
||||
distfix = next;
|
||||
bits = 5;
|
||||
inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work);
|
||||
|
||||
/* do this just once */
|
||||
virgin = 0;
|
||||
}
|
||||
#else /* !BUILDFIXED */
|
||||
# include "inffixed.h"
|
||||
#endif /* BUILDFIXED */
|
||||
state->lencode = lenfix;
|
||||
state->lenbits = 9;
|
||||
state->distcode = distfix;
|
||||
state->distbits = 5;
|
||||
}
|
||||
|
||||
/* Macros for inflateBack(): */
|
||||
|
||||
/* Load returned state from inflate_fast() */
|
||||
#define LOAD() \
|
||||
do { \
|
||||
put = strm->next_out; \
|
||||
left = strm->avail_out; \
|
||||
next = strm->next_in; \
|
||||
have = strm->avail_in; \
|
||||
hold = state->hold; \
|
||||
bits = state->bits; \
|
||||
} while (0)
|
||||
|
||||
/* Set state from registers for inflate_fast() */
|
||||
#define RESTORE() \
|
||||
do { \
|
||||
strm->next_out = put; \
|
||||
strm->avail_out = left; \
|
||||
strm->next_in = next; \
|
||||
strm->avail_in = have; \
|
||||
state->hold = hold; \
|
||||
state->bits = bits; \
|
||||
} while (0)
|
||||
|
||||
/* Clear the input bit accumulator */
|
||||
#define INITBITS() \
|
||||
do { \
|
||||
hold = 0; \
|
||||
bits = 0; \
|
||||
} while (0)
|
||||
|
||||
/* Assure that some input is available. If input is requested, but denied,
|
||||
then return a Z_BUF_ERROR from inflateBack(). */
|
||||
#define PULL() \
|
||||
do { \
|
||||
if (have == 0) { \
|
||||
have = in(in_desc, &next); \
|
||||
if (have == 0) { \
|
||||
next = Z_NULL; \
|
||||
ret = Z_BUF_ERROR; \
|
||||
goto inf_leave; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/* Get a byte of input into the bit accumulator, or return from inflateBack()
|
||||
with an error if there is no input available. */
|
||||
#define PULLBYTE() \
|
||||
do { \
|
||||
PULL(); \
|
||||
have--; \
|
||||
hold += (unsigned long)(*next++) << bits; \
|
||||
bits += 8; \
|
||||
} while (0)
|
||||
|
||||
/* Assure that there are at least n bits in the bit accumulator. If there is
|
||||
not enough available input to do that, then return from inflateBack() with
|
||||
an error. */
|
||||
#define NEEDBITS(n) \
|
||||
do { \
|
||||
while (bits < (unsigned)(n)) \
|
||||
PULLBYTE(); \
|
||||
} while (0)
|
||||
|
||||
/* Return the low n bits of the bit accumulator (n < 16) */
|
||||
#define BITS(n) \
|
||||
((unsigned)hold & ((1U << (n)) - 1))
|
||||
|
||||
/* Remove n bits from the bit accumulator */
|
||||
#define DROPBITS(n) \
|
||||
do { \
|
||||
hold >>= (n); \
|
||||
bits -= (unsigned)(n); \
|
||||
} while (0)
|
||||
|
||||
/* Remove zero to seven bits as needed to go to a byte boundary */
|
||||
#define BYTEBITS() \
|
||||
do { \
|
||||
hold >>= bits & 7; \
|
||||
bits -= bits & 7; \
|
||||
} while (0)
|
||||
|
||||
/* Assure that some output space is available, by writing out the window
|
||||
if it's full. If the write fails, return from inflateBack() with a
|
||||
Z_BUF_ERROR. */
|
||||
#define ROOM() \
|
||||
do { \
|
||||
if (left == 0) { \
|
||||
put = state->window; \
|
||||
left = state->wsize; \
|
||||
state->whave = left; \
|
||||
if (out(out_desc, put, left)) { \
|
||||
ret = Z_BUF_ERROR; \
|
||||
goto inf_leave; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
/*
|
||||
strm provides the memory allocation functions and window buffer on input,
|
||||
and provides information on the unused input on return. For Z_DATA_ERROR
|
||||
returns, strm will also provide an error message.
|
||||
|
||||
in() and out() are the call-back input and output functions. When
|
||||
inflateBack() needs more input, it calls in(). When inflateBack() has
|
||||
filled the window with output, or when it completes with data in the
|
||||
window, it calls out() to write out the data. The application must not
|
||||
change the provided input until in() is called again or inflateBack()
|
||||
returns. The application must not change the window/output buffer until
|
||||
inflateBack() returns.
|
||||
|
||||
in() and out() are called with a descriptor parameter provided in the
|
||||
inflateBack() call. This parameter can be a structure that provides the
|
||||
information required to do the read or write, as well as accumulated
|
||||
information on the input and output such as totals and check values.
|
||||
|
||||
in() should return zero on failure. out() should return non-zero on
|
||||
failure. If either in() or out() fails, than inflateBack() returns a
|
||||
Z_BUF_ERROR. strm->next_in can be checked for Z_NULL to see whether it
|
||||
was in() or out() that caused in the error. Otherwise, inflateBack()
|
||||
returns Z_STREAM_END on success, Z_DATA_ERROR for an deflate format
|
||||
error, or Z_MEM_ERROR if it could not allocate memory for the state.
|
||||
inflateBack() can also return Z_STREAM_ERROR if the input parameters
|
||||
are not correct, i.e. strm is Z_NULL or the state was not initialized.
|
||||
*/
|
||||
int inflateBack(z_streamp strm, in_func in, void FAR *in_desc, out_func out, void FAR *out_desc)
|
||||
{
|
||||
struct inflate_state FAR *state;
|
||||
z_const unsigned char FAR *next; /* next input */
|
||||
unsigned char FAR *put; /* next output */
|
||||
unsigned have, left; /* available input and output */
|
||||
unsigned long hold; /* bit buffer */
|
||||
unsigned bits; /* bits in bit buffer */
|
||||
unsigned copy; /* number of stored or match bytes to copy */
|
||||
unsigned char FAR *from; /* where to copy match bytes from */
|
||||
code here; /* current decoding table entry */
|
||||
code last; /* parent table entry */
|
||||
unsigned len; /* length to copy for repeats, bits to drop */
|
||||
int ret; /* return code */
|
||||
static const unsigned short order[19] = /* permutation of code lengths */
|
||||
{16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15};
|
||||
|
||||
/* Check that the strm exists and that the state was initialized */
|
||||
if (strm == Z_NULL || strm->state == Z_NULL)
|
||||
return Z_STREAM_ERROR;
|
||||
state = (struct inflate_state FAR *)strm->state;
|
||||
|
||||
/* Reset the state */
|
||||
strm->msg = Z_NULL;
|
||||
state->mode = TYPE;
|
||||
state->last = 0;
|
||||
state->whave = 0;
|
||||
next = strm->next_in;
|
||||
have = next != Z_NULL ? strm->avail_in : 0;
|
||||
hold = 0;
|
||||
bits = 0;
|
||||
put = state->window;
|
||||
left = state->wsize;
|
||||
|
||||
/* Inflate until end of block marked as last */
|
||||
for (;;)
|
||||
switch (state->mode) {
|
||||
case TYPE:
|
||||
/* determine and dispatch block type */
|
||||
if (state->last) {
|
||||
BYTEBITS();
|
||||
state->mode = DONE;
|
||||
break;
|
||||
}
|
||||
NEEDBITS(3);
|
||||
state->last = BITS(1);
|
||||
DROPBITS(1);
|
||||
switch (BITS(2)) {
|
||||
case 0: /* stored block */
|
||||
Tracev((stderr, "inflate: stored block%s\n",
|
||||
state->last ? " (last)" : ""));
|
||||
state->mode = STORED;
|
||||
break;
|
||||
case 1: /* fixed block */
|
||||
fixedtables(state);
|
||||
Tracev((stderr, "inflate: fixed codes block%s\n",
|
||||
state->last ? " (last)" : ""));
|
||||
state->mode = LEN; /* decode codes */
|
||||
break;
|
||||
case 2: /* dynamic block */
|
||||
Tracev((stderr, "inflate: dynamic codes block%s\n",
|
||||
state->last ? " (last)" : ""));
|
||||
state->mode = TABLE;
|
||||
break;
|
||||
case 3:
|
||||
strm->msg = (char *)"invalid block type";
|
||||
state->mode = BAD;
|
||||
}
|
||||
DROPBITS(2);
|
||||
break;
|
||||
|
||||
case STORED:
|
||||
/* get and verify stored block length */
|
||||
BYTEBITS(); /* go to byte boundary */
|
||||
NEEDBITS(32);
|
||||
if ((hold & 0xffff) != ((hold >> 16) ^ 0xffff)) {
|
||||
strm->msg = (char *)"invalid stored block lengths";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->length = (unsigned)hold & 0xffff;
|
||||
Tracev((stderr, "inflate: stored length %u\n",
|
||||
state->length));
|
||||
INITBITS();
|
||||
|
||||
/* copy stored block from input to output */
|
||||
while (state->length != 0) {
|
||||
copy = state->length;
|
||||
PULL();
|
||||
ROOM();
|
||||
if (copy > have) copy = have;
|
||||
if (copy > left) copy = left;
|
||||
zmemcpy(put, next, copy);
|
||||
have -= copy;
|
||||
next += copy;
|
||||
left -= copy;
|
||||
put += copy;
|
||||
state->length -= copy;
|
||||
}
|
||||
Tracev((stderr, "inflate: stored end\n"));
|
||||
state->mode = TYPE;
|
||||
break;
|
||||
|
||||
case TABLE:
|
||||
/* get dynamic table entries descriptor */
|
||||
NEEDBITS(14);
|
||||
state->nlen = BITS(5) + 257;
|
||||
DROPBITS(5);
|
||||
state->ndist = BITS(5) + 1;
|
||||
DROPBITS(5);
|
||||
state->ncode = BITS(4) + 4;
|
||||
DROPBITS(4);
|
||||
#ifndef PKZIP_BUG_WORKAROUND
|
||||
if (state->nlen > 286 || state->ndist > 30) {
|
||||
strm->msg = (char *)"too many length or distance symbols";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
Tracev((stderr, "inflate: table sizes ok\n"));
|
||||
|
||||
/* get code length code lengths (not a typo) */
|
||||
state->have = 0;
|
||||
while (state->have < state->ncode) {
|
||||
NEEDBITS(3);
|
||||
state->lens[order[state->have++]] = (unsigned short)BITS(3);
|
||||
DROPBITS(3);
|
||||
}
|
||||
while (state->have < 19)
|
||||
state->lens[order[state->have++]] = 0;
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
||||
state->lenbits = 7;
|
||||
ret = inflate_table(CODES, state->lens, 19, &(state->next),
|
||||
&(state->lenbits), state->work);
|
||||
if (ret) {
|
||||
strm->msg = (char *)"invalid code lengths set";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
Tracev((stderr, "inflate: code lengths ok\n"));
|
||||
|
||||
/* get length and distance code code lengths */
|
||||
state->have = 0;
|
||||
while (state->have < state->nlen + state->ndist) {
|
||||
for (;;) {
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (here.val < 16) {
|
||||
DROPBITS(here.bits);
|
||||
state->lens[state->have++] = here.val;
|
||||
}
|
||||
else {
|
||||
if (here.val == 16) {
|
||||
NEEDBITS(here.bits + 2);
|
||||
DROPBITS(here.bits);
|
||||
if (state->have == 0) {
|
||||
strm->msg = (char *)"invalid bit length repeat";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
len = (unsigned)(state->lens[state->have - 1]);
|
||||
copy = 3 + BITS(2);
|
||||
DROPBITS(2);
|
||||
}
|
||||
else if (here.val == 17) {
|
||||
NEEDBITS(here.bits + 3);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 3 + BITS(3);
|
||||
DROPBITS(3);
|
||||
}
|
||||
else {
|
||||
NEEDBITS(here.bits + 7);
|
||||
DROPBITS(here.bits);
|
||||
len = 0;
|
||||
copy = 11 + BITS(7);
|
||||
DROPBITS(7);
|
||||
}
|
||||
if (state->have + copy > state->nlen + state->ndist) {
|
||||
strm->msg = (char *)"invalid bit length repeat";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
while (copy--)
|
||||
state->lens[state->have++] = (unsigned short)len;
|
||||
}
|
||||
}
|
||||
|
||||
/* handle error breaks in while */
|
||||
if (state->mode == BAD) break;
|
||||
|
||||
/* check for end-of-block code (better have one) */
|
||||
if (state->lens[256] == 0) {
|
||||
strm->msg = (char *)"invalid code -- missing end-of-block";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
|
||||
/* build code tables -- note: do not change the lenbits or distbits
|
||||
values here (9 and 6) without reading the comments in inftrees.h
|
||||
concerning the ENOUGH constants, which depend on those values */
|
||||
state->next = state->codes;
|
||||
state->lencode = (code const FAR *)(state->next);
|
||||
state->lenbits = 9;
|
||||
ret = inflate_table(LENS, state->lens, state->nlen, &(state->next),
|
||||
&(state->lenbits), state->work);
|
||||
if (ret) {
|
||||
strm->msg = (char *)"invalid literal/lengths set";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->distcode = (code const FAR *)(state->next);
|
||||
state->distbits = 6;
|
||||
ret = inflate_table(DISTS, state->lens + state->nlen, state->ndist,
|
||||
&(state->next), &(state->distbits), state->work);
|
||||
if (ret) {
|
||||
strm->msg = (char *)"invalid distances set";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
Tracev((stderr, "inflate: codes ok\n"));
|
||||
state->mode = LEN;
|
||||
|
||||
case LEN:
|
||||
/* use inflate_fast() if we have enough input and output */
|
||||
if (have >= 6 && left >= 258) {
|
||||
RESTORE();
|
||||
if (state->whave < state->wsize)
|
||||
state->whave = state->wsize - left;
|
||||
inflate_fast(strm, state->wsize);
|
||||
LOAD();
|
||||
break;
|
||||
}
|
||||
|
||||
/* get a literal, length, or end-of-block code */
|
||||
for (;;) {
|
||||
here = state->lencode[BITS(state->lenbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if (here.op && (here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
here = state->lencode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
}
|
||||
DROPBITS(here.bits);
|
||||
state->length = (unsigned)here.val;
|
||||
|
||||
/* process literal */
|
||||
if (here.op == 0) {
|
||||
Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
|
||||
"inflate: literal '%c'\n" :
|
||||
"inflate: literal 0x%02x\n", here.val));
|
||||
ROOM();
|
||||
*put++ = (unsigned char)(state->length);
|
||||
left--;
|
||||
state->mode = LEN;
|
||||
break;
|
||||
}
|
||||
|
||||
/* process end of block */
|
||||
if (here.op & 32) {
|
||||
Tracevv((stderr, "inflate: end of block\n"));
|
||||
state->mode = TYPE;
|
||||
break;
|
||||
}
|
||||
|
||||
/* invalid code */
|
||||
if (here.op & 64) {
|
||||
strm->msg = (char *)"invalid literal/length code";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
|
||||
/* length code -- get extra bits, if any */
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
if (state->extra != 0) {
|
||||
NEEDBITS(state->extra);
|
||||
state->length += BITS(state->extra);
|
||||
DROPBITS(state->extra);
|
||||
}
|
||||
Tracevv((stderr, "inflate: length %u\n", state->length));
|
||||
|
||||
/* get distance code */
|
||||
for (;;) {
|
||||
here = state->distcode[BITS(state->distbits)];
|
||||
if ((unsigned)(here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
if ((here.op & 0xf0) == 0) {
|
||||
last = here;
|
||||
for (;;) {
|
||||
here = state->distcode[last.val +
|
||||
(BITS(last.bits + last.op) >> last.bits)];
|
||||
if ((unsigned)(last.bits + here.bits) <= bits) break;
|
||||
PULLBYTE();
|
||||
}
|
||||
DROPBITS(last.bits);
|
||||
}
|
||||
DROPBITS(here.bits);
|
||||
if (here.op & 64) {
|
||||
strm->msg = (char *)"invalid distance code";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
state->offset = (unsigned)here.val;
|
||||
|
||||
/* get distance extra bits, if any */
|
||||
state->extra = (unsigned)(here.op) & 15;
|
||||
if (state->extra != 0) {
|
||||
NEEDBITS(state->extra);
|
||||
state->offset += BITS(state->extra);
|
||||
DROPBITS(state->extra);
|
||||
}
|
||||
if (state->offset > state->wsize - (state->whave < state->wsize ?
|
||||
left : 0)) {
|
||||
strm->msg = (char *)"invalid distance too far back";
|
||||
state->mode = BAD;
|
||||
break;
|
||||
}
|
||||
Tracevv((stderr, "inflate: distance %u\n", state->offset));
|
||||
|
||||
/* copy match from window to output */
|
||||
do {
|
||||
ROOM();
|
||||
copy = state->wsize - state->offset;
|
||||
if (copy < left) {
|
||||
from = put + copy;
|
||||
copy = left - copy;
|
||||
}
|
||||
else {
|
||||
from = put - state->offset;
|
||||
copy = left;
|
||||
}
|
||||
if (copy > state->length) copy = state->length;
|
||||
state->length -= copy;
|
||||
left -= copy;
|
||||
do {
|
||||
*put++ = *from++;
|
||||
} while (--copy);
|
||||
} while (state->length != 0);
|
||||
break;
|
||||
|
||||
case DONE:
|
||||
/* inflate stream terminated properly -- write leftover output */
|
||||
ret = Z_STREAM_END;
|
||||
if (left < state->wsize) {
|
||||
if (out(out_desc, state->window, state->wsize - left))
|
||||
ret = Z_BUF_ERROR;
|
||||
}
|
||||
goto inf_leave;
|
||||
|
||||
case BAD:
|
||||
ret = Z_DATA_ERROR;
|
||||
goto inf_leave;
|
||||
|
||||
default: /* can't happen, but makes compilers happy */
|
||||
ret = Z_STREAM_ERROR;
|
||||
goto inf_leave;
|
||||
}
|
||||
|
||||
/* Return unused input */
|
||||
inf_leave:
|
||||
strm->next_in = next;
|
||||
strm->avail_in = have;
|
||||
return ret;
|
||||
}
|
||||
|
||||
int inflateBackEnd(z_streamp strm)
|
||||
{
|
||||
if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == Z_NULL)
|
||||
return Z_STREAM_ERROR;
|
||||
ZFREE(strm, strm->state);
|
||||
strm->state = Z_NULL;
|
||||
Tracev((stderr, "inflate: end\n"));
|
||||
return Z_OK;
|
||||
}
|
2
deps/libz/inffast.c
vendored
2
deps/libz/inffast.c
vendored
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
#include "inftrees.h"
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
|
2
deps/libz/inflate.c
vendored
2
deps/libz/inflate.c
vendored
@ -80,7 +80,7 @@
|
||||
* The history for versions after 1.2.0 are in ChangeLog in zlib distribution.
|
||||
*/
|
||||
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
#include "inftrees.h"
|
||||
#include "inflate.h"
|
||||
#include "inffast.h"
|
||||
|
2
deps/libz/inftrees.c
vendored
2
deps/libz/inftrees.c
vendored
@ -3,7 +3,7 @@
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
#include "inftrees.h"
|
||||
|
||||
#define MAXBITS 15
|
||||
|
474
deps/libz/zconf.h
vendored
474
deps/libz/zconf.h
vendored
@ -1,474 +0,0 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
474
deps/libz/zconf.h.in
vendored
474
deps/libz/zconf.h.in
vendored
@ -1,474 +0,0 @@
|
||||
/* zconf.h -- configuration of the zlib compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
*/
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#ifndef ZCONF_H
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
||||
* this permanently in zconf.h using "./configure --zprefix".
|
||||
*/
|
||||
#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
|
||||
# define Z_PREFIX_SET
|
||||
|
||||
/* all linked symbols */
|
||||
# define _dist_code z__dist_code
|
||||
# define _length_code z__length_code
|
||||
# define _tr_align z__tr_align
|
||||
# define _tr_flush_bits z__tr_flush_bits
|
||||
# define _tr_flush_block z__tr_flush_block
|
||||
# define _tr_init z__tr_init
|
||||
# define _tr_stored_block z__tr_stored_block
|
||||
# define _tr_tally z__tr_tally
|
||||
# define adler32 z_adler32
|
||||
# define adler32_combine z_adler32_combine
|
||||
# define adler32_combine64 z_adler32_combine64
|
||||
# ifndef Z_SOLO
|
||||
# define compress z_compress
|
||||
# define compress2 z_compress2
|
||||
# define compressBound z_compressBound
|
||||
# endif
|
||||
# define crc32 z_crc32
|
||||
# define crc32_combine z_crc32_combine
|
||||
# define crc32_combine64 z_crc32_combine64
|
||||
# define deflate z_deflate
|
||||
# define deflateBound z_deflateBound
|
||||
# define deflateCopy z_deflateCopy
|
||||
# define deflateEnd z_deflateEnd
|
||||
# define deflateInit2_ z_deflateInit2_
|
||||
# define deflateInit_ z_deflateInit_
|
||||
# define deflateParams z_deflateParams
|
||||
# define deflatePending z_deflatePending
|
||||
# define deflatePrime z_deflatePrime
|
||||
# define deflateReset z_deflateReset
|
||||
# define deflateResetKeep z_deflateResetKeep
|
||||
# define deflateSetDictionary z_deflateSetDictionary
|
||||
# define deflateSetHeader z_deflateSetHeader
|
||||
# define deflateTune z_deflateTune
|
||||
# define deflate_copyright z_deflate_copyright
|
||||
# define get_crc_table z_get_crc_table
|
||||
# ifndef Z_SOLO
|
||||
# define gz_error z_gz_error
|
||||
# define gz_intmax z_gz_intmax
|
||||
# define gz_strwinerror z_gz_strwinerror
|
||||
# define gzbuffer z_gzbuffer
|
||||
# define gzclearerr z_gzclearerr
|
||||
# define gzclose z_gzclose
|
||||
# define gzclose_r z_gzclose_r
|
||||
# define gzclose_w z_gzclose_w
|
||||
# define gzdirect z_gzdirect
|
||||
# define gzdopen z_gzdopen
|
||||
# define gzeof z_gzeof
|
||||
# define gzerror z_gzerror
|
||||
# define gzflush z_gzflush
|
||||
# define gzgetc z_gzgetc
|
||||
# define gzgetc_ z_gzgetc_
|
||||
# define gzgets z_gzgets
|
||||
# define gzoffset z_gzoffset
|
||||
# define gzoffset64 z_gzoffset64
|
||||
# define gzopen z_gzopen
|
||||
# define gzopen64 z_gzopen64
|
||||
# ifdef _WIN32
|
||||
# define gzopen_w z_gzopen_w
|
||||
# endif
|
||||
# define gzprintf z_gzprintf
|
||||
# define gzvprintf z_gzvprintf
|
||||
# define gzputc z_gzputc
|
||||
# define gzputs z_gzputs
|
||||
# define gzread z_gzread
|
||||
# define gzrewind z_gzrewind
|
||||
# define gzseek z_gzseek
|
||||
# define gzseek64 z_gzseek64
|
||||
# define gzsetparams z_gzsetparams
|
||||
# define gztell z_gztell
|
||||
# define gztell64 z_gztell64
|
||||
# define gzungetc z_gzungetc
|
||||
# define gzwrite z_gzwrite
|
||||
# endif
|
||||
# define inflate z_inflate
|
||||
# define inflateBack z_inflateBack
|
||||
# define inflateBackEnd z_inflateBackEnd
|
||||
# define inflateBackInit_ z_inflateBackInit_
|
||||
# define inflateCopy z_inflateCopy
|
||||
# define inflateEnd z_inflateEnd
|
||||
# define inflateGetHeader z_inflateGetHeader
|
||||
# define inflateInit2_ z_inflateInit2_
|
||||
# define inflateInit_ z_inflateInit_
|
||||
# define inflateMark z_inflateMark
|
||||
# define inflatePrime z_inflatePrime
|
||||
# define inflateReset z_inflateReset
|
||||
# define inflateReset2 z_inflateReset2
|
||||
# define inflateSetDictionary z_inflateSetDictionary
|
||||
# define inflateGetDictionary z_inflateGetDictionary
|
||||
# define inflateSync z_inflateSync
|
||||
# define inflateSyncPoint z_inflateSyncPoint
|
||||
# define inflateUndermine z_inflateUndermine
|
||||
# define inflateResetKeep z_inflateResetKeep
|
||||
# define inflate_copyright z_inflate_copyright
|
||||
# define inflate_fast z_inflate_fast
|
||||
# define inflate_table z_inflate_table
|
||||
# ifndef Z_SOLO
|
||||
# define uncompress z_uncompress
|
||||
# endif
|
||||
# define zError z_zError
|
||||
# ifndef Z_SOLO
|
||||
# define zcalloc z_zcalloc
|
||||
# define zcfree z_zcfree
|
||||
# endif
|
||||
# define zlibCompileFlags z_zlibCompileFlags
|
||||
# define zlibVersion z_zlibVersion
|
||||
|
||||
/* all zlib typedefs in zlib.h and zconf.h */
|
||||
# define Byte z_Byte
|
||||
# define Bytef z_Bytef
|
||||
# define alloc_func z_alloc_func
|
||||
# define charf z_charf
|
||||
# define free_func z_free_func
|
||||
# ifndef Z_SOLO
|
||||
# define gzFile z_gzFile
|
||||
# endif
|
||||
# define gz_header z_gz_header
|
||||
# define gz_headerp z_gz_headerp
|
||||
# define in_func z_in_func
|
||||
# define intf z_intf
|
||||
# define out_func z_out_func
|
||||
# define uInt z_uInt
|
||||
# define uIntf z_uIntf
|
||||
# define uLong z_uLong
|
||||
# define uLongf z_uLongf
|
||||
# define voidp z_voidp
|
||||
# define voidpc z_voidpc
|
||||
# define voidpf z_voidpf
|
||||
|
||||
/* all zlib structs in zlib.h and zconf.h */
|
||||
# define gz_header_s z_gz_header_s
|
||||
# define internal_state z_internal_state
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__MSDOS__) && !defined(MSDOS)
|
||||
# define MSDOS
|
||||
#endif
|
||||
#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
|
||||
# define OS2
|
||||
#endif
|
||||
#if defined(_WINDOWS) && !defined(WINDOWS)
|
||||
# define WINDOWS
|
||||
#endif
|
||||
#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
|
||||
# ifndef WIN32
|
||||
# define WIN32
|
||||
# endif
|
||||
#endif
|
||||
#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
|
||||
# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
|
||||
# ifndef SYS16BIT
|
||||
# define SYS16BIT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Compile with -DMAXSEG_64K if the alloc function cannot allocate more
|
||||
* than 64k bytes at a time (needed on systems with 16-bit int).
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# define MAXSEG_64K
|
||||
#endif
|
||||
#ifdef MSDOS
|
||||
# define UNALIGNED_OK
|
||||
#endif
|
||||
|
||||
#ifdef __STDC_VERSION__
|
||||
# ifndef STDC
|
||||
# define STDC
|
||||
# endif
|
||||
# if __STDC_VERSION__ >= 199901L
|
||||
# ifndef STDC99
|
||||
# define STDC99
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
|
||||
# define STDC
|
||||
#endif
|
||||
#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
|
||||
# define STDC
|
||||
#endif
|
||||
|
||||
#ifndef STDC
|
||||
# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
|
||||
# define const /* note: need a more gentle solution here */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(ZLIB_CONST) && !defined(z_const)
|
||||
# define z_const const
|
||||
#else
|
||||
# define z_const
|
||||
#endif
|
||||
|
||||
/* Some Mac compilers merge all .h files incorrectly: */
|
||||
#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
|
||||
# define NO_DUMMY_DECL
|
||||
#endif
|
||||
|
||||
/* Maximum value for memLevel in deflateInit2 */
|
||||
#ifndef MAX_MEM_LEVEL
|
||||
# ifdef MAXSEG_64K
|
||||
# define MAX_MEM_LEVEL 8
|
||||
# else
|
||||
# define MAX_MEM_LEVEL 9
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Maximum value for windowBits in deflateInit2 and inflateInit2.
|
||||
* WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
|
||||
* created by gzip. (Files created by minigzip can still be extracted by
|
||||
* gzip.)
|
||||
*/
|
||||
#ifndef MAX_WBITS
|
||||
# define MAX_WBITS 15 /* 32K LZ77 window */
|
||||
#endif
|
||||
|
||||
/* The memory requirements for deflate are (in bytes):
|
||||
(1 << (windowBits+2)) + (1 << (memLevel+9))
|
||||
that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
|
||||
plus a few kilobytes for small objects. For example, if you want to reduce
|
||||
the default memory requirements from 256K to 128K, compile with
|
||||
make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
|
||||
Of course this will generally degrade compression (there's no free lunch).
|
||||
|
||||
The memory requirements for inflate are (in bytes) 1 << windowBits
|
||||
that is, 32K for windowBits=15 (default value) plus a few kilobytes
|
||||
for small objects.
|
||||
*/
|
||||
|
||||
/* Type declarations */
|
||||
|
||||
#ifndef OF /* function prototypes */
|
||||
# ifdef STDC
|
||||
# define OF(args) args
|
||||
# else
|
||||
# define OF(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef Z_ARG /* function prototypes for stdarg */
|
||||
# if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# define Z_ARG(args) args
|
||||
# else
|
||||
# define Z_ARG(args) ()
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* The following definitions for FAR are needed only for MSDOS mixed
|
||||
* model programming (small or medium model with some far allocations).
|
||||
* This was tested only with MSC; for other MSDOS compilers you may have
|
||||
* to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
|
||||
* just define FAR to be empty.
|
||||
*/
|
||||
#ifdef SYS16BIT
|
||||
# if defined(M_I86SM) || defined(M_I86MM)
|
||||
/* MSC small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef _MSC_VER
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
# if (defined(__SMALL__) || defined(__MEDIUM__))
|
||||
/* Turbo C small or medium model */
|
||||
# define SMALL_MEDIUM
|
||||
# ifdef __BORLANDC__
|
||||
# define FAR _far
|
||||
# else
|
||||
# define FAR far
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(WINDOWS) || defined(WIN32)
|
||||
/* If building or using zlib as a DLL, define ZLIB_DLL.
|
||||
* This is not mandatory, but it offers a little performance increase.
|
||||
*/
|
||||
/* If building or using zlib with the WINAPI/WINAPIV calling convention,
|
||||
* define ZLIB_WINAPI.
|
||||
* Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
|
||||
*/
|
||||
# ifdef ZLIB_WINAPI
|
||||
# ifdef FAR
|
||||
# undef FAR
|
||||
# endif
|
||||
# include <windows.h>
|
||||
/* No need for _export, use ZLIB.DEF instead. */
|
||||
/* For complete Windows compatibility, use WINAPI, not __stdcall. */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef FAR
|
||||
# define FAR
|
||||
#endif
|
||||
|
||||
#if !defined(__MACTYPES__)
|
||||
typedef unsigned char Byte; /* 8 bits */
|
||||
#endif
|
||||
typedef unsigned int uInt; /* 16 bits or more */
|
||||
typedef unsigned long uLong; /* 32 bits or more */
|
||||
|
||||
#ifdef SMALL_MEDIUM
|
||||
/* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
|
||||
# define Bytef Byte FAR
|
||||
#else
|
||||
typedef Byte FAR Bytef;
|
||||
#endif
|
||||
typedef char FAR charf;
|
||||
typedef int FAR intf;
|
||||
typedef uInt FAR uIntf;
|
||||
typedef uLong FAR uLongf;
|
||||
|
||||
#ifdef STDC
|
||||
typedef void const *voidpc;
|
||||
typedef void FAR *voidpf;
|
||||
typedef void *voidp;
|
||||
#else
|
||||
typedef Byte const *voidpc;
|
||||
typedef Byte FAR *voidpf;
|
||||
typedef Byte *voidp;
|
||||
#endif
|
||||
|
||||
#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC)
|
||||
# include <limits.h>
|
||||
# if (UINT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned
|
||||
# elif (ULONG_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned long
|
||||
# elif (USHRT_MAX == 0xffffffffUL)
|
||||
# define Z_U4 unsigned short
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef Z_U4
|
||||
typedef Z_U4 z_crc_t;
|
||||
#else
|
||||
typedef unsigned long z_crc_t;
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STDARG_H /* may be set to #if 1 by ./configure */
|
||||
# define Z_HAVE_STDARG_H
|
||||
#endif
|
||||
|
||||
#ifdef STDC
|
||||
# ifndef Z_SOLO
|
||||
# include <sys/types.h> /* for off_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(STDC) || defined(Z_HAVE_STDARG_H)
|
||||
# ifndef Z_SOLO
|
||||
# include <stdarg.h> /* for va_list */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
# ifndef Z_SOLO
|
||||
# include <stddef.h> /* for wchar_t */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
|
||||
* "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
|
||||
* though the former does not conform to the LFS document), but considering
|
||||
* both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
|
||||
* equivalently requesting no 64-bit operations
|
||||
*/
|
||||
#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1
|
||||
# undef _LARGEFILE64_SOURCE
|
||||
#endif
|
||||
|
||||
#if defined(__WATCOMC__) && !defined(Z_HAVE_UNISTD_H)
|
||||
# define Z_HAVE_UNISTD_H
|
||||
#endif
|
||||
#ifndef Z_SOLO
|
||||
# if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
|
||||
# include <unistd.h> /* for SEEK_*, off_t, and _LFS64_LARGEFILE */
|
||||
# ifdef VMS
|
||||
# include <unixio.h> /* for off_t */
|
||||
# endif
|
||||
# ifndef z_off_t
|
||||
# define z_off_t off_t
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0
|
||||
# define Z_LFS64
|
||||
#endif
|
||||
|
||||
#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64)
|
||||
# define Z_LARGE64
|
||||
#endif
|
||||
|
||||
#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64)
|
||||
# define Z_WANT64
|
||||
#endif
|
||||
|
||||
#if !defined(SEEK_SET) && !defined(Z_SOLO)
|
||||
# define SEEK_SET 0 /* Seek from beginning of file. */
|
||||
# define SEEK_CUR 1 /* Seek from current position. */
|
||||
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
|
||||
#endif
|
||||
|
||||
#ifndef z_off_t
|
||||
# define z_off_t long
|
||||
#endif
|
||||
|
||||
#if !defined(_WIN32) && defined(Z_LARGE64)
|
||||
# define z_off64_t off64_t
|
||||
#else
|
||||
# if defined(_WIN32) && !defined(__GNUC__) && !defined(Z_SOLO)
|
||||
# define z_off64_t __int64
|
||||
# else
|
||||
# define z_off64_t z_off_t
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* MVS linker does not support external names larger than 8 bytes */
|
||||
#if defined(__MVS__)
|
||||
#pragma map(deflateInit_,"DEIN")
|
||||
#pragma map(deflateInit2_,"DEIN2")
|
||||
#pragma map(deflateEnd,"DEEND")
|
||||
#pragma map(deflateBound,"DEBND")
|
||||
#pragma map(inflateInit_,"ININ")
|
||||
#pragma map(inflateInit2_,"ININ2")
|
||||
#pragma map(inflateEnd,"INEND")
|
||||
#pragma map(inflateSync,"INSY")
|
||||
#pragma map(inflateSetDictionary,"INSEDI")
|
||||
#pragma map(compressBound,"CMBND")
|
||||
#pragma map(inflate_table,"INTABL")
|
||||
#pragma map(inflate_fast,"INFA")
|
||||
#pragma map(inflate_copyright,"INCOPY")
|
||||
#endif
|
||||
|
||||
#endif /* ZCONF_H */
|
2
deps/libz/zutil.c
vendored
2
deps/libz/zutil.c
vendored
@ -5,7 +5,7 @@
|
||||
|
||||
/* @(#) $Id$ */
|
||||
|
||||
#include <zutil.h>
|
||||
#include "zutil.h"
|
||||
#ifndef Z_SOLO
|
||||
# include "gzguts.h"
|
||||
#endif
|
||||
|
@ -1,8 +1,6 @@
|
||||
#ifndef _COMPAT_ZUTIL_H
|
||||
#define _COMPAT_ZUTIL_H
|
||||
|
||||
#ifdef WANT_ZLIB
|
||||
|
||||
/* zutil.h -- internal interface and configuration of the compression library
|
||||
* Copyright (C) 1995-2013 Jean-loup Gailly.
|
||||
* For conditions of distribution and use, see copyright notice in zlib.h
|
||||
@ -246,8 +244,4 @@ extern char z_errmsg[10][21]; /* indexed by 2-zlib_error */
|
||||
|
||||
#endif /* ZUTIL_H */
|
||||
|
||||
#else
|
||||
#include <zutil.h>
|
||||
#endif
|
||||
|
||||
#endif
|
@ -261,7 +261,7 @@ static void handle_discord_join_response(void *ignore, const char *line)
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_input_dialog_end();
|
||||
rarch_menu_running_finished(false);
|
||||
retroarch_menu_running_finished(false);
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
@ -286,7 +286,7 @@ static void handle_discord_join_request(const DiscordUser* request)
|
||||
#ifdef HAVE_MENU
|
||||
discord_download_avatar(request->userId, request->avatar);
|
||||
/* To-Do: needs in-game widgets
|
||||
rarch_menu_running();
|
||||
retroarch_menu_running();
|
||||
*/
|
||||
|
||||
memset(&line, 0, sizeof(line));
|
||||
|
27
driver.h
27
driver.h
@ -26,29 +26,6 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define DRIVERS_CMD_ALL \
|
||||
( DRIVER_AUDIO_MASK \
|
||||
| DRIVER_VIDEO_MASK \
|
||||
| DRIVER_INPUT_MASK \
|
||||
| DRIVER_CAMERA_MASK \
|
||||
| DRIVER_LOCATION_MASK \
|
||||
| DRIVER_MENU_MASK \
|
||||
| DRIVERS_VIDEO_INPUT_MASK \
|
||||
| DRIVER_WIFI_MASK \
|
||||
| DRIVER_LED_MASK \
|
||||
| DRIVER_MIDI_MASK )
|
||||
|
||||
#define DRIVERS_CMD_ALL_BUT_MENU \
|
||||
( DRIVER_AUDIO_MASK \
|
||||
| DRIVER_VIDEO_MASK \
|
||||
| DRIVER_INPUT_MASK \
|
||||
| DRIVER_CAMERA_MASK \
|
||||
| DRIVER_LOCATION_MASK \
|
||||
| DRIVERS_VIDEO_INPUT_MASK \
|
||||
| DRIVER_WIFI_MASK \
|
||||
| DRIVER_LED_MASK \
|
||||
| DRIVER_MIDI_MASK )
|
||||
|
||||
enum
|
||||
{
|
||||
DRIVER_AUDIO = 0,
|
||||
@ -115,10 +92,6 @@ bool driver_ctl(enum driver_ctl_state state, void *data);
|
||||
* audio and video drivers instead. */
|
||||
void driver_set_nonblock_state(void);
|
||||
|
||||
void driver_uninit(int flags);
|
||||
|
||||
void drivers_init(int flags);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
27
dynamic.h
27
dynamic.h
@ -26,21 +26,6 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* libretro_get_system_info:
|
||||
* @path : Path to libretro library.
|
||||
* @info : System info information.
|
||||
* @load_no_content : If true, core should be able to auto-start
|
||||
* without any content loaded.
|
||||
*
|
||||
* Gets system info from an arbitrary lib.
|
||||
* The struct returned must be freed as strings are allocated dynamically.
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool libretro_get_system_info(const char *path,
|
||||
struct retro_system_info *info, bool *load_no_content);
|
||||
|
||||
/**
|
||||
* libretro_free_system_info:
|
||||
* @info : Pointer to system info information.
|
||||
@ -68,18 +53,6 @@ const struct retro_controller_description *
|
||||
libretro_find_controller_description(
|
||||
const struct retro_controller_info *info, unsigned id);
|
||||
|
||||
/**
|
||||
* rarch_environment_cb:
|
||||
* @cmd : Identifier of command.
|
||||
* @data : Pointer to data.
|
||||
*
|
||||
* Environment callback function implementation.
|
||||
*
|
||||
* Returns: true (1) if environment callback command could
|
||||
* be performed, otherwise false (0).
|
||||
**/
|
||||
bool rarch_environment_cb(unsigned cmd, void *data);
|
||||
|
||||
struct retro_core_t
|
||||
{
|
||||
void (*retro_init)(void);
|
||||
|
@ -411,28 +411,7 @@ static void android_app_entry(void *data)
|
||||
char *argv[] = {arguments, NULL};
|
||||
int argc = 1;
|
||||
|
||||
if (rarch_main(argc, argv, data) != 0)
|
||||
goto end;
|
||||
#ifndef HAVE_MAIN
|
||||
do
|
||||
{
|
||||
unsigned sleep_ms = 0;
|
||||
int ret = runloop_iterate(&sleep_ms);
|
||||
|
||||
if (ret == 1 && sleep_ms > 0)
|
||||
retro_sleep(sleep_ms);
|
||||
|
||||
task_queue_check();
|
||||
|
||||
if (ret == -1)
|
||||
break;
|
||||
}while(1);
|
||||
|
||||
main_exit(data);
|
||||
#endif
|
||||
|
||||
end:
|
||||
exit(0);
|
||||
rarch_main(argc, argv, data);
|
||||
}
|
||||
|
||||
static struct android_app* android_app_create(ANativeActivity* activity,
|
||||
|
@ -22,9 +22,7 @@
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
#ifndef MAX_PADS
|
||||
#define MAX_PADS 8
|
||||
#endif
|
||||
#include "../../config.def.h"
|
||||
|
||||
#ifndef MAX_AXIS
|
||||
#define MAX_AXIS 10
|
||||
@ -43,6 +41,8 @@
|
||||
|
||||
#include <rthreads/rthreads.h>
|
||||
|
||||
#include "../../config.def.h"
|
||||
|
||||
bool test_permissions(const char *path);
|
||||
|
||||
char internal_storage_path[PATH_MAX_LENGTH];
|
||||
@ -144,8 +144,8 @@ struct android_app
|
||||
uint64_t sensor_state_mask;
|
||||
char current_ime[PATH_MAX_LENGTH];
|
||||
bool input_alive;
|
||||
int16_t analog_state[MAX_PADS][MAX_AXIS];
|
||||
int8_t hat_state[MAX_PADS][2];
|
||||
int16_t analog_state[DEFAULT_MAX_PADS][MAX_AXIS];
|
||||
int8_t hat_state[DEFAULT_MAX_PADS][2];
|
||||
jmethodID getIntent;
|
||||
jmethodID onRetroArchExit;
|
||||
jmethodID getStringExtra;
|
||||
|
@ -131,7 +131,8 @@ int32_t d3d_translate_filter(unsigned type)
|
||||
return (int32_t)D3D_TEXTURE_FILTER_POINT;
|
||||
}
|
||||
|
||||
void d3d_input_driver(const char* input_name, const char* joypad_name, const input_driver_t** input, void** input_data)
|
||||
void d3d_input_driver(const char* input_name, const char* joypad_name,
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
#if defined(__WINRT__)
|
||||
/* Plain xinput is supported on UWP, but it
|
||||
@ -139,18 +140,18 @@ void d3d_input_driver(const char* input_name, const char* joypad_name, const inp
|
||||
if (string_is_equal(input_name, "xinput"))
|
||||
{
|
||||
void *xinput = input_xinput.init(joypad_name);
|
||||
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||
*input = xinput ? (input_driver_t*)&input_xinput : NULL;
|
||||
*input_data = xinput;
|
||||
}
|
||||
else
|
||||
{
|
||||
void *uwp = input_uwp.init(joypad_name);
|
||||
*input = uwp ? (const input_driver_t*)&input_uwp : NULL;
|
||||
*input = uwp ? (input_driver_t*)&input_uwp : NULL;
|
||||
*input_data = uwp;
|
||||
}
|
||||
#elif defined(_XBOX)
|
||||
void *xinput = input_xinput.init(joypad_name);
|
||||
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
|
||||
*input = xinput ? (input_driver_t*)&input_xinput : NULL;
|
||||
*input_data = xinput;
|
||||
#else
|
||||
#if _WIN32_WINNT >= 0x0501
|
||||
|
@ -105,7 +105,7 @@ void *d3d_matrix_rotation_z(void *_pout, float angle);
|
||||
int32_t d3d_translate_filter(unsigned type);
|
||||
|
||||
void d3d_input_driver(const char* input_name,
|
||||
const char* joypad_name, const input_driver_t** input, void** input_data);
|
||||
const char* joypad_name, input_driver_t** input, void** input_data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
@ -80,7 +80,7 @@ extern MTLPixelFormat SelectOptimalPixelFormat(MTLPixelFormat fmt);
|
||||
@property (nonatomic, readonly) Uniforms *viewportMVP;
|
||||
|
||||
- (instancetype)initWithVideo:(const video_info_t *)video
|
||||
input:(const input_driver_t **)input
|
||||
input:(input_driver_t **)input
|
||||
inputData:(void **)inputData;
|
||||
|
||||
- (void)setVideo:(const video_info_t *)video;
|
||||
|
@ -88,7 +88,7 @@
|
||||
}
|
||||
|
||||
- (instancetype)initWithVideo:(const video_info_t *)video
|
||||
input:(const input_driver_t **)input
|
||||
input:(input_driver_t **)input
|
||||
inputData:(void **)inputData
|
||||
{
|
||||
if (self = [super init])
|
||||
@ -1147,8 +1147,6 @@ typedef struct MTLALIGN(16)
|
||||
if (!video_shader_read_conf_preset(conf, shader))
|
||||
return NO;
|
||||
|
||||
video_shader_resolve_relative(shader, path.UTF8String);
|
||||
|
||||
source = &_engine.frame.texture[0];
|
||||
|
||||
for (i = 0; i < shader->passes; source = &_engine.pass[i++].rt)
|
||||
|
@ -2034,9 +2034,9 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk,
|
||||
|
||||
use_instance_ext = vulkan_find_instance_extensions(instance_extensions, ext_count);
|
||||
|
||||
app.pApplicationName = "RetroArch";
|
||||
app.pApplicationName = msg_hash_to_str(MSG_PROGRAM);
|
||||
app.applicationVersion = 0;
|
||||
app.pEngineName = "RetroArch";
|
||||
app.pEngineName = msg_hash_to_str(MSG_PROGRAM);
|
||||
app.engineVersion = 0;
|
||||
app.apiVersion = VK_MAKE_VERSION(1, 0, 18);
|
||||
|
||||
|
@ -57,7 +57,6 @@
|
||||
|
||||
#include <commdlg.h>
|
||||
#include <dbt.h>
|
||||
#include "../../input/input_driver.h"
|
||||
#include "../../input/input_keymaps.h"
|
||||
#include "../video_thread_wrapper.h"
|
||||
#include "../video_display_server.h"
|
||||
@ -105,12 +104,6 @@ extern void *dinput_wgl;
|
||||
extern void *dinput;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_XINPUT) && !defined(HAVE_DINPUT)
|
||||
#ifndef MAX_PADS
|
||||
#define MAX_PADS 4
|
||||
#endif
|
||||
#endif
|
||||
|
||||
typedef struct DISPLAYCONFIG_RATIONAL_CUSTOM {
|
||||
UINT32 Numerator;
|
||||
UINT32 Denominator;
|
||||
@ -692,7 +685,7 @@ static void win32_save_position(void)
|
||||
settings->uints.window_position_x = g_win32_pos_x;
|
||||
settings->uints.window_position_y = g_win32_pos_y;
|
||||
settings->uints.window_position_width = g_win32_pos_width - border_thickness * 2;
|
||||
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - ((settings->bools.ui_menubar_enable && !video_driver_is_threaded()) ? menu_bar_height : 0);
|
||||
settings->uints.window_position_height = g_win32_pos_height - border_thickness * 2 - title_bar_height - (settings->bools.ui_menubar_enable ? menu_bar_height : 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1006,7 +999,7 @@ bool win32_window_create(void *data, unsigned style,
|
||||
user_height= g_win32_pos_height;
|
||||
}
|
||||
main_window.hwnd = CreateWindowEx(0,
|
||||
"RetroArch", "RetroArch",
|
||||
msg_hash_to_str(MSG_PROGRAM), msg_hash_to_str(MSG_PROGRAM),
|
||||
style,
|
||||
fullscreen ? mon_rect->left : g_win32_pos_x,
|
||||
fullscreen ? mon_rect->top : g_win32_pos_y,
|
||||
@ -1306,7 +1299,7 @@ void win32_set_window(unsigned *width, unsigned *height,
|
||||
settings_t *settings = config_get_ptr();
|
||||
const ui_window_t *window = ui_companion_driver_get_window_ptr();
|
||||
|
||||
if (!fullscreen && settings->bools.ui_menubar_enable && !video_driver_is_threaded())
|
||||
if (!fullscreen && settings->bools.ui_menubar_enable)
|
||||
{
|
||||
RECT rc_temp;
|
||||
rc_temp.left = 0;
|
||||
@ -1414,17 +1407,8 @@ BOOL IsIconic(HWND hwnd)
|
||||
bool win32_has_focus(void)
|
||||
{
|
||||
if (g_win32_inited)
|
||||
{
|
||||
#ifdef _XBOX
|
||||
if (GetForegroundWindow() == main_window.hwnd)
|
||||
return true;
|
||||
#else
|
||||
const ui_window_t *window =
|
||||
ui_companion_driver_get_window_ptr();
|
||||
if (window)
|
||||
return window->focused(&main_window);
|
||||
#endif
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
@ -1447,7 +1431,8 @@ void win32_window_reset(void)
|
||||
void win32_destroy_window(void)
|
||||
{
|
||||
#ifndef _XBOX
|
||||
UnregisterClass("RetroArch", GetModuleHandle(NULL));
|
||||
UnregisterClass(msg_hash_to_str(MSG_PROGRAM),
|
||||
GetModuleHandle(NULL));
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x500 /* 2K */
|
||||
UnregisterDeviceNotification(notification_handler);
|
||||
#endif
|
||||
|
@ -66,7 +66,7 @@ static void caca_gfx_create(void)
|
||||
}
|
||||
|
||||
static void *caca_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
caca_t *caca = (caca_t*)calloc(1, sizeof(*caca));
|
||||
|
||||
|
@ -326,7 +326,7 @@ static void ctr_set_bottom_screen_enable(void* data, bool enabled)
|
||||
}
|
||||
|
||||
static void* ctr_init(const video_info_t* video,
|
||||
const input_driver_t** input, void** input_data)
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
float refresh_rate;
|
||||
u8 device_model = 0xFF;
|
||||
|
@ -368,8 +368,6 @@ static bool d3d10_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
if (!video_shader_read_conf_preset(conf, d3d10->shader_preset))
|
||||
goto error;
|
||||
|
||||
video_shader_resolve_relative(d3d10->shader_preset, path);
|
||||
|
||||
source = &d3d10->frame.texture[0];
|
||||
for (i = 0; i < d3d10->shader_preset->passes; source = &d3d10->pass[i++].rt)
|
||||
{
|
||||
@ -608,9 +606,8 @@ static void d3d10_gfx_free(void* data)
|
||||
free(d3d10);
|
||||
}
|
||||
|
||||
static void*
|
||||
d3d10_gfx_init(const video_info_t* video,
|
||||
const input_driver_t** input, void** input_data)
|
||||
static void *d3d10_gfx_init(const video_info_t* video,
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef HAVE_MONITOR
|
||||
@ -707,6 +704,7 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
d3d10->viewport.Width = d3d10->vp.full_width;
|
||||
d3d10->viewport.Height = d3d10->vp.full_height;
|
||||
d3d10->resize_viewport = true;
|
||||
d3d10->keep_aspect = video->force_aspect;
|
||||
d3d10->vsync = video->vsync;
|
||||
d3d10->format = video->rgb32 ?
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B5G6R5_UNORM;
|
||||
@ -973,9 +971,11 @@ d3d10_gfx_init(const video_info_t* video,
|
||||
{
|
||||
d3d10_fake_context.get_flags = d3d10_get_flags;
|
||||
video_context_driver_set(&d3d10_fake_context);
|
||||
#ifdef HAVE_SLANG
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
|
||||
d3d10_gfx_set_shader(d3d10, type, shader_preset);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -386,8 +386,6 @@ static bool d3d11_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
if (!video_shader_read_conf_preset(conf, d3d11->shader_preset))
|
||||
goto error;
|
||||
|
||||
video_shader_resolve_relative(d3d11->shader_preset, path);
|
||||
|
||||
source = &d3d11->frame.texture[0];
|
||||
for (i = 0; i < d3d11->shader_preset->passes; source = &d3d11->pass[i++].rt)
|
||||
{
|
||||
@ -623,8 +621,8 @@ static void d3d11_gfx_free(void* data)
|
||||
free(d3d11);
|
||||
}
|
||||
|
||||
static void*
|
||||
d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
|
||||
static void *d3d11_gfx_init(const video_info_t* video,
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef HAVE_MONITOR
|
||||
@ -784,6 +782,7 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
d3d11->viewport.Width = d3d11->vp.full_width;
|
||||
d3d11->viewport.Height = d3d11->vp.full_height;
|
||||
d3d11->resize_viewport = true;
|
||||
d3d11->keep_aspect = video->force_aspect;
|
||||
d3d11->vsync = video->vsync;
|
||||
d3d11->format = video->rgb32 ?
|
||||
DXGI_FORMAT_B8G8R8X8_UNORM : DXGI_FORMAT_B5G6R5_UNORM;
|
||||
|
@ -367,8 +367,6 @@ static bool d3d12_gfx_set_shader(void* data, enum rarch_shader_type type, const
|
||||
if (!video_shader_read_conf_preset(conf, d3d12->shader_preset))
|
||||
goto error;
|
||||
|
||||
video_shader_resolve_relative(d3d12->shader_preset, path);
|
||||
|
||||
source = &d3d12->frame.texture[0];
|
||||
for (i = 0; i < d3d12->shader_preset->passes; source = &d3d12->pass[i++].rt)
|
||||
{
|
||||
@ -894,8 +892,8 @@ static void d3d12_gfx_free(void* data)
|
||||
free(d3d12);
|
||||
}
|
||||
|
||||
static void*
|
||||
d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
|
||||
static void *d3d12_gfx_init(const video_info_t* video,
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
#ifdef HAVE_MONITOR
|
||||
MONITORINFOEX current_mon;
|
||||
|
@ -1126,7 +1126,7 @@ static void d3d8_set_osd_msg(void *data,
|
||||
}
|
||||
|
||||
static bool d3d8_init_internal(d3d8_video_t *d3d,
|
||||
const video_info_t *info, const input_driver_t **input,
|
||||
const video_info_t *info, input_driver_t **input,
|
||||
void **input_data)
|
||||
{
|
||||
#ifdef HAVE_MONITOR
|
||||
@ -1237,7 +1237,7 @@ static void d3d8_show_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static void *d3d8_init(const video_info_t *info,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
d3d8_video_t *d3d = (d3d8_video_t*)calloc(1, sizeof(*d3d));
|
||||
|
||||
|
@ -31,6 +31,10 @@
|
||||
|
||||
#include <d3d9.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../../defines/d3d_defines.h"
|
||||
#include "../common/d3d_common.h"
|
||||
#include "../common/d3d9_common.h"
|
||||
@ -344,8 +348,6 @@ static bool d3d9_init_multipass(d3d9_video_t *d3d, const char *shader_path)
|
||||
|
||||
config_file_free(conf);
|
||||
|
||||
if (!string_is_empty(shader_path))
|
||||
video_shader_resolve_relative(&d3d->shader, shader_path);
|
||||
RARCH_LOG("[D3D9]: Found %u shaders.\n", d3d->shader.passes);
|
||||
|
||||
for (i = 0; i < d3d->shader.passes; i++)
|
||||
@ -1146,7 +1148,7 @@ static void d3d9_set_osd_msg(void *data,
|
||||
}
|
||||
|
||||
static bool d3d9_init_internal(d3d9_video_t *d3d,
|
||||
const video_info_t *info, const input_driver_t **input,
|
||||
const video_info_t *info, input_driver_t **input,
|
||||
void **input_data)
|
||||
{
|
||||
#ifdef HAVE_MONITOR
|
||||
@ -1233,16 +1235,17 @@ static bool d3d9_init_internal(d3d9_video_t *d3d,
|
||||
return false;
|
||||
|
||||
{
|
||||
const char *shader_preset;
|
||||
enum rarch_shader_type type;
|
||||
|
||||
d3d9_fake_context.get_flags = d3d9_get_flags;
|
||||
video_context_driver_set(&d3d9_fake_context);
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL)
|
||||
{
|
||||
const char *shader_preset = retroarch_get_shader_preset();
|
||||
enum rarch_shader_type type = video_shader_parse_type(shader_preset);
|
||||
|
||||
shader_preset = retroarch_get_shader_preset();
|
||||
type = video_shader_parse_type(shader_preset);
|
||||
|
||||
d3d9_set_shader(d3d, type, shader_preset);
|
||||
d3d9_set_shader(d3d, type, shader_preset);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
d3d_input_driver(settings->arrays.input_joypad_driver,
|
||||
@ -1288,7 +1291,7 @@ static void d3d9_show_mouse(void *data, bool state)
|
||||
}
|
||||
|
||||
static void *d3d9_init(const video_info_t *info,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
d3d9_video_t *d3d = (d3d9_video_t*)calloc(1, sizeof(*d3d));
|
||||
|
||||
@ -1754,6 +1757,7 @@ end:
|
||||
static bool d3d9_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path)
|
||||
{
|
||||
#if defined(HAVE_CG) || defined(HAVE_HLSL)
|
||||
d3d9_video_t *d3d = (d3d9_video_t*)data;
|
||||
|
||||
if (!d3d)
|
||||
@ -1792,6 +1796,9 @@ static bool d3d9_set_shader(void *data,
|
||||
}
|
||||
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void d3d9_set_menu_texture_frame(void *data,
|
||||
@ -1943,6 +1950,7 @@ static void d3d9_video_texture_load_d3d(
|
||||
*id = (uintptr_t)tex;
|
||||
}
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
static int d3d9_video_texture_load_wrap_d3d(void *data)
|
||||
{
|
||||
uintptr_t id = 0;
|
||||
@ -1952,6 +1960,7 @@ static int d3d9_video_texture_load_wrap_d3d(void *data)
|
||||
d3d9_video_texture_load_d3d(info, &id);
|
||||
return id;
|
||||
}
|
||||
#endif
|
||||
|
||||
static uintptr_t d3d9_load_texture(void *video_data, void *data,
|
||||
bool threaded, enum texture_filter_type filter_type)
|
||||
@ -1963,9 +1972,11 @@ static uintptr_t d3d9_load_texture(void *video_data, void *data,
|
||||
info.data = data;
|
||||
info.type = filter_type;
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (threaded)
|
||||
return video_thread_texture_load(&info,
|
||||
d3d9_video_texture_load_wrap_d3d);
|
||||
#endif
|
||||
|
||||
d3d9_video_texture_load_d3d(&info, &id);
|
||||
return id;
|
||||
|
@ -383,7 +383,7 @@ static void dispmanx_blank_console (struct dispmanx_video *_dispvars)
|
||||
}
|
||||
|
||||
static void *dispmanx_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
struct dispmanx_video *_dispvars = calloc(1, sizeof(struct dispmanx_video));
|
||||
|
||||
|
@ -704,7 +704,7 @@ static bool init_drm(void)
|
||||
}
|
||||
|
||||
static void *drm_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
struct drm_video *_drmvars = (struct drm_video*)
|
||||
calloc(1, sizeof(struct drm_video));
|
||||
|
@ -1164,7 +1164,7 @@ static int exynos_render_msg(struct exynos_video *vid,
|
||||
}
|
||||
|
||||
static void *exynos_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
struct exynos_video *vid;
|
||||
const unsigned fb_bpp = 4; /* Use XRGB8888 framebuffer. */
|
||||
|
@ -78,7 +78,7 @@ static void gdi_gfx_create(void)
|
||||
}
|
||||
|
||||
static void *gdi_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
unsigned full_x, full_y;
|
||||
gfx_ctx_input_t inp;
|
||||
|
@ -3636,7 +3636,7 @@ static bool renderchain_gl2_init_first(void **renderchain_handle)
|
||||
}
|
||||
|
||||
static void *gl2_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
enum gfx_wrap_type wrap_type;
|
||||
gfx_ctx_mode_t mode;
|
||||
@ -3743,9 +3743,9 @@ static void *gl2_init(const video_info_t *video,
|
||||
if (string_is_equal(vendor, "Microsoft Corporation"))
|
||||
if (string_is_equal(renderer, "GDI Generic"))
|
||||
#ifdef HAVE_OPENGL1
|
||||
rarch_force_video_driver_fallback("gl1");
|
||||
retroarch_force_video_driver_fallback("gl1");
|
||||
#else
|
||||
rarch_force_video_driver_fallback("gdi");
|
||||
retroarch_force_video_driver_fallback("gdi");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -228,7 +228,7 @@ static unsigned get_pot(unsigned x)
|
||||
}
|
||||
|
||||
static void *gl1_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
unsigned full_x, full_y;
|
||||
gfx_ctx_input_t inp;
|
||||
|
@ -933,7 +933,7 @@ static void gl_core_begin_debug(gl_core_t *gl)
|
||||
#endif
|
||||
|
||||
static void *gl_core_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
gfx_ctx_mode_t mode;
|
||||
gfx_ctx_input_t inp;
|
||||
@ -1048,9 +1048,9 @@ static void *gl_core_init(const video_info_t *video,
|
||||
if (string_is_equal(vendor, "Microsoft Corporation"))
|
||||
if (string_is_equal(renderer, "GDI Generic"))
|
||||
#ifdef HAVE_OPENGL1
|
||||
rarch_force_video_driver_fallback("gl1");
|
||||
retroarch_force_video_driver_fallback("gl1");
|
||||
#else
|
||||
rarch_force_video_driver_fallback("gdi");
|
||||
retroarch_force_video_driver_fallback("gdi");
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -203,7 +203,7 @@ static void wiiu_gfx_set_aspect_ratio(void *data, unsigned aspect_ratio_idx)
|
||||
static uint32_t wiiu_gfx_get_flags(void *data);
|
||||
|
||||
static void *wiiu_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
float refresh_rate = 60.0f / 1.001f;
|
||||
@ -1465,8 +1465,6 @@ static bool wiiu_gfx_set_shader(void *data,
|
||||
return false;
|
||||
}
|
||||
|
||||
video_shader_resolve_relative(wiiu->shader_preset, path);
|
||||
|
||||
#if 0
|
||||
video_shader_resolve_parameters(conf, wiiu->shader_preset);
|
||||
#else
|
||||
|
@ -782,7 +782,7 @@ static void gx_efb_screenshot(void)
|
||||
#endif
|
||||
|
||||
static void *gx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
void *gxinput = NULL;
|
||||
|
@ -61,9 +61,10 @@ static uint32_t metal_get_flags(void *data);
|
||||
static bool metal_set_shader(void *data,
|
||||
enum rarch_shader_type type, const char *path);
|
||||
|
||||
static void *metal_init(const video_info_t *video,
|
||||
const input_driver_t **input,
|
||||
void **input_data)
|
||||
static void *metal_init(
|
||||
const video_info_t *video,
|
||||
input_driver_t **input,
|
||||
void **input_data)
|
||||
{
|
||||
[apple_platform setViewType:APPLE_VIEW_TYPE_METAL];
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
#include "../../verbosity.h"
|
||||
|
||||
static void *null_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
RARCH_ERR("Using the null video driver. RetroArch will not be visible.");
|
||||
|
||||
|
@ -930,7 +930,7 @@ static void omap_render_msg(omap_video_t *vid, const char *msg)
|
||||
|
||||
/* FIXME/TODO: Filters not supported. */
|
||||
static void *omap_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
omap_video_t *vid = (omap_video_t*)calloc(1, sizeof(omap_video_t));
|
||||
|
@ -222,7 +222,7 @@ static void ps2_texture_upload(GSGLOBAL *gsGlobal, GSTEXTURE *Texture, bool send
|
||||
}
|
||||
|
||||
static void *ps2_gfx_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
void *ps2input = NULL;
|
||||
*input_data = NULL;
|
||||
|
@ -259,7 +259,7 @@ static void psp_on_vblank(u32 sub, psp1_video_t *psp)
|
||||
}
|
||||
|
||||
static void *psp_init(const video_info_t *video,
|
||||
const input_driver_t **input, void **input_data)
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
/* TODO : add ASSERT() checks or use main RAM if
|
||||
* VRAM is too low for desired video->input_scale. */
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user