Merge branch 'master' into rapi_client
This commit is contained in:
commit
bb2cf59a12
|
@ -1,4 +1,4 @@
|
|||
# EditorConfig: http://EditorConfig.org
|
||||
# EditorConfig: https://EditorConfig.org
|
||||
|
||||
# Top-most EditorConfig file
|
||||
root = true
|
||||
|
|
|
@ -94,7 +94,6 @@ database
|
|||
overlays
|
||||
playlists
|
||||
states
|
||||
system
|
||||
shaders/shaders_cg
|
||||
shaders/shaders_glsl
|
||||
shaders/shaders_slang
|
||||
|
@ -220,7 +219,6 @@ libretro-common/samples/streams/rzip/rzip
|
|||
|
||||
#VITA
|
||||
param.sfo
|
||||
*.S
|
||||
*.wo
|
||||
*.elf
|
||||
*.self
|
||||
|
|
|
@ -426,6 +426,28 @@ build-retroarch-dingux-odbeta-mips32:
|
|||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
|
||||
build-retroarch-rs90-odbeta-mips32:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-dingux:odbeta
|
||||
stage: build
|
||||
variables:
|
||||
MEDIA_PATH: .media
|
||||
STRIP_BIN: 1
|
||||
before_script:
|
||||
- export NUMPROC=$(($(nproc)/3))
|
||||
artifacts:
|
||||
paths:
|
||||
- retroarch
|
||||
- retroarch_rs90_odbeta.opk
|
||||
- ${MEDIA_PATH}
|
||||
expire_in: 10 min
|
||||
dependencies: []
|
||||
script:
|
||||
- "make -j$NUMPROC -f Makefile.rs90"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "mkdir -p ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
- "cp -f libretro-common/audio/dsp_filters/*.dsp ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/audio"
|
||||
- "cp -f gfx/video_filters/*.filt ${MEDIA_PATH}/${CI_PROJECT_NAME}/filters/video"
|
||||
|
||||
build-retroarch-android-normal:
|
||||
image: $CI_SERVER_HOST:5050/libretro-infrastructure/libretro-build-android:latest
|
||||
stage: build
|
||||
|
|
|
@ -668,7 +668,7 @@ else ifeq ($(HAVE_BUILTINMBEDTLS), 1)
|
|||
DEFINES += -DMBEDTLS_SSL_DEBUG_ALL
|
||||
endif
|
||||
|
||||
# MinGW requires this for some reason,
|
||||
# MinGW requires this for some reason,
|
||||
# even though the include paths are relative to the source
|
||||
INCLUDE_DIRS += -Ideps/mbedtls
|
||||
|
||||
|
@ -829,7 +829,9 @@ ifeq ($(HAVE_ALSA), 1)
|
|||
|
||||
ifneq ($(HAVE_HAKCHI), 1)
|
||||
ifneq ($(HAVE_SEGAM), 1)
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
ifneq ($(DINGUX), 1)
|
||||
OBJ += midi/drivers/alsa_midi.o
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1574,8 +1576,14 @@ else ifeq ($(HAVE_SDL), 1)
|
|||
else ifeq ($(HAVE_SDL_DINGUX), 1)
|
||||
HAVE_SDL_COMMON = 1
|
||||
DEF_FLAGS += -DHAVE_SDL -DHAVE_SDL_DINGUX
|
||||
OBJ += gfx/drivers/sdl_dingux_gfx.o \
|
||||
input/drivers/sdl_dingux_input.o \
|
||||
|
||||
ifeq ($(RS90), 1)
|
||||
OBJ += gfx/drivers/sdl_rs90_gfx.o
|
||||
else
|
||||
OBJ += gfx/drivers/sdl_dingux_gfx.o
|
||||
endif
|
||||
|
||||
OBJ += input/drivers/sdl_dingux_input.o \
|
||||
input/drivers_joypad/sdl_dingux_joypad.o
|
||||
DEF_FLAGS += $(SDL_DINGUX_CFLAGS)
|
||||
LIBS += $(SDL_DINGUX_LIBS)
|
||||
|
@ -2298,9 +2306,9 @@ ifeq ($(HAVE_CRTSWITCHRES), 1)
|
|||
$(DEPS_DIR)/switchres/resync_windows.o
|
||||
endif
|
||||
ifneq ($(findstring Linux,$(OS)),)
|
||||
OBJ += $(DEPS_DIR)/switchres/display_linux.o
|
||||
OBJ += $(DEPS_DIR)/switchres/display_linux.o
|
||||
ifeq ($(HAVE_X11)$(HAVE_XRANDR), 11)
|
||||
OBJ += $(DEPS_DIR)/switchres/custom_video_xrandr.o
|
||||
OBJ += $(DEPS_DIR)/switchres/custom_video_xrandr.o
|
||||
DEFINES += -DSR_WITH_XRANDR
|
||||
endif
|
||||
endif
|
||||
|
@ -2327,9 +2335,9 @@ ifeq ($(HAVE_COCOA_COMMON),1)
|
|||
OBJ += input/drivers/cocoa_input.o \
|
||||
ui/drivers/ui_cocoa.o \
|
||||
ui/drivers/cocoa/cocoa_common.o
|
||||
|
||||
|
||||
ifeq ($(HAVE_OPENGL), 1)
|
||||
DEFINES += -DGL_SILENCE_DEPRECATION
|
||||
DEFINES += -DGL_SILENCE_DEPRECATION
|
||||
OBJ += gfx/drivers_context/cocoa_gl_ctx.o
|
||||
endif
|
||||
ifeq ($(HAVE_VULKAN), 1)
|
||||
|
@ -2373,10 +2381,10 @@ endif
|
|||
|
||||
ifeq ($(WANT_IOSUHAX), 1)
|
||||
DEFINES += -DHAVE_IOSUHAX
|
||||
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
|
||||
INCLUDE_DIRS += -I$(DEPS_DIR)/libiosuhax/include
|
||||
OBJ += $(DEPS_DIR)/libiosuhax/source/iosuhax.o \
|
||||
$(DEPS_DIR)/libiosuhax/source/iosuhax_devoptab.o \
|
||||
$(DEPS_DIR)/libiosuhax/source/iosuhax_disc_interface.o
|
||||
endif
|
||||
|
||||
ifeq ($(WANT_LIBFAT), 1)
|
||||
|
@ -2484,4 +2492,3 @@ ifeq ($(HAVE_ODROIDGO2), 1)
|
|||
endif
|
||||
|
||||
##################################
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ HAVE_RTGA = 1
|
|||
HAVE_RPNG = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RBMP = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
|
|
|
@ -50,7 +50,7 @@ CFLAGS += $(RARCH_DEFINES)
|
|||
# All the IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/sio2man_irx.o $ $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/fileXio_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/usbhdfsd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/libsd_irx.o $(IRX_DIR)/audsrv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mtapman_irx.o $(IRX_DIR)/padman_irx.o
|
||||
|
|
|
@ -61,7 +61,8 @@ EE_OBJS = frontend/frontend_salamander.o \
|
|||
|
||||
# Needed IRX objects
|
||||
EE_OBJS += $(IRX_DIR)/sio2man_irx.o $ $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/fileXio_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/usbhdfsd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/usbd_irx.o $(IRX_DIR)/bdm_irx.o $(IRX_DIR)/bdmfs_vfat_irx.o $(IRX_DIR)/usbmass_bd_irx.o
|
||||
EE_OBJS += $(IRX_DIR)/cdfs_irx.o
|
||||
|
||||
EE_CFLAGS = $(CFLAGS)
|
||||
|
|
|
@ -66,7 +66,7 @@ endif
|
|||
SHARED_FLAGS :=
|
||||
|
||||
SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -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 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -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 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MULTIMAN -DHAVE_RGUI
|
||||
CFLAGS += -std=gnu99 $(SHARED_FLAGS)
|
||||
CXXFLAGS += $(SHARED_FLAGS)
|
||||
|
||||
|
|
|
@ -45,8 +45,7 @@ HAVE_SCREENSHOTS = 0
|
|||
HAVE_REWIND = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 1
|
||||
# ALSA freezes when switching back from menu
|
||||
HAVE_ALSA = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
|
@ -121,6 +120,7 @@ DEF_FLAGS += -ffunction-sections -fdata-sections
|
|||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURCE -flto
|
||||
DEF_FLAGS += -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
|
@ -134,6 +134,7 @@ DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
|||
DEFINES += -DHAVE_AL=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
|
|
|
@ -0,0 +1,234 @@
|
|||
#########################
|
||||
## Toolchain variables ##
|
||||
#########################
|
||||
|
||||
# Alpha toolchain
|
||||
TOOLCHAIN_DIR=/opt/rs90-toolchain
|
||||
|
||||
# All toolchain-related variables may be
|
||||
# overridden via the command line
|
||||
ifdef GCW0_CC
|
||||
CC = $(GCW0_CC)
|
||||
else
|
||||
CC = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-gcc
|
||||
endif
|
||||
|
||||
ifdef GCW0_CXX
|
||||
CXX = $(GCW0_CXX)
|
||||
else
|
||||
CXX = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-g++
|
||||
endif
|
||||
|
||||
ifdef GCW0_STRIP
|
||||
STRIP = $(GCW0_STRIP)
|
||||
else
|
||||
STRIP = $(TOOLCHAIN_DIR)/usr/bin/mipsel-rs90-linux-musl-strip
|
||||
endif
|
||||
|
||||
GCW0_SDL_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/sdl-config
|
||||
GCW0_FREETYPE_CONFIG ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/bin/freetype-config
|
||||
GCW0_MK_SQUASH_FS ?= $(TOOLCHAIN_DIR)/usr/bin/mksquashfs
|
||||
|
||||
GCW0_INC_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/include
|
||||
GCW0_LIB_DIR ?= $(TOOLCHAIN_DIR)/usr/mipsel-rs90-linux-musl/sysroot/usr/lib
|
||||
|
||||
#########################
|
||||
#########################
|
||||
|
||||
PACKAGE_NAME = retroarch
|
||||
|
||||
DEBUG ?= 0
|
||||
|
||||
RS90 = 1
|
||||
DINGUX = 1
|
||||
DINGUX_BETA = 1
|
||||
HAVE_SCREENSHOTS = 0
|
||||
HAVE_REWIND = 0
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_AL = 0
|
||||
HAVE_ALSA = 1
|
||||
HAVE_DSP_FILTER = 1
|
||||
HAVE_VIDEO_FILTER = 1
|
||||
HAVE_STATIC_VIDEO_FILTERS = 1
|
||||
HAVE_STATIC_AUDIO_FILTERS = 1
|
||||
HAVE_FILTERS_BUILTIN = 1
|
||||
HAVE_BUILTINMBEDTLS = 0
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_C99 = 1
|
||||
HAVE_CC = 1
|
||||
HAVE_CC_RESAMPLER = 1
|
||||
|
||||
HAVE_CHD = 0
|
||||
HAVE_COMMAND = 0
|
||||
HAVE_CXX = 1
|
||||
HAVE_DR_MP3 = 0
|
||||
HAVE_DYNAMIC = 1
|
||||
HAVE_EGL = 0
|
||||
HAVE_FREETYPE = 0
|
||||
HAVE_GDI = 0
|
||||
HAVE_GETADDRINFO = 0
|
||||
HAVE_GETOPT_LONG = 1
|
||||
HAVE_GLSL = 0
|
||||
HAVE_HID = 0
|
||||
HAVE_IBXM = 0
|
||||
HAVE_IMAGEVIEWER = 0
|
||||
HAVE_LANGEXTRA = 0
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_MENU = 1
|
||||
HAVE_MENU_COMMON = 1
|
||||
HAVE_GFX_WIDGETS = 0
|
||||
HAVE_MMAP = 1
|
||||
HAVE_OPENDINGUX_FBDEV = 0
|
||||
HAVE_OPENGL = 0
|
||||
HAVE_OPENGL1 = 0
|
||||
HAVE_OPENGLES = 0
|
||||
HAVE_OPENGLES3 = 0
|
||||
HAVE_OPENGL_CORE = 0
|
||||
HAVE_OPENSSL = 0
|
||||
HAVE_OVERLAY = 0
|
||||
HAVE_RBMP = 1
|
||||
HAVE_RJPEG = 1
|
||||
HAVE_RPILED = 0
|
||||
HAVE_RPNG = 1
|
||||
HAVE_RUNAHEAD = 0
|
||||
HAVE_SDL_DINGUX = 1
|
||||
HAVE_SHADERPIPELINE = 0
|
||||
HAVE_STB_FONT = 0
|
||||
HAVE_STB_IMAGE = 0
|
||||
HAVE_STB_VORBIS = 0
|
||||
HAVE_STDIN_CMD = 0
|
||||
HAVE_STRCASESTR = 1
|
||||
HAVE_THREADS = 1
|
||||
HAVE_UDEV = 1
|
||||
HAVE_RGUI = 1
|
||||
HAVE_MATERIALUI = 0
|
||||
HAVE_XMB = 0
|
||||
HAVE_OZONE = 0
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_CONFIGFILE = 1
|
||||
HAVE_PATCH = 1
|
||||
HAVE_CHEATS = 1
|
||||
HAVE_CHEEVOS = 0
|
||||
HAVE_LIBSHAKE = 0
|
||||
HAVE_TINYALSA = 1
|
||||
HAVE_NEAREST_RESAMPLER = 1
|
||||
|
||||
OS = Linux
|
||||
TARGET = retroarch
|
||||
OPK_NAME = retroarch_rs90_odbeta.opk
|
||||
|
||||
OBJ :=
|
||||
LINK := $(CXX)
|
||||
DEF_FLAGS := -mplt -mno-shared
|
||||
DEF_FLAGS += -ffunction-sections -fdata-sections
|
||||
DEF_FLAGS += -I. -Ideps -Ideps/stb -DRS90=1 -DDINGUX=1 -DDINGUX_BETA=1 -MMD
|
||||
DEF_FLAGS += -Wall -Wno-unused-variable
|
||||
DEF_FLAGS += -std=gnu99 -D_GNU_SOURopendinguxCE -flto -lasound
|
||||
LIBS := -ldl -lz -lrt -ludev -pthread
|
||||
CFLAGS :=
|
||||
CXXFLAGS := -fno-exceptions -fno-rtti -std=c++11 -D__STDC_CONSTANT_MACROS
|
||||
ASFLAGS :=
|
||||
LDFLAGS := -Wl,--gc-sections
|
||||
INCLUDE_DIRS = -I$(GCW0_INC_DIR)
|
||||
LIBRARY_DIRS = -L$(GCW0_LIB_DIR)
|
||||
DEFINES := -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64 -UHAVE_STATIC_DUMMY
|
||||
DEFINES += -DHAVE_C99=1 -DHAVE_CXX=1
|
||||
DEFINES += -DHAVE_GETOPT_LONG=1 -DHAVE_STRCASESTR=1 -DHAVE_DYNAMIC=1
|
||||
DEFINES += -DHAVE_FILTERS_BUILTIN
|
||||
DEFINES += -DHAVE_UDEV=1
|
||||
DEFINES += -DHAVE_ALSA
|
||||
DEFINES += -DCC_RESAMPLER_PRECISION=0
|
||||
|
||||
SDL_DINGUX_CFLAGS := $(shell $(GCW0_SDL_CONFIG) --cflags)
|
||||
SDL_DINGUX_LIBS := $(shell $(GCW0_SDL_CONFIG) --libs)
|
||||
FREETYPE_CFLAGS := $(shell $(GCW0_FREETYPE_CONFIG) --cflags)
|
||||
FREETYPE_LIBS := $(shell $(GCW0_FREETYPE_CONFIG) --libs)
|
||||
MMAP_LIBS = -lc
|
||||
|
||||
OBJDIR_BASE := obj-unix
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
OBJDIR := $(OBJDIR_BASE)/debug
|
||||
DEF_FLAGS += -O0 -g -DDEBUG -D_DEBUG
|
||||
else
|
||||
OBJDIR := $(OBJDIR_BASE)/release
|
||||
DEF_FLAGS += -Ofast -DNDEBUG
|
||||
endif
|
||||
|
||||
include Makefile.common
|
||||
|
||||
DEF_FLAGS += $(INCLUDE_DIRS)
|
||||
LDFLAGS += $(CFLAGS) $(CXXFLAGS) $(DEF_FLAGS)
|
||||
CFLAGS += $(DEF_FLAGS)
|
||||
CXXFLAGS += $(DEF_FLAGS)
|
||||
|
||||
HEADERS = $(wildcard */*/*.h) $(wildcard */*.h) $(wildcard *.h)
|
||||
|
||||
Q := @
|
||||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
define DESKTOP_ENTRY
|
||||
[Desktop Entry]
|
||||
Name=RetroArch
|
||||
Comment=Frontend for emulators, game engines
|
||||
Exec=retroarch
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
Icon=retroarch
|
||||
Categories=emulators;
|
||||
X-OD-NeedsDownscaling=true
|
||||
endef
|
||||
export DESKTOP_ENTRY
|
||||
|
||||
all: $(TARGET) opk
|
||||
|
||||
-include $(RARCH_OBJ:.o=.d)
|
||||
|
||||
SYMBOL_MAP := -Wl,-Map=output.map
|
||||
|
||||
$(TARGET): $(RARCH_OBJ)
|
||||
@$(if $(Q), $(shell echo echo LD $@),)
|
||||
$(Q)$(LINK) -o $@ $(RARCH_OBJ) $(LIBS) $(LDFLAGS) $(LIBRARY_DIRS)
|
||||
|
||||
$(OBJDIR)/%.o: %.c
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CC $<),)
|
||||
$(Q)$(CC) $(CPPFLAGS) $(CFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.cpp
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo CXX $<),)
|
||||
$(Q)$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.m
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo OBJC $<),)
|
||||
$(Q)$(CXX) $(OBJCFLAGS) $(DEFINES) -MMD -c -o $@ $<
|
||||
|
||||
$(OBJDIR)/%.o: %.S $(HEADERS)
|
||||
@mkdir -p $(dir $@)
|
||||
@$(if $(Q), $(shell echo echo AS $<),)
|
||||
$(Q)$(CC) $(CFLAGS) $(ASFLAGS) $(DEFINES) -c -o $@ $<
|
||||
|
||||
clean:
|
||||
rm -rf $(OBJDIR_BASE)
|
||||
rm -f $(TARGET)
|
||||
rm -f *.d
|
||||
rm -rf $(OPK_NAME)
|
||||
|
||||
opk: $(TARGET)
|
||||
echo "$$DESKTOP_ENTRY" > default.rs90.desktop
|
||||
rm -f $(OPK_NAME)
|
||||
cp media/ico_src/icon32.png retroarch.png
|
||||
ifeq ($STRIP_BIN, 1)
|
||||
$(STRIP) --strip-unneeded retroarch
|
||||
endif
|
||||
$(GCW0_MK_SQUASH_FS) retroarch default.rs90.desktop retroarch.png $(OPK_NAME) -all-root -no-xattrs -noappend -no-exports
|
||||
rm -f default.rs90.desktop retroarch.png
|
||||
|
||||
.PHONY: all clean opk
|
||||
|
||||
print-%:
|
||||
@echo '$*=$($*)'
|
|
@ -112,7 +112,11 @@ LD := $(CXX)
|
|||
|
||||
LIBDIRS := -L.
|
||||
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA -DSCE_LIBC_SIZE=$(SCE_LIBC_SIZE)
|
||||
ARCHFLAGS := -march=armv7-a -mfpu=neon -mfloat-abi=hard -DVITA
|
||||
ifeq ($(HAVE_VITAGLES), 1)
|
||||
ARCHFLAGS += -DSCE_LIBC_SIZE=$(SCE_LIBC_SIZE)
|
||||
endif
|
||||
|
||||
CFLAGS += $(ARCHFLAGS) -mword-relocations -fno-optimize-sibling-calls
|
||||
|
||||
ifeq ($(DEBUG), 1)
|
||||
|
|
|
@ -102,7 +102,7 @@ endif
|
|||
|
||||
INCDIRS += -Ilibretro-common/include/compat/zlib
|
||||
# for stb, libfat, iosuhax
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax
|
||||
INCDIRS += -Ideps -Ideps/libfat/include -Ideps/libiosuhax/include
|
||||
# pad_functions uses wiiu/input.h
|
||||
INCDIRS += -Iinput/include
|
||||
INCDIRS += -Ideps/SPIRV-Cross
|
||||
|
|
35
config.def.h
35
config.def.h
|
@ -201,16 +201,21 @@
|
|||
|
||||
/* To start in Fullscreen, or not. */
|
||||
|
||||
#if defined(HAVE_STEAM) || defined(DINGUX)
|
||||
/* Start in fullscreen mode for Steam and
|
||||
* Dingux builds */
|
||||
#if defined(HAVE_STEAM) || defined(DINGUX) || defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
/* Start in fullscreen mode for Steam and Dingux
|
||||
* WinRT and Winapi Family builds */
|
||||
#define DEFAULT_FULLSCREEN true
|
||||
#else
|
||||
#define DEFAULT_FULLSCREEN false
|
||||
#endif
|
||||
|
||||
/* To use windowed mode or not when going fullscreen. */
|
||||
#define DEFAULT_WINDOWED_FULLSCREEN true
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
/* Do not use windowed mode for WinRT and Winapi Family builds on the Xbox UWP with fixed resolution shrinks the image into the left top corner of the screen with some libretro cores */
|
||||
#define DEFAULT_WINDOWED_FULLSCREEN false
|
||||
#else
|
||||
#define DEFAULT_WINDOWED_FULLSCREEN true
|
||||
#endif
|
||||
|
||||
/* Which monitor to prefer. 0 is any monitor, 1 and up selects
|
||||
* specific monitors, 1 being the first monitor. */
|
||||
|
@ -227,6 +232,9 @@
|
|||
#if defined(DINGUX)
|
||||
#define DEFAULT_FULLSCREEN_X 320
|
||||
#define DEFAULT_FULLSCREEN_Y 240
|
||||
#elif defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
#define DEFAULT_FULLSCREEN_X 1920
|
||||
#define DEFAULT_FULLSCREEN_Y 1080
|
||||
#else
|
||||
#define DEFAULT_FULLSCREEN_X 0
|
||||
#define DEFAULT_FULLSCREEN_Y 0
|
||||
|
@ -380,8 +388,10 @@
|
|||
/* Only scale in integer steps.
|
||||
* The base size depends on system-reported geometry and aspect ratio.
|
||||
* If video_force_aspect is not set, X/Y will be integer scaled independently.
|
||||
* Overscale rounds up instead of down, default is downscale.
|
||||
*/
|
||||
#define DEFAULT_SCALE_INTEGER false
|
||||
#define DEFAULT_SCALE_INTEGER_OVERSCALE false
|
||||
|
||||
/* Controls aspect ratio handling. */
|
||||
|
||||
|
@ -410,6 +420,11 @@
|
|||
* in Dingux devices */
|
||||
#define DEFAULT_DINGUX_REFRESH_RATE DINGUX_REFRESH_RATE_60HZ
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
/* Sets image filtering method on the RS90
|
||||
* when integer scaling is disabled */
|
||||
#define DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE DINGUX_RS90_SOFTFILTER_POINT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Save configuration file on exit. */
|
||||
|
@ -729,7 +744,9 @@ static const bool default_savefiles_in_content_dir = false;
|
|||
static const bool default_systemfiles_in_content_dir = false;
|
||||
static const bool default_screenshots_in_content_dir = false;
|
||||
|
||||
#if defined(_XBOX1) || defined(__PS3__) || defined(_XBOX360) || defined(DINGUX)
|
||||
#if defined(RS90)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_START_SELECT
|
||||
#elif defined(_XBOX1) || defined(__PS3__) || defined(_XBOX360) || defined(DINGUX)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_L3_R3
|
||||
#elif defined(PS2) || defined(PSP)
|
||||
#define DEFAULT_MENU_TOGGLE_GAMEPAD_COMBO INPUT_TOGGLE_HOLD_START
|
||||
|
@ -1312,6 +1329,14 @@ static const unsigned menu_left_thumbnails_default = 0;
|
|||
static const unsigned gfx_thumbnail_upscale_threshold = 0;
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(RS90)
|
||||
/* The RS-90 has a hardware clock that is neither
|
||||
* configurable nor persistent, rendering it useless.
|
||||
* We therefore hide it in the menu by default. */
|
||||
#define DEFAULT_MENU_TIMEDATE_ENABLE false
|
||||
#else
|
||||
#define DEFAULT_MENU_TIMEDATE_ENABLE true
|
||||
#endif
|
||||
#define DEFAULT_MENU_TIMEDATE_STYLE MENU_TIMEDATE_STYLE_DDMM_HM
|
||||
#define DEFAULT_MENU_TIMEDATE_DATE_SEPARATOR MENU_TIMEDATE_DATE_SEPARATOR_HYPHEN
|
||||
#endif
|
||||
|
|
|
@ -70,6 +70,7 @@ enum video_driver_enum
|
|||
VIDEO_SDL,
|
||||
VIDEO_SDL2,
|
||||
VIDEO_SDL_DINGUX,
|
||||
VIDEO_SDL_RS90,
|
||||
VIDEO_EXT,
|
||||
VIDEO_WII,
|
||||
VIDEO_WIIU,
|
||||
|
@ -260,6 +261,9 @@ static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GL;
|
|||
#else
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_METAL;
|
||||
#endif
|
||||
#elif defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
/* Lets default to D3D11 in UWP, even when its compiled with ANGLE, since ANGLE is just calling D3D anyway.*/
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D11;
|
||||
#elif defined(HAVE_OPENGL1) && defined(_MSC_VER) && (_MSC_VER <= 1600)
|
||||
/* On Windows XP and earlier, use gl1 by default
|
||||
* (regular opengl has compatibility issues with
|
||||
|
@ -308,7 +312,11 @@ static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL;
|
|||
#elif defined(HAVE_SDL2)
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL2;
|
||||
#elif defined(HAVE_SDL_DINGUX)
|
||||
#if defined(RS90)
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL_RS90;
|
||||
#else
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_SDL_DINGUX;
|
||||
#endif
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
static const enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_GDI;
|
||||
#elif defined(DJGPP)
|
||||
|
@ -339,6 +347,10 @@ static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PS3;
|
|||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_CTR;
|
||||
#elif defined(SWITCH)
|
||||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_SWITCH;
|
||||
#elif defined(DINGUX_BETA) && defined(HAVE_ALSA)
|
||||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_ALSA;
|
||||
#elif defined(DINGUX) && defined(HAVE_AL)
|
||||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_AL;
|
||||
#elif defined(HAVE_PULSE)
|
||||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_PULSE;
|
||||
#elif defined(HAVE_ALSA) && defined(HAVE_THREADS)
|
||||
|
@ -383,7 +395,9 @@ static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_EXT;
|
|||
static const enum audio_driver_enum AUDIO_DEFAULT_DRIVER = AUDIO_NULL;
|
||||
#endif
|
||||
|
||||
#if defined(PSP) || defined(EMSCRIPTEN)
|
||||
#if defined(RS90)
|
||||
static const enum audio_resampler_driver_enum AUDIO_DEFAULT_RESAMPLER_DRIVER = AUDIO_RESAMPLER_NEAREST;
|
||||
#elif defined(PSP) || defined(EMSCRIPTEN)
|
||||
static const enum audio_resampler_driver_enum AUDIO_DEFAULT_RESAMPLER_DRIVER = AUDIO_RESAMPLER_CC;
|
||||
#else
|
||||
static const enum audio_resampler_driver_enum AUDIO_DEFAULT_RESAMPLER_DRIVER = AUDIO_RESAMPLER_SINC;
|
||||
|
@ -397,7 +411,7 @@ static const enum record_driver_enum RECORD_DEFAULT_DRIVER = RECORD_NULL;
|
|||
|
||||
#ifdef HAVE_WINMM
|
||||
static const enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_WINMM;
|
||||
#elif defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM)
|
||||
#elif defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM) && !defined(DINGUX)
|
||||
static const enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA;
|
||||
#else
|
||||
static const enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
|
||||
|
@ -847,6 +861,8 @@ const char *config_get_default_video(void)
|
|||
return "xvideo";
|
||||
case VIDEO_SDL_DINGUX:
|
||||
return "sdl_dingux";
|
||||
case VIDEO_SDL_RS90:
|
||||
return "sdl_rs90";
|
||||
case VIDEO_SDL:
|
||||
return "sdl";
|
||||
case VIDEO_SDL2:
|
||||
|
@ -1530,6 +1546,7 @@ static struct config_bool_setting *populate_settings_bool(
|
|||
SETTING_BOOL("video_windowed_fullscreen", &settings->bools.video_windowed_fullscreen, true, DEFAULT_WINDOWED_FULLSCREEN, false);
|
||||
SETTING_BOOL("video_crop_overscan", &settings->bools.video_crop_overscan, true, DEFAULT_CROP_OVERSCAN, false);
|
||||
SETTING_BOOL("video_scale_integer", &settings->bools.video_scale_integer, true, DEFAULT_SCALE_INTEGER, false);
|
||||
SETTING_BOOL("video_scale_integer_overscale", &settings->bools.video_scale_integer_overscale, true, DEFAULT_SCALE_INTEGER_OVERSCALE, false);
|
||||
SETTING_BOOL("video_smooth", &settings->bools.video_smooth, true, DEFAULT_VIDEO_SMOOTH, false);
|
||||
SETTING_BOOL("video_ctx_scaling", &settings->bools.video_ctx_scaling, true, DEFAULT_VIDEO_CTX_SCALING, false);
|
||||
SETTING_BOOL("video_force_aspect", &settings->bools.video_force_aspect, true, DEFAULT_FORCE_ASPECT, false);
|
||||
|
@ -1610,7 +1627,7 @@ static struct config_bool_setting *populate_settings_bool(
|
|||
SETTING_BOOL("menu_insert_disk_resume", &settings->bools.menu_insert_disk_resume, true, DEFAULT_MENU_INSERT_DISK_RESUME, false);
|
||||
SETTING_BOOL("menu_mouse_enable", &settings->bools.menu_mouse_enable, true, DEFAULT_MOUSE_ENABLE, false);
|
||||
SETTING_BOOL("menu_pointer_enable", &settings->bools.menu_pointer_enable, true, DEFAULT_POINTER_ENABLE, false);
|
||||
SETTING_BOOL("menu_timedate_enable", &settings->bools.menu_timedate_enable, true, true, false);
|
||||
SETTING_BOOL("menu_timedate_enable", &settings->bools.menu_timedate_enable, true, DEFAULT_MENU_TIMEDATE_ENABLE, false);
|
||||
SETTING_BOOL("menu_battery_level_enable", &settings->bools.menu_battery_level_enable, true, true, false);
|
||||
SETTING_BOOL("menu_core_enable", &settings->bools.menu_core_enable, true, true, false);
|
||||
SETTING_BOOL("menu_show_sublabels", &settings->bools.menu_show_sublabels, true, menu_show_sublabels, false);
|
||||
|
@ -2120,6 +2137,9 @@ static struct config_uint_setting *populate_settings_uint(
|
|||
#if defined(DINGUX_BETA)
|
||||
SETTING_UINT("video_dingux_refresh_rate", &settings->uints.video_dingux_refresh_rate, true, DEFAULT_DINGUX_REFRESH_RATE, false);
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
SETTING_UINT("video_dingux_rs90_softfilter_type", &settings->uints.video_dingux_rs90_softfilter_type, true, DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE, false);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
|
|
|
@ -209,6 +209,7 @@ typedef struct settings
|
|||
unsigned video_3ds_display_mode;
|
||||
unsigned video_dingux_ipu_filter_type;
|
||||
unsigned video_dingux_refresh_rate;
|
||||
unsigned video_dingux_rs90_softfilter_type;
|
||||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
unsigned video_layout_selected_view;
|
||||
#endif
|
||||
|
@ -497,6 +498,7 @@ typedef struct settings
|
|||
bool video_aspect_ratio_auto;
|
||||
bool video_dingux_ipu_keep_aspect;
|
||||
bool video_scale_integer;
|
||||
bool video_scale_integer_overscale;
|
||||
bool video_shader_enable;
|
||||
bool video_shader_watch_files;
|
||||
bool video_shader_remember_last_dir;
|
||||
|
|
22
core_info.c
22
core_info.c
|
@ -732,17 +732,18 @@ end:
|
|||
return core_info_cache_list;
|
||||
}
|
||||
|
||||
static void core_info_cache_write(core_info_cache_list_t *list, const char *info_dir)
|
||||
static bool core_info_cache_write(core_info_cache_list_t *list, const char *info_dir)
|
||||
{
|
||||
intfstream_t *file = NULL;
|
||||
rjsonwriter_t *writer = NULL;
|
||||
bool success = false;
|
||||
char file_path[PATH_MAX_LENGTH];
|
||||
size_t i, j;
|
||||
|
||||
file_path[0] = '\0';
|
||||
|
||||
if (!list)
|
||||
return;
|
||||
return false;
|
||||
|
||||
/* Open info cache file */
|
||||
if (string_is_empty(info_dir))
|
||||
|
@ -763,7 +764,7 @@ static void core_info_cache_write(core_info_cache_list_t *list, const char *info
|
|||
if (!file)
|
||||
{
|
||||
RARCH_ERR("[Core Info] Failed to write to core info cache file: %s\n", file_path);
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Write info cache */
|
||||
|
@ -1068,6 +1069,7 @@ static void core_info_cache_write(core_info_cache_list_t *list, const char *info
|
|||
rjsonwriter_free(writer);
|
||||
|
||||
RARCH_LOG("[Core Info] Wrote to cache file: %s\n", file_path);
|
||||
success = true;
|
||||
|
||||
/* Remove 'force refresh' file, if required */
|
||||
file_path[0] = '\0';
|
||||
|
@ -1086,6 +1088,7 @@ end:
|
|||
free(file);
|
||||
|
||||
list->refresh = false;
|
||||
return success;
|
||||
}
|
||||
|
||||
static void core_info_check_uninstalled(core_info_cache_list_t *list)
|
||||
|
@ -1774,7 +1777,8 @@ static core_info_list_t *core_info_list_new(const char *path,
|
|||
const char *libretro_info_dir,
|
||||
const char *exts,
|
||||
bool dir_show_hidden_files,
|
||||
bool enable_cache)
|
||||
bool enable_cache,
|
||||
bool *cache_supported)
|
||||
{
|
||||
size_t i;
|
||||
core_path_list_t *path_list = NULL;
|
||||
|
@ -1906,12 +1910,14 @@ static core_info_list_t *core_info_list_new(const char *path,
|
|||
* a refresh)
|
||||
* > Write new cache to disk if updates are
|
||||
* required */
|
||||
*cache_supported = true;
|
||||
if (core_info_cache_list)
|
||||
{
|
||||
core_info_check_uninstalled(core_info_cache_list);
|
||||
|
||||
if (core_info_cache_list->refresh)
|
||||
core_info_cache_write(core_info_cache_list, info_dir);
|
||||
*cache_supported = core_info_cache_write(
|
||||
core_info_cache_list, info_dir);
|
||||
|
||||
core_info_cache_list_free(core_info_cache_list);
|
||||
}
|
||||
|
@ -2104,14 +2110,16 @@ void core_info_deinit_list(void)
|
|||
}
|
||||
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool dir_show_hidden_files, bool enable_cache)
|
||||
const char *exts, bool dir_show_hidden_files,
|
||||
bool enable_cache, bool *cache_supported)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = coreinfo_get_ptr();
|
||||
if (!(p_coreinfo->curr_list = core_info_list_new(dir_cores,
|
||||
!string_is_empty(path_info) ? path_info : dir_cores,
|
||||
exts,
|
||||
dir_show_hidden_files,
|
||||
enable_cache)))
|
||||
enable_cache,
|
||||
cache_supported)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -157,7 +157,8 @@ bool core_info_get_current_core(core_info_t **core);
|
|||
void core_info_deinit_list(void);
|
||||
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files, bool enable_cache);
|
||||
const char *exts, bool show_hidden_files,
|
||||
bool enable_cache, bool *cache_supported);
|
||||
|
||||
bool core_info_get_list(core_info_list_t **core);
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@
|
|||
|
||||
/* Platform specific options */
|
||||
#if defined (__wiiu__)
|
||||
#define DEFAULT_CACHE_PAGES 4
|
||||
#define DEFAULT_SECTORS_PAGE 64
|
||||
#define DEFAULT_CACHE_PAGES 512
|
||||
#define DEFAULT_SECTORS_PAGE 128
|
||||
#if 0
|
||||
#define USE_LWP_LOCK
|
||||
#define USE_RTC_TIME
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
name: Publish Docker Image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@master
|
||||
- name: Get release version
|
||||
id: get_release_tag
|
||||
run: |
|
||||
echo RELEASE_VERSION=$(echo $(date '+%Y%m%d')) >> $GITHUB_ENV
|
||||
echo REPOSITORY_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}' | sed -e "s/:refs//" | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
echo REPOSITORY_OWNER=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $1}' | sed 's/[^a-zA-Z0-9]//g' | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
|
||||
- name: Publish to Registry
|
||||
uses: elgohr/Publish-Docker-Github-Action@master
|
||||
with:
|
||||
name: ${{ env.REPOSITORY_OWNER }}/${{ env.REPOSITORY_NAME }}
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
snapshot: true
|
||||
cache: true
|
||||
tags: "latest, ${{ env.RELEASE_VERSION }}"
|
|
@ -0,0 +1,5 @@
|
|||
/*.a
|
||||
/build
|
||||
*.bz2
|
||||
release/
|
||||
lib/
|
|
@ -0,0 +1,29 @@
|
|||
language: cpp
|
||||
|
||||
os: linux
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
env:
|
||||
global:
|
||||
- DEVKITPRO=/opt/devkitpro
|
||||
- DEVKITPPC=/opt/devkitpro/devkitPPC
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- "$HOME/.local"
|
||||
- "$DEVKITPRO"
|
||||
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- p7zip-full
|
||||
|
||||
before_install:
|
||||
- mkdir -p "${DEVKITPRO}"
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://github.com/devkitPro/pacman/releases/download/devkitpro-pacman-1.0.1/devkitpro-pacman.deb -O /tmp/devkitpro-pacman.deb; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo dpkg -i /tmp/devkitpro-pacman.deb; fi
|
||||
- yes | sudo dkp-pacman -Syu devkitPPC --needed
|
||||
|
||||
script:
|
||||
- make && make install
|
|
@ -0,0 +1,9 @@
|
|||
FROM wiiuenv/devkitppc:20210101
|
||||
|
||||
WORKDIR tmp_build
|
||||
COPY . .
|
||||
RUN make clean && make && mkdir -p /artifacts/wut/usr && cp -r lib /artifacts/wut/usr && cp -r include /artifacts/wut/usr
|
||||
WORKDIR /artifacts
|
||||
|
||||
FROM scratch
|
||||
COPY --from=0 /artifacts /artifacts
|
|
@ -0,0 +1,157 @@
|
|||
#-------------------------------------------------------------------------------
|
||||
.SUFFIXES:
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
ifeq ($(strip $(DEVKITPRO)),)
|
||||
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
||||
endif
|
||||
|
||||
TOPDIR ?= $(CURDIR)
|
||||
|
||||
include $(DEVKITPRO)/wut/share/wut_rules
|
||||
|
||||
export VER_MAJOR := 1
|
||||
export VER_MINOR := 0
|
||||
export VER_PATCH := 0
|
||||
|
||||
VERSION := $(VER_MAJOR).$(VER_MINOR).$(VER_PATCH)
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# TARGET is the name of the output
|
||||
# BUILD is the directory where object files & intermediate files will be placed
|
||||
# SOURCES is a list of directories containing source code
|
||||
# DATA is a list of directories containing data files
|
||||
# INCLUDES is a list of directories containing header files
|
||||
#-------------------------------------------------------------------------------
|
||||
TARGET := $(notdir $(CURDIR))
|
||||
BUILD := build
|
||||
SOURCES := source
|
||||
DATA := data
|
||||
INCLUDES := source \
|
||||
include \
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# options for code generation
|
||||
#---------------------------------------------------------------------------------
|
||||
CFLAGS := -Wall -Werror -save-temps \
|
||||
-ffunction-sections -fdata-sections \
|
||||
$(MACHDEP) \
|
||||
$(BUILD_CFLAGS)
|
||||
|
||||
CFLAGS += $(INCLUDE) -D__WIIU__ -D__WUT__
|
||||
|
||||
CXXFLAGS := $(CFLAGS) -std=gnu++17
|
||||
|
||||
ASFLAGS := $(MACHDEP)
|
||||
|
||||
LDFLAGS = $(ARCH) -Wl,--gc-sections
|
||||
|
||||
|
||||
LIBS :=
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
# include and lib
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBDIRS := $(PORTLIBS) $(WUT_ROOT)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# no real need to edit anything past this point unless you need to add additional
|
||||
# rules for different file extensions
|
||||
#---------------------------------------------------------------------------------
|
||||
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export TOPDIR := $(CURDIR)
|
||||
|
||||
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||
|
||||
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||
DEFFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.def)))
|
||||
BINFILES := $(foreach dir,$(DATA),$(notdir $(wildcard $(dir)/*.*)))
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# use CXX for linking C++ projects, CC for standard C
|
||||
#---------------------------------------------------------------------------------
|
||||
ifeq ($(strip $(CPPFILES)),)
|
||||
#---------------------------------------------------------------------------------
|
||||
export LD := $(CC)
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
#---------------------------------------------------------------------------------
|
||||
export LD := $(CXX)
|
||||
#---------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
|
||||
export OFILES_SRC := $(DEFFILES:.def=.o) $(SFILES:.s=.o) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
|
||||
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
||||
export HFILES := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||
|
||||
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||
-I.
|
||||
|
||||
.PHONY: all dist-bin dist-src dist install clean
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
all: lib/libiosuhax.a
|
||||
|
||||
dist-bin: all
|
||||
@tar --exclude=*~ -cjf libiosuhax-$(VERSION).tar.bz2 include lib
|
||||
|
||||
dist-src:
|
||||
@tar --exclude=*~ -cjf libiosuhax-src-$(VERSION).tar.bz2 include source Makefile
|
||||
|
||||
dist: dist-src dist-bin
|
||||
|
||||
install: dist-bin
|
||||
mkdir -p $(DESTDIR)$(DEVKITPRO)/wut/usr
|
||||
bzip2 -cd libiosuhax-$(VERSION).tar.bz2 | tar -xf - -C $(DESTDIR)$(DEVKITPRO)/wut/usr
|
||||
|
||||
lib:
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
|
||||
release:
|
||||
@[ -d $@ ] || mkdir -p $@
|
||||
|
||||
lib/libiosuhax.a :$(SOURCES) $(INCLUDES) | lib release
|
||||
@$(MAKE) BUILD=release OUTPUT=$(CURDIR)/$@ \
|
||||
BUILD_CFLAGS="-DNDEBUG=1 -O2 -s" \
|
||||
DEPSDIR=$(CURDIR)/release \
|
||||
--no-print-directory -C release \
|
||||
-f $(CURDIR)/Makefile
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
clean:
|
||||
@echo clean ...
|
||||
@rm -rf release lib
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
else
|
||||
|
||||
DEPENDS := $(OFILES:.o=.d)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# main targets
|
||||
#---------------------------------------------------------------------------------
|
||||
$(OUTPUT) : $(OFILES)
|
||||
|
||||
$(OFILES_SRC) : $(HFILES)
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
%_bin.h %.bin.o : %.bin
|
||||
#---------------------------------------------------------------------------------
|
||||
@echo $(notdir $<)
|
||||
@$(bin2o)
|
||||
|
||||
|
||||
-include $(DEPENDS)
|
||||
|
||||
#---------------------------------------------------------------------------------------
|
||||
endif
|
||||
#---------------------------------------------------------------------------------------
|
|
@ -0,0 +1,10 @@
|
|||
[](https://travis-ci.org/dimok789/libiosuhax)
|
||||
# libiosuhax
|
||||
A PPC library to access IOSUHAX from PPC and a devoptab for any device or path.
|
||||
It's only compatible to RPX-Files.
|
||||
|
||||
## Building
|
||||
Make you to have [wut](https://github.com/devkitPro/wut/) installed and use the following command for build:
|
||||
```
|
||||
make install
|
||||
```
|
|
@ -1,109 +1,112 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef _LIB_IOSUHAX_H_
|
||||
#define _LIB_IOSUHAX_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOS_ERROR_UNKNOWN_VALUE 0xFFFFFFD6
|
||||
#define IOS_ERROR_INVALID_ARG 0xFFFFFFE3
|
||||
#define IOS_ERROR_INVALID_SIZE 0xFFFFFFE9
|
||||
#define IOS_ERROR_UNKNOWN 0xFFFFFFF7
|
||||
#define IOS_ERROR_NOEXISTS 0xFFFFFFFA
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t flag;
|
||||
uint32_t permission;
|
||||
uint32_t owner_id;
|
||||
uint32_t group_id;
|
||||
uint32_t size; // size in bytes
|
||||
uint32_t physsize; // physical size on disk in bytes
|
||||
uint32_t unk[3];
|
||||
uint32_t id;
|
||||
uint32_t ctime;
|
||||
uint32_t mtime;
|
||||
uint32_t unk2[0x0D];
|
||||
}fileStat_s;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fileStat_s stat;
|
||||
char name[0x100];
|
||||
}directoryEntry_s;
|
||||
|
||||
#define DIR_ENTRY_IS_DIRECTORY 0x80000000
|
||||
|
||||
#define FSA_MOUNTFLAGS_BINDMOUNT (1 << 0)
|
||||
#define FSA_MOUNTFLAGS_GLOBAL (1 << 1)
|
||||
|
||||
int IOSUHAX_Open(const char *dev); // if dev == NULL the default path /dev/iosuhax will be used
|
||||
int IOSUHAX_Close(void);
|
||||
|
||||
int IOSUHAX_memwrite(uint32_t address, const uint8_t * buffer, uint32_t size); // IOSU external input
|
||||
int IOSUHAX_memread(uint32_t address, uint8_t * out_buffer, uint32_t size); // IOSU external output
|
||||
int IOSUHAX_memcpy(uint32_t dst, uint32_t src, uint32_t size); // IOSU internal memcpy only
|
||||
|
||||
int IOSUHAX_SVC(uint32_t svc_id, uint32_t * args, uint32_t arg_cnt);
|
||||
|
||||
int IOSUHAX_FSA_Open();
|
||||
int IOSUHAX_FSA_Close(int fsaFd);
|
||||
|
||||
int IOSUHAX_FSA_Mount(int fsaFd, const char* device_path, const char* volume_path, uint32_t flags, const char* arg_string, int arg_string_len);
|
||||
int IOSUHAX_FSA_Unmount(int fsaFd, const char* path, uint32_t flags);
|
||||
int IOSUHAX_FSA_FlushVolume(int fsaFd, const char* volume_path);
|
||||
|
||||
int IOSUHAX_FSA_GetDeviceInfo(int fsaFd, const char* device_path, int type, uint32_t* out_data);
|
||||
|
||||
int IOSUHAX_FSA_MakeDir(int fsaFd, const char* path, uint32_t flags);
|
||||
int IOSUHAX_FSA_OpenDir(int fsaFd, const char* path, int* outHandle);
|
||||
int IOSUHAX_FSA_ReadDir(int fsaFd, int handle, directoryEntry_s* out_data);
|
||||
int IOSUHAX_FSA_RewindDir(int fsaFd, int dirHandle);
|
||||
int IOSUHAX_FSA_CloseDir(int fsaFd, int handle);
|
||||
int IOSUHAX_FSA_ChangeDir(int fsaFd, const char *path);
|
||||
|
||||
int IOSUHAX_FSA_OpenFile(int fsaFd, const char* path, const char* mode, int* outHandle);
|
||||
int IOSUHAX_FSA_ReadFile(int fsaFd, void* data, uint32_t size, uint32_t cnt, int fileHandle, uint32_t flags);
|
||||
int IOSUHAX_FSA_WriteFile(int fsaFd, const void* data, uint32_t size, uint32_t cnt, int fileHandle, uint32_t flags);
|
||||
int IOSUHAX_FSA_StatFile(int fsaFd, int fileHandle, fileStat_s* out_data);
|
||||
int IOSUHAX_FSA_CloseFile(int fsaFd, int fileHandle);
|
||||
int IOSUHAX_FSA_SetFilePos(int fsaFd, int fileHandle, uint32_t position);
|
||||
int IOSUHAX_FSA_GetStat(int fsaFd, const char *path, fileStat_s* out_data);
|
||||
int IOSUHAX_FSA_Remove(int fsaFd, const char *path);
|
||||
int IOSUHAX_FSA_ChangeMode(int fsaFd, const char* path, int mode);
|
||||
|
||||
int IOSUHAX_FSA_RawOpen(int fsaFd, const char* device_path, int* outHandle);
|
||||
int IOSUHAX_FSA_RawRead(int fsaFd, void* data, uint32_t block_size, uint32_t block_cnt, uint64_t sector_offset, int device_handle);
|
||||
int IOSUHAX_FSA_RawWrite(int fsaFd, const void* data, uint32_t block_size, uint32_t block_cnt, uint64_t sector_offset, int device_handle);
|
||||
int IOSUHAX_FSA_RawClose(int fsaFd, int device_handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef _LIB_IOSUHAX_H_
|
||||
#define _LIB_IOSUHAX_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define IOS_ERROR_UNKNOWN_VALUE 0xFFFFFFD6
|
||||
#define IOS_ERROR_INVALID_ARG 0xFFFFFFE3
|
||||
#define IOS_ERROR_INVALID_SIZE 0xFFFFFFE9
|
||||
#define IOS_ERROR_UNKNOWN 0xFFFFFFF7
|
||||
#define IOS_ERROR_NOEXISTS 0xFFFFFFFA
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t flag;
|
||||
uint32_t permission;
|
||||
uint32_t owner_id;
|
||||
uint32_t group_id;
|
||||
uint32_t size; // size in bytes
|
||||
uint32_t physsize; // physical size on disk in bytes
|
||||
uint32_t unk[3];
|
||||
uint32_t id;
|
||||
uint32_t ctime;
|
||||
uint32_t mtime;
|
||||
uint32_t unk2[0x0D];
|
||||
}fileStat_s;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
fileStat_s stat;
|
||||
char name[0x100];
|
||||
}directoryEntry_s;
|
||||
|
||||
#define DIR_ENTRY_IS_DIRECTORY 0x80000000
|
||||
|
||||
#define FSA_MOUNTFLAGS_BINDMOUNT (1 << 0)
|
||||
#define FSA_MOUNTFLAGS_GLOBAL (1 << 1)
|
||||
|
||||
int IOSUHAX_Open(const char *dev); // if dev == NULL the default path /dev/iosuhax will be used
|
||||
int IOSUHAX_Close(void);
|
||||
|
||||
int IOSUHAX_memwrite(uint32_t address, const uint8_t * buffer, uint32_t size); // IOSU external input
|
||||
int IOSUHAX_memread(uint32_t address, uint8_t * out_buffer, uint32_t size); // IOSU external output
|
||||
int IOSUHAX_memcpy(uint32_t dst, uint32_t src, uint32_t size); // IOSU internal memcpy only
|
||||
|
||||
int IOSUHAX_kern_write32(uint32_t address, uint32_t value);
|
||||
int IOSUHAX_kern_read32(uint32_t address, uint32_t* out_buffer, uint32_t count);
|
||||
|
||||
int IOSUHAX_SVC(uint32_t svc_id, uint32_t * args, uint32_t arg_cnt);
|
||||
|
||||
int IOSUHAX_FSA_Open();
|
||||
int IOSUHAX_FSA_Close(int fsaFd);
|
||||
|
||||
int IOSUHAX_FSA_Mount(int fsaFd, const char* device_path, const char* volume_path, uint32_t flags, const char* arg_string, int arg_string_len);
|
||||
int IOSUHAX_FSA_Unmount(int fsaFd, const char* path, uint32_t flags);
|
||||
int IOSUHAX_FSA_FlushVolume(int fsaFd, const char* volume_path);
|
||||
|
||||
int IOSUHAX_FSA_GetDeviceInfo(int fsaFd, const char* device_path, int type, uint32_t* out_data);
|
||||
|
||||
int IOSUHAX_FSA_MakeDir(int fsaFd, const char* path, uint32_t flags);
|
||||
int IOSUHAX_FSA_OpenDir(int fsaFd, const char* path, int* outHandle);
|
||||
int IOSUHAX_FSA_ReadDir(int fsaFd, int handle, directoryEntry_s* out_data);
|
||||
int IOSUHAX_FSA_RewindDir(int fsaFd, int dirHandle);
|
||||
int IOSUHAX_FSA_CloseDir(int fsaFd, int handle);
|
||||
int IOSUHAX_FSA_ChangeDir(int fsaFd, const char *path);
|
||||
|
||||
int IOSUHAX_FSA_OpenFile(int fsaFd, const char* path, const char* mode, int* outHandle);
|
||||
int IOSUHAX_FSA_ReadFile(int fsaFd, void* data, uint32_t size, uint32_t cnt, int fileHandle, uint32_t flags);
|
||||
int IOSUHAX_FSA_WriteFile(int fsaFd, const void* data, uint32_t size, uint32_t cnt, int fileHandle, uint32_t flags);
|
||||
int IOSUHAX_FSA_StatFile(int fsaFd, int fileHandle, fileStat_s* out_data);
|
||||
int IOSUHAX_FSA_CloseFile(int fsaFd, int fileHandle);
|
||||
int IOSUHAX_FSA_SetFilePos(int fsaFd, int fileHandle, uint32_t position);
|
||||
int IOSUHAX_FSA_GetStat(int fsaFd, const char *path, fileStat_s* out_data);
|
||||
int IOSUHAX_FSA_Remove(int fsaFd, const char *path);
|
||||
int IOSUHAX_FSA_ChangeMode(int fsaFd, const char* path, int mode);
|
||||
|
||||
int IOSUHAX_FSA_RawOpen(int fsaFd, const char* device_path, int* outHandle);
|
||||
int IOSUHAX_FSA_RawRead(int fsaFd, void* data, uint32_t block_size, uint32_t block_cnt, uint64_t sector_offset, int device_handle);
|
||||
int IOSUHAX_FSA_RawWrite(int fsaFd, const void* data, uint32_t block_size, uint32_t block_cnt, uint64_t sector_offset, int device_handle);
|
||||
int IOSUHAX_FSA_RawClose(int fsaFd, int device_handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,42 +1,42 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2015
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef __IOSUHAX_DEVOPTAB_H_
|
||||
#define __IOSUHAX_DEVOPTAB_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//! virtual name example: sd or odd (for sd:/ or odd:/ access)
|
||||
//! fsaFd: fd received by IOSUHAX_FSA_Open();
|
||||
//! dev_path: (optional) if a device should be mounted to the mount_path. If NULL no IOSUHAX_FSA_Mount is not executed.
|
||||
//! mount_path: path to map to virtual device name
|
||||
int mount_fs(const char *virt_name, int fsaFd, const char *dev_path, const char *mount_path);
|
||||
int unmount_fs(const char *virt_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __IOSUHAX_DEVOPTAB_H_
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2015
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef __IOSUHAX_DEVOPTAB_H_
|
||||
#define __IOSUHAX_DEVOPTAB_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
//! virtual name example: sd or odd (for sd:/ or odd:/ access)
|
||||
//! fsaFd: fd received by IOSUHAX_FSA_Open();
|
||||
//! dev_path: (optional) if a device should be mounted to the mount_path. If NULL no IOSUHAX_FSA_Mount is not executed.
|
||||
//! mount_path: path to map to virtual device name
|
||||
int mount_fs(const char *virt_name, int fsaFd, const char *dev_path, const char *mount_path);
|
||||
int unmount_fs(const char *virt_name);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __IOSUHAX_DEVOPTAB_H_
|
|
@ -1,73 +1,73 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef _IOSUHAX_DISC_INTERFACE_H_
|
||||
#define _IOSUHAX_DISC_INTERFACE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DEVICE_TYPE_WII_U_SD (('W'<<24)|('U'<<16)|('S'<<8)|'D')
|
||||
#define DEVICE_TYPE_WII_U_USB (('W'<<24)|('U'<<16)|('S'<<8)|'B')
|
||||
#define FEATURE_WII_U_SD 0x00001000
|
||||
#define FEATURE_WII_U_USB 0x00002000
|
||||
|
||||
#ifndef OGC_DISC_IO_INCLUDE
|
||||
typedef uint32_t sec_t;
|
||||
|
||||
#define FEATURE_MEDIUM_CANREAD 0x00000001
|
||||
#define FEATURE_MEDIUM_CANWRITE 0x00000002
|
||||
|
||||
typedef bool (* FN_MEDIUM_STARTUP)(void) ;
|
||||
typedef bool (* FN_MEDIUM_ISINSERTED)(void) ;
|
||||
typedef bool (* FN_MEDIUM_READSECTORS)(uint32_t sector, uint32_t numSectors, void* buffer) ;
|
||||
typedef bool (* FN_MEDIUM_WRITESECTORS)(uint32_t sector, uint32_t numSectors, const void* buffer) ;
|
||||
typedef bool (* FN_MEDIUM_CLEARSTATUS)(void) ;
|
||||
typedef bool (* FN_MEDIUM_SHUTDOWN)(void) ;
|
||||
|
||||
struct DISC_INTERFACE_STRUCT {
|
||||
unsigned long ioType ;
|
||||
unsigned long features ;
|
||||
FN_MEDIUM_STARTUP startup ;
|
||||
FN_MEDIUM_ISINSERTED isInserted ;
|
||||
FN_MEDIUM_READSECTORS readSectors ;
|
||||
FN_MEDIUM_WRITESECTORS writeSectors ;
|
||||
FN_MEDIUM_CLEARSTATUS clearStatus ;
|
||||
FN_MEDIUM_SHUTDOWN shutdown ;
|
||||
} ;
|
||||
|
||||
typedef struct DISC_INTERFACE_STRUCT DISC_INTERFACE ;
|
||||
#endif
|
||||
|
||||
extern const DISC_INTERFACE IOSUHAX_sdio_disc_interface;
|
||||
extern const DISC_INTERFACE IOSUHAX_usb_disc_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#ifndef _IOSUHAX_DISC_INTERFACE_H_
|
||||
#define _IOSUHAX_DISC_INTERFACE_H_
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DEVICE_TYPE_WII_U_SD (('W'<<24)|('U'<<16)|('S'<<8)|'D')
|
||||
#define DEVICE_TYPE_WII_U_USB (('W'<<24)|('U'<<16)|('S'<<8)|'B')
|
||||
#define FEATURE_WII_U_SD 0x00001000
|
||||
#define FEATURE_WII_U_USB 0x00002000
|
||||
|
||||
#ifndef OGC_DISC_IO_INCLUDE
|
||||
typedef uint32_t sec_t;
|
||||
|
||||
#define FEATURE_MEDIUM_CANREAD 0x00000001
|
||||
#define FEATURE_MEDIUM_CANWRITE 0x00000002
|
||||
|
||||
typedef bool (* FN_MEDIUM_STARTUP)(void) ;
|
||||
typedef bool (* FN_MEDIUM_ISINSERTED)(void) ;
|
||||
typedef bool (* FN_MEDIUM_READSECTORS)(uint32_t sector, uint32_t numSectors, void* buffer) ;
|
||||
typedef bool (* FN_MEDIUM_WRITESECTORS)(uint32_t sector, uint32_t numSectors, const void* buffer) ;
|
||||
typedef bool (* FN_MEDIUM_CLEARSTATUS)(void) ;
|
||||
typedef bool (* FN_MEDIUM_SHUTDOWN)(void) ;
|
||||
|
||||
struct DISC_INTERFACE_STRUCT {
|
||||
unsigned long ioType ;
|
||||
unsigned long features ;
|
||||
FN_MEDIUM_STARTUP startup ;
|
||||
FN_MEDIUM_ISINSERTED isInserted ;
|
||||
FN_MEDIUM_READSECTORS readSectors ;
|
||||
FN_MEDIUM_WRITESECTORS writeSectors ;
|
||||
FN_MEDIUM_CLEARSTATUS clearStatus ;
|
||||
FN_MEDIUM_SHUTDOWN shutdown ;
|
||||
} ;
|
||||
|
||||
typedef struct DISC_INTERFACE_STRUCT DISC_INTERFACE ;
|
||||
#endif
|
||||
|
||||
extern const DISC_INTERFACE IOSUHAX_sdio_disc_interface;
|
||||
extern const DISC_INTERFACE IOSUHAX_usb_disc_interface;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,51 +0,0 @@
|
|||
#ifndef __OS_FUNCTIONS_H_
|
||||
#define __OS_FUNCTIONS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OS_MUTEX_SIZE 44
|
||||
|
||||
// RetroArch mod: use existing headers; prevents conflicts in griffin
|
||||
#include <wiiu/os.h>
|
||||
#include <wiiu/ios.h>
|
||||
#if 0
|
||||
|
||||
#ifndef __WUT__
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! Mutex functions
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern void (* OSInitMutex)(void* mutex);
|
||||
extern void (* OSLockMutex)(void* mutex);
|
||||
extern void (* OSUnlockMutex)(void* mutex);
|
||||
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! IOS function
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern int (*IOS_Ioctl)(int fd, unsigned int request, void *input_buffer,unsigned int input_buffer_len, void *output_buffer, unsigned int output_buffer_len);
|
||||
extern int (*IOS_Open)(char *path, unsigned int mode);
|
||||
extern int (*IOS_Close)(int fd);
|
||||
#else
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! Mutex functions
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern void OSInitMutex(void* mutex);
|
||||
extern void OSLockMutex(void* mutex);
|
||||
extern void OSUnlockMutex(void* mutex);
|
||||
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! IOS function
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern int IOS_Ioctl(int fd, unsigned int request, void *input_buffer,unsigned int input_buffer_len, void *output_buffer, unsigned int output_buffer_len);
|
||||
extern int IOS_Open(char *path, unsigned int mode);
|
||||
extern int IOS_Close(int fd);
|
||||
#endif // __WUT__
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // 0
|
||||
|
||||
#endif // __OS_FUNCTIONS_H_
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,262 +1,262 @@
|
|||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include "iosuhax.h"
|
||||
#include "iosuhax_disc_interface.h"
|
||||
|
||||
#define FSA_REF_SD 0x01
|
||||
#define FSA_REF_USB 0x02
|
||||
|
||||
static int initialized = 0;
|
||||
|
||||
static int fsaFdSd = 0;
|
||||
static int fsaFdUsb = 0;
|
||||
static int sdioFd = 0;
|
||||
static int usbFd = 0;
|
||||
|
||||
static void IOSUHAX_disc_io_initialize(void)
|
||||
{
|
||||
if(initialized == 0)
|
||||
{
|
||||
initialized = 1;
|
||||
fsaFdSd = -1;
|
||||
fsaFdUsb = -1;
|
||||
sdioFd = -1;
|
||||
usbFd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IOSUHAX_disc_io_fsa_open(int fsaFd)
|
||||
{
|
||||
IOSUHAX_disc_io_initialize();
|
||||
|
||||
if(IOSUHAX_Open(NULL) < 0)
|
||||
return false;
|
||||
|
||||
if(fsaFd == FSA_REF_SD)
|
||||
{
|
||||
if(fsaFdSd < 0)
|
||||
{
|
||||
fsaFdSd = IOSUHAX_FSA_Open();
|
||||
}
|
||||
|
||||
if(fsaFdSd >= 0)
|
||||
return true;
|
||||
}
|
||||
else if(fsaFd == FSA_REF_USB)
|
||||
{
|
||||
if(fsaFdUsb < 0)
|
||||
{
|
||||
fsaFdUsb = IOSUHAX_FSA_Open();
|
||||
}
|
||||
|
||||
if(fsaFdUsb >= 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void IOSUHAX_disc_io_fsa_close(int fsaFd)
|
||||
{
|
||||
if(fsaFd == FSA_REF_SD)
|
||||
{
|
||||
if(fsaFdSd >= 0)
|
||||
{
|
||||
IOSUHAX_FSA_Close(fsaFdSd);
|
||||
fsaFdSd = -1;
|
||||
}
|
||||
}
|
||||
else if(fsaFd == FSA_REF_USB)
|
||||
{
|
||||
if(fsaFdUsb >= 0)
|
||||
{
|
||||
IOSUHAX_FSA_Close(fsaFdUsb);
|
||||
fsaFdUsb = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_startup(void)
|
||||
{
|
||||
if(!IOSUHAX_disc_io_fsa_open(FSA_REF_SD))
|
||||
return false;
|
||||
|
||||
if(sdioFd < 0)
|
||||
{
|
||||
int res = IOSUHAX_FSA_RawOpen(fsaFdSd, "/dev/sdcard01", &sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_SD);
|
||||
sdioFd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return (sdioFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_isInserted(void)
|
||||
{
|
||||
//! TODO: check for SD card inserted with IOSUHAX_FSA_GetDeviceInfo()
|
||||
return initialized && (fsaFdSd >= 0) && (sdioFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_clearStatus(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_shutdown(void)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted())
|
||||
return false;
|
||||
|
||||
IOSUHAX_FSA_RawClose(fsaFdSd, sdioFd);
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_SD);
|
||||
sdioFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_readSectors(uint32_t sector, uint32_t numSectors, void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted() || !buffer)
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawRead(fsaFdSd, buffer, 512, numSectors, sector, sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_writeSectors(uint32_t sector, uint32_t numSectors, const void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted() || !buffer)
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawWrite(fsaFdSd, buffer, 512, numSectors, sector, sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const DISC_INTERFACE IOSUHAX_sdio_disc_interface =
|
||||
{
|
||||
DEVICE_TYPE_WII_U_SD,
|
||||
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_U_SD,
|
||||
IOSUHAX_sdio_startup,
|
||||
IOSUHAX_sdio_isInserted,
|
||||
IOSUHAX_sdio_readSectors,
|
||||
IOSUHAX_sdio_writeSectors,
|
||||
IOSUHAX_sdio_clearStatus,
|
||||
IOSUHAX_sdio_shutdown
|
||||
};
|
||||
|
||||
static bool IOSUHAX_usb_startup(void)
|
||||
{
|
||||
if(!IOSUHAX_disc_io_fsa_open(FSA_REF_USB))
|
||||
return false;
|
||||
|
||||
if(usbFd < 0)
|
||||
{
|
||||
int res = IOSUHAX_FSA_RawOpen(fsaFdUsb, "/dev/usb01", &usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
res = IOSUHAX_FSA_RawOpen(fsaFdUsb, "/dev/usb02", &usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_USB);
|
||||
usbFd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (usbFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_isInserted(void)
|
||||
{
|
||||
return initialized && (fsaFdUsb >= 0) && (usbFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_clearStatus(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_shutdown(void)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted())
|
||||
return false;
|
||||
|
||||
IOSUHAX_FSA_RawClose(fsaFdUsb, usbFd);
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_USB);
|
||||
usbFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_readSectors(uint32_t sector, uint32_t numSectors, void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted() || !buffer)
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawRead(fsaFdUsb, buffer, 512, numSectors, sector, usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_writeSectors(uint32_t sector, uint32_t numSectors, const void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted() || !buffer)
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawWrite(fsaFdUsb, buffer, 512, numSectors, sector, usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const DISC_INTERFACE IOSUHAX_usb_disc_interface =
|
||||
{
|
||||
DEVICE_TYPE_WII_U_USB,
|
||||
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_U_USB,
|
||||
IOSUHAX_usb_startup,
|
||||
IOSUHAX_usb_isInserted,
|
||||
IOSUHAX_usb_readSectors,
|
||||
IOSUHAX_usb_writeSectors,
|
||||
IOSUHAX_usb_clearStatus,
|
||||
IOSUHAX_usb_shutdown
|
||||
};
|
||||
/***************************************************************************
|
||||
* Copyright (C) 2016
|
||||
* by Dimok
|
||||
*
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any
|
||||
* damages arising from the use of this software.
|
||||
*
|
||||
* Permission is granted to anyone to use this software for any
|
||||
* purpose, including commercial applications, and to alter it and
|
||||
* redistribute it freely, subject to the following restrictions:
|
||||
*
|
||||
* 1. The origin of this software must not be misrepresented; you
|
||||
* must not claim that you wrote the original software. If you use
|
||||
* this software in a product, an acknowledgment in the product
|
||||
* documentation would be appreciated but is not required.
|
||||
*
|
||||
* 2. Altered source versions must be plainly marked as such, and
|
||||
* must not be misrepresented as being the original software.
|
||||
*
|
||||
* 3. This notice may not be removed or altered from any source
|
||||
* distribution.
|
||||
***************************************************************************/
|
||||
#include <string.h>
|
||||
#include <malloc.h>
|
||||
#include "iosuhax.h"
|
||||
#include "iosuhax_disc_interface.h"
|
||||
|
||||
#define FSA_REF_SD 0x01
|
||||
#define FSA_REF_USB 0x02
|
||||
|
||||
static int initialized = 0;
|
||||
|
||||
static int fsaFdSd = 0;
|
||||
static int fsaFdUsb = 0;
|
||||
static int sdioFd = 0;
|
||||
static int usbFd = 0;
|
||||
|
||||
static void IOSUHAX_disc_io_initialize(void)
|
||||
{
|
||||
if(initialized == 0)
|
||||
{
|
||||
initialized = 1;
|
||||
fsaFdSd = -1;
|
||||
fsaFdUsb = -1;
|
||||
sdioFd = -1;
|
||||
usbFd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
static bool IOSUHAX_disc_io_fsa_open(int fsaFd)
|
||||
{
|
||||
IOSUHAX_disc_io_initialize();
|
||||
|
||||
if(IOSUHAX_Open(NULL) < 0)
|
||||
return false;
|
||||
|
||||
if(fsaFd == FSA_REF_SD)
|
||||
{
|
||||
if(fsaFdSd < 0)
|
||||
{
|
||||
fsaFdSd = IOSUHAX_FSA_Open();
|
||||
}
|
||||
|
||||
if(fsaFdSd >= 0)
|
||||
return true;
|
||||
}
|
||||
else if(fsaFd == FSA_REF_USB)
|
||||
{
|
||||
if(fsaFdUsb < 0)
|
||||
{
|
||||
fsaFdUsb = IOSUHAX_FSA_Open();
|
||||
}
|
||||
|
||||
if(fsaFdUsb >= 0)
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void IOSUHAX_disc_io_fsa_close(int fsaFd)
|
||||
{
|
||||
if(fsaFd == FSA_REF_SD)
|
||||
{
|
||||
if(fsaFdSd >= 0)
|
||||
{
|
||||
IOSUHAX_FSA_Close(fsaFdSd);
|
||||
fsaFdSd = -1;
|
||||
}
|
||||
}
|
||||
else if(fsaFd == FSA_REF_USB)
|
||||
{
|
||||
if(fsaFdUsb >= 0)
|
||||
{
|
||||
IOSUHAX_FSA_Close(fsaFdUsb);
|
||||
fsaFdUsb = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_startup(void)
|
||||
{
|
||||
if(!IOSUHAX_disc_io_fsa_open(FSA_REF_SD))
|
||||
return false;
|
||||
|
||||
if(sdioFd < 0)
|
||||
{
|
||||
int res = IOSUHAX_FSA_RawOpen(fsaFdSd, "/dev/sdcard01", &sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_SD);
|
||||
sdioFd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
return (sdioFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_isInserted(void)
|
||||
{
|
||||
//! TODO: check for SD card inserted with IOSUHAX_FSA_GetDeviceInfo()
|
||||
return initialized && (fsaFdSd >= 0) && (sdioFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_clearStatus(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_shutdown(void)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted())
|
||||
return false;
|
||||
|
||||
IOSUHAX_FSA_RawClose(fsaFdSd, sdioFd);
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_SD);
|
||||
sdioFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_readSectors(uint32_t sector, uint32_t numSectors, void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted())
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawRead(fsaFdSd, buffer, 512, numSectors, sector, sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_sdio_writeSectors(uint32_t sector, uint32_t numSectors, const void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_sdio_isInserted())
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawWrite(fsaFdSd, buffer, 512, numSectors, sector, sdioFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const DISC_INTERFACE IOSUHAX_sdio_disc_interface =
|
||||
{
|
||||
DEVICE_TYPE_WII_U_SD,
|
||||
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_U_SD,
|
||||
IOSUHAX_sdio_startup,
|
||||
IOSUHAX_sdio_isInserted,
|
||||
IOSUHAX_sdio_readSectors,
|
||||
IOSUHAX_sdio_writeSectors,
|
||||
IOSUHAX_sdio_clearStatus,
|
||||
IOSUHAX_sdio_shutdown
|
||||
};
|
||||
|
||||
static bool IOSUHAX_usb_startup(void)
|
||||
{
|
||||
if(!IOSUHAX_disc_io_fsa_open(FSA_REF_USB))
|
||||
return false;
|
||||
|
||||
if(usbFd < 0)
|
||||
{
|
||||
int res = IOSUHAX_FSA_RawOpen(fsaFdUsb, "/dev/usb01", &usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
res = IOSUHAX_FSA_RawOpen(fsaFdUsb, "/dev/usb02", &usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_USB);
|
||||
usbFd = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (usbFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_isInserted(void)
|
||||
{
|
||||
return initialized && (fsaFdUsb >= 0) && (usbFd >= 0);
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_clearStatus(void)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_shutdown(void)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted())
|
||||
return false;
|
||||
|
||||
IOSUHAX_FSA_RawClose(fsaFdUsb, usbFd);
|
||||
IOSUHAX_disc_io_fsa_close(FSA_REF_USB);
|
||||
usbFd = -1;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_readSectors(uint32_t sector, uint32_t numSectors, void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted())
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawRead(fsaFdUsb, buffer, 512, numSectors, sector, usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool IOSUHAX_usb_writeSectors(uint32_t sector, uint32_t numSectors, const void* buffer)
|
||||
{
|
||||
if(!IOSUHAX_usb_isInserted())
|
||||
return false;
|
||||
|
||||
int res = IOSUHAX_FSA_RawWrite(fsaFdUsb, buffer, 512, numSectors, sector, usbFd);
|
||||
if(res < 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const DISC_INTERFACE IOSUHAX_usb_disc_interface =
|
||||
{
|
||||
DEVICE_TYPE_WII_U_USB,
|
||||
FEATURE_MEDIUM_CANREAD | FEATURE_MEDIUM_CANWRITE | FEATURE_WII_U_USB,
|
||||
IOSUHAX_usb_startup,
|
||||
IOSUHAX_usb_isInserted,
|
||||
IOSUHAX_usb_readSectors,
|
||||
IOSUHAX_usb_writeSectors,
|
||||
IOSUHAX_usb_clearStatus,
|
||||
IOSUHAX_usb_shutdown
|
||||
};
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef __OS_FUNCTIONS_H_
|
||||
#define __OS_FUNCTIONS_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OS_MUTEX_SIZE 44
|
||||
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! Mutex functions
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern void OSInitMutex(void* mutex);
|
||||
extern void OSLockMutex(void* mutex);
|
||||
extern void OSUnlockMutex(void* mutex);
|
||||
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
//! IOS function
|
||||
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
extern int IOS_Ioctl(int fd, unsigned int request, void *input_buffer,unsigned int input_buffer_len, void *output_buffer, unsigned int output_buffer_len);
|
||||
extern int IOS_Open(char *path, unsigned int mode);
|
||||
extern int IOS_Close(int fd);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __OS_FUNCTIONS_H_
|
|
@ -16,6 +16,11 @@
|
|||
#include "display_windows.h"
|
||||
#include "log.h"
|
||||
|
||||
typedef struct ENUM_INFO
|
||||
{
|
||||
int index;
|
||||
HMONITOR h_monitor;
|
||||
} ENUM_INFO;
|
||||
|
||||
//============================================================
|
||||
// windows_display::windows_display
|
||||
|
@ -41,8 +46,54 @@ windows_display::~windows_display()
|
|||
// windows_display::init
|
||||
//============================================================
|
||||
|
||||
int CALLBACK monitor_by_index(HMONITOR h_monitor, HDC, LPRECT, LPARAM data)
|
||||
{
|
||||
ENUM_INFO *mon_info = (ENUM_INFO*) data;
|
||||
if (--mon_info->index < 0)
|
||||
{
|
||||
mon_info->h_monitor = h_monitor;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool windows_display::init()
|
||||
{
|
||||
char display[32] = {};
|
||||
|
||||
// If monitor is passed by index, find the matching device
|
||||
if (strlen(m_ds.screen) == 1)
|
||||
{
|
||||
int monitor_index = m_ds.screen[0] - '0';
|
||||
if (monitor_index < 0 || monitor_index > 9)
|
||||
{
|
||||
log_error("Switchres: bad monitor index %d\n", monitor_index);
|
||||
return false;
|
||||
}
|
||||
|
||||
ENUM_INFO mon_info;
|
||||
mon_info.index = monitor_index;
|
||||
mon_info.h_monitor = NULL;
|
||||
|
||||
EnumDisplayMonitors(NULL, NULL, monitor_by_index, (LPARAM)&mon_info);
|
||||
if (mon_info.h_monitor != NULL)
|
||||
{
|
||||
MONITORINFOEXA info = {};
|
||||
info.cbSize = sizeof(info);
|
||||
GetMonitorInfoA(mon_info.h_monitor, &info);
|
||||
snprintf(display, sizeof(display) -1, "%s", info.szDevice);
|
||||
log_info("display %s\n", display);
|
||||
}
|
||||
else
|
||||
{
|
||||
log_error("Swichres: couldn't find handle for monitor index %d\n", monitor_index);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
strncpy(display, m_ds.screen, sizeof(display)-1);
|
||||
|
||||
// Find the display by device name, or "auto" for primary display
|
||||
DISPLAY_DEVICEA lpDisplayDevice[DISPLAY_MAX];
|
||||
int idev = 0;
|
||||
int found = -1;
|
||||
|
@ -55,8 +106,8 @@ bool windows_display::init()
|
|||
if (EnumDisplayDevicesA(NULL, idev, &lpDisplayDevice[idev], 0) == FALSE)
|
||||
break;
|
||||
|
||||
if ((!strcmp(m_ds.screen, "auto") && (lpDisplayDevice[idev].StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE))
|
||||
|| !strcmp(m_ds.screen, lpDisplayDevice[idev].DeviceName) || m_ds.screen[0] - '0' == idev)
|
||||
if ((!strcmp(display, "auto") && (lpDisplayDevice[idev].StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE))
|
||||
|| !strcmp(display, lpDisplayDevice[idev].DeviceName))
|
||||
found = idev;
|
||||
|
||||
idev++;
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
|
||||
#include "log.h"
|
||||
|
||||
enum log_verbosity { NONE, ERROR, INFO, DBG };
|
||||
static log_verbosity log_level = INFO;
|
||||
enum log_verbosity { NONE, SR_ERROR, SR_INFO, SR_DEBUG };
|
||||
static log_verbosity log_level = SR_INFO;
|
||||
|
||||
void log_dummy(const char *, ...) {}
|
||||
|
||||
|
@ -36,21 +36,21 @@ LOG_ERROR log_error_bak = &log_dummy;
|
|||
|
||||
void set_log_verbose(void *func_ptr)
|
||||
{
|
||||
if (log_level >= DBG)
|
||||
if (log_level >= SR_DEBUG)
|
||||
log_verbose = (LOG_VERBOSE)func_ptr;
|
||||
log_verbose_bak = (LOG_VERBOSE)func_ptr;
|
||||
}
|
||||
|
||||
void set_log_info(void *func_ptr)
|
||||
{
|
||||
if (log_level >= INFO)
|
||||
if (log_level >= SR_INFO)
|
||||
log_info = (LOG_INFO)func_ptr;
|
||||
log_info_bak = (LOG_INFO)func_ptr;
|
||||
}
|
||||
|
||||
void set_log_error(void *func_ptr)
|
||||
{
|
||||
if (log_level >= ERROR)
|
||||
if (log_level >= SR_ERROR)
|
||||
log_error = (LOG_ERROR)func_ptr;
|
||||
log_error_bak = (LOG_ERROR)func_ptr;
|
||||
}
|
||||
|
@ -60,19 +60,19 @@ void set_log_verbosity(int level)
|
|||
// Keep the log in the enum bounds
|
||||
if (level < NONE)
|
||||
level = NONE;
|
||||
if(level > DBG)
|
||||
level = DBG;
|
||||
if(level > SR_DEBUG)
|
||||
level = SR_DEBUG;
|
||||
|
||||
log_error = &log_dummy;
|
||||
log_info = &log_dummy;
|
||||
log_verbose = &log_dummy;
|
||||
|
||||
if (level >= ERROR)
|
||||
if (level >= SR_ERROR)
|
||||
log_error = log_error_bak;
|
||||
|
||||
if (level >= INFO)
|
||||
if (level >= SR_INFO)
|
||||
log_info = log_info_bak;
|
||||
|
||||
if (level >= DBG)
|
||||
if (level >= SR_DEBUG)
|
||||
log_verbose = log_verbose_bak;
|
||||
}
|
||||
}
|
|
@ -23,8 +23,10 @@ const string WHITESPACE = " \n\r\t\f\v";
|
|||
|
||||
#if defined(_WIN32)
|
||||
#define SR_CONFIG_PATHS ";.\\;.\\ini\\;"
|
||||
#else
|
||||
#elif defined(__linux__)
|
||||
#define SR_CONFIG_PATHS ";./;./ini/;/etc/;"
|
||||
#else
|
||||
#define SR_CONFIG_PATHS ";./"
|
||||
#endif
|
||||
|
||||
//============================================================
|
||||
|
|
|
@ -17,12 +17,13 @@
|
|||
|
||||
#include <file/file_path.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#if defined(DINGUX_BETA)
|
||||
#include <string/stdstring.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(RS90)
|
||||
#include <lists/dir_list.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "dingux_utils.h"
|
||||
|
||||
#define DINGUX_ALLOW_DOWNSCALING_FILE "/sys/devices/platform/jz-lcd.0/allow_downscaling"
|
||||
|
@ -32,6 +33,14 @@
|
|||
#define DINGUX_SHARPNESS_DOWNSCALING_FILE "/sys/devices/platform/jz-lcd.0/sharpness_downscaling"
|
||||
#define DINGUX_BATTERY_CAPACITY_FILE "/sys/class/power_supply/battery/capacity"
|
||||
|
||||
/* Base path defines */
|
||||
#define DINGUX_HOME_ENVAR "HOME"
|
||||
#define DINGUX_BASE_DIR "retroarch"
|
||||
#define DINGUX_BASE_DIR_HIDDEN ".retroarch"
|
||||
#define DINGUX_RS90_MEDIA_PATH "/media"
|
||||
#define DINGUX_RS90_DEFAULT_SD_PATH "/media/mmcblk0p1"
|
||||
#define DINGUX_RS90_DATA_PATH "/media/data"
|
||||
|
||||
/* OpenDingux Beta defines */
|
||||
#define DINGUX_BATTERY_VOLTAGE_MIN "/sys/class/power_supply/jz-battery/voltage_min_design"
|
||||
#define DINGUX_BATTERY_VOLTAGE_MAX "/sys/class/power_supply/jz-battery/voltage_max_design"
|
||||
|
@ -302,3 +311,80 @@ int dingux_get_battery_level(void)
|
|||
return dingux_read_battery_sys_file(DINGUX_BATTERY_CAPACITY_FILE);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Fetches the path of the base 'retroarch'
|
||||
* directory */
|
||||
void dingux_get_base_path(char *path, size_t len)
|
||||
{
|
||||
const char *home = NULL;
|
||||
#if defined(RS90)
|
||||
struct string_list *dir_list = NULL;
|
||||
#endif
|
||||
|
||||
if (!path || (len < 1))
|
||||
return;
|
||||
|
||||
#if defined(RS90)
|
||||
/* The RS-90 home directory is located on the
|
||||
* device's internal storage. This has limited
|
||||
* space (a total of only 256MB), such that it
|
||||
* is impractical to store cores and user files
|
||||
* here. We therefore attempt to use a base
|
||||
* path on the external microsd card */
|
||||
|
||||
/* Get list of directories in /media */
|
||||
dir_list = dir_list_new(DINGUX_RS90_MEDIA_PATH,
|
||||
NULL, true, true, false, false);
|
||||
|
||||
if (dir_list)
|
||||
{
|
||||
size_t i;
|
||||
bool path_found = false;
|
||||
|
||||
for (i = 0; i < dir_list->size; i++)
|
||||
{
|
||||
const char *dir_path = dir_list->elems[i].data;
|
||||
int dir_type = dir_list->elems[i].attr.i;
|
||||
|
||||
/* Skip files and invalid entries */
|
||||
if ((dir_type != RARCH_DIRECTORY) ||
|
||||
string_is_empty(dir_path) ||
|
||||
string_is_equal(dir_path, DINGUX_RS90_DATA_PATH))
|
||||
continue;
|
||||
|
||||
/* Build 'retroarch' subdirectory path */
|
||||
snprintf(path, len, "%s%c%s", dir_path,
|
||||
PATH_DEFAULT_SLASH_C(), DINGUX_BASE_DIR);
|
||||
|
||||
/* We can use this subdirectory path if:
|
||||
* - Directory corresponds to an unlabelled
|
||||
* microsd card
|
||||
* - Subdirectory already exists */
|
||||
if (string_is_equal(dir_path, DINGUX_RS90_DEFAULT_SD_PATH) ||
|
||||
path_is_directory(path))
|
||||
{
|
||||
path_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
dir_list_free(dir_list);
|
||||
|
||||
if (path_found)
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
/* Get home directory */
|
||||
home = getenv(DINGUX_HOME_ENVAR);
|
||||
|
||||
/* If a home directory is found (which should
|
||||
* always be the case), base path is "$HOME/.retroarch"
|
||||
* > If home path is unset, use existing UNIX frontend
|
||||
* driver default of "retroarch" (this will ultimately
|
||||
* fail, but there is nothing else we can do...) */
|
||||
if (home)
|
||||
snprintf(path, len, "%s%c%s", home,
|
||||
PATH_DEFAULT_SLASH_C(), DINGUX_BASE_DIR_HIDDEN);
|
||||
else
|
||||
strlcpy(path, DINGUX_BASE_DIR, len);
|
||||
}
|
||||
|
|
|
@ -101,6 +101,10 @@ bool dingux_ipu_reset(void);
|
|||
/* Fetches internal battery level */
|
||||
int dingux_get_battery_level(void);
|
||||
|
||||
/* Fetches the path of the base 'retroarch'
|
||||
* directory */
|
||||
void dingux_get_base_path(char *path, size_t len);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,11 +47,9 @@ static bool DCifJSONObjectMemberHandler(void* context, const char *pValue, size_
|
|||
{
|
||||
DCifJSONContext *pCtx = (DCifJSONContext*)context;
|
||||
|
||||
/* something went wrong */
|
||||
if (pCtx->current_entry_str_val)
|
||||
{
|
||||
/* something went wrong */
|
||||
return false;
|
||||
}
|
||||
|
||||
if (length)
|
||||
{
|
||||
|
|
|
@ -37,6 +37,10 @@
|
|||
#include <kernel/image.h>
|
||||
#endif
|
||||
|
||||
#if defined(DINGUX)
|
||||
#include "dingux/dingux_utils.h"
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
#include <string.h>
|
||||
|
@ -104,13 +108,8 @@ bool fill_pathname_application_data(char *s, size_t len)
|
|||
return true;
|
||||
}
|
||||
#elif defined(DINGUX)
|
||||
const char *appdata = getenv("HOME");
|
||||
|
||||
if (appdata)
|
||||
{
|
||||
fill_pathname_join(s, appdata, "/.retroarch", len);
|
||||
return true;
|
||||
}
|
||||
dingux_get_base_path(s, len);
|
||||
return true;
|
||||
#elif !defined(RARCH_CONSOLE)
|
||||
const char *xdg = getenv("XDG_CONFIG_HOME");
|
||||
const char *appdata = getenv("HOME");
|
||||
|
@ -305,6 +304,21 @@ void fill_pathname_application_special(char *s,
|
|||
strlcpy(s, dir_assets, len);
|
||||
fill_pathname_slash(s, len);
|
||||
|
||||
#if defined(WIIU) || defined(VITA)
|
||||
/* Smaller 46x46 icons look better on low-dpi devices */
|
||||
/* ozone */
|
||||
strlcat(s, "ozone", len);
|
||||
fill_pathname_slash(s, len);
|
||||
|
||||
/* png */
|
||||
strlcat(s, "png", len);
|
||||
fill_pathname_slash(s, len);
|
||||
|
||||
/* Icons path */
|
||||
strlcat(s, "icons", len);
|
||||
fill_pathname_slash(s, len);
|
||||
#else
|
||||
/* Otherwise, use large 256x256 icons */
|
||||
/* xmb */
|
||||
strlcat(s, "xmb", len);
|
||||
fill_pathname_slash(s, len);
|
||||
|
@ -316,6 +330,7 @@ void fill_pathname_application_special(char *s,
|
|||
/* Icons path */
|
||||
strlcat(s, "png", len);
|
||||
fill_pathname_slash(s, len);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
|
|
@ -127,7 +127,9 @@ static void load_modules()
|
|||
|
||||
/* USB */
|
||||
SifExecModuleBuffer(&usbd_irx, size_usbd_irx, 0, NULL, NULL);
|
||||
SifExecModuleBuffer(&usbhdfsd_irx, size_usbhdfsd_irx, 0, NULL, NULL);
|
||||
SifExecModuleBuffer(&bdm_irx, size_bdm_irx, 0, NULL, NULL);
|
||||
SifExecModuleBuffer(&bdmfs_vfat_irx, size_bdmfs_vfat_irx, 0, NULL, NULL);
|
||||
SifExecModuleBuffer(&usbmass_bd_irx, size_usbmass_bd_irx, 0, NULL, NULL);
|
||||
|
||||
#if !defined(DEBUG)
|
||||
/* CDFS */
|
||||
|
|
|
@ -1349,15 +1349,15 @@ static void frontend_unix_set_screen_brightness(int value)
|
|||
char *buffer = NULL;
|
||||
char svalue[16] = {0};
|
||||
unsigned int max_brightness = 100;
|
||||
#if !defined(HAVE_LAKKA_SWITCH)
|
||||
filestream_read_file("/sys/devices/platform/backlight/backlight/backlight/max_brightness",
|
||||
|
||||
/* Device tree should have 'label = "backlight";' if control is desirable */
|
||||
filestream_read_file("/sys/class/backlight/backlight/max_brightness",
|
||||
&buffer, NULL);
|
||||
if (buffer)
|
||||
{
|
||||
sscanf(buffer, "%u", &max_brightness);
|
||||
free(buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Calculate the brightness */
|
||||
value = (value * max_brightness) / 100;
|
||||
|
@ -1792,6 +1792,9 @@ static void frontend_unix_get_env(int *argc,
|
|||
}
|
||||
#else
|
||||
char base_path[PATH_MAX] = {0};
|
||||
#if defined(DINGUX)
|
||||
dingux_get_base_path(base_path, sizeof(base_path));
|
||||
#else
|
||||
const char *xdg = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
|
||||
|
@ -1803,14 +1806,11 @@ static void frontend_unix_get_env(int *argc,
|
|||
else if (home)
|
||||
{
|
||||
strlcpy(base_path, home, sizeof(base_path));
|
||||
#if defined(DINGUX)
|
||||
strlcat(base_path, "/.retroarch", sizeof(base_path));
|
||||
#else
|
||||
strlcat(base_path, "/.config/retroarch", sizeof(base_path));
|
||||
#endif
|
||||
}
|
||||
else
|
||||
strcpy_literal(base_path, "retroarch");
|
||||
#endif
|
||||
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], base_path,
|
||||
"cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
|
||||
|
@ -2154,10 +2154,14 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
|
|||
#else
|
||||
char base_path[PATH_MAX] = {0};
|
||||
char udisks_media_path[PATH_MAX] = {0};
|
||||
const char *xdg = getenv("XDG_CONFIG_HOME");
|
||||
const char *home = getenv("HOME");
|
||||
const char *user = getenv("USER");
|
||||
|
||||
#if defined(DINGUX)
|
||||
dingux_get_base_path(base_path, sizeof(base_path));
|
||||
#else
|
||||
const char *xdg = getenv("XDG_CONFIG_HOME");
|
||||
|
||||
if (xdg)
|
||||
{
|
||||
strlcpy(base_path, xdg, sizeof(base_path));
|
||||
|
@ -2166,12 +2170,9 @@ static int frontend_unix_parse_drive_list(void *data, bool load_content)
|
|||
else if (home)
|
||||
{
|
||||
strlcpy(base_path, home, sizeof(base_path));
|
||||
#if defined(DINGUX)
|
||||
strlcat(base_path, "/.retroarch", sizeof(base_path));
|
||||
#else
|
||||
strlcat(base_path, "/.config/retroarch", sizeof(base_path));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
strlcpy(udisks_media_path, "/run/media", sizeof(udisks_media_path));
|
||||
if (user)
|
||||
|
@ -2827,7 +2828,7 @@ frontend_ctx_driver_t frontend_ctx_unix = {
|
|||
#endif
|
||||
#if defined(HAVE_LAKKA_SWITCH) || (defined(HAVE_LAKKA) && defined(HAVE_ODROIDGO2))
|
||||
frontend_unix_set_screen_brightness,/* set_screen_brightness */
|
||||
#else
|
||||
#else
|
||||
NULL, /* set_screen_brightness */
|
||||
#endif
|
||||
frontend_unix_watch_path_for_changes,
|
||||
|
|
|
@ -199,11 +199,27 @@ static void xdg_screensaver_inhibit(Window wnd)
|
|||
{
|
||||
int ret;
|
||||
char cmd[64];
|
||||
char title[128];
|
||||
|
||||
cmd[0] = '\0';
|
||||
title[0] = '\0';
|
||||
|
||||
RARCH_LOG("[X11]: Suspending screensaver (X11, xdg-screensaver).\n");
|
||||
|
||||
if (g_x11_dpy && g_x11_win)
|
||||
{
|
||||
/* Make sure the window has a title, even if it's a bogus one, otherwise
|
||||
* xdg-screensaver will fail and report to stderr, framing RA for its bug.
|
||||
* A single space character is used so that the title bar stays visibly
|
||||
* the same, as if there's no title at all. */
|
||||
video_driver_get_window_title(title, sizeof(title));
|
||||
if (strlen(title) == 0)
|
||||
snprintf(title, sizeof(title), " ");
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, XA_WM_NAME, XA_STRING,
|
||||
8, PropModeReplace, (const unsigned char*) title,
|
||||
strlen(title));
|
||||
}
|
||||
|
||||
snprintf(cmd, sizeof(cmd), "xdg-screensaver suspend 0x%x", (int)wnd);
|
||||
|
||||
ret = system(cmd);
|
||||
|
|
|
@ -65,6 +65,10 @@
|
|||
|
||||
#define MAX_BUFFERS 2
|
||||
|
||||
#define rsx_context_bind_hw_render(rsx, enable) \
|
||||
if (rsx->shared_context_use) \
|
||||
rsx->ctx_driver->bind_hw_render(rsx->ctx_data, enable)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int height;
|
||||
|
@ -81,21 +85,20 @@ typedef struct
|
|||
float u;
|
||||
float y;
|
||||
float x;
|
||||
} gcm_scale_vector_t;
|
||||
} rsx_scale_vector_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
s16 x0, y0, x1, y1;
|
||||
s16 u0, v0, u1, v1;
|
||||
} gcm_vertex_t;
|
||||
} rsx_vertex_t;
|
||||
|
||||
typedef struct gcm_video
|
||||
{
|
||||
typedef struct {
|
||||
video_viewport_t vp;
|
||||
rsxBuffer buffers[MAX_BUFFERS];
|
||||
rsxBuffer menuBuffers[MAX_BUFFERS];
|
||||
int currentBuffer, menuBuffer;
|
||||
gcmContextData *context;
|
||||
gcmContextData* context;
|
||||
u16 width;
|
||||
u16 height;
|
||||
bool menu_frame_enable;
|
||||
|
@ -103,24 +106,62 @@ typedef struct gcm_video
|
|||
bool vsync;
|
||||
u32 depth_pitch;
|
||||
u32 depth_offset;
|
||||
u32 *depth_buffer;
|
||||
u32* depth_buffer;
|
||||
|
||||
bool smooth;
|
||||
unsigned rotation;
|
||||
bool keep_aspect;
|
||||
bool should_resize;
|
||||
bool msg_rendering_enabled;
|
||||
} gcm_video_t;
|
||||
|
||||
const shader_backend_t* shader;
|
||||
void* shader_data;
|
||||
void* renderchain_data;
|
||||
void* ctx_data;
|
||||
const gfx_ctx_driver_t* ctx_driver;
|
||||
bool shared_context_use;
|
||||
|
||||
video_info_t video_info;
|
||||
struct video_tex_info tex_info; /* unsigned int alignment */
|
||||
struct video_tex_info prev_info[GFX_MAX_TEXTURES]; /* unsigned alignment */
|
||||
struct video_fbo_rect fbo_rect[GFX_MAX_SHADERS]; /* unsigned alignment */
|
||||
} rsx_t;
|
||||
|
||||
static const gfx_ctx_driver_t* rsx_get_context(rsx_t* rsx)
|
||||
{
|
||||
const gfx_ctx_driver_t* gfx_ctx = NULL;
|
||||
void* ctx_data = NULL;
|
||||
settings_t* settings = config_get_ptr();
|
||||
struct retro_hw_render_callback* hwr = video_driver_get_hw_context();
|
||||
|
||||
bool video_shared_context = settings->bools.video_shared_context;
|
||||
enum gfx_ctx_api api = GFX_CTX_RSX_API;
|
||||
|
||||
rsx->shared_context_use = video_shared_context && hwr->context_type != RETRO_HW_CONTEXT_NONE;
|
||||
|
||||
if ((libretro_get_shared_context())
|
||||
&& (hwr->context_type != RETRO_HW_CONTEXT_NONE))
|
||||
rsx->shared_context_use = true;
|
||||
|
||||
gfx_ctx = video_context_driver_init_first(rsx,
|
||||
settings->arrays.video_context_driver,
|
||||
api, 1, 0, rsx->shared_context_use, &ctx_data);
|
||||
|
||||
if (ctx_data)
|
||||
rsx->ctx_data = ctx_data;
|
||||
|
||||
return gfx_ctx;
|
||||
}
|
||||
|
||||
#ifndef HAVE_THREADS
|
||||
static bool gcm_tasks_finder(retro_task_t *task,void *userdata)
|
||||
static bool rsx_tasks_finder(retro_task_t *task,void *userdata)
|
||||
{
|
||||
return task;
|
||||
}
|
||||
task_finder_data_t gcm_tasks_finder_data = {gcm_tasks_finder, NULL};
|
||||
task_finder_data_t rsx_tasks_finder_data = {rsx_tasks_finder, NULL};
|
||||
#endif
|
||||
|
||||
static int gcm_make_buffer(rsxBuffer * buffer, u16 width, u16 height, int id)
|
||||
static int rsx_make_buffer(rsxBuffer * buffer, u16 width, u16 height, int id)
|
||||
{
|
||||
int depth = sizeof(u32);
|
||||
int pitch = depth * width;
|
||||
|
@ -150,7 +191,7 @@ error:
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static int gcm_flip(gcmContextData *context, s32 buffer)
|
||||
static int rsx_flip(gcmContextData *context, s32 buffer)
|
||||
{
|
||||
if (gcmSetFlip(context, buffer) == 0)
|
||||
{
|
||||
|
@ -165,16 +206,16 @@ static int gcm_flip(gcmContextData *context, s32 buffer)
|
|||
|
||||
#define GCM_LABEL_INDEX 255
|
||||
|
||||
static void gcm_wait_rsx_idle(gcmContextData *context);
|
||||
static void rsx_wait_rsx_idle(gcmContextData *context);
|
||||
|
||||
static void gcm_wait_flip(void)
|
||||
static void rsx_wait_flip(void)
|
||||
{
|
||||
while (gcmGetFlipStatus() != 0)
|
||||
usleep (200); /* Sleep, to not stress the cpu. */
|
||||
gcmResetFlipStatus();
|
||||
}
|
||||
|
||||
static gcmContextData *gcm_init_screen(gcm_video_t* gcm)
|
||||
static gcmContextData *rsx_init_screen(rsx_t* gcm)
|
||||
{
|
||||
/* Context to keep track of the RSX buffer. */
|
||||
gcmContextData *context = NULL;
|
||||
|
@ -230,7 +271,7 @@ static gcmContextData *gcm_init_screen(gcm_video_t* gcm)
|
|||
gcm->width = res.width;
|
||||
gcm->height = res.height;
|
||||
|
||||
gcm_wait_rsx_idle(context);
|
||||
rsx_wait_rsx_idle(context);
|
||||
|
||||
if (videoConfigure (0, &vconfig, NULL, 0) != 0)
|
||||
goto error;
|
||||
|
@ -241,7 +282,8 @@ static gcmContextData *gcm_init_screen(gcm_video_t* gcm)
|
|||
gcmSetFlipMode (GCM_FLIP_VSYNC); /* Wait for VSYNC to flip */
|
||||
|
||||
gcm->depth_pitch = res.width * sizeof(u32);
|
||||
gcm->depth_buffer = (u32 *) rsxMemalign (64, (res.height * gcm->depth_pitch)* 2);
|
||||
gcm->depth_buffer = (u32 *) rsxMemalign (64, (res.height * gcm->depth_pitch)); //Beware, if was (res.height * gcm->depth_pitch)*2
|
||||
|
||||
rsxAddressToOffset (gcm->depth_buffer, &gcm->depth_offset);
|
||||
|
||||
gcmResetFlipStatus();
|
||||
|
@ -273,7 +315,7 @@ static void waitFinish(gcmContextData *context, u32 sLabelVal)
|
|||
sLabelVal++;
|
||||
}
|
||||
|
||||
static void gcm_wait_rsx_idle(gcmContextData *context)
|
||||
static void rsx_wait_rsx_idle(gcmContextData *context)
|
||||
{
|
||||
u32 sLabelVal = 1;
|
||||
|
||||
|
@ -285,35 +327,43 @@ static void gcm_wait_rsx_idle(gcmContextData *context)
|
|||
waitFinish(context, sLabelVal);
|
||||
}
|
||||
|
||||
static void* gcm_init(const video_info_t* video,
|
||||
static void* rsx_init(const video_info_t* video,
|
||||
input_driver_t** input, void** input_data)
|
||||
{
|
||||
int i;
|
||||
gcm_video_t* gcm = malloc(sizeof(gcm_video_t));
|
||||
rsx_t* rsx = malloc(sizeof(rsx_t));
|
||||
|
||||
if (!gcm)
|
||||
if (!rsx)
|
||||
return NULL;
|
||||
|
||||
memset(gcm, 0, sizeof(gcm_video_t));
|
||||
memset(rsx, 0, sizeof(rsx_t));
|
||||
|
||||
gcm->context = gcm_init_screen(gcm);
|
||||
rsx->context = rsx_init_screen(rsx);
|
||||
const gfx_ctx_driver_t* ctx_driver = rsx_get_context(rsx);
|
||||
|
||||
if (!ctx_driver)
|
||||
return NULL;
|
||||
|
||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||
rsx->ctx_driver = ctx_driver;
|
||||
rsx->video_info = *video;
|
||||
|
||||
for (i = 0; i < MAX_BUFFERS; i++)
|
||||
gcm_make_buffer(&gcm->buffers[i], gcm->width, gcm->height, i);
|
||||
rsx_make_buffer(&rsx->buffers[i], rsx->width, rsx->height, i);
|
||||
|
||||
for (i = 0; i < MAX_BUFFERS; i++)
|
||||
gcm_make_buffer(&gcm->menuBuffers[i], gcm->width, gcm->height, i + MAX_BUFFERS);
|
||||
rsx_make_buffer(&rsx->menuBuffers[i], rsx->width, rsx->height, i + MAX_BUFFERS);
|
||||
|
||||
gcm_flip(gcm->context, MAX_BUFFERS - 1);
|
||||
rsx_flip(rsx->context, MAX_BUFFERS - 1);
|
||||
|
||||
gcm->vp.x = 0;
|
||||
gcm->vp.y = 0;
|
||||
gcm->vp.width = gcm->width;
|
||||
gcm->vp.height = gcm->height;
|
||||
gcm->vp.full_width = gcm->width;
|
||||
gcm->vp.full_height = gcm->height;
|
||||
gcm->rgb32 = video->rgb32;
|
||||
video_driver_set_size(gcm->vp.width, gcm->vp.height);
|
||||
rsx->vp.x = 0;
|
||||
rsx->vp.y = 0;
|
||||
rsx->vp.width = rsx->width;
|
||||
rsx->vp.height = rsx->height;
|
||||
rsx->vp.full_width = rsx->width;
|
||||
rsx->vp.full_height = rsx->height;
|
||||
rsx->rgb32 = video->rgb32;
|
||||
video_driver_set_size(rsx->vp.width, rsx->vp.height);
|
||||
|
||||
if (input && input_data)
|
||||
{
|
||||
|
@ -322,17 +372,19 @@ static void* gcm_init(const video_info_t* video,
|
|||
*input_data = ps3input;
|
||||
}
|
||||
|
||||
return gcm;
|
||||
rsx_context_bind_hw_render(rsx, true);
|
||||
|
||||
return rsx;
|
||||
}
|
||||
|
||||
static void gcm_fill_black(uint32_t *dst, uint32_t *dst_end, size_t sz)
|
||||
static void rsx_fill_black(uint32_t *dst, uint32_t *dst_end, size_t sz)
|
||||
{
|
||||
if (sz > dst_end - dst)
|
||||
sz = dst_end - dst;
|
||||
memset (dst, 0, sz * 4);
|
||||
}
|
||||
|
||||
static void gcm_blit_buffer(
|
||||
static void rsx_blit_buffer(
|
||||
rsxBuffer *buffer, const void *frame, unsigned width,
|
||||
unsigned height, unsigned pitch, int rgb32, bool do_scaling)
|
||||
{
|
||||
|
@ -379,7 +431,7 @@ static void gcm_blit_buffer(
|
|||
for (i = 0; i < height; i++)
|
||||
{
|
||||
memcpy(dst, src, width * 4);
|
||||
gcm_fill_black(dst + width, dst_end, buffer->width - width);
|
||||
rsx_fill_black(dst + width, dst_end, buffer->width - width);
|
||||
dst += buffer->width;
|
||||
src += pitch;
|
||||
}
|
||||
|
@ -397,7 +449,7 @@ static void gcm_blit_buffer(
|
|||
u8 b = ((rgb565 << 3) & 0xfc);
|
||||
*dst = (r<<16) | (g<<8) | b;
|
||||
}
|
||||
gcm_fill_black(dst, dst_end, buffer->width - width);
|
||||
rsx_fill_black(dst, dst_end, buffer->width - width);
|
||||
|
||||
dst += buffer->width - width;
|
||||
src += pitch / 2 - width;
|
||||
|
@ -419,7 +471,7 @@ static void gcm_blit_buffer(
|
|||
dst[l * buffer->width] = c;
|
||||
}
|
||||
for (int l = 0; l < scale; l++)
|
||||
gcm_fill_black(dst + l * buffer->width, dst_end, buffer->width - width * scale);
|
||||
rsx_fill_black(dst + l * buffer->width, dst_end, buffer->width - width * scale);
|
||||
|
||||
dst += buffer->width * scale - width * scale;
|
||||
src += pitch / 4 - width;
|
||||
|
@ -440,7 +492,7 @@ static void gcm_blit_buffer(
|
|||
dst[l * buffer->width] = c;
|
||||
}
|
||||
for (int l = 0; l < scale; l++)
|
||||
gcm_fill_black(dst + l * buffer->width, dst_end, buffer->width - width * scale);
|
||||
rsx_fill_black(dst + l * buffer->width, dst_end, buffer->width - width * scale);
|
||||
|
||||
dst += buffer->width * scale - width * scale;
|
||||
src += pitch / 2 - width;
|
||||
|
@ -452,25 +504,25 @@ static void gcm_blit_buffer(
|
|||
memset(dst, 0, 4 * (dst_end - dst));
|
||||
}
|
||||
|
||||
static void gcm_update_screen(gcm_video_t *gcm)
|
||||
static void rsx_update_screen(rsx_t* gcm)
|
||||
{
|
||||
rsxBuffer *buffer = gcm->menu_frame_enable
|
||||
? &gcm->menuBuffers[gcm->menuBuffer]
|
||||
: &gcm->buffers[gcm->currentBuffer];
|
||||
gcm_flip(gcm->context, buffer->id);
|
||||
rsx_flip(gcm->context, buffer->id);
|
||||
if (gcm->vsync)
|
||||
gcm_wait_flip();
|
||||
rsx_wait_flip();
|
||||
#ifdef HAVE_SYSUTILS
|
||||
cellSysutilCheckCallback();
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool gcm_frame(void* data, const void* frame,
|
||||
static bool rsx_frame(void* data, const void* frame,
|
||||
unsigned width, unsigned height,
|
||||
uint64_t frame_count,
|
||||
unsigned pitch, const char* msg, video_frame_info_t *video_info)
|
||||
{
|
||||
gcm_video_t *gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
#ifdef HAVE_MENU
|
||||
bool statistics_show = video_info->statistics_show;
|
||||
struct font_params *osd_params = (struct font_params*)
|
||||
|
@ -482,13 +534,13 @@ static bool gcm_frame(void* data, const void* frame,
|
|||
gcm->currentBuffer++;
|
||||
if (gcm->currentBuffer >= MAX_BUFFERS)
|
||||
gcm->currentBuffer = 0;
|
||||
gcm_blit_buffer(
|
||||
rsx_blit_buffer(
|
||||
&gcm->buffers[gcm->currentBuffer], frame, width, height, pitch,
|
||||
gcm->rgb32, true);
|
||||
}
|
||||
|
||||
/* TODO: translucid menu */
|
||||
gcm_update_screen(gcm);
|
||||
rsx_update_screen(gcm);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -505,38 +557,38 @@ static bool gcm_frame(void* data, const void* frame,
|
|||
return true;
|
||||
}
|
||||
|
||||
static void gcm_set_nonblock_state(void* data, bool toggle,
|
||||
static void rsx_set_nonblock_state(void* data, bool toggle,
|
||||
bool a, unsigned b)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (gcm)
|
||||
gcm->vsync = !toggle;
|
||||
}
|
||||
|
||||
static bool gcm_alive(void* data)
|
||||
static bool rsx_alive(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gcm_focus(void* data)
|
||||
static bool rsx_focus(void* data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool gcm_suppress_screensaver(void* data, bool enable)
|
||||
static bool rsx_suppress_screensaver(void* data, bool enable)
|
||||
{
|
||||
(void)data;
|
||||
(void)enable;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gcm_free(void* data)
|
||||
static void rsx_free(void* data)
|
||||
{
|
||||
int i;
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (!gcm)
|
||||
return;
|
||||
|
@ -554,38 +606,38 @@ static void gcm_free(void* data)
|
|||
free (gcm);
|
||||
}
|
||||
|
||||
static void gcm_set_texture_frame(void* data, const void* frame, bool rgb32,
|
||||
static void rsx_set_texture_frame(void* data, const void* frame, bool rgb32,
|
||||
unsigned width, unsigned height, float alpha)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
int newBuffer = gcm->menuBuffer + 1;
|
||||
|
||||
if (newBuffer >= MAX_BUFFERS)
|
||||
newBuffer = 0;
|
||||
|
||||
/* TODO: respect alpha */
|
||||
gcm_blit_buffer(&gcm->menuBuffers[newBuffer], frame, width, height,
|
||||
rsx_blit_buffer(&gcm->menuBuffers[newBuffer], frame, width, height,
|
||||
width * (rgb32 ? 4 : 2), rgb32, true);
|
||||
gcm->menuBuffer = newBuffer;
|
||||
|
||||
gcm_update_screen(gcm);
|
||||
rsx_update_screen(gcm);
|
||||
}
|
||||
|
||||
static void gcm_set_texture_enable(void* data, bool state, bool full_screen)
|
||||
static void rsx_set_texture_enable(void* data, bool state, bool full_screen)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (!gcm)
|
||||
return;
|
||||
|
||||
gcm->menu_frame_enable = state;
|
||||
|
||||
gcm_update_screen(gcm);
|
||||
rsx_update_screen(gcm);
|
||||
}
|
||||
|
||||
static void gcm_set_rotation(void* data, unsigned rotation)
|
||||
static void rsx_set_rotation(void* data, unsigned rotation)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (!gcm)
|
||||
return;
|
||||
|
@ -593,17 +645,17 @@ static void gcm_set_rotation(void* data, unsigned rotation)
|
|||
gcm->rotation = rotation;
|
||||
gcm->should_resize = true;
|
||||
}
|
||||
static void gcm_set_filtering(void* data, unsigned index, bool smooth)
|
||||
static void rsx_set_filtering(void* data, unsigned index, bool smooth)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (gcm)
|
||||
gcm->smooth = smooth;
|
||||
}
|
||||
|
||||
static void gcm_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
||||
static void rsx_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
||||
{
|
||||
gcm_video_t *gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if(!gcm)
|
||||
return;
|
||||
|
@ -612,58 +664,58 @@ static void gcm_set_aspect_ratio(void* data, unsigned aspect_ratio_idx)
|
|||
gcm->should_resize = true;
|
||||
}
|
||||
|
||||
static void gcm_apply_state_changes(void* data)
|
||||
static void rsx_apply_state_changes(void* data)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (gcm)
|
||||
gcm->should_resize = true;
|
||||
|
||||
}
|
||||
|
||||
static void gcm_viewport_info(void* data, struct video_viewport* vp)
|
||||
static void rsx_viewport_info(void* data, struct video_viewport* vp)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (gcm)
|
||||
*vp = gcm->vp;
|
||||
}
|
||||
|
||||
static void gcm_set_osd_msg(void *data,
|
||||
static void rsx_set_osd_msg(void *data,
|
||||
video_frame_info_t *video_info,
|
||||
const char *msg,
|
||||
const void *params, void *font)
|
||||
{
|
||||
gcm_video_t* gcm = (gcm_video_t*)data;
|
||||
rsx_t* gcm = (rsx_t*)data;
|
||||
|
||||
if (gcm && gcm->msg_rendering_enabled)
|
||||
font_driver_render_msg(data, msg, params, font);
|
||||
}
|
||||
|
||||
static uint32_t gcm_get_flags(void *data)
|
||||
static uint32_t rsx_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static const video_poke_interface_t gcm_poke_interface = {
|
||||
gcm_get_flags,
|
||||
static const video_poke_interface_t rsx_poke_interface = {
|
||||
rsx_get_flags,
|
||||
NULL, /* load_texture */
|
||||
NULL, /* unload_texture */
|
||||
NULL,
|
||||
NULL,
|
||||
gcm_set_filtering,
|
||||
rsx_set_filtering,
|
||||
NULL, /* get_video_output_size */
|
||||
NULL, /* get_video_output_prev */
|
||||
NULL, /* get_video_output_next */
|
||||
NULL, /* get_current_framebuffer */
|
||||
NULL,
|
||||
gcm_set_aspect_ratio,
|
||||
gcm_apply_state_changes,
|
||||
gcm_set_texture_frame,
|
||||
gcm_set_texture_enable,
|
||||
gcm_set_osd_msg,
|
||||
rsx_set_aspect_ratio,
|
||||
rsx_apply_state_changes,
|
||||
rsx_set_texture_frame,
|
||||
rsx_set_texture_enable,
|
||||
rsx_set_osd_msg,
|
||||
NULL, /* show_mouse */
|
||||
NULL, /* grab_mouse_toggle */
|
||||
NULL, /* get_current_shader */
|
||||
|
@ -671,14 +723,14 @@ static const video_poke_interface_t gcm_poke_interface = {
|
|||
NULL /* get_hw_render_interface */
|
||||
};
|
||||
|
||||
static void gcm_get_poke_interface(void* data,
|
||||
static void rsx_get_poke_interface(void* data,
|
||||
const video_poke_interface_t** iface)
|
||||
{
|
||||
(void)data;
|
||||
*iface = &gcm_poke_interface;
|
||||
*iface = &rsx_poke_interface;
|
||||
}
|
||||
|
||||
static bool gcm_set_shader(void* data,
|
||||
static bool rsx_set_shader(void* data,
|
||||
enum rarch_shader_type type, const char* path)
|
||||
{
|
||||
(void)data;
|
||||
|
@ -690,19 +742,19 @@ static bool gcm_set_shader(void* data,
|
|||
|
||||
video_driver_t video_gcm =
|
||||
{
|
||||
gcm_init,
|
||||
gcm_frame,
|
||||
gcm_set_nonblock_state,
|
||||
gcm_alive,
|
||||
gcm_focus,
|
||||
gcm_suppress_screensaver,
|
||||
rsx_init,
|
||||
rsx_frame,
|
||||
rsx_set_nonblock_state,
|
||||
rsx_alive,
|
||||
rsx_focus,
|
||||
rsx_suppress_screensaver,
|
||||
NULL, /* has_windowed */
|
||||
gcm_set_shader,
|
||||
gcm_free,
|
||||
"gcm",
|
||||
rsx_set_shader,
|
||||
rsx_free,
|
||||
"rsx",
|
||||
NULL, /* set_viewport */
|
||||
gcm_set_rotation,
|
||||
gcm_viewport_info,
|
||||
rsx_set_rotation,
|
||||
rsx_viewport_info,
|
||||
NULL, /* read_viewport */
|
||||
NULL, /* read_frame_raw */
|
||||
#ifdef HAVE_OVERLAY
|
||||
|
@ -711,5 +763,5 @@ video_driver_t video_gcm =
|
|||
#ifdef HAVE_VIDEO_LAYOUT
|
||||
NULL,
|
||||
#endif
|
||||
gcm_get_poke_interface
|
||||
rsx_get_poke_interface
|
||||
};
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
* Copyright (C) 2011-2017 - Higor Euripedes
|
||||
* Copyright (C) 2019-2021 - James Leaver
|
||||
*
|
||||
* 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-
|
||||
|
@ -580,6 +581,12 @@ static void sdl_dingux_sanitize_frame_dimensions(
|
|||
/* GB/GBC/GG (x3) @ 480x432 */
|
||||
else if ((width == 480) && (height == 432))
|
||||
*sanitized_width = 496;
|
||||
/* SNES/Genesis @ 256x224 */
|
||||
else if ((width == 256) && (height == 224))
|
||||
*sanitized_width = 288;
|
||||
/* SNES/Genesis (x2) @ 512x448 */
|
||||
else if ((width == 512) && (height == 448))
|
||||
*sanitized_width = 560;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -761,7 +768,13 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame,
|
|||
{
|
||||
sdl_dingux_video_t* vid = (sdl_dingux_video_t*)data;
|
||||
|
||||
if (unlikely(!vid))
|
||||
/* Return early if:
|
||||
* - Input sdl_dingux_video_t struct is NULL
|
||||
* (cannot realistically happen)
|
||||
* - Menu is inactive and input 'content' frame
|
||||
* data is NULL (may happen when e.g. a running
|
||||
* core skips a frame) */
|
||||
if (unlikely(!vid || (!frame && !vid->menu_active)))
|
||||
return true;
|
||||
|
||||
/* If fast forward is currently active, we may
|
||||
|
@ -805,16 +818,13 @@ static bool sdl_dingux_gfx_frame(void *data, const void *frame,
|
|||
|
||||
if (likely(vid->mode_valid))
|
||||
{
|
||||
if (likely(frame))
|
||||
{
|
||||
/* Blit frame to SDL surface */
|
||||
if (vid->rgb32)
|
||||
sdl_dingux_blit_frame32(vid, (uint32_t*)frame,
|
||||
width, height, pitch);
|
||||
else
|
||||
sdl_dingux_blit_frame16(vid, (uint16_t*)frame,
|
||||
width, height, pitch);
|
||||
}
|
||||
/* Blit frame to SDL surface */
|
||||
if (vid->rgb32)
|
||||
sdl_dingux_blit_frame32(vid, (uint32_t*)frame,
|
||||
width, height, pitch);
|
||||
else
|
||||
sdl_dingux_blit_frame16(vid, (uint16_t*)frame,
|
||||
width, height, pitch);
|
||||
}
|
||||
/* If current display mode is invalid,
|
||||
* just display an error message */
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,351 @@
|
|||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* 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 <stdint.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../retroarch.h"
|
||||
#include "../../verbosity.h"
|
||||
#include <defines/ps3_defines.h>
|
||||
#include "../../frontend/frontend_driver.h"
|
||||
#include <rsx/rsx.h>
|
||||
|
||||
typedef struct gfx_ctx_psl1ght_data
|
||||
{
|
||||
#if defined(HAVE_PSGL)
|
||||
PSGLdevice* gl_device;
|
||||
PSGLcontext* gl_context;
|
||||
#else
|
||||
gcmContextData *rx_context;
|
||||
#endif
|
||||
} gfx_ctx_psl1ght_data_t;
|
||||
|
||||
/* TODO/FIXME - static global */
|
||||
static enum gfx_ctx_api ps3_api = GFX_CTX_RSX_API;
|
||||
|
||||
static void gfx_ctx_psl1ght_get_resolution(unsigned idx,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
CellVideoOutResolution resolution;
|
||||
cellVideoOutGetResolution(idx, &resolution);
|
||||
|
||||
*width = resolution.width;
|
||||
*height = resolution.height;
|
||||
}
|
||||
|
||||
static float gfx_ctx_psl1ght_get_aspect_ratio(void *data)
|
||||
{
|
||||
CellVideoOutState videoState;
|
||||
|
||||
cellVideoOutGetState(CELL_VIDEO_OUT_PRIMARY, 0, &videoState);
|
||||
|
||||
switch (videoState.displayMode.aspect)
|
||||
{
|
||||
case CELL_VIDEO_OUT_ASPECT_4_3:
|
||||
return 4.0f/3.0f;
|
||||
case CELL_VIDEO_OUT_ASPECT_16_9:
|
||||
break;
|
||||
}
|
||||
|
||||
return 16.0f/9.0f;
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_get_available_resolutions(void)
|
||||
{
|
||||
unsigned i;
|
||||
uint32_t videomode[] = {
|
||||
CELL_VIDEO_OUT_RESOLUTION_480,
|
||||
CELL_VIDEO_OUT_RESOLUTION_576,
|
||||
CELL_VIDEO_OUT_RESOLUTION_960x1080,
|
||||
CELL_VIDEO_OUT_RESOLUTION_720,
|
||||
CELL_VIDEO_OUT_RESOLUTION_1280x1080,
|
||||
CELL_VIDEO_OUT_RESOLUTION_1440x1080,
|
||||
CELL_VIDEO_OUT_RESOLUTION_1600x1080,
|
||||
CELL_VIDEO_OUT_RESOLUTION_1080
|
||||
};
|
||||
uint32_t resolution_count = 0;
|
||||
bool defaultresolution = true;
|
||||
uint16_t num_videomodes = sizeof(videomode) / sizeof(uint32_t);
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (global->console.screen.resolutions.check)
|
||||
return;
|
||||
|
||||
for (i = 0; i < num_videomodes; i++)
|
||||
{
|
||||
if (cellVideoOutGetResolutionAvailability(
|
||||
CELL_VIDEO_OUT_PRIMARY, videomode[i],
|
||||
CELL_VIDEO_OUT_ASPECT_AUTO, 0))
|
||||
resolution_count++;
|
||||
}
|
||||
|
||||
global->console.screen.resolutions.count = 0;
|
||||
global->console.screen.resolutions.list =
|
||||
malloc(resolution_count * sizeof(uint32_t));
|
||||
|
||||
for (i = 0; i < num_videomodes; i++)
|
||||
{
|
||||
if (cellVideoOutGetResolutionAvailability(
|
||||
CELL_VIDEO_OUT_PRIMARY,
|
||||
videomode[i],
|
||||
CELL_VIDEO_OUT_ASPECT_AUTO, 0))
|
||||
{
|
||||
global->console.screen.resolutions.list[
|
||||
global->console.screen.resolutions.count++] = videomode[i];
|
||||
global->console.screen.resolutions.initial.id = videomode[i];
|
||||
|
||||
if (global->console.screen.resolutions.current.id == videomode[i])
|
||||
{
|
||||
defaultresolution = false;
|
||||
global->console.screen.resolutions.current.idx =
|
||||
global->console.screen.resolutions.count-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* In case we didn't specify a resolution -
|
||||
* make the last resolution
|
||||
that was added to the list (the highest resolution)
|
||||
the default resolution */
|
||||
if (global->console.screen.resolutions.current.id > num_videomodes || defaultresolution)
|
||||
{
|
||||
global->console.screen.resolutions.current.idx = resolution_count - 1;
|
||||
global->console.screen.resolutions.current.id = global->console.screen.resolutions.list[global->console.screen.resolutions.current.idx];
|
||||
}
|
||||
|
||||
global->console.screen.resolutions.check = true;
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_set_swap_interval(void *data, int interval)
|
||||
{
|
||||
#if defined(HAVE_PSGL)
|
||||
if (interval == 1)
|
||||
glEnable(GL_VSYNC_SCE);
|
||||
else
|
||||
glDisable(GL_VSYNC_SCE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_check_window(void *data, bool *quit,
|
||||
bool *resize, unsigned *width, unsigned *height)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static bool gfx_ctx_psl1ght_has_focus(void *data) { return true; }
|
||||
static bool gfx_ctx_psl1ght_suppress_screensaver(void *data, bool enable) { return false; }
|
||||
|
||||
static void gfx_ctx_psl1ght_swap_buffers(void *data)
|
||||
{
|
||||
#ifdef HAVE_PSGL
|
||||
psglSwap();
|
||||
#endif
|
||||
#ifdef HAVE_SYSUTILS
|
||||
cellSysutilCheckCallback();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_get_video_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
gfx_ctx_psl1ght_data_t *psl1ght = (gfx_ctx_psl1ght_data_t*)data;
|
||||
|
||||
#if defined(HAVE_PSGL)
|
||||
if (psl1ght)
|
||||
psglGetDeviceDimensions(ps3->gl_device, width, height);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *gfx_ctx_psl1ght_init(void *video_driver)
|
||||
{
|
||||
printf("gfx_ctx_psl1ght_init: %p\n", video_driver);
|
||||
global_t *global = global_get_ptr();
|
||||
gfx_ctx_psl1ght_data_t *psl1ght = (gfx_ctx_psl1ght_data_t*)
|
||||
calloc(1, sizeof(gfx_ctx_psl1ght_data_t));
|
||||
|
||||
if (!psl1ght)
|
||||
return NULL;
|
||||
|
||||
|
||||
|
||||
global->console.screen.pal_enable =
|
||||
cellVideoOutGetResolutionAvailability(
|
||||
CELL_VIDEO_OUT_PRIMARY, CELL_VIDEO_OUT_RESOLUTION_576,
|
||||
CELL_VIDEO_OUT_ASPECT_AUTO, 0);
|
||||
|
||||
gfx_ctx_psl1ght_get_available_resolutions();
|
||||
|
||||
return psl1ght;
|
||||
}
|
||||
|
||||
static bool gfx_ctx_psl1ght_set_video_mode(void *data,
|
||||
unsigned width, unsigned height,
|
||||
bool fullscreen) { return true; }
|
||||
|
||||
static void gfx_ctx_psl1ght_destroy_resources(gfx_ctx_psl1ght_data_t *ps3)
|
||||
{
|
||||
if (!ps3)
|
||||
return;
|
||||
|
||||
#if defined(HAVE_PSGL)
|
||||
psglDestroyContext(ps3->gl_context);
|
||||
psglDestroyDevice(ps3->gl_device);
|
||||
|
||||
psglExit();
|
||||
#endif
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_destroy(void *data)
|
||||
{
|
||||
gfx_ctx_psl1ght_data_t *ps3 = (gfx_ctx_psl1ght_data_t*)data;
|
||||
|
||||
if (!ps3)
|
||||
return;
|
||||
|
||||
gfx_ctx_psl1ght_destroy_resources(ps3);
|
||||
free(data);
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_input_driver(void *data,
|
||||
const char *joypad_name,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
void *ps3input = input_driver_init_wrap(&input_ps3, joypad_name);
|
||||
|
||||
*input = ps3input ? &input_ps3 : NULL;
|
||||
*input_data = ps3input;
|
||||
}
|
||||
|
||||
static enum gfx_ctx_api gfx_ctx_psl1ght_get_api(void *data) { return ps3_api; }
|
||||
|
||||
static bool gfx_ctx_psl1ght_bind_api(void *data,
|
||||
enum gfx_ctx_api api, unsigned major, unsigned minor)
|
||||
{
|
||||
ps3_api = api;
|
||||
|
||||
if (api == GFX_CTX_RSX_API)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_get_video_output_size(void *data,
|
||||
unsigned *width, unsigned *height)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!global)
|
||||
return;
|
||||
|
||||
gfx_ctx_psl1ght_get_resolution(global->console.screen.resolutions.current.id,
|
||||
width, height);
|
||||
|
||||
if (*width == 720 && *height == 576)
|
||||
{
|
||||
if (global->console.screen.pal_enable)
|
||||
global->console.screen.pal60_enable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
global->console.screen.pal_enable = false;
|
||||
global->console.screen.pal60_enable = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_get_video_output_prev(void *data)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!global)
|
||||
return;
|
||||
|
||||
if (global->console.screen.resolutions.current.idx)
|
||||
{
|
||||
global->console.screen.resolutions.current.idx--;
|
||||
global->console.screen.resolutions.current.id =
|
||||
global->console.screen.resolutions.list
|
||||
[global->console.screen.resolutions.current.idx];
|
||||
}
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_get_video_output_next(void *data)
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
if (!global)
|
||||
return;
|
||||
|
||||
if (global->console.screen.resolutions.current.idx + 1 <
|
||||
global->console.screen.resolutions.count)
|
||||
{
|
||||
global->console.screen.resolutions.current.idx++;
|
||||
global->console.screen.resolutions.current.id =
|
||||
global->console.screen.resolutions.list
|
||||
[global->console.screen.resolutions.current.idx];
|
||||
}
|
||||
}
|
||||
|
||||
static uint32_t gfx_ctx_psl1ght_get_flags(void *data)
|
||||
{
|
||||
uint32_t flags = 0;
|
||||
|
||||
#ifdef HAVE_CG
|
||||
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_CG);
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static void gfx_ctx_psl1ght_set_flags(void *data, uint32_t flags) { }
|
||||
|
||||
const gfx_ctx_driver_t gfx_ctx_psl1ght = {
|
||||
gfx_ctx_psl1ght_init,
|
||||
gfx_ctx_psl1ght_destroy,
|
||||
gfx_ctx_psl1ght_get_api,
|
||||
gfx_ctx_psl1ght_bind_api,
|
||||
gfx_ctx_psl1ght_set_swap_interval,
|
||||
gfx_ctx_psl1ght_set_video_mode,
|
||||
gfx_ctx_psl1ght_get_video_size,
|
||||
NULL, /* get_refresh_rate */
|
||||
gfx_ctx_psl1ght_get_video_output_size,
|
||||
gfx_ctx_psl1ght_get_video_output_prev,
|
||||
gfx_ctx_psl1ght_get_video_output_next,
|
||||
NULL, /* get_metrics */
|
||||
NULL,
|
||||
NULL, /* update_title */
|
||||
gfx_ctx_psl1ght_check_window,
|
||||
NULL, /* set_resize */
|
||||
gfx_ctx_psl1ght_has_focus,
|
||||
gfx_ctx_psl1ght_suppress_screensaver,
|
||||
false, /* has_windowed */
|
||||
gfx_ctx_psl1ght_swap_buffers,
|
||||
gfx_ctx_psl1ght_input_driver,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"psl1ght",
|
||||
gfx_ctx_psl1ght_get_flags,
|
||||
gfx_ctx_psl1ght_set_flags,
|
||||
NULL,
|
||||
NULL
|
||||
};
|
|
@ -283,7 +283,7 @@ static void gfx_display_wiiu_scissor_begin(
|
|||
int x, int y,
|
||||
unsigned width, unsigned height)
|
||||
{
|
||||
GX2SetScissor(MAX(x, 0), MAX(video_height - y - height, 0), MIN(width, video_width), MIN(height, video_height));
|
||||
GX2SetScissor(MAX(x, 0), MAX(y, 0), MIN(width, video_width), MIN(height, video_height));
|
||||
}
|
||||
|
||||
static void gfx_display_wiiu_scissor_end(
|
||||
|
|
|
@ -65,7 +65,7 @@ static void* wiiu_font_init_font(void* data, const char* font_path,
|
|||
font->texture.viewNumSlices = 1;
|
||||
|
||||
font->texture.surface.format = GX2_SURFACE_FORMAT_UNORM_R8;
|
||||
font->texture.compMap = GX2_COMP_SEL(_R, _R, _R, _R);
|
||||
font->texture.compMap = GX2_COMP_SEL(_1, _1, _1, _R);
|
||||
|
||||
GX2CalcSurfaceSizeAndAlignment(&font->texture.surface);
|
||||
GX2InitTextureRegs(&font->texture);
|
||||
|
@ -258,7 +258,7 @@ static void wiiu_font_render_message(
|
|||
return;
|
||||
}
|
||||
|
||||
line_height = scale / line_metrics->height;
|
||||
line_height = line_metrics->height * scale / wiiu->vp.height;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
|
|
@ -1037,9 +1037,15 @@ void gfx_widgets_iterate(
|
|||
{
|
||||
size_t i;
|
||||
dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data;
|
||||
/* Check whether screen dimensions or menu scale
|
||||
* factor have changed */
|
||||
float scale_factor = 0.0f;
|
||||
/* c.f. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
||||
* On some platforms (e.g. 32-bit x86 without SSE),
|
||||
* gcc can produce inconsistent floating point results
|
||||
* depending upon optimisation level. This can break
|
||||
* floating point variable comparisons. A workaround is
|
||||
* to declare the affected variable as 'volatile', which
|
||||
* disables optimisations and removes excess precision
|
||||
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c87) */
|
||||
volatile float scale_factor = 0.0f;
|
||||
gfx_display_t *p_disp = (gfx_display_t*)data_disp;
|
||||
settings_t *settings = (settings_t*)settings_data;
|
||||
#ifdef HAVE_XMB
|
||||
|
@ -1051,6 +1057,8 @@ void gfx_widgets_iterate(
|
|||
scale_factor = gfx_display_get_widget_dpi_scale(p_disp,
|
||||
settings, width, height, fullscreen);
|
||||
|
||||
/* Check whether screen dimensions or menu scale
|
||||
* factor have changed */
|
||||
if ((scale_factor != p_dispwidget->last_scale_factor) ||
|
||||
(width != p_dispwidget->last_video_width) ||
|
||||
(height != p_dispwidget->last_video_height))
|
||||
|
|
|
@ -87,36 +87,45 @@ static void crt_aspect_ratio_switch(
|
|||
videocrt_switch_t *p_switch,
|
||||
unsigned width, unsigned height, unsigned srm_width, unsigned srm_height)
|
||||
{
|
||||
|
||||
/* send aspect float to video_driver */
|
||||
RARCH_LOG("[CRT]: Setting Video Screen Size to: %dx%d \n", width, height);
|
||||
video_driver_set_size(srm_width , srm_height);
|
||||
video_driver_set_viewport(srm_width , srm_height,1,1);
|
||||
|
||||
p_switch->fly_aspect = (float)width / (float)height;
|
||||
video_driver_set_aspect_ratio_value((float)p_switch->fly_aspect);
|
||||
RARCH_LOG("[CRT]: Setting Aspect Ratio: %f \n", (float)p_switch->fly_aspect);
|
||||
|
||||
RARCH_LOG("[CRT]: Setting Video Screen Size to: %dx%d \n", width, height);
|
||||
video_driver_set_size(width , height);
|
||||
video_driver_set_viewport(width , height,1,1);
|
||||
|
||||
video_driver_apply_state_changes();
|
||||
|
||||
}
|
||||
|
||||
static void set_aspect(videocrt_switch_t *p_switch, unsigned int width,
|
||||
unsigned int height, unsigned int srm_width, unsigned srm_height,
|
||||
unsigned int srm_xscale, unsigned srm_yscale)
|
||||
unsigned int srm_xscale, unsigned srm_yscale, bool srm_isstretched )
|
||||
{
|
||||
unsigned int patched_width = 0;
|
||||
unsigned int patched_height = 0;
|
||||
int scaled_width = 0;
|
||||
int scaled_height = 0;
|
||||
/* used to fix aspect shoule SR not find a resolution */
|
||||
|
||||
/* used to fix aspect should SR not find a resolution */
|
||||
if (srm_width == 0)
|
||||
{
|
||||
video_driver_get_size(&patched_width, &patched_height);
|
||||
srm_xscale = 1;
|
||||
srm_yscale = 1;
|
||||
}else{
|
||||
/* use native values as we will be multiplying by srm scale later. */
|
||||
patched_width = width;
|
||||
patched_height = height;
|
||||
}
|
||||
if (srm_isstretched && srm_width > 0)
|
||||
{
|
||||
srm_xscale = srm_width/width;
|
||||
srm_yscale = srm_height/height;
|
||||
}
|
||||
|
||||
scaled_width = roundf(patched_width*srm_xscale);
|
||||
scaled_height = roundf(patched_height*srm_yscale);
|
||||
|
||||
|
@ -127,22 +136,19 @@ static bool crt_sr2_init(videocrt_switch_t *p_switch, int monitor_index, unsigne
|
|||
{
|
||||
const char* err_msg;
|
||||
char* mode;
|
||||
char index = 0;
|
||||
char mindex[1];
|
||||
char index[10];
|
||||
|
||||
|
||||
if (monitor_index+1 >= 0 && monitor_index+1 < 10)
|
||||
index = monitor_index+48;
|
||||
sprintf(index, "%d", monitor_index);
|
||||
else
|
||||
index = '0';
|
||||
|
||||
mindex[0] = index;
|
||||
sprintf(index, "%s", "0");
|
||||
|
||||
if (!p_switch->sr2_active)
|
||||
{
|
||||
|
||||
RARCH_LOG("[CRT]: SR init \n");
|
||||
|
||||
|
||||
sr_init();
|
||||
#if (__STDC_VERSION__ >= 199409L) /* no logs for C98 or less */
|
||||
sr_set_log_callback_info(RARCH_LOG);
|
||||
|
@ -167,23 +173,22 @@ static bool crt_sr2_init(videocrt_switch_t *p_switch, int monitor_index, unsigne
|
|||
RARCH_LOG("[CRT]: CRT Mode: %d - Selected from ini \n", crt_mode) ;
|
||||
}
|
||||
|
||||
|
||||
if (super_width >2 )
|
||||
sr_set_user_mode(super_width, 0, 0);
|
||||
|
||||
RARCH_LOG("[CRT]: SR init_disp \n");
|
||||
if (monitor_index+1 > 0)
|
||||
{
|
||||
RARCH_LOG("SRobj: RA Monitor Index: %s\n",mindex);
|
||||
p_switch->rtn = sr_init_disp(mindex);
|
||||
RARCH_LOG("[CRT]: SR Disp Monitor Index: %s \n", mindex);
|
||||
RARCH_LOG("[CRT]: RA Monitor Index Manual: %s\n", &index[0]);
|
||||
p_switch->rtn = sr_init_disp(index);
|
||||
RARCH_LOG("[CRT]: SR Disp Monitor Index Manual: %s \n", &index[0]);
|
||||
}
|
||||
|
||||
if (monitor_index == -1)
|
||||
{
|
||||
RARCH_LOG("SRobj: RA Monitor Index: %s\n",NULL);
|
||||
p_switch->rtn = sr_init_disp(NULL);
|
||||
RARCH_LOG("[CRT]: SR Disp Monitor Index: Auto \n");
|
||||
RARCH_LOG("[CRT]: RA Monitor Index Auto: %s\n","auto");
|
||||
p_switch->rtn = sr_init_disp("auto");
|
||||
RARCH_LOG("[CRT]: SR Disp Monitor Index Auto: Auto \n");
|
||||
}
|
||||
|
||||
RARCH_LOG("[CRT]: SR rtn %d \n", p_switch->rtn);
|
||||
|
@ -247,12 +252,12 @@ static void switch_res_crt(
|
|||
}
|
||||
p_switch->sr_core_hz = srm.refresh;
|
||||
|
||||
set_aspect(p_switch, w , h, srm.width, srm.height, srm.x_scale, srm.y_scale);
|
||||
set_aspect(p_switch, w , h, srm.width, srm.height, srm.x_scale, srm.y_scale, srm.is_stretched);
|
||||
|
||||
RARCH_LOG("[CRT]: SR scaled X:%d Y:%d \n",srm.x_scale, srm.y_scale);
|
||||
|
||||
}else {
|
||||
set_aspect(p_switch, width , height, width, height ,1,1);
|
||||
set_aspect(p_switch, width , height, width, height ,1,1, false);
|
||||
video_driver_set_size(width , height);
|
||||
video_driver_apply_state_changes();
|
||||
|
||||
|
@ -305,7 +310,7 @@ static void crt_fix_hh_res(videocrt_switch_t *p_switch, int native_width, int wi
|
|||
int corrected_height = 240;
|
||||
|
||||
switch_res_crt(p_switch, corrected_width, corrected_height , crt_mode, corrected_width, monitor_index-1, super_width);
|
||||
set_aspect(p_switch, native_width , height, native_width, height ,1,1);
|
||||
set_aspect(p_switch, native_width , height, native_width, height ,1,1, false);
|
||||
video_driver_set_size(native_width , height);
|
||||
|
||||
|
||||
|
@ -484,7 +489,7 @@ static void crt_rpi_switch(videocrt_switch_t *p_switch, int width, int height, f
|
|||
|
||||
set_aspect(p_switch, width,
|
||||
height, width, height,
|
||||
1, 1);
|
||||
1, 1, false);
|
||||
int w = width;
|
||||
while (w < 1920)
|
||||
{
|
||||
|
|
|
@ -55,6 +55,7 @@ enum aspect_ratio
|
|||
ASPECT_RATIO_SQUARE,
|
||||
ASPECT_RATIO_CORE,
|
||||
ASPECT_RATIO_CUSTOM,
|
||||
ASPECT_RATIO_FULL,
|
||||
|
||||
ASPECT_RATIO_END
|
||||
};
|
||||
|
@ -116,7 +117,7 @@ enum text_alignment
|
|||
#define COLOR_ABGR(r, g, b, a) (((unsigned)(a) << 24) | ((b) << 16) | ((g) << 8) | ((r) << 0))
|
||||
#endif
|
||||
|
||||
#define LAST_ASPECT_RATIO ASPECT_RATIO_CUSTOM
|
||||
#define LAST_ASPECT_RATIO ASPECT_RATIO_FULL
|
||||
|
||||
/* ABGR color format defines */
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@ RETRO_BEGIN_DECLS
|
|||
#endif
|
||||
|
||||
#ifndef GFX_MAX_PARAMETERS
|
||||
#define GFX_MAX_PARAMETERS 512
|
||||
#define GFX_MAX_PARAMETERS 1024
|
||||
#endif
|
||||
|
||||
#ifndef GFX_MAX_FRAME_HISTORY
|
||||
|
|
|
@ -272,7 +272,9 @@ VIDEO CONTEXT
|
|||
#include "../gfx/drivers_context/qnx_ctx.c"
|
||||
#elif defined(EMSCRIPTEN)
|
||||
#include "../gfx/drivers_context/emscriptenegl_ctx.c"
|
||||
#elif defined(__PS3__) && !defined(__PSL1GHT__)
|
||||
#elif defined(__PSL1GHT__)
|
||||
#include "../gfx/drivers_context/psl1ght_ctx.c"
|
||||
#elif defined(__PS3__)
|
||||
#include "../gfx/drivers_context/ps3_ctx.c"
|
||||
#endif
|
||||
|
||||
|
@ -469,6 +471,14 @@ VIDEO DRIVER
|
|||
#include "../gfx/common/sdl2_common.c"
|
||||
#endif
|
||||
|
||||
#if defined(DINGUX) && defined(HAVE_SDL_DINGUX)
|
||||
#if defined(RS90)
|
||||
#include "../gfx/drivers/sdl_rs90_gfx.c"
|
||||
#else
|
||||
#include "../gfx/drivers/sdl_dingux_gfx.c"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VG
|
||||
#include "../gfx/drivers/vg.c"
|
||||
#endif
|
||||
|
@ -1509,9 +1519,9 @@ DEPENDENCIES
|
|||
#endif
|
||||
|
||||
#ifdef WANT_IOSUHAX
|
||||
#include "../deps/libiosuhax/iosuhax.c"
|
||||
#include "../deps/libiosuhax/iosuhax_devoptab.c"
|
||||
#include "../deps/libiosuhax/iosuhax_disc_interface.c"
|
||||
#include "../deps/libiosuhax/source/iosuhax.c"
|
||||
#include "../deps/libiosuhax/source/iosuhax_devoptab.c"
|
||||
#include "../deps/libiosuhax/source/iosuhax_disc_interface.c"
|
||||
#endif
|
||||
|
||||
/*============================================================
|
||||
|
|
|
@ -315,7 +315,7 @@ static void *rwebinput_input_init(const char *joypad_driver)
|
|||
if (r != EMSCRIPTEN_RESULT_SUCCESS)
|
||||
{
|
||||
RARCH_ERR(
|
||||
"[EMSCRIPTEN/INPUT] failed to create keydown callback: %d\n", r);
|
||||
"[EMSCRIPTEN/INPUT] failed to create keyup callback: %d\n", r);
|
||||
}
|
||||
|
||||
r = emscripten_set_keypress_callback(
|
||||
|
|
|
@ -112,6 +112,7 @@ typedef struct
|
|||
int32_t x_rel, y_rel;
|
||||
bool l, r, m, b4, b5;
|
||||
bool wu, wd, whu, whd;
|
||||
bool pp;
|
||||
} udev_input_mouse_t;
|
||||
|
||||
struct udev_input_device
|
||||
|
@ -252,7 +253,7 @@ static udev_input_mouse_t *udev_get_mouse(
|
|||
|
||||
static void udev_mouse_set_x(udev_input_mouse_t *mouse, int32_t x, bool abs)
|
||||
{
|
||||
video_viewport_t vp;
|
||||
video_viewport_t vp;
|
||||
|
||||
if (abs)
|
||||
{
|
||||
|
@ -427,7 +428,9 @@ static void udev_handle_mouse(void *data,
|
|||
case BTN_MIDDLE:
|
||||
mouse->m = event->value;
|
||||
break;
|
||||
|
||||
case BTN_TOUCH:
|
||||
mouse->pp = event->value;
|
||||
break;
|
||||
/*case BTN_??:
|
||||
mouse->b4 = event->value;
|
||||
break;*/
|
||||
|
@ -478,11 +481,14 @@ static void udev_handle_mouse(void *data,
|
|||
break;
|
||||
}
|
||||
}
|
||||
#define test_bit(array, bit) (array[bit/8] & (1<<(bit%8)))
|
||||
|
||||
static int udev_input_add_device(udev_input_t *udev,
|
||||
enum udev_input_dev_type type, const char *devnode, device_handle_cb cb)
|
||||
{
|
||||
unsigned char keycaps[(KEY_MAX / 8) + 1];
|
||||
unsigned char abscaps[(ABS_MAX / 8) + 1];
|
||||
int has_absolutes = 0;
|
||||
int fd;
|
||||
struct stat st;
|
||||
#if defined(HAVE_EPOLL)
|
||||
|
@ -494,6 +500,9 @@ static int udev_input_add_device(udev_input_t *udev,
|
|||
udev_input_device_t **tmp;
|
||||
udev_input_device_t *device = NULL;
|
||||
|
||||
memset(keycaps, '\0', sizeof (keycaps));
|
||||
memset(keycaps, '\0', sizeof (abscaps));
|
||||
|
||||
st.st_dev = 0;
|
||||
|
||||
if (stat(devnode, &st) < 0)
|
||||
|
@ -520,33 +529,36 @@ static int udev_input_add_device(udev_input_t *udev,
|
|||
if (ioctl(fd, EVIOCGBIT(EV_KEY, sizeof (keycaps)), keycaps) == -1)
|
||||
return -1; /* gotta have some buttons! return -1 to skip error logging for this:) */
|
||||
|
||||
if (ioctl(fd, EVIOCGABS(ABS_X), &absinfo) >= 0)
|
||||
{
|
||||
if (absinfo.minimum >= absinfo.maximum )
|
||||
{
|
||||
device->mouse.x_min = -1;
|
||||
device->mouse.x_max = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
device->mouse.x_min = absinfo.minimum;
|
||||
device->mouse.x_max = absinfo.maximum;
|
||||
}
|
||||
}
|
||||
|
||||
if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) >= 0)
|
||||
|
||||
if (ioctl(fd, EVIOCGBIT(EV_ABS, sizeof (abscaps)), abscaps) != -1)
|
||||
{
|
||||
if (absinfo.minimum >= absinfo.maximum )
|
||||
{
|
||||
device->mouse.y_min = -1;
|
||||
device->mouse.y_max = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
device->mouse.y_min = absinfo.minimum;
|
||||
device->mouse.y_max = absinfo.maximum;
|
||||
}
|
||||
}
|
||||
if ( (test_bit(abscaps, ABS_X)) && (test_bit(abscaps, ABS_Y)) )
|
||||
{
|
||||
/* might be a touchpad... */
|
||||
if (test_bit(keycaps, BTN_TOUCH))
|
||||
{
|
||||
/* touchpad, touchscreen, or tablet. */
|
||||
has_absolutes = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
device->mouse.x_min = device->mouse.y_min = device->mouse.x_max = device->mouse.y_max = 0;
|
||||
|
||||
if (has_absolutes)
|
||||
{
|
||||
struct input_absinfo absinfo;
|
||||
if (ioctl(fd, EVIOCGABS(ABS_X), &absinfo) == -1)
|
||||
return 0;
|
||||
device->mouse.x_min = absinfo.minimum;
|
||||
device->mouse.x_max = absinfo.maximum;
|
||||
|
||||
if (ioctl(fd, EVIOCGABS(ABS_Y), &absinfo) == -1)
|
||||
return 0;
|
||||
device->mouse.y_min = absinfo.minimum;
|
||||
device->mouse.y_max = absinfo.maximum;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tmp = ( udev_input_device_t**)realloc(udev->devices,
|
||||
|
@ -944,7 +956,7 @@ static int16_t udev_pointer_state(udev_input_t *udev,
|
|||
case RETRO_DEVICE_ID_POINTER_Y:
|
||||
return udev_mouse_get_pointer_y(mouse, screen);
|
||||
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
||||
return mouse->l;
|
||||
return mouse->pp;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -1241,10 +1253,10 @@ static bool open_devices(udev_input_t *udev,
|
|||
if (fd != -1)
|
||||
{
|
||||
int check = udev_input_add_device(udev, type, devnode, cb);
|
||||
if (!check && check != -1 )
|
||||
RARCH_DBG("[udev] udev_input_add_device error : %s (%s).\n",
|
||||
if (check == 0)
|
||||
RARCH_LOG("[udev] udev_input_add_device error : %s (%s).\n",
|
||||
devnode, strerror(errno));
|
||||
else if (check != -1 && check != 0)
|
||||
else if (check == 1 )
|
||||
{
|
||||
char ident[255];
|
||||
if (ioctl(fd, EVIOCGNAME(sizeof(ident)), ident) < 0)
|
||||
|
@ -1257,7 +1269,7 @@ static bool open_devices(udev_input_t *udev,
|
|||
devnode);
|
||||
device_keyboard++;
|
||||
}
|
||||
else
|
||||
else if (type == UDEV_INPUT_MOUSE || type== UDEV_INPUT_TOUCHPAD)
|
||||
{
|
||||
RARCH_LOG("[udev]: Added Device mouse#%d %s (%s) .\n",
|
||||
device_mouse,
|
||||
|
|
|
@ -31,6 +31,11 @@
|
|||
#include "../../configuration.h"
|
||||
#endif
|
||||
|
||||
#if !defined(RS90)
|
||||
#define SDL_DINGUX_HAS_ANALOG 1
|
||||
#define SDL_DINGUX_HAS_MENU_TOGGLE 1
|
||||
#endif
|
||||
|
||||
/* Simple joypad driver designed to rationalise
|
||||
* the bizarre keyboard/gamepad hybrid setup
|
||||
* of OpenDingux devices */
|
||||
|
@ -66,7 +71,9 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
SDL_Joystick *device;
|
||||
#endif
|
||||
#if defined(HAVE_LIBSHAKE)
|
||||
dingux_joypad_rumble_t rumble;
|
||||
#endif
|
||||
|
@ -74,11 +81,15 @@ typedef struct
|
|||
uint16_t pad_state;
|
||||
int16_t analog_state[2][2];
|
||||
bool connected;
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
bool menu_toggle;
|
||||
#endif
|
||||
} dingux_joypad_t;
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
/* TODO/FIXME - global referenced outside */
|
||||
extern uint64_t lifecycle_state;
|
||||
#endif
|
||||
|
||||
static dingux_joypad_t dingux_joypad;
|
||||
|
||||
|
@ -259,6 +270,7 @@ static void sdl_dingux_joypad_connect(void)
|
|||
{
|
||||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
/* Open joypad device */
|
||||
if (SDL_NumJoysticks() > 0)
|
||||
joypad->device = SDL_JoystickOpen(0);
|
||||
|
@ -266,6 +278,7 @@ static void sdl_dingux_joypad_connect(void)
|
|||
/* If joypad exists, get number of axes */
|
||||
if (joypad->device)
|
||||
joypad->num_axes = SDL_JoystickNumAxes(joypad->device);
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBSHAKE)
|
||||
/* Configure rumble interface */
|
||||
|
@ -289,8 +302,10 @@ static void sdl_dingux_joypad_disconnect(void)
|
|||
{
|
||||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
if (joypad->device)
|
||||
SDL_JoystickClose(joypad->device);
|
||||
#endif
|
||||
|
||||
if (joypad->connected)
|
||||
input_autoconfigure_disconnect(0, sdl_dingux_joypad.ident);
|
||||
|
@ -329,7 +344,9 @@ static void sdl_dingux_joypad_destroy(void)
|
|||
Shake_Quit();
|
||||
#endif
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *sdl_dingux_joypad_init(void *data)
|
||||
|
@ -338,8 +355,11 @@ static void *sdl_dingux_joypad_init(void *data)
|
|||
uint32_t sdl_subsystem_flags = SDL_WasInit(0);
|
||||
|
||||
memset(joypad, 0, sizeof(dingux_joypad_t));
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
#endif
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
/* Initialise joystick subsystem, if required */
|
||||
if (sdl_subsystem_flags == 0)
|
||||
{
|
||||
|
@ -351,6 +371,7 @@ static void *sdl_dingux_joypad_init(void *data)
|
|||
if (SDL_InitSubSystem(SDL_INIT_JOYSTICK) < 0)
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_LIBSHAKE)
|
||||
/* Initialise rumble interface */
|
||||
|
@ -397,6 +418,7 @@ static void sdl_dingux_joypad_get_buttons(unsigned port, input_bits_t *state)
|
|||
|
||||
static int16_t sdl_dingux_joypad_axis_state(unsigned port, uint32_t joyaxis)
|
||||
{
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||
int val = 0;
|
||||
int axis = -1;
|
||||
|
@ -437,6 +459,9 @@ static int16_t sdl_dingux_joypad_axis_state(unsigned port, uint32_t joyaxis)
|
|||
return 0;
|
||||
|
||||
return val;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
static int16_t sdl_dingux_joypad_axis(unsigned port, uint32_t joyaxis)
|
||||
|
@ -465,16 +490,20 @@ static int16_t sdl_dingux_joypad_state(
|
|||
/* Auto-binds are per joypad, not per user. */
|
||||
const uint64_t joykey = (binds[i].joykey != NO_BTN)
|
||||
? binds[i].joykey : joypad_info->auto_binds[i].joykey;
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE)
|
||||
? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis;
|
||||
|
||||
if ((uint16_t)joykey != NO_BTN &&
|
||||
#endif
|
||||
|
||||
if ((uint16_t)joykey != NO_BTN &&
|
||||
(joypad->pad_state & (1 << (uint16_t)joykey)))
|
||||
ret |= (1 << i);
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
else if (joyaxis != AXIS_NONE &&
|
||||
((float)abs(sdl_dingux_joypad_axis_state(port_idx, joyaxis))
|
||||
((float)abs(sdl_dingux_joypad_axis_state(port_idx, joyaxis))
|
||||
/ 0x8000) > joypad_info->axis_threshold)
|
||||
ret |= (1 << i);
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
@ -485,6 +514,7 @@ static void sdl_dingux_joypad_poll(void)
|
|||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||
SDL_Event event;
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
/* Note: The menu toggle key is an awkward special
|
||||
* case - the press/release events happen almost
|
||||
* instantaneously, and since we only sample once
|
||||
|
@ -496,6 +526,7 @@ static void sdl_dingux_joypad_poll(void)
|
|||
BIT64_CLEAR(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
joypad->menu_toggle = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* All digital inputs map to keyboard keys
|
||||
* - X: SDLK_SPACE
|
||||
|
@ -571,10 +602,12 @@ static void sdl_dingux_joypad_poll(void)
|
|||
case SDLK_LEFT:
|
||||
BIT16_SET(joypad->pad_state, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||
break;
|
||||
#if defined(SDL_DINGUX_HAS_MENU_TOGGLE)
|
||||
case SDLK_HOME:
|
||||
BIT64_SET(lifecycle_state, RARCH_MENU_TOGGLE);
|
||||
joypad->menu_toggle = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -639,6 +672,7 @@ static void sdl_dingux_joypad_poll(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(SDL_DINGUX_HAS_ANALOG)
|
||||
/* Analog inputs come from the joypad device,
|
||||
* if connected */
|
||||
if (joypad->device)
|
||||
|
@ -676,6 +710,7 @@ static void sdl_dingux_joypad_poll(void)
|
|||
(axis_value < -0x7FFF) ? -0x7FFF : axis_value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
input_device_driver_t sdl_dingux_joypad = {
|
||||
|
|
|
@ -251,6 +251,12 @@ static void kpad_poll(void)
|
|||
}
|
||||
poll_failures[channel] = 0;
|
||||
|
||||
/* Several reads when a device is connected or an attachment added give */
|
||||
/* bogus results, try to weed them out */
|
||||
if (kpad.wpad_error || kpad.device_type == 255) {
|
||||
continue;
|
||||
}
|
||||
|
||||
kpad_poll_one_channel(channel, &kpad);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,52 @@ enum analog_dpad_mode
|
|||
ANALOG_DPAD_LAST
|
||||
};
|
||||
|
||||
enum input_toggle_type
|
||||
{
|
||||
INPUT_TOGGLE_NONE = 0,
|
||||
INPUT_TOGGLE_DOWN_Y_L_R,
|
||||
INPUT_TOGGLE_L3_R3,
|
||||
INPUT_TOGGLE_L1_R1_START_SELECT,
|
||||
INPUT_TOGGLE_START_SELECT,
|
||||
INPUT_TOGGLE_L3_R,
|
||||
INPUT_TOGGLE_L_R,
|
||||
INPUT_TOGGLE_HOLD_START,
|
||||
INPUT_TOGGLE_HOLD_SELECT,
|
||||
INPUT_TOGGLE_DOWN_SELECT,
|
||||
INPUT_TOGGLE_L2_R2,
|
||||
INPUT_TOGGLE_LAST
|
||||
};
|
||||
|
||||
enum input_turbo_mode
|
||||
{
|
||||
INPUT_TURBO_MODE_CLASSIC = 0,
|
||||
INPUT_TURBO_MODE_SINGLEBUTTON,
|
||||
INPUT_TURBO_MODE_SINGLEBUTTON_HOLD,
|
||||
INPUT_TURBO_MODE_LAST
|
||||
};
|
||||
|
||||
enum input_turbo_default_button
|
||||
{
|
||||
INPUT_TURBO_DEFAULT_BUTTON_B = 0,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_Y,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_A,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_X,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_L,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_R,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_L2,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_R2,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_L3,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_R3,
|
||||
INPUT_TURBO_DEFAULT_BUTTON_LAST
|
||||
};
|
||||
|
||||
enum input_action
|
||||
{
|
||||
INPUT_ACTION_NONE = 0,
|
||||
INPUT_ACTION_AXIS_THRESHOLD,
|
||||
INPUT_ACTION_MAX_USERS
|
||||
};
|
||||
|
||||
/* Specialized _MOUSE that targets the full screen regardless of viewport.
|
||||
*/
|
||||
#define RARCH_DEVICE_MOUSE_SCREEN (RETRO_DEVICE_MOUSE | 0x10000)
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,56 +26,162 @@
|
|||
RETRO_BEGIN_DECLS
|
||||
|
||||
/**
|
||||
* input_remapping_load_file:
|
||||
* @data : Path to config file.
|
||||
*
|
||||
* Loads a remap file from disk to memory.
|
||||
*
|
||||
* @param data Path to config file.
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
* @return true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool input_remapping_load_file(void *data, const char *path);
|
||||
|
||||
/**
|
||||
* input_remapping_save_file:
|
||||
* @path : Path to remapping file (relative path).
|
||||
*
|
||||
* Saves remapping values to file.
|
||||
*
|
||||
* Returns: true (1) if successful, otherwise false (0).
|
||||
* @param path Relative path to remapping file.
|
||||
*
|
||||
* @return true (1) if successful, otherwise false (0).
|
||||
**/
|
||||
bool input_remapping_save_file(const char *path);
|
||||
|
||||
bool input_remapping_remove_file(const char *path,
|
||||
const char *dir_input_remapping);
|
||||
bool input_remapping_remove_file(const char *path,
|
||||
const char *dir_input_remapping);
|
||||
|
||||
/* Caches any global configuration settings that
|
||||
* should not be overwritten by input remap
|
||||
* changes made while content is running.
|
||||
* Must be called on each core init. */
|
||||
/**
|
||||
* Caches any global configuration settings that should not be overwritten by
|
||||
* input remap changes made while content is running. Must be called on each
|
||||
* core init.
|
||||
*/
|
||||
void input_remapping_cache_global_config(void);
|
||||
/* Sets flags to enable the restoration of
|
||||
* global configuration settings from the
|
||||
* internal cache. Should be called independently
|
||||
* from 'input_remapping_cache_global_config()'.
|
||||
|
||||
/**
|
||||
* Sets flags to enable the restoration of global configuration settings from
|
||||
* the internal cache. Should be called independently from
|
||||
* `input_remapping_cache_global_config()`.
|
||||
* Must be called:
|
||||
* - Whenever content is loaded
|
||||
* - Whenever a remap file is loaded */
|
||||
* - Whenever content is loaded
|
||||
* - Whenever a remap file is loaded
|
||||
*/
|
||||
void input_remapping_enable_global_config_restore(void);
|
||||
/* Restores any cached global configuration settings
|
||||
* *if* 'input_remapping_enable_global_config_restore()'
|
||||
* has been called.
|
||||
* Must be called on core deint.
|
||||
* If 'clear_cache' is true, function becomes a NOOP
|
||||
* until the next time input_remapping_cache_global_config()
|
||||
* and input_remapping_enable_global_config_restore()
|
||||
* are called. */
|
||||
|
||||
/**
|
||||
* Restores any global configuration settings that were cached on the last core
|
||||
* init if `input_remapping_enable_global_config_restore()` has been called.
|
||||
* Must be called on core deinitialization.
|
||||
*
|
||||
* @param clear_cache If true, function becomes a NOOP until the next time
|
||||
* `input_remapping_cache_global_config()` and
|
||||
* `input_remapping_enable_global_config_restore()` are
|
||||
* called.
|
||||
*/
|
||||
void input_remapping_restore_global_config(bool clear_cache);
|
||||
|
||||
/**
|
||||
* Must be called whenever `settings->uints.input_remap_ports` is modified.
|
||||
*/
|
||||
void input_remapping_update_port_map(void);
|
||||
|
||||
/**
|
||||
* Frees global->name.remapfile and sets these runloop_state flags to false:
|
||||
* remaps_core_active, remaps_content_dir_active, and remaps_game_active.
|
||||
*/
|
||||
void input_remapping_deinit(void);
|
||||
|
||||
/**
|
||||
* Used to set the default mapping values within the `settings` struct
|
||||
* @param clear_cache This value is passed to
|
||||
* `input_remapping_restore_global_config()`. Please see
|
||||
* the documentation for that function for details.
|
||||
*/
|
||||
void input_remapping_set_defaults(bool clear_cache);
|
||||
|
||||
/**
|
||||
* Checks `input_config_bind_map` for the requested `input_bind_map`, and if
|
||||
* the bind has been registered, returns its base.
|
||||
*
|
||||
* @param index
|
||||
*
|
||||
* @return the contents of the meta field, or NULL if there is no matching bind
|
||||
*/
|
||||
const char *input_config_bind_map_get_base(unsigned bind_index);
|
||||
|
||||
/**
|
||||
* Checks `input_config_bind_map` for the requested `input_bind_map`, and if
|
||||
* the bind has been registered, returns the value of its meta binds field.
|
||||
*
|
||||
* @param index
|
||||
*
|
||||
* @return the contents of the meta field, or 0 if there is no matching bind
|
||||
*/
|
||||
unsigned input_config_bind_map_get_meta(unsigned bind_index);
|
||||
|
||||
/**
|
||||
* Checks `input_config_bind_map` for the requested `input_bind_map`, and if
|
||||
* the bind has been registered, returns a pointer to its description field.
|
||||
*
|
||||
* @param index
|
||||
*
|
||||
* @return the contents of the description field, or NULL if there is no
|
||||
* matching bind
|
||||
*/
|
||||
const char *input_config_bind_map_get_desc(unsigned index);
|
||||
|
||||
/**
|
||||
* Checks `input_config_bind_map` for the requested `input_bind_map`, and if
|
||||
* the bind has been registered, returns the value of its retro_key field.
|
||||
*
|
||||
* @param index
|
||||
*
|
||||
* @return the value of the retro_key field, or 0 if there is no matching bind
|
||||
*/
|
||||
uint8_t input_config_bind_map_get_retro_key(unsigned index);
|
||||
|
||||
/**
|
||||
* Converts a retro_keybind to a human-readable string, optionally allowing a
|
||||
* fallback auto_bind to be used as the source for the string.
|
||||
*
|
||||
* @param buf A string which will be overwritten with the returned value
|
||||
* @param bind A binding to convert to a string
|
||||
* @param auto_bind A default binding which will be used after `bind`. Can be NULL.
|
||||
* @param size The maximum length that will be written to `buf`
|
||||
*/
|
||||
void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
|
||||
const struct retro_keybind *auto_bind, size_t size);
|
||||
|
||||
/**
|
||||
* Parses the string representation of a retro_key struct
|
||||
*
|
||||
* @param str String to parse.
|
||||
*
|
||||
* @return Key identifier.
|
||||
**/
|
||||
enum retro_key input_config_translate_str_to_rk(const char *str);
|
||||
|
||||
/**
|
||||
* Searches for a string among the "base" fields of the list of binds.
|
||||
*
|
||||
* @param str String to search for among the binds
|
||||
*
|
||||
* @return Bind index value on success or RARCH_BIND_LIST_END if not found.
|
||||
**/
|
||||
unsigned input_config_translate_str_to_bind_id(const char *str);
|
||||
|
||||
/**
|
||||
* Parse the bind data of an object of config_file_t.
|
||||
*
|
||||
* @param data An object of type config_file_t. We assume it is passed as a
|
||||
* void pointer like this to avoid including config_file.h.
|
||||
**/
|
||||
void config_read_keybinds_conf(void *data);
|
||||
|
||||
/**
|
||||
* Apply autoconfig binds to the indicated control port.
|
||||
*
|
||||
* @param port
|
||||
* @param data An object of type config_file_t. We assume it is passed as a
|
||||
* void pointer like this to avoid including config_file.h.
|
||||
*/
|
||||
void input_config_set_autoconfig_binds(unsigned port, void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -922,18 +922,10 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_DRIVER_SETTINGS,
|
||||
"Die von diesem System verwendeten Treiber ändern."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS,
|
||||
"Videotreiber"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SETTINGS,
|
||||
"Videoausgabe-Einstellungen ändern."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS,
|
||||
"Audiotreiber"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_SETTINGS,
|
||||
"Audioausgabe-Einstellungen ändern."
|
||||
|
@ -1535,6 +1527,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Das Bild in ganzzahligen Schritten skalieren. Die Basisgröße hängt von der vom System gemeldeten Geometrie und dem Seitenverhältnis ab. Wenn \"Seitenverhältnis erzwingen\" nicht gewählt ist, werden Höhe u. Breite unabhängig skaliert."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Aufgerundete ganzzahlige Skalierung"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Bei ganzzahliger Skalierung den Skalierungsfaktor aufrunden, statt ihn abzurunden."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Bildseitenverhältnis"
|
||||
|
@ -7715,7 +7715,7 @@ MSG_HASH(
|
|||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER,
|
||||
"Pixelgenaue Bildskalierung"
|
||||
"Ganzzahlige Skalierung"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN,
|
||||
|
|
|
@ -1587,6 +1587,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Limita el escalado de vídeo a múltiplos enteros. El tamaño base dependerá de la geometría indicada por el sistema y la relación de aspecto. Si la opción «Forzar relación de aspecto» está desactivada, los valores X e Y serán escalados individualmente."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Sobreescalar imagen al usar números enteros"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Hace que el escalado por números enteros redondee siempre a un valor superior en vez de a uno inferior."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Relación de aspecto"
|
||||
|
@ -4035,7 +4043,7 @@ MSG_HASH(
|
|||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_SCROLL_DELAY,
|
||||
"Retraso al desplazar el menú"
|
||||
"Retraso para desplazar el menú"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_SCROLL_DELAY,
|
||||
|
|
|
@ -1579,6 +1579,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Mettre la vidéo à l'échelle sur un nombre entier uniquement. La taille de base dépend de la géométrie et du rapport d'aspect détectés par le système. Si 'Forcer le rapport d'aspect' est désactivé, X/Y seront mis à l'échelle à l'entier indépendamment."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Échelle à l'entier surdimensionnée"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Force la mise à l'échelle sur l'entier à arrondir au prochain entier supérieur plutôt qu'inférieur."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Rapport d'aspect"
|
||||
|
|
|
@ -1567,6 +1567,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Scala video solo con passaggi interi. La dimensione di base dipende dalla geometria e dal rapporto di aspetto riportati dal sistema. Se 'Force Aspect Ratio' non è impostato, X/Y sarà scalato in modo indipendente."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Overscale A Scala Intera"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Forza il ridimensionamento degli interi per arrotondare al prossimo numero intero maggiore invece di arrotondare."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Rapporto d'aspetto"
|
||||
|
|
|
@ -1607,6 +1607,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"비디오의 크기를 정수 단위로만 조정합니다. 기본 크기는 각 시스템이 보고한 크기와 종횡비에 따라 결정되며 '강제 화면비'를 설정하지 않았을 경우 X/Y 크기를 각각 정수 단위로 조절합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"정수 단위 오버스케일링"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"화면 크기를 조정할 정수 단위 배율을 버림 대신 올림으로 계산합니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"화면비"
|
||||
|
@ -2640,6 +2648,10 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VALUE_INPUT_ADC_TYPE,
|
||||
"아날로그로 디지털 입력"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_ADC_TYPE,
|
||||
"지정한 아날로그 스틱을 방향 패드 대신으로 사용합니다. 코어가 아날로그 입력을 지원하는 경우, 방향 패드 매핑은 (강제) 옵션을 선택하지 않은 한 비활성화됩니다. 방향 패드 매핑을 강제하면 코어는 지정한 스틱의 아날로그 입력을 받을 수 없게 됩니다."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX,
|
||||
"장치 인덱스"
|
||||
|
@ -7615,6 +7627,14 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VALUE_RIGHT_ANALOG,
|
||||
"우 아날로그"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_LEFT_ANALOG_FORCED,
|
||||
"좌 아날로그 (강제)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_RIGHT_ANALOG_FORCED,
|
||||
"우 아날로그 (강제)"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(키: %s)"
|
||||
|
|
|
@ -3181,6 +3181,12 @@ MSG_HASH(
|
|||
"video_dingux_refresh_rate"
|
||||
)
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
"video_dingux_rs90_softfilter_type"
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VIDEO_BLACK_FRAME_INSERTION,
|
||||
|
@ -3314,6 +3320,10 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
"video_scale_integer"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"video_scale_integer_overscale"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VIDEO_SETTINGS,
|
||||
"video_settings"
|
||||
|
|
|
@ -1575,6 +1575,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Apenas redimensione o vídeo com valores inteiros. O tamanho principal depende da geometria informada pelo sistema e da proporção da tela. Caso a opção 'Forçar proporção' não esteja definida, X / Y serão dimensionados independentemente com valores inteiros."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Dimensionar imagem em números inteiros"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Faz com que o dimensionamento inteiro seja sempre arredondado para um valor mais alto em vez de um valor mais baixo."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Proporção de tela"
|
||||
|
|
|
@ -1599,6 +1599,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Масштабировать изображение с целочисленным интервалом. Базовый размер зависит от геометрии и соотношения сторон системы. Если не включена 'Принудительная установка' для соотношения сторон, значения X/Y будут меняться независимо друг от друга."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Повышать целочисленное масштабирование"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"При целочисленном масштабировании делать округление в сторону ближайшего большего целого числа."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Соотношение сторон"
|
||||
|
|
|
@ -1579,6 +1579,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Videoyu yalnızca tamsayı adımlarla ölçeklendirir. Temel boyut, sistem tarafından bildirilen geometriye ve en/boy oranına bağlıdır. 'En/Boy Oranını Zorla' ayarlanmazsa, X/Y birbirlerinden bağımsız, tamsayı katlarıyla ölçeklendirilirler."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Tamsayı Ölçeği Aşırı Ölçek"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Aşağı yuvarlamak yerine bir sonraki daha büyük tam sayıya yuvarlamak için tamsayı ölçeklendirmeyi zorlayın."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"En Boy Oranı"
|
||||
|
|
|
@ -1603,6 +1603,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Масштабуйте відео лише цілими кроками. Базовий розмір залежить від геометрії та співвідношення сторін, про які повідомляє система. Якщо не встановлено \"Примусове співвідношення сторін\", X / Y буде цілочисельним масштабом незалежно."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Масштаб Цілочисельной Шкали"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Примусово масштабувати ціле число для округлення до наступного більшого цілого числа замість округлення вниз."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Співвідношення сторін"
|
||||
|
|
|
@ -1365,9 +1365,14 @@ int msg_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
|||
"The base size depends on system-reported \n"
|
||||
"geometry and aspect ratio.\n"
|
||||
" \n"
|
||||
"If Force Aspect is not set, X/Y will be \n"
|
||||
"If 'Force Aspect Ratio' is not set, X/Y will be \n"
|
||||
"integer scaled independently.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER_OVERSCALE:
|
||||
snprintf(s, len,
|
||||
"Force integer scaling to round up \n"
|
||||
" to the next larger integer instead of rounding down.");
|
||||
break;
|
||||
case MENU_ENUM_LABEL_AUDIO_VOLUME:
|
||||
snprintf(s, len,
|
||||
"Audio volume, expressed in dB.\n"
|
||||
|
|
|
@ -1373,6 +1373,24 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_IPU_FILTER_NEAREST,
|
||||
"Nearest Neighbor"
|
||||
)
|
||||
#if defined(RS90)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
"Image Interpolation"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
"Specify image interpolation method when 'Integer Scale' is disabled. 'Nearest Neighbor' has the least performance impact."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_POINT,
|
||||
"Nearest Neighbor"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_BRESENHAM_HORZ,
|
||||
"Semi-Linear"
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY,
|
||||
|
@ -1631,6 +1649,14 @@ MSG_HASH(
|
|||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER,
|
||||
"Scale video in integer steps only. The base size depends on system-reported geometry and aspect ratio. If 'Force Aspect Ratio' is not set, X/Y will be integer scaled independently."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Integer Scale Overscale"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
"Force integer scaling to round up to the next larger integer instead of rounding down."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX,
|
||||
"Aspect Ratio"
|
||||
|
@ -10528,11 +10554,11 @@ MSG_HASH(
|
|||
)
|
||||
MSG_HASH(
|
||||
MSG_PUBLIC_ADDRESS,
|
||||
"Port Mapping Successful"
|
||||
"Netplay Port Mapping Successful"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_UPNP_FAILED,
|
||||
"Port Mapping Failed"
|
||||
"Netplay UPNP Port Mapping Failed"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN,
|
||||
|
@ -12026,6 +12052,10 @@ MSG_HASH(
|
|||
MSG_UNSUPPORTED_VIDEO_MODE,
|
||||
"Unsupported video mode"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_CORE_INFO_CACHE_UNSUPPORTED,
|
||||
"Cannot write to core info directory - core info cache will be disabled"
|
||||
)
|
||||
|
||||
/* Lakka */
|
||||
|
||||
|
|
|
@ -650,16 +650,31 @@ bool path_is_absolute(const char *path)
|
|||
char *path_resolve_realpath(char *buf, size_t size, bool resolve_symlinks)
|
||||
{
|
||||
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
#ifdef _WIN32
|
||||
strlcpy(tmp, buf, sizeof(tmp));
|
||||
if (!_fullpath(buf, tmp, size))
|
||||
char *ret = NULL;
|
||||
wchar_t abs_path[PATH_MAX_LENGTH];
|
||||
wchar_t *rel_path = utf8_to_utf16_string_alloc(buf);
|
||||
|
||||
if (rel_path)
|
||||
{
|
||||
strlcpy(buf, tmp, size);
|
||||
return NULL;
|
||||
if (_wfullpath(abs_path, rel_path, PATH_MAX_LENGTH))
|
||||
{
|
||||
char *tmp = utf16_to_utf8_string_alloc(abs_path);
|
||||
|
||||
if (tmp)
|
||||
{
|
||||
strlcpy(buf, tmp, size);
|
||||
free(tmp);
|
||||
ret = buf;
|
||||
}
|
||||
}
|
||||
|
||||
free(rel_path);
|
||||
}
|
||||
return buf;
|
||||
|
||||
return ret;
|
||||
#else
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
size_t t;
|
||||
char *p;
|
||||
const char *next;
|
||||
|
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#if defined(WIIU)
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
#include <file/nbio.h>
|
||||
#include <encodings/utf.h>
|
||||
|
@ -130,8 +133,14 @@ static void *nbio_stdio_open(const char * filename, unsigned mode)
|
|||
|
||||
handle->mode = mode;
|
||||
|
||||
#if defined(WIIU)
|
||||
/* hit the aligned-buffer fast path on Wii U */
|
||||
if (len)
|
||||
buf = memalign(0x40, (size_t)len);
|
||||
#else
|
||||
if (len)
|
||||
buf = malloc((size_t)len);
|
||||
#endif
|
||||
|
||||
if (len && !buf)
|
||||
goto error;
|
||||
|
|
|
@ -660,6 +660,9 @@ extern int audioAddData(uint32_t portNum, float *data,
|
|||
#define CELL_SYSMODULE_SYSUTIL_NP SYSMODULE_SYSUTIL_NP
|
||||
#define CELL_SYSMODULE_JPGDEC SYSMODULE_JPGDEC
|
||||
#define CELL_SYSMODULE_PNGDEC SYSMODULE_PNGDEC
|
||||
#define CELL_SYSMODULE_FONT SYSMODULE_FONT
|
||||
#define CELL_SYSMODULE_FREETYPE SYSMODULE_FREETYPE
|
||||
#define CELL_SYSMODULE_FONTFT SYSMODULE_FONTFT
|
||||
|
||||
#define cellSysmoduleLoadModule sysModuleLoad
|
||||
#define cellSysmoduleUnloadModule sysModuleUnload
|
||||
|
|
|
@ -158,6 +158,11 @@ static INLINE bool isagain(int bytes)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef WIIU
|
||||
#define WIIU_RCVBUF (128 * 2 * 1024)
|
||||
#define WIIU_SNDBUF (128 * 2 * 1024)
|
||||
#endif
|
||||
|
||||
#ifdef _XBOX
|
||||
#define socklen_t int
|
||||
|
||||
|
|
|
@ -62,7 +62,8 @@ struct natt_status
|
|||
/**
|
||||
* Initialize global NAT traversal structures (must be called once to use other
|
||||
* functions) */
|
||||
void natt_init(void);
|
||||
void natt_init(struct natt_status *status,
|
||||
uint16_t port, enum socket_protocol proto);
|
||||
|
||||
/** Initialize a NAT traversal status object */
|
||||
bool natt_new(struct natt_status *status);
|
||||
|
|
|
@ -264,6 +264,25 @@ void freeaddrinfo_retro(struct addrinfo *res)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if defined(WIIU)
|
||||
#include <malloc.h>
|
||||
|
||||
static OSThread wiiu_net_cmpt_thread;
|
||||
static void wiiu_net_cmpt_thread_cleanup(OSThread *thread, void *stack) {
|
||||
free(stack);
|
||||
}
|
||||
static int wiiu_net_cmpt_thread_entry(int argc, const char** argv) {
|
||||
const int buf_size = WIIU_RCVBUF + WIIU_SNDBUF;
|
||||
void* buf = memalign(128, buf_size);
|
||||
if (!buf) return -1;
|
||||
|
||||
somemopt(1, buf, buf_size, 0);
|
||||
|
||||
free(buf);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* network_init:
|
||||
*
|
||||
|
@ -332,6 +351,18 @@ bool network_init(void)
|
|||
return false;
|
||||
#elif defined(WIIU)
|
||||
socket_lib_init();
|
||||
|
||||
const int stack_size = 4096;
|
||||
void* stack = malloc(stack_size);
|
||||
if (stack && OSCreateThread(&wiiu_net_cmpt_thread,
|
||||
wiiu_net_cmpt_thread_entry, 0, NULL, stack+stack_size, stack_size,
|
||||
3, OS_THREAD_ATTRIB_AFFINITY_ANY)) {
|
||||
|
||||
OSSetThreadName(&wiiu_net_cmpt_thread, "Network compat thread");
|
||||
OSSetThreadDeallocator(&wiiu_net_cmpt_thread,
|
||||
wiiu_net_cmpt_thread_cleanup);
|
||||
OSResumeThread(&wiiu_net_cmpt_thread);
|
||||
}
|
||||
#elif defined(_3DS)
|
||||
_net_compat_net_memory = (u32*)memalign(SOC_ALIGN, SOC_BUFFERSIZE);
|
||||
if (!_net_compat_net_memory)
|
||||
|
|
|
@ -47,7 +47,13 @@ static struct UPNPUrls urls;
|
|||
static struct IGDdatas data;
|
||||
#endif
|
||||
|
||||
void natt_init(void)
|
||||
/*
|
||||
natt_open_port_any(ntsd->nat_traversal_state,
|
||||
ntsd->port, SOCKET_PROTOCOL_TCP);
|
||||
*/
|
||||
|
||||
void natt_init(struct natt_status *status,
|
||||
uint16_t port, enum socket_protocol proto)
|
||||
{
|
||||
#ifndef HAVE_SOCKET_LEGACY
|
||||
#if HAVE_MINIUPNPC
|
||||
|
@ -56,8 +62,6 @@ void natt_init(void)
|
|||
char * descXML;
|
||||
int descXMLsize = 0;
|
||||
int upnperror = 0;
|
||||
memset(&urls, 0, sizeof(struct UPNPUrls));
|
||||
memset(&data, 0, sizeof(struct IGDdatas));
|
||||
devlist = upnpDiscover(2000, NULL, NULL, 0, 0, 2, &upnperror);
|
||||
if (devlist)
|
||||
{
|
||||
|
@ -65,22 +69,27 @@ void natt_init(void)
|
|||
while (dev)
|
||||
{
|
||||
if (strstr (dev->st, "InternetGatewayDevice"))
|
||||
break;
|
||||
{
|
||||
memset(&urls, 0, sizeof(struct UPNPUrls));
|
||||
memset(&data, 0, sizeof(struct IGDdatas));
|
||||
descXML = (char *) miniwget(dev->descURL, &descXMLsize, 0, NULL);
|
||||
if (descXML)
|
||||
{
|
||||
parserootdesc(descXML, descXMLsize, &data);
|
||||
free (descXML);
|
||||
descXML = 0;
|
||||
|
||||
GetUPNPUrls (&urls, &data, dev->descURL, 0);
|
||||
}
|
||||
if(natt_open_port_any(status, port, proto))
|
||||
goto end;
|
||||
|
||||
}
|
||||
dev = dev->pNext;
|
||||
}
|
||||
if (!dev)
|
||||
dev = devlist;
|
||||
|
||||
descXML = (char *) miniwget(dev->descURL, &descXMLsize, 0, NULL);
|
||||
if (descXML)
|
||||
{
|
||||
parserootdesc(descXML, descXMLsize, &data);
|
||||
free (descXML);
|
||||
descXML = 0;
|
||||
GetUPNPUrls (&urls, &data, dev->descURL, 0);
|
||||
}
|
||||
freeUPNPDevlist(devlist);
|
||||
}
|
||||
end:
|
||||
freeUPNPDevlist(devlist);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -256,6 +256,20 @@ int socket_connect(int fd, void *data, bool timeout_enable)
|
|||
|
||||
setsockopt(fd, SOL_SOCKET, SO_SNDTIMEO, (char*)&timeout, sizeof timeout);
|
||||
}
|
||||
#endif
|
||||
#if defined(WIIU)
|
||||
int op = 1;
|
||||
setsockopt(fd, SOL_SOCKET, SO_WINSCALE, &op, sizeof(op));
|
||||
if (addr->ai_socktype == SOCK_STREAM) {
|
||||
setsockopt(fd, SOL_SOCKET, SO_TCPSACK, &op, sizeof(op));
|
||||
|
||||
setsockopt(fd, SOL_SOCKET, 0x10000, &op, sizeof(op));
|
||||
int recvsz = WIIU_RCVBUF;
|
||||
setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &recvsz, sizeof(recvsz));
|
||||
int sendsz = WIIU_SNDBUF;
|
||||
setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &sendsz, sizeof(sendsz));
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
return connect(fd, addr->ai_addr, addr->ai_addrlen);
|
||||
|
|
|
@ -872,7 +872,7 @@ bool scond_wait_timeout(scond_t *cond, slock_t *lock, int64_t timeout_us)
|
|||
int tickms = ps2_clock();
|
||||
now.tv_sec = tickms/1000;
|
||||
now.tv_nsec = tickms * 1000;
|
||||
#elif defined(__mips__) || defined(VITA) || defined(_3DS)
|
||||
#elif !defined(DINGUX_BETA) && (defined(__mips__) || defined(VITA) || defined(_3DS))
|
||||
struct timeval tm;
|
||||
|
||||
gettimeofday(&tm, NULL);
|
||||
|
|
|
@ -62,6 +62,9 @@
|
|||
# include <sys/dirent.h>
|
||||
# include <orbisFile.h>
|
||||
# endif
|
||||
# if defined(WIIU)
|
||||
# include <malloc.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
@ -447,6 +450,14 @@ libretro_vfs_implementation_file *retro_vfs_file_open_impl(
|
|||
if (stream->fp)
|
||||
setvbuf(stream->fp, stream->buf, _IOFBF, 0x10000);
|
||||
}
|
||||
#elif defined(WIIU)
|
||||
if (stream->scheme != VFS_SCHEME_CDROM)
|
||||
{
|
||||
const int bufsize = 128*1024;
|
||||
stream->buf = (char*)memalign(0x40, bufsize);
|
||||
if (stream->fp)
|
||||
setvbuf(stream->fp, stream->buf, _IOFBF, bufsize);
|
||||
}
|
||||
#elif !defined(PSP)
|
||||
if (stream->scheme != VFS_SCHEME_CDROM)
|
||||
{
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "../menu_driver.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_setting.h"
|
||||
#include "../../input/input_remapping.h"
|
||||
|
||||
#include "../../input/input_driver.h"
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
#include "../menu_driver.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../../input/input_remapping.h"
|
||||
|
||||
#include "../../retroarch.h"
|
||||
#include "../../core_option_manager.h"
|
||||
|
@ -451,6 +452,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_overlay_auto_rotate, MENU_
|
|||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_overlay_auto_scale, MENU_ENUM_SUBLABEL_INPUT_OVERLAY_AUTO_SCALE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_content_collection_list, MENU_ENUM_SUBLABEL_PLAYLISTS_TAB)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_scale_integer, MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_scale_integer_overscale, MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER_OVERSCALE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_gpu_screenshot, MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_rotation, MENU_ENUM_SUBLABEL_VIDEO_ROTATION)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_screen_orientation, MENU_ENUM_SUBLABEL_SCREEN_ORIENTATION)
|
||||
|
@ -870,6 +872,9 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_dingux_ipu_filter_type,
|
|||
#if defined(DINGUX_BETA)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_dingux_refresh_rate, MENU_ENUM_SUBLABEL_VIDEO_DINGUX_REFRESH_RATE)
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_dingux_rs90_softfilter_type, MENU_ENUM_SUBLABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE)
|
||||
#endif
|
||||
#endif
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_viewport_custom_height, MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_viewport_custom_width, MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH)
|
||||
|
@ -1966,6 +1971,11 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_dingux_refresh_rate);
|
||||
break;
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
case MENU_ENUM_LABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_dingux_rs90_softfilter_type);
|
||||
break;
|
||||
#endif
|
||||
#endif
|
||||
case MENU_ENUM_LABEL_CORE_INFORMATION:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_information);
|
||||
|
@ -3278,6 +3288,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_scale_integer);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER_OVERSCALE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_scale_integer_overscale);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_PLAYLISTS_TAB:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_content_collection_list);
|
||||
break;
|
||||
|
|
|
@ -3512,7 +3512,15 @@ static void materialui_render(void *data,
|
|||
{
|
||||
size_t i;
|
||||
float bottom;
|
||||
float scale_factor;
|
||||
/* c.f. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
||||
* On some platforms (e.g. 32-bit x86 without SSE),
|
||||
* gcc can produce inconsistent floating point results
|
||||
* depending upon optimisation level. This can break
|
||||
* floating point variable comparisons. A workaround is
|
||||
* to declare the affected variable as 'volatile', which
|
||||
* disables optimisations and removes excess precision
|
||||
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c87) */
|
||||
volatile float scale_factor;
|
||||
settings_t *settings = config_get_ptr();
|
||||
materialui_handle_t *mui = (materialui_handle_t*)data;
|
||||
gfx_display_t *p_disp = disp_get_ptr();
|
||||
|
|
|
@ -1750,7 +1750,15 @@ static void ozone_render(void *data,
|
|||
bool is_idle)
|
||||
{
|
||||
size_t i;
|
||||
float scale_factor;
|
||||
/* c.f. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
||||
* On some platforms (e.g. 32-bit x86 without SSE),
|
||||
* gcc can produce inconsistent floating point results
|
||||
* depending upon optimisation level. This can break
|
||||
* floating point variable comparisons. A workaround is
|
||||
* to declare the affected variable as 'volatile', which
|
||||
* disables optimisations and removes excess precision
|
||||
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c87) */
|
||||
volatile float scale_factor;
|
||||
unsigned entries_end = (unsigned)menu_entries_get_size();
|
||||
bool pointer_enabled = false;
|
||||
unsigned language = *msg_hash_get_uint(MSG_HASH_USER_LANGUAGE);
|
||||
|
|
|
@ -80,6 +80,22 @@
|
|||
#define RGUI_MIN_FB_WIDTH 256
|
||||
#define RGUI_MAX_FB_WIDTH 426
|
||||
|
||||
#if defined(DINGUX)
|
||||
#if defined(RS90)
|
||||
/* The RS-90 uses a fixed framebuffer size
|
||||
* of 240x160 */
|
||||
#define RGUI_DINGUX_ASPECT_RATIO RGUI_ASPECT_RATIO_3_2
|
||||
#define RGUI_DINGUX_FB_WIDTH 240
|
||||
#define RGUI_DINGUX_FB_HEIGHT 160
|
||||
#else
|
||||
/* Other Dingux devices (RG350 etc.) use a
|
||||
* fixed framebuffer size of 320x240 */
|
||||
#define RGUI_DINGUX_ASPECT_RATIO RGUI_ASPECT_RATIO_4_3
|
||||
#define RGUI_DINGUX_FB_WIDTH 320
|
||||
#define RGUI_DINGUX_FB_HEIGHT 240
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Maximum entry value length in characters
|
||||
* when using fixed with layouts
|
||||
* (i.e. Maximum possible 'spacing' as
|
||||
|
@ -1502,20 +1518,21 @@ static bool rgui_set_pixel_format_function(void)
|
|||
return transparency_supported;
|
||||
}
|
||||
|
||||
if ( string_is_equal(driver_ident, "ps2")) /* PS2 */
|
||||
if ( string_is_equal(driver_ident, "ps2")) /* PS2 */
|
||||
{
|
||||
argb32_to_pixel_platform_format = argb32_to_abgr1555;
|
||||
transparency_supported = false;
|
||||
}
|
||||
else if (string_is_equal(driver_ident, "gx")) /* GEKKO */
|
||||
else if (string_is_equal(driver_ident, "gx")) /* GEKKO */
|
||||
argb32_to_pixel_platform_format = argb32_to_rgb5a3;
|
||||
else if (string_is_equal(driver_ident, "psp1")) /* PSP */
|
||||
else if (string_is_equal(driver_ident, "psp1")) /* PSP */
|
||||
argb32_to_pixel_platform_format = argb32_to_abgr4444;
|
||||
else if (string_is_equal(driver_ident, "d3d10") || /* D3D10/11/12 */
|
||||
else if (string_is_equal(driver_ident, "d3d10") || /* D3D10/11/12 */
|
||||
string_is_equal(driver_ident, "d3d11") ||
|
||||
string_is_equal(driver_ident, "d3d12"))
|
||||
argb32_to_pixel_platform_format = argb32_to_bgra4444;
|
||||
else if (string_is_equal(driver_ident, "sdl_dingux")) /* DINGUX SDL */
|
||||
else if (string_is_equal(driver_ident, "sdl_dingux") || /* DINGUX SDL */
|
||||
string_is_equal(driver_ident, "sdl_rs90"))
|
||||
{
|
||||
argb32_to_pixel_platform_format = argb32_to_rgb565;
|
||||
transparency_supported = false;
|
||||
|
@ -3006,7 +3023,7 @@ static void load_custom_theme(rgui_t *rgui, rgui_theme_t *theme_colors, const ch
|
|||
const char *wallpaper_key = NULL;
|
||||
bool success = false;
|
||||
#if defined(DINGUX)
|
||||
unsigned aspect_ratio = RGUI_ASPECT_RATIO_4_3;
|
||||
unsigned aspect_ratio = RGUI_DINGUX_ASPECT_RATIO;
|
||||
#else
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned aspect_ratio = settings->uints.menu_rgui_aspect_ratio;
|
||||
|
@ -4719,7 +4736,9 @@ static void rgui_render(void *data,
|
|||
unsigned title_y = rgui->term_layout.start_y - rgui->font_height_stride;
|
||||
unsigned term_end_x = rgui->term_layout.start_x + (rgui->term_layout.width * rgui->font_width_stride);
|
||||
unsigned timedate_x = term_end_x - (5 * rgui->font_width_stride);
|
||||
unsigned core_name_len = ((timedate_x - rgui->term_layout.start_x) / rgui->font_width_stride) - 3;
|
||||
unsigned core_name_len = menu_timedate_enable ?
|
||||
((timedate_x - rgui->term_layout.start_x) / rgui->font_width_stride) - 3 :
|
||||
rgui->term_layout.width - 1;
|
||||
bool show_mini_thumbnails = rgui->is_playlist && rgui_inline_thumbnails;
|
||||
bool show_thumbnail = false;
|
||||
bool show_left_thumbnail = false;
|
||||
|
@ -5435,15 +5454,14 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui,
|
|||
* width value must be zero... */
|
||||
unsigned max_frame_buf_width = 424;
|
||||
#elif defined(DINGUX)
|
||||
/* Dingux devices use a fixed framebuffer size
|
||||
* of 320x240 */
|
||||
unsigned max_frame_buf_width = 320;
|
||||
/* Dingux devices use a fixed framebuffer size */
|
||||
unsigned max_frame_buf_width = RGUI_DINGUX_FB_WIDTH;
|
||||
#else
|
||||
struct video_viewport vp;
|
||||
unsigned max_frame_buf_width = RGUI_MAX_FB_WIDTH;
|
||||
#endif
|
||||
#if defined(DINGUX)
|
||||
unsigned aspect_ratio = RGUI_ASPECT_RATIO_4_3;
|
||||
unsigned aspect_ratio = RGUI_DINGUX_ASPECT_RATIO;
|
||||
unsigned aspect_ratio_lock = RGUI_ASPECT_RATIO_LOCK_NONE;
|
||||
#else
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
@ -5469,9 +5487,8 @@ static bool rgui_set_aspect_ratio(rgui_t *rgui,
|
|||
* values */
|
||||
rgui->frame_buf.height = p_disp->framebuf_height;
|
||||
#elif defined(DINGUX)
|
||||
/* Dingux devices use a fixed framebuffer size
|
||||
* of 320x240 */
|
||||
rgui->frame_buf.height = 240;
|
||||
/* Dingux devices use a fixed framebuffer size */
|
||||
rgui->frame_buf.height = RGUI_DINGUX_FB_HEIGHT;
|
||||
#else
|
||||
/* If window height is less than RGUI default
|
||||
* height of 240, allow the frame buffer to
|
||||
|
@ -6225,7 +6242,7 @@ static void rgui_toggle_fs_thumbnail(void *userdata)
|
|||
}
|
||||
|
||||
/* Note that we always load thumbnails immediately
|
||||
* when toggling via the 'scan' button (scheduling a
|
||||
* when toggling via a RetroPad button (scheduling a
|
||||
* delayed load here would make for a poor user
|
||||
* experience...) */
|
||||
rgui_scan_selected_entry_thumbnail(rgui, true);
|
||||
|
@ -6587,7 +6604,7 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
|
|||
bool bg_filler_thickness_enable = settings->bools.menu_rgui_background_filler_thickness_enable;
|
||||
bool border_filler_thickness_enable = settings->bools.menu_rgui_border_filler_thickness_enable;
|
||||
#if defined(DINGUX)
|
||||
unsigned aspect_ratio = RGUI_ASPECT_RATIO_4_3;
|
||||
unsigned aspect_ratio = RGUI_DINGUX_ASPECT_RATIO;
|
||||
unsigned aspect_ratio_lock = RGUI_ASPECT_RATIO_LOCK_NONE;
|
||||
#else
|
||||
unsigned aspect_ratio = settings->uints.menu_rgui_aspect_ratio;
|
||||
|
@ -6714,7 +6731,7 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
|
|||
if ((rgui->window_width != video_width) ||
|
||||
(rgui->window_height != video_height))
|
||||
{
|
||||
#if !defined(GEKKO)
|
||||
#if !defined(GEKKO) && !defined(DINGUX)
|
||||
/* If window width or height are less than the
|
||||
* RGUI default size of (320-426)x240, must enable
|
||||
* dynamic menu 'downscaling'.
|
||||
|
@ -6744,7 +6761,6 @@ static void rgui_frame(void *data, video_frame_info_t *video_info)
|
|||
case RGUI_ASPECT_RATIO_5_3_CENTRE:
|
||||
default_fb_width = 400;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* 4:3 */
|
||||
default_fb_width = 320;
|
||||
|
@ -6928,8 +6944,22 @@ static enum menu_action rgui_parse_menu_entry_action(
|
|||
}
|
||||
break;
|
||||
case MENU_ACTION_SCAN:
|
||||
/* If this is a playlist, 'scan' command is
|
||||
* used to toggle fullscreen thumbnail view */
|
||||
case MENU_ACTION_START:
|
||||
/* If this is a playlist, both the 'scan'
|
||||
* command and 'start' action are used to
|
||||
* toggle the fullscreen thumbnail view
|
||||
* > 'scan' is more ergonomic, which is a
|
||||
* benefit for RGUI because its low
|
||||
* resolution framebuffer means fullscreen
|
||||
* thumbnails are likely to be viewed far
|
||||
* more often than with other menu drivers
|
||||
* > 'start' is the regular toggle button
|
||||
* for all other menu drivers, and is
|
||||
* included as a fallback here for users
|
||||
* with gamepads with limited numbers of
|
||||
* face buttons (e.g. a NES-style pad
|
||||
* does not possess a RetroPad Y/'scan'
|
||||
* button) */
|
||||
if (rgui->is_playlist)
|
||||
{
|
||||
rgui_toggle_fs_thumbnail(rgui);
|
||||
|
|
|
@ -3971,7 +3971,15 @@ static void xmb_render(void *data,
|
|||
/* 'i' must be of 'size_t', since it is passed
|
||||
* by reference to menu_entries_ctl() */
|
||||
size_t i;
|
||||
float scale_factor;
|
||||
/* c.f. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323
|
||||
* On some platforms (e.g. 32-bit x86 without SSE),
|
||||
* gcc can produce inconsistent floating point results
|
||||
* depending upon optimisation level. This can break
|
||||
* floating point variable comparisons. A workaround is
|
||||
* to declare the affected variable as 'volatile', which
|
||||
* disables optimisations and removes excess precision
|
||||
* (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=323#c87) */
|
||||
volatile float scale_factor;
|
||||
xmb_handle_t *xmb = (xmb_handle_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
size_t end = menu_entries_get_size();
|
||||
|
|
|
@ -416,6 +416,15 @@ enum quit_on_close_content_type
|
|||
QUIT_ON_CLOSE_CONTENT_LAST
|
||||
};
|
||||
|
||||
#if defined(DINGUX) && defined(RS90)
|
||||
enum dingux_rs90_softfilter_type
|
||||
{
|
||||
DINGUX_RS90_SOFTFILTER_POINT = 0,
|
||||
DINGUX_RS90_SOFTFILTER_BRESENHAM_HORZ,
|
||||
DINGUX_RS90_SOFTFILTER_LAST
|
||||
};
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
#include "../manual_content_scan.h"
|
||||
#include "../core_backup.h"
|
||||
#include "../misc/cpufreq/cpufreq.h"
|
||||
#include "../input/input_remapping.h"
|
||||
|
||||
/* Spacers used for '<content> - <core name>' labels
|
||||
* in playlists */
|
||||
|
@ -6027,6 +6028,12 @@ unsigned menu_displaylist_build_list(
|
|||
MENU_ENUM_LABEL_VIDEO_DINGUX_IPU_FILTER_TYPE,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
count++;
|
||||
#if defined(RS90)
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||
MENU_ENUM_LABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
count++;
|
||||
#endif
|
||||
#endif
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||
MENU_ENUM_LABEL_VIDEO_SHADER_DELAY,
|
||||
|
@ -7767,7 +7774,8 @@ unsigned menu_displaylist_build_list(
|
|||
case DISPLAYLIST_VIDEO_SCALING_SETTINGS_LIST:
|
||||
{
|
||||
#if defined(DINGUX)
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux"))
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux") ||
|
||||
string_is_equal(settings->arrays.video_driver, "sdl_rs90"))
|
||||
{
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
|
@ -7785,6 +7793,11 @@ unsigned menu_displaylist_build_list(
|
|||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER,
|
||||
PARSE_ONLY_BOOL, false) == 0)
|
||||
count++;
|
||||
if (settings->bools.video_scale_integer)
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
PARSE_ONLY_BOOL, false) == 0)
|
||||
count++;
|
||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||
MENU_ENUM_LABEL_VIDEO_ASPECT_RATIO_INDEX,
|
||||
PARSE_ONLY_UINT, false) == 0)
|
||||
|
|
|
@ -5200,6 +5200,32 @@ static void setting_get_string_representation_uint_video_dingux_refresh_rate(
|
|||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(RS90)
|
||||
static void setting_get_string_representation_uint_video_dingux_rs90_softfilter_type(
|
||||
rarch_setting_t *setting,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (!setting)
|
||||
return;
|
||||
|
||||
switch (*setting->value.target.unsigned_integer)
|
||||
{
|
||||
case DINGUX_RS90_SOFTFILTER_POINT:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_POINT),
|
||||
len);
|
||||
break;
|
||||
case DINGUX_RS90_SOFTFILTER_BRESENHAM_HORZ:
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_BRESENHAM_HORZ),
|
||||
len);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
static void setting_get_string_representation_uint_input_auto_game_focus(
|
||||
|
@ -7615,10 +7641,14 @@ static void general_write_handler(rarch_setting_t *setting)
|
|||
case MENU_ENUM_LABEL_VIDEO_CTX_SCALING:
|
||||
#if defined(DINGUX)
|
||||
case MENU_ENUM_LABEL_VIDEO_DINGUX_IPU_FILTER_TYPE:
|
||||
#if defined(RS90)
|
||||
case MENU_ENUM_LABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE:
|
||||
#endif
|
||||
#endif
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
video_driver_set_filtering(1, settings->bools.video_ctx_scaling, settings->bools.video_ctx_scaling);
|
||||
video_driver_set_filtering(1, settings->bools.video_smooth,
|
||||
settings->bools.video_ctx_scaling);
|
||||
}
|
||||
break;
|
||||
case MENU_ENUM_LABEL_VIDEO_ROTATION:
|
||||
|
@ -7959,8 +7989,24 @@ static void general_write_handler(rarch_setting_t *setting)
|
|||
* force a cache refresh on the next
|
||||
* core info initialisation */
|
||||
if (*setting->value.target.boolean)
|
||||
core_info_cache_force_refresh(!string_is_empty(path_libretro_info) ?
|
||||
path_libretro_info : dir_libretro);
|
||||
if (!core_info_cache_force_refresh(!string_is_empty(path_libretro_info) ?
|
||||
path_libretro_info : dir_libretro))
|
||||
{
|
||||
/* core_info_cache_force_refresh() will fail
|
||||
* if we cannot write to the the core_info
|
||||
* directory. This will typically only happen
|
||||
* on platforms where the core_info directory
|
||||
* is explicitly (and intentionally) placed on
|
||||
* read-only storage. In this case, core info
|
||||
* caching cannot function correctly anyway,
|
||||
* so we simply force-disable the feature */
|
||||
configuration_set_bool(settings,
|
||||
settings->bools.core_info_cache_enable, false);
|
||||
runloop_msg_queue_push(
|
||||
msg_hash_to_str(MSG_CORE_INFO_CACHE_UNSUPPORTED),
|
||||
1, 100, true,
|
||||
NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -10954,7 +11000,8 @@ static bool setting_append_list(
|
|||
}
|
||||
|
||||
#if defined(DINGUX) && defined(DINGUX_BETA)
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux"))
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux") ||
|
||||
string_is_equal(settings->arrays.video_driver, "sdl_rs90"))
|
||||
{
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
|
@ -11209,7 +11256,8 @@ static bool setting_append_list(
|
|||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
|
||||
|
||||
#if defined(DINGUX)
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux"))
|
||||
if (string_is_equal(settings->arrays.video_driver, "sdl_dingux") ||
|
||||
string_is_equal(settings->arrays.video_driver, "sdl_rs90"))
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
@ -11366,6 +11414,28 @@ static bool setting_append_list(
|
|||
list_info,
|
||||
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.video_scale_integer_overscale,
|
||||
MENU_ENUM_LABEL_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER_OVERSCALE,
|
||||
DEFAULT_SCALE_INTEGER_OVERSCALE,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE);
|
||||
(*list)[list_info->index - 1].action_ok = setting_bool_action_left_with_refresh;
|
||||
(*list)[list_info->index - 1].action_left = setting_bool_action_left_with_refresh;
|
||||
(*list)[list_info->index - 1].action_right = setting_bool_action_right_with_refresh;
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_CMD(
|
||||
list,
|
||||
list_info,
|
||||
CMD_EVENT_VIDEO_APPLY_STATE_CHANGES);
|
||||
|
||||
#ifdef GEKKO
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
|
@ -11442,6 +11512,27 @@ static bool setting_append_list(
|
|||
menu_settings_list_current_add_range(list, list_info, 0, DINGUX_IPU_FILTER_LAST - 1, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
}
|
||||
#if defined(RS90)
|
||||
else if (string_is_equal(settings->arrays.video_driver, "sdl_rs90"))
|
||||
{
|
||||
CONFIG_UINT(
|
||||
list, list_info,
|
||||
&settings->uints.video_dingux_rs90_softfilter_type,
|
||||
MENU_ENUM_LABEL_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
DEFAULT_DINGUX_RS90_SOFTFILTER_TYPE,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||
(*list)[list_info->index - 1].get_string_representation =
|
||||
&setting_get_string_representation_uint_video_dingux_rs90_softfilter_type;
|
||||
menu_settings_list_current_add_range(list, list_info, 0, DINGUX_RS90_SOFTFILTER_LAST - 1, 1, true, true);
|
||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
#endif
|
||||
{
|
||||
|
@ -14913,10 +15004,11 @@ static bool setting_append_list(
|
|||
general_read_handler);
|
||||
MENU_SETTINGS_LIST_CURRENT_ADD_VALUES(list, list_info, "cfg");
|
||||
|
||||
/* ps2 and sdl_dingux gfx drivers do not support
|
||||
* menu framebuffer transparency */
|
||||
/* ps2 and sdl_dingux/sdl_rs90 gfx drivers do
|
||||
* not support menu framebuffer transparency */
|
||||
if (!string_is_equal(settings->arrays.video_driver, "ps2") &&
|
||||
!string_is_equal(settings->arrays.video_driver, "sdl_dingux"))
|
||||
!string_is_equal(settings->arrays.video_driver, "sdl_dingux") &&
|
||||
!string_is_equal(settings->arrays.video_driver, "sdl_rs90"))
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
|
@ -16405,7 +16497,7 @@ static bool setting_append_list(
|
|||
&settings->bools.menu_timedate_enable,
|
||||
MENU_ENUM_LABEL_TIMEDATE_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE,
|
||||
true,
|
||||
DEFAULT_MENU_TIMEDATE_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
|
|
|
@ -491,6 +491,7 @@ enum msg_hash_enums
|
|||
MSG_LOCALAP_ERROR_CONFIG_PARSE,
|
||||
#endif
|
||||
MSG_UNSUPPORTED_VIDEO_MODE,
|
||||
MSG_CORE_INFO_CACHE_UNSUPPORTED,
|
||||
|
||||
MENU_LABEL(MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT),
|
||||
MENU_LABEL(MENU_XMB_ANIMATION_MOVE_UP_DOWN),
|
||||
|
@ -1072,6 +1073,7 @@ enum msg_hash_enums
|
|||
MENU_LABEL(VIDEO_NOTCH_WRITE_OVER),
|
||||
|
||||
MENU_LABEL(VIDEO_SCALE_INTEGER),
|
||||
MENU_LABEL(VIDEO_SCALE_INTEGER_OVERSCALE),
|
||||
MENU_LABEL(VIDEO_VIEWPORT_CUSTOM_X),
|
||||
MENU_LABEL(VIDEO_VIEWPORT_CUSTOM_Y),
|
||||
MENU_LABEL(VIDEO_VIEWPORT_CUSTOM_WIDTH),
|
||||
|
@ -2472,6 +2474,12 @@ enum msg_hash_enums
|
|||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_REFRESH_RATE_60HZ,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_REFRESH_RATE_50HZ,
|
||||
#endif
|
||||
#if defined(RS90)
|
||||
MENU_LABEL(VIDEO_DINGUX_RS90_SOFTFILTER_TYPE),
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_POINT,
|
||||
MENU_ENUM_LABEL_VALUE_VIDEO_DINGUX_RS90_SOFTFILTER_BRESENHAM_HORZ,
|
||||
#endif
|
||||
#endif
|
||||
MENU_LABEL(VIDEO_VFILTER),
|
||||
MENU_LABEL(VIDEO_GPU_RECORD),
|
||||
|
|
|
@ -34,13 +34,6 @@ else ifeq ($(LIBRETRO), bluemsx)
|
|||
APP_ICON = pkg/ctr/assets/bluemsx.png
|
||||
APP_BANNER = pkg/ctr/assets/bluemsx_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), chailove)
|
||||
APP_TITLE = ChaiLove
|
||||
APP_PRODUCT_CODE = RARCH-CHAILOVE
|
||||
APP_UNIQUE_ID = 0xBACB2
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), cap32)
|
||||
APP_TITLE = Caprice32
|
||||
APP_AUTHOR = various
|
||||
|
@ -49,6 +42,13 @@ else ifeq ($(LIBRETRO), cap32)
|
|||
APP_ICON = pkg/ctr/assets/Caprice32.png
|
||||
APP_BANNER = pkg/ctr/assets/Caprice32_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), chailove)
|
||||
APP_TITLE = ChaiLove
|
||||
APP_PRODUCT_CODE = RARCH-CHAILOVE
|
||||
APP_UNIQUE_ID = 0xBACB2
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), crocods)
|
||||
APP_TITLE = CROCODS
|
||||
APP_PRODUCT_CODE = RARCH-CROCODS
|
||||
|
@ -88,15 +88,6 @@ else ifeq ($(LIBRETRO), fbalpha2012)
|
|||
APP_ICON = pkg/ctr/assets/fbalpha2012.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_neogeo)
|
||||
APP_TITLE = Final Burn Alpha 2012 - NeoGeo
|
||||
APP_AUTHOR = Team FB Alpha
|
||||
APP_PRODUCT_CODE = RARCH-FBANEOGEO
|
||||
APP_UNIQUE_ID = 0xBAC10
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012_neogeo.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_neogeo_banner.png
|
||||
APP_SYSTEM_MODE = 80MB
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_cps1)
|
||||
APP_TITLE = Final Burn Alpha 2012 - CPS-1
|
||||
APP_AUTHOR = Team FB Alpha
|
||||
|
@ -123,6 +114,15 @@ else ifeq ($(LIBRETRO), fbalpha2012_cps3)
|
|||
APP_BANNER = pkg/ctr/assets/fbalpha2012_cps3_banner.png
|
||||
APP_SYSTEM_MODE = 80MB
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_neogeo)
|
||||
APP_TITLE = Final Burn Alpha 2012 - NeoGeo
|
||||
APP_AUTHOR = Team FB Alpha
|
||||
APP_PRODUCT_CODE = RARCH-FBANEOGEO
|
||||
APP_UNIQUE_ID = 0xBAC10
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012_neogeo.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_neogeo_banner.png
|
||||
APP_SYSTEM_MODE = 80MB
|
||||
|
||||
else ifeq ($(LIBRETRO), fbneo)
|
||||
APP_TITLE = FinalBurn Neo
|
||||
APP_AUTHOR = Team FBNeo
|
||||
|
@ -160,13 +160,6 @@ else ifeq ($(LIBRETRO), freechaf)
|
|||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), frodo)
|
||||
APP_TITLE = Frodo
|
||||
APP_PRODUCT_CODE = RARCH-FRODO
|
||||
APP_UNIQUE_ID = 0xBACB9
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), freeintv)
|
||||
APP_TITLE = FreeIntv
|
||||
APP_AUTHOR = various
|
||||
|
@ -175,6 +168,13 @@ else ifeq ($(LIBRETRO), freeintv)
|
|||
APP_ICON = pkg/ctr/assets/freeintv.png
|
||||
APP_BANNER = pkg/ctr/assets/freeintv_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), frodo)
|
||||
APP_TITLE = Frodo
|
||||
APP_PRODUCT_CODE = RARCH-FRODO
|
||||
APP_UNIQUE_ID = 0xBACB9
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fuse)
|
||||
APP_TITLE = Fuse
|
||||
APP_AUTHOR = various
|
||||
|
@ -197,6 +197,13 @@ else ifeq ($(LIBRETRO), genesis_plus_gx)
|
|||
APP_ICON = pkg/ctr/assets/genesis_plus_gx.png
|
||||
APP_BANNER = pkg/ctr/assets/genesis_plus_gx_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), genesis_plus_gx_wide)
|
||||
APP_TITLE = Genesis Plus GX Libretro Wide
|
||||
APP_PRODUCT_CODE = RARCH-GENPLUSGXWIDE
|
||||
APP_UNIQUE_ID = 0xBACE0
|
||||
APP_ICON = pkg/ctr/assets/genesis_plus_gx.png
|
||||
APP_BANNER = pkg/ctr/assets/genesis_plus_gx_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), gme)
|
||||
APP_TITLE = GME
|
||||
APP_PRODUCT_CODE = RARCH-GME
|
||||
|
@ -226,6 +233,13 @@ else ifeq ($(LIBRETRO), handy)
|
|||
APP_ICON = pkg/ctr/assets/handy.png
|
||||
APP_BANNER = pkg/ctr/assets/handy_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), lowresnx)
|
||||
APP_TITLE = LowRes NX
|
||||
APP_PRODUCT_CODE = RARCH-LOWRESNX
|
||||
APP_UNIQUE_ID = 0xBACD1
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), hatari)
|
||||
APP_TITLE = Hatari
|
||||
APP_PRODUCT_CODE = RARCH-HATARI
|
||||
|
@ -301,14 +315,6 @@ else ifeq ($(LIBRETRO), mgba)
|
|||
APP_ICON = pkg/ctr/assets/mgba.png
|
||||
APP_BANNER = pkg/ctr/assets/mgba_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), nekop2)
|
||||
APP_TITLE = Neko Project 2
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-NP2
|
||||
APP_UNIQUE_ID = 0xBAC1C
|
||||
APP_ICON = pkg/ctr/assets/nekop2.png
|
||||
APP_BANNER = pkg/ctr/assets/nekop2_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), mrboom)
|
||||
APP_TITLE = MrBoom
|
||||
APP_PRODUCT_CODE = RARCH-MRBOOM
|
||||
|
@ -323,6 +329,14 @@ else ifeq ($(LIBRETRO), mu)
|
|||
APP_ICON = pkg/ctr/assets/MU.png
|
||||
APP_BANNER = pkg/ctr/assets/MU_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), nekop2)
|
||||
APP_TITLE = Neko Project 2
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-NP2
|
||||
APP_UNIQUE_ID = 0xBAC1C
|
||||
APP_ICON = pkg/ctr/assets/nekop2.png
|
||||
APP_BANNER = pkg/ctr/assets/nekop2_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), neocd)
|
||||
APP_TITLE = NeoCD
|
||||
APP_PRODUCT_CODE = RARCH-NEOCD
|
||||
|
@ -392,7 +406,6 @@ else ifeq ($(LIBRETRO), pocketcdg)
|
|||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
|
||||
else ifeq ($(LIBRETRO), pokemini)
|
||||
APP_TITLE = PokeMini
|
||||
APP_AUTHOR = justburn
|
||||
|
@ -597,6 +610,13 @@ else ifeq ($(LIBRETRO), vice_xcbm2)
|
|||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), vice_xcbm5x0)
|
||||
APP_TITLE = VICE xcbm5x0
|
||||
APP_PRODUCT_CODE = RARCH-VICE-XCBM5X0
|
||||
APP_UNIQUE_ID = 0xBACD2
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), vice_xpet)
|
||||
APP_TITLE = VICE xpet
|
||||
APP_PRODUCT_CODE = RARCH-VICE-XPET
|
||||
|
@ -611,6 +631,13 @@ else ifeq ($(LIBRETRO), vice_xplus4)
|
|||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), vice_xscpu64)
|
||||
APP_TITLE = VICE xscpu64
|
||||
APP_PRODUCT_CODE = RARCH-VICE-XSCPU64
|
||||
APP_UNIQUE_ID = 0xBACD3
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), vice_xvic)
|
||||
APP_TITLE = VICE xvic
|
||||
APP_PRODUCT_CODE = RARCH-VICE-XVIC
|
||||
|
@ -631,6 +658,7 @@ else ifeq ($(LIBRETRO), x1)
|
|||
APP_UNIQUE_ID = 0xBAC99
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), xrick)
|
||||
APP_TITLE = XRick
|
||||
APP_PRODUCT_CODE = RARCH-XRICK
|
||||
|
|
|
@ -51,8 +51,14 @@ extern unsigned int size_ps2fs_irx;
|
|||
extern unsigned char usbd_irx;
|
||||
extern unsigned int size_usbd_irx;
|
||||
|
||||
extern unsigned char usbhdfsd_irx;
|
||||
extern unsigned int size_usbhdfsd_irx;
|
||||
extern unsigned char bdm_irx;
|
||||
extern unsigned int size_bdm_irx;
|
||||
|
||||
extern unsigned char bdmfs_vfat_irx;
|
||||
extern unsigned int size_bdmfs_vfat_irx;
|
||||
|
||||
extern unsigned char usbmass_bd_irx;
|
||||
extern unsigned int size_usbmass_bd_irx;
|
||||
|
||||
extern unsigned char cdfs_irx;
|
||||
extern unsigned int size_cdfs_irx;
|
||||
|
|
|
@ -4,7 +4,8 @@ IRX_DIR = $(PS2SDK)/iop/irx
|
|||
|
||||
#IRX modules
|
||||
# IRX modules - modules have to be in IRX_DIR
|
||||
IRX_FILES += iomanX.irx fileXio.irx sio2man.irx mtapman.irx padman.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx
|
||||
IRX_FILES += iomanX.irx fileXio.irx sio2man.irx mtapman.irx padman.irx mcman.irx mcserv.irx
|
||||
IRX_FILES += usbd.irx bdm.irx bdmfs_vfat.irx usbmass_bd.irx
|
||||
IRX_FILES += libsd.irx audsrv.irx cdfs.irx
|
||||
IRX_C_FILES = $(IRX_FILES:.irx=_irx.c)
|
||||
|
||||
|
|
107
retroarch.c
107
retroarch.c
|
@ -14296,12 +14296,25 @@ bool command_event(enum event_command cmd, void *data)
|
|||
return false;
|
||||
|
||||
if (!string_is_empty(dir_libretro))
|
||||
{
|
||||
bool cache_supported = false;
|
||||
|
||||
core_info_init_list(path_libretro_info,
|
||||
dir_libretro,
|
||||
ext_name,
|
||||
show_hidden_files,
|
||||
core_info_cache_enable
|
||||
);
|
||||
core_info_cache_enable,
|
||||
&cache_supported);
|
||||
|
||||
/* If core info cache is enabled but cache
|
||||
* functionality is unsupported (i.e. because
|
||||
* the core info directory is on read-only
|
||||
* storage), force-disable the setting to
|
||||
* avoid repeated failures */
|
||||
if (core_info_cache_enable && !cache_supported)
|
||||
configuration_set_bool(settings,
|
||||
settings->bools.core_info_cache_enable, false);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_CORE_DEINIT:
|
||||
|
@ -18137,7 +18150,11 @@ static bool rarch_environment_cb(unsigned cmd, void *data)
|
|||
DRIVERS_CMD_ALL & ~(DRIVER_VIDEO_MASK | DRIVER_INPUT_MASK | DRIVER_MENU_MASK)
|
||||
: DRIVERS_CMD_ALL;
|
||||
|
||||
RARCH_LOG("[Environ]: SET_SYSTEM_AV_INFO.\n");
|
||||
RARCH_LOG("[Environ]: SET_SYSTEM_AV_INFO: %ux%u, aspect: %.3f, fps: %.3f, sample rate: %.2f Hz.\n",
|
||||
(*info)->geometry.base_width, (*info)->geometry.base_height,
|
||||
(*info)->geometry.aspect_ratio,
|
||||
(*info)->timing.fps,
|
||||
(*info)->timing.sample_rate);
|
||||
|
||||
memcpy(av_info, *info, sizeof(*av_info));
|
||||
command_event(CMD_EVENT_REINIT, &reinit_flags);
|
||||
|
@ -26510,46 +26527,46 @@ void input_keyboard_event(bool down, unsigned code,
|
|||
}
|
||||
}
|
||||
|
||||
static bool input_config_bind_map_get_valid(unsigned i)
|
||||
static bool input_config_bind_map_get_valid(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return false;
|
||||
return keybind->valid;
|
||||
}
|
||||
|
||||
unsigned input_config_bind_map_get_meta(unsigned i)
|
||||
unsigned input_config_bind_map_get_meta(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return 0;
|
||||
return keybind->meta;
|
||||
}
|
||||
|
||||
const char *input_config_bind_map_get_base(unsigned i)
|
||||
const char *input_config_bind_map_get_base(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return NULL;
|
||||
return keybind->base;
|
||||
}
|
||||
|
||||
const char *input_config_bind_map_get_desc(unsigned i)
|
||||
const char *input_config_bind_map_get_desc(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return NULL;
|
||||
return msg_hash_to_str(keybind->desc);
|
||||
}
|
||||
|
||||
uint8_t input_config_bind_map_get_retro_key(unsigned i)
|
||||
uint8_t input_config_bind_map_get_retro_key(unsigned bind_index)
|
||||
{
|
||||
const struct input_bind_map *keybind =
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(i);
|
||||
(const struct input_bind_map*)INPUT_CONFIG_BIND_MAP_GET(bind_index);
|
||||
if (!keybind)
|
||||
return 0;
|
||||
return keybind->retro_key;
|
||||
|
@ -31379,6 +31396,19 @@ void video_driver_set_viewport_core(void)
|
|||
(float)geom->base_width / geom->base_height;
|
||||
}
|
||||
|
||||
void video_driver_set_viewport_full(void)
|
||||
{
|
||||
unsigned width = 0;
|
||||
unsigned height = 0;
|
||||
|
||||
video_driver_get_size(&width, &height);
|
||||
|
||||
if (width == 0 || height == 0)
|
||||
return;
|
||||
|
||||
aspectratio_lut[ASPECT_RATIO_FULL].value = (float)width / (float)height;
|
||||
}
|
||||
|
||||
void video_driver_reset_custom_viewport(void)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
|
@ -31473,6 +31503,10 @@ void video_driver_set_aspect_ratio(void)
|
|||
settings->bools.video_aspect_ratio_auto);
|
||||
break;
|
||||
|
||||
case ASPECT_RATIO_FULL:
|
||||
video_driver_set_viewport_full();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
@ -31822,6 +31856,7 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
|||
struct rarch_state *p_rarch = &rarch_st;
|
||||
settings_t *settings = p_rarch->configuration_settings;
|
||||
unsigned video_aspect_ratio_idx = settings->uints.video_aspect_ratio_idx;
|
||||
bool overscale = settings->bools.video_scale_integer_overscale;
|
||||
|
||||
if (video_aspect_ratio_idx == ASPECT_RATIO_CUSTOM)
|
||||
{
|
||||
|
@ -31864,8 +31899,15 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
|||
if (keep_aspect)
|
||||
{
|
||||
/* X/Y scale must be same. */
|
||||
unsigned max_scale = MIN(width / base_width,
|
||||
height / base_height);
|
||||
unsigned max_scale = 1;
|
||||
|
||||
if (overscale)
|
||||
max_scale = MIN((width / base_width) + !!(width % base_width),
|
||||
(height / base_height) + !!(height % base_height));
|
||||
else
|
||||
max_scale = MIN(width / base_width,
|
||||
height / base_height);
|
||||
|
||||
padding_x = width - base_width * max_scale;
|
||||
padding_y = height - base_height * max_scale;
|
||||
}
|
||||
|
@ -32830,6 +32872,7 @@ const gfx_ctx_driver_t *video_context_driver_init_first(void *data,
|
|||
case GFX_CTX_OPENGL_ES_API:
|
||||
case GFX_CTX_OPENVG_API:
|
||||
case GFX_CTX_METAL_API:
|
||||
case GFX_CTX_RSX_API:
|
||||
return gl_context_driver_init_first(
|
||||
p_rarch, settings,
|
||||
data, ident, api, major, minor,
|
||||
|
@ -38007,6 +38050,34 @@ static enum runloop_state runloop_check_state(
|
|||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* If the Aspect Ratio is FULL then update the aspect ratio to the
|
||||
* current video driver aspect ratio (The full window)
|
||||
*
|
||||
* TODO/FIXME
|
||||
* Should possibly be refactored to have last width & driver width & height
|
||||
* only be done once when we are using an overlay OR using aspect ratio
|
||||
* full
|
||||
*/
|
||||
if (settings->uints.video_aspect_ratio_idx == ASPECT_RATIO_FULL)
|
||||
{
|
||||
static unsigned last_width = 0;
|
||||
static unsigned last_height = 0;
|
||||
unsigned video_driver_width = p_rarch->video_driver_width;
|
||||
unsigned video_driver_height = p_rarch->video_driver_height;
|
||||
|
||||
/* Check whether video aspect has changed */
|
||||
if ((video_driver_width != last_width) ||
|
||||
(video_driver_height != last_height))
|
||||
{
|
||||
/* Update set aspect ratio so the full matches the current video width & height */
|
||||
command_event(CMD_EVENT_VIDEO_SET_ASPECT_RATIO, NULL);
|
||||
|
||||
last_width = video_driver_width;
|
||||
last_height = video_driver_height;
|
||||
}
|
||||
}
|
||||
|
||||
/* Check quit key */
|
||||
{
|
||||
bool trig_quit_key, quit_press_twice;
|
||||
|
@ -39315,6 +39386,12 @@ enum retro_language rarch_get_language_from_iso(const char *iso639)
|
|||
{"vi", RETRO_LANGUAGE_VIETNAMESE},
|
||||
{"ar", RETRO_LANGUAGE_ARABIC},
|
||||
{"el", RETRO_LANGUAGE_GREEK},
|
||||
{"tr", RETRO_LANGUAGE_TURKISH},
|
||||
{"sk", RETRO_LANGUAGE_SLOVAK},
|
||||
{"fa", RETRO_LANGUAGE_PERSIAN},
|
||||
{"he", RETRO_LANGUAGE_HEBREW},
|
||||
{"ast", RETRO_LANGUAGE_ASTURIAN},
|
||||
{"fi", RETRO_LANGUAGE_FINNISH},
|
||||
};
|
||||
|
||||
if (string_is_empty(iso639))
|
||||
|
|
|
@ -839,7 +839,8 @@ enum gfx_ctx_api
|
|||
GFX_CTX_DIRECT3D12_API,
|
||||
GFX_CTX_OPENVG_API,
|
||||
GFX_CTX_VULKAN_API,
|
||||
GFX_CTX_METAL_API
|
||||
GFX_CTX_METAL_API,
|
||||
GFX_CTX_RSX_API
|
||||
};
|
||||
|
||||
enum display_metric_types
|
||||
|
@ -1567,6 +1568,8 @@ bool video_driver_supports_read_frame_raw(void);
|
|||
|
||||
void video_driver_set_viewport_core(void);
|
||||
|
||||
void video_driver_set_viewport_full(void);
|
||||
|
||||
void video_driver_reset_custom_viewport(void);
|
||||
|
||||
void video_driver_set_rgba(void);
|
||||
|
@ -1871,6 +1874,7 @@ extern video_driver_t video_xvideo;
|
|||
extern video_driver_t video_sdl;
|
||||
extern video_driver_t video_sdl2;
|
||||
extern video_driver_t video_sdl_dingux;
|
||||
extern video_driver_t video_sdl_rs90;
|
||||
extern video_driver_t video_vg;
|
||||
extern video_driver_t video_omap;
|
||||
extern video_driver_t video_exynos;
|
||||
|
|
|
@ -645,8 +645,12 @@ static const video_driver_t *video_drivers[] = {
|
|||
&video_sdl2,
|
||||
#endif
|
||||
#ifdef HAVE_SDL_DINGUX
|
||||
#if defined(RS90)
|
||||
&video_sdl_rs90,
|
||||
#else
|
||||
&video_sdl_dingux,
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_XVIDEO
|
||||
&video_xvideo,
|
||||
#endif
|
||||
|
@ -995,7 +999,7 @@ static input_device_driver_t *joypad_drivers[] = {
|
|||
};
|
||||
|
||||
#ifdef HAVE_HID
|
||||
static bool null_hid_joypad_query(void *data, unsigned pad) {
|
||||
static bool null_hid_joypad_query(void *data, unsigned pad) {
|
||||
return pad < MAX_USERS; }
|
||||
static const char *null_hid_joypad_name(
|
||||
void *data, unsigned pad) { return NULL; }
|
||||
|
@ -1190,7 +1194,7 @@ static midi_driver_t midi_null = {
|
|||
};
|
||||
|
||||
static midi_driver_t *midi_drivers[] = {
|
||||
#if defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM)
|
||||
#if defined(HAVE_ALSA) && !defined(HAVE_HAKCHI) && !defined(HAVE_SEGAM) && !defined(DINGUX)
|
||||
&midi_alsa,
|
||||
#endif
|
||||
#ifdef HAVE_WINMM
|
||||
|
@ -1665,7 +1669,7 @@ typedef struct discord_state discord_state_t;
|
|||
#endif
|
||||
|
||||
struct runloop
|
||||
{
|
||||
{
|
||||
retro_usec_t frame_time_last; /* int64_t alignment */
|
||||
|
||||
msg_queue_t msg_queue; /* ptr alignment */
|
||||
|
@ -1733,7 +1737,7 @@ struct rarch_state
|
|||
menu_input_t menu_input_state; /* retro_time_t alignment */
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#if defined(HAVE_CG) || defined(HAVE_GLSL) || defined(HAVE_SLANG) || defined(HAVE_HLSL)
|
||||
rarch_timer_t shader_delay_timer; /* int64_t alignment */
|
||||
|
@ -1911,7 +1915,7 @@ struct rarch_state
|
|||
struct retro_subsystem_rom_info
|
||||
subsystem_data_roms[SUBSYSTEM_MAX_SUBSYSTEMS]
|
||||
[SUBSYSTEM_MAX_SUBSYSTEM_ROMS]; /* ptr alignment */
|
||||
|
||||
|
||||
gfx_ctx_driver_t current_video_context; /* ptr alignment */
|
||||
content_state_t content_st; /* ptr alignment */
|
||||
midi_event_t midi_drv_input_event; /* ptr alignment */
|
||||
|
@ -1989,7 +1993,7 @@ struct rarch_state
|
|||
size_t runahead_save_state_size;
|
||||
#endif
|
||||
|
||||
jmp_buf error_sjlj_context; /* 4-byte alignment,
|
||||
jmp_buf error_sjlj_context; /* 4-byte alignment,
|
||||
put it right before long */
|
||||
|
||||
turbo_buttons_t input_driver_turbo_btns; /* int32_t alignment */
|
||||
|
@ -2017,7 +2021,7 @@ struct rarch_state
|
|||
int reannounce;
|
||||
#endif
|
||||
|
||||
input_device_info_t input_device_info[MAX_INPUT_DEVICES];
|
||||
input_device_info_t input_device_info[MAX_INPUT_DEVICES];
|
||||
/* unsigned alignment */
|
||||
#ifdef HAVE_MENU
|
||||
menu_dialog_t dialog_st; /* unsigned alignment */
|
||||
|
@ -2093,7 +2097,7 @@ struct rarch_state
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
menu_input_pointer_hw_state_t menu_input_pointer_hw_state;
|
||||
menu_input_pointer_hw_state_t menu_input_pointer_hw_state;
|
||||
/* int16_t alignment */
|
||||
#endif
|
||||
|
||||
|
@ -2373,7 +2377,8 @@ struct aspect_ratio_elem aspectratio_lut[ASPECT_RATIO_END] = {
|
|||
{ 0.0f, "Config" },
|
||||
{ 1.0f, "Square pixel" },
|
||||
{ 1.0f, "Core provided" },
|
||||
{ 0.0f, "Custom" }
|
||||
{ 0.0f, "Custom" },
|
||||
{ 1.3333f, "Full" }
|
||||
};
|
||||
|
||||
static gfx_api_gpu_map gpu_map[] = {
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "../list_special.h"
|
||||
#include "../retroarch.h"
|
||||
#include "../input/input_driver.h"
|
||||
#include "../input/input_remapping.h"
|
||||
|
||||
#include "tasks_internal.h"
|
||||
#ifdef HAVE_BLISSBOX
|
||||
|
|
|
@ -133,7 +133,7 @@ static int task_http_iterate_transfer(retro_task_t *task)
|
|||
task_set_progress(task, (signed)(pos * 100 / tot));
|
||||
else
|
||||
/* but invert the logic if it would cause an overflow */
|
||||
task_set_progress(task, MAX((signed)pos / (tot / 100), 100));
|
||||
task_set_progress(task, MIN((signed)pos / (tot / 100), 100));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue