Merge branch 'master' into modelview

This commit is contained in:
CozmoP 2019-01-04 01:33:30 +01:00 committed by GitHub
commit 5012b27853
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
230 changed files with 7783 additions and 949 deletions

View File

@ -94,6 +94,7 @@ FIX94
Flame Sage (chris062689) Flame Sage (chris062689)
flyinghead flyinghead
Francisco José García García (frangarcj) Francisco José García García (frangarcj)
Francisco Javier Trujillo Mata (fjtrujy)
GameDragon2k GameDragon2k
Garrett Brown (garbear) Garrett Brown (garbear)
gblues gblues
@ -141,6 +142,7 @@ JuanVCS
Justin Jacobs (dorkster) Justin Jacobs (dorkster)
Justin Weiss (justinweiss) Justin Weiss (justinweiss)
Ken Rossato (rossato) Ken Rossato (rossato)
Krzysztof Haładyn (krzys_h)
kurumushi kurumushi
kwyxz kwyxz
l3iggs l3iggs

View File

@ -1,23 +1,42 @@
# 1.7.6 (future) # 1.7.6 (future)
- ANDROID: Fix Xperia Play input binding
- CHEEVOS: Reset when hardcore mode is toggled
- CORE UPDATER: Allow sideloading cores from the menu
- CPU FILTERS: Add Normal2x filter. - CPU FILTERS: Add Normal2x filter.
- DATE: Add Date / Time style options. - DATE: Add Date / Time style options.
- MIDI: Add a Linux ALSA driver for MIDI. - DEBUGGING: Add an integrated crash handler for debug builds (see https://docs.libretro.com/tech/debugging)
- DISCORD: Register the application name properly.
- DISK CONTROL: Remember the last used folder / current active folder to make disk-swapping faster.
- INPUT/SDL: Flush the joypad events. Decreases cpu usage over time with the SDL joypad driver.
- LOCALIZATION: Add Greek translation. - LOCALIZATION: Add Greek translation.
- LOCALIZATION: Update German translation. - LOCALIZATION: Update German translation.
- LOCALIZATION: Update Italian translation. - LOCALIZATION: Update Italian translation.
- LOCALIZATION: Update Simplified Chinese translation.
- LOCALIZATION: Update Japanese translation. - LOCALIZATION: Update Japanese translation.
- LOCALIZATION: Update Simplified Chinese translation.
- MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now) - MENU: Only show CRT SwitchRes if video display server is implemented (Windows/Linux for now)
- MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly. - MENU: User Interface -> Appearance -> 'Menu Font Green/Blue Color' settings now work properly.
- MIDI: Add a Linux ALSA driver for MIDI.
- NETPLAY: Force fast-save-states when netlay is enabled
- PS2: Initial PlayStation2 port.
- PS4: Initial PlayStation4 port.
- RECORDING: Implement recording options in the menu complete with quality profiles, streaming, and proper file naming
- SCANNER: Fix GDI disc scanning. - SCANNER: Fix GDI disc scanning.
- SHADERS: Fix auto shader preset loading on D3D10, D3D11, D3D12
- SUBSYSTEM: Allow more than 10 subsystems
- SUBSYSTEM: Cores that use subsystem for complex scenarios can now load content without starting a regular content first
- SUBSYSTEM: Remember the last used folder to make loading subsystem type content faster
- SWITCH/LIBNX: Improve touch scaling calculation. - SWITCH/LIBNX: Improve touch scaling calculation.
- SWITCH: Proper button labels. - SWITCH: Proper button labels.
- VULKAN: Fix RGUI crashing at startup. - VULKAN: Fix RGUI crashing at startup.
- VULKAN: Fix secondary screens in overlays not working. - VULKAN: Fix secondary screens in overlays not working.
- WAYLAND: Implement idle-inhibit support (needed for screensaver suspend). - WAYLAND: Implement idle-inhibit support (needed for screensaver suspend).
- WINDOWS/WSA: Network Information info is blank until first network operation.
- WINDOWS: SSL/TLS connections now work properly.
- WIIU: Initial netplay peer-to-peer support. Network information working. - WIIU: Initial netplay peer-to-peer support. Network information working.
- WINDOWS/WSA: Network Information info is blank until first network operation.
- WINDOWS: Fix an ancient bug that caused wrong mappings for keyboard arrows
- WINDOWS: Remember window size and position if so desired
- WINDOWS: SSL/TLS connections now work properly.
- UWP: Initial UWP port.
- XBONE: Initial Xbox One port.
# 1.7.5 # 1.7.5
- CAMERA: Fix Video4Linux2 driver that broke years ago. - CAMERA: Fix Video4Linux2 driver that broke years ago.

View File

@ -32,6 +32,8 @@ DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
ifneq ($(findstring BSD,$(OS)),) ifneq ($(findstring BSD,$(OS)),)
CFLAGS += -DBSD CFLAGS += -DBSD
LDFLAGS += -L/usr/local/lib LDFLAGS += -L/usr/local/lib
UDEV_CFLAGS += -I/usr/local/include/libepoll-shim
UDEV_LIBS += -lepoll-shim
endif endif
ifneq ($(findstring DOS,$(OS)),) ifneq ($(findstring DOS,$(OS)),)
@ -82,6 +84,11 @@ else
OPTIMIZE_FLAG = -O3 -ffast-math OPTIMIZE_FLAG = -O3 -ffast-math
endif endif
ifeq ($(HAVE_DRMINGW), 1)
CFLAGS += -DHAVE_DRMINGW
LDFLAGS += $(DRMINGW_LIBS)
endif
ifneq ($(findstring Win32,$(OS)),) ifneq ($(findstring Win32,$(OS)),)
LDFLAGS += -mwindows LDFLAGS += -mwindows
endif endif
@ -243,12 +250,24 @@ install: $(TARGET)
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6 chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch.6
chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6 chmod 644 $(DESTDIR)$(MAN_DIR)/man6/retroarch-cg2glsl.6
chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg chmod 644 $(DESTDIR)$(DATA_DIR)/pixmaps/retroarch.svg
@if test -d media/assets; then \ @if test -d media/assets && test $(HAVE_ASSETS); then \
echo "Installing media assets..."; \ echo "Installing media assets..."; \
mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \ mkdir -p $(DESTDIR)$(ASSETS_DIR)/assets; \
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \ if test $(HAVE_ZARCH) = 1; then \
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \ cp -r media/assets/zarch/ $(DESTDIR)$(ASSETS_DIR)/assets; \
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \ fi; \
if test $(HAVE_MATERIALUI) = 1; then \
cp -r media/assets/glui/ $(DESTDIR)$(ASSETS_DIR)/assets; \
fi; \
if test $(HAVE_NUKLEAR) = 1; then \
cp -r media/assets/nuklear/ $(DESTDIR)$(ASSETS_DIR)/assets; \
fi; \
if test $(HAVE_XMB) = 1; then \
cp -r media/assets/xmb/ $(DESTDIR)$(ASSETS_DIR)/assets; \
fi; \
if test $(HAVE_OZONE) = 1; then \
cp -r media/assets/ozone/ $(DESTDIR)$(ASSETS_DIR)/assets; \
fi; \
cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \ cp media/assets/COPYING $(DESTDIR)$(DOC_DIR)/COPYING.assets; \
echo "Asset copying done."; \ echo "Asset copying done."; \
fi fi

View File

@ -657,25 +657,25 @@ endif
# XMB and MaterialUI are always enabled if supported and not explicitly disabled # XMB and MaterialUI are always enabled if supported and not explicitly disabled
ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1) ifeq ($(HW_CONTEXT_MENU_DRIVERS), 1)
#ifeq ($(HAVE_ZARCH),) ifeq ($(HAVE_ZARCH),)
#HAVE_ZARCH = 1 HAVE_ZARCH = 0
#endif endif
ifeq ($(HAVE_MATERIALUI),) ifeq ($(HAVE_MATERIALUI),)
HAVE_MATERIALUI = 1 HAVE_MATERIALUI = 1
endif endif
#ifeq ($(HAVE_NUKLEAR),) ifeq ($(HAVE_NUKLEAR),)
#HAVE_NUKLEAR = 1 HAVE_NUKLEAR = 0
#endif endif
ifeq ($(HAVE_XMB),) ifeq ($(HAVE_XMB),)
HAVE_XMB = 1 HAVE_XMB = 1
endif endif
#ifeq ($(HAVE_STRIPES),) ifeq ($(HAVE_STRIPES),)
#HAVE_STRIPES = 1 HAVE_STRIPES = 0
#endif endif
ifeq ($(HAVE_OZONE),) ifeq ($(HAVE_OZONE),)
HAVE_OZONE = 1 HAVE_OZONE = 1
@ -697,6 +697,7 @@ ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/materialui.o OBJ += menu/drivers/materialui.o
DEFINES += -DHAVE_MATERIALUI DEFINES += -DHAVE_MATERIALUI
HAVE_MENU_COMMON = 1 HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif endif
ifeq ($(HAVE_NUKLEAR), 1) ifeq ($(HAVE_NUKLEAR), 1)
OBJ += menu/drivers/nuklear/nk_common.o OBJ += menu/drivers/nuklear/nk_common.o
@ -704,10 +705,12 @@ ifeq ($(HAVE_RGUI), 1)
OBJ += menu/drivers/nuklear/nk_wnd_debug.o OBJ += menu/drivers/nuklear/nk_wnd_debug.o
OBJ += menu/drivers/nuklear.o OBJ += menu/drivers/nuklear.o
DEFINES += -DHAVE_NUKLEAR DEFINES += -DHAVE_NUKLEAR
HAVE_ASSETS = 1
endif endif
ifeq ($(HAVE_ZARCH), 1) ifeq ($(HAVE_ZARCH), 1)
OBJ += menu/drivers/zarch.o OBJ += menu/drivers/zarch.o
DEFINES += -DHAVE_ZARCH DEFINES += -DHAVE_ZARCH
HAVE_ASSETS = 1
endif endif
endif endif
@ -715,6 +718,7 @@ ifeq ($(HAVE_XMB), 1)
OBJ += menu/drivers/xmb.o OBJ += menu/drivers/xmb.o
DEFINES += -DHAVE_XMB DEFINES += -DHAVE_XMB
HAVE_MENU_COMMON = 1 HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif endif
ifeq ($(HAVE_OZONE), 1) ifeq ($(HAVE_OZONE), 1)
@ -726,6 +730,7 @@ ifeq ($(HAVE_OZONE), 1)
OBJ += menu/drivers/ozone/ozone_sidebar.o OBJ += menu/drivers/ozone/ozone_sidebar.o
DEFINES += -DHAVE_OZONE DEFINES += -DHAVE_OZONE
HAVE_MENU_COMMON = 1 HAVE_MENU_COMMON = 1
HAVE_ASSETS = 1
endif endif
ifeq ($(HAVE_STRIPES), 1) ifeq ($(HAVE_STRIPES), 1)
@ -864,6 +869,11 @@ ifeq ($(TARGET), retroarch_switch)
frontend/drivers/platform_switch.o frontend/drivers/platform_switch.o
endif endif
ifeq ($(TARGET), retroarch_orbis)
OBJ += gfx/drivers_context/orbis_ctx.o \
frontend/drivers/platform_orbis.o
endif
ifeq ($(HAVE_WAYLAND), 1) ifeq ($(HAVE_WAYLAND), 1)
OBJ += gfx/drivers_context/wayland_ctx.o \ OBJ += gfx/drivers_context/wayland_ctx.o \
input/drivers/wayland_input.o \ input/drivers/wayland_input.o \

View File

@ -158,8 +158,6 @@ else ifeq ($(libogc_platform), 1)
endif endif
endif endif
LIBS += -logc
ifeq ($(EXTERNAL_LIBOGC), 1) ifeq ($(EXTERNAL_LIBOGC), 1)
LIBS += -lfat LIBS += -lfat
endif endif
@ -176,6 +174,8 @@ else ifeq ($(libogc_platform), 1)
endif endif
endif endif
LIBS += -logc
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
HAVE_RUNAHEAD := 1 HAVE_RUNAHEAD := 1
@ -431,7 +431,7 @@ else ifeq ($(platform), windows_msvc2005_x86)
LD = link.exe LD = link.exe
PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS PLATCFLAGS += -D_WIN32 -D_WIN32_WINNT=0x0410 -D__STDC_CONSTANT_MACROS -D_MBCS
LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib LDFLAGS += shell32.lib user32.lib gdi32.lib comdlg32.lib winmm.lib ole32.lib msimg32.lib
PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH) PATH := $(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../../VC/bin"):$(PATH)
PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE") PATH := $(PATH):$(shell IFS=$$'\n'; cygpath "$(VS80COMNTOOLS)../IDE")

170
Makefile.orbis Normal file
View File

@ -0,0 +1,170 @@
TARGET := retroarch_orbis
DEBUG ?= 0
GRIFFIN_BUILD = 0
WHOLE_ARCHIVE_LINK = 0
PS4_TITLE_ID := RETROARCH
PS4_TITLE_NAME := RetroArch
PC_DEVELOPMENT_IP_ADDRESS =
PC_DEVELOPMENT_UDP_PORT =
OBJ :=
DEFINES :=
ifeq ($(GRIFFIN_BUILD), 1)
OBJ += griffin/griffin.o
DEFINES += -DHAVE_GRIFFIN=1
DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
ifeq ($(DEBUG), 1)
DEFINES += -DHAVE_NETLOGGER
endif
else
HAVE_FILTERS_BUILTIN := 1
HAVE_LANGEXTRA := 0
HAVE_RPNG := 1
HAVE_RJPEG := 1
HAVE_RBMP := 1
HAVE_RTGA := 1
HAVE_ZLIB := 0
HAVE_OVERLAY := 1
HAVE_7ZIP := 1
HAVE_EGL := 1
HAVE_OPENGLES := 1
HAVE_NETWORKING := 0
HAVE_SOCKET_LEGACY := 0
HAVE_MENU := 1
HAVE_MENU_COMMON := 1
HAVE_RGUI := 0
HAVE_MATERIALUI := 0
HAVE_XMB := 1
HAVE_ZARCH := 0
HAVE_THREADS := 1
HAVE_LIBRETRODB := 1
HAVE_CC_RESAMPLER := 1
HAVE_CHEEVOS := 1
RARCH_CONSOLE := 1
HAVE_STATIC_VIDEO_FILTERS = 1
HAVE_STATIC_AUDIO_FILTERS = 1
ifeq ($(DEBUG), 1)
HAVE_NETLOGGER = 1
endif
include Makefile.common
BLACKLIST :=
OBJ := $(filter-out $(BLACKLIST),$(OBJ))
#OBJ += input/drivers/psp_input.o
#OBJ += input/drivers_joypad/psp_joypad.o
#OBJ += audio/drivers/psp_audio.o
#OBJ += frontend/drivers/platform_orbis.o
endif
ifeq ($(strip $(PS4SDK)),)
$(error "Please set PS4SDK in your environment. export PS4SDK=<path to>ps4sdk")
endif
export PATH := $(PATH):$(PS4SDK)/bin
PREFIX :=
CC := $(PREFIX)clang
CXX := $(PREFIX)clang
AS := $(PREFIX)clang
AR := $(PREFIX)ar
OBJCOPY := $(PREFIX)objcopy
STRIP := $(PREFIX)strip
NM := $(PREFIX)nm
LD := $(CXX)
INCDIRS := -I. -Ideps/libz -Ideps/7zip -Ilibretro-common/include -Ideps/stb
LIBDIRS := -L.
ARCHFLAGS := -m64 -DORBIS
CFLAGS += $(ARCHFLAGS) -std=c11 -mcmodel=large -ffreestanding -nostdlib -nostdinc -fno-builtin -fno-stack-protector
ifeq ($(DEBUG), 1)
CFLAGS += -O2 -g
else
CFLAGS += -O3
endif
ASFLAGS := $(ARCHFLAGS) -I$(PS4SDK)/include -target x86_64-scei-ps4-elf -fPIE
LDFLAGS := -O3 -Wall -m64 -nostartfiles -nostdlib -L$(PS4SDK)/lib -pie
ARFLAGS := rcs
CRTFILE ?= $(PS4SDK)/crt0.s
CFLAGS += -Wall -pedantic -Wno-zero-length-array -Wno-format-pedantic
CFLAGS += -D__PS4__ -I$(PS4SDK)/include -I $(PS4SDK)/include/sce
CFLAGS += -target x86_64-scei-ps4-elf -fPIE
CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE
CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES)
ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),)
CFLAGS += -DPC_DEVELOPMENT_IP_ADDRESS='"$(PC_DEVELOPMENT_IP_ADDRESS)"'
endif
ifneq ($(PC_DEVELOPMENT_UDP_PORT),)
CFLAGS += -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT)
endif
ifeq ($(WHOLE_ARCHIVE_LINK), 1)
WHOLE_START := -Wl,--whole-archive
WHOLE_END := -Wl,--no-whole-archive
endif
CXXFLAGS := $(CFLAGS)
PS4_LIBS := -lps4link -ldebugnet -lorbisFile -lelfloader -lorbisKeyboard -lorbis2d -lpng -lz -lorbisGl -lorbisPad -lorbisAudio -lmod -lorbisAudio -lmod -lorbisFileBrowser -lorbisXbmFont -lSceNet_stub -lScePigletv2VSH_stub -lSceSystemService_stub -lSceUserService_stub -lScePad_stub -lSceAudioOut_stub -lSceIme_stub -lSceSysmodule_stub \
-lPs4_extension_kernel_call_standard -lPs4_extension_kernel_execute_dynlib_prepare_dlclose -lPs4_common_kernel -lPs4_common_user -lPs4_common_generic -lPs4LibCInternalAdaptive_stub -lPs4LibKernelAdaptive_stub -lSceLibcInternal_stub -lkernel_stub -lps4Kernel_stub -lPs4_base_stub_resolve_minimal -lPs4_base_kernel_dlsym_standard -lPs4_base_kernel_seek_elf_address_standard -lPs4_base_assembler_register_parameter_standard -lPs4_base_assembler_system_call_standard
LIBS := $(WHOLE_START) -lretro_orbis $(WHOLE_END) $(PS4_LIBS)
TARGETS := $(TARGET).elf
DEPFLAGS = -MT $@ -MMD -MP -MF $*.Tdepend
POSTCOMPILE = mv -f $*.Tdepend $*.depend
all: $(TARGETS)
%.o: %.cpp
%.o: %.cpp %.depend
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.o: %.c
%.o: %.c %.depend
$(CC) -c -o $@ $< $(CFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.o: %.S
%.o: %.S %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.o: %.s
%.o: %.s %.depend
$(CC) -c -o $@ $< $(ASFLAGS) $(INCDIRS) $(DEPFLAGS)
$(POSTCOMPILE)
%.depend: ;
$(TARGET).elf: $(OBJ) libretro_orbis.a
$(LD) $(CRTFILE) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@
clean:
rm -f $(OBJ) $(TARGET).elf
rm -f $(OBJ:.o=.depend)
.PHONY: clean all
.PRECIOUS: %.depend
-include $(OBJ:.o=.depend)

View File

@ -1,11 +1,10 @@
BUILD_PRX = 0 BUILD_PRX = 0
DEBUG = 1 DEBUG = 0
HAVE_KERNEL_PRX = 0 HAVE_KERNEL_PRX = 0
HAVE_LOGGER = 0 HAVE_LOGGER = 0
HAVE_FILE_LOGGER = 0 HAVE_FILE_LOGGER = 0
HAVE_THREADS = 0 HAVE_THREADS = 0
BIG_STACK = 0 BIG_STACK = 0
WHOLE_ARCHIVE_LINK = 0
PS2_IP = 192.168.1.150 PS2_IP = 192.168.1.150
#Configuration for IRX #Configuration for IRX
@ -13,6 +12,7 @@ EE_BIN2O = bin2o
IRX_DIR = $(PS2SDK)/iop/irx IRX_DIR = $(PS2SDK)/iop/irx
TARGET = retroarchps2.elf TARGET = retroarchps2.elf
TARGET_RELEASE = retroarchps2-release.elf
ifeq ($(DEBUG), 1) ifeq ($(DEBUG), 1)
OPTIMIZE_LV := -O0 -g OPTIMIZE_LV := -O0 -g
@ -21,30 +21,23 @@ else
OPTIMIZE_LV := -O2 OPTIMIZE_LV := -O2
endif endif
ifeq ($(WHOLE_ARCHIVE_LINK), 1) INCDIR = -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/ports/include
WHOLE_START := -Wl,--whole-archive
WHOLE_END := -Wl,--no-whole-archive
endif
INCDIR = -I$(PS2SDK)/ports/include -I$(PS2DEV)/gsKit/include -I$(PS2SDK)/iop/include -I$(PS2SDK)/ee/include -I$(PS2SDK)/common/include
INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include INCDIR += -Ips2 -Ips2/include -Ilibretro-common/include
INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper INCDIR += -Ideps -Ideps/stb -Ideps/libz -Ideps/7zip -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/helper
GPVAL = -G0 GPVAL = -G0
CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant CFLAGS = $(OPTIMIZE_LV) -ffast-math -fsingle-precision-constant
ASFLAGS = $(CFLAGS) ASFLAGS = $(CFLAGS)
RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB RARCH_DEFINES += -DPS2 -DUSE_IOP_CTYPE_MACRO -D_MIPS_ARCH_R5900 -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DWANT_ZLIB
RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER RARCH_DEFINES += -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER
LIBDIR = LIBDIR =
LDFLAGS = -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L. LDFLAGS = -L$(PS2SDK)/ports/lib -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ee/lib -L. -s
#LIBS = $(WHOLE_START) -lretro_ps2 $(WHOLE_END) -lstdc++ -lm -lz -lgskit -ldmakit -lpng -laudsrv -lpad -lcdvd -lmad -lfileXio -lpatches LIBS += -lretro_ps2 -lgskit -ldmakit -laudsrv -lpad -lmc -lhdd -lsdl -lfileXio -lpatches -lpoweroff
LIBS += $(WHOLE_START) -lretro_ps2 $(WHOLE_END)
LIBS += -lm -lg -lz -ldebug -lfileXio -laudsrv -lpatches -lpoweroff -ldma -lgskit -ldmakit -lpad -lsdl
#IRX modules #IRX modules
# IRX modules - modules have to be in IRX_DIR # IRX modules - modules have to be in IRX_DIR
IRX = iomanX.irx fileXio.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx IRX = iomanX.irx fileXio.irx mcman.irx mcserv.irx usbd.irx usbhdfsd.irx freesd.irx audsrv.irx poweroff.irx ps2dev9.irx ps2atad.irx ps2hdd.irx ps2fs.irx
IRX_OBJ = $(IRX:.irx=.o) IRX_OBJ = $(IRX:.irx=.o)
EE_OBJS += $(IRX_OBJ) EE_OBJS += $(IRX_OBJ)
@ -95,6 +88,11 @@ run:
debug: clean prepare all run debug: clean prepare all run
package:
ps2-packer $(EE_BIN) $(TARGET_RELEASE)
release: clean all package
#Specific file name and output per IRX Module #Specific file name and output per IRX Module
$(EE_IRX_OBJ): $(EE_IRX_OBJ):
$(EE_BIN2O) $(EE_GPVAL) $(IRX_DIR)/$(@:.o=.irx) $@ $(@:.o=_irx) $(EE_BIN2O) $(EE_GPVAL) $(IRX_DIR)/$(@:.o=.irx) $@ $(@:.o=_irx)
@ -102,4 +100,8 @@ $(EE_IRX_OBJ):
#Include preferences #Include preferences
include $(PS2SDK)/samples/Makefile.pref include $(PS2SDK)/samples/Makefile.pref
include $(PS2SDK)/samples/Makefile.eeglobal include $(PS2SDK)/samples/Makefile.eeglobal
#Linking with C++
$(EE_BIN): $(EE_OBJS) $(PS2SDK)/ee/startup/crt0.o
$(EE_CXX) $(EE_NO_CRT) -T$(PS2SDK)/ee/startup/linkfile $(EE_CXXFLAGS) \
-o $(EE_BIN) $(PS2SDK)/ee/startup/crt0.o $(CRTI_OBJ) $(CRTBEGIN_OBJ) $(EE_OBJS) $(CRTEND_OBJ) $(CRTN_OBJ) $(EE_LDFLAGS) $(EE_LIBS)

View File

@ -42,12 +42,13 @@ endif
MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float MACHDEP := -DGEKKO -DHW_RVL -mrvl -mcpu=750 -meabi -mhard-float
CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE) CFLAGS += -Wall -std=gnu99 $(MACHDEP) $(INCLUDE)
LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map LDFLAGS := $(MACHDEP) -Wl,-Map,$(notdir $(ELF_TARGET)).map
LIBS := -lwiiuse -logc -lbte
ifeq ($(EXTERNAL_LIBOGC), 1) ifeq ($(EXTERNAL_LIBOGC), 1)
LIBS += -lfat LIBS := -lfat
endif endif
LIBS += -lwiiuse -logc -lbte
APP_BOOTER_DIR = wii/app_booter APP_BOOTER_DIR = wii/app_booter
OBJ = frontend/frontend_salamander.o \ OBJ = frontend/frontend_salamander.o \

View File

@ -122,6 +122,9 @@ static const audio_driver_t *audio_drivers[] = {
#if defined(PSP) || defined(VITA) #if defined(PSP) || defined(VITA)
&audio_psp, &audio_psp,
#endif #endif
#if defined(PS2)
&audio_ps2,
#endif
#ifdef _3DS #ifdef _3DS
&audio_ctr_csnd, &audio_ctr_csnd,
&audio_ctr_dsp, &audio_ctr_dsp,

View File

@ -21,7 +21,7 @@ static void *null_audio_init(const char *device, unsigned rate, unsigned latency
unsigned block_frames, unsigned block_frames,
unsigned *new_rate) unsigned *new_rate)
{ {
RARCH_ERR("Using the null audio driver. RetroArch will be silent."); RARCH_ERR("Using the null audio driver. RetroArch will be silent.\n");
(void)device; (void)device;
(void)rate; (void)rate;

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

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

View File

@ -201,9 +201,10 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
{ {
xaudio2_t *handle = NULL; xaudio2_t *handle = NULL;
WAVEFORMATEX wfx = {0}; WAVEFORMATEX wfx = {0};
#if !defined(_XBOX) && !defined(__WINRT__)
#ifndef _XBOX HRESULT hr = CoInitialize(NULL);
CoInitializeEx(0, COINIT_MULTITHREADED); if (FAILED(hr))
return NULL;
#endif #endif
#if defined(__cplusplus) && !defined(CINTERFACE) #if defined(__cplusplus) && !defined(CINTERFACE)
@ -222,8 +223,13 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
if (FAILED(XAudio2Create(&handle->pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR))) if (FAILED(XAudio2Create(&handle->pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR)))
goto error; goto error;
#if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL, AudioCategory_GameEffects)))
goto error;
#else
if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL))) if (FAILED(IXAudio2_CreateMasteringVoice(handle->pXAudio2, &handle->pMasterVoice, channels, samplerate, 0, device, NULL)))
goto error; goto error;
#endif
xaudio2_set_wavefmt(&wfx, channels, samplerate); xaudio2_set_wavefmt(&wfx, channels, samplerate);
@ -250,6 +256,9 @@ static xaudio2_t *xaudio2_new(unsigned samplerate, unsigned channels,
error: error:
xaudio2_free(handle); xaudio2_free(handle);
#if !defined(_XBOX) && !defined(__WINRT__)
CoUninitialize();
#endif
return NULL; return NULL;
} }
@ -399,6 +408,10 @@ static void xa_free(void *data)
if (xa->xa) if (xa->xa)
xaudio2_free(xa->xa); xaudio2_free(xa->xa);
free(xa); free(xa);
#if !defined(_XBOX) && !defined(__WINRT__)
CoUninitialize();
#endif
} }
static size_t xa_write_avail(void *data) static size_t xa_write_avail(void *data)

View File

@ -1,7 +1,5 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2018 - Krzysztof Haładyn
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2010-2014 - OV2
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * 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- * of the GNU General Public License as published by the Free Software Found-
@ -15,350 +13,14 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
/* Kinda stripped down. Only contains the bare essentials used in RetroArch. */ #if (_WIN32_WINNT >= 0x0602 /*_WIN32_WINNT_WIN8*/)
/* XAudio 2.7 it part of the old DirectX SDKs. XAudio 2.8+ is part of the
#ifndef XAUDIO2_STRIPPED_H * Windows OS itself (starting from Windows 8). Since UWP lets you access
#define XAUDIO2_STRIPPED_H * only libraries that are built-in to the OS, the headers had to be
* upgraded to the newer version to get audio support working. */
#include <retro_inline.h> #include "xaudio29.h"
#include <retro_environment.h>
/* All structures defined in this file use tight field packing */
#pragma pack(push, 1)
#if defined(__cplusplus) && !defined(CINTERFACE)
#define X2DEFAULT(x) = (x)
#else #else
#define X2DEFAULT(x) /* The old version still has to be there since XAudio 2.8 is not available
* on Windows 7 and earlier */
#include "xaudio27.h"
#endif #endif
#ifdef _XBOX
#include <xtl.h>
#ifndef __cplusplus
#define OPAQUE interface
#endif
#define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
DEFINE_CLSID(XAudio2, 3eda9b49, 2085, 498b, 9b, b2, 39, a6, 77, 84, 93, de);
DEFINE_CLSID(XAudio2_Debug, 47199894, 7cc2, 444d, 98, 73, ce, d2, 56, 2c, c6, 0e);
DEFINE_IID(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
#include <audiodefs.h> /* Basic audio data types and constants */
#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <basetyps.h>
#include <objbase.h>
#include <mmreg.h>
#ifndef __cplusplus
#undef OPAQUE
#define OPAQUE struct
#endif
#define DEFINE_GUID_X(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID_X(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID_X(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#ifndef __cplusplus
#ifndef INTERFACE
#define INTERFACE void
#endif
#endif
DEFINE_CLSID_X(XAudio2, 5a508685, a254, 4fba, 9b, 82, 9a, 24, b0, 03, 06, af); /* 2.7 */
DEFINE_IID_X(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
#endif
#ifdef _XBOX
#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f
#else
#define XAUDIO2_DEFAULT_FREQ_RATIO 4.0f
#endif
#define XAUDIO2_COMMIT_NOW 0
#define XAUDIO2_DEFAULT_CHANNELS 0
#define XAUDIO2_DEFAULT_SAMPLERATE 0
#define XAUDIO2_DEBUG_ENGINE 0x0001
#define XAUDIO2_VOICE_NOSRC 0x0004
typedef enum XAUDIO2_DEVICE_ROLE
{
NotDefaultDevice = 0x0,
DefaultConsoleDevice = 0x1,
DefaultMultimediaDevice = 0x2,
DefaultCommunicationsDevice = 0x4,
DefaultGameDevice = 0x8,
GlobalDefaultDevice = 0xf,
InvalidDeviceRole = ~GlobalDefaultDevice
} XAUDIO2_DEVICE_ROLE;
#ifdef _XBOX
typedef enum XAUDIO2_XBOX_HWTHREAD_SPECIFIER
{
XboxThread0 = 0x01,
XboxThread1 = 0x02,
XboxThread2 = 0x04,
XboxThread3 = 0x08,
XboxThread4 = 0x10,
XboxThread5 = 0x20,
XAUDIO2_ANY_PROCESSOR = XboxThread4,
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
} XAUDIO2_XBOX_HWTHREAD_SPECIFIER, XAUDIO2_PROCESSOR;
#else
typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER
{
#if defined(__STDC_C89__)
XAUDIO2_ANY_PROCESSOR = 0xffff,
#else
XAUDIO2_ANY_PROCESSOR = 0xffffffff,
#endif
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER, XAUDIO2_PROCESSOR;
#endif
typedef enum XAUDIO2_FILTER_TYPE {
LowPassFilter,
BandPassFilter,
HighPassFilter
} XAUDIO2_FILTER_TYPE;
typedef struct XAUDIO2_DEVICE_DETAILS
{
WCHAR DeviceID[256];
WCHAR DisplayName[256];
XAUDIO2_DEVICE_ROLE Role;
WAVEFORMATEXTENSIBLE OutputFormat;
} XAUDIO2_DEVICE_DETAILS;
/* Forward declarations. */
#ifdef __cplusplus
struct XAUDIO2_VOICE_DETAILS;
struct XAUDIO2_VOICE_SENDS;
struct XAUDIO2_EFFECT_DESCRIPTOR;
struct XAUDIO2_EFFECT_CHAIN;
struct XAUDIO2_FILTER_PARAMETERS;
struct XAUDIO2_BUFFER_WMA;
struct XAUDIO2_VOICE_STATE;
struct XAUDIO2_PERFORMANCE_DATA;
struct XAUDIO2_DEBUG_CONFIGURATION;
struct IXAudio2EngineCallback;
struct IXAudio2SubmixVoice;
#else
typedef OPAQUE XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS;
typedef OPAQUE XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS;
typedef OPAQUE XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR;
typedef OPAQUE XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN;
typedef OPAQUE XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS;
typedef OPAQUE XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA;
typedef OPAQUE XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE;
typedef OPAQUE XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA;
typedef OPAQUE XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION;
typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback;
typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice;
#endif
typedef struct XAUDIO2_BUFFER
{
UINT32 Flags;
UINT32 AudioBytes;
const BYTE* pAudioData;
UINT32 PlayBegin;
UINT32 PlayLength;
UINT32 LoopBegin;
UINT32 LoopLength;
UINT32 LoopCount;
void *pContext;
} XAUDIO2_BUFFER;
#undef INTERFACE
#define INTERFACE IXAudio2VoiceCallback
DECLARE_INTERFACE(IXAudio2VoiceCallback)
{
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE;
STDMETHOD_(void, OnStreamEnd) (THIS) PURE;
STDMETHOD_(void, OnBufferStart) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnBufferEnd) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnLoopEnd) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
};
#undef INTERFACE
#define INTERFACE IXAudio2Voice
DECLARE_INTERFACE(IXAudio2Voice)
{
#define Declare_IXAudio2Voice_Methods() \
STDMETHOD_(void, GetVoiceDetails) (THIS_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \
STDMETHOD(SetOutputVoices) (THIS_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \
STDMETHOD(SetEffectChain) (THIS_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \
STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, BOOL* pEnabled) PURE; \
STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \
const void *pParameters, \
UINT32 ParametersByteSize, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, void *pParameters, \
UINT32 ParametersByteSize) PURE; \
STDMETHOD(SetFilterParameters) (THIS_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetFilterParameters) (THIS_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
STDMETHOD_(void, SetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, const XAUDIO2_FILTER_PARAMETERS* param, \
UINT32 op X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, XAUDIO2_FILTER_PARAMETERS* param) PURE; \
STDMETHOD(SetVolume) (THIS_ float Volume, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetVolume) (THIS_ float* pVolume) PURE; \
STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, const float* pVolumes, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, float* pVolumes) PURE; \
STDMETHOD(SetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
UINT32 SourceChannels, UINT32 DestinationChannels, \
const float* pLevelMatrix, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
UINT32 SourceChannels, UINT32 DestinationChannels, \
float* pLevelMatrix) PURE; \
STDMETHOD_(void, DestroyVoice) (THIS) PURE
Declare_IXAudio2Voice_Methods();
};
#undef INTERFACE
#define INTERFACE IXAudio2MasteringVoice
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
{
Declare_IXAudio2Voice_Methods();
};
#undef INTERFACE
#define INTERFACE IXAudio2SourceVoice
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
{
Declare_IXAudio2Voice_Methods();
STDMETHOD(Start) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD(Stop) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD(SubmitSourceBuffer) (THIS_ const XAUDIO2_BUFFER* pBuffer, const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE;
STDMETHOD(FlushSourceBuffers) (THIS) PURE;
STDMETHOD(Discontinuity) (THIS) PURE;
STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD_(void, GetState) (THIS_ XAUDIO2_VOICE_STATE* pVoiceState) PURE;
STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio,
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
};
#undef INTERFACE
#define INTERFACE IXAudio2
DECLARE_INTERFACE_(IXAudio2, IUnknown)
{
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvInterface) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
STDMETHOD(GetDeviceCount) (THIS_ UINT32* pCount) PURE;
STDMETHOD(GetDeviceDetails) (THIS_ UINT32 Index, XAUDIO2_DEVICE_DETAILS* pDeviceDetails) PURE;
STDMETHOD(Initialize) (THIS_ UINT32 Flags X2DEFAULT(0),
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)) PURE;
STDMETHOD(RegisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
STDMETHOD_(void, UnregisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
STDMETHOD(CreateSourceVoice) (THIS_ IXAudio2SourceVoice** ppSourceVoice,
const WAVEFORMATEX* pSourceFormat,
UINT32 Flags X2DEFAULT(0),
float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO),
IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL),
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(CreateSubmixVoice) (THIS_ IXAudio2SubmixVoice** ppSubmixVoice,
UINT32 InputChannels, UINT32 InputSampleRate,
UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0),
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(CreateMasteringVoice) (THIS_ IXAudio2MasteringVoice** ppMasteringVoice,
UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS),
UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE),
UINT32 Flags X2DEFAULT(0), UINT32 DeviceIndex X2DEFAULT(0),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(StartEngine) (THIS) PURE;
STDMETHOD_(void, StopEngine) (THIS) PURE;
STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE;
STDMETHOD_(void, GetPerformanceData) (THIS_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE;
STDMETHOD_(void, SetDebugConfiguration) (THIS_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,
void *pReserved X2DEFAULT(NULL)) PURE;
};
#if defined(__cplusplus) && !defined(CINTERFACE)
/* C++ hooks */
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
#define IXAudio2SourceVoice_Stop(handle, a, b) handle->Stop(a, b)
#define IXAudio2SourceVoice_DestroyVoice(handle) handle->DestroyVoice()
#define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice()
#define IXAudio2_Release(handle) handle->Release()
#define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g)
#define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f)
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
#else
/* C hooks */
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
#endif
#ifdef _XBOX
STDAPI XAudio2Create(__deref_out IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0),
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR));
#else
static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_PROCESSOR proc)
{
IXAudio2 *pXAudio2 = NULL;
#ifdef __cplusplus
HRESULT hr = CoCreateInstance(CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, IID_IXAudio2, (void**)&pXAudio2);
#else
HRESULT hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, &IID_IXAudio2, (void**)&pXAudio2);
#endif
if (SUCCEEDED(hr))
{
hr = IXAudio2_Initialize(pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR);
if (SUCCEEDED(hr))
*ppXAudio2 = pXAudio2;
else
IXAudio2_Release(pXAudio2);
}
return hr;
}
#endif
/* Undo the #pragma pack(push, 1) directive at the top of this file */
#pragma pack(pop)
#endif

364
audio/drivers/xaudio27.h Normal file
View File

@ -0,0 +1,364 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2010-2014 - OV2
*
* 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/>.
*/
/* Kinda stripped down. Only contains the bare essentials used in RetroArch. */
#ifndef XAUDIO2_STRIPPED_H
#define XAUDIO2_STRIPPED_H
#include <retro_inline.h>
#include <retro_environment.h>
/* All structures defined in this file use tight field packing */
#pragma pack(push, 1)
#if defined(__cplusplus) && !defined(CINTERFACE)
#define X2DEFAULT(x) = (x)
#else
#define X2DEFAULT(x)
#endif
#ifdef _XBOX
#include <xtl.h>
#ifndef __cplusplus
#define OPAQUE interface
#endif
#define DEFINE_CLSID(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#define DEFINE_IID(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
DEFINE_CLSID(XAudio2, 3eda9b49, 2085, 498b, 9b, b2, 39, a6, 77, 84, 93, de);
DEFINE_CLSID(XAudio2_Debug, 47199894, 7cc2, 444d, 98, 73, ce, d2, 56, 2c, c6, 0e);
DEFINE_IID(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
#include <audiodefs.h> /* Basic audio data types and constants */
#else
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#include <basetyps.h>
#include <objbase.h>
#include <mmreg.h>
#ifndef __cplusplus
#undef OPAQUE
#define OPAQUE struct
#endif
#define DEFINE_GUID_X(n, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
static const GUID n = { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#define DEFINE_CLSID_X(className, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID_X(CLSID_##className, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#define DEFINE_IID_X(interfaceName, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
DEFINE_GUID_X(IID_##interfaceName, 0x##l, 0x##w1, 0x##w2, 0x##b1, 0x##b2, 0x##b3, 0x##b4, 0x##b5, 0x##b6, 0x##b7, 0x##b8)
#ifndef __cplusplus
#ifndef INTERFACE
#define INTERFACE void
#endif
#endif
DEFINE_CLSID_X(XAudio2, 5a508685, a254, 4fba, 9b, 82, 9a, 24, b0, 03, 06, af); /* 2.7 */
DEFINE_IID_X(IXAudio2, 8bcf1f58, 9fe7, 4583, 8a, c6, e2, ad, c4, 65, c8, bb);
#endif
#ifdef _XBOX
#define XAUDIO2_DEFAULT_FREQ_RATIO 2.0f
#else
#define XAUDIO2_DEFAULT_FREQ_RATIO 4.0f
#endif
#define XAUDIO2_COMMIT_NOW 0
#define XAUDIO2_DEFAULT_CHANNELS 0
#define XAUDIO2_DEFAULT_SAMPLERATE 0
#define XAUDIO2_DEBUG_ENGINE 0x0001
#define XAUDIO2_VOICE_NOSRC 0x0004
typedef enum XAUDIO2_DEVICE_ROLE
{
NotDefaultDevice = 0x0,
DefaultConsoleDevice = 0x1,
DefaultMultimediaDevice = 0x2,
DefaultCommunicationsDevice = 0x4,
DefaultGameDevice = 0x8,
GlobalDefaultDevice = 0xf,
InvalidDeviceRole = ~GlobalDefaultDevice
} XAUDIO2_DEVICE_ROLE;
#ifdef _XBOX
typedef enum XAUDIO2_XBOX_HWTHREAD_SPECIFIER
{
XboxThread0 = 0x01,
XboxThread1 = 0x02,
XboxThread2 = 0x04,
XboxThread3 = 0x08,
XboxThread4 = 0x10,
XboxThread5 = 0x20,
XAUDIO2_ANY_PROCESSOR = XboxThread4,
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
} XAUDIO2_XBOX_HWTHREAD_SPECIFIER, XAUDIO2_PROCESSOR;
#else
typedef enum XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER
{
#if defined(__STDC_C89__)
XAUDIO2_ANY_PROCESSOR = 0xffff,
#else
XAUDIO2_ANY_PROCESSOR = 0xffffffff,
#endif
XAUDIO2_DEFAULT_PROCESSOR = XAUDIO2_ANY_PROCESSOR
} XAUDIO2_WINDOWS_PROCESSOR_SPECIFIER, XAUDIO2_PROCESSOR;
#endif
typedef enum XAUDIO2_FILTER_TYPE {
LowPassFilter,
BandPassFilter,
HighPassFilter
} XAUDIO2_FILTER_TYPE;
typedef struct XAUDIO2_DEVICE_DETAILS
{
WCHAR DeviceID[256];
WCHAR DisplayName[256];
XAUDIO2_DEVICE_ROLE Role;
WAVEFORMATEXTENSIBLE OutputFormat;
} XAUDIO2_DEVICE_DETAILS;
/* Forward declarations. */
#ifdef __cplusplus
struct XAUDIO2_VOICE_DETAILS;
struct XAUDIO2_VOICE_SENDS;
struct XAUDIO2_EFFECT_DESCRIPTOR;
struct XAUDIO2_EFFECT_CHAIN;
struct XAUDIO2_FILTER_PARAMETERS;
struct XAUDIO2_BUFFER_WMA;
struct XAUDIO2_VOICE_STATE;
struct XAUDIO2_PERFORMANCE_DATA;
struct XAUDIO2_DEBUG_CONFIGURATION;
struct IXAudio2EngineCallback;
struct IXAudio2SubmixVoice;
#else
typedef OPAQUE XAUDIO2_VOICE_DETAILS XAUDIO2_VOICE_DETAILS;
typedef OPAQUE XAUDIO2_VOICE_SENDS XAUDIO2_VOICE_SENDS;
typedef OPAQUE XAUDIO2_EFFECT_DESCRIPTOR XAUDIO2_EFFECT_DESCRIPTOR;
typedef OPAQUE XAUDIO2_EFFECT_CHAIN XAUDIO2_EFFECT_CHAIN;
typedef OPAQUE XAUDIO2_FILTER_PARAMETERS XAUDIO2_FILTER_PARAMETERS;
typedef OPAQUE XAUDIO2_BUFFER_WMA XAUDIO2_BUFFER_WMA;
typedef OPAQUE XAUDIO2_VOICE_STATE XAUDIO2_VOICE_STATE;
typedef OPAQUE XAUDIO2_PERFORMANCE_DATA XAUDIO2_PERFORMANCE_DATA;
typedef OPAQUE XAUDIO2_DEBUG_CONFIGURATION XAUDIO2_DEBUG_CONFIGURATION;
typedef OPAQUE IXAudio2EngineCallback IXAudio2EngineCallback;
typedef OPAQUE IXAudio2SubmixVoice IXAudio2SubmixVoice;
#endif
typedef struct XAUDIO2_BUFFER
{
UINT32 Flags;
UINT32 AudioBytes;
const BYTE* pAudioData;
UINT32 PlayBegin;
UINT32 PlayLength;
UINT32 LoopBegin;
UINT32 LoopLength;
UINT32 LoopCount;
void *pContext;
} XAUDIO2_BUFFER;
#undef INTERFACE
#define INTERFACE IXAudio2VoiceCallback
DECLARE_INTERFACE(IXAudio2VoiceCallback)
{
STDMETHOD_(void, OnVoiceProcessingPassStart) (THIS_ UINT32 BytesRequired) PURE;
STDMETHOD_(void, OnVoiceProcessingPassEnd) (THIS) PURE;
STDMETHOD_(void, OnStreamEnd) (THIS) PURE;
STDMETHOD_(void, OnBufferStart) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnBufferEnd) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnLoopEnd) (THIS_ void *pBufferContext) PURE;
STDMETHOD_(void, OnVoiceError) (THIS_ void *pBufferContext, HRESULT Error) PURE;
};
#undef INTERFACE
#define INTERFACE IXAudio2Voice
DECLARE_INTERFACE(IXAudio2Voice)
{
#define Declare_IXAudio2Voice_Methods() \
STDMETHOD_(void, GetVoiceDetails) (THIS_ XAUDIO2_VOICE_DETAILS* pVoiceDetails) PURE; \
STDMETHOD(SetOutputVoices) (THIS_ const XAUDIO2_VOICE_SENDS* pSendList) PURE; \
STDMETHOD(SetEffectChain) (THIS_ const XAUDIO2_EFFECT_CHAIN* pEffectChain) PURE; \
STDMETHOD(EnableEffect) (THIS_ UINT32 EffectIndex, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD(DisableEffect) (THIS_ UINT32 EffectIndex, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetEffectState) (THIS_ UINT32 EffectIndex, BOOL* pEnabled) PURE; \
STDMETHOD(SetEffectParameters) (THIS_ UINT32 EffectIndex, \
const void *pParameters, \
UINT32 ParametersByteSize, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD(GetEffectParameters) (THIS_ UINT32 EffectIndex, void *pParameters, \
UINT32 ParametersByteSize) PURE; \
STDMETHOD(SetFilterParameters) (THIS_ const XAUDIO2_FILTER_PARAMETERS* pParameters, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetFilterParameters) (THIS_ XAUDIO2_FILTER_PARAMETERS* pParameters) PURE; \
STDMETHOD_(void, SetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, const XAUDIO2_FILTER_PARAMETERS* param, \
UINT32 op X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetOutputFilterParameters) (THIS_ IXAudio2Voice *voice, XAUDIO2_FILTER_PARAMETERS* param) PURE; \
STDMETHOD(SetVolume) (THIS_ float Volume, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetVolume) (THIS_ float* pVolume) PURE; \
STDMETHOD(SetChannelVolumes) (THIS_ UINT32 Channels, const float* pVolumes, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetChannelVolumes) (THIS_ UINT32 Channels, float* pVolumes) PURE; \
STDMETHOD(SetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
UINT32 SourceChannels, UINT32 DestinationChannels, \
const float* pLevelMatrix, \
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE; \
STDMETHOD_(void, GetOutputMatrix) (THIS_ IXAudio2Voice* pDestinationVoice, \
UINT32 SourceChannels, UINT32 DestinationChannels, \
float* pLevelMatrix) PURE; \
STDMETHOD_(void, DestroyVoice) (THIS) PURE
Declare_IXAudio2Voice_Methods();
};
#undef INTERFACE
#define INTERFACE IXAudio2MasteringVoice
DECLARE_INTERFACE_(IXAudio2MasteringVoice, IXAudio2Voice)
{
Declare_IXAudio2Voice_Methods();
};
#undef INTERFACE
#define INTERFACE IXAudio2SourceVoice
DECLARE_INTERFACE_(IXAudio2SourceVoice, IXAudio2Voice)
{
Declare_IXAudio2Voice_Methods();
STDMETHOD(Start) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD(Stop) (THIS_ UINT32 Flags, UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD(SubmitSourceBuffer) (THIS_ const XAUDIO2_BUFFER* pBuffer, const XAUDIO2_BUFFER_WMA* pBufferWMA X2DEFAULT(NULL)) PURE;
STDMETHOD(FlushSourceBuffers) (THIS) PURE;
STDMETHOD(Discontinuity) (THIS) PURE;
STDMETHOD(ExitLoop) (THIS_ UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD_(void, GetState) (THIS_ XAUDIO2_VOICE_STATE* pVoiceState) PURE;
STDMETHOD(SetFrequencyRatio) (THIS_ float Ratio,
UINT32 OperationSet X2DEFAULT(XAUDIO2_COMMIT_NOW)) PURE;
STDMETHOD_(void, GetFrequencyRatio) (THIS_ float* pRatio) PURE;
};
#undef INTERFACE
#define INTERFACE IXAudio2
DECLARE_INTERFACE_(IXAudio2, IUnknown)
{
STDMETHOD(QueryInterface) (THIS_ REFIID riid, void** ppvInterface) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
STDMETHOD(GetDeviceCount) (THIS_ UINT32* pCount) PURE;
STDMETHOD(GetDeviceDetails) (THIS_ UINT32 Index, XAUDIO2_DEVICE_DETAILS* pDeviceDetails) PURE;
STDMETHOD(Initialize) (THIS_ UINT32 Flags X2DEFAULT(0),
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR)) PURE;
STDMETHOD(RegisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
STDMETHOD_(void, UnregisterForCallbacks) (IXAudio2EngineCallback* pCallback) PURE;
STDMETHOD(CreateSourceVoice) (THIS_ IXAudio2SourceVoice** ppSourceVoice,
const WAVEFORMATEX* pSourceFormat,
UINT32 Flags X2DEFAULT(0),
float MaxFrequencyRatio X2DEFAULT(XAUDIO2_DEFAULT_FREQ_RATIO),
IXAudio2VoiceCallback* pCallback X2DEFAULT(NULL),
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(CreateSubmixVoice) (THIS_ IXAudio2SubmixVoice** ppSubmixVoice,
UINT32 InputChannels, UINT32 InputSampleRate,
UINT32 Flags X2DEFAULT(0), UINT32 ProcessingStage X2DEFAULT(0),
const XAUDIO2_VOICE_SENDS* pSendList X2DEFAULT(NULL),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(CreateMasteringVoice) (THIS_ IXAudio2MasteringVoice** ppMasteringVoice,
UINT32 InputChannels X2DEFAULT(XAUDIO2_DEFAULT_CHANNELS),
UINT32 InputSampleRate X2DEFAULT(XAUDIO2_DEFAULT_SAMPLERATE),
UINT32 Flags X2DEFAULT(0), UINT32 DeviceIndex X2DEFAULT(0),
const XAUDIO2_EFFECT_CHAIN* pEffectChain X2DEFAULT(NULL)) PURE;
STDMETHOD(StartEngine) (THIS) PURE;
STDMETHOD_(void, StopEngine) (THIS) PURE;
STDMETHOD(CommitChanges) (THIS_ UINT32 OperationSet) PURE;
STDMETHOD_(void, GetPerformanceData) (THIS_ XAUDIO2_PERFORMANCE_DATA* pPerfData) PURE;
STDMETHOD_(void, SetDebugConfiguration) (THIS_ const XAUDIO2_DEBUG_CONFIGURATION* pDebugConfiguration,
void *pReserved X2DEFAULT(NULL)) PURE;
};
#if defined(__cplusplus) && !defined(CINTERFACE)
/* C++ hooks */
#define IXAudio2_Initialize(handle,a,b) handle->Initialize(a, b)
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, a, b) handle->SubmitSourceBuffer(a, b)
#define IXAudio2SourceVoice_Stop(handle, a, b) handle->Stop(a, b)
#define IXAudio2SourceVoice_DestroyVoice(handle) handle->DestroyVoice()
#define IXAudio2MasteringVoice_DestroyVoice(handle) handle->DestroyVoice()
#define IXAudio2_Release(handle) handle->Release()
#define IXAudio2_CreateSourceVoice(handle, a, b, c, d, e, f, g) handle->CreateSourceVoice(a, b, c, d, e, f, g)
#define IXAudio2_CreateMasteringVoice(handle, a, b, c, d, e, f) handle->CreateMasteringVoice(a, b, c, d, e, f)
#define IXAudio2SourceVoice_Start(handle, a, b) handle->Start(a, b)
#else
/* C hooks */
#define IXAudio2_Initialize(handle,a,b) (handle)->lpVtbl->Initialize(handle, a, b)
#define IXAudio2_Release(handle) (handle)->lpVtbl->Release(handle)
#define IXAudio2_CreateSourceVoice(handle,ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain) (handle)->lpVtbl->CreateSourceVoice(handle, ppSourceVoice,pSourceFormat,Flags,MaxFrequencyRatio,pCallback,pSendList,pEffectChain)
#define IXAudio2_CreateMasteringVoice(handle,ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain) (handle)->lpVtbl->CreateMasteringVoice(handle, ppMasteringVoice,InputChannels,InputSampleRate,Flags,DeviceIndex,pEffectChain)
#define IXAudio2_GetDeviceCount(handle, puCount) (handle)->lpVtbl->GetDeviceCount(handle, puCount)
#define IXAudio2_GetDeviceDetails(handle, Index,pDeviceDetails) (handle)->lpVtbl->GetDeviceDetails(handle, Index, pDeviceDetails)
#define IXAudio2SourceVoice_Start(handle, Flags, OperationSet) (handle)->lpVtbl->Start(handle, Flags, OperationSet)
#define IXAudio2SourceVoice_Stop(handle, Flags, OperationSet) (handle)->lpVtbl->Stop(handle, Flags, OperationSet)
#define IXAudio2SourceVoice_SubmitSourceBuffer(handle, pBuffer, pBufferWMA) (handle)->lpVtbl->SubmitSourceBuffer(handle, pBuffer, pBufferWMA)
#define IXAudio2SourceVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
#define IXAudio2MasteringVoice_DestroyVoice(handle) (handle)->lpVtbl->DestroyVoice(handle)
#endif
#ifdef _XBOX
STDAPI XAudio2Create(__deref_out IXAudio2** ppXAudio2, UINT32 Flags X2DEFAULT(0),
XAUDIO2_PROCESSOR XAudio2Processor X2DEFAULT(XAUDIO2_DEFAULT_PROCESSOR));
#else
static INLINE HRESULT XAudio2Create(IXAudio2 **ppXAudio2, UINT32 flags, XAUDIO2_PROCESSOR proc)
{
IXAudio2 *pXAudio2 = NULL;
#ifdef __cplusplus
HRESULT hr = CoCreateInstance(CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, IID_IXAudio2, (void**)&pXAudio2);
#else
HRESULT hr = CoCreateInstance(&CLSID_XAudio2, NULL, CLSCTX_INPROC_SERVER, &IID_IXAudio2, (void**)&pXAudio2);
#endif
if (SUCCEEDED(hr))
{
hr = IXAudio2_Initialize(pXAudio2, 0, XAUDIO2_DEFAULT_PROCESSOR);
if (SUCCEEDED(hr))
*ppXAudio2 = pXAudio2;
else
IXAudio2_Release(pXAudio2);
}
return hr;
}
#endif
/* Undo the #pragma pack(push, 1) directive at the top of this file */
#pragma pack(pop)
#endif

1306
audio/drivers/xaudio29.h Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3395,7 +3395,7 @@ found:
*coro->settings->arrays.cheevos_password = '\0'; *coro->settings->arrays.cheevos_password = '\0';
strncpy( strncpy(
coro->settings->arrays.cheevos_token, coro->settings->arrays.cheevos_token,
cheevos_locals.token, sizeof(cheevos_locals.token) cheevos_locals.token, sizeof(coro->settings->arrays.cheevos_token)
); );
CORO_RET(); CORO_RET();
} }

View File

@ -302,6 +302,7 @@ static bool quick_menu_show_save_content_dir_overrides = true;
static bool kiosk_mode_enable = false; static bool kiosk_mode_enable = false;
static bool menu_horizontal_animation = true;
static bool menu_show_online_updater = true; static bool menu_show_online_updater = true;
static bool menu_show_load_core = true; static bool menu_show_load_core = true;
static bool menu_show_load_content = true; static bool menu_show_load_content = true;
@ -804,7 +805,23 @@ static char buildbot_server_url[] = "http://bot.libretro.com/nightly/apple/osx/x
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/osx/ppc/latest/"; static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/apple/osx/ppc/latest/";
#endif #endif
#elif defined(_WIN32) && !defined(_XBOX) #elif defined(_WIN32) && !defined(_XBOX)
#if _MSC_VER == 1600 #if _MSC_VER >= 1910
#ifndef __WINRT__
#if defined(__x86_64__) || defined(_M_X64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86_64/latest/";
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-desktop/x86/latest/";
#endif
#else
#if defined(__x86_64__) || defined(_M_X64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/x86_64/latest/";
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/x86/latest/";
#elif defined(__arm__) || defined(_M_ARM)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2017-uwp/arm/latest/";
#endif
#endif
#elif _MSC_VER == 1600
#if defined(__x86_64__) || defined(_M_X64) #if defined(__x86_64__) || defined(_M_X64)
static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/"; static char buildbot_server_url[] = "http://buildbot.libretro.com/nightly/windows-msvc2010/x86_64/latest/";
#elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64) #elif defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_IX86) || defined(_M_IA64)

View File

@ -56,6 +56,10 @@
#include "record/record_driver.h" #include "record/record_driver.h"
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
#include "uwp/uwp_func.h"
#endif
static const char* invalid_filename_chars[] = { static const char* invalid_filename_chars[] = {
/* https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo */ /* https://support.microsoft.com/en-us/help/905231/information-about-the-characters-that-you-cannot-use-in-site-names--fo */
"~", "#", "%", "&", "*", "{", "}", "\\", ":", "[", "]", "?", "/", "|", "\'", "\"", "~", "#", "%", "&", "*", "{", "}", "\\", ":", "[", "]", "?", "/", "|", "\'", "\"",
@ -223,6 +227,7 @@ enum input_driver_enum
INPUT_WII, INPUT_WII,
INPUT_WIIU, INPUT_WIIU,
INPUT_XINPUT, INPUT_XINPUT,
INPUT_UWP,
INPUT_UDEV, INPUT_UDEV,
INPUT_LINUXRAW, INPUT_LINUXRAW,
INPUT_COCOA, INPUT_COCOA,
@ -319,6 +324,13 @@ static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WII;
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WIIU; static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_WIIU;
#elif defined(XENON) #elif defined(XENON)
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_XENON360; static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_XENON360;
#elif defined(HAVE_D3D12) && false
/* FIXME: DX12 performance on Xbox is horrible for some reason, so use d3d11 as default */
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D12;
#elif defined(HAVE_D3D11)
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D11;
#elif defined(HAVE_D3D10)
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D10;
#elif defined(HAVE_D3D9) #elif defined(HAVE_D3D9)
static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D9; static enum video_driver_enum VIDEO_DEFAULT_DRIVER = VIDEO_D3D9;
#elif defined(HAVE_D3D8) #elif defined(HAVE_D3D8)
@ -427,7 +439,9 @@ static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_ALSA;
static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL; static enum midi_driver_enum MIDI_DEFAULT_DRIVER = MIDI_NULL;
#endif #endif
#if defined(XENON) #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_UWP;
#elif defined(XENON)
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XENON360; static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XENON360;
#elif defined(_XBOX360) || defined(_XBOX) || defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1) #elif defined(_XBOX360) || defined(_XBOX) || defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1)
static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XINPUT; static enum input_driver_enum INPUT_DEFAULT_DRIVER = INPUT_XINPUT;
@ -857,6 +871,8 @@ const char *config_get_default_input(void)
return "xenon360"; return "xenon360";
case INPUT_XINPUT: case INPUT_XINPUT:
return "xinput"; return "xinput";
case INPUT_UWP:
return "uwp";
case INPUT_WII: case INPUT_WII:
return "gx"; return "gx";
case INPUT_WIIU: case INPUT_WIIU:
@ -2221,8 +2237,13 @@ static config_file_t *open_default_config_file(void)
(void)path_size; (void)path_size;
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) #if defined(_WIN32) && !defined(_XBOX)
fill_pathname_application_path(app_path, path_size); #if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
/* On UWP, the app install directory is not writable so use the writable LocalState dir instead */
fill_pathname_home_dir(app_path, path_size);
#else
fill_pathname_application_dir(app_path, path_size);
#endif
fill_pathname_resolve_relative(conf_path, app_path, fill_pathname_resolve_relative(conf_path, app_path,
file_path_str(FILE_PATH_MAIN_CONFIG), path_size); file_path_str(FILE_PATH_MAIN_CONFIG), path_size);

View File

@ -32,6 +32,10 @@
#include "core_info.h" #include "core_info.h"
#include "file_path_special.h" #include "file_path_special.h"
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
#include "uwp/uwp_func.h"
#endif
static const char *core_info_tmp_path = NULL; static const char *core_info_tmp_path = NULL;
static const struct string_list *core_info_tmp_list = NULL; static const struct string_list *core_info_tmp_list = NULL;
static core_info_t *core_info_current = NULL; static core_info_t *core_info_current = NULL;
@ -232,11 +236,31 @@ static core_info_list_t *core_info_list_new(const char *path,
core_info_t *core_info = NULL; core_info_t *core_info = NULL;
core_info_list_t *core_info_list = NULL; core_info_list_t *core_info_list = NULL;
const char *path_basedir = libretro_info_dir; const char *path_basedir = libretro_info_dir;
struct string_list *contents = dir_list_new( struct string_list *contents = string_list_new();
path, exts, bool ok;
false,
show_hidden_files, ok = dir_list_append(contents, path, exts,
false, false); false, show_hidden_files, false, false);
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
/* UWP: browse the optional packages for additional cores */
struct string_list *core_packages = string_list_new();
uwp_fill_installed_core_packages(core_packages);
for (i = 0; i < core_packages->size; i++)
{
dir_list_append(contents, core_packages->elems[i].data, exts,
false, show_hidden_files, false, false);
}
string_list_free(core_packages);
#else
/* Keep the old 'directory not found' behavior */
if (!ok)
{
string_list_free(contents);
contents = NULL;
}
#endif
if (!contents) if (!contents)
return NULL; return NULL;
@ -430,12 +454,12 @@ static core_info_list_t *core_info_list_new(const char *path,
core_info_list_resolve_all_firmware(core_info_list); core_info_list_resolve_all_firmware(core_info_list);
} }
dir_list_free(contents); string_list_free(contents);
return core_info_list; return core_info_list;
error: error:
if (contents) if (contents)
dir_list_free(contents); string_list_free(contents);
core_info_list_free(core_info_list); core_info_list_free(core_info_list);
return NULL; return NULL;
} }

View File

@ -18,6 +18,13 @@ cd ..
LDFLAGS=-L. ./configure --disable-dynamic LDFLAGS=-L. ./configure --disable-dynamic
cd dist-scripts cd dist-scripts
elif [ $PLATFORM = "ps2" ] ; then
platform=ps2
SALAMANDER=NO
EXT=a
mkdir -p ../pkg/${platform}/cores/
elif [ $PLATFORM = "psp1" ] ; then elif [ $PLATFORM = "psp1" ] ; then
platform=psp1 platform=psp1
SALAMANDER=yes SALAMANDER=yes
@ -230,7 +237,9 @@ for f in `ls -v *_${platform}.${EXT}`; do
fi fi
# Do manual executable step # Do manual executable step
if [ $PLATFORM = "dex-ps3" ] ; then if [ $PLATFORM = "ps2" ] ; then
make -C ../ -f Makefile.${platform} package -j3
elif [ $PLATFORM = "dex-ps3" ] ; then
$MAKE_FSELF_NPDRM -c ../retroarch_${platform}.elf ../CORE.SELF $MAKE_FSELF_NPDRM -c ../retroarch_${platform}.elf ../CORE.SELF
elif [ $PLATFORM = "cex-ps3" ] ; then elif [ $PLATFORM = "cex-ps3" ] ; then
$SCETOOL_PATH $SCETOOL_FLAGS_CORE ../retroarch_${platform}.elf ../CORE.SELF $SCETOOL_PATH $SCETOOL_FLAGS_CORE ../retroarch_${platform}.elf ../CORE.SELF
@ -253,6 +262,8 @@ for f in `ls -v *_${platform}.${EXT}`; do
cp -fv ../../dist/info/"${name}_libretro.info" ../pkg/${platform}/SSNE10000/USRDIR/cores/info/"${name}_libretro.info" cp -fv ../../dist/info/"${name}_libretro.info" ../pkg/${platform}/SSNE10000/USRDIR/cores/info/"${name}_libretro.info"
fi fi
fi fi
elif [ $PLATFORM = "ps2" ] ; then
mv -f ../retroarchps2-release.elf ../pkg/${platform}/cores/retroarchps2_${name}.elf
elif [ $PLATFORM = "psp1" ] ; then elif [ $PLATFORM = "psp1" ] ; then
mv -f ../EBOOT.PBP ../pkg/${platform}/cores/${name}_libretro.PBP mv -f ../EBOOT.PBP ../pkg/${platform}/cores/${name}_libretro.PBP
elif [ $PLATFORM = "vita" ] ; then elif [ $PLATFORM = "vita" ] ; then
@ -288,6 +299,8 @@ for f in `ls -v *_${platform}.${EXT}`; do
# Remove executable files # Remove executable files
if [ $platform = "ps3" ] ; then if [ $platform = "ps3" ] ; then
rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF
elif [ $PLATFORM = "ps2" ] ; then
rm -f ../retroarchps2.elf
elif [ $PLATFORM = "psp1" ] ; then elif [ $PLATFORM = "psp1" ] ; then
rm -f ../retroarchpsp.elf rm -f ../retroarchpsp.elf
elif [ $PLATFORM = "vita" ] ; then elif [ $PLATFORM = "vita" ] ; then

View File

@ -306,6 +306,9 @@ static void libretro_get_environment_info(void (*func)(retro_environment_t),
static bool load_dynamic_core(void) static bool load_dynamic_core(void)
{ {
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
/* Can't lookup symbols in itself on UWP */
#else
function_t sym = dylib_proc(NULL, "retro_init"); function_t sym = dylib_proc(NULL, "retro_init");
if (sym) if (sym)
@ -319,6 +322,7 @@ static bool load_dynamic_core(void)
RARCH_ERR("Proceeding could cause a crash. Aborting ...\n"); RARCH_ERR("Proceeding could cause a crash. Aborting ...\n");
retroarch_fail(1, "init_libretro_sym()"); retroarch_fail(1, "init_libretro_sym()");
} }
#endif
if (string_is_empty(path_get(RARCH_PATH_CORE))) if (string_is_empty(path_get(RARCH_PATH_CORE)))
{ {
@ -1468,8 +1472,8 @@ bool rarch_environment_cb(unsigned cmd, void *data)
{ {
memcpy(hwr, memcpy(hwr,
cb, offsetof(struct retro_hw_render_callback, stencil)); cb, offsetof(struct retro_hw_render_callback, stencil));
memset(hwr + offsetof(struct retro_hw_render_callback, stencil), memset((uint8_t*)hwr + offsetof(struct retro_hw_render_callback, stencil),
0, sizeof(*cb) - offsetof(struct retro_hw_render_callback, stencil)); 0, sizeof(*cb) - offsetof(struct retro_hw_render_callback, stencil));
} }
else else
memcpy(hwr, cb, sizeof(*cb)); memcpy(hwr, cb, sizeof(*cb));

View File

@ -209,7 +209,21 @@ static void frontend_gx_get_environment_settings(
chdir("carda:/retroarch"); chdir("carda:/retroarch");
#endif #endif
getcwd(g_defaults.dirs[DEFAULT_DIR_CORE], PATH_MAX_LENGTH); getcwd(g_defaults.dirs[DEFAULT_DIR_CORE], PATH_MAX_LENGTH);
#if defined(HW_RVL) && !defined(IS_SALAMANDER)
/* When using external loaders(Wiiflow etc.), getcwd doesn't return the path correctly and
* as a result the cfg file is not found. */
if (*argc > 2 && argv[1] != NULL && argv[2] != NULL)
{
if(gx_devices[GX_DEVICE_SD].mounted)
{
chdir("sd:/");
}
else if(gx_devices[GX_DEVICE_USB].mounted)
{
chdir("usb:/");
}
}
#endif
last_slash = strrchr(g_defaults.dirs[DEFAULT_DIR_CORE], '/'); last_slash = strrchr(g_defaults.dirs[DEFAULT_DIR_CORE], '/');
if (last_slash) if (last_slash)
*last_slash = 0; *last_slash = 0;

View File

@ -0,0 +1,353 @@
/* 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>
#include <stddef.h>
#include <string.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include <stdio.h>
#include <stdlib.h>
#include <kernel.h>
#include <systemservice.h>
#include <orbis2d.h>
#include <orbisPad.h>
#include <orbisAudio.h>
#include <modplayer.h>
#include <ps4link.h>
#include <orbisKeyboard.h>
#include <debugnet.h>
#include <pthread.h>
#include <string/stdstring.h>
#include <boolean.h>
#include <file/file_path.h>
#ifndef IS_SALAMANDER
#include <lists/file_list.h>
#endif
#ifdef HAVE_MENU
#include "../../menu/menu_driver.h"
#endif
#include "../frontend_driver.h"
#include "../../defaults.h"
#include "../../file_path_special.h"
#include "../../retroarch.h"
#include "../../paths.h"
#include "../../verbosity.h"
typedef struct OrbisGlobalConf
{
Orbis2dConfig *conf;
OrbisPadConfig *confPad;
OrbisAudioConfig *confAudio;
OrbisKeyboardConfig *confKeyboard;
ps4LinkConfiguration *confLink;
int orbisLinkFlag;
}OrbisGlobalConf;
OrbisGlobalConf *myConf;
char eboot_path[512];
char user_path[512];
static enum frontend_fork orbis_fork_mode = FRONTEND_FORK_NONE;
#ifdef __cplusplus
extern "C"
#endif
int main(int argc, char *argv[])
{
int ret;
sceSystemServiceHideSplashScreen();
uintptr_t intptr=0;
sscanf(argv[1],"%p",&intptr);
myConf=(OrbisGlobalConf *)intptr;
ret=ps4LinkInitWithConf(myConf->confLink);
if(!ret)
{
ps4LinkFinish();
return -1;
}
return rarch_main(argc, argv, NULL);
}
static void frontend_orbis_get_environment_settings(int *argc, char *argv[],
void *args, void *params_data)
{
unsigned i;
struct rarch_main_wrap *params = NULL;
(void)args;
#ifndef IS_SALAMANDER
#if defined(HAVE_LOGGER)
logger_init();
#elif defined(HAVE_FILE_LOGGER)
retro_main_log_file_init("host0:/temp/retroarch-log.txt");
#endif
#endif
strlcpy(eboot_path, "host0:/", sizeof(eboot_path));
strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT]));
strlcpy(user_path, "host0:/data/retroarch/", sizeof(user_path));
RARCH_LOG("port dir: [%s]\n", g_defaults.dirs[DEFAULT_DIR_PORT]);
/* bundle data*/
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
"", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], g_defaults.dirs[DEFAULT_DIR_PORT],
"info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
/* user data*/
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], user_path,
"assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_DATABASE], user_path,
"database/rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CURSOR], user_path,
"database/cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], user_path,
"cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path,
"config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS], user_path,
"downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_PLAYLIST], user_path,
"playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_PLAYLIST]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_REMAP], user_path,
"remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM], user_path,
"savefiles", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE], user_path,
"savestates", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM], user_path,
"system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], user_path,
"temp", sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], user_path,
"overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS], user_path,
"thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS]));
strlcpy(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY],
user_path, sizeof(g_defaults.dirs[DEFAULT_DIR_CONTENT_HISTORY]));
fill_pathname_join(g_defaults.path.config, user_path,
file_path_str(FILE_PATH_MAIN_CONFIG), sizeof(g_defaults.path.config));
#ifndef IS_SALAMANDER
params = (struct rarch_main_wrap*)params_data;
params->verbose = true;
if (!string_is_empty(argv[1]))
{
static char path[PATH_MAX_LENGTH] = {0};
struct rarch_main_wrap *args =
(struct rarch_main_wrap*)params_data;
if (args)
{
strlcpy(path, argv[1], sizeof(path));
args->touched = true;
args->no_content = false;
args->verbose = false;
args->config_path = NULL;
args->sram_path = NULL;
args->state_path = NULL;
args->content_path = path;
args->libretro_path = NULL;
RARCH_LOG("argv[0]: %s\n", argv[0]);
RARCH_LOG("argv[1]: %s\n", argv[1]);
RARCH_LOG("argv[2]: %s\n", argv[2]);
RARCH_LOG("Auto-start game %s.\n", argv[1]);
}
}
#endif
for (i = 0; i < DEFAULT_DIR_LAST; i++)
{
const char *dir_path = g_defaults.dirs[i];
if (!string_is_empty(dir_path))
path_mkdir(dir_path);
}
}
static void frontend_orbis_deinit(void *data)
{
(void)data;
#ifndef IS_SALAMANDER
verbosity_disable();
#ifdef HAVE_FILE_LOGGER
command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL);
#endif
#endif
ps4LinkFinish();
}
static void frontend_orbis_shutdown(bool unused)
{
(void)unused;
return;
}
static void frontend_orbis_init(void *data)
{
}
static void frontend_orbis_exec(const char *path, bool should_load_game)
{
char argp[512] = {0};
int args = 0;
#ifndef IS_SALAMANDER
if (should_load_game && !path_is_empty(RARCH_PATH_CONTENT))
{
argp[args] = '\0';
strlcat(argp + args, path_get(RARCH_PATH_CONTENT), sizeof(argp) - args);
args += strlen(argp + args) + 1;
}
#endif
RARCH_LOG("Attempt to load executable: [%s].\n", path);
RARCH_LOG("Attempt to load executable: %d [%s].\n", args, argp);
//int ret = sceAppMgrLoadExec(path, args==0? NULL : (char * const*)((const char*[]){argp, 0}), NULL);
//RARCH_LOG("Attempt to load executable: [%d].\n", ret);
}
#ifndef IS_SALAMANDER
static bool frontend_orbis_set_fork(enum frontend_fork fork_mode)
{
switch (fork_mode)
{
case FRONTEND_FORK_CORE:
RARCH_LOG("FRONTEND_FORK_CORE\n");
orbis_fork_mode = fork_mode;
break;
case FRONTEND_FORK_CORE_WITH_ARGS:
RARCH_LOG("FRONTEND_FORK_CORE_WITH_ARGS\n");
orbis_fork_mode = fork_mode;
break;
case FRONTEND_FORK_RESTART:
RARCH_LOG("FRONTEND_FORK_RESTART\n");
/* NOTE: We don't implement Salamander, so just turn
* this into FRONTEND_FORK_CORE. */
orbis_fork_mode = FRONTEND_FORK_CORE;
break;
case FRONTEND_FORK_NONE:
default:
return false;
}
return true;
}
#endif
static void frontend_orbis_exitspawn(char *s, size_t len)
{
bool should_load_game = false;
#ifndef IS_SALAMANDER
if (orbis_fork_mode == FRONTEND_FORK_NONE)
return;
switch (orbis_fork_mode)
{
case FRONTEND_FORK_CORE_WITH_ARGS:
should_load_game = true;
break;
case FRONTEND_FORK_NONE:
default:
break;
}
#endif
frontend_orbis_exec(s, should_load_game);
}
static int frontend_orbis_get_rating(void)
{
return 6; /* Go with a conservative figure for now. */
}
enum frontend_architecture frontend_orbis_get_architecture(void)
{
return FRONTEND_ARCH_X86_64;
}
static int frontend_orbis_parse_drive_list(void *data, bool load_content)
{
#ifndef IS_SALAMANDER
file_list_t *list = (file_list_t*)data;
enum msg_hash_enums enum_idx = load_content ?
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MSG_UNKNOWN;
menu_entries_append_enum(list,
"app0",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
#endif
return 0;
}
frontend_ctx_driver_t frontend_ctx_orbis = {
frontend_orbis_get_environment_settings,
frontend_orbis_init,
frontend_orbis_deinit,
frontend_orbis_exitspawn,
NULL, /* process_args */
frontend_orbis_exec,
#ifdef IS_SALAMANDER
NULL,
#else
frontend_orbis_set_fork,
#endif
frontend_orbis_shutdown,
NULL, /* get_name */
NULL, /* get_os */
frontend_orbis_get_rating,
NULL, /* load_content */
frontend_orbis_get_architecture,
NULL,
frontend_orbis_parse_drive_list,
NULL, /* get_mem_total */
NULL, /* get_mem_free */
NULL, /* install_signal_handler */
NULL, /* get_sighandler_state */
NULL, /* set_sighandler_state */
NULL, /* destroy_sighandler_state */
NULL, /* attach_console */
NULL, /* detach_console */
NULL, /* watch_path_for_changes */
NULL, /* check_for_path_changes */
NULL, /* set_sustained_performance_mode */
"orbis",
};

View File

@ -1,6 +1,5 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2010-2018 - Francisco Javier Trujillo Mata - fjtrujy
* Copyright (C) 2011-2017 - Daniel De Matteis
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * 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- * of the GNU General Public License as published by the Free Software Found-
@ -21,12 +20,11 @@
#include <loadfile.h> #include <loadfile.h>
#include <unistd.h> #include <unistd.h>
#include <sbv_patches.h> #include <sbv_patches.h>
#include <fileXio_rpc.h>
#include <audsrv.h>
#include <sifrpc.h> #include <sifrpc.h>
#include <iopcontrol.h> #include <iopcontrol.h>
#include <libpwroff.h> #include <libpwroff.h>
#include <SDL/SDL.h> #include <SDL/SDL.h>
#include <audsrv.h>
enum BootDeviceIDs{ enum BootDeviceIDs{
@ -74,6 +72,12 @@ extern unsigned int usbd_irx_size;
extern unsigned char usbhdfsd_irx_start[]; extern unsigned char usbhdfsd_irx_start[];
extern unsigned int usbhdfsd_irx_size; extern unsigned int usbhdfsd_irx_size;
extern unsigned char mcman_irx_start[];
extern unsigned int mcman_irx_size;
extern unsigned char mcserv_irx_start[];
extern unsigned int mcserv_irx_size;
static unsigned char HDDModulesLoaded=0; static unsigned char HDDModulesLoaded=0;
char eboot_path[512]; char eboot_path[512];
@ -81,30 +85,47 @@ char user_path[512];
static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE; static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE;
//Only paths residing on "basic" devices (devices that don't require mounting) /* Only paths residing on "basic" devices
//can be specified here, since this system doesn't perform mounting based on the path. * (devices that don't require mounting)
* can be specified here, since this system
* doesn't perform mounting based on the path.
*/
#define DEFAULT_PATH "mass:" #define DEFAULT_PATH "mass:"
static int getBootDeviceID(char *path) { static int getBootDeviceID(char *path)
int result = BOOT_DEVICE_HOST; {
if (!strncmp(path, "mc0:", 4))
return BOOT_DEVICE_MC0;
else if (!strncmp(path, "mc1:", 4))
return BOOT_DEVICE_MC1;
else if (!strncmp(path, "cdrom0:", 7))
return BOOT_DEVICE_CDROM;
else if (!strncmp(path, "mass:", 5) || !strncmp(path, "mass0:", 6))
return BOOT_DEVICE_MASS;
else if (!strncmp(path, "hdd:", 4) || !strncmp(path, "hdd0:", 5))
return BOOT_DEVICE_HDD;
else if (!strncmp(path, "host", 4) && ((path[4]>='0' && path[4]<='9') || path[4]==':'))
return BOOT_DEVICE_HOST;
else
return BOOT_DEVICE_UNKNOWN;
if(!strncmp(path, "mc0:", 4)) result=BOOT_DEVICE_MC0; return BOOT_DEVICE_HOST;
else if(!strncmp(path, "mc1:", 4)) result=BOOT_DEVICE_MC1;
else if(!strncmp(path, "cdrom0:", 7)) result=BOOT_DEVICE_CDROM;
else if(!strncmp(path, "mass:", 5) || !strncmp(path, "mass0:", 6)) result=BOOT_DEVICE_MASS;
else if(!strncmp(path, "hdd:", 4) || !strncmp(path, "hdd0:", 5)) result=BOOT_DEVICE_HDD;
else if(!strncmp(path, "host", 4) && ((path[4]>='0' && path[4]<='9') || path[4]==':')) result=BOOT_DEVICE_HOST;
else result=BOOT_DEVICE_UNKNOWN;
return result;
} }
//HACK! If booting from a USB device, keep trying to open this program again until it succeeds. This will ensure that the emulator will be able to load its files. /* HACK! If booting from a USB device, keep trying to
static void waitUntilDeviceIsReady(const char *path) { * open this program again until it succeeds.
*
* This will ensure that the emulator will be able to load its files.
*/
static void waitUntilDeviceIsReady(const char *path)
{
FILE *file; FILE *file;
while((file=fopen(path, "rb"))==NULL){ while((file=fopen(path, "rb"))==NULL)
//Wait for a while first, or the IOP will get swamped by requests from the EE. {
/* Wait for a while first, or the IOP
* will get swamped by requests from the EE. */
nopdelay(); nopdelay();
nopdelay(); nopdelay();
nopdelay(); nopdelay();
@ -118,47 +139,54 @@ static void waitUntilDeviceIsReady(const char *path) {
fclose(file); fclose(file);
} }
void setPWDOnPFS(const char *FullCWD_path) { void setPWDOnPFS(const char *FullCWD_path)
int i; {
char *path; int i;
char *path=NULL;
path=NULL; for (i=strlen(FullCWD_path); i>=0; i--)
for(i=strlen(FullCWD_path); i>=0; i--){ /* Try to seperate the CWD from the path to this ELF. */ {
if(FullCWD_path[i]==':'){ /* Try to seperate the CWD from the path to this ELF. */
if((path=malloc(i+6+2))!=NULL){ if (FullCWD_path[i]==':')
strcpy(path, "pfs0:/"); {
strncat(path, FullCWD_path, i+1); if ((path=malloc(i+6+2))!=NULL)
path[i+1+6]='\0'; {
} strcpy(path, "pfs0:/");
break; strncat(path, FullCWD_path, i+1);
} path[i+1+6]='\0';
else if((FullCWD_path[i]=='\\')||(FullCWD_path[i]=='/')){ }
if((path=malloc(i+6+1))!=NULL){ break;
strcpy(path, "pfs0:/"); }
strncat(path, FullCWD_path, i); else if ((FullCWD_path[i]=='\\')||(FullCWD_path[i]=='/'))
path[i+6]='\0'; {
} if ((path=malloc(i+6+1))!=NULL)
break; {
} strcpy(path, "pfs0:/");
} strncat(path, FullCWD_path, i);
path[i+6]='\0';
if(path!=NULL){ }
chdir(path); break;
free(path); }
} }
if (path!=NULL)
{
chdir(path);
free(path);
}
} }
static const char *getMountParams(const char *command, char *BlockDevice) { static const char *getMountParams(const char *command, char *BlockDevice)
const char *MountPath; {
int BlockDeviceNameLen; int BlockDeviceNameLen;
const char *MountPath=NULL;
MountPath=NULL; if (strlen(command)>6 && (MountPath=strchr(&command[5], ':'))!=NULL)
if(strlen(command)>6 && (MountPath=strchr(&command[5], ':'))!=NULL){ {
BlockDeviceNameLen=(unsigned int)MountPath-(unsigned int)command; BlockDeviceNameLen=(unsigned int)MountPath-(unsigned int)command;
strncpy(BlockDevice, command, BlockDeviceNameLen); strncpy(BlockDevice, command, BlockDeviceNameLen);
BlockDevice[BlockDeviceNameLen]='\0'; BlockDevice[BlockDeviceNameLen]='\0';
MountPath++; //This is the location of the mount path; MountPath++; /* This is the location of the mount path; */
} }
return MountPath; return MountPath;
@ -166,13 +194,6 @@ static const char *getMountParams(const char *command, char *BlockDevice) {
static void create_path_names(void) static void create_path_names(void)
{ {
#ifndef IS_SALAMANDER
#if defined(HAVE_LOGGER)
#elif defined(HAVE_FILE_LOGGER)
retro_main_log_file_init("ux0:/temp/retroarch-log.txt"); // It really depend from where we are executing this
#endif
#endif
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT], fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT],
"CORES", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); "CORES", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
@ -212,14 +233,16 @@ static void create_path_names(void)
static void poweroffCallback(void *arg) static void poweroffCallback(void *arg)
{ {
//Close all files and unmount all partitions. #if 0
//close(fd); /* Close all files and unmount all partitions. */
close(fd);
//If you use PFS, close all files and unmount all partitions. /* If you use PFS, close all files and unmount all partitions. */
//fileXioDevctl("pfs:", PDIOC_CLOSEALL, NULL, 0, NULL, 0) fileXioDevctl("pfs:", PDIOC_CLOSEALL, NULL, 0, NULL, 0)
//Shut down DEV9, if you used it. /* Shut down DEV9, if you used it. */
//while(fileXioDevctl("dev9x:", DDIOC_OFF, NULL, 0, NULL, 0) < 0){}; while(fileXioDevctl("dev9x:", DDIOC_OFF, NULL, 0, NULL, 0) < 0){};
#endif
printf("Shutdown!"); printf("Shutdown!");
poweroffShutdown(); poweroffShutdown();
@ -232,37 +255,39 @@ static void frontend_ps2_get_environment_settings(int *argc, char *argv[],
const char *mountPoint; const char *mountPoint;
int bootDeviceID; int bootDeviceID;
//TODO: I DONT KNOW YET, WHY IT CRASHES IF UNCOMENT THIS PART
getcwd(cwd, sizeof(cwd)); getcwd(cwd, sizeof(cwd));
bootDeviceID=getBootDeviceID(cwd); bootDeviceID=getBootDeviceID(cwd);
//Mount the HDD partition, if required.
if(bootDeviceID==BOOT_DEVICE_HDD){
/* Try not to adjust this unless you know what you are doing. The tricky part i keeping the NULL character in the middle of that argument list separated from the number 4. */
static const char PS2HDD_args[]="-o\0""2";
static const char PS2FS_args[]="-o\0""8";
if(!HDDModulesLoaded){ /* Mount the HDD partition, if required. */
SifExecModuleBuffer(poweroff_irx_start, poweroff_irx_size, 0, NULL, NULL); if (bootDeviceID==BOOT_DEVICE_HDD)
SifExecModuleBuffer(ps2dev9_irx_start, ps2dev9_irx_size, 0, NULL, NULL); {
SifExecModuleBuffer(ps2atad_irx_start, ps2atad_irx_size, 0, NULL, NULL); /* Try not to adjust this unless you know what you are doing. The tricky part i keeping the NULL character in the middle of that argument list separated from the number 4. */
SifExecModuleBuffer(ps2hdd_irx_start, ps2hdd_irx_size, sizeof(PS2HDD_args), PS2HDD_args, NULL); static const char PS2HDD_args[]="-o\0""2";
SifExecModuleBuffer(ps2fs_irx_start, ps2fs_irx_size, sizeof(PS2FS_args), PS2FS_args, NULL); static const char PS2FS_args[]="-o\0""8";
HDDModulesLoaded=1;
} if (!HDDModulesLoaded)
{
//Attempt to mount the partition. SifExecModuleBuffer(poweroff_irx_start, poweroff_irx_size, 0, NULL, NULL);
if((mountPoint=getMountParams(cwd, blockDevice))!=NULL && !strncmp(mountPoint, "pfs:", 4)){ SifExecModuleBuffer(ps2dev9_irx_start, ps2dev9_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(ps2atad_irx_start, ps2atad_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(ps2hdd_irx_start, ps2hdd_irx_size, sizeof(PS2HDD_args), PS2HDD_args, NULL);
SifExecModuleBuffer(ps2fs_irx_start, ps2fs_irx_size, sizeof(PS2FS_args), PS2FS_args, NULL);
HDDModulesLoaded=1;
}
/* Attempt to mount the partition. */
if ((mountPoint=getMountParams(cwd, blockDevice))!=NULL && !strncmp(mountPoint, "pfs:", 4))
{
fileXioMount("pfs0:", blockDevice, FIO_MT_RDWR); fileXioMount("pfs0:", blockDevice, FIO_MT_RDWR);
setPWDOnPFS(&mountPoint[4]); setPWDOnPFS(&mountPoint[4]);
} }
} else if(bootDeviceID==BOOT_DEVICE_CDROM){
chdir(DEFAULT_PATH);
} else if(bootDeviceID==BOOT_DEVICE_MASS){
waitUntilDeviceIsReady(argv[0]);
} else if (bootDeviceID==BOOT_DEVICE_UNKNOWN) {
} }
else if (bootDeviceID==BOOT_DEVICE_CDROM)
chdir(DEFAULT_PATH);
else if (bootDeviceID==BOOT_DEVICE_MASS)
waitUntilDeviceIsReady(argv[0]);
else if (bootDeviceID==BOOT_DEVICE_UNKNOWN) { }
create_path_names(); create_path_names();
@ -308,30 +333,47 @@ static void frontend_ps2_init(void *data)
{ {
SifInitRpc(0); SifInitRpc(0);
#if !defined(DEBUG) #if !defined(DEBUG)
while(!SifIopReset(NULL, 0)){}; // Comment this line if you don't wanna debug the output /* Comment this line if you don't wanna debug the output */
while(!SifIopReset(NULL, 0)){};
#endif #endif
while(!SifIopSync()){}; while(!SifIopSync()){};
SifInitRpc(0); SifInitRpc(0);
sbv_patch_enable_lmb(); sbv_patch_enable_lmb();
/* Controllers */
SifLoadModule("rom0:SIO2MAN", 0, NULL);
SifLoadModule("rom0:PADMAN", 0, NULL);
/* I/O Files */
SifExecModuleBuffer(iomanX_irx_start, iomanX_irx_size, 0, NULL, NULL); SifExecModuleBuffer(iomanX_irx_start, iomanX_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(fileXio_irx_start, fileXio_irx_size, 0, NULL, NULL); SifExecModuleBuffer(fileXio_irx_start, fileXio_irx_size, 0, NULL, NULL);
/* Memory Card */
SifExecModuleBuffer(mcman_irx_start, mcman_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(mcserv_irx_start, mcserv_irx_size, 0, NULL, NULL);
SifLoadModule("rom0:SIO2MAN", 0, NULL); /* USB */
SifLoadModule("rom0:MCMAN", 0, NULL);
SifLoadModule("rom0:MCSERV", 0, NULL);
SifLoadModule("rom0:PADMAN", 0, NULL);
SifExecModuleBuffer(usbd_irx_start, usbd_irx_size, 0, NULL, NULL); SifExecModuleBuffer(usbd_irx_start, usbd_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(usbhdfsd_irx_start, usbhdfsd_irx_size, 0, NULL, NULL); SifExecModuleBuffer(usbhdfsd_irx_start, usbhdfsd_irx_size, 0, NULL, NULL);
/* Audio */
SifExecModuleBuffer(freesd_irx_start, freesd_irx_size, 0, NULL, NULL); SifExecModuleBuffer(freesd_irx_start, freesd_irx_size, 0, NULL, NULL);
SifExecModuleBuffer(audsrv_irx_start, audsrv_irx_size, 0, NULL, NULL); SifExecModuleBuffer(audsrv_irx_start, audsrv_irx_size, 0, NULL, NULL);
fileXioInit();
audsrv_init();
SDL_Init(SDL_INIT_TIMER); SDL_Init(SDL_INIT_TIMER);
/* Initializes audsrv library */
if (audsrv_init())
{
RARCH_ERR("audsrv library not initalizated\n");
}
#if defined(HAVE_FILE_LOGGER)
retro_main_log_file_init("retroarch.log");
verbosity_enable();
#endif
} }
static void frontend_ps2_deinit(void *data) static void frontend_ps2_deinit(void *data)
@ -369,7 +411,9 @@ static void frontend_ps2_exec(const char *path, bool should_load_game)
#endif #endif
RARCH_LOG("Attempt to load executable: [%s].\n", path); RARCH_LOG("Attempt to load executable: [%s].\n", path);
// exitspawn_kernel(path, args, argp); // I don't know what this is doing #if 0
exitspawn_kernel(path, args, argp); /* I don't know what this is doing */
#endif
#endif #endif
} }
@ -424,7 +468,7 @@ static void frontend_ps2_exitspawn(char *core_path, size_t core_path_size)
static void frontend_ps2_shutdown(bool unused) static void frontend_ps2_shutdown(bool unused)
{ {
poweroffInit(); poweroffInit();
//Set callback function /* Set callback function */
poweroffSetCallback(&poweroffCallback, NULL); poweroffSetCallback(&poweroffCallback, NULL);
} }
@ -467,7 +511,7 @@ static int frontend_ps2_parse_drive_list(void *data, bool load_content)
enum_idx, enum_idx,
FILE_TYPE_DIRECTORY, 0, 0); FILE_TYPE_DIRECTORY, 0, 0);
menu_entries_append_enum(list, menu_entries_append_enum(list,
"host:/", "host:",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR), msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx, enum_idx,
FILE_TYPE_DIRECTORY, 0, 0); FILE_TYPE_DIRECTORY, 0, 0);

View File

@ -1562,8 +1562,6 @@ static void frontend_unix_get_env(int *argc,
{ {
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], app_dir, fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_ASSETS], app_dir,
"assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS])); "assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE], app_dir,
"tmp", sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], app_dir, fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER], app_dir,
"shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER])); "shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], app_dir, fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_OVERLAY], app_dir,
@ -1628,6 +1626,10 @@ static void frontend_unix_get_env(int *argc,
internal_storage_app_path, "cheats", internal_storage_app_path, "cheats",
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE],
internal_storage_app_path, "temp",
sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
if(!string_is_empty(screenshot_dir) if(!string_is_empty(screenshot_dir)
&& test_permissions(screenshot_dir)) && test_permissions(screenshot_dir))
{ {
@ -1686,6 +1688,10 @@ static void frontend_unix_get_env(int *argc,
app_dir, "cheats", app_dir, "cheats",
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE],
app_dir, "temp",
sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
if( !string_is_empty(screenshot_dir) if( !string_is_empty(screenshot_dir)
&& test_permissions(screenshot_dir)) && test_permissions(screenshot_dir))
{ {
@ -1749,6 +1755,10 @@ static void frontend_unix_get_env(int *argc,
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS], fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CHEATS],
internal_storage_path, "RetroArch/cheats", internal_storage_path, "RetroArch/cheats",
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CACHE],
internal_storage_path, "temp",
sizeof(g_defaults.dirs[DEFAULT_DIR_CACHE]));
default: default:
break; break;
} }

View File

@ -0,0 +1,419 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2016-2017 - Brad Parker
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <retro_miscellaneous.h>
#include <windows.h>
#include <boolean.h>
#include <compat/strl.h>
#include <dynamic/dylib.h>
#include <lists/file_list.h>
#include <file/file_path.h>
#include <string/stdstring.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#ifdef HAVE_MENU
#include "../../menu/menu_driver.h"
#endif
#include "../frontend_driver.h"
#include "../../configuration.h"
#include "../../defaults.h"
#include "../../retroarch.h"
#include "../../verbosity.h"
#include "../../ui/drivers/ui_win32.h"
#include "../../uwp/uwp_func.h"
static void frontend_uwp_get_os(char *s, size_t len, int *major, int *minor)
{
char buildStr[11] = {0};
bool server = false;
const char *arch = "";
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
/* Windows 2000 and later */
SYSTEM_INFO si = {{0}};
OSVERSIONINFOEX vi = {0};
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
GetSystemInfo(&si);
/* Available from NT 3.5 and Win95 */
GetVersionEx((OSVERSIONINFO*)&vi);
server = vi.wProductType != VER_NT_WORKSTATION;
switch (si.wProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_AMD64:
arch = "x64";
break;
case PROCESSOR_ARCHITECTURE_INTEL:
arch = "x86";
break;
case PROCESSOR_ARCHITECTURE_ARM:
arch = "ARM";
break;
default:
break;
}
#else
OSVERSIONINFO vi = {0};
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
/* Available from NT 3.5 and Win95 */
GetVersionEx(&vi);
#endif
if (major)
*major = vi.dwMajorVersion;
if (minor)
*minor = vi.dwMinorVersion;
if (vi.dwMajorVersion == 4 && vi.dwMinorVersion == 0)
snprintf(buildStr, sizeof(buildStr), "%lu", (DWORD)(LOWORD(vi.dwBuildNumber))); /* Windows 95 build number is in the low-order word only */
else
snprintf(buildStr, sizeof(buildStr), "%lu", vi.dwBuildNumber);
switch (vi.dwMajorVersion)
{
case 10:
if (server)
strlcpy(s, "Windows Server 2016", len);
else
strlcpy(s, "Windows 10", len);
break;
case 6:
switch (vi.dwMinorVersion)
{
case 3:
if (server)
strlcpy(s, "Windows Server 2012 R2", len);
else
strlcpy(s, "Windows 8.1", len);
break;
case 2:
if (server)
strlcpy(s, "Windows Server 2012", len);
else
strlcpy(s, "Windows 8", len);
break;
case 1:
if (server)
strlcpy(s, "Windows Server 2008 R2", len);
else
strlcpy(s, "Windows 7", len);
break;
case 0:
if (server)
strlcpy(s, "Windows Server 2008", len);
else
strlcpy(s, "Windows Vista", len);
break;
default:
break;
}
break;
case 5:
switch (vi.dwMinorVersion)
{
case 2:
if (server)
strlcpy(s, "Windows Server 2003", len);
else
{
/* Yes, XP Pro x64 is a higher version number than XP x86 */
if (string_is_equal(arch, "x64"))
strlcpy(s, "Windows XP", len);
}
break;
case 1:
strlcpy(s, "Windows XP", len);
break;
case 0:
strlcpy(s, "Windows 2000", len);
break;
}
break;
case 4:
switch (vi.dwMinorVersion)
{
case 0:
if (vi.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS)
strlcpy(s, "Windows 95", len);
else if (vi.dwPlatformId == VER_PLATFORM_WIN32_NT)
strlcpy(s, "Windows NT 4.0", len);
else
strlcpy(s, "Unknown", len);
break;
case 90:
strlcpy(s, "Windows ME", len);
break;
case 10:
strlcpy(s, "Windows 98", len);
break;
}
break;
default:
snprintf(s, len, "Windows %i.%i", *major, *minor);
break;
}
if (!string_is_empty(arch))
{
strlcat(s, " ", len);
strlcat(s, arch, len);
}
strlcat(s, " Build ", len);
strlcat(s, buildStr, len);
if (!string_is_empty(vi.szCSDVersion))
{
strlcat(s, " ", len);
strlcat(s, vi.szCSDVersion, len);
}
if (!string_is_empty(uwp_device_family))
{
strlcat(s, " ", len);
strlcat(s, uwp_device_family, len);
}
}
static void frontend_uwp_init(void *data)
{
}
enum frontend_powerstate frontend_uwp_get_powerstate(
int *seconds, int *percent)
{
SYSTEM_POWER_STATUS status;
enum frontend_powerstate ret = FRONTEND_POWERSTATE_NONE;
if (!GetSystemPowerStatus(&status))
return ret;
if (status.BatteryFlag == 0xFF)
ret = FRONTEND_POWERSTATE_NONE;
if (status.BatteryFlag & (1 << 7))
ret = FRONTEND_POWERSTATE_NO_SOURCE;
else if (status.BatteryFlag & (1 << 3))
ret = FRONTEND_POWERSTATE_CHARGING;
else if (status.ACLineStatus == 1)
ret = FRONTEND_POWERSTATE_CHARGED;
else
ret = FRONTEND_POWERSTATE_ON_POWER_SOURCE;
*percent = (int)status.BatteryLifePercent;
*seconds = (int)status.BatteryLifeTime;
#ifdef _WIN32
if (*percent == 255)
*percent = 0;
#endif
return ret;
}
enum frontend_architecture frontend_uwp_get_architecture(void)
{
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
/* Windows 2000 and later */
SYSTEM_INFO si = {{0}};
GetSystemInfo(&si);
switch (si.wProcessorArchitecture)
{
case PROCESSOR_ARCHITECTURE_AMD64:
return FRONTEND_ARCH_X86_64;
break;
case PROCESSOR_ARCHITECTURE_INTEL:
return FRONTEND_ARCH_X86;
break;
case PROCESSOR_ARCHITECTURE_ARM:
return FRONTEND_ARCH_ARM;
break;
default:
break;
}
#endif
return FRONTEND_ARCH_NONE;
}
static int frontend_uwp_parse_drive_list(void *data, bool load_content)
{
#ifdef HAVE_MENU
file_list_t *list = (file_list_t*)data;
enum msg_hash_enums enum_idx = load_content ?
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MSG_UNKNOWN;
/* TODO (krzys_h): UWP storage sandboxing */
char *home_dir = (char*)malloc(
PATH_MAX_LENGTH * sizeof(char));
fill_pathname_home_dir(home_dir,
PATH_MAX_LENGTH * sizeof(char));
menu_entries_append_enum(list,
home_dir,
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
enum_idx,
FILE_TYPE_DIRECTORY, 0, 0);
free(home_dir);
#endif
return 0;
}
static void frontend_uwp_environment_get(int *argc, char *argv[],
void *args, void *params_data)
{
/* On UWP, we have to use the writable directory
* instead of the install directory. */
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_ASSETS],
"~\\assets", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER],
"~\\filters\\audio", sizeof(g_defaults.dirs[DEFAULT_DIR_AUDIO_FILTER]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER],
"~\\filters\\video", sizeof(g_defaults.dirs[DEFAULT_DIR_VIDEO_FILTER]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CHEATS],
"~\\cheats", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_DATABASE],
"~\\database\\rdb", sizeof(g_defaults.dirs[DEFAULT_DIR_DATABASE]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CURSOR],
"~\\database\\cursors", sizeof(g_defaults.dirs[DEFAULT_DIR_CURSOR]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST],
"~\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG],
"~\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
"~\\recordings", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
"~\\config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_REMAP],
"~\\config\\remaps", sizeof(g_defaults.dirs[DEFAULT_DIR_REMAP]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS],
"~\\assets\\wallpapers", sizeof(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS],
"~\\thumbnails", sizeof(g_defaults.dirs[DEFAULT_DIR_THUMBNAILS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_OVERLAY],
"~\\overlays", sizeof(g_defaults.dirs[DEFAULT_DIR_OVERLAY]));
/* This one is an exception: cores have to be loaded from
* the install directory,
* since this is the only place UWP apps can take .dlls from */
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE],
":\\cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_INFO],
"~\\info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG],
"~\\autoconfig", sizeof(g_defaults.dirs[DEFAULT_DIR_AUTOCONFIG]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SHADER],
"~\\shaders", sizeof(g_defaults.dirs[DEFAULT_DIR_SHADER]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
"~\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
"~\\screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SRAM],
"~\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
"~\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
"~\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
#ifdef HAVE_MENU
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
snprintf(g_defaults.settings.menu,
sizeof(g_defaults.settings.menu), "xmb");
#endif
#endif
}
static uint64_t frontend_uwp_get_mem_total(void)
{
/* OSes below 2000 don't have the Ex version,
* and non-Ex cannot work with >4GB RAM */
#if _WIN32_WINNT >= 0x0500
MEMORYSTATUSEX mem_info;
mem_info.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&mem_info);
return mem_info.ullTotalPhys;
#else
MEMORYSTATUS mem_info;
mem_info.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&mem_info);
return mem_info.dwTotalPhys;
#endif
}
static uint64_t frontend_uwp_get_mem_used(void)
{
/* OSes below 2000 don't have the Ex version,
* and non-Ex cannot work with >4GB RAM */
#if _WIN32_WINNT >= 0x0500
MEMORYSTATUSEX mem_info;
mem_info.dwLength = sizeof(MEMORYSTATUSEX);
GlobalMemoryStatusEx(&mem_info);
return ((frontend_uwp_get_mem_total() - mem_info.ullAvailPhys));
#else
MEMORYSTATUS mem_info;
mem_info.dwLength = sizeof(MEMORYSTATUS);
GlobalMemoryStatus(&mem_info);
return ((frontend_uwp_get_mem_total() - mem_info.dwAvailPhys));
#endif
}
frontend_ctx_driver_t frontend_ctx_uwp = {
frontend_uwp_environment_get,
frontend_uwp_init,
NULL, /* deinit */
NULL, /* exitspawn */
NULL, /* process_args */
NULL, /* exec */
NULL, /* set_fork */
NULL, /* shutdown */
NULL, /* get_name */
frontend_uwp_get_os,
NULL, /* get_rating */
NULL, /* load_content */
frontend_uwp_get_architecture,
frontend_uwp_get_powerstate,
frontend_uwp_parse_drive_list,
frontend_uwp_get_mem_total,
frontend_uwp_get_mem_used,
NULL, /* install_signal_handler */
NULL, /* get_sighandler_state */
NULL, /* set_sighandler_state */
NULL, /* destroy_sighandler_state */
NULL, /* attach_console */
NULL, /* detach_console */
NULL, /* watch_path_for_changes */
NULL, /* check_for_path_changes */
NULL, /* set_sustained_performance_mode */
"uwp"
};

View File

@ -43,6 +43,10 @@
#include "../../verbosity.h" #include "../../verbosity.h"
#include "../../ui/drivers/ui_win32.h" #include "../../ui/drivers/ui_win32.h"
#ifndef SM_SERVERR2
#define SM_SERVERR2 89
#endif
/* We only load this library once, so we let it be /* We only load this library once, so we let it be
* unloaded at application shutdown, since unloading * unloaded at application shutdown, since unloading
* it early seems to cause issues on some systems. * it early seems to cause issues on some systems.
@ -151,7 +155,6 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
char buildStr[11] = {0}; char buildStr[11] = {0};
bool server = false; bool server = false;
const char *arch = ""; const char *arch = "";
bool serverR2 = false;
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500 #if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
/* Windows 2000 and later */ /* Windows 2000 and later */
@ -165,7 +168,6 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
GetVersionEx((OSVERSIONINFO*)&vi); GetVersionEx((OSVERSIONINFO*)&vi);
server = vi.wProductType != VER_NT_WORKSTATION; server = vi.wProductType != VER_NT_WORKSTATION;
serverR2 = GetSystemMetrics(SM_SERVERR2);
switch (si.wProcessorArchitecture) switch (si.wProcessorArchitecture)
{ {
@ -245,10 +247,11 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
{ {
case 2: case 2:
if (server) if (server)
if (serverR2) {
strlcpy(s, "Windows Server 2003 R2", len); strlcpy(s, "Windows Server 2003", len);
else if (GetSystemMetrics(SM_SERVERR2))
strlcpy(s, "Windows Server 2003", len); strlcat(s, " R2", len);
}
else else
{ {
/* Yes, XP Pro x64 is a higher version number than XP x86 */ /* Yes, XP Pro x64 is a higher version number than XP x86 */
@ -302,6 +305,7 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
strlcat(s, " ", len); strlcat(s, " ", len);
strlcat(s, vi.szCSDVersion, len); strlcat(s, vi.szCSDVersion, len);
} }
} }
static void frontend_win32_init(void *data) static void frontend_win32_init(void *data)
@ -385,13 +389,13 @@ enum frontend_architecture frontend_win32_get_architecture(void)
static int frontend_win32_parse_drive_list(void *data, bool load_content) static int frontend_win32_parse_drive_list(void *data, bool load_content)
{ {
#ifdef HAVE_MENU #ifdef HAVE_MENU
file_list_t *list = (file_list_t*)data;
enum msg_hash_enums enum_idx = load_content ?
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MSG_UNKNOWN;
size_t i = 0; size_t i = 0;
unsigned drives = GetLogicalDrives(); unsigned drives = GetLogicalDrives();
char drive[] = " :\\"; char drive[] = " :\\";
file_list_t *list = (file_list_t*)data;
enum msg_hash_enums enum_idx = load_content ?
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR :
MSG_UNKNOWN;
for (i = 0; i < 32; i++) for (i = 0; i < 32; i++)
{ {
@ -506,7 +510,6 @@ static void frontend_win32_attach_console(void)
{ {
#ifdef _WIN32 #ifdef _WIN32
#ifdef _WIN32_WINNT_WINXP #ifdef _WIN32_WINNT_WINXP
/* msys will start the process with FILE_TYPE_PIPE connected. /* msys will start the process with FILE_TYPE_PIPE connected.
* cmd will start the process with FILE_TYPE_UNKNOWN connected * cmd will start the process with FILE_TYPE_UNKNOWN connected
* (since this is subsystem windows application * (since this is subsystem windows application
@ -547,7 +550,6 @@ static void frontend_win32_detach_console(void)
{ {
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX)
#ifdef _WIN32_WINNT_WINXP #ifdef _WIN32_WINNT_WINXP
if(console_needs_free) if(console_needs_free)
{ {
/* we don't reconnect stdout/stderr to anything here, /* we don't reconnect stdout/stderr to anything here,
@ -556,7 +558,6 @@ static void frontend_win32_detach_console(void)
FreeConsole(); FreeConsole();
console_needs_free = false; console_needs_free = false;
} }
#endif #endif
#endif #endif
} }

View File

@ -161,6 +161,7 @@ int rarch_main(int argc, char *argv[], void *data)
} }
#ifndef HAVE_MAIN #ifndef HAVE_MAIN
#ifndef ORBIS
#ifdef __cplusplus #ifdef __cplusplus
extern "C" extern "C"
#endif #endif
@ -169,3 +170,4 @@ int main(int argc, char *argv[])
return rarch_main(argc, argv, NULL); return rarch_main(argc, argv, NULL);
} }
#endif #endif
#endif

View File

@ -29,6 +29,12 @@
#include "frontend_driver.h" #include "frontend_driver.h"
#ifndef __WINRT__
#if defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
#define __WINRT__
#endif
#endif
static frontend_ctx_driver_t *frontend_ctx_drivers[] = { static frontend_ctx_driver_t *frontend_ctx_drivers[] = {
#if defined(EMSCRIPTEN) #if defined(EMSCRIPTEN)
&frontend_ctx_emscripten, &frontend_ctx_emscripten,
@ -65,9 +71,12 @@ static frontend_ctx_driver_t *frontend_ctx_drivers[] = {
#if defined(SWITCH) && defined(HAVE_LIBNX) #if defined(SWITCH) && defined(HAVE_LIBNX)
&frontend_ctx_switch, &frontend_ctx_switch,
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
&frontend_ctx_win32, &frontend_ctx_win32,
#endif #endif
#if defined(__WINRT__)
&frontend_ctx_uwp,
#endif
#ifdef XENON #ifdef XENON
&frontend_ctx_xenon, &frontend_ctx_xenon,
#endif #endif

View File

@ -124,6 +124,7 @@ extern frontend_ctx_driver_t frontend_ctx_ps2;
extern frontend_ctx_driver_t frontend_ctx_ctr; extern frontend_ctx_driver_t frontend_ctx_ctr;
extern frontend_ctx_driver_t frontend_ctx_switch; extern frontend_ctx_driver_t frontend_ctx_switch;
extern frontend_ctx_driver_t frontend_ctx_win32; extern frontend_ctx_driver_t frontend_ctx_win32;
extern frontend_ctx_driver_t frontend_ctx_uwp;
extern frontend_ctx_driver_t frontend_ctx_xenon; extern frontend_ctx_driver_t frontend_ctx_xenon;
extern frontend_ctx_driver_t frontend_ctx_emscripten; extern frontend_ctx_driver_t frontend_ctx_emscripten;
extern frontend_ctx_driver_t frontend_ctx_dos; extern frontend_ctx_driver_t frontend_ctx_dos;

View File

@ -20,7 +20,7 @@
#include "d3d10_common.h" #include "d3d10_common.h"
#include "d3dcompiler_common.h" #include "d3dcompiler_common.h"
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
#include <dynamic/dylib.h> #include <dynamic/dylib.h>
typedef HRESULT(WINAPI* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN)( typedef HRESULT(WINAPI* PFN_D3D10_CREATE_DEVICE_AND_SWAP_CHAIN)(

View File

@ -20,9 +20,42 @@
#include "d3d11_common.h" #include "d3d11_common.h"
#include "d3dcompiler_common.h" #include "d3dcompiler_common.h"
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
#include <dynamic/dylib.h> #include <dynamic/dylib.h>
HRESULT WINAPI D3D11CreateDevice(
IDXGIAdapter* pAdapter,
D3D_DRIVER_TYPE DriverType,
HMODULE Software,
UINT Flags,
CONST D3D_FEATURE_LEVEL* pFeatureLevels,
UINT FeatureLevels,
UINT SDKVersion,
ID3D11Device** ppDevice,
D3D_FEATURE_LEVEL* pFeatureLevel,
ID3D11DeviceContext** ppImmediateContext)
{
static dylib_t d3d11_dll;
static PFN_D3D11_CREATE_DEVICE fp;
if (!d3d11_dll)
d3d11_dll = dylib_load("d3d11.dll");
if (!d3d11_dll)
return TYPE_E_CANTLOADLIBRARY;
if (!fp)
fp = (PFN_D3D11_CREATE_DEVICE)dylib_proc(
d3d11_dll, "D3D11CreateDevice");
if (!fp)
return TYPE_E_DLLFUNCTIONNOTFOUND;
return fp(
pAdapter, DriverType, Software, Flags, pFeatureLevels, FeatureLevels, SDKVersion,
ppDevice, pFeatureLevel, ppImmediateContext);
}
HRESULT WINAPI D3D11CreateDeviceAndSwapChain( HRESULT WINAPI D3D11CreateDeviceAndSwapChain(
IDXGIAdapter* pAdapter, IDXGIAdapter* pAdapter,
D3D_DRIVER_TYPE DriverType, D3D_DRIVER_TYPE DriverType,

View File

@ -2159,6 +2159,7 @@ static INLINE HRESULT D3D11ValidateContextForDispatch(D3D11Debug debug, D3D11Dev
{ {
return debug->lpVtbl->ValidateContextForDispatch(debug, context); return debug->lpVtbl->ValidateContextForDispatch(debug, context);
} }
#ifndef __WINRT__
static INLINE BOOL D3D11SetUseRef(D3D11SwitchToRef switch_to_ref, BOOL use_ref) static INLINE BOOL D3D11SetUseRef(D3D11SwitchToRef switch_to_ref, BOOL use_ref)
{ {
return switch_to_ref->lpVtbl->SetUseRef(switch_to_ref, use_ref); return switch_to_ref->lpVtbl->SetUseRef(switch_to_ref, use_ref);
@ -2167,6 +2168,7 @@ static INLINE BOOL D3D11GetUseRef(D3D11SwitchToRef switch_to_ref)
{ {
return switch_to_ref->lpVtbl->GetUseRef(switch_to_ref); return switch_to_ref->lpVtbl->GetUseRef(switch_to_ref);
} }
#endif
static INLINE HRESULT D3D11SetShaderTrackingOptionsByType( static INLINE HRESULT D3D11SetShaderTrackingOptionsByType(
D3D11TracingDevice tracing_device, UINT resource_type_flags, UINT options) D3D11TracingDevice tracing_device, UINT resource_type_flags, UINT options)
{ {
@ -2188,6 +2190,7 @@ static INLINE void D3D11ClearStoredMessages(D3D11InfoQueue info_queue)
{ {
info_queue->lpVtbl->ClearStoredMessages(info_queue); info_queue->lpVtbl->ClearStoredMessages(info_queue);
} }
#ifndef __WINRT__
static INLINE HRESULT D3D11GetMessageA( static INLINE HRESULT D3D11GetMessageA(
D3D11InfoQueue info_queue, D3D11InfoQueue info_queue,
UINT64 message_index, UINT64 message_index,
@ -2196,6 +2199,7 @@ static INLINE HRESULT D3D11GetMessageA(
{ {
return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length); return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
} }
#endif
static INLINE UINT64 D3D11GetNumMessagesAllowedByStorageFilter(D3D11InfoQueue info_queue) static INLINE UINT64 D3D11GetNumMessagesAllowedByStorageFilter(D3D11InfoQueue info_queue)
{ {
return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue); return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2018 - Ali Bouhlel * Copyright (C) 2014-2018 - Ali Bouhlel
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -65,7 +65,7 @@ DEFINE_GUIDW(IID_ID3D12DebugCommandList, 0x09e0bf36, 0x54ac, 0x484f, 0x88, 0x47,
/* clang-format on */ /* clang-format on */
#endif #endif
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
static dylib_t d3d12_dll; static dylib_t d3d12_dll;
static const char* d3d12_dll_name = "d3d12.dll"; static const char* d3d12_dll_name = "d3d12.dll";
@ -159,15 +159,24 @@ bool d3d12_init_base(d3d12_video_t* d3d12)
D3D12EnableDebugLayer(d3d12->debugController); D3D12EnableDebugLayer(d3d12->debugController);
#endif #endif
#ifdef __WINRT__
DXGICreateFactory2(&d3d12->factory);
#else
DXGICreateFactory(&d3d12->factory); DXGICreateFactory(&d3d12->factory);
#endif
{ {
int i = 0; int i = 0;
while (true) while (true)
{ {
#ifdef __WINRT__
if (FAILED(DXGIEnumAdapters2(d3d12->factory, i++, &d3d12->adapter)))
return false;
#else
if (FAILED(DXGIEnumAdapters(d3d12->factory, i++, &d3d12->adapter))) if (FAILED(DXGIEnumAdapters(d3d12->factory, i++, &d3d12->adapter)))
return false; return false;
#endif
if (SUCCEEDED(D3D12CreateDevice_(d3d12->adapter, D3D_FEATURE_LEVEL_11_0, &d3d12->device))) if (SUCCEEDED(D3D12CreateDevice_(d3d12->adapter, D3D_FEATURE_LEVEL_11_0, &d3d12->device)))
break; break;
@ -207,17 +216,28 @@ bool d3d12_init_queue(d3d12_video_t* d3d12)
} }
bool d3d12_init_swapchain(d3d12_video_t* d3d12, bool d3d12_init_swapchain(d3d12_video_t* d3d12,
int width, int height, HWND hwnd) int width, int height, void* corewindow)
{ {
unsigned i; unsigned i;
#ifdef __WINRT__
DXGI_SWAP_CHAIN_DESC1 desc;
memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC1));
#else
DXGI_SWAP_CHAIN_DESC desc; DXGI_SWAP_CHAIN_DESC desc;
HWND hwnd = (HWND)corewindow;
memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC)); memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC));
#endif
desc.BufferCount = countof(d3d12->chain.renderTargets); desc.BufferCount = countof(d3d12->chain.renderTargets);
#ifdef __WINRT__
desc.Width = width;
desc.Height = height;
desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
#else
desc.BufferDesc.Width = width; desc.BufferDesc.Width = width;
desc.BufferDesc.Height = height; desc.BufferDesc.Height = height;
desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
#endif
desc.SampleDesc.Count = 1; desc.SampleDesc.Count = 1;
#if 0 #if 0
desc.BufferDesc.RefreshRate.Numerator = 60; desc.BufferDesc.RefreshRate.Numerator = 60;
@ -225,16 +245,25 @@ bool d3d12_init_swapchain(d3d12_video_t* d3d12,
desc.SampleDesc.Quality = 0; desc.SampleDesc.Quality = 0;
#endif #endif
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
#ifdef HAVE_WINDOW
desc.OutputWindow = hwnd; desc.OutputWindow = hwnd;
desc.Windowed = TRUE; desc.Windowed = TRUE;
#endif
#if 0 #if 0
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
#else #else
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD; desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
#endif #endif
DXGICreateSwapChain(d3d12->factory, d3d12->queue.handle, &desc, &d3d12->chain.handle);
#ifdef __WINRT__
DXGICreateSwapChainForCoreWindow(d3d12->factory, d3d12->queue.handle, corewindow, &desc, NULL, &d3d12->chain.handle);
#else
DXGICreateSwapChain(d3d12->factory, d3d12->queue.handle, &desc, &d3d12->chain.handle);
#endif
#ifdef HAVE_WINDOW
DXGIMakeWindowAssociation(d3d12->factory, hwnd, DXGI_MWA_NO_ALT_ENTER); DXGIMakeWindowAssociation(d3d12->factory, hwnd, DXGI_MWA_NO_ALT_ENTER);
#endif
d3d12->chain.frame_index = DXGIGetCurrentBackBufferIndex(d3d12->chain.handle); d3d12->chain.frame_index = DXGIGetCurrentBackBufferIndex(d3d12->chain.handle);
@ -291,7 +320,7 @@ static D3D12_CPU_DESCRIPTOR_HANDLE d3d12_descriptor_heap_slot_alloc(d3d12_descri
static void static void
d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIPTOR_HANDLE handle) d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIPTOR_HANDLE handle)
{ {
int i; unsigned i;
if (!handle.ptr) if (!handle.ptr)
return; return;
@ -303,7 +332,7 @@ d3d12_descriptor_heap_slot_free(d3d12_descriptor_heap_t* heap, D3D12_CPU_DESCRIP
assert(heap->map[i]); assert(heap->map[i]);
heap->map[i] = false; heap->map[i] = false;
if (heap->start > i) if (heap->start > (int)i)
heap->start = i; heap->start = i;
} }

View File

@ -1001,6 +1001,7 @@ static INLINE void D3D12ClearStoredMessages(D3D12InfoQueue info_queue)
{ {
info_queue->lpVtbl->ClearStoredMessages(info_queue); info_queue->lpVtbl->ClearStoredMessages(info_queue);
} }
#ifndef __WINRT__
static INLINE HRESULT D3D12GetMessageA( static INLINE HRESULT D3D12GetMessageA(
D3D12InfoQueue info_queue, D3D12InfoQueue info_queue,
UINT64 message_index, UINT64 message_index,
@ -1009,6 +1010,7 @@ static INLINE HRESULT D3D12GetMessageA(
{ {
return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length); return info_queue->lpVtbl->GetMessageA(info_queue, message_index, message, message_byte_length);
} }
#endif
static INLINE UINT64 D3D12GetNumMessagesAllowedByStorageFilter(D3D12InfoQueue info_queue) static INLINE UINT64 D3D12GetNumMessagesAllowedByStorageFilter(D3D12InfoQueue info_queue)
{ {
return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue); return info_queue->lpVtbl->GetNumMessagesAllowedByStorageFilter(info_queue);
@ -1341,7 +1343,11 @@ static_assert(
typedef struct typedef struct
{ {
unsigned cur_mon_id; unsigned cur_mon_id;
#ifdef __WINRT__
DXGIFactory2 factory;
#else
DXGIFactory factory; DXGIFactory factory;
#endif
DXGIAdapter adapter; DXGIAdapter adapter;
D3D12Device device; D3D12Device device;
@ -1499,7 +1505,7 @@ bool d3d12_init_pipeline(
D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc, D3D12_GRAPHICS_PIPELINE_STATE_DESC* desc,
D3D12PipelineState* out); D3D12PipelineState* out);
bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, HWND hwnd); bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, void *corewindow);
bool d3d12_init_queue(d3d12_video_t* d3d12); bool d3d12_init_queue(d3d12_video_t* d3d12);

View File

@ -12,6 +12,7 @@
* You should have received a copy of the GNU General Public License along with RetroArch. * You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
#include <string/stdstring.h>
#include "../../configuration.h" #include "../../configuration.h"
#include "../../verbosity.h" #include "../../verbosity.h"
@ -88,8 +89,10 @@ void *d3d_matrix_multiply(void *_pout,
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
for (j = 0; j < 4; j++) for (j = 0; j < 4; j++)
pout->m[i][j] = pm1->m[i][0] * pm2->m[0][j] + pm1->m[i][1] * pm2->m[1][j] + pout->m[i][j] = pm1->m[i][0] *
pm1->m[i][2] * pm2->m[2][j] + pm1->m[i][3] * pm2->m[3][j]; pm2->m[0][j] + pm1->m[i][1] * pm2->m[1][j] +
pm1->m[i][2] * pm2->m[2][j] +
pm1->m[i][3] * pm2->m[3][j];
} }
return pout; return pout;
} }
@ -125,3 +128,43 @@ int32_t d3d_translate_filter(unsigned type)
return (int32_t)D3D_TEXTURE_FILTER_POINT; return (int32_t)D3D_TEXTURE_FILTER_POINT;
} }
void d3d_input_driver(const char* input_name, const char* joypad_name, const input_driver_t** input, void** input_data)
{
#if defined(__WINRT__)
/* Plain xinput is supported on UWP, but it
* supports joypad only (uwp driver was added later) */
if (string_is_equal(input_name, "xinput"))
{
void *xinput = input_xinput.init(joypad_name);
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
*input_data = xinput;
}
else
{
void *uwp = input_uwp.init(joypad_name);
*input = uwp ? (const input_driver_t*)&input_uwp : NULL;
*input_data = uwp;
}
#elif defined(_XBOX)
void *xinput = input_xinput.init(joypad_name);
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
*input_data = xinput;
#else
#if _WIN32_WINNT >= 0x0501
/* winraw only available since XP */
if (string_is_equal(input_name, "raw"))
{
*input_data = input_winraw.init(joypad_name);
if (*input_data)
{
*input = &input_winraw;
return;
}
}
#endif
*input_data = input_dinput.init(joypad_name);
*input = *input_data ? &input_dinput : NULL;
#endif
}

View File

@ -20,10 +20,18 @@
#include "../../config.h" #include "../../config.h"
#endif #endif
#ifndef _XBOX #if !defined(__WINRT__) && !defined(_XBOX)
#ifndef HAVE_WINDOW
#define HAVE_WINDOW #define HAVE_WINDOW
#endif #endif
#ifndef HAVE_MONITOR
#define HAVE_MONITOR
#endif
#endif
#include <boolean.h> #include <boolean.h>
#include <retro_common_api.h> #include <retro_common_api.h>
@ -97,6 +105,9 @@ void *d3d_matrix_rotation_z(void *_pout, float angle);
int32_t d3d_translate_filter(unsigned type); int32_t d3d_translate_filter(unsigned type);
void d3d_input_driver(const char* input_name,
const char* joypad_name, const input_driver_t** input, void** input_data);
RETRO_END_DECLS RETRO_END_DECLS
#endif #endif

View File

@ -25,7 +25,7 @@
#include "d3dcompiler_common.h" #include "d3dcompiler_common.h"
#include "../../verbosity.h" #include "../../verbosity.h"
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
#include <dynamic/dylib.h> #include <dynamic/dylib.h>
static dylib_t d3dcompiler_dll; static dylib_t d3dcompiler_dll;

View File

@ -30,7 +30,7 @@
#include "../video_driver.h" #include "../video_driver.h"
#include "win32_common.h" #include "win32_common.h"
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
#include <dynamic/dylib.h> #include <dynamic/dylib.h>
HRESULT WINAPI CreateDXGIFactory1(REFIID riid, void** ppFactory) HRESULT WINAPI CreateDXGIFactory1(REFIID riid, void** ppFactory)
@ -309,6 +309,7 @@ void dxgi_update_title(video_frame_info_t* video_info)
if (settings->bools.video_memory_show) if (settings->bools.video_memory_show)
{ {
#ifndef __WINRT__
MEMORYSTATUS stat; MEMORYSTATUS stat;
char mem[128]; char mem[128];
@ -319,6 +320,7 @@ void dxgi_update_title(video_frame_info_t* video_info)
mem, sizeof(mem), " || MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f), mem, sizeof(mem), " || MEM: %.2f/%.2fMB", stat.dwAvailPhys / (1024.0f * 1024.0f),
stat.dwTotalPhys / (1024.0f * 1024.0f)); stat.dwTotalPhys / (1024.0f * 1024.0f));
strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text)); strlcat(video_info->fps_text, mem, sizeof(video_info->fps_text));
#endif
} }
if (window) if (window)
@ -329,32 +331,11 @@ void dxgi_update_title(video_frame_info_t* video_info)
video_driver_get_window_title(title, sizeof(title)); video_driver_get_window_title(title, sizeof(title));
#ifndef __WINRT__
if (title[0]) if (title[0])
window->set_title(&main_window, title); window->set_title(&main_window, title);
}
}
void dxgi_input_driver(const char* name, const input_driver_t** input, void** input_data)
{
#ifndef __WINRT__
settings_t* settings = config_get_ptr();
#if _WIN32_WINNT >= 0x0501
/* winraw only available since XP */
if (string_is_equal(settings->arrays.input_driver, "raw"))
{
*input_data = input_winraw.init(name);
if (*input_data)
{
*input = &input_winraw;
return;
}
}
#endif
*input_data = input_dinput.init(name);
*input = *input_data ? &input_dinput : NULL;
#endif #endif
}
} }
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt) DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt)

View File

@ -270,6 +270,9 @@ typedef IDXGISurface1* DXGISurface;
typedef IDXGIOutput* DXGIOutput; typedef IDXGIOutput* DXGIOutput;
typedef IDXGIDevice* DXGIDevice; typedef IDXGIDevice* DXGIDevice;
typedef IDXGIFactory1* DXGIFactory; typedef IDXGIFactory1* DXGIFactory;
#ifdef __WINRT__
typedef IDXGIFactory2* DXGIFactory2;
#endif
typedef IDXGIAdapter1* DXGIAdapter; typedef IDXGIAdapter1* DXGIAdapter;
typedef IDXGIDisplayControl* DXGIDisplayControl; typedef IDXGIDisplayControl* DXGIDisplayControl;
typedef IDXGIOutputDuplication* DXGIOutputDuplication; typedef IDXGIOutputDuplication* DXGIOutputDuplication;
@ -414,6 +417,14 @@ static INLINE HRESULT DXGICreateSwapChain(
return factory->lpVtbl->CreateSwapChain( return factory->lpVtbl->CreateSwapChain(
factory, (IUnknown*)device, desc, (IDXGISwapChain**)swap_chain); factory, (IUnknown*)device, desc, (IDXGISwapChain**)swap_chain);
} }
#ifdef __WINRT__
static INLINE HRESULT DXGICreateSwapChainForCoreWindow(
DXGIFactory2 factory, void* device, void* corewindow, DXGI_SWAP_CHAIN_DESC1* desc, DXGIOutput restrict_to, DXGISwapChain* swap_chain)
{
return factory->lpVtbl->CreateSwapChainForCoreWindow(
factory, (IUnknown*)device, (IUnknown*)corewindow, desc, restrict_to, (IDXGISwapChain1**)swap_chain);
}
#endif
static INLINE HRESULT static INLINE HRESULT
DXGICreateSoftwareAdapter(DXGIFactory factory, HMODULE module, DXGIAdapter* adapter) DXGICreateSoftwareAdapter(DXGIFactory factory, HMODULE module, DXGIAdapter* adapter)
{ {
@ -423,6 +434,12 @@ static INLINE HRESULT DXGIEnumAdapters(DXGIFactory factory, UINT id, DXGIAdapter
{ {
return factory->lpVtbl->EnumAdapters1(factory, id, adapter); return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
} }
#ifdef __WINRT__
static INLINE HRESULT DXGIEnumAdapters2(DXGIFactory2 factory, UINT id, DXGIAdapter* adapter)
{
return factory->lpVtbl->EnumAdapters1(factory, id, adapter);
}
#endif
static INLINE BOOL DXGIIsCurrent(DXGIFactory factory) static INLINE BOOL DXGIIsCurrent(DXGIFactory factory)
{ {
return factory->lpVtbl->IsCurrent(factory); return factory->lpVtbl->IsCurrent(factory);
@ -444,6 +461,7 @@ static INLINE HRESULT DXGIGetAdapterDesc1(DXGIAdapter adapter, DXGI_ADAPTER_DESC
{ {
return adapter->lpVtbl->GetDesc1(adapter, desc); return adapter->lpVtbl->GetDesc1(adapter, desc);
} }
#ifndef __WINRT__
static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control) static INLINE ULONG DXGIReleaseDisplayControl(DXGIDisplayControl display_control)
{ {
return display_control->lpVtbl->Release(display_control); return display_control->lpVtbl->Release(display_control);
@ -612,6 +630,7 @@ static INLINE HRESULT DXGICheckPresentDurationSupport(
swap_chain_media, desired_present_duration, closest_smaller_present_duration, swap_chain_media, desired_present_duration, closest_smaller_present_duration,
closest_larger_present_duration); closest_larger_present_duration);
} }
#endif
static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain) static INLINE ULONG DXGIReleaseSwapChain(DXGISwapChain swap_chain)
{ {
return swap_chain->lpVtbl->Release(swap_chain); return swap_chain->lpVtbl->Release(swap_chain);
@ -758,6 +777,12 @@ static INLINE HRESULT DXGICreateFactory(DXGIFactory* factory)
{ {
return CreateDXGIFactory1(uuidof(IDXGIFactory1), (void**)factory); return CreateDXGIFactory1(uuidof(IDXGIFactory1), (void**)factory);
} }
#ifdef __WINRT__
static INLINE HRESULT DXGICreateFactory2(DXGIFactory2* factory)
{
return CreateDXGIFactory1(uuidof(IDXGIFactory2), (void**)factory);
}
#endif
/* internal */ /* internal */
@ -793,7 +818,6 @@ void dxgi_copy(
void* dst_data); void* dst_data);
void dxgi_update_title(video_frame_info_t* video_info); void dxgi_update_title(video_frame_info_t* video_info);
void dxgi_input_driver(const char* name, const input_driver_t** input, void** input_data);
DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt); DXGI_FORMAT glslang_format_to_dxgi(glslang_format fmt);

View File

@ -54,7 +54,7 @@ void gl_load_texture_image(GLenum target,
GLenum type, GLenum type,
const GLvoid * data) const GLvoid * data)
{ {
#ifndef HAVE_PSGL #if !defined(HAVE_PSGL) && !defined(ORBIS)
#ifdef HAVE_OPENGLES2 #ifdef HAVE_OPENGLES2
if (gl_check_capability(GL_CAPS_TEX_STORAGE_EXT) && internalFormat != GL_BGRA_EXT) if (gl_check_capability(GL_CAPS_TEX_STORAGE_EXT) && internalFormat != GL_BGRA_EXT)
{ {

25
gfx/common/orbis_common.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef ORBIS_COMMON_H__
#define ORBIS_COMMON_H__
#ifdef HAVE_EGL
#include <piglet.h>
#include "../common/egl_common.h"
#endif
#define ATTR_ORBISGL_WIDTH 1920
#define ATTR_ORBISGL_HEIGHT 1080
typedef struct
{
#ifdef HAVE_EGL
egl_ctx_data_t egl;
ScePglConfig pgl_config;
#endif
SceWindow native_window;
bool resize;
unsigned width, height;
float refresh_rate;
} orbis_ctx_data_t;
#endif

View File

@ -3,6 +3,11 @@ WAYSCAN=/usr/bin/wayland-scanner
WAYLAND_PROTOS=/usr/share/wayland-protocols WAYLAND_PROTOS=/usr/share/wayland-protocols
OUTPUT=gfx/common/wayland OUTPUT=gfx/common/wayland
if [ ! -d $WAYLAND_PROTOS ]; then
WAYSCAN=/usr/local/bin/wayland-scanner
WAYLAND_PROTOS=/usr/local/share/wayland-protocols
fi
if [ ! -d $OUTPUT ]; then if [ ! -d $OUTPUT ]; then
mkdir $OUTPUT mkdir $OUTPUT
fi fi

View File

@ -591,8 +591,13 @@ static LRESULT win32_handle_keyboard_event(HWND hwnd, UINT message,
settings_t *settings = config_get_ptr(); settings_t *settings = config_get_ptr();
if (settings && string_is_equal(settings->arrays.input_driver, "raw")) if (settings && string_is_equal(settings->arrays.input_driver, "raw"))
keysym = (unsigned)wparam; keysym = (unsigned)wparam;
else
#endif #endif
{
/* extended keys will map to dinput if the high bit is set */
if (input_get_ptr() == &input_dinput && (lparam >> 24 & 0x1))
keysym |= 0x80;
}
/* Key released? */ /* Key released? */
if (message == WM_KEYUP || message == WM_SYSKEYUP) if (message == WM_KEYUP || message == WM_SYSKEYUP)
keydown = false; keydown = false;

View File

@ -82,6 +82,12 @@ static void* win32_display_server_init(void)
return NULL; return NULL;
#ifdef HAS_TASKBAR_EXT #ifdef HAS_TASKBAR_EXT
if (FAILED(CoInitialize(NULL)))
{
RARCH_ERR("COM initialization failed, ITaskbarList3 disabled\n");
return dispserv;
}
#ifdef __cplusplus #ifdef __cplusplus
/* When compiling in C++ mode, GUIDs are references instead of pointers */ /* When compiling in C++ mode, GUIDs are references instead of pointers */
hr = CoCreateInstance(CLSID_TaskbarList, NULL, hr = CoCreateInstance(CLSID_TaskbarList, NULL,
@ -96,6 +102,7 @@ static void* win32_display_server_init(void)
{ {
g_taskbarList = NULL; g_taskbarList = NULL;
RARCH_ERR("[dispserv]: CoCreateInstance of ITaskbarList3 failed.\n"); RARCH_ERR("[dispserv]: CoCreateInstance of ITaskbarList3 failed.\n");
CoUninitialize();
} }
#endif #endif
@ -115,6 +122,7 @@ static void win32_display_server_destroy(void *data)
{ {
ITaskbarList3_Release(g_taskbarList); ITaskbarList3_Release(g_taskbarList);
g_taskbarList = NULL; g_taskbarList = NULL;
CoUninitialize();
} }
#endif #endif

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2018 - Ali Bouhlel * Copyright (C) 2014-2018 - Ali Bouhlel
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -27,6 +27,7 @@
#include "../video_driver.h" #include "../video_driver.h"
#include "../font_driver.h" #include "../font_driver.h"
#include "../common/d3d_common.h"
#include "../common/win32_common.h" #include "../common/win32_common.h"
#include "../common/d3d10_common.h" #include "../common/d3d10_common.h"
#include "../common/dxgi_common.h" #include "../common/dxgi_common.h"
@ -35,6 +36,10 @@
#include "../../menu/menu_driver.h" #include "../../menu/menu_driver.h"
#endif #endif
#ifdef __WINRT__
#error "UWP does not support D3D10"
#endif
#ifdef HAVE_OVERLAY #ifdef HAVE_OVERLAY
static void d3d10_free_overlays(d3d10_video_t* d3d10) static void d3d10_free_overlays(d3d10_video_t* d3d10)
{ {
@ -556,8 +561,12 @@ static void d3d10_gfx_free(void* data)
Release(d3d10->device); Release(d3d10->device);
} }
#ifdef HAVE_MONITOR
win32_monitor_from_window(); win32_monitor_from_window();
#endif
#ifdef HAVE_WINDOW
win32_destroy_window(); win32_destroy_window();
#endif
free(d3d10); free(d3d10);
} }
@ -566,31 +575,41 @@ d3d10_gfx_init(const video_info_t* video,
const input_driver_t** input, void** input_data) const input_driver_t** input, void** input_data)
{ {
unsigned i; unsigned i;
#ifdef HAVE_MONITOR
MONITORINFOEX current_mon; MONITORINFOEX current_mon;
HMONITOR hm_to_use; HMONITOR hm_to_use;
WNDCLASSEX wndclass = { 0 }; WNDCLASSEX wndclass = { 0 };
#endif
settings_t* settings = config_get_ptr(); settings_t* settings = config_get_ptr();
d3d10_video_t* d3d10 = (d3d10_video_t*)calloc(1, sizeof(*d3d10)); d3d10_video_t* d3d10 = (d3d10_video_t*)calloc(1, sizeof(*d3d10));
if (!d3d10) if (!d3d10)
return NULL; return NULL;
#ifdef HAVE_WINDOW
win32_window_reset(); win32_window_reset();
#endif
#ifdef HAVE_MONITOR
win32_monitor_init(); win32_monitor_init();
wndclass.lpfnWndProc = WndProcD3D; wndclass.lpfnWndProc = WndProcD3D;
#ifdef HAVE_WINDOW
win32_window_init(&wndclass, true, NULL); win32_window_init(&wndclass, true, NULL);
#endif
win32_monitor_info(&current_mon, &hm_to_use, &d3d10->cur_mon_id); win32_monitor_info(&current_mon, &hm_to_use, &d3d10->cur_mon_id);
#endif
d3d10->vp.full_width = video->width; d3d10->vp.full_width = video->width;
d3d10->vp.full_height = video->height; d3d10->vp.full_height = video->height;
#ifdef HAVE_MONITOR
if (!d3d10->vp.full_width) if (!d3d10->vp.full_width)
d3d10->vp.full_width = d3d10->vp.full_width =
current_mon.rcMonitor.right - current_mon.rcMonitor.left; current_mon.rcMonitor.right - current_mon.rcMonitor.left;
if (!d3d10->vp.full_height) if (!d3d10->vp.full_height)
d3d10->vp.full_height = d3d10->vp.full_height =
current_mon.rcMonitor.bottom - current_mon.rcMonitor.top; current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
#endif
if (!win32_set_video_mode(d3d10, if (!win32_set_video_mode(d3d10,
d3d10->vp.full_width, d3d10->vp.full_height, video->fullscreen)) d3d10->vp.full_width, d3d10->vp.full_height, video->fullscreen))
@ -598,7 +617,7 @@ d3d10_gfx_init(const video_info_t* video,
RARCH_ERR("[D3D10]: win32_set_video_mode failed.\n"); RARCH_ERR("[D3D10]: win32_set_video_mode failed.\n");
goto error; goto error;
} }
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data); d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
{ {
UINT flags = 0; UINT flags = 0;
@ -611,7 +630,9 @@ d3d10_gfx_init(const video_info_t* video,
desc.BufferDesc.RefreshRate.Numerator = 60; desc.BufferDesc.RefreshRate.Numerator = 60;
desc.BufferDesc.RefreshRate.Denominator = 1; desc.BufferDesc.RefreshRate.Denominator = 1;
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
#ifdef HAVE_WINDOW
desc.OutputWindow = main_window.hwnd; desc.OutputWindow = main_window.hwnd;
#endif
desc.SampleDesc.Count = 1; desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0; desc.SampleDesc.Quality = 0;
desc.Windowed = TRUE; desc.Windowed = TRUE;
@ -1598,7 +1619,12 @@ static const video_poke_interface_t d3d10_poke_interface = {
d3d10_gfx_load_texture, d3d10_gfx_load_texture,
d3d10_gfx_unload_texture, d3d10_gfx_unload_texture,
NULL, /* set_video_mode */ NULL, /* set_video_mode */
#ifndef __WINRT__
win32_get_refresh_rate, win32_get_refresh_rate,
#else
/* UWP does not expose this information easily */
NULL,
#endif
d3d10_set_filtering, d3d10_set_filtering,
NULL, /* get_video_output_size */ NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */ NULL, /* get_video_output_prev */

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2018 - Ali Bouhlel * Copyright (C) 2014-2018 - Ali Bouhlel
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -34,6 +34,7 @@
#include "../video_shader_parse.h" #include "../video_shader_parse.h"
#include "../drivers_shader/slang_preprocess.h" #include "../drivers_shader/slang_preprocess.h"
#include "../common/d3d_common.h"
#include "../common/d3d11_common.h" #include "../common/d3d11_common.h"
#include "../common/dxgi_common.h" #include "../common/dxgi_common.h"
#include "../common/d3dcompiler_common.h" #include "../common/d3dcompiler_common.h"
@ -41,6 +42,10 @@
#include "../drivers_shader/slang_process.h" #include "../drivers_shader/slang_process.h"
#endif #endif
#ifdef __WINRT__
#include "../../uwp/uwp_func.h"
#endif
static D3D11Device cached_device_d3d11; static D3D11Device cached_device_d3d11;
static D3D_FEATURE_LEVEL cached_supportedFeatureLevel; static D3D_FEATURE_LEVEL cached_supportedFeatureLevel;
static D3D11DeviceContext cached_context; static D3D11DeviceContext cached_context;
@ -566,8 +571,12 @@ static void d3d11_gfx_free(void* data)
Release(d3d11->device); Release(d3d11->device);
} }
#ifdef HAVE_MONITOR
win32_monitor_from_window(); win32_monitor_from_window();
#endif
#ifdef HAVE_WINDOW
win32_destroy_window(); win32_destroy_window();
#endif
free(d3d11); free(d3d11);
} }
@ -575,29 +584,39 @@ static void d3d11_gfx_free(void* data)
d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data) d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
{ {
unsigned i; unsigned i;
#ifdef HAVE_MONITOR
MONITORINFOEX current_mon; MONITORINFOEX current_mon;
HMONITOR hm_to_use; HMONITOR hm_to_use;
WNDCLASSEX wndclass = { 0 }; WNDCLASSEX wndclass = { 0 };
#endif
settings_t* settings = config_get_ptr(); settings_t* settings = config_get_ptr();
d3d11_video_t* d3d11 = (d3d11_video_t*)calloc(1, sizeof(*d3d11)); d3d11_video_t* d3d11 = (d3d11_video_t*)calloc(1, sizeof(*d3d11));
if (!d3d11) if (!d3d11)
return NULL; return NULL;
#ifdef HAVE_WINDOW
win32_window_reset(); win32_window_reset();
#endif
#ifdef HAVE_MONITOR
win32_monitor_init(); win32_monitor_init();
wndclass.lpfnWndProc = WndProcD3D; wndclass.lpfnWndProc = WndProcD3D;
#ifdef HAVE_WINDOW
win32_window_init(&wndclass, true, NULL); win32_window_init(&wndclass, true, NULL);
#endif
win32_monitor_info(&current_mon, &hm_to_use, &d3d11->cur_mon_id); win32_monitor_info(&current_mon, &hm_to_use, &d3d11->cur_mon_id);
#endif
d3d11->vp.full_width = video->width; d3d11->vp.full_width = video->width;
d3d11->vp.full_height = video->height; d3d11->vp.full_height = video->height;
#ifdef HAVE_MONITOR
if (!d3d11->vp.full_width) if (!d3d11->vp.full_width)
d3d11->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left; d3d11->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left;
if (!d3d11->vp.full_height) if (!d3d11->vp.full_height)
d3d11->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top; d3d11->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
#endif
if (!win32_set_video_mode(d3d11, d3d11->vp.full_width, d3d11->vp.full_height, video->fullscreen)) if (!win32_set_video_mode(d3d11, d3d11->vp.full_width, d3d11->vp.full_height, video->fullscreen))
{ {
@ -605,7 +624,7 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
goto error; goto error;
} }
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data); d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
{ {
UINT flags = 0; UINT flags = 0;
@ -617,26 +636,45 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
D3D_FEATURE_LEVEL_10_0, D3D_FEATURE_LEVEL_10_0,
D3D_FEATURE_LEVEL_9_3 D3D_FEATURE_LEVEL_9_3
}; };
#ifdef __WINRT__
/* UWP requires the use of newer version of the factory which requires newer version of this struct */
DXGI_SWAP_CHAIN_DESC1 desc = { 0 };
#else
DXGI_SWAP_CHAIN_DESC desc = { 0 }; DXGI_SWAP_CHAIN_DESC desc = { 0 };
#endif
UINT number_feature_levels = ARRAY_SIZE(requested_feature_levels); UINT number_feature_levels = ARRAY_SIZE(requested_feature_levels);
desc.BufferCount = 1; #ifdef __WINRT__
/* UWP forces us to do double-buffering */
desc.BufferCount = 2;
desc.Width = d3d11->vp.full_width;
desc.Height = d3d11->vp.full_height;
desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
#else
desc.BufferCount = 1;
desc.BufferDesc.Width = d3d11->vp.full_width; desc.BufferDesc.Width = d3d11->vp.full_width;
desc.BufferDesc.Height = d3d11->vp.full_height; desc.BufferDesc.Height = d3d11->vp.full_height;
desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM; desc.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
desc.BufferDesc.RefreshRate.Numerator = 60; desc.BufferDesc.RefreshRate.Numerator = 60;
desc.BufferDesc.RefreshRate.Denominator = 1; desc.BufferDesc.RefreshRate.Denominator = 1;
#endif
desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; desc.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
#ifdef HAVE_WINDOW
desc.OutputWindow = main_window.hwnd; desc.OutputWindow = main_window.hwnd;
#endif
desc.SampleDesc.Count = 1; desc.SampleDesc.Count = 1;
desc.SampleDesc.Quality = 0; desc.SampleDesc.Quality = 0;
#if 0 #if 0
desc.Scaling = DXGI_SCALING_STRETCH; desc.Scaling = DXGI_SCALING_STRETCH;
#endif #endif
#ifdef HAVE_WINDOW
desc.Windowed = TRUE; desc.Windowed = TRUE;
#endif
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) #if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
/* On phone, no swap effects are supported. */ /* On phone, no swap effects are supported. */
desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD; desc.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
#elif defined(__WINRT__)
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL;
#else #else
desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL; desc.SwapEffect = DXGI_SWAP_EFFECT_SEQUENTIAL;
#endif #endif
@ -646,37 +684,47 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
#endif #endif
if(cached_device_d3d11 && cached_context) if(cached_device_d3d11 && cached_context)
{ {
IDXGIFactory* dxgiFactory = NULL;
IDXGIDevice* dxgiDevice = NULL;
IDXGIAdapter* adapter = NULL;
d3d11->device = cached_device_d3d11; d3d11->device = cached_device_d3d11;
d3d11->context = cached_context; d3d11->context = cached_context;
d3d11->supportedFeatureLevel = cached_supportedFeatureLevel; d3d11->supportedFeatureLevel = cached_supportedFeatureLevel;
d3d11->device->lpVtbl->QueryInterface(
d3d11->device, uuidof(IDXGIDevice), (void**)&dxgiDevice);
dxgiDevice->lpVtbl->GetAdapter(dxgiDevice, &adapter);
adapter->lpVtbl->GetParent(
adapter, uuidof(IDXGIFactory1), (void**)&dxgiFactory);
dxgiFactory->lpVtbl->CreateSwapChain(
dxgiFactory, (IUnknown*)d3d11->device,
&desc, (IDXGISwapChain**)&d3d11->swapChain);
dxgiFactory->lpVtbl->Release(dxgiFactory);
adapter->lpVtbl->Release(adapter);
dxgiDevice->lpVtbl->Release(dxgiDevice);
} }
else else
{ {
if (FAILED(D3D11CreateDeviceAndSwapChain( if (FAILED(D3D11CreateDevice(
NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags, NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, flags,
requested_feature_levels, number_feature_levels, requested_feature_levels, number_feature_levels,
D3D11_SDK_VERSION, &desc, D3D11_SDK_VERSION, &d3d11->device,
(IDXGISwapChain**)&d3d11->swapChain, &d3d11->device,
&d3d11->supportedFeatureLevel, &d3d11->context))) &d3d11->supportedFeatureLevel, &d3d11->context)))
goto error; goto error;
} }
IDXGIDevice* dxgiDevice = NULL;
IDXGIAdapter* adapter = NULL;
d3d11->device->lpVtbl->QueryInterface(
d3d11->device, uuidof(IDXGIDevice), (void**)&dxgiDevice);
dxgiDevice->lpVtbl->GetAdapter(dxgiDevice, &adapter);
#ifndef __WINRT__
IDXGIFactory* dxgiFactory = NULL;
adapter->lpVtbl->GetParent(
adapter, uuidof(IDXGIFactory1), (void**)&dxgiFactory);
if (FAILED(dxgiFactory->lpVtbl->CreateSwapChain(
dxgiFactory, (IUnknown*)d3d11->device,
&desc, (IDXGISwapChain**)&d3d11->swapChain)))
goto error;
#else
IDXGIFactory2* dxgiFactory = NULL;
adapter->lpVtbl->GetParent(
adapter, uuidof(IDXGIFactory2), (void**)&dxgiFactory);
if (FAILED(dxgiFactory->lpVtbl->CreateSwapChainForCoreWindow(
dxgiFactory, (IUnknown*)d3d11->device, uwp_get_corewindow(),
&desc, NULL, (IDXGISwapChain1**)&d3d11->swapChain)))
goto error;
#endif
dxgiFactory->lpVtbl->Release(dxgiFactory);
adapter->lpVtbl->Release(adapter);
dxgiDevice->lpVtbl->Release(dxgiDevice);
} }
{ {
@ -1142,6 +1190,11 @@ static bool d3d11_gfx_frame(
video_driver_set_size(&video_info->width, &video_info->height); video_driver_set_size(&video_info->width, &video_info->height);
} }
#ifdef __WINRT__
/* UWP requires double-buffering, so make sure we bind to the appropariate backbuffer */
D3D11SetRenderTargets(context, 1, &d3d11->renderTargetView, NULL);
#endif
PERF_START(); PERF_START();
#if 0 /* custom viewport doesn't call apply_state_changes, so we can't rely on this for now */ #if 0 /* custom viewport doesn't call apply_state_changes, so we can't rely on this for now */
@ -1622,7 +1675,12 @@ static const video_poke_interface_t d3d11_poke_interface = {
d3d11_gfx_load_texture, d3d11_gfx_load_texture,
d3d11_gfx_unload_texture, d3d11_gfx_unload_texture,
NULL, /* set_video_mode */ NULL, /* set_video_mode */
#ifndef __WINRT__
win32_get_refresh_rate, win32_get_refresh_rate,
#else
/* UWP does not expose this information easily */
NULL,
#endif
d3d11_set_filtering, d3d11_set_filtering,
NULL, /* get_video_output_size */ NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */ NULL, /* get_video_output_prev */

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2014-2018 - Ali Bouhlel * Copyright (C) 2014-2018 - Ali Bouhlel
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -22,6 +22,7 @@
#include "../video_driver.h" #include "../video_driver.h"
#include "../font_driver.h" #include "../font_driver.h"
#include "../common/d3d_common.h"
#include "../common/win32_common.h" #include "../common/win32_common.h"
#include "../common/dxgi_common.h" #include "../common/dxgi_common.h"
#include "../common/d3d12_common.h" #include "../common/d3d12_common.h"
@ -864,8 +865,12 @@ static void d3d12_gfx_free(void* data)
Release(d3d12->device); Release(d3d12->device);
Release(d3d12->adapter); Release(d3d12->adapter);
#ifdef HAVE_MONITOR
win32_monitor_from_window(); win32_monitor_from_window();
#endif
#ifdef HAVE_WINDOW
win32_destroy_window(); win32_destroy_window();
#endif
free(d3d12); free(d3d12);
} }
@ -873,29 +878,39 @@ static void d3d12_gfx_free(void* data)
static void* static void*
d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data) d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** input_data)
{ {
#ifdef HAVE_MONITOR
MONITORINFOEX current_mon; MONITORINFOEX current_mon;
HMONITOR hm_to_use; HMONITOR hm_to_use;
WNDCLASSEX wndclass = { 0 }; WNDCLASSEX wndclass = { 0 };
#endif
settings_t* settings = config_get_ptr(); settings_t* settings = config_get_ptr();
d3d12_video_t* d3d12 = (d3d12_video_t*)calloc(1, sizeof(*d3d12)); d3d12_video_t* d3d12 = (d3d12_video_t*)calloc(1, sizeof(*d3d12));
if (!d3d12) if (!d3d12)
return NULL; return NULL;
#ifdef HAVE_WINDOW
win32_window_reset(); win32_window_reset();
#endif
#ifdef HAVE_MONITOR
win32_monitor_init(); win32_monitor_init();
wndclass.lpfnWndProc = WndProcD3D; wndclass.lpfnWndProc = WndProcD3D;
#ifdef HAVE_WINDOW
win32_window_init(&wndclass, true, NULL); win32_window_init(&wndclass, true, NULL);
#endif
win32_monitor_info(&current_mon, &hm_to_use, &d3d12->cur_mon_id); win32_monitor_info(&current_mon, &hm_to_use, &d3d12->cur_mon_id);
#endif
d3d12->vp.full_width = video->width; d3d12->vp.full_width = video->width;
d3d12->vp.full_height = video->height; d3d12->vp.full_height = video->height;
#ifdef HAVE_MONITOR
if (!d3d12->vp.full_width) if (!d3d12->vp.full_width)
d3d12->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left; d3d12->vp.full_width = current_mon.rcMonitor.right - current_mon.rcMonitor.left;
if (!d3d12->vp.full_height) if (!d3d12->vp.full_height)
d3d12->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top; d3d12->vp.full_height = current_mon.rcMonitor.bottom - current_mon.rcMonitor.top;
#endif
if (!win32_set_video_mode(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, video->fullscreen)) if (!win32_set_video_mode(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, video->fullscreen))
{ {
@ -903,7 +918,7 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
goto error; goto error;
} }
dxgi_input_driver(settings->arrays.input_joypad_driver, input, input_data); d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
if (!d3d12_init_base(d3d12)) if (!d3d12_init_base(d3d12))
goto error; goto error;
@ -917,8 +932,13 @@ d3d12_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
if (!d3d12_init_queue(d3d12)) if (!d3d12_init_queue(d3d12))
goto error; goto error;
#ifdef __WINRT__
if (!d3d12_init_swapchain(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, uwp_get_corewindow()))
goto error;
#else
if (!d3d12_init_swapchain(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, main_window.hwnd)) if (!d3d12_init_swapchain(d3d12, d3d12->vp.full_width, d3d12->vp.full_height, main_window.hwnd))
goto error; goto error;
#endif
d3d12_init_samplers(d3d12); d3d12_init_samplers(d3d12);
d3d12_set_filtering(d3d12, 0, video->smooth); d3d12_set_filtering(d3d12, 0, video->smooth);
@ -1764,7 +1784,12 @@ static const video_poke_interface_t d3d12_poke_interface = {
d3d12_gfx_load_texture, d3d12_gfx_load_texture,
d3d12_gfx_unload_texture, d3d12_gfx_unload_texture,
NULL, /* set_video_mode */ NULL, /* set_video_mode */
#ifndef __WINRT__
win32_get_refresh_rate, win32_get_refresh_rate,
#else
/* UWP does not expose this information easily */
NULL,
#endif
d3d12_set_filtering, d3d12_set_filtering,
NULL, /* get_video_output_size */ NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */ NULL, /* get_video_output_prev */

View File

@ -47,9 +47,6 @@
#ifdef _XBOX #ifdef _XBOX
#define D3D8_PRESENTATIONINTERVAL D3DRS_PRESENTATIONINTERVAL #define D3D8_PRESENTATIONINTERVAL D3DRS_PRESENTATIONINTERVAL
#else
#define HAVE_MONITOR
#define HAVE_WINDOW
#endif #endif
#ifdef HAVE_MENU #ifdef HAVE_MENU
@ -61,6 +58,10 @@
#include "../../core.h" #include "../../core.h"
#include "../../verbosity.h" #include "../../verbosity.h"
#ifdef __WINRT__
#error "UWP does not support D3D8"
#endif
static LPDIRECT3D8 g_pD3D8; static LPDIRECT3D8 g_pD3D8;
#ifdef _XBOX #ifdef _XBOX
@ -1137,37 +1138,6 @@ static void d3d8_set_osd_msg(void *data,
d3d8_end_scene(d3d->dev); d3d8_end_scene(d3d->dev);
} }
static void d3d8_input_driver(
const input_driver_t **input, void **input_data)
{
settings_t *settings = config_get_ptr();
const char *name = settings ?
settings->arrays.input_joypad_driver : NULL;
#ifdef _XBOX
void *xinput = input_xinput.init(name);
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
*input_data = xinput;
#else
#if _WIN32_WINNT >= 0x0501
/* winraw only available since XP */
if (string_is_equal(settings->arrays.input_driver, "raw"))
{
*input_data = input_winraw.init(name);
if (*input_data)
{
*input = &input_winraw;
dinput = NULL;
return;
}
}
#endif
dinput = input_dinput.init(name);
*input = dinput ? &input_dinput : NULL;
*input_data = dinput;
#endif
}
static bool d3d8_init_internal(d3d8_video_t *d3d, static bool d3d8_init_internal(d3d8_video_t *d3d,
const video_info_t *info, const input_driver_t **input, const video_info_t *info, const input_driver_t **input,
void **input_data) void **input_data)
@ -1255,7 +1225,7 @@ static bool d3d8_init_internal(d3d8_video_t *d3d,
if (!d3d8_initialize(d3d, &d3d->video_info)) if (!d3d8_initialize(d3d, &d3d->video_info))
return false; return false;
d3d8_input_driver(input, input_data); d3d_input_driver(settings->arrays.input_driver, settings->arrays.input_joypad_driver, input, input_data);
RARCH_LOG("[D3D8]: Init complete.\n"); RARCH_LOG("[D3D8]: Init complete.\n");
return true; return true;
@ -1888,9 +1858,10 @@ static const video_poke_interface_t d3d_poke_interface = {
d3d8_load_texture, d3d8_load_texture,
d3d8_unload_texture, d3d8_unload_texture,
d3d8_set_video_mode, d3d8_set_video_mode,
#ifdef _XBOX #if defined(_XBOX) || defined(__WINRT__)
NULL, NULL,
#else #else
/* UWP does not expose this information easily */
win32_get_refresh_rate, win32_get_refresh_rate,
#endif #endif
NULL, NULL,

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2012-2014 - OV2 * Copyright (C) 2012-2014 - OV2
@ -48,9 +48,6 @@
#ifdef _XBOX #ifdef _XBOX
#define D3D9_PRESENTATIONINTERVAL D3DRS_PRESENTINTERVAL #define D3D9_PRESENTATIONINTERVAL D3DRS_PRESENTINTERVAL
#else
#define HAVE_MONITOR
#define HAVE_WINDOW
#endif #endif
#define FS_PRESENTINTERVAL(pp) ((pp)->PresentationInterval) #define FS_PRESENTINTERVAL(pp) ((pp)->PresentationInterval)
@ -65,6 +62,10 @@
#include "../../verbosity.h" #include "../../verbosity.h"
#include "../../retroarch.h" #include "../../retroarch.h"
#ifdef __WINRT__
#error "UWP does not support D3D9"
#endif
static LPDIRECT3D9 g_pD3D9; static LPDIRECT3D9 g_pD3D9;
void *dinput; void *dinput;
@ -1182,38 +1183,6 @@ static void d3d9_set_osd_msg(void *data,
d3d9_end_scene(dev); d3d9_end_scene(dev);
} }
static void d3d9_input_driver(
const input_driver_t **input, void **input_data)
{
settings_t *settings = config_get_ptr();
const char *name = settings ?
settings->arrays.input_joypad_driver : NULL;
#ifdef _XBOX
void *xinput = input_xinput.init(name);
*input = xinput ? (const input_driver_t*)&input_xinput : NULL;
*input_data = xinput;
#else
#if _WIN32_WINNT >= 0x0501
/* winraw only available since XP */
if (string_is_equal(settings->arrays.input_driver, "raw"))
{
*input_data = input_winraw.init(name);
if (*input_data)
{
*input = &input_winraw;
dinput = NULL;
return;
}
}
#endif
dinput = input_dinput.init(name);
*input = dinput ? &input_dinput : NULL;
*input_data = dinput;
#endif
}
static bool d3d9_init_internal(d3d9_video_t *d3d, static bool d3d9_init_internal(d3d9_video_t *d3d,
const video_info_t *info, const input_driver_t **input, const video_info_t *info, const input_driver_t **input,
void **input_data) void **input_data)
@ -1325,7 +1294,8 @@ static bool d3d9_init_internal(d3d9_video_t *d3d,
if (!d3d9_initialize(d3d, &d3d->video_info)) if (!d3d9_initialize(d3d, &d3d->video_info))
return false; return false;
d3d9_input_driver(input, input_data); d3d_input_driver(settings->arrays.input_joypad_driver,
settings->arrays.input_joypad_driver, input, input_data);
RARCH_LOG("[D3D9]: Init complete.\n"); RARCH_LOG("[D3D9]: Init complete.\n");
return true; return true;
@ -2054,9 +2024,10 @@ static const video_poke_interface_t d3d9_poke_interface = {
d3d9_load_texture, d3d9_load_texture,
d3d9_unload_texture, d3d9_unload_texture,
d3d9_set_video_mode, d3d9_set_video_mode,
#ifdef _XBOX #if defined(_XBOX) || defined(__WINRT__)
NULL, NULL,
#else #else
/* UWP does not expose this information easily */
win32_get_refresh_rate, win32_get_refresh_rate,
#endif #endif
NULL, NULL,

View File

@ -1,5 +1,5 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2018 - Francisco Javier Trujillo Mata * Copyright (C) 2018 - Francisco Javier Trujillo Mata - fjtrujy
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * 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- * of the GNU General Public License as published by the Free Software Found-
@ -18,7 +18,6 @@
#include "../../driver.h" #include "../../driver.h"
#include "../../verbosity.h" #include "../../verbosity.h"
#include <loadcore.h>
#include <kernel.h> #include <kernel.h>
#include <gsKit.h> #include <gsKit.h>
#include <gsInline.h> #include <gsInline.h>
@ -26,6 +25,9 @@
#define GS_TEXT GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00) // turn white GS Screen #define GS_TEXT GS_SETREG_RGBAQ(0x80,0x80,0x80,0x80,0x00) // turn white GS Screen
#define GS_BLACK GS_SETREG_RGBAQ(0x00,0x00,0x00,0x00,0x00) // turn white GS Screen #define GS_BLACK GS_SETREG_RGBAQ(0x00,0x00,0x00,0x00,0x00) // turn white GS Screen
#define NTSC_WIDTH 640
#define NTSC_HEIGHT 448
typedef struct ps2_video typedef struct ps2_video
{ {
GSGLOBAL *gsGlobal; GSGLOBAL *gsGlobal;
@ -45,11 +47,17 @@ typedef struct ps2_video
static GSGLOBAL *init_GSGlobal(void) { static GSGLOBAL *init_GSGlobal(void) {
GSGLOBAL *gsGlobal = gsKit_init_global(); GSGLOBAL *gsGlobal = gsKit_init_global();
gsGlobal->PSM = GS_PSM_CT16; gsGlobal->Mode = GS_MODE_NTSC;
gsGlobal->PSMZ = GS_PSMZ_16S; gsGlobal->Interlace = GS_INTERLACED;
gsGlobal->Field = GS_FIELD;
gsGlobal->Width = NTSC_WIDTH;
gsGlobal->Height = NTSC_HEIGHT;
gsGlobal->PSM = GS_PSM_CT16;
gsGlobal->PSMZ = GS_PSMZ_16;
gsGlobal->DoubleBuffering = GS_SETTING_OFF; gsGlobal->DoubleBuffering = GS_SETTING_OFF;
gsGlobal->ZBuffering = GS_SETTING_OFF; gsGlobal->ZBuffering = GS_SETTING_OFF;
gsGlobal->PrimAlphaEnable = GS_SETTING_OFF; gsGlobal->PrimAlphaEnable = GS_SETTING_OFF;
dmaKit_init(D_CTRL_RELE_OFF,D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC, dmaKit_init(D_CTRL_RELE_OFF,D_CTRL_MFD_OFF, D_CTRL_STS_UNSPEC,
D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF); D_CTRL_STD_OFF, D_CTRL_RCYC_8, 1 << DMA_CHANNEL_GIF);
@ -66,10 +74,7 @@ static GSGLOBAL *init_GSGlobal(void) {
} }
static GSTEXTURE * prepare_new_texture(void) { static GSTEXTURE * prepare_new_texture(void) {
GSTEXTURE *texture = malloc(sizeof *texture); GSTEXTURE *texture = calloc(1, sizeof(*texture));
texture->Width = 0;
texture->Height = 0;
texture->Mem = NULL;
return texture; return texture;
} }
@ -102,7 +107,7 @@ static void color_correction16(uint16_t *buffer, uint32_t dimensions)
uint16_t x16; uint16_t x16;
for (i = 0; i < dimensions; i++) { for (i = 0; i < dimensions; i++) {
x16 = buffer[i]; x16 = buffer[i];
buffer[i] = (x16 & 0x8000) | ((x16 << 10) & 0x7C00) | (x16 & 0x3E0) | ((x16 >> 10) & 0x1F); buffer[i] = (x16 & 0x8000) | ((x16 << 10) & 0x7C00) | ((x16 >> 1) & 0x3E0) | ((x16 >> 11) & 0x1F);
} }
} }
@ -148,16 +153,9 @@ static void vram_alloc(GSGLOBAL *gsGlobal, GSTEXTURE *texture) {
static void prim_texture(GSGLOBAL *gsGlobal, GSTEXTURE *texture, int zPosition, bool force_aspect) { static void prim_texture(GSGLOBAL *gsGlobal, GSTEXTURE *texture, int zPosition, bool force_aspect) {
float x1, y1, x2, y2; float x1, y1, x2, y2;
if (force_aspect) { if (force_aspect) {
float delta = 1.0f; float width_proportion = (float)gsGlobal->Width / (float)texture->Width;
float texture_aspect_ratio = texture->Width / texture->Height; float height_proportion = (float)gsGlobal->Height / (float)texture->Height;
float gsGlobal_aspect_ratio = gsGlobal->Width / gsGlobal->Height; float delta = MIN(width_proportion, height_proportion);
if (texture_aspect_ratio < gsGlobal_aspect_ratio) {
//height
delta = gsGlobal->Height / texture->Height;
} else {
//width
delta = gsGlobal->Width / texture->Width;
}
float newWidth = texture->Width * delta; float newWidth = texture->Width * delta;
float newHeight = texture->Height * delta; float newHeight = texture->Height * delta;

View File

@ -0,0 +1,302 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2018 - M4xw
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include "../common/orbis_common.h"
#include "../../frontend/frontend_driver.h"
static enum gfx_ctx_api ctx_orbis_api = GFX_CTX_OPENGL_API;
orbis_ctx_data_t *nx_ctx_ptr = NULL;
extern bool platform_orbis_has_focus;
void orbis_ctx_destroy(void *data)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
if (ctx_orbis)
{
#ifdef HAVE_EGL
egl_destroy(&ctx_orbis->egl);
#endif
ctx_orbis->resize = false;
free(ctx_orbis);
}
}
static void orbis_ctx_get_video_size(void *data,
unsigned *width, unsigned *height)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
*width = ATTR_ORBISGL_WIDTH;
*height = ATTR_ORBISGL_HEIGHT;
}
static void *orbis_ctx_init(video_frame_info_t *video_info, void *video_driver)
{
#ifdef HAVE_EGL
int ret;
EGLint n;
EGLint major, minor;
static const EGLint attribs[] = {
EGL_BLUE_SIZE, 8,
EGL_GREEN_SIZE, 8,
EGL_RED_SIZE, 8,
EGL_ALPHA_SIZE, 8,
EGL_NONE};
#endif
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)calloc(1, sizeof(*ctx_orbis));
if (!ctx_orbis)
return NULL;
nx_ctx_ptr = ctx_orbis;
#ifdef HAVE_EGL
memset(&ctx_orbis->pgl_config, 0, sizeof(ctx_orbis->pgl_config));
{
ctx_orbis->pgl_config.size=sizeof(ctx_orbis->pgl_config);
ctx_orbis->pgl_config.flags=SCE_PGL_FLAGS_USE_COMPOSITE_EXT | SCE_PGL_FLAGS_USE_FLEXIBLE_MEMORY | 0x60;
ctx_orbis->pgl_config.processOrder=1;
ctx_orbis->pgl_config.systemSharedMemorySize=0x200000;
ctx_orbis->pgl_config.videoSharedMemorySize=0x2400000;
ctx_orbis->pgl_config.maxMappedFlexibleMemory=0xAA00000;
ctx_orbis->pgl_config.drawCommandBufferSize=0xC0000;
ctx_orbis->pgl_config.lcueResourceBufferSize=0x10000;
ctx_orbis->pgl_config.dbgPosCmd_0x40=ATTR_ORBISGL_WIDTH;
ctx_orbis->pgl_config.dbgPosCmd_0x44=ATTR_ORBISGL_HEIGHT;
ctx_orbis->pgl_config.dbgPosCmd_0x48=0;
ctx_orbis->pgl_config.dbgPosCmd_0x4C=0;
ctx_orbis->pgl_config.unk_0x5C=2;
}
ret = scePigletSetConfigurationVSH(&ctx_orbis->pgl_config);
if (!ret)
{
printf("[ORBISGL] scePigletSetConfigurationVSH failed 0x%08X.\n",ret);
goto error;
}
if (!egl_init_context(&ctx_orbis->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
&major, &minor, &n, attribs, NULL))
{
egl_report_error();
printf("[ORBIS]: EGL error: %d.\n", eglGetError());
goto error;
}
#endif
return ctx_orbis;
error:
orbis_ctx_destroy(video_driver);
return NULL;
}
static void orbis_ctx_check_window(void *data, bool *quit,
bool *resize, unsigned *width, unsigned *height, bool is_shutdown)
{
unsigned new_width, new_height;
orbis_ctx_get_video_size(data, &new_width, &new_height);
if (new_width != *width || new_height != *height)
{
*width = new_width;
*height = new_height;
*resize = true;
}
*quit = (bool)false;
}
static bool orbis_ctx_set_video_mode(void *data,
video_frame_info_t *video_info,
unsigned width, unsigned height,
bool fullscreen)
{
/* Create an EGL rendering context */
static const EGLint contextAttributeList[] =
{
EGL_CONTEXT_CLIENT_VERSION, 2,
EGL_NONE};
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
ctx_orbis->width = ATTR_ORBISGL_HEIGHT;
ctx_orbis->height = ATTR_ORBISGL_WIDTH;
ctx_orbis->native_window.width = ctx_orbis->width;
ctx_orbis->native_window.height = ctx_orbis->height;
ctx_orbis->refresh_rate = 60;
#ifdef HAVE_EGL
if (!egl_create_context(&ctx_orbis->egl, contextAttributeList))
{
egl_report_error();
goto error;
}
#endif
#ifdef HAVE_EGL
if (!egl_create_surface(&ctx_orbis->egl, &ctx_orbis->native_window))
goto error;
#endif
return true;
error:
printf("[ctx_orbis]: EGL error: %d.\n", eglGetError());
orbis_ctx_destroy(data);
return false;
}
static void orbis_ctx_input_driver(void *data,
const char *name,
const input_driver_t **input, void **input_data)
{
*input = NULL;
*input_data = NULL;
}
static enum gfx_ctx_api orbis_ctx_get_api(void *data)
{
return ctx_orbis_api;
}
static bool orbis_ctx_bind_api(void *data,
enum gfx_ctx_api api, unsigned major, unsigned minor)
{
(void)data;
ctx_orbis_api = api;
if (api == GFX_CTX_OPENGL_ES_API)
if (eglBindAPI(EGL_OPENGL_ES_API) != EGL_FALSE)
return true;
return false;
}
static bool orbis_ctx_has_focus(void *data)
{
(void)data;
return true;
}
static bool orbis_ctx_suppress_screensaver(void *data, bool enable)
{
(void)data;
(void)enable;
return false;
}
static void orbis_ctx_set_swap_interval(void *data,
int swap_interval)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
#ifdef HAVE_EGL
egl_set_swap_interval(&ctx_orbis->egl, swap_interval);
#endif
}
static void orbis_ctx_swap_buffers(void *data, void *data2)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
#ifdef HAVE_EGL
egl_swap_buffers(&ctx_orbis->egl);
#endif
}
static gfx_ctx_proc_t orbis_ctx_get_proc_address(const char *symbol)
{
#ifdef HAVE_EGL
return egl_get_proc_address(symbol);
#endif
}
static void orbis_ctx_bind_hw_render(void *data, bool enable)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
#ifdef HAVE_EGL
egl_bind_hw_render(&ctx_orbis->egl, enable);
#endif
}
static uint32_t orbis_ctx_get_flags(void *data)
{
uint32_t flags = 0;
BIT32_SET(flags, GFX_CTX_FLAGS_NONE);
return flags;
}
static void orbis_ctx_set_flags(void *data, uint32_t flags)
{
(void)data;
}
static float orbis_ctx_get_refresh_rate(void *data)
{
orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data;
return ctx_orbis->refresh_rate;
}
const gfx_ctx_driver_t orbis_ctx = {
orbis_ctx_init,
orbis_ctx_destroy,
orbis_ctx_get_api,
orbis_ctx_bind_api,
orbis_ctx_set_swap_interval,
orbis_ctx_set_video_mode,
orbis_ctx_get_video_size,
orbis_ctx_get_refresh_rate,
NULL, /* get_video_output_size */
NULL, /* get_video_output_prev */
NULL, /* get_video_output_next */
NULL, /* get_metrics */
NULL,
NULL, /* update_title */
orbis_ctx_check_window,
NULL, /* set_resize */
orbis_ctx_has_focus,
orbis_ctx_suppress_screensaver,
NULL, /* has_windowed */
orbis_ctx_swap_buffers,
orbis_ctx_input_driver,
orbis_ctx_get_proc_address,
NULL,
NULL,
NULL,
"orbis",
orbis_ctx_get_flags,
orbis_ctx_set_flags,
orbis_ctx_bind_hw_render,
NULL,
NULL};

View File

@ -46,10 +46,20 @@ void switch_ctx_destroy(void *data)
static void switch_ctx_get_video_size(void *data, static void switch_ctx_get_video_size(void *data,
unsigned *width, unsigned *height) unsigned *width, unsigned *height)
{ {
switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data; switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data;
*width = 1280; switch (appletGetOperationMode())
*height = 720; {
default:
case AppletOperationMode_Handheld:
*width = 1280;
*height = 720;
break;
case AppletOperationMode_Docked:
*width = 1920;
*height = 1080;
break;
}
} }
static void *switch_ctx_init(video_frame_info_t *video_info, void *video_driver) static void *switch_ctx_init(video_frame_info_t *video_info, void *video_driver)
@ -86,6 +96,10 @@ static void *switch_ctx_init(video_frame_info_t *video_info, void *video_driver)
setenv("NV50_PROG_CHIPSET", "0x120", 1); setenv("NV50_PROG_CHIPSET", "0x120", 1);
#endif #endif
// Needs to be here
gfxInitResolutionDefault(); // 1080p
gfxConfigureResolution(1920, 1080);
#ifdef HAVE_EGL #ifdef HAVE_EGL
if (!egl_init_context(&ctx_nx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, if (!egl_init_context(&ctx_nx->egl, EGL_NONE, EGL_DEFAULT_DISPLAY,
&major, &minor, &n, attribs, NULL)) &major, &minor, &n, attribs, NULL))
@ -114,7 +128,18 @@ static void switch_ctx_check_window(void *data, bool *quit,
{ {
*width = new_width; *width = new_width;
*height = new_height; *height = new_height;
switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data;
ctx_nx->width = *width;
ctx_nx->height = *height;
ctx_nx->native_window.width = ctx_nx->width;
ctx_nx->native_window.height = ctx_nx->height;
ctx_nx->resize = true;
*resize = true; *resize = true;
printf("[NXGL]: Resizing to %dx%d\n", *width, *height);
gfxConfigureCrop(0, 1080 - ctx_nx->height, ctx_nx->width, 1080);
} }
*quit = (bool)false; *quit = (bool)false;
@ -133,8 +158,7 @@ static bool switch_ctx_set_video_mode(void *data,
switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data; switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data;
ctx_nx->width = 1280; switch_ctx_get_video_size(data, &ctx_nx->width, &ctx_nx->height);
ctx_nx->height = 720;
ctx_nx->native_window.width = ctx_nx->width; ctx_nx->native_window.width = ctx_nx->width;
ctx_nx->native_window.height = ctx_nx->height; ctx_nx->native_window.height = ctx_nx->height;
@ -154,10 +178,12 @@ static bool switch_ctx_set_video_mode(void *data,
goto error; goto error;
#endif #endif
gfxConfigureCrop(0, 1080 - ctx_nx->height, ctx_nx->width, 1080);
return true; return true;
error: error:
printf("[ctx_nx]: EGL error: %d.\n", eglGetError()); printf("[NXGL]: EGL error: %d.\n", eglGetError());
switch_ctx_destroy(data); switch_ctx_destroy(data);
return false; return false;

View File

@ -870,8 +870,8 @@ static void gfx_ctx_wl_get_video_size(void *data,
{ {
gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data;
*width = wl->width; *width = wl->width * wl->buffer_scale;
*height = wl->height; *height = wl->height * wl->buffer_scale;
} }
static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl)
@ -1058,8 +1058,8 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height)
break; break;
case GFX_CTX_VULKAN_API: case GFX_CTX_VULKAN_API:
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
wl->width = width; wl->width = width / wl->buffer_scale;
wl->height = height; wl->height = height / wl->buffer_scale;
if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval))
{ {
@ -1618,7 +1618,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data,
#ifdef HAVE_VULKAN #ifdef HAVE_VULKAN
if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND, if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND,
wl->input.dpy, wl->surface, wl->input.dpy, wl->surface,
wl->width, wl->height, wl->swap_interval)) wl->width * wl->buffer_scale, wl->height * wl->buffer_scale, wl->swap_interval))
goto error; goto error;
#endif #endif
break; break;

View File

@ -278,7 +278,7 @@ static bool vga_font_init_first(
} }
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
static const font_renderer_t *gdi_font_backends[] = { static const font_renderer_t *gdi_font_backends[] = {
&gdi_font, &gdi_font,
NULL, NULL,
@ -666,7 +666,7 @@ static bool font_init_first(
return switch_font_init_first(font_driver, font_handle, return switch_font_init_first(font_driver, font_handle,
video_data, font_path, font_size, is_threaded); video_data, font_path, font_size, is_threaded);
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
case FONT_DRIVER_RENDER_GDI: case FONT_DRIVER_RENDER_GDI:
return gdi_font_init_first(font_driver, font_handle, return gdi_font_init_first(font_driver, font_handle,
video_data, font_path, font_size, is_threaded); video_data, font_path, font_size, is_threaded);

View File

@ -39,7 +39,7 @@ void* video_display_server_init(void)
switch (type) switch (type)
{ {
case RARCH_DISPLAY_WIN32: case RARCH_DISPLAY_WIN32:
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
current_display_server = &dispserv_win32; current_display_server = &dispserv_win32;
#endif #endif
break; break;

View File

@ -274,14 +274,14 @@ static const video_driver_t *video_drivers[] = {
#ifdef XENON #ifdef XENON
&video_xenon360, &video_xenon360,
#endif #endif
#if defined(HAVE_D3D10) #if defined(HAVE_D3D12)
&video_d3d10, &video_d3d12,
#endif #endif
#if defined(HAVE_D3D11) #if defined(HAVE_D3D11)
&video_d3d11, &video_d3d11,
#endif #endif
#if defined(HAVE_D3D12) #if defined(HAVE_D3D10)
&video_d3d12, &video_d3d10,
#endif #endif
#if defined(HAVE_D3D9) #if defined(HAVE_D3D9)
&video_d3d9, &video_d3d9,
@ -340,7 +340,7 @@ static const video_driver_t *video_drivers[] = {
#ifdef HAVE_XSHM #ifdef HAVE_XSHM
&video_xshm, &video_xshm,
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
&video_gdi, &video_gdi,
#endif #endif
#ifdef DJGPP #ifdef DJGPP
@ -357,6 +357,9 @@ static const video_driver_t *video_drivers[] = {
}; };
static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { static const gfx_ctx_driver_t *gfx_ctx_drivers[] = {
#if defined(ORBIS)
&orbis_ctx,
#endif
#if defined(HAVE_LIBNX) && defined(HAVE_OPENGL) #if defined(HAVE_LIBNX) && defined(HAVE_OPENGL)
&switch_ctx, &switch_ctx,
#endif #endif
@ -416,7 +419,7 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = {
#if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY) #if defined(HAVE_VULKAN) && defined(HAVE_VULKAN_DISPLAY)
&gfx_ctx_khr_display, &gfx_ctx_khr_display,
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
&gfx_ctx_gdi, &gfx_ctx_gdi,
#endif #endif
#ifdef HAVE_SIXEL #ifdef HAVE_SIXEL

View File

@ -1299,6 +1299,7 @@ extern const gfx_ctx_driver_t gfx_ctx_khr_display;
extern const gfx_ctx_driver_t gfx_ctx_gdi; extern const gfx_ctx_driver_t gfx_ctx_gdi;
extern const gfx_ctx_driver_t gfx_ctx_sixel; extern const gfx_ctx_driver_t gfx_ctx_sixel;
extern const gfx_ctx_driver_t switch_ctx; extern const gfx_ctx_driver_t switch_ctx;
extern const gfx_ctx_driver_t orbis_ctx;
extern const gfx_ctx_driver_t gfx_ctx_null; extern const gfx_ctx_driver_t gfx_ctx_null;

View File

@ -4,7 +4,7 @@
/* Common implementation of NTSC filters */ /* Common implementation of NTSC filters */
#include <assert.h> #include <retro_assert.h>
#include <math.h> #include <math.h>
/* Copyright (C) 2006 Shay Green. This module is free software; you /* Copyright (C) 2006 Shay Green. This module is free software; you
@ -121,7 +121,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup )
{ {
int x = kernel_size * 3 / 2 - kernel_half + i; int x = kernel_size * 3 / 2 - kernel_half + i;
kernels [x] *= sum; kernels [x] *= sum;
assert( kernels [x] == kernels [x] ); /* catch numerical instability */ retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */
} }
} }
@ -156,7 +156,7 @@ static void init_filters( init_t* impl, snes_ntsc_setup_t const* setup )
for ( x = i; x < kernel_size; x += 2 ) for ( x = i; x < kernel_size; x += 2 )
{ {
kernels [x] *= sum; kernels [x] *= sum;
assert( kernels [x] == kernels [x] ); /* catch numerical instability */ retro_assert( kernels [x] == kernels [x] ); /* catch numerical instability */
} }
} }
} }

View File

@ -601,6 +601,9 @@ INPUT
#elif defined(DJGPP) #elif defined(DJGPP)
#include "../input/drivers/dos_input.c" #include "../input/drivers/dos_input.c"
#include "../input/drivers_joypad/dos_joypad.c" #include "../input/drivers_joypad/dos_joypad.c"
#elif defined(__WINRT__)
#include "../input/drivers/xdk_xinput_input.c"
#include "../input/drivers/uwp_input.c"
#endif #endif
#ifdef HAVE_WAYLAND #ifdef HAVE_WAYLAND
@ -770,7 +773,7 @@ AUDIO
#elif defined(PSP) || defined(VITA) #elif defined(PSP) || defined(VITA)
#include "../audio/drivers/psp_audio.c" #include "../audio/drivers/psp_audio.c"
#elif defined(PS2) #elif defined(PS2)
// #include "../audio/drivers/ps2_audio.c" #include "../audio/drivers/ps2_audio.c"
#elif defined(_3DS) #elif defined(_3DS)
#include "../audio/drivers/ctr_csnd_audio.c" #include "../audio/drivers/ctr_csnd_audio.c"
#include "../audio/drivers/ctr_dsp_audio.c" #include "../audio/drivers/ctr_dsp_audio.c"
@ -951,6 +954,10 @@ FRONTEND
#include "../frontend/drivers/platform_win32.c" #include "../frontend/drivers/platform_win32.c"
#endif #endif
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
#include "../frontend/drivers/platform_uwp.c"
#endif
#ifdef _XBOX #ifdef _XBOX
#include "../frontend/drivers/platform_xdk.c" #include "../frontend/drivers/platform_xdk.c"
#endif #endif
@ -966,6 +973,8 @@ FRONTEND
#include "../frontend/drivers/platform_wiiu.c" #include "../frontend/drivers/platform_wiiu.c"
#elif defined(PSP) || defined(VITA) #elif defined(PSP) || defined(VITA)
#include "../frontend/drivers/platform_psp.c" #include "../frontend/drivers/platform_psp.c"
#elif defined(ORBIS)
#include "../frontend/drivers/platform_orbis.c"
#elif defined(PS2) #elif defined(PS2)
#include "../frontend/drivers/platform_ps2.c" #include "../frontend/drivers/platform_ps2.c"
#elif defined(_3DS) #elif defined(_3DS)
@ -1259,7 +1268,7 @@ MENU
#include "../menu/drivers_display/menu_display_vga.c" #include "../menu/drivers_display/menu_display_vga.c"
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) #if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
#include "../menu/drivers_display/menu_display_gdi.c" #include "../menu/drivers_display/menu_display_gdi.c"
#endif #endif

View File

@ -98,6 +98,8 @@ void dinput_destroy_context(void)
IDirectInput8_Release(g_dinput_ctx); IDirectInput8_Release(g_dinput_ctx);
g_dinput_ctx = NULL; g_dinput_ctx = NULL;
CoUninitialize();
} }
bool dinput_init_context(void) bool dinput_init_context(void)
@ -105,7 +107,11 @@ bool dinput_init_context(void)
if (g_dinput_ctx) if (g_dinput_ctx)
return true; return true;
CoInitialize(NULL); if (FAILED(CoInitialize(NULL)))
{
RARCH_ERR("[DINPUT]: Failed to initialize the COM interface\n");
return false;
}
/* Who said we shouldn't have same call signature in a COM API? <_< */ /* Who said we shouldn't have same call signature in a COM API? <_< */
#ifdef __cplusplus #ifdef __cplusplus
@ -125,6 +131,7 @@ bool dinput_init_context(void)
error: error:
RARCH_ERR("[DINPUT]: Failed to initialize DirectInput.\n"); RARCH_ERR("[DINPUT]: Failed to initialize DirectInput.\n");
CoUninitialize();
return false; return false;
} }

View File

@ -1,6 +1,5 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2018 - Francisco Javier Trujillo Mata - fjtrujy
* Copyright (C) 2011-2017 - Daniel De Matteis
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * 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- * of the GNU General Public License as published by the Free Software Found-

View File

@ -14,7 +14,8 @@
* If not, see <http://www.gnu.org/licenses/>. * If not, see <http://www.gnu.org/licenses/>.
*/ */
/* TODO/FIXME - set this once the kqueue codepath is implemented and working properly */ /* TODO/FIXME - set this once the kqueue codepath is implemented and working properly,
* also remove libepoll-shim from the Makefile when that happens. */
#if 1 #if 1
#define HAVE_EPOLL #define HAVE_EPOLL
#else #else
@ -46,7 +47,9 @@
#include <sys/poll.h> #include <sys/poll.h>
#include <libudev.h> #include <libudev.h>
#ifdef __linux__
#include <linux/types.h> #include <linux/types.h>
#endif
#include <linux/input.h> #include <linux/input.h>
#include <linux/kd.h> #include <linux/kd.h>
@ -1204,7 +1207,9 @@ static void *udev_input_init(const char *joypad_driver)
udev->joypad = input_joypad_init_driver(joypad_driver, udev); udev->joypad = input_joypad_init_driver(joypad_driver, udev);
input_keymaps_init_keyboard_lut(rarch_key_map_linux); input_keymaps_init_keyboard_lut(rarch_key_map_linux);
#ifdef __linux__
linux_terminal_disable_input(); linux_terminal_disable_input();
#endif
#ifndef HAVE_X11 #ifndef HAVE_X11
RARCH_WARN("[udev]: Full-screen pointer won't be available.\n"); RARCH_WARN("[udev]: Full-screen pointer won't be available.\n");
@ -1299,7 +1304,11 @@ input_driver_t input_udev = {
udev_input_get_capabilities, udev_input_get_capabilities,
"udev", "udev",
udev_input_grab_mouse, udev_input_grab_mouse,
#ifdef __linux__
linux_terminal_grab_stdin, linux_terminal_grab_stdin,
#else
NULL,
#endif
udev_input_set_rumble, udev_input_set_rumble,
udev_input_get_joypad_driver, udev_input_get_joypad_driver,
NULL, NULL,

174
input/drivers/uwp_input.c Normal file
View File

@ -0,0 +1,174 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2018 - Krzysztof Haładyn
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include <stdint.h>
#include <stdlib.h>
#ifdef HAVE_CONFIG_H
#include "../../config.h"
#endif
#include <boolean.h>
#include <libretro.h>
#include <uwp/uwp_func.h>
#include "../input_driver.h"
// TODO: Add support for multiple mice and multiple touch
typedef struct uwp_input
{
bool blocked;
const input_device_driver_t *joypad;
} uwp_input_t;
static void uwp_input_poll(void *data)
{
uwp_input_t *uwp = (uwp_input_t*)data;
if (uwp && uwp->joypad)
uwp->joypad->poll();
uwp_input_next_frame();
}
static int16_t uwp_input_state(void *data,
rarch_joypad_info_t joypad_info,
const struct retro_keybind **binds,
unsigned port, unsigned device,
unsigned index, unsigned id)
{
uwp_input_t *uwp = (uwp_input_t*)data;
switch (device)
{
case RETRO_DEVICE_JOYPAD:
return input_joypad_pressed(uwp->joypad, joypad_info, port, binds[port], id);
case RETRO_DEVICE_ANALOG:
if (binds[port])
return input_joypad_analog(uwp->joypad, joypad_info, port, index, id, binds[port]);
break;
case RETRO_DEVICE_KEYBOARD:
return (id < RETROK_LAST) && uwp_keyboard_pressed(id);
case RETRO_DEVICE_MOUSE:
case RARCH_DEVICE_MOUSE_SCREEN:
return uwp_mouse_state(port, id, device == RARCH_DEVICE_MOUSE_SCREEN);
case RETRO_DEVICE_POINTER:
case RARCH_DEVICE_POINTER_SCREEN:
return uwp_pointer_state(index, id, device == RARCH_DEVICE_POINTER_SCREEN);
}
return 0;
}
static void uwp_input_free_input(void *data)
{
uwp_input_t *uwp = (uwp_input_t*)data;
if (!uwp)
return;
if (uwp->joypad)
uwp->joypad->destroy();
free(uwp);
}
static void *uwp_input_init(const char *joypad_driver)
{
uwp_input_t *uwp = (uwp_input_t*)calloc(1, sizeof(*uwp));
if (!uwp)
return NULL;
input_keymaps_init_keyboard_lut(rarch_key_map_uwp);
uwp->joypad = input_joypad_init_driver(joypad_driver, uwp);
return uwp;
}
static uint64_t uwp_input_get_capabilities(void *data)
{
uint64_t caps = 0;
caps |= (1 << RETRO_DEVICE_JOYPAD);
caps |= (1 << RETRO_DEVICE_MOUSE);
caps |= (1 << RETRO_DEVICE_KEYBOARD);
caps |= (1 << RETRO_DEVICE_POINTER);
caps |= (1 << RETRO_DEVICE_ANALOG);
return caps;
}
static bool uwp_input_set_rumble(void *data, unsigned port,
enum retro_rumble_effect effect, uint16_t strength)
{
struct uwp_input *uwp = (struct uwp_input*)data;
if (!uwp)
return false;
return input_joypad_set_rumble(uwp->joypad, port, effect, strength);
}
static const input_device_driver_t *uwp_input_get_joypad_driver(void *data)
{
uwp_input_t *uwp = (uwp_input_t*)data;
if (!uwp)
return NULL;
return uwp->joypad;
}
static void uwp_input_grab_mouse(void *data, bool state)
{
(void)data;
(void)state;
}
static bool uwp_keyboard_mapping_is_blocked(void *data)
{
uwp_input_t *uwp = (uwp_input_t*)data;
if (!uwp)
return false;
return uwp->blocked;
}
static void uwp_keyboard_mapping_set_block(void *data, bool value)
{
uwp_input_t *uwp = (uwp_input_t*)data;
if (!uwp)
return;
uwp->blocked = value;
}
input_driver_t input_uwp = {
uwp_input_init,
uwp_input_poll,
uwp_input_state,
uwp_input_free_input,
NULL,
NULL,
uwp_input_get_capabilities,
"uwp",
uwp_input_grab_mouse,
NULL,
uwp_input_set_rumble,
uwp_input_get_joypad_driver,
NULL,
uwp_keyboard_mapping_is_blocked,
uwp_keyboard_mapping_set_block,
};

View File

@ -1,7 +1,5 @@
/* RetroArch - A frontend for libretro. /* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2018 - Francisco Javier Trujillo Mata - fjtrujy
* Copyright (C) 2011-2017 - Daniel De Matteis
* Copyright (C) 2013-2014 - CatalystG
* *
* RetroArch is free software: you can redistribute it and/or modify it under the terms * 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- * of the GNU General Public License as published by the Free Software Found-

View File

@ -399,6 +399,8 @@ static void sdl_joypad_poll(void)
break; break;
} }
} }
SDL_FlushEvents(SDL_JOYAXISMOTION, SDL_CONTROLLERDEVICEREMAPPED);
#else #else
SDL_JoystickUpdate(); SDL_JoystickUpdate();
#endif #endif

View File

@ -25,7 +25,9 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/poll.h> #include <sys/poll.h>
#include <libudev.h> #include <libudev.h>
#ifdef __linux__
#include <linux/types.h> #include <linux/types.h>
#endif
#include <linux/input.h> #include <linux/input.h>
#include <retro_inline.h> #include <retro_inline.h>

View File

@ -42,12 +42,20 @@
#ifdef HAVE_DINPUT #ifdef HAVE_DINPUT
#include "dinput_joypad.h" #include "dinput_joypad.h"
#else
int g_xinput_pad_indexes[MAX_USERS];
bool g_xinput_block_pads;
#endif
#if defined(__WINRT__)
#include <Xinput.h>
#endif #endif
/* Check if the definitions do not already exist. /* Check if the definitions do not already exist.
* Official and mingw xinput headers have different include guards. * Official and mingw xinput headers have different include guards.
* Windows 10 API version doesn't have an include guard at all and just uses #pragma once instead
*/ */
#if ((!_XINPUT_H_) && (!__WINE_XINPUT_H)) #if ((!_XINPUT_H_) && (!__WINE_XINPUT_H)) && !defined(__WINRT__)
#define XINPUT_GAMEPAD_DPAD_UP 0x0001 #define XINPUT_GAMEPAD_DPAD_UP 0x0001
#define XINPUT_GAMEPAD_DPAD_DOWN 0x0002 #define XINPUT_GAMEPAD_DPAD_DOWN 0x0002
@ -173,7 +181,7 @@ const char *xinput_joypad_name(unsigned pad)
return XBOX_CONTROLLER_NAMES[xuser]; return XBOX_CONTROLLER_NAMES[xuser];
} }
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
static bool load_xinput_dll(void) static bool load_xinput_dll(void)
{ {
const char *version = "1.4"; const char *version = "1.4";
@ -210,7 +218,7 @@ static bool xinput_joypad_init(void *data)
unsigned i, j; unsigned i, j;
XINPUT_STATE dummy_state; XINPUT_STATE dummy_state;
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
if (!g_xinput_dll) if (!g_xinput_dll)
if (!load_xinput_dll()) if (!load_xinput_dll())
return false; return false;
@ -219,6 +227,9 @@ static bool xinput_joypad_init(void *data)
* First try to load ordinal 100 (XInputGetStateEx). * First try to load ordinal 100 (XInputGetStateEx).
*/ */
g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, (const char*)100); g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, (const char*)100);
#elif defined(__WINRT__)
/* XInputGetStateEx is not available on WinRT */
g_XInputGetStateEx = NULL;
#else #else
g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetStateEx; g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetStateEx;
#endif #endif
@ -230,7 +241,7 @@ static bool xinput_joypad_init(void *data)
* XInputGetState, at the cost of losing guide button support. * XInputGetState, at the cost of losing guide button support.
*/ */
g_xinput_guide_button_supported = false; g_xinput_guide_button_supported = false;
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, "XInputGetState"); g_XInputGetStateEx = (XInputGetStateEx_t)dylib_proc(g_xinput_dll, "XInputGetState");
#else #else
g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetState; g_XInputGetStateEx = (XInputGetStateEx_t)XInputGetState;
@ -239,7 +250,7 @@ static bool xinput_joypad_init(void *data)
if (!g_XInputGetStateEx) if (!g_XInputGetStateEx)
{ {
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n"); RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
dylib_close(g_xinput_dll); dylib_close(g_xinput_dll);
#endif #endif
return false; /* DLL was loaded but did not contain the correct function. */ return false; /* DLL was loaded but did not contain the correct function. */
@ -247,7 +258,7 @@ static bool xinput_joypad_init(void *data)
RARCH_WARN("[XInput]: No guide button support.\n"); RARCH_WARN("[XInput]: No guide button support.\n");
} }
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
g_XInputSetState = (XInputSetState_t)dylib_proc(g_xinput_dll, "XInputSetState"); g_XInputSetState = (XInputSetState_t)dylib_proc(g_xinput_dll, "XInputSetState");
#else #else
g_XInputSetState = (XInputSetState_t)XInputSetState; g_XInputSetState = (XInputSetState_t)XInputSetState;
@ -255,7 +266,7 @@ static bool xinput_joypad_init(void *data)
if (!g_XInputSetState) if (!g_XInputSetState)
{ {
RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n"); RARCH_ERR("[XInput]: Failed to init: DLL is invalid or corrupt.\n");
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
dylib_close(g_xinput_dll); dylib_close(g_xinput_dll);
#endif #endif
return false; /* DLL was loaded but did not contain the correct function. */ return false; /* DLL was loaded but did not contain the correct function. */
@ -277,7 +288,11 @@ static bool xinput_joypad_init(void *data)
(!g_xinput_states[1].connected) && (!g_xinput_states[1].connected) &&
(!g_xinput_states[2].connected) && (!g_xinput_states[2].connected) &&
(!g_xinput_states[3].connected)) (!g_xinput_states[3].connected))
#ifdef __WINRT__
return true;
#else
return false; return false;
#endif
RARCH_LOG("[XInput]: Pads connected: %d\n", g_xinput_states[0].connected + RARCH_LOG("[XInput]: Pads connected: %d\n", g_xinput_states[0].connected +
g_xinput_states[1].connected + g_xinput_states[2].connected + g_xinput_states[3].connected); g_xinput_states[1].connected + g_xinput_states[2].connected + g_xinput_states[3].connected);
@ -347,7 +362,7 @@ static void xinput_joypad_destroy(void)
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state)); memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state));
#ifdef HAVE_DYNAMIC #if defined(HAVE_DYNAMIC) && !defined(__WINRT__)
dylib_close(g_xinput_dll); dylib_close(g_xinput_dll);
g_xinput_dll = NULL; g_xinput_dll = NULL;
@ -499,6 +514,7 @@ static void xinput_joypad_poll(void)
for (i = 0; i < 4; ++i) for (i = 0; i < 4; ++i)
{ {
#ifdef HAVE_DINPUT
if (g_xinput_states[i].connected) if (g_xinput_states[i].connected)
{ {
if (g_XInputGetStateEx && g_XInputGetStateEx(i, if (g_XInputGetStateEx && g_XInputGetStateEx(i,
@ -506,6 +522,28 @@ static void xinput_joypad_poll(void)
== ERROR_DEVICE_NOT_CONNECTED) == ERROR_DEVICE_NOT_CONNECTED)
g_xinput_states[i].connected = false; g_xinput_states[i].connected = false;
} }
#else
/* Normally, dinput handles device insertion/removal for us, but
* since dinput is not available on UWP we have to do it ourselves */
/* Also note that on UWP, the controllers are not available on startup
* and are instead 'plugged in' a moment later because Microsoft reasons */
// TODO: This may be bad for performance?
bool new_connected = g_XInputGetStateEx && g_XInputGetStateEx(i, &(g_xinput_states[i].xstate)) != ERROR_DEVICE_NOT_CONNECTED;
if (new_connected != g_xinput_states[i].connected)
{
if (new_connected)
{
/* This is kinda ugly, but it's the same thing that dinput does */
xinput_joypad_destroy();
xinput_joypad_init(NULL);
return;
}
else
{
g_xinput_states[i].connected = new_connected;
}
}
#endif
} }
#ifdef HAVE_DINPUT #ifdef HAVE_DINPUT

View File

@ -104,10 +104,13 @@ static const input_driver_t *input_drivers[] = {
#ifdef HAVE_X11 #ifdef HAVE_X11
&input_x, &input_x,
#endif #endif
#ifdef __WINRT__
&input_uwp,
#endif
#ifdef XENON #ifdef XENON
&input_xenon360, &input_xenon360,
#endif #endif
#if defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1) #if defined(HAVE_XINPUT2) || defined(HAVE_XINPUT_XBOX1) || defined(__WINRT__)
&input_xinput, &input_xinput,
#endif #endif
#ifdef GEKKO #ifdef GEKKO
@ -137,7 +140,7 @@ static const input_driver_t *input_drivers[] = {
#ifdef DJGPP #ifdef DJGPP
&input_dos, &input_dos,
#endif #endif
#if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501 #if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__)
/* winraw only available since XP */ /* winraw only available since XP */
&input_winraw, &input_winraw,
#endif #endif

View File

@ -834,6 +834,7 @@ extern input_driver_t input_xenon360;
extern input_driver_t input_gx; extern input_driver_t input_gx;
extern input_driver_t input_wiiu; extern input_driver_t input_wiiu;
extern input_driver_t input_xinput; extern input_driver_t input_xinput;
extern input_driver_t input_uwp;
extern input_driver_t input_linuxraw; extern input_driver_t input_linuxraw;
extern input_driver_t input_udev; extern input_driver_t input_udev;
extern input_driver_t input_cocoa; extern input_driver_t input_cocoa;

View File

@ -44,7 +44,7 @@
#include "SDL.h" #include "SDL.h"
#endif #endif
#ifdef __linux__ #if defined(__linux__) || defined(HAVE_WAYLAND)
#include <linux/input.h> #include <linux/input.h>
#include <linux/kd.h> #include <linux/kd.h>
#endif #endif
@ -848,7 +848,7 @@ const struct rarch_key_map rarch_key_map_x11[] = {
}; };
#endif #endif
#ifdef __linux__ #if defined(__linux__) || defined(HAVE_WAYLAND)
const struct rarch_key_map rarch_key_map_linux[] = { const struct rarch_key_map rarch_key_map_linux[] = {
{ KEY_BACKSPACE, RETROK_BACKSPACE }, { KEY_BACKSPACE, RETROK_BACKSPACE },
{ KEY_TAB, RETROK_TAB }, { KEY_TAB, RETROK_TAB },
@ -1423,7 +1423,7 @@ const struct rarch_key_map rarch_key_map_dos[] = {
}; };
#endif #endif
#if defined(_WIN32) && _WIN32_WINNT >= 0x0501 #if defined(_WIN32) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__)
const struct rarch_key_map rarch_key_map_winraw[] = { const struct rarch_key_map rarch_key_map_winraw[] = {
{ VK_BACK, RETROK_BACKSPACE }, { VK_BACK, RETROK_BACKSPACE },
{ VK_TAB, RETROK_TAB }, { VK_TAB, RETROK_TAB },
@ -1539,6 +1539,11 @@ const struct rarch_key_map rarch_key_map_winraw[] = {
}; };
#endif #endif
#ifdef __WINRT__
/* Refer to uwp_main.cpp - on WinRT these constants are defined as C++ enum classes
* so they can't be placed in a C source file */
#endif
enum retro_key rarch_keysym_lut[RETROK_LAST]; enum retro_key rarch_keysym_lut[RETROK_LAST];
/** /**

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Unknown compiler" "Unknown compiler"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Device disconnected from port" "Device disconnected from port"
@ -145,6 +146,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Adjusts menu screen appearance settings." "Adjusts menu screen appearance settings."
@ -888,8 +893,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT,
"Overlay next") "Overlay next")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pause toggle") "Pause toggle")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Restart RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Quit RetroArch") "Quit RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Reset game") "Reset game")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND,
@ -2662,8 +2672,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_INFORMATION,
"Show network interface(s) and associated IP addresses.") "Show network interface(s) and associated IP addresses.")
MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION,
"Show information specific to the device.") "Show information specific to the device.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Restart the program.")
#else
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Quit the program.") "Quit the program.")
#endif
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
"Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.") "Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
@ -3337,10 +3352,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help") "Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.") "Show/hide the 'Help' option.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Restart RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Restart RetroArch' option.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch") "Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.") "Show/hide the 'Quit RetroArch' option.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Show Reboot") "Show Reboot")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -35,8 +35,9 @@ MSG_HASH(
"未知的编译器" "未知的编译器"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"设备已从端口上断开" "设备已从端口上断开"
@ -133,6 +134,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"调整菜单屏幕相关的设置。" "调整菜单屏幕相关的设置。"

View File

@ -7,8 +7,9 @@ MSG_HASH(
"未知的編譯器" "未知的編譯器"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"設備已從連接口上移開" "設備已從連接口上移開"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"使用模擬器硬體渲染私人內容時可避免硬體在各frames時的狀態改變." "使用模擬器硬體渲染私人內容時可避免硬體在各frames時的狀態改變."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"調整選單顯示的相關設定。" "調整選單顯示的相關設定。"
@ -985,6 +990,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, /* TODO/FIXME - updat
"選單文件瀏覽器") "選單文件瀏覽器")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"選單線性過濾") "選單線性過濾")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"選單") "選單")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
@ -3145,10 +3152,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"顯示 Help") "顯示 Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"顯示/隱藏 the 'Help' option.") "顯示/隱藏 the 'Help' option.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"顯示 Restart RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"顯示/隱藏 the 'Restart RetroArch' option.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"顯示 Quit RetroArch") "顯示 Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"顯示/隱藏 the 'Quit RetroArch' option.") "顯示/隱藏 the 'Quit RetroArch' option.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"顯示 Reboot") "顯示 Reboot")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -35,8 +35,9 @@ MSG_HASH(
"Unbekannter Compiler" "Unbekannter Compiler"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Gerät von Anschluss getrennt" "Gerät von Anschluss getrennt"
@ -133,6 +134,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Gibt Hardware-gerenderten Cores einen eigenen privaten Kontext. Vermeidet, dass der Hardware-Status zwischen den Frames geschätzt werden muss." "Gibt Hardware-gerenderten Cores einen eigenen privaten Kontext. Vermeidet, dass der Hardware-Status zwischen den Frames geschätzt werden muss."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Legt die Einstellungen für das Aussehen des Menübildschirms fest." "Legt die Einstellungen für das Aussehen des Menübildschirms fest."

View File

@ -146,6 +146,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Προσαρμόζει τις εμφανισιακές ρυθμίσεις της οθόνης του μενού." "Προσαρμόζει τις εμφανισιακές ρυθμίσεις της οθόνης του μενού."

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Unknown compiler" "Unknown compiler"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Device disconnected from port" "Device disconnected from port"
@ -45,6 +46,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Adjusts settings related to the appearance of the menu screen." "Adjusts settings related to the appearance of the menu screen."
@ -745,8 +750,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT,
"Overlay next") "Overlay next")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pause toggle") "Pause toggle")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Restart RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Quit RetroArch") "Quit RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Reset game") "Reset game")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND,
@ -1055,8 +1065,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PRESENT,
"Present") "Present")
MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS,
"Privacy") "Privacy")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Restart RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Quit RetroArch") "Quit RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG,
"Analog supported") "Analog supported")
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING, MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING,
@ -2365,8 +2380,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_INFORMATION,
"Show network interface(s) and associated IP addresses.") "Show network interface(s) and associated IP addresses.")
MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION,
"Show information specific to the device.") "Show information specific to the device.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Restart the program.")
#else
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Quit the program.") "Quit the program.")
#endif
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
"Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.") "Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
@ -3020,10 +3040,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help") "Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.") "Show/hide the 'Help' option.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Restart RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Restart RetroArch' option.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch") "Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.") "Show/hide the 'Quit RetroArch' option.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Show Reboot") "Show Reboot")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -7,7 +7,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE, MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE,
"Acelera el procesador de video" "Acelera el procesador de video"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL, MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL,
"Brillo de pantalla" "Brillo de pantalla"
) )
@ -173,6 +173,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Dar a los núcleos renderizados por hardware un contexto privado. Evita tener que asumir cambios en el estado del hardware entre cuadros" "Dar a los núcleos renderizados por hardware un contexto privado. Evita tener que asumir cambios en el estado del hardware entre cuadros"
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Ajusta la apariencia del menú" "Ajusta la apariencia del menú"
@ -673,6 +677,18 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_CORE_LIST, MENU_ENUM_LABEL_VALUE_CORE_LIST,
"Cargar núcleo" "Cargar núcleo"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST,
"Instalar or Restaurar un núcleo"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR,
"Falló la instalación del núcleo"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS,
"Núcleo instalado exitosamente"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_CORE_OPTIONS, MENU_ENUM_LABEL_VALUE_CORE_OPTIONS,
"Opciones" "Opciones"
@ -759,7 +775,7 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS, MENU_ENUM_LABEL_VALUE_DISK_CYCLE_TRAY_STATUS,
"Estado de la bandeja de discos" "Abrir/Cerrar la bandeja de discos"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND,
@ -845,6 +861,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_FPS_SHOW, MENU_ENUM_LABEL_VALUE_FPS_SHOW,
"Mostrar FPS" "Mostrar FPS"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MEMORY_SHOW,
"Incluir detalles de memoria"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE,
"Limitar velocidad máxima de ejecución" "Limitar velocidad máxima de ejecución"
@ -1249,6 +1269,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE,
"Avanzar frame" "Avanzar frame"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE,
"Mostrar FPS"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,
"Pantalla completa" "Pantalla completa"
@ -1297,10 +1321,17 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pausar" "Pausar"
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Reiniciar RetroArch"
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Cerrar RetroArch" "Cerrar RetroArch"
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Resetear juego" "Resetear juego"
@ -2049,10 +2080,17 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS, MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS,
"MIDI" "MIDI"
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Reiniciar RetroArch"
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Cerrar RetroArch" "Cerrar RetroArch"
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG,
"Soporte de analógico" "Soporte de analógico"
@ -2920,10 +2958,58 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_TIMEDATE_STYLE, MENU_ENUM_SUBLABEL_TIMEDATE_STYLE,
"Cambia la forma en que se muestra la fecha y hora" "Cambia la forma en que se muestra la fecha y hora"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HMS,
"YYYY-MM-DD HH:MM:SS"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_YMD_HM,
"YYYY-MM-DD HH:MM"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MDYYYY,
"MM-DD-YYYY HH:MM"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HMS,
"HH:MM:SS"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_HM,
"HH:MM"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_DM_HM,
"DD/MM HH:MM"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_MD_HM,
"MM/DD HH:MM"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE_AM_PM,
"HH:MM:SS (AM/PM)"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_TITLE_COLOR, MENU_ENUM_LABEL_VALUE_TITLE_COLOR,
"Color de títulos del menú" "Color de títulos del menú"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BG_DARK_COLOR,
"Color oscuro del fondo del menú"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BG_LIGHT_COLOR,
"Color claro del fondo del menú"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BORDER_DARK_COLOR,
"Color oscuro del borde del menú"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_BORDER_LIGHT_COLOR,
"Color claro del borde del menú"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_TRUE, MENU_ENUM_LABEL_VALUE_TRUE,
"Activado" "Activado"
@ -3176,6 +3262,10 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, MENU_ENUM_LABEL_VALUE_VIDEO_SCALE,
"Escala en ventana" "Escala en ventana"
) )
MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS,
"Hilos de grabación (Threads)"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER,
"Escalar usando enteros" "Escalar usando enteros"
@ -3486,7 +3576,8 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
"Duplica puntos pero desactiva guardado rápido, trucos, rebobinar, y cámara lenta para todos los juegos" "Duplica puntos pero desactiva guardado rápido, trucos, rebobinar, y cámara lenta."
"Cambiar esto reiniciará el juego."
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE,
@ -3596,6 +3687,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_FPS_SHOW, MENU_ENUM_SUBLABEL_FPS_SHOW,
"Muestra la velocidad de cuadros por segundo" "Muestra la velocidad de cuadros por segundo"
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW,
"Muestra el contador de frames"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MEMORY_SHOW,
"Muestra la cantidad de memoria usada/total"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS,
"Opciones de teclas rápidas (hotkeys)" "Opciones de teclas rápidas (hotkeys)"
@ -4838,6 +4937,14 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_CORE_LIST, MENU_ENUM_SUBLABEL_CORE_LIST,
"Seleccionar que núcleo usar" "Seleccionar que núcleo usar"
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_DOWNLOAD_CORE,
"Instalar un núcleo desde el Actualizador en línea"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST,
"Instalr o restaurar un núcleo desde la carpeta de descargas"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST,
"Seleccionar que contenido iniciar" "Seleccionar que contenido iniciar"
@ -4850,10 +4957,17 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION,
"Mostrar información especifica del dispositivo" "Mostrar información especifica del dispositivo"
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Reiniciar el programa"
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH, MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Salir del programa" "Salir del programa"
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
"Establece el ancho de la ventana. Al dejarlo en 0 hará que intente ser lo mas grande posible" "Establece el ancho de la ventana. Al dejarlo en 0 hará que intente ser lo mas grande posible"
@ -4862,6 +4976,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
"Establece el alto de la ventana. Al dejarlo en 0 hará que intente ser lo mas grande posible" "Establece el alto de la ventana. Al dejarlo en 0 hará que intente ser lo mas grande posible"
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION,
"Tomará precedencia sobre Escala en Ventana"
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X, MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X,
"Establece el ancho en pantalla completa. Al dejarlo en 0 se usará la resolución del escritorio" "Establece el ancho en pantalla completa. Al dejarlo en 0 se usará la resolución del escritorio"
@ -6037,14 +6155,25 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Mostrar/ocultar la opción de 'Ayuda'" "Mostrar/ocultar la opción de 'Ayuda'"
) )
#ifdef HAVE_LAKKA
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Mostrar salir de RetroArch" "Mostrar Reiniciar RetroArch"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Mostrar/ocultar la opción de 'Salir de RetroArch'" "Mostrar/ocultar la opción de 'Reiniciar RetroArch'"
) )
#else
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Mostrar Cerrar RetroArch"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Muestrar/Ocultar la opción de 'Cerrar RetroArch'"
)
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Mostrar reiniciar" "Mostrar reiniciar"
@ -6103,27 +6232,27 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING, MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING,
"Show Start Recording" "Mostrar Comenzar grabación"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING,
"Show/hide the 'Start Recording' option." "Mostrar/ocultar la opción de 'Comenzar grabación'"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING, MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING,
"Show Start Streaming" "Mostrar Comenzar Streamingg"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING,
"Show/hide the 'Start Streaming' option." "Mostrar/ocultar la opción de 'Comenzar Streaming'"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show Reset Core Association" "Mostrar Restablecer asociación de núcleo"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION,
"Show/hide the 'Reset Core Association' option." "Mostrar/ocultar la opción de 'Restablecer asociación de núcleo'"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS,
@ -7576,7 +7705,8 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC,
"V-Sync está activado hasta que el rendimiento sea inferior al necesario para mantener el refresco de pantalla. Puede minimizar los tirones cuando hay caidas de fps y es més eficiente energeticamente." "V-Sync está activado hasta que el rendimiento sea inferior al necesario para mantener el refresco de pantalla.\n"
"Puede minimizar los tirones cuando hay caidas de fps y es més eficiente energeticamente."
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS, MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS,
@ -7774,5 +7904,11 @@ MSG_HASH(
MSG_MISSING_ASSETS, MSG_MISSING_ASSETS,
"ADVERTENCIA: Faltan recursos, use el Actualizador si está disponible" "ADVERTENCIA: Faltan recursos, use el Actualizador si está disponible"
) )
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, MSG_HASH(
"Remember Window Position and Size") MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
"Recordar posición y tamaño de la ventana"
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_HOLD_START,
"Mantener Start (2 segundos)"
)

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Compilateur inconnu" "Compilateur inconnu"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Périphérique déconnecté du port" "Périphérique déconnecté du port"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Donne aux cœurs bénéficiant de l'accélération graphique leur propre contexte. Évite d'avoir à supposer des changements d'état matériel entre deux images." "Donne aux cœurs bénéficiant de l'accélération graphique leur propre contexte. Évite d'avoir à supposer des changements d'état matériel entre deux images."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Ajuster les réglages et l'apparence du menu." "Ajuster les réglages et l'apparence du menu."
@ -828,8 +833,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT,
"Overlay suivant") "Overlay suivant")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pause") "Pause")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Redémarrer RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Quitter RetroArch") "Quitter RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Redémarrer le jeu") "Redémarrer le jeu")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND,
@ -984,6 +994,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"Réglages") "Réglages")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"Filtre linéaire pour le menu") "Filtre linéaire pour le menu")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"Appearance") "Appearance")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
@ -1162,8 +1174,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_PRESENT,
"Présent") "Présent")
MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_PRIVACY_SETTINGS,
"Confidentialité") "Confidentialité")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Redémarrer RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Quitter RetroArch") "Quitter RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG,
"Support de l'analogique") "Support de l'analogique")
MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING, MSG_HASH(MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING,
@ -3179,10 +3196,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Afficher l'aide") "Afficher l'aide")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Afficher/cacher l'option 'Afficher l'aide'.") "Afficher/cacher l'option 'Afficher l'aide'.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Afficher Redémarrer RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Afficher/cacher l'option 'Redémarrer RetroArch'.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Afficher Quitter RetroArch") "Afficher Quitter RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Afficher/cacher l'option 'Quitter RetroArch'.") "Afficher/cacher l'option 'Quitter RetroArch'.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Afficher Redémarrer") "Afficher Redémarrer")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Compilatore sconosciuto" "Compilatore sconosciuto"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Dispositivo disconnesso dalla porta" "Dispositivo disconnesso dalla porta"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Fornisce i core hardware nel proprio contesto privato. Evita di assumere cambiamenti di stato hardware tra i fotogrammi." "Fornisce i core hardware nel proprio contesto privato. Evita di assumere cambiamenti di stato hardware tra i fotogrammi."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Regola le impostazioni relative all'aspetto della schermata del menu." "Regola le impostazioni relative all'aspetto della schermata del menu."

View File

@ -12,8 +12,9 @@ MSG_HASH(
"不明なコンパイラ" "不明なコンパイラ"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"デバイスがポートから切断されました" "デバイスがポートから切断されました"
@ -150,6 +151,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"メニューの外観に関係する設定を変更します。" "メニューの外観に関係する設定を変更します。"
@ -3919,10 +3924,10 @@ MSG_HASH(
"カスタムリフレッシュレートを使用") "カスタムリフレッシュレートを使用")
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID, MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID,
"Select the output port connected to the CRT display.") "CRTディスプレイに接続されている出力ポートを選択します。")
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID, MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID,
"Output Display ID") "出力ディスプレイの識別番号")
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING, MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING,
"録画を開始" "録画を開始"
@ -4015,45 +4020,45 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME,
"メニューの色テーマ") "メニューの色テーマ")
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE, MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE,
"Basic White" "ベーシックホワイト"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK, MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK,
"Basic Black" "ベーシックブラック"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME, MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME,
"Select a different color theme." "色テーマを選択します。"
) )
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
"Use preferred system color theme") "Use preferred system color theme")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
"Use your operating system's color theme (if any) - overrides theme settings.") "Use your operating system's color theme (if any) - overrides theme settings.")
MSG_HASH(MSG_RESAMPLER_QUALITY_LOWEST, MSG_HASH(MSG_RESAMPLER_QUALITY_LOWEST,
"Lowest") "最低")
MSG_HASH(MSG_RESAMPLER_QUALITY_LOWER, MSG_HASH(MSG_RESAMPLER_QUALITY_LOWER,
"Lower") "")
MSG_HASH(MSG_RESAMPLER_QUALITY_NORMAL, MSG_HASH(MSG_RESAMPLER_QUALITY_NORMAL,
"Normal") "普通")
MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHER, MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHER,
"Higher") "")
MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHEST, MSG_HASH(MSG_RESAMPLER_QUALITY_HIGHEST,
"Highest") "最高")
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_MUSIC_AVAILABLE, MENU_ENUM_LABEL_VALUE_NO_MUSIC_AVAILABLE,
"No music available." "音楽ファイルがありません。"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_VIDEOS_AVAILABLE, MENU_ENUM_LABEL_VALUE_NO_VIDEOS_AVAILABLE,
"No videos available." "動画ファイルがありません。"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_IMAGES_AVAILABLE, MENU_ENUM_LABEL_VALUE_NO_IMAGES_AVAILABLE,
"No images available." "画像ファイルがありません。"
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE,
"No favorites available." "お気に入りがありません。"
) )
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION,
"Remember Window Position and Size") "ウィンドウの位置とサイズを記憶")

View File

@ -7,8 +7,9 @@ MSG_HASH(
"알 수 없는 컴파일러" "알 수 없는 컴파일러"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"장치가 포트에서 연결 해제 되었습니다" "장치가 포트에서 연결 해제 되었습니다"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"하드웨어 렌더링된 코어에 고유의 컨텍스트를 부여. 프레임간 하드웨어 상태가 변경된 것으로 가정하지 않도록 함." "하드웨어 렌더링된 코어에 고유의 컨텍스트를 부여. 프레임간 하드웨어 상태가 변경된 것으로 가정하지 않도록 함."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"화면 표시 설정을 조정합니다." "화면 표시 설정을 조정합니다."
@ -970,6 +975,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"설정") "설정")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"메뉴 선형 필터") "메뉴 선형 필터")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"메뉴") "메뉴")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
@ -3140,10 +3147,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help") "Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.") "Show/hide the 'Help' option.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Restart RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Restart RetroArch' option.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch") "Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.") "Show/hide the 'Quit RetroArch' option.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Show Reboot") "Show Reboot")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Onbekende compiler" "Onbekende compiler"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Apparaat ontkoppeld van port" "Apparaat ontkoppeld van port"
@ -45,6 +46,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Adjusts settings related to the appearance of the menu screen." "Adjusts settings related to the appearance of the menu screen."
@ -905,6 +910,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"Instellingen") "Instellingen")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"Menu Linear Filter") "Menu Linear Filter")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"Uiterlijk") "Uiterlijk")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Nieznany kompilator" "Nieznany kompilator"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Urządzenie zostało odłączone od portu" "Urządzenie zostało odłączone od portu"
@ -145,6 +146,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Nadaj rdzeniom sprzętowym własny prywatny kontekst. Unikaj konieczności przejmowania zmian stanu sprzętu pomiędzy klatkami." "Nadaj rdzeniom sprzętowym własny prywatny kontekst. Unikaj konieczności przejmowania zmian stanu sprzętu pomiędzy klatkami."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Dostosuj ustawienia wyglądu ekranu menu." "Dostosuj ustawienia wyglądu ekranu menu."

View File

@ -173,6 +173,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Dar aos núcleos renderizados por hardware seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre quadros." "Dar aos núcleos renderizados por hardware seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre quadros."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Ajusta as configurações de aparência da tela de menu." "Ajusta as configurações de aparência da tela de menu."

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Compilador desconhecido" "Compilador desconhecido"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Dispositivo desconectado da porta" "Dispositivo desconectado da porta"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Dê aos núcleos renderizados por hardware o seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre frames." "Dê aos núcleos renderizados por hardware o seu próprio contexto privado. Evita ter que assumir mudanças de estado de hardware entre frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"ajusta as definições de aparência no ecrã do menu." "ajusta as definições de aparência no ecrã do menu."
@ -970,6 +975,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"Definições") "Definições")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"Filtro linear do menu") "Filtro linear do menu")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"Aparência") "Aparência")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,

View File

@ -12,8 +12,9 @@ MSG_HASH(
"Неизвестный компилятор" "Неизвестный компилятор"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Устройство отключено от порта" "Устройство отключено от порта"
@ -110,6 +111,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Предоставьте аппаратно-рендерированным ядрам собственный контекст. Избегайте принятия изменений состояния оборудования между кадрами." "Предоставьте аппаратно-рендерированным ядрам собственный контекст. Избегайте принятия изменений состояния оборудования между кадрами."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Настройка параметров, относящихся к внешнему виду экрана меню." "Настройка параметров, относящихся к внешнему виду экрана меню."
@ -993,6 +998,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"Настройки") "Настройки")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"Линейный фильтр меню") "Линейный фильтр меню")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"Меню") "Меню")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,

View File

@ -59,7 +59,11 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MSG_PUBLIC_ADDRESS, MSG_PUBLIC_ADDRESS,
"Public address" "Port Mapping Successful"
)
MSG_HASH(
MSG_UPNP_FAILED,
"Port Mapping Failed"
) )
MSG_HASH( MSG_HASH(
MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN,
@ -173,6 +177,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Adjusts menu screen appearance settings." "Adjusts menu screen appearance settings."
@ -1317,10 +1325,17 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pause toggle" "Pause toggle"
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Restart RetroArch"
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Quit RetroArch" "Quit RetroArch"
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Reset game" "Reset game"
@ -2069,10 +2084,17 @@ MSG_HASH(
MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS, MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS,
"MIDI" "MIDI"
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Restart RetroArch"
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH,
"Quit RetroArch" "Quit RetroArch"
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG,
"Analog supported" "Analog supported"
@ -3558,7 +3580,8 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
"Enable or disable savestates, cheats, rewind, pause, and slow-motion for all games." "Enables hardcore mode, this will enable or disable savestates, cheats, rewind, pause, and slow-motion.\n"
"Toggling this setting at runtime will restart your game."
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE,
@ -4918,6 +4941,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_CORE_LIST, MENU_ENUM_SUBLABEL_CORE_LIST,
"Select which core to use." "Select which core to use."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_START_CORE,
"Start core without content."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, MENU_ENUM_SUBLABEL_DOWNLOAD_CORE,
"Install a core from the online updater." "Install a core from the online updater."
@ -4938,10 +4965,17 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION,
"Show information specific to the device." "Show information specific to the device."
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Restart the program."
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_QUIT_RETROARCH, MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Quit the program." "Quit the program."
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
"Set the custom width for the display window." "Set the custom width for the display window."
@ -5646,7 +5680,7 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_XMB_THEME, MENU_ENUM_SUBLABEL_XMB_THEME,
"Select a different theme for the icon. Changes will take effect after you restart the program." "Select a different icon theme for RetroArch."
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE,
@ -6129,6 +6163,16 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option." "Show/hide the 'Help' option."
) )
#ifdef HAVE_LAKKA
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Restart RetroArch"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Restart RetroArch' option."
)
#else
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch" "Show Quit RetroArch"
@ -6137,6 +6181,7 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option." "Show/hide the 'Quit RetroArch' option."
) )
#endif
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Show Reboot" "Show Reboot"
@ -7676,7 +7721,8 @@ MSG_HASH(
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC,
"V-Sync is enabled until performance falls below the target refresh rate. Can minimize stuttering when performance falls below realtime, and can be more energy efficient." "V-Sync is enabled until performance falls below the target refresh rate.\n"
"This can minimize stuttering when performance falls below realtime, and can be more energy efficient."
) )
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS, MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS,
@ -7881,4 +7927,4 @@ MSG_HASH(
MSG_HASH( MSG_HASH(
MENU_ENUM_LABEL_VALUE_HOLD_START, MENU_ENUM_LABEL_VALUE_HOLD_START,
"Hold Start (2 seconds)" "Hold Start (2 seconds)"
) )

View File

@ -7,8 +7,9 @@ MSG_HASH(
"Unknown compiler" "Unknown compiler"
) )
MSG_HASH( MSG_HASH(
MSG_NATIVE, MSG_NATIVE,
"Native") "Native"
)
MSG_HASH( MSG_HASH(
MSG_DEVICE_DISCONNECTED_FROM_PORT, MSG_DEVICE_DISCONNECTED_FROM_PORT,
"Device disconnected from port" "Device disconnected from port"
@ -105,6 +106,10 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT,
"Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames." "Give hardware-rendered cores their own private context. Avoids having to assume hardware state changes inbetween frames."
) )
MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION,
"Enable horizontal animation for the menu. This will have a performance hit."
)
MSG_HASH( MSG_HASH(
MENU_ENUM_SUBLABEL_MENU_SETTINGS, MENU_ENUM_SUBLABEL_MENU_SETTINGS,
"Điều chỉnh thiết lập related to the appearance of the menu screen." "Điều chỉnh thiết lập related to the appearance of the menu screen."
@ -828,8 +833,13 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT,
"Overlay next") "Overlay next")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE,
"Pause toggle") "Pause toggle")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Restart RetroArch")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY,
"Quit RetroArch") "Quit RetroArch")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_RESET,
"Reset game") "Reset game")
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND,
@ -986,6 +996,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS,
"Settings") "Settings")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER,
"Menu Linear Filter") "Menu Linear Filter")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION,
"Horizontal Animation")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SETTINGS,
"Appearance") "Appearance")
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER,
@ -2530,8 +2542,13 @@ MSG_HASH(MENU_ENUM_SUBLABEL_NETWORK_INFORMATION,
"Show network interface(s) and associated IP addresses.") "Show network interface(s) and associated IP addresses.")
MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, MSG_HASH(MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION,
"Show information specific to the device.") "Show information specific to the device.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Restart the program.")
#else
MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_QUIT_RETROARCH,
"Quit the program.") "Quit the program.")
#endif
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH,
"Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.") "Set the custom width size for the display window. Leaving it at 0 will attempt to scale the window as large as possible.")
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT,
@ -3177,10 +3194,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP,
"Show Help") "Show Help")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_HELP,
"Show/hide the 'Help' option.") "Show/hide the 'Help' option.")
#ifdef HAVE_LAKKA
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Restart RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Restart RetroArch' option.")
#else
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH,
"Show Quit RetroArch") "Show Quit RetroArch")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH,
"Show/hide the 'Quit RetroArch' option.") "Show/hide the 'Quit RetroArch' option.")
#endif
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT,
"Show Reboot") "Show Reboot")
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT,

View File

@ -55,6 +55,8 @@
#ifdef HAVE_DR_MP3 #ifdef HAVE_DR_MP3
#define DR_MP3_IMPLEMENTATION #define DR_MP3_IMPLEMENTATION
#include <retro_assert.h>
#define DRMP3_ASSERT(expression) retro_assert(expression)
#include <dr/dr_mp3.h> #include <dr/dr_mp3.h>
#endif #endif

View File

@ -74,17 +74,42 @@ static void set_dl_error(void)
dylib_t dylib_load(const char *path) dylib_t dylib_load(const char *path)
{ {
#ifdef _WIN32 #ifdef _WIN32
#ifndef __WINRT__
int prevmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX); int prevmode = SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOOPENFILEERRORBOX);
#ifdef LEGACY_WIN32 #endif
#ifdef __WINRT__
/* On UWP, you can only load DLLs inside your install directory, using a special function that takes a relative path */
if (!path_is_absolute(path))
RARCH_WARN("Relative path in dylib_load! This is likely an attempt to load a system library that will fail\n");
char *relative_path_abbrev = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
fill_pathname_abbreviate_special(relative_path_abbrev, path, PATH_MAX_LENGTH * sizeof(char));
char *relative_path = relative_path_abbrev;
if (relative_path[0] != ':' || !path_char_is_slash(relative_path[1]))
RARCH_WARN("Path to dylib_load is not inside app install directory! Loading will probably fail\n");
else
relative_path += 2;
RARCH_LOG("Loading library using a relative path: '%s'\n", relative_path);
wchar_t *pathW = utf8_to_utf16_string_alloc(relative_path);
dylib_t lib = LoadPackagedLibrary(pathW, 0);
free(pathW);
free(relative_path_abbrev);
#elif defined(LEGACY_WIN32)
dylib_t lib = LoadLibrary(path); dylib_t lib = LoadLibrary(path);
#else #else
wchar_t *pathW = utf8_to_utf16_string_alloc(path); wchar_t *pathW = utf8_to_utf16_string_alloc(path);
dylib_t lib = LoadLibraryW(pathW); dylib_t lib = LoadLibraryW(pathW);
free(pathW); free(pathW);
#endif #endif
#ifndef __WINRT__
SetErrorMode(prevmode); SetErrorMode(prevmode);
#endif
if (!lib) if (!lib)
{ {
@ -114,8 +139,20 @@ function_t dylib_proc(dylib_t lib, const char *proc)
function_t sym; function_t sym;
#ifdef _WIN32 #ifdef _WIN32
sym = (function_t)GetProcAddress(lib ? HMODULE mod = (HMODULE)lib;
(HMODULE)lib : GetModuleHandle(NULL), proc); #ifndef __WINRT__
if (!mod)
mod = GetModuleHandle(NULL);
#else
/* GetModuleHandle is not available on UWP */
if (!mod)
{
RARCH_WARN("FIXME: It's not possible to look up symbols in current executable on UWP!\n");
DebugBreak();
return NULL;
}
#endif
sym = (function_t)GetProcAddress(mod, proc);
if (!sym) if (!sym)
{ {
set_dl_error(); set_dl_error();

View File

@ -174,9 +174,9 @@ retro_perf_tick_t cpu_features_get_perf_counter(void)
time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 + time_ticks = (retro_perf_tick_t)tv.tv_sec * 1000000000 +
(retro_perf_tick_t)tv.tv_nsec; (retro_perf_tick_t)tv.tv_nsec;
#elif defined(__GNUC__) && defined(__i386__) || defined(__i486__) || defined(__i686__) #elif defined(__GNUC__) && defined(__i386__) || defined(__i486__) || defined(__i686__) || defined(_M_X64) || defined(_M_AMD64)
__asm__ volatile ("rdtsc" : "=A" (time_ticks)); __asm__ volatile ("rdtsc" : "=A" (time_ticks));
#elif defined(__GNUC__) && defined(__x86_64__) #elif defined(__GNUC__) && defined(__x86_64__) || defined(_M_IX86)
unsigned a, d; unsigned a, d;
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d)); __asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
time_ticks = (retro_perf_tick_t)a | ((retro_perf_tick_t)d << 32); time_ticks = (retro_perf_tick_t)a | ((retro_perf_tick_t)d << 32);
@ -482,10 +482,14 @@ static void cpulist_read_from(CpuList* list, const char* filename)
**/ **/
unsigned cpu_features_get_core_amount(void) unsigned cpu_features_get_core_amount(void)
{ {
#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) #if defined(_WIN32) && !defined(_XBOX)
/* Win32 */ /* Win32 */
SYSTEM_INFO sysinfo; SYSTEM_INFO sysinfo;
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
GetNativeSystemInfo(&sysinfo);
#else
GetSystemInfo(&sysinfo); GetSystemInfo(&sysinfo);
#endif
return sysinfo.dwNumberOfProcessors; return sysinfo.dwNumberOfProcessors;
#elif defined(GEKKO) #elif defined(GEKKO)
return 1; return 1;

View File

@ -986,8 +986,10 @@ bool config_file_write(config_file_t *conf, const char *path)
return false; return false;
/* TODO: this is only useful for a few platforms, find which and add ifdef */ /* TODO: this is only useful for a few platforms, find which and add ifdef */
#if !defined(PS2)
buf = calloc(1, 0x4000); buf = calloc(1, 0x4000);
setvbuf(file, (char*)buf, _IOFBF, 0x4000); setvbuf(file, (char*)buf, _IOFBF, 0x4000);
#endif
config_file_dump(conf, file); config_file_dump(conf, file);

View File

@ -96,6 +96,12 @@
#include <unistd.h> /* stat() is defined here */ #include <unistd.h> /* stat() is defined here */
#endif #endif
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
#ifdef __WINRT__
#include <uwp/uwp_func.h>
#endif
#endif
/* Assume W-functions do not work below Win2K and Xbox platforms */ /* Assume W-functions do not work below Win2K and Xbox platforms */
#if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX) #if defined(_WIN32_WINNT) && _WIN32_WINNT < 0x0500 || defined(_XBOX)
@ -1005,45 +1011,67 @@ void fill_pathname_expand_special(char *out_path,
const char *in_path, size_t size) const char *in_path, size_t size)
{ {
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL) #if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
if (*in_path == '~') if (in_path[0] == '~')
{ {
const char *home = getenv("HOME"); char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
if (home)
home_dir[0] = '\0';
fill_pathname_home_dir(home_dir,
PATH_MAX_LENGTH * sizeof(char));
if (*home_dir)
{ {
size_t src_size = strlcpy(out_path, home, size); size_t src_size = strlcpy(out_path, home_dir, size);
retro_assert(src_size < size); retro_assert(src_size < size);
out_path += src_size; out_path += src_size;
size -= src_size; size -= src_size;
in_path++;
if (!path_char_is_slash(out_path[-1]))
{
src_size = strlcpy(out_path, path_default_slash(), size);
retro_assert(src_size < size);
out_path += src_size;
size -= src_size;
}
in_path += 2;
} }
free(home_dir);
} }
else if ((in_path[0] == ':') && else if (in_path[0] == ':')
(
(in_path[1] == '/')
#ifdef _WIN32
|| (in_path[1] == '\\')
#endif
)
)
{ {
size_t src_size;
char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
application_dir[0] = '\0'; application_dir[0] = '\0';
fill_pathname_application_path(application_dir, fill_pathname_application_dir(application_dir,
PATH_MAX_LENGTH * sizeof(char)); PATH_MAX_LENGTH * sizeof(char));
path_basedir_wrapper(application_dir);
src_size = strlcpy(out_path, application_dir, size); if (*application_dir)
retro_assert(src_size < size); {
size_t src_size = strlcpy(out_path, application_dir, size);
retro_assert(src_size < size);
out_path += src_size;
size -= src_size;
if (!path_char_is_slash(out_path[-1]))
{
src_size = strlcpy(out_path, path_default_slash(), size);
retro_assert(src_size < size);
out_path += src_size;
size -= src_size;
}
in_path += 2;
}
free(application_dir); free(application_dir);
out_path += src_size;
size -= src_size;
in_path += 2;
} }
#endif #endif
@ -1058,7 +1086,7 @@ void fill_pathname_abbreviate_special(char *out_path,
const char *candidates[3]; const char *candidates[3];
const char *notations[3]; const char *notations[3];
char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); char *application_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
const char *home = getenv("HOME"); char *home_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
application_dir[0] = '\0'; application_dir[0] = '\0';
@ -1070,16 +1098,17 @@ void fill_pathname_abbreviate_special(char *out_path,
/* ugly hack - use application_dir pointer /* ugly hack - use application_dir pointer
* before filling it in. C89 reasons */ * before filling it in. C89 reasons */
candidates[0] = application_dir; candidates[0] = application_dir;
candidates[1] = home; candidates[1] = home_dir;
candidates[2] = NULL; candidates[2] = NULL;
notations [0] = ":"; notations [0] = ":";
notations [1] = "~"; notations [1] = "~";
notations [2] = NULL; notations [2] = NULL;
fill_pathname_application_path(application_dir, fill_pathname_application_dir(application_dir,
PATH_MAX_LENGTH * sizeof(char));
fill_pathname_home_dir(home_dir,
PATH_MAX_LENGTH * sizeof(char)); PATH_MAX_LENGTH * sizeof(char));
path_basedir_wrapper(application_dir);
for (i = 0; candidates[i]; i++) for (i = 0; candidates[i]; i++)
{ {
@ -1107,6 +1136,7 @@ void fill_pathname_abbreviate_special(char *out_path,
} }
free(application_dir); free(application_dir);
free(home_dir);
#endif #endif
retro_assert(strlcpy(out_path, in_path, size) < size); retro_assert(strlcpy(out_path, in_path, size) < size);
@ -1148,7 +1178,7 @@ void fill_pathname_application_path(char *s, size_t len)
CFBundleRef bundle = CFBundleGetMainBundle(); CFBundleRef bundle = CFBundleGetMainBundle();
#endif #endif
#ifdef _WIN32 #ifdef _WIN32
DWORD ret; DWORD ret = 0;
wchar_t wstr[PATH_MAX_LENGTH] = {0}; wchar_t wstr[PATH_MAX_LENGTH] = {0};
#endif #endif
#ifdef __HAIKU__ #ifdef __HAIKU__
@ -1160,11 +1190,11 @@ void fill_pathname_application_path(char *s, size_t len)
if (!len) if (!len)
return; return;
#ifdef _WIN32 #if defined(_WIN32)
#ifdef LEGACY_WIN32 #ifdef LEGACY_WIN32
ret = GetModuleFileNameA(GetModuleHandle(NULL), s, len); ret = GetModuleFileNameA(NULL, s, len);
#else #else
ret = GetModuleFileNameW(GetModuleHandle(NULL), wstr, ARRAY_SIZE(wstr)); ret = GetModuleFileNameW(NULL, wstr, ARRAY_SIZE(wstr));
if (*wstr) if (*wstr)
{ {
@ -1233,4 +1263,27 @@ void fill_pathname_application_path(char *s, size_t len)
} }
#endif #endif
} }
void fill_pathname_application_dir(char *s, size_t len)
{
#ifdef __WINRT__
strlcpy(s, uwp_dir_install, len);
#else
fill_pathname_application_path(s, len);
path_basedir_wrapper(s);
#endif
}
void fill_pathname_home_dir(char *s, size_t len)
{
#ifdef __WINRT__
strlcpy(s, uwp_dir_data, len);
#else
const char *home = getenv("HOME");
if (home)
strlcpy(s, home, len);
else
*s = 0;
#endif
}
#endif #endif

View File

@ -38,7 +38,7 @@ extern nbio_intf_t nbio_stdio;
static nbio_intf_t *internal_nbio = &nbio_linux; static nbio_intf_t *internal_nbio = &nbio_linux;
#elif defined(HAVE_MMAP) && defined(BSD) #elif defined(HAVE_MMAP) && defined(BSD)
static nbio_intf_t *internal_nbio = &nbio_mmap_unix; static nbio_intf_t *internal_nbio = &nbio_mmap_unix;
#elif defined(_WIN32) && !defined(_XBOX) #elif defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__)
static nbio_intf_t *internal_nbio = &nbio_mmap_win32; static nbio_intf_t *internal_nbio = &nbio_mmap_win32;
#else #else
static nbio_intf_t *internal_nbio = &nbio_stdio; static nbio_intf_t *internal_nbio = &nbio_stdio;

View File

@ -419,7 +419,7 @@ static INLINE int rjpeg__jpeg_huff_decode(rjpeg__jpeg *j, rjpeg__huffman *h)
/* convert the huffman code to the symbol id */ /* convert the huffman code to the symbol id */
c = ((j->code_buffer >> (32 - k)) & rjpeg__bmask[k]) + h->delta[k]; c = ((j->code_buffer >> (32 - k)) & rjpeg__bmask[k]) + h->delta[k];
assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]); retro_assert((((j->code_buffer) >> (32 - h->size[c])) & rjpeg__bmask[h->size[c]]) == h->code[c]);
/* convert the id to a symbol */ /* convert the id to a symbol */
j->code_bits -= k; j->code_bits -= k;
@ -441,7 +441,7 @@ static INLINE int rjpeg__extend_receive(rjpeg__jpeg *j, int n)
sgn = (int32_t)j->code_buffer >> 31; /* sign bit is always in MSB */ sgn = (int32_t)j->code_buffer >> 31; /* sign bit is always in MSB */
k = rjpeg_lrot(j->code_buffer, n); k = rjpeg_lrot(j->code_buffer, n);
assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask))); retro_assert(n >= 0 && n < (int) (sizeof(rjpeg__bmask)/sizeof(*rjpeg__bmask)));
j->code_buffer = k & ~rjpeg__bmask[n]; j->code_buffer = k & ~rjpeg__bmask[n];
k &= rjpeg__bmask[n]; k &= rjpeg__bmask[n];
j->code_bits -= n; j->code_bits -= n;

View File

@ -462,6 +462,8 @@ void fill_pathname_slash(char *path, size_t size);
#if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL) #if !defined(RARCH_CONSOLE) && defined(RARCH_INTERNAL)
void fill_pathname_application_path(char *buf, size_t size); void fill_pathname_application_path(char *buf, size_t size);
void fill_pathname_application_dir(char *buf, size_t size);
void fill_pathname_home_dir(char *buf, size_t size);
#endif #endif
/** /**

View File

@ -29,6 +29,23 @@
RETRO_BEGIN_DECLS RETRO_BEGIN_DECLS
/**
* dir_list_append:
* @list : existing list to append to.
* @dir : directory path.
* @ext : allowed extensions of file directory entries to include.
* @include_dirs : include directories as part of the finished directory listing?
* @include_hidden : include hidden files and directories as part of the finished directory listing?
* @include_compressed : Only include files which match ext. Do not try to match compressed files, etc.
* @recursive : list directory contents recursively
*
* Create a directory listing, appending to an existing list
*
* Returns: true success, false in case of error.
**/
bool dir_list_append(struct string_list *list, const char *dir, const char *ext,
bool include_dirs, bool include_hidden, bool include_compressed, bool recursive);
/** /**
* dir_list_new: * dir_list_new:
* @dir : directory path. * @dir : directory path.

View File

@ -26,6 +26,7 @@
#include <assert.h> #include <assert.h>
#ifdef RARCH_INTERNAL #ifdef RARCH_INTERNAL
#include <stdio.h>
#define retro_assert(cond) do { \ #define retro_assert(cond) do { \
if (!(cond)) { printf("Assertion failed at %s:%d.\n", __FILE__, __LINE__); abort(); } \ if (!(cond)) { printf("Assertion failed at %s:%d.\n", __FILE__, __LINE__); abort(); } \
} while(0) } while(0)

View File

@ -101,6 +101,14 @@ printf("This is C++, version %d.\n", __cplusplus);
#define __WINRT__ 1 #define __WINRT__ 1
#endif #endif
/* MSVC obviously has to have some non-standard constants... */
#if _M_IX86_FP == 1
#define __SSE__ 1
#elif _M_IX86_FP == 2 || (defined(_M_AMD64) || defined(_M_X64))
#define __SSE__ 1
#define __SSE2__ 1
#endif
#endif #endif
#endif #endif

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