diff --git a/.github/workflows/crowdin.yml b/.github/workflows/crowdin.yml new file mode 100644 index 0000000000..cd8cc2c70b --- /dev/null +++ b/.github/workflows/crowdin.yml @@ -0,0 +1,28 @@ +# Upload sources to Crowdin for translation + +name: Crowdin Workflow + +on: + push: + branches: + - master + paths: + - 'intl/*_us.h' + - 'intl/*_us.json' + +jobs: + sync: + runs-on: ubuntu-latest + steps: + - name: Setup Java JDK + uses: actions/setup-java@v1.3.0 + with: + java-version: 1.8 + - name: Setup Python + uses: actions/setup-python@v2 + - name: Checkout + uses: actions/checkout@v2 + - name: Crowdin Sync + run: | + cd intl + python3 crowdin_sync.py diff --git a/.gitignore b/.gitignore index 1a132fbd29..ebb953d4a9 100644 --- a/.gitignore +++ b/.gitignore @@ -76,7 +76,9 @@ convert_rumble.awk *~ assets info +content_history.lpl content_image_history.lpl +content_music_history.lpl saves screenshots diff --git a/.vscode/settings.json b/.vscode/settings.json index 2dc110ece3..edc28e0361 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -63,7 +63,6 @@ "xtree": "c", "xutility": "c", "menu_input_dialog.h": "c", - "menu_filebrowser.h": "c", "ozone_sidebar.h": "c", "menu_thumbnail_path.h": "c", "badges.h": "c" diff --git a/CHANGES.md b/CHANGES.md index 153d3486b0..edde89bcd3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,4 +1,24 @@ # Future +- BLUETOOTH: Add a Bluetooth driver (Lakka-only for now) +- CHEEVOS: Option to play sound on achievement unlock. +- CHEEVOS: Upgrade to rcheevos 9.1 +- CHEEVOS: Restore display of unlocked achievements across hardcore modes +- CHEEVOS: Hash buffered data when available +- CHEEVOS: Fix 'Auto Save State freezes RetroArch while Cheevos is enabled' +- CONFIG FILE: Optimise parsing of configuration files +- D3D9/D3D11: Fix core-initiated D3D9/D3D11 driver switches +- DRIVERS: Implemented protection to avoid setting critical drivers to nothing thus preventing the user from locking him/herself out of the program +- EMSCRIPTEN: Fix input code to ignore unknown keys +- FILE I/O: VFS and NBIO interfaces will now use 64-bit fseek/ftell where possible, should allow for reading/writing to files bigger than 2GB +- IOS: Fixed iOS 6 version +- LOCALIZATION: Updates for several languages (synchronized from Crowdin) +- MENU: Enlarged INT/UINT selection limit from 999 to 9999 +- MENU: Fix cursor forced to first entry after displaying lists +- MENU/WIDGETS: Add optional widget-based 'load content' launch feedback animation +- ODROID GO ADVANCE: Video driver - fix race condition with RGUI callback +- SHADERS/SLANG: Increased Slang max Parameters, Textures & Passes +- WINDOWS/RAWINPUT: Fix invalid calls to dinput_handle_message when input driver is not set to dinput +- X11: Add lightgun support # 1.8.9 - AUTO SAVESTATES: Ensure save states are correctly flushed to disk when quitting RetroArch (fixes broken save states when exiting RetroArch - without first closing content - with 'Auto Save State' enabled) diff --git a/Makefile b/Makefile index 00e0258c00..669bd55283 100644 --- a/Makefile +++ b/Makefile @@ -217,7 +217,7 @@ $(OBJDIR)/%.o: %.m .FORCE: -$(OBJDIR)/git_version.o: git_version.c .FORCE +$(OBJDIR)/version_git.o: version_git.c .FORCE @mkdir -p $(dir $@) @$(if $(Q), $(shell echo echo CC $<),) $(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $< @@ -233,7 +233,7 @@ $(OBJDIR)/%.o: %.rc $(HEADERS) $(Q)$(WINDRES) -o $@ $< install: $(TARGET) - rm -f $(OBJDIR)/git_version.o + rm -f $(OBJDIR)/version_git.o mkdir -p $(DESTDIR)$(BIN_DIR) 2>/dev/null || /bin/true mkdir -p $(DESTDIR)$(GLOBAL_CONFIG_DIR) 2>/dev/null || /bin/true mkdir -p $(DESTDIR)$(DATA_DIR)/applications 2>/dev/null || /bin/true diff --git a/Makefile.common b/Makefile.common index 5e102ce1dc..033ec64f98 100644 --- a/Makefile.common +++ b/Makefile.common @@ -175,8 +175,14 @@ OBJ += frontend/frontend_driver.o \ msg_hash.o \ intl/msg_hash_us.o \ $(LIBRETRO_COMM_DIR)/queues/task_queue.o \ - tasks/task_content.o \ - tasks/task_patch.o \ + tasks/task_content.o + +ifeq ($(HAVE_PATCH), 1) + DEFINES += -DHAVE_PATCH + OBJ += tasks/task_patch.o +endif + +OBJ += \ tasks/task_save.o \ tasks/task_file_transfer.o \ tasks/task_image.o \ @@ -184,8 +190,13 @@ OBJ += frontend/frontend_driver.o \ tasks/task_manual_content_scan.o \ tasks/task_core_backup.o \ $(LIBRETRO_COMM_DIR)/encodings/encoding_utf.o \ - $(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o \ - $(LIBRETRO_COMM_DIR)/encodings/encoding_base64.o \ + $(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.o + +ifeq ($(HAVE_TRANSLATE), 1) + OBJ += $(LIBRETRO_COMM_DIR)/encodings/encoding_base64.o +endif + +OBJ += \ $(LIBRETRO_COMM_DIR)/compat/fopen_utf8.o \ $(LIBRETRO_COMM_DIR)/lists/file_list.o \ $(LIBRETRO_COMM_DIR)/lists/dir_list.o \ @@ -195,8 +206,9 @@ OBJ += frontend/frontend_driver.o \ $(LIBRETRO_COMM_DIR)/streams/file_stream_transforms.o \ $(LIBRETRO_COMM_DIR)/streams/interface_stream.o \ $(LIBRETRO_COMM_DIR)/streams/memory_stream.o \ - $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.o \ - $(LIBRETRO_COMM_DIR)/media/media_detect_cd.o \ + $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation.o + +OBJ += \ $(LIBRETRO_COMM_DIR)/lists/string_list.o \ $(LIBRETRO_COMM_DIR)/string/stdstring.o \ $(LIBRETRO_COMM_DIR)/memmap/memalign.o \ @@ -236,34 +248,68 @@ OBJ += \ configuration.o \ $(LIBRETRO_COMM_DIR)/dynamic/dylib.o \ cores/dynamic_dummy.o \ - $(LIBRETRO_COMM_DIR)/queues/message_queue.o \ - managers/state_manager.o \ + $(LIBRETRO_COMM_DIR)/queues/message_queue.o + +ifeq ($(HAVE_REWIND), 1) +DEFINES += -DHAVE_REWIND +OBJ += managers/state_manager.o +endif + +OBJ += \ gfx/drivers_font_renderer/bitmapfont.o \ tasks/task_autodetect.o \ input/input_autodetect_builtin.o \ input/input_keymaps.o \ $(LIBRETRO_COMM_DIR)/queues/fifo_queue.o \ $(LIBRETRO_COMM_DIR)/compat/compat_fnmatch.o \ - $(LIBRETRO_COMM_DIR)/compat/compat_posix_string.o \ - managers/cheat_manager.o \ + $(LIBRETRO_COMM_DIR)/compat/compat_posix_string.o + +ifeq ($(HAVE_CHEATS), 1) + DEFINES += -DHAVE_CHEATS + OBJ += managers/cheat_manager.o +endif + +OBJ += \ core_info.o \ core_backup.o \ $(LIBRETRO_COMM_DIR)/file/config_file.o \ $(LIBRETRO_COMM_DIR)/file/config_file_userdata.o \ runtime_file.o \ - disk_index_file.o \ - tasks/task_screenshot.o \ + disk_index_file.o + +ifeq ($(HAVE_SCREENSHOTS), 1) + DEFINES += -DHAVE_SCREENSHOTS + OBJ += tasks/task_screenshot.o +endif + +OBJ += \ tasks/task_powerstate.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/pixconv.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_int.o \ $(LIBRETRO_COMM_DIR)/gfx/scaler/scaler_filter.o \ - gfx/font_driver.o \ - gfx/video_filter.o \ - $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o \ - $(LIBRETRO_COMM_DIR)/audio/dsp_filter.o \ - $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o \ - $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o \ + gfx/font_driver.o + +ifeq ($(HAVE_VIDEO_FILTER), 1) +DEFINES += -DHAVE_VIDEO_FILTER +OBJ += gfx/video_filter.o +endif + +OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/audio_resampler.o + +ifeq ($(HAVE_DSP_FILTER), 1) +DEFINES += -DHAVE_DSP_FILTER +OBJ += $(LIBRETRO_COMM_DIR)/audio/dsp_filter.o +endif + +OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/sinc_resampler.o + +ifeq ($(HAVE_NEAREST_RESAMPLER), 1) + DEFINES += -DHAVE_NEAREST_RESAMPLER + OBJ += $(LIBRETRO_COMM_DIR)/audio/resampler/drivers/nearest_resampler.o +endif + +OBJ += \ $(LIBRETRO_COMM_DIR)/utils/md5.o \ playlist.o \ $(LIBRETRO_COMM_DIR)/features/features_cpu.o \ @@ -275,7 +321,6 @@ OBJ += \ ifeq ($(HAVE_CONFIGFILE), 1) DEFINES += -DHAVE_CONFIGFILE - OBJ += input/input_remapping.o endif ifeq ($(HAVE_BLISSBOX), 1) @@ -290,6 +335,10 @@ ifeq ($(HAVE_AUDIOMIXER), 1) $(LIBRETRO_COMM_DIR)/audio/audio_mixer.o endif +ifeq ($(HAVE_BSV_MOVIE), 1) + DEFINES += -DHAVE_BSV_MOVIE +endif + ifeq ($(HAVE_RUNAHEAD), 1) DEFINES += -DHAVE_RUNAHEAD endif @@ -486,27 +535,20 @@ ifeq ($(HAVE_BUILTINMBEDTLS), 1) deps/mbedtls/ccm.o \ deps/mbedtls/cipher.o \ deps/mbedtls/cipher_wrap.o \ - deps/mbedtls/cmac.o \ deps/mbedtls/ctr_drbg.o \ deps/mbedtls/des.o \ deps/mbedtls/dhm.o \ deps/mbedtls/ecdh.o \ deps/mbedtls/ecdsa.o \ - deps/mbedtls/ecjpake.o \ deps/mbedtls/ecp.o \ deps/mbedtls/ecp_curves.o \ deps/mbedtls/entropy.o \ deps/mbedtls/entropy_poll.o \ - deps/mbedtls/error.o \ deps/mbedtls/gcm.o \ - deps/mbedtls/havege.o \ deps/mbedtls/hmac_drbg.o \ deps/mbedtls/md.o \ - deps/mbedtls/md2.o \ - deps/mbedtls/md4.o \ deps/mbedtls/md5.o \ deps/mbedtls/md_wrap.o \ - deps/mbedtls/memory_buffer_alloc.o \ deps/mbedtls/oid.o \ deps/mbedtls/padlock.o \ deps/mbedtls/pem.o \ @@ -516,7 +558,6 @@ ifeq ($(HAVE_BUILTINMBEDTLS), 1) deps/mbedtls/pkcs5.o \ deps/mbedtls/pkparse.o \ deps/mbedtls/pkwrite.o \ - deps/mbedtls/platform.o \ deps/mbedtls/ripemd160.o \ deps/mbedtls/rsa.o \ deps/mbedtls/sha1.o \ @@ -524,12 +565,9 @@ ifeq ($(HAVE_BUILTINMBEDTLS), 1) deps/mbedtls/sha512.o \ deps/mbedtls/threading.o \ deps/mbedtls/timing.o \ - deps/mbedtls/version.o \ - deps/mbedtls/version_features.o \ deps/mbedtls/xtea.o OBJS_TLS_X509 = deps/mbedtls/certs.o \ - deps/mbedtls/pkcs11.o \ deps/mbedtls/x509.o \ deps/mbedtls/x509_create.o \ deps/mbedtls/x509_crl.o \ @@ -568,6 +606,16 @@ ifeq ($(HAVE_EMSCRIPTEN), 1) camera/drivers/rwebcam.o endif +ifeq ($(HAVE_BLUETOOTH), 1) + OBJ += bluetooth/drivers/bluetoothctl.o +endif + +ifeq ($(HAVE_BLUETOOTH), 1) + ifeq ($(HAVE_DBUS), 1) + OBJ += bluetooth/drivers/bluez.o + endif +endif + ifeq ($(HAVE_LAKKA), 1) OBJ += wifi/drivers/connmanctl.o endif @@ -720,8 +768,11 @@ ifeq ($(HAVE_NEON),1) endif OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float.o \ - $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o \ - $(LIBRETRO_COMM_DIR)/formats/wav/rwav.o + $(LIBRETRO_COMM_DIR)/audio/conversion/float_to_s16.o + +ifeq ($(HAVE_RWAV), 1) +OBJ += $(LIBRETRO_COMM_DIR)/formats/wav/rwav.o +endif ifeq ($(HAVE_NEON),1) OBJ += $(LIBRETRO_COMM_DIR)/audio/conversion/s16_to_float_neon.o \ @@ -810,6 +861,10 @@ ifeq ($(HAVE_MENU), 1) endif endif +ifeq ($(HAVE_BLUETOOTH), 1) + DEFINES += -DHAVE_BLUETOOTH +endif + ifeq ($(HAVE_LAKKA), 1) DEFINES += -DHAVE_LAKKA endif @@ -820,9 +875,6 @@ endif ifeq ($(HAVE_MENU_COMMON), 1) OBJ += menu/menu_setting.o \ - menu/widgets/menu_filebrowser.o \ - menu/widgets/menu_dialog.o \ - menu/widgets/menu_input_bind_dialog.o \ menu/cbs/menu_cbs_ok.o \ menu/cbs/menu_cbs_cancel.o \ menu/cbs/menu_cbs_select.o \ @@ -844,11 +896,18 @@ ifeq ($(HAVE_MENU_COMMON), 1) endif ifeq ($(HAVE_GFX_WIDGETS), 1) - OBJ += gfx/gfx_widgets.o \ - gfx/widgets/gfx_widget_screenshot.o \ + OBJ += gfx/gfx_widgets.o + + ifeq ($(HAVE_SCREENSHOTS), 1) + OBJ += gfx/widgets/gfx_widget_screenshot.o + endif + + OBJ += \ gfx/widgets/gfx_widget_volume.o \ gfx/widgets/gfx_widget_generic_message.o \ - gfx/widgets/gfx_widget_libretro_message.o + gfx/widgets/gfx_widget_libretro_message.o \ + gfx/widgets/gfx_widget_progress_message.o \ + gfx/widgets/gfx_widget_load_content_animation.o ifeq ($(HAVE_CHEEVOS), 1) OBJ += gfx/widgets/gfx_widget_achievement_popup.o endif @@ -993,11 +1052,17 @@ endif ifeq ($(HAVE_WAYLAND), 1) OBJ += gfx/drivers_context/wayland_ctx.o \ + input/common/wayland_common.o \ input/drivers/wayland_input.o \ gfx/common/wayland/xdg-shell.o \ gfx/common/wayland/xdg-shell-unstable-v6.o \ gfx/common/wayland/idle-inhibit-unstable-v1.o \ gfx/common/wayland/xdg-decoration-unstable-v1.o + + ifeq ($(HAVE_VULKAN), 1) + OBJ += gfx/drivers_context/wayland_vk_ctx.o + endif + DEF_FLAGS += $(WAYLAND_CFLAGS) $(WAYLAND_CURSOR_CFLAGS) LIBS += $(WAYLAND_LIBS) $(WAYLAND_CURSOR_LIBS) @@ -1044,6 +1109,9 @@ ifeq ($(HAVE_X11), 1) ifneq ($(HAVE_OPENGLES), 1) OBJ += gfx/drivers_context/x_ctx.o endif + ifeq ($(HAVE_VULKAN), 1) + OBJ += gfx/drivers_context/x_vk_ctx.o + endif endif ifeq ($(HAVE_XCB),1) @@ -1106,7 +1174,10 @@ ifeq ($(HAVE_PARPORT), 1) endif ifneq ($(findstring Win32,$(OS)),) - OBJ += input/drivers/winraw_input.o +ifeq ($(HAVE_WINRAWINPUT), 1) + DEFINES += -DHAVE_WINRAWINPUT + OBJ += input/drivers/winraw_input.o +endif endif # Companion UI @@ -1145,8 +1216,8 @@ endif ifeq ($(HAVE_SIXEL), 1) DEFINES += -DHAVE_SIXEL INCLUDE_DIRS += -I/usr/include/sixel - OBJ += gfx/drivers/sixel_gfx.o gfx/drivers_font/sixel_font.o \ - gfx/drivers_context/sixel_ctx.o + OBJ += gfx/drivers/sixel_gfx.o \ + gfx/drivers_font/sixel_font.o LIBS += $(SIXEL_LIBS) DEF_FLAGS += $(SIXEL_CFLAGS) endif @@ -1165,8 +1236,7 @@ ifeq ($(HAVE_NETWORK_VIDEO), 1) endif DEFINES += -DHAVE_NETWORK_VIDEO - OBJ += gfx/drivers/network_gfx.o \ - gfx/drivers_context/network_ctx.o + OBJ += gfx/drivers/network_gfx.o endif ifeq ($(HAVE_PLAIN_DRM), 1) @@ -1550,12 +1620,15 @@ ifeq ($(HAVE_BUILTINGLSLANG), 1) GLSLANG_SOURCES := \ gfx/drivers_shader/glslang.cpp \ - $(wildcard $(DEPS_DIR)/glslang/glslang/SPIRV/*.cpp) \ + $(DEPS_DIR)/glslang/glslang/SPIRV/GlslangToSpv.cpp \ + $(DEPS_DIR)/glslang/glslang/SPIRV/InReadableOrder.cpp \ + $(DEPS_DIR)/glslang/glslang/SPIRV/Logger.cpp \ + $(DEPS_DIR)/glslang/glslang/SPIRV/SpvBuilder.cpp \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/GenericCodeGen/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/OGLCompilersDLL/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/*.cpp) \ $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/MachineIndependent/preprocessor/*.cpp) \ - $(wildcard $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/*.cpp) + $(DEPS_DIR)/glslang/glslang/glslang/OSDependent/$(GLSLANG_PLATFORM)/ossource.cpp ifneq ($(findstring Win32,$(OS)),) DEFINES += -DENABLE_HLSL @@ -1594,6 +1667,9 @@ endif ifeq ($(WANT_WGL), 1) OBJ += gfx/drivers_context/wgl_ctx.o + ifeq ($(HAVE_VULKAN),1) + OBJ += gfx/drivers_context/w_vk_ctx.o + endif LIBS += -lcomctl32 endif @@ -1665,7 +1741,6 @@ endif ifeq ($(HAVE_BUILTINZLIB), 1) HAVE_ZLIB_COMMON = 1 OBJ += $(DEPS_DIR)/libz/adler32.o \ - $(DEPS_DIR)/libz/compress.o \ $(DEPS_DIR)/libz/libz-crc32.o \ $(DEPS_DIR)/libz/deflate.o \ $(DEPS_DIR)/libz/gzclose.o \ @@ -1676,7 +1751,6 @@ ifeq ($(HAVE_BUILTINZLIB), 1) $(DEPS_DIR)/libz/inflate.o \ $(DEPS_DIR)/libz/inftrees.o \ $(DEPS_DIR)/libz/trees.o \ - $(DEPS_DIR)/libz/uncompr.o \ $(DEPS_DIR)/libz/zutil.o INCLUDE_DIRS += -I$(LIBRETRO_COMM_DIR)/include/compat/zlib else ifeq ($(HAVE_ZLIB),1) @@ -1719,7 +1793,8 @@ ifeq ($(HAVE_CDROM), 1) DEFINES += -DHAVE_CDROM OBJ += $(LIBRETRO_COMM_DIR)/cdrom/cdrom.o \ - $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_cdrom.o + $(LIBRETRO_COMM_DIR)/vfs/vfs_implementation_cdrom.o \ + $(LIBRETRO_COMM_DIR)/media/media_detect_cd.o endif ifeq ($(HAVE_RTGA), 1) @@ -1795,6 +1870,7 @@ ifeq ($(HAVE_NETWORKING), 1) tasks/task_http.o \ tasks/task_netplay_lan_scan.o \ tasks/task_netplay_nat_traversal.o \ + tasks/task_bluetooth.o \ tasks/task_wifi.o \ tasks/task_pl_thumbnail_download.o \ tasks/task_netplay_find_content.o @@ -1965,8 +2041,7 @@ ifeq ($(HAVE_NETWORKING), 1) endif ifneq ($(findstring FPGA,$(OS)),) - OBJ += gfx/drivers/fpga_gfx.o \ - gfx/drivers_context/fpga_ctx.o + OBJ += gfx/drivers/fpga_gfx.o endif ifneq ($(findstring Win32,$(OS)),) @@ -1977,7 +2052,6 @@ ifneq ($(findstring Win32,$(OS)),) ifeq ($(HAVE_GDI), 1) OBJ += gfx/drivers/gdi_gfx.o \ - gfx/drivers_context/gdi_ctx.o \ gfx/drivers_font/gdi_font.o \ gfx/drivers_display/gfx_display_gdi.o LIBS += -lmsimg32 @@ -2093,8 +2167,14 @@ ifeq ($(HAVE_MATH_NEON), 1) endif ifeq ($(HAVE_VITAGL), 1) - DEFINES += -DHAVE_VITAGL -DSTB_DXT_IMPLEMENTATION -DSKIP_ERROR_HANDLING - INCLUDE_DIRS += -I$(DEPS_DIR)/vitaGL/source + INCLUDE_DIRS += -I$(DEPS_DIR)/vitaShaRK/source + SOURCES := $(DEPS_DIR)/vitaShaRK/source + OBJ += $(patsubst %.c,%.o,$(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c))) +endif + +ifeq ($(HAVE_VITAGL), 1) + DEFINES += -DHAVE_VITAGL -DSTB_DXT_IMPLEMENTATION -DSKIP_ERROR_HANDLING -DHAVE_SHARK + INCLUDE_DIRS += -I$(DEPS_DIR)/vitaGL/source -I$(DEPS_DIR)/vitaShaRK/include SOURCES := $(DEPS_DIR)/vitaGL/source $(DEPS_DIR)/vitaGL/source/utils OBJ += $(patsubst %.c,%.o,$(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c))) endif diff --git a/Makefile.ctr b/Makefile.ctr index 3fe03430a6..bde79c9f5f 100644 --- a/Makefile.ctr +++ b/Makefile.ctr @@ -53,6 +53,9 @@ ifeq ($(GRIFFIN_BUILD), 1) DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER DEFINES += -DHAVE_ZLIB -DHAVE_7ZIP -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA DEFINES += -DHAVE_NETWORKING -DHAVE_CHEEVOS -DRC_DISABLE_LUA + DEFINES += -DHAVE_PATCH -DHAVE_RWAV + DEFINES += -DHAVE_SCREENSHOTS + DEFINES += -DHAVE_REWIND #DEFINES += -DHAVE_SOCKET_LEGACY -DHAVE_THREADS #-DHAVE_SSL -DHAVE_BUILTINMBEDTLS -DMBEDTLS_SSL_DEBUG_ALL #ssl is currently incompatible with griffin due to use of the "static" flag on repeating functions that will conflict when included in one file @@ -73,6 +76,11 @@ else HAVE_XMB = 1 HAVE_STATIC_VIDEO_FILTERS = 1 HAVE_STATIC_AUDIO_FILTERS = 1 + HAVE_PATCH = 1 + HAVE_SCREENSHOTS = 1 + HAVE_REWIND = 1 + HAVE_AUDIOMIXER = 1 + HAVE_RWAV = 1 #HAVE_NETWORKING = 1 #HAVE_CHEEVOS = 1 #HAVE_SOCKET_LEGACY = 1 @@ -141,7 +149,10 @@ CFLAGS += -I. \ -Ilibretro-common/include/compat/zlib CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE +CFLAGS += -DHAVE_DSP_FILTER +CFLAGS += -DHAVE_VIDEO_FILTER CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) +CFLAGS += -DHAVE_CHEATS CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 diff --git a/Makefile.dingux b/Makefile.dingux index 7b00ae1370..9948435266 100644 --- a/Makefile.dingux +++ b/Makefile.dingux @@ -4,10 +4,14 @@ PACKAGE_NAME = retroarch DEBUG ?= 0 +HAVE_SCREENSHOTS = 1 +HAVE_REWIND = 1 HAVE_7ZIP = 1 HAVE_AL = 1 # this freezes when switching back from menu HAVE_ALSA = 0 +HAVE_DSP_FILTER = 1 +HAVE_VIDEO_FILTER = 1 HAVE_BUILTINMBEDTLS = 1 HAVE_BUILTINZLIB = 1 HAVE_C99 = 1 @@ -62,6 +66,8 @@ HAVE_VIDEO_LAYOUT = 1 HAVE_XMB = 1 HAVE_ZLIB = 1 HAVE_CONFIGFILE = 1 +HAVE_PATCH = 1 +HAVE_CHEATS = 1 OS = Linux TARGET = retroarch @@ -160,7 +166,7 @@ $(OBJDIR)/%.o: %.m .FORCE: -$(OBJDIR)/git_version.o: git_version.c .FORCE +$(OBJDIR)/version_git.o: version_git.c .FORCE @mkdir -p $(dir $@) @$(if $(Q), $(shell echo echo CC $<),) $(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $< diff --git a/Makefile.emscripten b/Makefile.emscripten index 5336030fb8..19a98ef475 100644 --- a/Makefile.emscripten +++ b/Makefile.emscripten @@ -9,8 +9,12 @@ OBJ := DEFINES := -DRARCH_INTERNAL -DHAVE_MAIN -s USE_PTHREADS=$(PTHREAD) DEFINES += -DHAVE_FILTERS_BUILTIN +HAVE_DSP_FILTER = 1 +HAVE_VIDEO_FILTER = 1 HAVE_OVERLAY = 1 HAVE_GLSL = 1 +HAVE_SCREENSHOTS = 1 +HAVE_REWIND = 1 HAVE_AUDIOMIXER = 1 HAVE_VIDEO_LAYOUT = 0 HAVE_CC_RESAMPLER = 1 @@ -30,6 +34,7 @@ HAVE_STATIC_VIDEO_FILTERS = 1 HAVE_STATIC_AUDIO_FILTERS = 1 HAVE_STB_FONT = 1 HAVE_CONFIGFILE = 1 +HAVE_CHEATS = 1 MEMORY = 134217728 diff --git a/Makefile.griffin b/Makefile.griffin index 634ccc1472..9d1a607db3 100644 --- a/Makefile.griffin +++ b/Makefile.griffin @@ -191,8 +191,9 @@ else ifeq ($(libogc_platform), 1) CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int - HAVE_AUDIOMIXER := 1 HAVE_RUNAHEAD := 1 + HAVE_DSP_FILTER := 1 + HAVE_VIDEO_FILTER := 1 HAVE_FILTERS_BUILTIN := 1 HAVE_THREADS := 1 HAVE_RPNG := 1 @@ -204,11 +205,16 @@ else ifeq ($(libogc_platform), 1) HAVE_VIDEO_LAYOUT := 0 HAVE_ZLIB := 1 HAVE_7ZIP := 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 + HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 RARCH_CONSOLE = 1 ifeq ($(platform), wii) - HAVE_AUDIOMIXER := 1 #HAVE_LANGEXTRA := 1 HAVE_WIIUSB_HID := 1 HAVE_RARCH_EXEC := 1 @@ -244,7 +250,9 @@ else ifeq ($(platform), xenon360) HAVE_THREADS := 1 HAVE_GETOPT_LONG := 1 RARCH_CONSOLE = 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 # PSP else ifeq ($(platform), psp1) @@ -269,7 +277,9 @@ else ifeq ($(platform), psp1) HAVE_KERNEL_PRX := 1 #HAVE_LANGEXTRA := 1 RARCH_CONSOLE = 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 ifeq ($(BUILD_PRX), 1) LDFLAGS += $(addprefix -L,$(PSPSDK)/lib) -specs=$(PSPSDK)/lib/prxspecs -Wl,-q,-T$(PSPSDK)/lib/linkfile.prx $(LDFLAGS) @@ -309,6 +319,8 @@ else ifeq ($(platform), vita) LIBDIRS += -L. LDFLAGS += -Wl,-q + HAVE_DSP_FILTER := 1 + HAVE_VIDEO_FILTER := 1 HAVE_FILTERS_BUILTIN := 1 HAVE_LANGEXTRA := 1 HAVE_RPNG := 1 @@ -327,7 +339,9 @@ else ifeq ($(platform), vita) HAVE_THREADS := 1 HAVE_LIBRETRODB := 1 RARCH_CONSOLE = 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 else ifeq ($(platform), windows_msvc6_x86) HAVE_RPNG := 1 HAVE_RJPEG := 1 @@ -351,7 +365,9 @@ else ifeq ($(platform), windows_msvc6_x86) HAVE_DYLIB := 1 HAVE_DYNAMIC := 1 HAVE_GRIFFIN_CPP := 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -395,7 +411,9 @@ else ifeq ($(platform), windows_msvc2003_x86) HAVE_DYLIB := 1 HAVE_DYNAMIC := 1 HAVE_GRIFFIN_CPP := 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -445,7 +463,9 @@ else ifeq ($(platform), windows_msvc2005_x86) HAVE_DYNAMIC := 1 HAVE_GRIFFIN_CPP := 1 HAVE_DIRECTX ?= 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -472,7 +492,10 @@ else ifeq ($(platform), windows_msvc2005_x86) endif else ifneq (,$(findstring windows_msvc2010,$(platform))) HAVE_GDI := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -497,7 +520,9 @@ else ifneq (,$(findstring windows_msvc2010,$(platform))) HAVE_GRIFFIN_CPP := 1 HAVE_RUNAHEAD := 1 HAVE_DIRECTX ?= 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -547,7 +572,10 @@ else ifneq (,$(findstring windows_msvc2010,$(platform))) endif else ifneq (,$(findstring windows_msvc2012,$(platform))) HAVE_GDI := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -572,7 +600,9 @@ else ifneq (,$(findstring windows_msvc2012,$(platform))) HAVE_GRIFFIN_CPP := 1 HAVE_RUNAHEAD := 1 HAVE_DIRECTX ?= 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -626,7 +656,10 @@ else ifneq (,$(findstring windows_msvc2012,$(platform))) endif else ifneq (,$(findstring windows_msvc2013,$(platform))) HAVE_GDI := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -651,7 +684,9 @@ else ifneq (,$(findstring windows_msvc2013,$(platform))) HAVE_GRIFFIN_CPP := 1 HAVE_RUNAHEAD := 1 HAVE_DIRECTX ?= 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -705,7 +740,10 @@ else ifneq (,$(findstring windows_msvc2013,$(platform))) endif else ifneq (,$(findstring windows_msvc2015,$(platform))) HAVE_GDI := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -730,7 +768,9 @@ else ifneq (,$(findstring windows_msvc2015,$(platform))) HAVE_GRIFFIN_CPP := 1 HAVE_RUNAHEAD := 1 HAVE_DIRECTX ?= 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -799,7 +839,10 @@ else ifneq (,$(findstring windows_msvc2015,$(platform))) export LIB := $(LIB) endif else ifeq (qnx,$(platform)) + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -823,7 +866,10 @@ else ifeq (qnx,$(platform)) HAVE_DYNAMIC := 1 HAVE_GRIFFIN_CPP := 0 WANT_GLSLANG := 0 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 + CC=qcc -Vgcc_ntoarmv7le CXX=QCC -Vgcc_ntoarmv7le @@ -831,13 +877,16 @@ else ifeq (qnx,$(platform)) LDFLAGS += -g endif - PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DRARCH_MOBILE + PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_XCB -DHAVE_EGL -DHAVE_BB10 -DHAVE_GLSL -DHAVE_AL -DHAVE_BSV_MOVIE -DRARCH_MOBILE EXT_TARGET := $(TARGET_NAME) EXT_INTER_TARGET := $(TARGET_NAME) INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I. LIBS += -lEGL -lbps -lscreen -lsocket -lm -lGLESv2 -lOpenAL else ifneq (,$(findstring unix,$(platform))) + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -861,15 +910,16 @@ else ifneq (,$(findstring unix,$(platform))) HAVE_DYNAMIC := 1 HAVE_GRIFFIN_CPP := 1 WANT_GLSLANG := 1 - HAVE_CONFIGFILE := 1 + HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 - PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_PULSE + PLATCFLAGS += -D__MMX__ -D__SSE__ -DHAVE_OPENGL -DHAVE_OPENGL1 -DHAVE_GLSL -DHAVE_SHADERPIPELINE -DHAVE_OZONE -DHAVE_CC_RESAMPLER -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_GL_SYNC -DHAVE_SLANG -DHAVE_GLSLANG -DHAVE_BUILTINGLSLANG -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_RUNAHEAD -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES -DHAVE_VULKAN -DHAVE_XMB -DRARCH_INTERNAL -DWANT_GLSLANG -DHAVE_X11 -DHAVE_XCB -DHAVE_UDEV -DHAVE_BSV_MOVIE -DHAVE_PULSE EXT_TARGET := $(TARGET_NAME) EXT_INTER_TARGET := $(TARGET_NAME) INCLUDE += -Ilibretro-common/include -Igfx/include -Ideps -Ideps/stb -Ideps/rcheevos/include -Ideps/SPIRV-Cross -Ideps/glslang -I. LIBS += -ldl -lm -lpthread -lGL -ludev -lpulse -lX11 -lX11-xcb -lXxf86vm else ifeq (dos,$(platform)) - HAVE_AUDIOMIXER := 1 HAVE_RPNG := 1 HAVE_RJPEG := 1 HAVE_RBMP := 1 @@ -881,7 +931,7 @@ else ifeq (dos,$(platform)) HAVE_NETPLAYDISCOVERY := 0 HAVE_OVERLAY := 1 HAVE_VIDEO_LAYOUT := 0 - HAVE_MATERIALUI := 1 + HAVE_MATERIALUI := 0 HAVE_XMB := 0 HAVE_STB_FONT := 1 HAVE_THREADS := 0 @@ -894,6 +944,8 @@ else ifeq (dos,$(platform)) HAVE_GRIFFIN_CPP := 0 WANT_GLSLANG := 0 HAVE_CONFIGFILE := 1 + HAVE_PATCH := 0 + HAVE_CHEATS := 0 CC=i586-pc-msdosdjgpp-gcc CXX=i586-pc-msdosdjgpp-g++ @@ -901,7 +953,7 @@ else ifeq (dos,$(platform)) LDFLAGS += -g endif - PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_CC_RESAMPLER -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DRARCH_INTERNAL -DHAVE_XCB + PLATCFLAGS += -DHAVE_SHADERPIPELINE -DHAVE_CC_RESAMPLER -DRC_DISABLE_LUA -DHAVE_FBO -DHAVE_IMAGEVIEWER -DHAVE_LANGEXTRA -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SPIRV_CROSS -DHAVE_STB_FONT -DRARCH_INTERNAL -DHAVE_XCB TARGET_NAME := retrodos EXT_TARGET := $(TARGET_NAME).exe EXT_INTER_TARGET := $(TARGET_NAME).exe @@ -995,6 +1047,10 @@ ifeq ($(HAVE_IMAGEVIEWER), 1) CFLAGS += -DHAVE_IMAGEVIEWER endif +ifeq ($(HAVE_BSV_MOVIE), 1) + CFLAGS += -DHAVE_BSV_MOVIE +endif + ifeq ($(HAVE_RUNAHEAD), 1) CFLAGS += -DHAVE_RUNAHEAD endif @@ -1003,10 +1059,22 @@ ifeq ($(HAVE_7ZIP), 1) CFLAGS += -DHAVE_7ZIP endif +ifeq ($(HAVE_SCREENSHOTS), 1) + CFLAGS += -DHAVE_SCREENSHOTS +endif + +ifeq ($(HAVE_REWIND), 1) + CFLAGS += -DHAVE_REWIND +endif + ifeq ($(HAVE_AUDIOMIXER), 1) CFLAGS += -DHAVE_AUDIOMIXER endif +ifeq ($(HAVE_RWAV), 1) + CFLAGS += -DHAVE_RWAV +endif + ifeq ($(HAVE_OVERLAY), 1) CFLAGS += -DHAVE_OVERLAY endif @@ -1053,6 +1121,14 @@ ifeq ($(HAVE_LANGEXTRA), 1) CFLAGS += -DHAVE_LANGEXTRA endif +ifeq ($(HAVE_DSP_FILTER), 1) + CFLAGS += -DHAVE_DSP_FILTER +endif + +ifeq ($(HAVE_VIDEO_FILTER), 1) + CFLAGS += -DHAVE_VIDEO_FILTER +endif + ifeq ($(HAVE_FILTERS_BUILTIN), 1) CFLAGS += -DHAVE_FILTERS_BUILTIN endif @@ -1073,6 +1149,14 @@ ifeq ($(HAVE_CONFIGFILE), 1) CFLAGS += -DHAVE_CONFIGFILE endif +ifeq ($(HAVE_PATCH), 1) + CFLAGS += -DHAVE_PATCH +endif + +ifeq ($(HAVE_CHEATS), 1) + CFLAGS += -DHAVE_CHEATS +endif + ifeq ($(HAVE_RSOUND), 1) CFLAGS += -DHAVE_RSOUND endif diff --git a/Makefile.libnx b/Makefile.libnx index 14da9d7456..7146809040 100644 --- a/Makefile.libnx +++ b/Makefile.libnx @@ -23,6 +23,8 @@ DEFINES := -D__SWITCH__=1 -U__linux__ -U__linux -DGLM_FORCE_PURE=1 -DRARCH_CONSO HAVE_DR_MP3 = 1 HAVE_TRANSLATE = 1 +HAVE_SCREENSHOTS = 1 +HAVE_REWIND = 1 HAVE_AUDIOMIXER = 1 HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 @@ -33,10 +35,14 @@ HAVE_RBMP = 1 HAVE_ZLIB = 1 HAVE_BUILTINZLIB = 1 HAVE_LIBRETRODB = 1 +HAVE_DSP_FILTER = 1 +HAVE_VIDEO_FILTER = 1 HAVE_STATIC_VIDEO_FILTERS = 1 HAVE_STATIC_AUDIO_FILTERS = 1 HAVE_MENU = 1 HAVE_CONFIGFILE = 1 +HAVE_PATCH = 1 +HAVE_CHEATS = 1 HAVE_RUNAHEAD = 1 HAVE_NETWORKING = 1 HAVE_NETPLAYDISCOVERY = 1 diff --git a/Makefile.msvc b/Makefile.msvc index 5426f38aef..d847e77b23 100644 --- a/Makefile.msvc +++ b/Makefile.msvc @@ -11,6 +11,10 @@ WindowsSdkDir = C:\Program Files (x86)\Windows Kits\10\$(NOTHING) WindowsSDKVersion := 10.0.14393.0\$(NOTHING) VCINSTALLDIR := C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\$(NOTHING) +HAVE_DSP_FILTER := 1 +HAVE_VIDEO_FILTER := 1 +HAVE_SCREENSHOTS := 1 +HAVE_REWIND := 1 HAVE_AUDIOMIXER := 1 HAVE_D3DX := 1 HAVE_D3D8 := 0 @@ -32,6 +36,7 @@ HAVE_WINMM := 1 HAVE_RPNG := 1 HAVE_ZLIB := 1 HAVE_CONFIGFILE := 1 +HAVE_PATCH := 1 HAVE_MENU := 1 HAVE_RGUI := 1 HAVE_XMB := 1 @@ -60,6 +65,8 @@ HAVE_LANGEXTRA := 1 HAVE_CHEEVOS := 1 HAVE_SHADERPIPELINE := 1 HAVE_IMAGEVIEWER := 1 +HAVE_BSV_MOVIE := 1 +HAVE_CHEATS := 1 ifeq ($(HAVE_D3D8), 1) D3D8_LIBS := -ld3d8 @@ -192,7 +199,7 @@ else OBJ := $(filter-out $(BLACKLIST),$(OBJ)) endif -DEFINES += -DRARCH_INTERNAL -DHAVE_DYNAMIC -DJSON_STATIC +DEFINES += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_DYNAMIC -DJSON_STATIC INCLUDE_DIRS += -I. -Igfx/include #OBJ := version_git.o diff --git a/Makefile.openpandora b/Makefile.openpandora index d33950adb8..0f5e4f79cc 100644 --- a/Makefile.openpandora +++ b/Makefile.openpandora @@ -15,7 +15,9 @@ LDFLAGS = -L$(PNDSDK)/usr/lib -Wl,-rpath,$(PNDSDK)/usr/lib LIBS = -lGLESv2 -lEGL -ldl -lm -lpthread -lrt -lasound DEFINES = -std=gnu99 -DHAVE_THREADS -DHAVE_GETOPT_LONG=1 -DHAVE_GRIFFIN -DRARCH_INTERNAL -DEFINES += -DHAVE_CONFIGFILE -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ +DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_REWIND -D__ARM_ARCH_6__ -DHAVE_OPENGL -DHAVE_OPENGLES -DHAVE_OPENGLES2 -DHAVE_GLSL -DHAVE_DYNAMIC -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_OVERLAY -DHAVE_VIDEO_LAYOUT -DHAVE_ALSA -DHAVE_ZLIB -D__linux__ +DEFINES += -DHAVE_DSP_FILTER +DEFINES += -DHAVE_VIDEO_FILTER DEFINES += $(INCDIRS) DEFINES += -D__OPENPANDORA__ -DPANDORA DEFINES += -marm -march=armv7-a -mcpu=cortex-a8 -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -ftree-vectorize diff --git a/Makefile.orbis b/Makefile.orbis index 2945fd14aa..55f5cca216 100644 --- a/Makefile.orbis +++ b/Makefile.orbis @@ -16,13 +16,16 @@ DEFINES := ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o DEFINES += -DHAVE_GRIFFIN=1 - DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE + DEFINES += -DHAVE_MENU -DHAVE_LIBRETRODB -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_SCREENSHOTS -DHAVE_CHEATS + DEFINES += -DHAVE_REWIND DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER ifeq ($(DEBUG), 1) DEFINES += -DHAVE_NETLOGGER endif else + HAVE_DSP_FILTER := 1 + HAVE_VIDEO_FILTER := 1 HAVE_FILTERS_BUILTIN := 1 HAVE_LANGEXTRA := 0 HAVE_RPNG := 1 @@ -42,6 +45,10 @@ else HAVE_MENU := 1 HAVE_MENU_COMMON := 1 HAVE_CONFIGFILE := 1 + HAVE_SCREENSHOTS := 1 + HAVE_REWIND := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 HAVE_RGUI := 0 HAVE_MATERIALUI := 0 HAVE_XMB := 1 diff --git a/Makefile.ps2 b/Makefile.ps2 index 9ffe65da9f..73bfeb9b6c 100644 --- a/Makefile.ps2 +++ b/Makefile.ps2 @@ -6,12 +6,11 @@ HAVE_THREADS = 0 MUTE_WARNINGS = 1 PS2_IP = 192.168.1.150 -TARGET = retroarchps2.elf -TARGET_RELEASE = retroarchps2-release.elf +TARGET = retroarchps2-debug.elf +TARGET_RELEASE = retroarchps2.elf # Compile the IRXs first IRX_DIR = ps2/irx -IRX_FILES = $(wildcard ps2/irx/*.c) ifeq ($(DEBUG), 1) OPTIMIZE_LV := -O0 -g @@ -31,12 +30,14 @@ INCDIR += -Ideps/pthreads -Ideps/pthreads/platform/ps2 -Ideps/pthreads/platform/ CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant ASFLAGS = $(CFLAGS) -RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI +RARCH_DEFINES += -DPS2 -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI RARCH_DEFINES += -DHAVE_ZLIB -DHAVE_NO_BUILTINZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER +RARCH_DEFINES += -DHAVE_DSP_FILTER +RARCH_DEFINES += -DHAVE_VIDEO_FILTER LDFLAGS += -L$(PS2DEV)/gsKit/lib -L$(PS2SDK)/ports/lib -L. # Lib cdvd is needed to get proper time -LIBS += -lretro_ps2 -lpatches -lpoweroff -lgskit -ldmakit -laudsrv -lpadx -lmtap -lz -lcdvd +LIBS += -lretro_ps2 -lpatches -lpoweroff -lgskit -ldmakit -laudsrv -lpadx -lmtap -lz -lcdvd -lelf-loader ifeq ($(BUILD_FOR_PCSX2), 1) RARCH_DEFINES += -DBUILD_FOR_PCSX2 diff --git a/Makefile.ps2.salamander b/Makefile.ps2.salamander new file mode 100644 index 0000000000..b25103d2ea --- /dev/null +++ b/Makefile.ps2.salamander @@ -0,0 +1,103 @@ +BUILD_FOR_PCSX2 = 0 +DEBUG = 0 +HAVE_FILE_LOGGER = 0 +MUTE_WARNINGS = 1 +PS2_IP = 192.168.1.150 + +TARGET = raboot-debug.elf +TARGET_RELEASE = raboot.elf + +# Compile the IRXs first +IRX_DIR = ps2/irx + +ifeq ($(DEBUG), 1) + OPTIMIZE_LV := -O0 -g + RARCH_DEFINES += -DDEBUG +else + OPTIMIZE_LV := -O3 + LDFLAGS := -s +endif + +ifeq ($(MUTE_WARNINGS), 1) + DISABLE_WARNINGS := -Wno-sign-compare -Wno-unused -Wno-parentheses +endif + +INCDIR = -Ilibretro-common/include +INCDIR += -Ips2/include +CFLAGS = $(OPTIMIZE_LV) $(DISABLE_WARNINGS) -ffast-math -fsingle-precision-constant +ASFLAGS = $(CFLAGS) + +RARCH_DEFINES += -DPS2 -DIS_SALAMANDER -DRARCH_CONSOLE + +LIBDIR = +LDFLAGS = +LIBS = -lm -lelf-loader -lpatches -lpoweroff + +ifeq ($(BUILD_FOR_PCSX2), 1) +RARCH_DEFINES += -DBUILD_FOR_PCSX2 +endif + +ifeq ($(HAVE_FILE_LOGGER), 1) +CFLAGS += -DHAVE_FILE_LOGGER +endif + +CFLAGS += $(RARCH_DEFINES) + +EE_OBJS = frontend/frontend_salamander.o \ + frontend/frontend_driver.o \ + frontend/drivers/platform_ps2.o \ + libretro-common/file/file_path.o \ + libretro-common/file/file_path_io.o \ + libretro-common/string/stdstring.o \ + libretro-common/lists/string_list.o \ + libretro-common/lists/dir_list.o \ + libretro-common/file/retro_dirent.o \ + libretro-common/encodings/encoding_utf.o \ + libretro-common/compat/fopen_utf8.o \ + libretro-common/compat/compat_strl.o \ + libretro-common/compat/compat_strcasestr.o \ + libretro-common/file/config_file.o \ + libretro-common/streams/file_stream.o \ + libretro-common/vfs/vfs_implementation.o \ + libretro-common/hash/rhash.o \ + libretro-common/time/rtime.o \ + file_path_str.o \ + verbosity.o \ + ps2/compat_files/ps2_devices.o + +# Needed IRX objects +EE_OBJS += $(IRX_DIR)/freesio2_irx.o $(IRX_DIR)/iomanX_irx.o $(IRX_DIR)/cdfs_irx.o +EE_OBJS += $(IRX_DIR)/fileXio_irx.o $(IRX_DIR)/mcman_irx.o $(IRX_DIR)/mcserv_irx.o $(IRX_DIR)/usbd_irx.o +EE_OBJS += $(IRX_DIR)/usbhdfsd_irx.o $(IRX_DIR)/freesd_irx.o $(IRX_DIR)/poweroff_irx.o + +EE_CFLAGS = $(CFLAGS) +EE_CXXFLAGS = $(CFLAGS) +EE_LDFLAGS = $(LDFLAGS) +EE_LIBS = $(LIBS) +EE_ASFLAGS = $(ASFLAGS) +EE_INCS = $(INCDIR) +EE_BIN = $(TARGET) +EE_GPVAL = $(GPVAL) + +all: irxdir $(EE_BIN) + +irxdir: + $(MAKE) -C $(IRX_DIR) + +clean: + rm -f $(EE_BIN) $(EE_OBJS) + $(MAKE) -C $(IRX_DIR) clean + +debug: clean all run + +run: + ps2client -h $(PS2_IP) execee host:$(EE_BIN) + +package: + ps2-packer $(EE_BIN) $(TARGET_RELEASE) + +release: clean all package + +#Include preferences +include $(PS2SDK)/samples/Makefile.pref +include $(PS2SDK)/samples/Makefile.eeglobal_cpp diff --git a/Makefile.ps3 b/Makefile.ps3 index 4ca9937ff9..2412aa97ec 100644 --- a/Makefile.ps3 +++ b/Makefile.ps3 @@ -70,7 +70,7 @@ endif PPU_SRCS = griffin/griffin.c DEFINES += -DHAVE_VIDEO_LAYOUT -DEFINES += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC +DEFINES += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_GFX_WIDGETS -DHAVE_RGUI -DHAVE_XMB -DHAVE_OZONE -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD -DHAVE_DR_MP3 -DHAVE_DR_FLAC DEFINES += -DHAVE_ONLINE_UPDATER -DHAVE_UPDATE_ASSETS -DHAVE_UPDATE_CORES ifeq ($(DEX_BUILD), 1) @@ -117,7 +117,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA +DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LANGEXTRA -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_7Z -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_FILTERS_BUILTIN -DHAVE_CHEEVOS -DRC_DISABLE_LUA -DHAVE_DSP_FILTER -DHAVE_VIDEO_FILTER #DEFINES += -DHAVE_IMAGEVIEWER diff --git a/Makefile.ps3.cobra b/Makefile.ps3.cobra index 52e99e742b..3ba5423e5b 100644 --- a/Makefile.ps3.cobra +++ b/Makefile.ps3.cobra @@ -108,7 +108,7 @@ PPU_LDLIBS = $(FONT_LIBS) $(GL_LIBS) $(WHOLE_START) -lretro_ps3 $(WHOLE_END) -l PPU_RANLIB = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ranlib.exe #DEFINES += -DHAVE_VIDEO_LAYOUT -DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS +DEFINES += -DHAVE_THREADS -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_PATCH -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_OPENGLES -DHAVE_OPENGLES1 -DHAVE_PSGL -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_RSOUND -DHAVE_ZLIB -DHAVE_RPNG -D__CELLOS_LV2__ -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DHAVE_MOUSE -DHAVE_GRIFFIN=1 -DHAVE_MULTIMAN=0 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -DHAVE_STB_VORBIS ifeq ($(DEBUG), 1) PPU_OPTIMIZE_LV := -O0 -g diff --git a/Makefile.psl1ght b/Makefile.psl1ght index 9ac19921bc..1fae26721f 100644 --- a/Makefile.psl1ght +++ b/Makefile.psl1ght @@ -66,7 +66,7 @@ endif SHARED_FLAGS := SHARED_FLAGS += -DHAVE_VIDEO_LAYOUT -SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_MULTIMAN -DHAVE_RGUI +SHARED_FLAGS += -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DRARCH_CONSOLE -DHAVE_OVERLAY -DHAVE_HEADSET -DHAVE_CG -DHAVE_CG_RUNTIME_COMPILER -DHAVE_GCMGL -DHAVE_SYSMODULES -DHAVE_SYSUTILS -DHAVE_RARCH_EXEC -DHAVE_MOUSE -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_GRIFFIN=1 -DHAVE_NETWORKING=1 -DHAVE_SOCKET_LEGACY=1 -DPC_DEVELOPMENT_IP_ADDRESS=\"$(PC_DEVELOPMENT_IP_ADDRESS)\" -DPC_DEVELOPMENT_UDP_PORT=$(PC_DEVELOPMENT_UDP_PORT) -Wno-char-subscripts -DHAVE_CC_RESAMPLER -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DHAVE_MULTIMAN -DHAVE_RGUI CFLAGS += -std=gnu99 $(SHARED_FLAGS) CXXFLAGS += $(SHARED_FLAGS) diff --git a/Makefile.psp1 b/Makefile.psp1 index d59acb3521..1562480544 100644 --- a/Makefile.psp1 +++ b/Makefile.psp1 @@ -25,7 +25,7 @@ INCDIR = deps deps/stb deps/7zip deps/pthreads deps/pthreads/platform/psp deps/p CFLAGS = $(OPTIMIZE_LV) -G0 -std=gnu99 -ffast-math -fsingle-precision-constant ASFLAGS = $(CFLAGS) -RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_7ZIP -DHAVE_CC_RESAMPLER +RARCH_DEFINES = -DPSP -D_MIPS_ARCH_ALLEGREX -DHAVE_LANGEXTRA -DHAVE_ZLIB -DHAVE_AUDIOMIXER -DHAVE_RWAV -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_GRIFFIN=1 -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_REWIND -DRARCH_CONSOLE -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_FILTERS_BUILTIN -DHAVE_DSP_FILTER -DHAVE_VIDEO_FILTER -DHAVE_7ZIP -DHAVE_CC_RESAMPLER LIBDIR = LDFLAGS = diff --git a/Makefile.switch b/Makefile.switch index f876a1de84..e5b32bd3c3 100644 --- a/Makefile.switch +++ b/Makefile.switch @@ -6,16 +6,18 @@ WHOLE_ARCHIVE_LINK = 0 OBJ := -DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_DYNAMIC +DEFINES := -DSWITCH=1 -U__linux__ -U__linux -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_DYNAMIC -DHAVE_REWIND ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_NEON -DHAVE_MATERIALUI -DHAVE_LIBRETRODB -DHAVE_CC_RESAMPLER DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA DEFINES += -DHAVE_RUNAHEAD -DHAVE_DYNAMIC - DEFINES += -DHAVE_CONFIGFILE + DEFINES += -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS else + HAVE_REWIND = 1 HAVE_AUDIOMIXER = 1 + HAVE_RWAV = 1 HAVE_CC_RESAMPLER = 1 HAVE_MENU_COMMON = 1 HAVE_RTGA = 1 @@ -24,6 +26,8 @@ else HAVE_RBMP = 1 HAVE_RGUI = 1 HAVE_ZLIB = 1 + HAVE_DSP_FILTER = 1 + HAVE_VIDEO_FILTER = 1 HAVE_BUILTINZLIB = 1 HAVE_LIBRETRODB = 1 HAVE_MATERIALUI = 0 # enable later? @@ -34,6 +38,8 @@ else HAVE_CONFIGFILE = 1 HAVE_RUNAHEAD = 1 HAVE_DYNAMIC = 1 + HAVE_PATCH = 1 + HAVE_CHEATS = 1 include Makefile.common CFLAGS += $(DEF_FLAGS) diff --git a/Makefile.vita b/Makefile.vita index fbb85cd20c..d4aa224d52 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -18,18 +18,22 @@ INCDIRS := ifeq ($(GRIFFIN_BUILD), 1) OBJ += griffin/griffin.o DEFINES += -DHAVE_GRIFFIN=1 - DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER + DEFINES += -DHAVE_REWIND + DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER ifeq ($(DEBUG), 1) DEFINES += -DHAVE_NETLOGGER endif INCDIRS += -I. -Ideps/7zip -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -Ideps/stb else - + HAVE_REWIND := 1 HAVE_UPDATE_ASSETS := 1 HAVE_ONLINE_UPDATER := 1 HAVE_NEON := 1 HAVE_MATH_NEON := 1 + HAVE_DSP_FILTER := 1 + HAVE_VIDEO_FILTER := 1 + HAVE_SCREENSHOTS := 1 HAVE_FILTERS_BUILTIN := 1 HAVE_LANGEXTRA := 1 HAVE_RPNG := 1 @@ -46,6 +50,8 @@ else HAVE_MENU_COMMON := 1 HAVE_GFX_WIDGETS := 1 HAVE_CONFIGFILE := 1 + HAVE_PATCH := 1 + HAVE_CHEATS := 1 HAVE_OVERLAY := 1 HAVE_VIDEO_LAYOUT := 0 HAVE_MATERIALUI := 1 @@ -61,6 +67,7 @@ else HAVE_STATIC_VIDEO_FILTERS = 1 HAVE_STATIC_AUDIO_FILTERS = 1 HAVE_AUDIOMIXER := 1 + HAVE_RWAV := 1 ifeq ($(DEBUG), 1) HAVE_NETLOGGER = 1 @@ -103,7 +110,9 @@ ASFLAGS := $(CFLAGS) LDFLAGS := -Wl,-q CFLAGS += -Wall -ffast-math -g -CFLAGS += -DRARCH_INTERNAL -DRARCH_CONSOLE +CFLAGS += -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DRARCH_CONSOLE +CFLAGS += -DHAVE_DSP_FILTER +CFLAGS += -DHAVE_VIDEO_FILTER CFLAGS += -DHAVE_FILTERS_BUILTIN $(DEFINES) ifneq ($(PC_DEVELOPMENT_IP_ADDRESS),) @@ -123,7 +132,7 @@ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions VITA_LIBS := -lSceDisplay_stub -lSceGxm_stub -lSceNet_stub -lSceNetCtl_stub -lSceAppUtil_stub \ -lSceSysmodule_stub -lSceCtrl_stub -lSceHid_stub -lSceTouch_stub -lSceAudio_stub \ -lScePower_stub -lSceRtc_stub -lSceCommonDialog_stub -lScePgf_stub -lSceMotion_stub \ - -lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lstdc++ -lpthread -lpng -lz + -lSceFiber_stub -lSceMotion_stub -lSceAppMgr_stub -lstdc++ -lpthread -lpng -lz -lSceShaccCg_stub LIBS := $(WHOLE_START) -lretro_vita $(WHOLE_END) $(VITA_LIBS) -lm -lc @@ -156,7 +165,13 @@ all: $(TARGETS) %.depend: ; -$(TARGET).elf: $(OBJ) libretro_vita.a +libSceShaccCg_stub.a: + mkdir -p deps/vitaShaRK/SceShaccCg + vita-libs-gen deps/vitaShaRK/SceShaccCg.yml deps/vitaShaRK/SceShaccCg + make -C deps/vitaShaRK/SceShaccCg ARCH=arm-vita-eabi + cp deps/vitaShaRK/SceShaccCg/libSceShaccCg_stub.a . + +$(TARGET).elf: $(OBJ) libretro_vita.a libSceShaccCg_stub.a $(LD) $(OBJ) $(LDFLAGS) $(LIBDIRS) $(LIBS) -o $@ %.velf: %.elf @@ -172,7 +187,8 @@ $(TARGET).elf: $(OBJ) libretro_vita.a vita-pack-vpk -s param.sfo -b $< $@ clean: - rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk + rm -f $(OBJ) $(TARGET).elf $(TARGET).elf.unstripped.elf $(TARGET).velf $(TARGET).self param.sfo $(TARGET).vpk libSceShaccCg_stub.a + rm -rf deps/vitaShaRK/SceShaccCg rm -f $(OBJ:.o=.depend) # Useful for developers diff --git a/Makefile.wiiu b/Makefile.wiiu index 9e39411c0a..4691d9cf72 100644 --- a/Makefile.wiiu +++ b/Makefile.wiiu @@ -74,6 +74,7 @@ ifeq ($(SALAMANDER_BUILD),1) # $(SALAMANDER_BUILD),0 else DEFINES += -DRARCH_INTERNAL + DEFINES += -DHAVE_SCREENSHOTS DEFINES += -DHAVE_KEYMAPPER DEFINES += -DHAVE_ONLINE_UPDATER DEFINES += -DHAVE_UPDATE_ASSETS @@ -108,7 +109,9 @@ endif INCDIRS += -Ideps/SPIRV-Cross DEFINES += -DHAVE_AUDIOMIXER - DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_RGUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_RWAV + DEFINES += -DHAVE_GRIFFIN=1 -DHAVE_MENU -DHAVE_GFX_WIDGETS -DHAVE_CONFIGFILE -DHAVE_PATCH -DHAVE_CHEATS -DHAVE_RGUI -DHAVE_LIBRETRODB + DEFINES += -DHAVE_REWIND DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DHAVE_CC_RESAMPLER DEFINES += -DHAVE_SPIRV_CROSS -DHAVE_SLANG DEFINES += -DHAVE_STB_FONT -DHAVE_STB_VORBIS -DHAVE_LANGEXTRA -DHAVE_LIBRETRODB -DHAVE_NETWORKING -DHAVE_NETPLAYDISCOVERY @@ -121,7 +124,9 @@ endif # $(GRIFFIN_BUILD),0 else + HAVE_SCREENSHOTS = 1 HAVE_AUDIOMIXER = 1 + HAVE_RWAV = 1 HAVE_MENU_COMMON = 1 HAVE_GFX_WIDGETS = 1 HAVE_RTGA = 1 @@ -129,6 +134,9 @@ endif HAVE_RJPEG = 1 HAVE_RBMP = 1 HAVE_CONFIGFILE = 1 + HAVE_PATCH = 1 + HAVE_REWIND = 1 + HAVE_CHEATS = 1 HAVE_MENU = 1 HAVE_RGUI = 1 HAVE_7ZIP = 1 @@ -149,6 +157,8 @@ endif HAVE_SPIRV_CROSS = 1 HAVE_SLANG = 1 HAVE_VIDEO_LAYOUT = 0 + HAVE_DSP_FILTER = 1 + HAVE_VIDEO_FILTER = 1 HAVE_STATIC_VIDEO_FILTERS = 1 HAVE_STATIC_AUDIO_FILTERS = 1 WANT_LIBFAT = 1 diff --git a/Makefile.win b/Makefile.win index b86dda3a92..21117a56c4 100644 --- a/Makefile.win +++ b/Makefile.win @@ -1,6 +1,8 @@ TARGET = retroarch.exe +HAVE_SCREENSHOTS = 1 HAVE_AUDIOMIXER = 1 +HAVE_RWAV = 1 HAVE_DINPUT = 1 HAVE_XAUDIO = 1 HAVE_DSOUND = 1 @@ -15,8 +17,13 @@ HAVE_COMMAND = 1 HAVE_THREADS = 1 HAVE_MENU = 1 HAVE_CONFIGFILE = 1 +HAVE_PATCH = 1 +HAVE_REWIND = 1 +HAVE_CHEATS = 1 HAVE_RGUI = 1 HAVE_MATERIALUI = 1 +HAVE_DSP_FILTER = 1 +HAVE_VIDEO_FILTER = 1 HAVE_7ZIP = 1 HAVE_PYTHON = 0 DYNAMIC = 1 @@ -96,7 +103,7 @@ OS := Win32 OBJ := LIBS := -lm DEFINES := -DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_OVERLAY +DEFINES += -I. -Ilibretro-common/include -Ilibretro-common/include/compat/zlib -DRARCH_INTERNAL -DHAVE_SCREENSHOTS -DHAVE_OVERLAY #DEFINES += -DHAVE_VIDEO_LAYOUT LDFLAGS := -L. -static-libgcc @@ -162,7 +169,7 @@ $(OBJDIR)/%.o: %.c .FORCE: -$(OBJDIR)/git_version.o: git_version.c .FORCE +$(OBJDIR)/version_git.o: version_git.c .FORCE @-mkdir -p $(dir $@) || mkdir $(subst /,\,$(dir $@)) || echo . @$(if $(Q), $(shell echo echo CC $<),) $(Q)$(CC) $(CFLAGS) $(DEFINES) -MMD -c -o $@ $< diff --git a/audio/audio_defines.h b/audio/audio_defines.h index 14693aa296..c9c1264f4d 100644 --- a/audio/audio_defines.h +++ b/audio/audio_defines.h @@ -30,7 +30,7 @@ RETRO_BEGIN_DECLS #define AUDIO_MIXER_MAX_STREAMS 16 -#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 4) +#define AUDIO_MIXER_MAX_SYSTEM_STREAMS (AUDIO_MIXER_MAX_STREAMS + 5) /* do not define more than (MAX_SYSTEM_STREAMS - MAX_STREAMS) */ enum audio_mixer_system_slot @@ -38,7 +38,8 @@ enum audio_mixer_system_slot AUDIO_MIXER_SYSTEM_SLOT_OK = AUDIO_MIXER_MAX_STREAMS, AUDIO_MIXER_SYSTEM_SLOT_CANCEL, AUDIO_MIXER_SYSTEM_SLOT_NOTICE, - AUDIO_MIXER_SYSTEM_SLOT_BGM + AUDIO_MIXER_SYSTEM_SLOT_BGM, + AUDIO_MIXER_SYSTEM_SLOT_ACHIEVEMENT_UNLOCK }; enum audio_action diff --git a/audio/drivers/alsathread.c b/audio/drivers/alsathread.c index c58dcc0515..339803fd49 100644 --- a/audio/drivers/alsathread.c +++ b/audio/drivers/alsathread.c @@ -66,7 +66,7 @@ static void alsa_worker_thread(void *data) size_t fifo_size; snd_pcm_sframes_t frames; slock_lock(alsa->fifo_lock); - avail = fifo_read_avail(alsa->buffer); + avail = FIFO_READ_AVAIL(alsa->buffer); fifo_size = MIN(alsa->period_size, avail); fifo_read(alsa->buffer, buf, fifo_size); scond_signal(alsa->cond); @@ -256,7 +256,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size) size_t write_amt; slock_lock(alsa->fifo_lock); - avail = fifo_write_avail(alsa->buffer); + avail = FIFO_WRITE_AVAIL(alsa->buffer); write_amt = MIN(avail, size); fifo_write(alsa->buffer, buf, write_amt); @@ -271,7 +271,7 @@ static ssize_t alsa_thread_write(void *data, const void *buf, size_t size) { size_t avail; slock_lock(alsa->fifo_lock); - avail = fifo_write_avail(alsa->buffer); + avail = FIFO_WRITE_AVAIL(alsa->buffer); if (avail == 0) { @@ -334,7 +334,7 @@ static size_t alsa_thread_write_avail(void *data) if (alsa->thread_dead) return 0; slock_lock(alsa->fifo_lock); - val = fifo_write_avail(alsa->buffer); + val = FIFO_WRITE_AVAIL(alsa->buffer); slock_unlock(alsa->fifo_lock); return val; } diff --git a/audio/drivers/coreaudio.c b/audio/drivers/coreaudio.c index 32cf09abda..6354fcb6df 100644 --- a/audio/drivers/coreaudio.c +++ b/audio/drivers/coreaudio.c @@ -103,7 +103,7 @@ static OSStatus audio_write_cb(void *userdata, slock_lock(dev->lock); - if (fifo_read_avail(dev->buffer) < write_avail) + if (FIFO_READ_AVAIL(dev->buffer) < write_avail) { *action_flags = kAudioUnitRenderAction_OutputIsSilence; @@ -356,14 +356,14 @@ static ssize_t coreaudio_write(void *data, const void *buf_, size_t size) slock_lock(dev->lock); - write_avail = fifo_write_avail(dev->buffer); + write_avail = FIFO_WRITE_AVAIL(dev->buffer); if (write_avail > size) write_avail = size; fifo_write(dev->buffer, buf, write_avail); - buf += write_avail; + buf += write_avail; written += write_avail; - size -= write_avail; + size -= write_avail; if (dev->nonblock) { @@ -430,7 +430,7 @@ static size_t coreaudio_write_avail(void *data) coreaudio_t *dev = (coreaudio_t*)data; slock_lock(dev->lock); - avail = fifo_write_avail(dev->buffer); + avail = FIFO_WRITE_AVAIL(dev->buffer); slock_unlock(dev->lock); return avail; diff --git a/audio/drivers/dsound.c b/audio/drivers/dsound.c index 00176873f7..9bca87a9d2 100644 --- a/audio/drivers/dsound.c +++ b/audio/drivers/dsound.c @@ -155,7 +155,7 @@ static DWORD CALLBACK dsound_thread(PVOID data) avail = write_avail(read_ptr, write_ptr, ds->buffer_size); EnterCriticalSection(&ds->crit); - fifo_avail = fifo_read_avail(ds->buffer); + fifo_avail = FIFO_READ_AVAIL(ds->buffer); LeaveCriticalSection(&ds->crit); if (avail < CHUNK_SIZE || ((fifo_avail < CHUNK_SIZE) && (avail < ds->buffer_size / 2))) @@ -511,7 +511,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size) size_t avail; EnterCriticalSection(&ds->crit); - avail = fifo_write_avail(ds->buffer); + avail = FIFO_WRITE_AVAIL(ds->buffer); if (avail > size) avail = size; @@ -530,7 +530,7 @@ static ssize_t dsound_write(void *data, const void *buf_, size_t size) size_t avail; EnterCriticalSection(&ds->crit); - avail = fifo_write_avail(ds->buffer); + avail = FIFO_WRITE_AVAIL(ds->buffer); if (avail > size) avail = size; @@ -558,7 +558,7 @@ static size_t dsound_write_avail(void *data) dsound_t *ds = (dsound_t*)data; EnterCriticalSection(&ds->crit); - avail = fifo_write_avail(ds->buffer); + avail = FIFO_WRITE_AVAIL(ds->buffer); LeaveCriticalSection(&ds->crit); return avail; } diff --git a/audio/drivers/gx_audio.c b/audio/drivers/gx_audio.c index f4f2be0ca8..29679fd986 100644 --- a/audio/drivers/gx_audio.c +++ b/audio/drivers/gx_audio.c @@ -109,7 +109,7 @@ static INLINE void copy_swapped(uint32_t * restrict dst, { uint32_t s = *src++; *dst++ = (s >> 16) | (s << 16); - }while(--size); + } while (--size); } static ssize_t gx_audio_write(void *data, const void *buf_, size_t size) diff --git a/audio/drivers/opensl.c b/audio/drivers/opensl.c index fac2335fc7..4d02b15d14 100644 --- a/audio/drivers/opensl.c +++ b/audio/drivers/opensl.c @@ -67,7 +67,7 @@ static void opensl_callback(SLAndroidSimpleBufferQueueItf bq, void *ctx) #define GOTO_IF_FAIL(x) do { \ if ((res = (x)) != SL_RESULT_SUCCESS) \ goto error; \ -} while(0) +} while (0) static void sl_free(void *data) { diff --git a/audio/drivers/ps3_audio.c b/audio/drivers/ps3_audio.c index 958374a8fd..d8ffa73805 100644 --- a/audio/drivers/ps3_audio.c +++ b/audio/drivers/ps3_audio.c @@ -61,7 +61,7 @@ static void event_loop(uint64_t data) sys_event_queue_receive(id, &event, SYS_NO_TIMEOUT); sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT); - if (fifo_read_avail(aud->buffer) >= sizeof(out_tmp)) + if (FIFO_READ_AVAIL(aud->buffer) >= sizeof(out_tmp)) fifo_read(aud->buffer, out_tmp, sizeof(out_tmp)); else memset(out_tmp, 0, sizeof(out_tmp)); @@ -152,11 +152,11 @@ static ssize_t ps3_audio_write(void *data, const void *buf, size_t size) if (aud->nonblock) { - if (fifo_write_avail(aud->buffer) < size) + if (FIFO_WRITE_AVAIL(aud->buffer) < size) return 0; } - while (fifo_write_avail(aud->buffer) < size) + while (FIFO_WRITE_AVAIL(aud->buffer) < size) sys_lwcond_wait(&aud->cond, 0); sys_lwmutex_lock(&aud->lock, SYS_NO_TIMEOUT); diff --git a/audio/drivers/rsound.c b/audio/drivers/rsound.c index c017ae44e9..b5d10ebf99 100644 --- a/audio/drivers/rsound.c +++ b/audio/drivers/rsound.c @@ -39,9 +39,8 @@ typedef struct rsd static ssize_t rsound_audio_cb(void *data, size_t bytes, void *userdata) { - rsd_t *rsd = (rsd_t*)userdata; - - size_t avail = fifo_read_avail(rsd->buffer); + rsd_t *rsd = (rsd_t*)userdata; + size_t avail = FIFO_READ_AVAIL(rsd->buffer); size_t write_size = bytes > avail ? avail : bytes; fifo_read(rsd->buffer, data, write_size); scond_signal(rsd->cond); @@ -115,7 +114,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size) rsd_callback_lock(rsd->rd); - avail = fifo_write_avail(rsd->buffer); + avail = FIFO_WRITE_AVAIL(rsd->buffer); write_amt = avail > size ? size : avail; fifo_write(rsd->buffer, buf, write_amt); @@ -130,7 +129,7 @@ static ssize_t rs_write(void *data, const void *buf, size_t size) size_t avail; rsd_callback_lock(rsd->rd); - avail = fifo_write_avail(rsd->buffer); + avail = FIFO_WRITE_AVAIL(rsd->buffer); if (avail == 0) { @@ -209,7 +208,7 @@ static size_t rs_write_avail(void *data) if (rsd->has_error) return 0; rsd_callback_lock(rsd->rd); - val = fifo_write_avail(rsd->buffer); + val = FIFO_WRITE_AVAIL(rsd->buffer); rsd_callback_unlock(rsd->rd); return val; } diff --git a/audio/drivers/sdl_audio.c b/audio/drivers/sdl_audio.c index 5726bd7371..5f03253eac 100644 --- a/audio/drivers/sdl_audio.c +++ b/audio/drivers/sdl_audio.c @@ -46,7 +46,7 @@ typedef struct sdl_audio static void sdl_audio_cb(void *data, Uint8 *stream, int len) { sdl_audio_t *sdl = (sdl_audio_t*)data; - size_t avail = fifo_read_avail(sdl->buffer); + size_t avail = FIFO_READ_AVAIL(sdl->buffer); size_t write_size = len > (int)avail ? avail : len; fifo_read(sdl->buffer, stream, write_size); @@ -151,7 +151,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size) size_t avail, write_amt; SDL_LockAudio(); - avail = fifo_write_avail(sdl->buffer); + avail = FIFO_WRITE_AVAIL(sdl->buffer); write_amt = avail > size ? size : avail; fifo_write(sdl->buffer, buf, write_amt); SDL_UnlockAudio(); @@ -166,7 +166,7 @@ static ssize_t sdl_audio_write(void *data, const void *buf, size_t size) size_t avail; SDL_LockAudio(); - avail = fifo_write_avail(sdl->buffer); + avail = FIFO_WRITE_AVAIL(sdl->buffer); if (avail == 0) { diff --git a/audio/drivers/switch_libnx_audren_audio.c b/audio/drivers/switch_libnx_audren_audio.c index 0820e68001..144c6b6b4b 100644 --- a/audio/drivers/switch_libnx_audren_audio.c +++ b/audio/drivers/switch_libnx_audren_audio.c @@ -241,7 +241,7 @@ static ssize_t libnx_audren_audio_write(void *data, if (aud->nonblock) { - while(written < size) + while (written < size) { written += libnx_audren_audio_append( aud, buf + written, size - written); @@ -251,7 +251,7 @@ static ssize_t libnx_audren_audio_write(void *data, } else { - while(written < size) + while (written < size) { written += libnx_audren_audio_append( aud, buf + written, size - written); diff --git a/audio/drivers/switch_libnx_audren_thread_audio.c b/audio/drivers/switch_libnx_audren_thread_audio.c index c44f18aab4..d6ae246962 100644 --- a/audio/drivers/switch_libnx_audren_thread_audio.c +++ b/audio/drivers/switch_libnx_audren_thread_audio.c @@ -96,7 +96,7 @@ static void thread_job(void* data) if (current_wavebuf) { mutexLock(&aud->fifo_lock); - available = aud->paused ? 0 : fifo_read_avail(aud->fifo); + available = aud->paused ? 0 : FIFO_READ_AVAIL(aud->fifo); written_tmp = MIN(available, aud->buffer_size - current_size); dstbuf = current_pool_ptr + current_size; if (written_tmp > 0) @@ -295,7 +295,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data, if (aud->nonblock) { mutexLock(&aud->fifo_lock); - available = fifo_write_avail(aud->fifo); + available = FIFO_WRITE_AVAIL(aud->fifo); written = MIN(available, size); if (written > 0) fifo_write(aud->fifo, buf, written); @@ -307,7 +307,7 @@ static ssize_t libnx_audren_thread_audio_write(void *data, while (written < size && aud->running) { mutexLock(&aud->fifo_lock); - available = fifo_write_avail(aud->fifo); + available = FIFO_WRITE_AVAIL(aud->fifo); if (available) { written_tmp = MIN(size - written, available); @@ -407,7 +407,7 @@ static size_t libnx_audren_thread_audio_write_avail(void *data) return 0; mutexLock(&aud->fifo_lock); - available = fifo_write_avail(aud->fifo); + available = FIFO_WRITE_AVAIL(aud->fifo); mutexUnlock(&aud->fifo_lock); return available; diff --git a/audio/drivers/switch_thread_audio.c b/audio/drivers/switch_thread_audio.c index 5ccc455921..d206683e0f 100644 --- a/audio/drivers/switch_thread_audio.c +++ b/audio/drivers/switch_thread_audio.c @@ -107,7 +107,7 @@ static void mainLoop(void* data) compat_mutex_lock(&swa->fifoLock); - avail = fifo_read_avail(swa->fifo); + avail = FIFO_READ_AVAIL(swa->fifo); to_write = MIN(avail, buf_avail); if (to_write > 0) { @@ -349,7 +349,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz if (swa->nonblock) { compat_mutex_lock(&swa->fifoLock); - avail = fifo_write_avail(swa->fifo); + avail = FIFO_WRITE_AVAIL(swa->fifo); written = MIN(avail, size); if (written > 0) fifo_write(swa->fifo, buf, written); @@ -361,7 +361,7 @@ static ssize_t switch_thread_audio_write(void *data, const void *buf, size_t siz while (written < size && swa->running) { compat_mutex_lock(&swa->fifoLock); - avail = fifo_write_avail(swa->fifo); + avail = FIFO_WRITE_AVAIL(swa->fifo); if (avail == 0) { compat_mutex_unlock(&swa->fifoLock); @@ -413,7 +413,7 @@ static size_t switch_thread_audio_write_avail(void *data) switch_thread_audio_t* swa = (switch_thread_audio_t*)data; compat_mutex_lock(&swa->fifoLock); - val = fifo_write_avail(swa->fifo); + val = FIFO_WRITE_AVAIL(swa->fifo); compat_mutex_unlock(&swa->fifoLock); return val; diff --git a/audio/drivers/wasapi.c b/audio/drivers/wasapi.c index 63ffe8a925..2a5fb52ccb 100644 --- a/audio/drivers/wasapi.c +++ b/audio/drivers/wasapi.c @@ -632,7 +632,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz { ssize_t written = -1; UINT32 padding = 0; - size_t write_avail = fifo_write_avail(w->buffer); + size_t write_avail = FIFO_WRITE_AVAIL(w->buffer); if (!write_avail) { @@ -643,7 +643,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding))) return -1; - read_avail = fifo_read_avail(w->buffer); + read_avail = FIFO_READ_AVAIL(w->buffer); write_avail = w->engine_buffer_size - padding * w->frame_size; written = read_avail < write_avail ? read_avail : write_avail; if (written) @@ -651,7 +651,7 @@ static ssize_t wasapi_write_sh_buffer(wasapi_t *w, const void * data, size_t siz return -1; } - write_avail = fifo_write_avail(w->buffer); + write_avail = FIFO_WRITE_AVAIL(w->buffer); written = size < write_avail ? size : write_avail; if (written) fifo_write(w->buffer, data, written); @@ -685,20 +685,20 @@ static ssize_t wasapi_write_sh(wasapi_t *w, const void * data, size_t size) static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t size) { - size_t write_avail = 0; - ssize_t written = -1; - UINT32 padding = 0; + size_t write_avail = 0; + ssize_t written = -1; + UINT32 padding = 0; if (w->buffer) { - write_avail = fifo_write_avail(w->buffer); + write_avail = FIFO_WRITE_AVAIL(w->buffer); if (!write_avail) { size_t read_avail = 0; if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding))) return -1; - read_avail = fifo_read_avail(w->buffer); + read_avail = FIFO_READ_AVAIL(w->buffer); write_avail = w->engine_buffer_size - padding * w->frame_size; written = read_avail < write_avail ? read_avail : write_avail; if (written) @@ -706,7 +706,7 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s return -1; } - write_avail = fifo_write_avail(w->buffer); + write_avail = FIFO_WRITE_AVAIL(w->buffer); written = size < write_avail ? size : write_avail; if (written) fifo_write(w->buffer, data, written); @@ -731,7 +731,7 @@ static ssize_t wasapi_write_sh_nonblock(wasapi_t *w, const void * data, size_t s static ssize_t wasapi_write_ex(wasapi_t *w, const void * data, size_t size, DWORD ms) { ssize_t written = 0; - size_t write_avail = fifo_write_avail(w->buffer); + size_t write_avail = FIFO_WRITE_AVAIL(w->buffer); if (!write_avail) { @@ -890,7 +890,7 @@ static size_t wasapi_write_avail(void *wh) UINT32 padding = 0; if (w->buffer) - return fifo_write_avail(w->buffer); + return FIFO_WRITE_AVAIL(w->buffer); if (FAILED(_IAudioClient_GetCurrentPadding(w->client, &padding))) return 0; diff --git a/audio/drivers/wiiu_audio.c b/audio/drivers/wiiu_audio.c index 6d4339f2f8..62a868ae32 100644 --- a/audio/drivers/wiiu_audio.c +++ b/audio/drivers/wiiu_audio.c @@ -219,7 +219,7 @@ static ssize_t ax_audio_write(void* data, const void* buf, size_t size) else if (count_avail < count) { /* Sync, wait for free memory */ - while(AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count)) + while (AXIsMultiVoiceRunning(ax->mvoice) && (count_avail < count)) { OSYieldThread(); /* Gives threads with same priority time to run */ count_avail = (ax->written > AX_AUDIO_MAX_FREE ? 0 : (AX_AUDIO_MAX_FREE - ax->written)); diff --git a/audio/librsound.c b/audio/librsound.c index 1f813e6651..fb23914180 100644 --- a/audio/librsound.c +++ b/audio/librsound.c @@ -765,13 +765,13 @@ static void rsnd_drain(rsound_t *rd) delta /= 1000000; /* Calculates the amount of data we have in our virtual buffer. Only used to calculate delay. */ slock_lock(rd->thread.mutex); - rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)fifo_read_avail(rd->fifo_buffer) - delta); + rd->bytes_in_buffer = (int)((int64_t)rd->total_written + (int64_t)FIFO_READ_AVAIL(rd->fifo_buffer) - delta); slock_unlock(rd->thread.mutex); } else { slock_lock(rd->thread.mutex); - rd->bytes_in_buffer = fifo_read_avail(rd->fifo_buffer); + rd->bytes_in_buffer = FIFO_READ_AVAIL(rd->fifo_buffer); slock_unlock(rd->thread.mutex); } } @@ -789,7 +789,7 @@ static size_t rsnd_fill_buffer(rsound_t *rd, const char *buf, size_t size) return 0; slock_lock(rd->thread.mutex); - if ( fifo_write_avail(rd->fifo_buffer) >= size ) + if (FIFO_WRITE_AVAIL(rd->fifo_buffer) >= size) { slock_unlock(rd->thread.mutex); break; @@ -886,7 +886,7 @@ static size_t rsnd_get_ptr(rsound_t *rd) { int ptr; slock_lock(rd->thread.mutex); - ptr = fifo_read_avail(rd->fifo_buffer); + ptr = FIFO_READ_AVAIL(rd->fifo_buffer); slock_unlock(rd->thread.mutex); return ptr; @@ -1060,7 +1060,7 @@ static int rsnd_update_server_info(rsound_t *rd) int delay = rsd_delay(rd); int delta = (int)(client_ptr - serv_ptr); slock_lock(rd->thread.mutex); - delta += fifo_read_avail(rd->fifo_buffer); + delta += FIFO_READ_AVAIL(rd->fifo_buffer); slock_unlock(rd->thread.mutex); RSD_DEBUG("[RSound] Delay: %d, Delta: %d.\n", delay, delta); @@ -1116,7 +1116,7 @@ static void rsnd_thread ( void * thread_data ) /* If the buffer is empty or we've stopped the stream, jump out of this for loop */ slock_lock(rd->thread.mutex); - if ( fifo_read_avail(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active ) + if (FIFO_READ_AVAIL(rd->fifo_buffer) < rd->backend_info.chunk_size || !rd->thread_active) { slock_unlock(rd->thread.mutex); break; @@ -1382,11 +1382,10 @@ int rsd_exec(rsound_t *rsound) fcntl(rsound->conn.socket, F_SETFL, O_NONBLOCK); #endif - // Flush the buffer - - if ( fifo_read_avail(rsound->fifo_buffer) > 0 ) + /* Flush the buffer */ + if (FIFO_READ_AVAIL(rsound->fifo_buffer) > 0 ) { - char buffer[fifo_read_avail(rsound->fifo_buffer)]; + char buffer[FIFO_READ_AVAIL(rsound->fifo_buffer)]; fifo_read(rsound->fifo_buffer, buffer, sizeof(buffer)); if ( rsnd_send_chunk(fd, buffer, sizeof(buffer), 1) != (ssize_t)sizeof(buffer) ) { diff --git a/bluetooth/bluetooth_driver.h b/bluetooth/bluetooth_driver.h new file mode 100644 index 0000000000..404dec082b --- /dev/null +++ b/bluetooth/bluetooth_driver.h @@ -0,0 +1,78 @@ +/* RetroArch - A frontend for libretro. + * + * 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 . + */ + +#ifndef __BLUETOOTH_DRIVER__H +#define __BLUETOOTH_DRIVER__H + +#include + +#include +#include +#include + +RETRO_BEGIN_DECLS + +enum rarch_bluetooth_ctl_state +{ + RARCH_BLUETOOTH_CTL_NONE = 0, + RARCH_BLUETOOTH_CTL_DESTROY, + RARCH_BLUETOOTH_CTL_DEINIT, + RARCH_BLUETOOTH_CTL_FIND_DRIVER, + RARCH_BLUETOOTH_CTL_INIT +}; + +typedef struct bluetooth_driver +{ + void *(*init)(void); + + void (*free)(void *data); + + void (*scan)(void *data); + void (*get_devices)(void *data, struct string_list *list); + bool (*device_is_connected)(void *data, unsigned i); + void (*device_get_sublabel)(void *data, char *s, unsigned i, size_t len); + bool (*connect_device)(void *data, unsigned i); + + const char *ident; +} bluetooth_driver_t; + +extern bluetooth_driver_t bluetooth_bluetoothctl; +extern bluetooth_driver_t bluetooth_bluez; + +/** + * config_get_bluetooth_driver_options: + * + * Get an enumerated list of all bluetooth driver names, + * separated by '|'. + * + * Returns: string listing of all bluetooth driver names, + * separated by '|'. + **/ +const char* config_get_bluetooth_driver_options(void); + +void driver_bluetooth_scan(void); + +void driver_bluetooth_get_devices(struct string_list *list); + +bool driver_bluetooth_device_is_connected(unsigned i); + +void driver_bluetooth_device_get_sublabel(char *s, unsigned i, size_t len); + +bool driver_bluetooth_connect_device(unsigned i); + +bool bluetooth_driver_ctl(enum rarch_bluetooth_ctl_state state, void *data); + +RETRO_END_DECLS + +#endif diff --git a/bluetooth/drivers/bluetoothctl.c b/bluetooth/drivers/bluetoothctl.c new file mode 100644 index 0000000000..6741931454 --- /dev/null +++ b/bluetooth/drivers/bluetoothctl.c @@ -0,0 +1,215 @@ +/* RetroArch - A frontend for libretro. + * + * 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 . + */ + +#include +#include + +#include "../bluetooth_driver.h" +#include "../../retroarch.h" + +typedef struct +{ + bool bluetoothctl_cache[256]; + unsigned bluetoothctl_counter[256]; + struct string_list* lines; + char command[256]; +} bluetoothctl_t; + +static void *bluetoothctl_init(void) +{ + return calloc(1, sizeof(bluetoothctl_t)); +} + +static void bluetoothctl_free(void *data) +{ + if (data) + free(data); +} + +static void bluetoothctl_scan(void *data) +{ + char line[512]; + union string_list_elem_attr attr; + FILE *dev_file = NULL; + bluetoothctl_t *btctl = (bluetoothctl_t*) data; + + attr.i = 0; + if (btctl->lines) + free(btctl->lines); + btctl->lines = string_list_new(); + + pclose(popen("bluetoothctl -- power on", "r")); + + pclose(popen("bluetoothctl --timeout 10 scan on", "r")); + + runloop_msg_queue_push(msg_hash_to_str(MSG_BLUETOOTH_SCAN_COMPLETE), + 1, 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, + MESSAGE_QUEUE_CATEGORY_INFO); + + dev_file = popen("bluetoothctl -- devices", "r"); + + while (fgets(line, 512, dev_file)) + { + size_t len = strlen(line); + if (len > 0 && line[len-1] == '\n') + line[--len] = '\0'; + + string_list_append(btctl->lines, line, attr); + } + + pclose(dev_file); +} + +static void bluetoothctl_get_devices(void *data, struct string_list* devices) +{ + unsigned i; + union string_list_elem_attr attr; + bluetoothctl_t *btctl = (bluetoothctl_t*) data; + + attr.i = 0; + + if (!btctl->lines) + return; + + for (i = 0; i < btctl->lines->size; i++) + { + char device[64]; + const char *line = btctl->lines->elems[i].data; + + /* bluetoothctl devices outputs lines of the format: + * $ bluetoothctl devices + * 'Device (mac address) (device name)' + */ + strlcpy(device, line+24, sizeof(device)); + string_list_append(devices, device, attr); + } +} + +static bool bluetoothctl_device_is_connected(void *data, unsigned i) +{ + bluetoothctl_t *btctl = (bluetoothctl_t*) data; + char ln[512] = {0}; + char device[18] = {0}; + const char *line = btctl->lines->elems[i].data; + FILE *command_file = NULL; + + if (btctl->bluetoothctl_counter[i] == 60) + { + static struct string_list* list = NULL; + btctl->bluetoothctl_counter[i] = 0; + list = string_split(line, " "); + if (!list) + return false; + + if (list->size == 0) + { + string_list_free(list); + return false; + } + + strlcpy(device, list->elems[1].data, sizeof(device)); + string_list_free(list); + + snprintf(btctl->command, sizeof(btctl->command), "\ + bluetoothctl -- info %s | grep 'Connected: yes'", + device); + + command_file = popen(btctl->command, "r"); + + while (fgets(ln, 512, command_file)) + { + btctl->bluetoothctl_cache[i] = true; + return true; + } + pclose(command_file); + btctl->bluetoothctl_cache[i] = false; + } + else + { + btctl->bluetoothctl_counter[i]++; + return btctl->bluetoothctl_cache[i]; + } + + return false; +} + +static bool bluetoothctl_connect_device(void *data, unsigned idx) +{ + unsigned i; + bluetoothctl_t *btctl = (bluetoothctl_t*) data; + char device[18] = {0}; + const char *line = btctl->lines->elems[idx].data; + static struct string_list* list = NULL; + + /* bluetoothctl devices outputs lines of the format: + * $ bluetoothctl devices + * 'Device (mac address) (device name)' + */ + list = string_split(line, " "); + if (!list) + return false; + + if (list->size == 0) + { + string_list_free(list); + return false; + } + + strlcpy(device, list->elems[1].data, sizeof(device)); + string_list_free(list); + + snprintf(btctl->command, sizeof(btctl->command), "\ + bluetoothctl -- trust %s", + device); + + pclose(popen(btctl->command, "r")); + + snprintf(btctl->command, sizeof(btctl->command), "\ + bluetoothctl -- pair %s", + device); + + pclose(popen(btctl->command, "r")); + + snprintf(btctl->command, sizeof(btctl->command), "\ + bluetoothctl -- connect %s", + device); + + pclose(popen(btctl->command, "r")); + + btctl->bluetoothctl_counter[idx] = 0; + return true; +} + +static void bluetoothctl_device_get_sublabel( + void *data, char *s, unsigned i, size_t len) +{ + bluetoothctl_t *btctl = (bluetoothctl_t*) data; + /* bluetoothctl devices outputs lines of the format: + * $ bluetoothctl devices + * 'Device (mac address) (device name)' + */ + const char *line = btctl->lines->elems[i].data; + strlcpy(s, line+7, 18); +} + +bluetooth_driver_t bluetooth_bluetoothctl = { + bluetoothctl_init, + bluetoothctl_free, + bluetoothctl_scan, + bluetoothctl_get_devices, + bluetoothctl_device_is_connected, + bluetoothctl_device_get_sublabel, + bluetoothctl_connect_device, + "bluetoothctl", +}; diff --git a/bluetooth/drivers/bluez.c b/bluetooth/drivers/bluez.c new file mode 100644 index 0000000000..82239c319d --- /dev/null +++ b/bluetooth/drivers/bluez.c @@ -0,0 +1,616 @@ +/* RetroArch - A frontend for libretro. + * + * 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 . + */ + +#include +#include +#include +#include +#include + +#include "../bluetooth_driver.h" +#include "../../retroarch.h" + +typedef struct +{ + /* object path. usually looks like /org/bluez/hci0/dev_AA_BB_CC_DD_EE_FF + * technically unlimited, but should be enough */ + char path[128]; + + /* for display purposes 64 bytes should be enough */ + char name[64]; + + /* MAC address, 17 bytes */ + char address[18]; + + /* freedesktop.org icon name + * See bluez/src/dbus-common.c + * Can be NULL */ + char icon[64]; + + int connected; + int paired; + int trusted; +} device_info_t; + +#define VECTOR_LIST_TYPE device_info_t +#define VECTOR_LIST_NAME device_info +#include "../../libretro-common/lists/vector_list.c" +#undef VECTOR_LIST_TYPE +#undef VECTOR_LIST_NAME + +typedef struct +{ + struct device_info_vector_list *devices; + char adapter[256]; + DBusConnection* dbus_connection; + bool bluez_cache[256]; + int bluez_cache_counter[256]; +} bluez_t; + +static void *bluez_init (void) +{ + return calloc(1, sizeof(bluez_t)); +} + +static void bluez_free (void *data) +{ + if (data) + free(data); +} + +static int +set_bool_property ( + bluez_t *bluez, + const char *path, + const char *arg_adapter, + const char *arg_property, + int value) +{ + DBusError err; + DBusMessage *message, *reply; + DBusMessageIter req_iter, req_subiter; + + dbus_error_init(&err); + + message = dbus_message_new_method_call( + "org.bluez", + path, + "org.freedesktop.DBus.Properties", + "Set" + ); + if (!message) + return 1; + + dbus_message_iter_init_append(message, &req_iter); + if (!dbus_message_iter_append_basic( + &req_iter, DBUS_TYPE_STRING, &arg_adapter)) + goto fault; + if (!dbus_message_iter_append_basic( + &req_iter, DBUS_TYPE_STRING, &arg_property)) + goto fault; + if (!dbus_message_iter_open_container( + &req_iter, DBUS_TYPE_VARIANT, + DBUS_TYPE_BOOLEAN_AS_STRING, &req_subiter)) + goto fault; + if (!dbus_message_iter_append_basic( + &req_subiter, DBUS_TYPE_BOOLEAN, &value)) + goto fault; + if (!dbus_message_iter_close_container( + &req_iter, &req_subiter)) + goto fault; + + reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection, + message, 1000, &err); + if (!reply) + goto fault; + dbus_message_unref(reply); + dbus_message_unref(message); + return 0; + +fault: + dbus_message_iter_abandon_container_if_open(&req_iter, &req_subiter); + dbus_message_unref(message); + return 1; +} + +static int get_bool_property( + bluez_t *bluez, + const char *path, + const char *arg_adapter, + const char *arg_property, + int *value) +{ + DBusMessage *message, *reply; + DBusError err; + DBusMessageIter root_iter, variant_iter; + + dbus_error_init(&err); + + message = dbus_message_new_method_call( "org.bluez", path, + "org.freedesktop.DBus.Properties", "Get"); + if (!message) + return 1; + + if (!dbus_message_append_args(message, + DBUS_TYPE_STRING, &arg_adapter, + DBUS_TYPE_STRING, &arg_property, + DBUS_TYPE_INVALID)) + return 1; + + reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection, + message, 1000, &err); + + dbus_message_unref(message); + + if (!reply) + return 1; + + if (!dbus_message_iter_init(reply, &root_iter)) + return 1; + + if (DBUS_TYPE_VARIANT != dbus_message_iter_get_arg_type(&root_iter)) + return 1; + + dbus_message_iter_recurse(&root_iter, &variant_iter); + dbus_message_iter_get_basic(&variant_iter, value); + + dbus_message_unref(reply); + return 0; +} + +static int adapter_discovery (bluez_t *bluez, const char *method) +{ + DBusMessage *message = dbus_message_new_method_call( + "org.bluez", bluez->adapter, + "org.bluez.Adapter1", method); + if (!message) + return 1; + + if (!dbus_connection_send(bluez->dbus_connection, message, NULL)) + return 1; + + dbus_connection_flush(bluez->dbus_connection); + dbus_message_unref(message); + + return 0; +} + +static int get_managed_objects (bluez_t *bluez, DBusMessage **reply) +{ + DBusMessage *message; + DBusError err; + + dbus_error_init(&err); + + message = dbus_message_new_method_call("org.bluez", "/", + "org.freedesktop.DBus.ObjectManager", "GetManagedObjects"); + if (!message) + return 1; + + *reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection, + message, -1, &err); + /* if (!reply) is done by the caller in this one */ + + dbus_message_unref(message); + return 0; +} + +static int device_method (bluez_t *bluez, const char *path, const char *method) +{ + DBusMessage *message, *reply; + DBusError err; + + dbus_error_init(&err); + + message = dbus_message_new_method_call( "org.bluez", path, + "org.bluez.Device1", method); + if (!message) + return 1; + + reply = dbus_connection_send_with_reply_and_block(bluez->dbus_connection, + message, 10000, &err); + if (!reply) + return 1; + + dbus_connection_flush(bluez->dbus_connection); + dbus_message_unref(message); + + return 0; +} + +static int get_default_adapter(bluez_t *bluez, DBusMessage *reply) +{ + /* "...an application would discover the available adapters by + * performing a ObjectManager.GetManagedObjects call and look for any + * returned objects with an “org.bluez.Adapter1″ interface. + * The concept of a default adapter was always a bit fuzzy and the + * value could’t be changed, so if applications need something like it + * they could e.g. just pick the first adapter they encounter in the + * GetManagedObjects reply." + * -- http://www.bluez.org/bluez-5-api-introduction-and-porting-guide/ + */ + + DBusMessageIter root_iter; + DBusMessageIter dict_1_iter, dict_2_iter; + DBusMessageIter array_1_iter, array_2_iter; + + char *obj_path, *interface_name; + + /* a{oa{sa{sv}}} */ + if (!dbus_message_iter_init(reply, &root_iter)) + return 1; + + /* a */ + if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter)) + return 1; + dbus_message_iter_recurse(&root_iter, &array_1_iter); + do + { + /* a{...} */ + if (DBUS_TYPE_DICT_ENTRY != dbus_message_iter_get_arg_type(&array_1_iter)) + return 1; + dbus_message_iter_recurse(&array_1_iter, &dict_1_iter); + + /* a{o...} */ + if (DBUS_TYPE_OBJECT_PATH != dbus_message_iter_get_arg_type(&dict_1_iter)) + return 1; + dbus_message_iter_get_basic(&dict_1_iter, &obj_path); + + if (!dbus_message_iter_next(&dict_1_iter)) + return 1; + /* a{oa} */ + if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_1_iter)) + return 1; + dbus_message_iter_recurse(&dict_1_iter, &array_2_iter); + do + { + /* empty array? */ + if (DBUS_TYPE_INVALID == + dbus_message_iter_get_arg_type(&array_2_iter)) + continue; + + /* a{oa{...}} */ + if (DBUS_TYPE_DICT_ENTRY != + dbus_message_iter_get_arg_type(&array_2_iter)) + return 1; + dbus_message_iter_recurse(&array_2_iter, &dict_2_iter); + + /* a{oa{s...}} */ + if (DBUS_TYPE_STRING != + dbus_message_iter_get_arg_type(&dict_2_iter)) + return 1; + dbus_message_iter_get_basic(&dict_2_iter, &interface_name); + + if (string_is_equal(interface_name, "org.bluez.Adapter1")) + { + strlcpy(bluez->adapter, obj_path, 256); + return 0; + } + } while (dbus_message_iter_next(&array_2_iter)); + } while (dbus_message_iter_next(&array_1_iter)); + + /* Couldn't find an adapter */ + return 1; +} + +static int read_scanned_devices (bluez_t *bluez, DBusMessage *reply) +{ + device_info_t device; + DBusMessageIter root_iter; + DBusMessageIter dict_1_iter, dict_2_iter, dict_3_iter; + DBusMessageIter array_1_iter, array_2_iter, array_3_iter; + DBusMessageIter variant_iter; + char *obj_path, *interface_name, *interface_property_name; + char *found_device_address, *found_device_name, *found_device_icon; + + /* a{oa{sa{sv}}} */ + if (!dbus_message_iter_init(reply, &root_iter)) + return 1; + + /* a */ + if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&root_iter)) + return 1; + + dbus_message_iter_recurse(&root_iter, &array_1_iter); + + do + { + /* a{...} */ + if (DBUS_TYPE_DICT_ENTRY != + dbus_message_iter_get_arg_type(&array_1_iter)) + return 1; + + dbus_message_iter_recurse(&array_1_iter, &dict_1_iter); + + /* a{o...} */ + if (DBUS_TYPE_OBJECT_PATH != + dbus_message_iter_get_arg_type(&dict_1_iter)) + return 1; + + dbus_message_iter_get_basic(&dict_1_iter, &obj_path); + + if (!dbus_message_iter_next(&dict_1_iter)) + return 1; + + /* a{oa} */ + if (DBUS_TYPE_ARRAY != + dbus_message_iter_get_arg_type(&dict_1_iter)) + return 1; + + dbus_message_iter_recurse(&dict_1_iter, &array_2_iter); + do + { + /* empty array? */ + if (DBUS_TYPE_INVALID == + dbus_message_iter_get_arg_type(&array_2_iter)) + continue; + + /* a{oa{...}} */ + if (DBUS_TYPE_DICT_ENTRY != + dbus_message_iter_get_arg_type(&array_2_iter)) + return 1; + dbus_message_iter_recurse(&array_2_iter, &dict_2_iter); + + /* a{oa{s...}} */ + if (DBUS_TYPE_STRING != + dbus_message_iter_get_arg_type(&dict_2_iter)) + return 1; + dbus_message_iter_get_basic(&dict_2_iter, &interface_name); + + if (!string_is_equal(interface_name, "org.bluez.Device1")) + continue; + + memset(&device, 0, sizeof(device)); + strlcpy(device.path, obj_path, 128); + + if (!dbus_message_iter_next(&dict_2_iter)) + return 1; + + /* a{oa{sa}} */ + if (DBUS_TYPE_ARRAY != dbus_message_iter_get_arg_type(&dict_2_iter)) + return 1; + + dbus_message_iter_recurse(&dict_2_iter, &array_3_iter); + + do { + /* empty array? */ + if (DBUS_TYPE_INVALID == + dbus_message_iter_get_arg_type(&array_3_iter)) + continue; + + /* a{oa{sa{...}}} */ + if (DBUS_TYPE_DICT_ENTRY != + dbus_message_iter_get_arg_type(&array_3_iter)) + return 1; + dbus_message_iter_recurse(&array_3_iter, &dict_3_iter); + + /* a{oa{sa{s...}}} */ + if (DBUS_TYPE_STRING != + dbus_message_iter_get_arg_type(&dict_3_iter)) + return 1; + + dbus_message_iter_get_basic(&dict_3_iter, + &interface_property_name); + + if (!dbus_message_iter_next(&dict_3_iter)) + return 1; + /* a{oa{sa{sv}}} */ + if (DBUS_TYPE_VARIANT != + dbus_message_iter_get_arg_type(&dict_3_iter)) + return 1; + + /* Below, "Alias" property is used instead of "Name". + * "This value ("Name") is only present for + * completeness. It is better to always use + * the Alias property when displaying the + * devices name." + * -- bluez/doc/device-api.txt + */ + + /* DBUS_TYPE_VARIANT is a container type */ + dbus_message_iter_recurse(&dict_3_iter, &variant_iter); + if (string_is_equal(interface_property_name, "Address")) + { + dbus_message_iter_get_basic(&variant_iter, + &found_device_address); + strlcpy(device.address, found_device_address, 18); + } + else if (string_is_equal(interface_property_name, "Alias")) + { + dbus_message_iter_get_basic(&variant_iter, + &found_device_name); + strlcpy(device.name, found_device_name, 64); + } + else if (string_is_equal(interface_property_name, "Icon")) + { + dbus_message_iter_get_basic(&variant_iter, + &found_device_icon); + strlcpy(device.icon, found_device_icon, 64); + } + else if (string_is_equal(interface_property_name, "Connected")) + { + dbus_message_iter_get_basic(&variant_iter, + &device.connected); + } + else if (string_is_equal(interface_property_name, "Paired")) + { + dbus_message_iter_get_basic(&variant_iter, + &device.paired); + } + else if (string_is_equal(interface_property_name, "Trusted")) + { + dbus_message_iter_get_basic(&variant_iter, + &device.trusted); + } + } while (dbus_message_iter_next(&array_3_iter)); + + if (!device_info_vector_list_append(bluez->devices, device)) + return 1; + + } while (dbus_message_iter_next(&array_2_iter)); + } while (dbus_message_iter_next(&array_1_iter)); + + return 0; +} + +static void bluez_dbus_connect(bluez_t *bluez) +{ + DBusError err; + dbus_error_init(&err); + bluez->dbus_connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, &err); +} + +static void bluez_dbus_disconnect(bluez_t *bluez) +{ + if (!bluez->dbus_connection) + return; + + dbus_connection_close(bluez->dbus_connection); + dbus_connection_unref(bluez->dbus_connection); + bluez->dbus_connection = NULL; +} + +static void bluez_scan(void *data) +{ + DBusError err; + DBusMessage *reply; + bluez_t *bluez = (bluez_t*)data; + + bluez_dbus_connect(bluez); + + if (get_managed_objects(bluez, &reply)) + return; + if (!reply) + return; + + /* Get default adapter */ + if (get_default_adapter(bluez, reply)) + return; + dbus_message_unref(reply); + + /* Power device on */ + if (set_bool_property(bluez, bluez->adapter, + "org.bluez.Adapter1", "Powered", 1)) + return; + + /* Start discovery */ + if (adapter_discovery(bluez, "StartDiscovery")) + return; + + retro_sleep(10000); + + /* Stop discovery */ + if (adapter_discovery(bluez, "StopDiscovery")) + return; + + /* Get scanned devices */ + if (get_managed_objects(bluez, &reply)) + return; + if (!reply) + return; + + if (bluez->devices) + device_info_vector_list_free(bluez->devices); + bluez->devices = device_info_vector_list_new(); + + read_scanned_devices(bluez, reply); + dbus_message_unref(reply); + bluez_dbus_disconnect(bluez); +} + +static void bluez_get_devices(void *data, + struct string_list* devices_string_list) +{ + unsigned i; + union string_list_elem_attr attr; + bluez_t *bluez = (bluez_t*)data; + + attr.i = 0; + + if (!bluez->devices) + return; + + for (i = 0; i < bluez->devices->count; i++) + { + char device[64]; + strlcpy(device, bluez->devices->data[i].name, sizeof(device)); + string_list_append(devices_string_list, device, attr); + } +} + +static bool bluez_device_is_connected(void *data, unsigned i) +{ + int value; + bluez_t *bluez = (bluez_t*)data; + + if (bluez->bluez_cache_counter[i] == 60) + { + bluez->bluez_cache_counter[i] = 0; + bluez_dbus_connect(bluez); + + /* Device disappeared */ + if (get_bool_property(bluez, bluez->devices->data[i].path, + "org.bluez.Device1", "Connected", &value)) + value = false; + + bluez_dbus_disconnect(bluez); + + bluez->bluez_cache[i] = value; + return value; + } + + bluez->bluez_cache_counter[i]++; + return bluez->bluez_cache[i]; +} + +static void bluez_device_get_sublabel( + void *data, char *s, unsigned i, size_t len) +{ + bluez_t *bluez = (bluez_t*)data; + strlcpy(s, bluez->devices->data[i].address, len); +} + +static bool bluez_connect_device(void *data, unsigned i) +{ + bluez_t *bluez = (bluez_t*)data; + bluez_dbus_connect(bluez); + + /* Trust the device */ + if (set_bool_property(bluez, bluez->devices->data[i].path, + "org.bluez.Device1", "Trusted", 1)) + return false; + + /* Pair the device */ + device_method(bluez, bluez->devices->data[i].path, "Pair"); + + /* Can be "Already Exists" */ + /* Connect the device */ + if (device_method(bluez, bluez->devices->data[i].path, "Connect")) + return false; + + bluez_dbus_disconnect(bluez); + bluez->bluez_cache_counter[i] = 0; + return true; +} + +bluetooth_driver_t bluetooth_bluez = { + bluez_init, + bluez_free, + bluez_scan, + bluez_get_devices, + bluez_device_is_connected, + bluez_device_get_sublabel, + bluez_connect_device, + "bluez", +}; diff --git a/cheevos/cheevos.c b/cheevos/cheevos.c index 06d8936a0f..435fa3ea26 100644 --- a/cheevos/cheevos.c +++ b/cheevos/cheevos.c @@ -145,8 +145,8 @@ typedef struct rcheevos_async_io_request int attempt_count; char type; char hardcore; - char* success_message; - char* failure_message; + const char* success_message; + const char* failure_message; char user_agent[256]; } rcheevos_async_io_request; @@ -443,7 +443,7 @@ static retro_time_t rcheevos_async_send_rich_presence( { if (settings->bools.discord_enable && discord_is_ready()) - discord_update(DISCORD_PRESENCE_RETROACHIEVEMENTS, false); + discord_update(DISCORD_PRESENCE_RETROACHIEVEMENTS); } #endif @@ -521,7 +521,8 @@ static void rcheevos_async_task_callback( case CHEEVOS_ASYNC_AWARD_ACHIEVEMENT: /* ignore already unlocked */ - if (string_starts_with(buffer, "User already has ")) + if (string_starts_with_size(buffer, "User already has ", + STRLEN_CONST("User already has "))) break; /* fallthrough to default */ @@ -820,12 +821,16 @@ static void rcheevos_async_award_achievement(rcheevos_async_io_request* request) rcheevos_log_url("rc_url_award_cheevo", buffer); task_push_http_transfer_with_user_agent(buffer, true, NULL, request->user_agent, rcheevos_async_task_callback, request); + +#ifdef HAVE_AUDIOMIXER + if (settings->bools.cheevos_unlock_sound_enable) + audio_driver_mixer_play_menu_sound(AUDIO_MIXER_SYSTEM_SLOT_ACHIEVEMENT_UNLOCK); +#endif } static void rcheevos_award(rcheevos_cheevo_t* cheevo, int mode) { char buffer[256]; - settings_t *settings = config_get_ptr(); buffer[0] = 0; CHEEVOS_LOG(RCHEEVOS_TAG "awarding cheevo %u: %s (%s)\n", @@ -865,24 +870,29 @@ static void rcheevos_award(rcheevos_cheevo_t* cheevo, int mode) rcheevos_async_award_achievement(request); } - /* Take a screenshot of the achievement. */ - if (settings && settings->bools.cheevos_auto_screenshot) +#ifdef HAVE_SCREENSHOTS { - char shotname[8192]; + settings_t *settings = config_get_ptr(); + /* Take a screenshot of the achievement. */ + if (settings && settings->bools.cheevos_auto_screenshot) + { + char shotname[8192]; - snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u", - settings->paths.directory_screenshot, - path_basename(path_get(RARCH_PATH_BASENAME)), - cheevo->info->id); - shotname[sizeof(shotname) - 1] = '\0'; + snprintf(shotname, sizeof(shotname), "%s/%s-cheevo-%u", + settings->paths.directory_screenshot, + path_basename(path_get(RARCH_PATH_BASENAME)), + cheevo->info->id); + shotname[sizeof(shotname) - 1] = '\0'; - if (take_screenshot(settings->paths.directory_screenshot, - shotname, true, - video_driver_cached_frame_has_valid_framebuffer(), false, true)) - CHEEVOS_LOG(RCHEEVOS_TAG "got a screenshot for cheevo %u\n", cheevo->info->id); - else - CHEEVOS_LOG(RCHEEVOS_TAG "failed to get screenshot for cheevo %u\n", cheevo->info->id); + if (take_screenshot(settings->paths.directory_screenshot, + shotname, true, + video_driver_cached_frame_has_valid_framebuffer(), false, true)) + CHEEVOS_LOG(RCHEEVOS_TAG "got a screenshot for cheevo %u\n", cheevo->info->id); + else + CHEEVOS_LOG(RCHEEVOS_TAG "failed to get screenshot for cheevo %u\n", cheevo->info->id); + } } +#endif } static int rcheevos_has_indirect_memref(const rc_memref_value_t* memrefs) @@ -994,14 +1004,6 @@ static void rcheevos_lboard_submit(rcheevos_lboard_t* lboard) /* Deactivate the leaderboard. */ lboard->active = 0; - /* Failsafe for improper leaderboards. */ - if (lboard->last_value == 0) - { - CHEEVOS_ERR(RCHEEVOS_TAG "Leaderboard %s tried to submit 0\n", lboard->info->title); - runloop_msg_queue_push("Leaderboard attempt cancelled!", 0, 2 * 60, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); - return; - } - /* Show the OSD message. */ rc_format_value(value, sizeof(value), lboard->last_value, lboard->format); @@ -1150,16 +1152,23 @@ void rcheevos_get_achievement_state(unsigned index, char *buffer, size_t buffer_ { enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNSUPPORTED_ENTRY; } + else if (!(cheevo->active & RCHEEVOS_ACTIVE_HARDCORE)) + { + enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE; + } + else if (!(cheevo->active & RCHEEVOS_ACTIVE_SOFTCORE)) + { + /* if in hardcore mode, track progress towards hardcore unlock */ + const settings_t* settings = config_get_ptr(); + const bool hardcore = settings->bools.cheevos_hardcore_mode_enable && !rcheevos_hardcore_paused; + check_measured = hardcore; + + enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY; + } else { - settings_t* settings = config_get_ptr(); - bool hardcore = settings->bools.cheevos_hardcore_mode_enable && !rcheevos_hardcore_paused; - if (hardcore && !(cheevo->active & RCHEEVOS_ACTIVE_HARDCORE)) - enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE; - else if (!hardcore && !(cheevo->active & RCHEEVOS_ACTIVE_SOFTCORE)) - enum_idx = MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY; - else /* Use either "Locked" for core or "Unofficial" for unofficial as set above */ - check_measured = true; + /* Use either "Locked" for core or "Unofficial" for unofficial as set above and track progress */ + check_measured = true; } strlcpy(buffer, msg_hash_to_str(enum_idx), buffer_size); @@ -1548,7 +1557,7 @@ static int rcheevos_iterate(rcheevos_coro_t* coro) CORO_STOP(); /* iterate over the possible hashes for the file being loaded */ - rc_hash_initialize_iterator(&coro->iterator, coro->path, NULL, 0); + rc_hash_initialize_iterator(&coro->iterator, coro->path, (uint8_t*)coro->data, coro->len); #ifdef CHEEVOS_TIME_HASH start = cpu_features_get_time_usec(); #endif diff --git a/cheevos/parser.c b/cheevos/parser.c index a2688d4b78..13cffaa6e9 100644 --- a/cheevos/parser.c +++ b/cheevos/parser.c @@ -291,7 +291,7 @@ typedef struct static char* rcheevos_unescape_string(const char* string, size_t length) { const char* end = string + length; - char* buffer = (char*)malloc(length + 1); + char* buffer = (char*)malloc(length + 1); char* buffer_it = buffer; if (buffer == NULL) @@ -329,18 +329,19 @@ static char* rcheevos_unescape_string(const char* string, size_t length) { char temp[5]; - string += 2; + string += 2; memcpy(temp, string, 4); - temp[4] = '\0'; - utf16[j] = string_hex_to_unsigned(temp); - string += 4; + temp[4] = '\0'; + utf16[j] = string_hex_to_unsigned(temp); + string += 4; } utf16[j] = 0; if (utf16_to_char_string(utf16, utf8, sizeof(utf8))) { - memcpy(buffer_it, utf8, strlen(utf8)); - buffer_it += strlen(utf8); + size_t utf8_len = strlen(utf8); + memcpy(buffer_it, utf8, utf8_len); + buffer_it += utf8_len; } } break; diff --git a/config.def.h b/config.def.h index 21314eb899..60658fc8d9 100644 --- a/config.def.h +++ b/config.def.h @@ -53,48 +53,6 @@ #define DEFAULT_ASPECT_RATIO -1.0f #endif -#if defined(ANDROID) -#define DEFAULT_MAX_PADS 8 -#define ANDROID_KEYBOARD_PORT DEFAULT_MAX_PADS -#elif defined(_3DS) -#define DEFAULT_MAX_PADS 1 -#elif defined(SWITCH) || defined(HAVE_LIBNX) -#define DEFAULT_MAX_PADS 8 -#elif defined(WIIU) -#ifdef WIIU_HID -#define DEFAULT_MAX_PADS 16 -#else -#define DEFAULT_MAX_PADS 5 -#endif -#elif defined(DJGPP) -#define DEFAULT_MAX_PADS 1 -#define DOS_KEYBOARD_PORT DEFAULT_MAX_PADS -#elif defined(XENON) -#define DEFAULT_MAX_PADS 4 -#elif defined(VITA) || defined(SN_TARGET_PSP2) -#define DEFAULT_MAX_PADS 4 -#elif defined(PSP) -#define DEFAULT_MAX_PADS 1 -#elif defined(PS2) -#define DEFAULT_MAX_PADS 2 -#elif defined(GEKKO) || defined(HW_RVL) -#define DEFAULT_MAX_PADS 4 -#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__)) -#define DEFAULT_MAX_PADS 8 -#elif defined(__QNX__) -#define DEFAULT_MAX_PADS 8 -#elif defined(__CELLOS_LV2__) -#define DEFAULT_MAX_PADS 7 -#elif defined(_XBOX) -#define DEFAULT_MAX_PADS 4 -#elif defined(HAVE_XINPUT) && !defined(HAVE_DINPUT) -#define DEFAULT_MAX_PADS 4 -#elif defined(DINGUX) -#define DEFAULT_MAX_PADS 2 -#else -#define DEFAULT_MAX_PADS 16 -#endif - #if defined(GEKKO) #define DEFAULT_MOUSE_SCALE 1 #endif @@ -258,6 +216,18 @@ #endif #define DEFAULT_CHECK_FIRMWARE_BEFORE_LOADING false +/* Specifies whether to 'reload' (fork and quit) + * RetroArch when launching content with the + * currently loaded core + * > Only relevant on platforms without dynamic core + * loading support + * > Setting this to 'false' will decrease loading + * times when required core is already running, + * but may cause stability issues (if core misbehaves) */ +#ifndef HAVE_DYNAMIC +#define DEFAULT_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT true +#endif + /* Forcibly disable composition. * Only valid on Windows Vista/7/8 for now. */ #define DEFAULT_DISABLE_COMPOSITION false @@ -645,6 +615,8 @@ static const unsigned input_backtouch_enable = false; static const unsigned input_backtouch_toggle = false; #endif +#define DEFAULT_OVERLAY_ENABLE_AUTOPREFERRED true + #define DEFAULT_SHOW_PHYSICAL_INPUTS true #define DEFAULT_ALL_USERS_CONTROL_MENU false @@ -755,6 +727,40 @@ static const bool audio_enable_menu_bgm = false; #define DEFAULT_MENU_ENABLE_WIDGETS false #endif +/* Display an animation when loading content + * > Currently implemented only as a widget */ +#define DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION DEFAULT_MENU_ENABLE_WIDGETS + +/* Display a notification when successfully + * connecting/disconnecting an autoconfigured + * controller + * > Disabled by default on the Switch */ +#if defined(HAVE_LIBNX) && defined(HAVE_GFX_WIDGETS) +#define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG false +#else +#define DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG true +#endif + +/* Display a notification when cheats are being + * applied */ +#define DEFAULT_NOTIFICATION_SHOW_CHEATS_APPLIED true + +/* Display a notification when loading an + * input remap file */ +#define DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD true + +/* Display a notification when loading a + * configuration override file */ +#define DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD true + +/* Display a notification when automatically restoring + * at launch the last used disk of multi-disk content */ +#define DEFAULT_NOTIFICATION_SHOW_SET_INITIAL_DISK true + +/* Display a notification when fast forwarding + * content */ +#define DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD true + /* Output samplerate. */ #ifdef GEKKO #define DEFAULT_OUTPUT_RATE 32000 @@ -1286,4 +1292,18 @@ static const bool enable_device_vibration = false; #define DEFAULT_AI_SERVICE_URL "http://localhost:4404/" +#if defined(HAVE_FFMPEG) || defined(HAVE_MPV) +#define DEFAULT_BUILTIN_MEDIAPLAYER_ENABLE true +#else +#define DEFAULT_BUILTIN_MEDIAPLAYER_ENABLE false +#endif + +#if defined(HAVE_IMAGEVIEWER) +#define DEFAULT_BUILTIN_IMAGEVIEWER_ENABLE true +#else +#define DEFAULT_BUILTIN_IMAGEVIEWER_ENABLE false +#endif + +#define DEFAULT_FILTER_BY_CURRENT_CORE false + #endif diff --git a/configuration.c b/configuration.c index f28e885e62..a8eeac4c32 100644 --- a/configuration.c +++ b/configuration.c @@ -2,7 +2,7 @@ * Copyright (C) 2010-2014 - Hans-Kristian Arntzen * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2014-2017 - Jean-André Santoni - * Copyright (C) 2015-2019 - Andrés Suárez + * Copyright (C) 2015-2019 - Andrés Suárez (input remapping + other things) * Copyright (C) 2016-2019 - Brad Parker * * RetroArch is free software: you can redistribute it and/or modify it under the terms @@ -271,9 +271,16 @@ enum camera_driver_enum CAMERA_NULL }; +enum bluetooth_driver_enum +{ + BLUETOOTH_BLUETOOTHCTL = CAMERA_NULL + 1, + BLUETOOTH_BLUEZ, + BLUETOOTH_NULL +}; + enum wifi_driver_enum { - WIFI_CONNMANCTL = CAMERA_NULL + 1, + WIFI_CONNMANCTL = BLUETOOTH_NULL + 1, WIFI_NULL }; @@ -559,6 +566,16 @@ static const enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_ANDROID; static const enum camera_driver_enum CAMERA_DEFAULT_DRIVER = CAMERA_NULL; #endif +#if defined(HAVE_BLUETOOTH) +# if defined(HAVE_DBUS) +static const enum bluetooth_driver_enum BLUETOOTH_DEFAULT_DRIVER = BLUETOOTH_BLUEZ; +# else +static const enum bluetooth_driver_enum BLUETOOTH_DEFAULT_DRIVER = BLUETOOTH_BLUETOOTHCTL; +# endif +#else +static const enum bluetooth_driver_enum BLUETOOTH_DEFAULT_DRIVER = BLUETOOTH_NULL; +#endif + #if defined(HAVE_LAKKA) static const enum wifi_driver_enum WIFI_DEFAULT_DRIVER = WIFI_CONNMANCTL; #else @@ -629,6 +646,10 @@ static void config_parse_file(global_t *global); struct defaults g_defaults; +/* TODO/FIXME - static public global variables */ +static unsigned old_analog_dpad_mode[MAX_USERS]; +static unsigned old_libretro_device[MAX_USERS]; + /** * config_get_default_audio: * @@ -1010,6 +1031,30 @@ const char *config_get_default_camera(void) return "null"; } +/** + * config_get_default_bluetooth: + * + * Gets default bluetooth driver. + * + * Returns: Default bluetooth driver. + **/ +const char *config_get_default_bluetooth(void) +{ + enum bluetooth_driver_enum default_driver = BLUETOOTH_DEFAULT_DRIVER; + + switch (default_driver) + { + case BLUETOOTH_BLUETOOTHCTL: + return "bluetoothctl"; + case BLUETOOTH_BLUEZ: + return "bluez"; + case BLUETOOTH_NULL: + break; + } + + return "null"; +} + /** * config_get_default_wifi: * @@ -1144,6 +1189,7 @@ static struct config_array_setting *populate_settings_array(settings_t *settings SETTING_ARRAY("video_driver", settings->arrays.video_driver, false, NULL, true); SETTING_ARRAY("record_driver", settings->arrays.record_driver, false, NULL, true); SETTING_ARRAY("camera_driver", settings->arrays.camera_driver, false, NULL, true); + SETTING_ARRAY("bluetooth_driver", settings->arrays.bluetooth_driver, false, NULL, true); SETTING_ARRAY("wifi_driver", settings->arrays.wifi_driver, false, NULL, true); SETTING_ARRAY("location_driver", settings->arrays.location_driver,false, NULL, true); #ifdef HAVE_MENU @@ -1376,8 +1422,11 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("input_descriptor_hide_unbound", &settings->bools.input_descriptor_hide_unbound, true, input_descriptor_hide_unbound, false); SETTING_BOOL("load_dummy_on_core_shutdown", &settings->bools.load_dummy_on_core_shutdown, true, DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN, false); SETTING_BOOL("check_firmware_before_loading", &settings->bools.check_firmware_before_loading, true, DEFAULT_CHECK_FIRMWARE_BEFORE_LOADING, false); - SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, false, false /* TODO */, false); - SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, true, false); +#ifndef HAVE_DYNAMIC + SETTING_BOOL("always_reload_core_on_run_content", &settings->bools.always_reload_core_on_run_content, true, DEFAULT_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, false); +#endif + SETTING_BOOL("builtin_mediaplayer_enable", &settings->bools.multimedia_builtin_mediaplayer_enable, true, DEFAULT_BUILTIN_MEDIAPLAYER_ENABLE, false); + SETTING_BOOL("builtin_imageviewer_enable", &settings->bools.multimedia_builtin_imageviewer_enable, true, DEFAULT_BUILTIN_IMAGEVIEWER_ENABLE, false); SETTING_BOOL("fps_show", &settings->bools.video_fps_show, true, DEFAULT_FPS_SHOW, false); SETTING_BOOL("statistics_show", &settings->bools.video_statistics_show, true, DEFAULT_STATISTICS_SHOW, false); SETTING_BOOL("framecount_show", &settings->bools.video_framecount_show, true, DEFAULT_FRAMECOUNT_SHOW, false); @@ -1423,6 +1472,13 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("core_set_supports_no_game_enable", &settings->bools.set_supports_no_game_enable, true, true, false); SETTING_BOOL("audio_enable", &settings->bools.audio_enable, true, DEFAULT_AUDIO_ENABLE, false); SETTING_BOOL("menu_enable_widgets", &settings->bools.menu_enable_widgets, true, DEFAULT_MENU_ENABLE_WIDGETS, false); + SETTING_BOOL("menu_show_load_content_animation", &settings->bools.menu_show_load_content_animation, true, DEFAULT_MENU_SHOW_LOAD_CONTENT_ANIMATION, false); + SETTING_BOOL("notification_show_autoconfig", &settings->bools.notification_show_autoconfig, true, DEFAULT_NOTIFICATION_SHOW_AUTOCONFIG, false); + SETTING_BOOL("notification_show_cheats_applied", &settings->bools.notification_show_cheats_applied, true, DEFAULT_NOTIFICATION_SHOW_CHEATS_APPLIED, false); + SETTING_BOOL("notification_show_remap_load", &settings->bools.notification_show_remap_load, true, DEFAULT_NOTIFICATION_SHOW_REMAP_LOAD, false); + SETTING_BOOL("notification_show_config_override_load", &settings->bools.notification_show_config_override_load, true, DEFAULT_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, false); + SETTING_BOOL("notification_show_set_initial_disk", &settings->bools.notification_show_set_initial_disk, true, DEFAULT_NOTIFICATION_SHOW_SET_INITIAL_DISK, false); + SETTING_BOOL("notification_show_fast_forward", &settings->bools.notification_show_fast_forward, true, DEFAULT_NOTIFICATION_SHOW_FAST_FORWARD, false); SETTING_BOOL("menu_widget_scale_auto", &settings->bools.menu_widget_scale_auto, true, DEFAULT_MENU_WIDGET_SCALE_AUTO, false); SETTING_BOOL("audio_enable_menu", &settings->bools.audio_enable_menu, true, audio_enable_menu, false); SETTING_BOOL("audio_enable_menu_ok", &settings->bools.audio_enable_menu_ok, true, audio_enable_menu_ok, false); @@ -1554,7 +1610,7 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("menu_show_online_updater", &settings->bools.menu_show_online_updater, true, menu_show_online_updater, false); SETTING_BOOL("menu_show_core_updater", &settings->bools.menu_show_core_updater, true, menu_show_core_updater, false); SETTING_BOOL("menu_show_legacy_thumbnail_updater", &settings->bools.menu_show_legacy_thumbnail_updater, true, menu_show_legacy_thumbnail_updater, false); - SETTING_BOOL("filter_by_current_core", &settings->bools.filter_by_current_core, false, false /* TODO */, false); + SETTING_BOOL("filter_by_current_core", &settings->bools.filter_by_current_core, true, DEFAULT_FILTER_BY_CURRENT_CORE, false); SETTING_BOOL("rgui_show_start_screen", &settings->bools.menu_show_start_screen, false, false /* TODO */, false); SETTING_BOOL("menu_navigation_wraparound_enable", &settings->bools.menu_navigation_wraparound_enable, true, true, false); SETTING_BOOL("menu_navigation_browser_filter_supported_extensions_enable", @@ -1588,6 +1644,7 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false); SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false); SETTING_BOOL("cheevos_richpresence_enable", &settings->bools.cheevos_richpresence_enable, true, true, false); + SETTING_BOOL("cheevos_unlock_sound_enable", &settings->bools.cheevos_unlock_sound_enable, true, false, false); SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false); SETTING_BOOL("cheevos_auto_screenshot", &settings->bools.cheevos_auto_screenshot, true, false, false); SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false); @@ -1595,8 +1652,8 @@ static struct config_bool_setting *populate_settings_bool( #endif #ifdef HAVE_OVERLAY SETTING_BOOL("input_overlay_enable", &settings->bools.input_overlay_enable, true, config_overlay_enable_default(), false); - SETTING_BOOL("input_overlay_enable_autopreferred", &settings->bools.input_overlay_enable_autopreferred, true, true, false); - SETTING_BOOL("input_overlay_show_physical_inputs", &settings->bools.input_overlay_show_physical_inputs, true, false, false); + SETTING_BOOL("input_overlay_enable_autopreferred", &settings->bools.input_overlay_enable_autopreferred, true, DEFAULT_OVERLAY_ENABLE_AUTOPREFERRED, false); + SETTING_BOOL("input_overlay_show_physical_inputs", &settings->bools.input_overlay_show_physical_inputs, true, DEFAULT_SHOW_PHYSICAL_INPUTS, false); SETTING_BOOL("input_overlay_hide_in_menu", &settings->bools.input_overlay_hide_in_menu, true, DEFAULT_OVERLAY_HIDE_IN_MENU, false); SETTING_BOOL("input_overlay_show_mouse_cursor", &settings->bools.input_overlay_show_mouse_cursor, true, DEFAULT_OVERLAY_SHOW_MOUSE_CURSOR, false); SETTING_BOOL("input_overlay_auto_rotate", &settings->bools.input_overlay_auto_rotate, true, DEFAULT_OVERLAY_AUTO_ROTATE, false); @@ -1676,7 +1733,7 @@ static struct config_bool_setting *populate_settings_bool( SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false); SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE); SETTING_BOOL("log_to_file_timestamp", &settings->bools.log_to_file_timestamp, true, DEFAULT_LOG_TO_FILE_TIMESTAMP, false); - SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, DEFAULT_AI_SERVICE_ENABLE, false, false); + SETTING_BOOL("ai_service_enable", &settings->bools.ai_service_enable, true, DEFAULT_AI_SERVICE_ENABLE, false); SETTING_BOOL("ai_service_pause", &settings->bools.ai_service_pause, true, DEFAULT_AI_SERVICE_PAUSE, false); *size = count; @@ -1894,9 +1951,9 @@ static struct config_uint_setting *populate_settings_uint( SETTING_UINT("video_windowed_position_y", &settings->uints.window_position_y, true, 0, false); SETTING_UINT("video_windowed_position_width", &settings->uints.window_position_width, true, DEFAULT_WINDOW_WIDTH, false); SETTING_UINT("video_windowed_position_height", &settings->uints.window_position_height, true, DEFAULT_WINDOW_HEIGHT, false); - SETTING_UINT("ai_service_mode", &settings->uints.ai_service_mode, DEFAULT_AI_SERVICE_MODE, 0, false); - SETTING_UINT("ai_service_target_lang", &settings->uints.ai_service_target_lang, 0, 0, false); - SETTING_UINT("ai_service_source_lang", &settings->uints.ai_service_source_lang, 0, 0, false); + SETTING_UINT("ai_service_mode", &settings->uints.ai_service_mode, true, DEFAULT_AI_SERVICE_MODE, false); + SETTING_UINT("ai_service_target_lang", &settings->uints.ai_service_target_lang, true, 0, false); + SETTING_UINT("ai_service_source_lang", &settings->uints.ai_service_source_lang, true, 0, false); SETTING_UINT("video_record_threads", &settings->uints.video_record_threads, true, DEFAULT_VIDEO_RECORD_THREADS, false); @@ -1975,6 +2032,20 @@ static struct config_int_setting *populate_settings_int( return tmp; } +static void video_driver_default_settings(void) +{ + global_t *global = global_get_ptr(); + + if (!global) + return; + + global->console.screen.gamma_correction = DEFAULT_GAMMA; + global->console.flickerfilter_enable = false; + global->console.softfilter_enable = false; + + global->console.screen.resolutions.current.id = 0; +} + /** * config_set_defaults: * @@ -2002,6 +2073,7 @@ void config_set_defaults(void *data) const char *def_menu = config_get_default_menu(); #endif const char *def_camera = config_get_default_camera(); + const char *def_bluetooth = config_get_default_bluetooth(); const char *def_wifi = config_get_default_wifi(); const char *def_led = config_get_default_led(); const char *def_location = config_get_default_location(); @@ -2073,6 +2145,10 @@ void config_set_defaults(void *data) configuration_set_string(settings, settings->arrays.camera_driver, def_camera); + if (def_bluetooth) + configuration_set_string(settings, + settings->arrays.bluetooth_driver, + def_bluetooth); if (def_wifi) configuration_set_string(settings, settings->arrays.wifi_driver, @@ -2141,11 +2217,6 @@ void config_set_defaults(void *data) #endif #endif -#if defined(HAVE_FFMPEG) || defined(HAVE_MPV) - configuration_set_bool(settings, settings->bools.multimedia_builtin_mediaplayer_enable, true); -#else - configuration_set_bool(settings, settings->bools.multimedia_builtin_mediaplayer_enable, false); -#endif settings->floats.video_scale = DEFAULT_SCALE; video_driver_set_threaded(DEFAULT_VIDEO_THREADED); @@ -2200,7 +2271,6 @@ void config_set_defaults(void *data) #ifdef HAVE_CONFIGFILE input_remapping_set_defaults(true); #endif - input_autoconfigure_reset(); /* Verify that binds are in proper order. */ for (i = 0; i < MAX_USERS; i++) @@ -2515,7 +2585,7 @@ static bool check_menu_driver_compatibility(settings_t *settings) return true; /* TODO/FIXME - maintenance hazard */ - if (string_starts_with(video_driver, "d3d")) + if (string_starts_with_size(video_driver, "d3d", STRLEN_CONST("d3d"))) if ( string_is_equal(video_driver, "d3d9") || string_is_equal(video_driver, "d3d10") || @@ -2523,7 +2593,7 @@ static bool check_menu_driver_compatibility(settings_t *settings) string_is_equal(video_driver, "d3d12") ) return true; - if (string_starts_with(video_driver, "gl")) + if (string_starts_with_size(video_driver, "gl", STRLEN_CONST("gl"))) if ( string_is_equal(video_driver, "gl") || string_is_equal(video_driver, "gl1") || @@ -2754,6 +2824,39 @@ error: free(app_path); return NULL; } + +#ifdef RARCH_CONSOLE +static void video_driver_load_settings(config_file_t *conf) +{ + bool tmp_bool = false; + global_t *global = global_get_ptr(); + + if (!conf) + return; + + CONFIG_GET_INT_BASE(conf, global, + console.screen.gamma_correction, "gamma_correction"); + + if (config_get_bool(conf, "flicker_filter_enable", + &tmp_bool)) + global->console.flickerfilter_enable = tmp_bool; + + if (config_get_bool(conf, "soft_filter_enable", + &tmp_bool)) + global->console.softfilter_enable = tmp_bool; + + CONFIG_GET_INT_BASE(conf, global, + console.screen.soft_filter_index, + "soft_filter_index"); + CONFIG_GET_INT_BASE(conf, global, + console.screen.resolutions.current.id, + "current_resolution_id"); + CONFIG_GET_INT_BASE(conf, global, + console.screen.flicker_filter_index, + "flicker_filter_index"); +} +#endif + /** * config_load: * @path : path to be read from. @@ -3326,6 +3429,7 @@ bool config_load_override(void *data) system->info.library_name : NULL; const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME); const char *game_name = path_basename(rarch_path_basename); + settings_t *settings = config_get_ptr(); char content_dir_name[PATH_MAX_LENGTH]; if (!string_is_empty(rarch_path_basename)) @@ -3464,15 +3568,16 @@ bool config_load_override(void *data) retroarch_override_setting_unset(RARCH_OVERRIDE_SETTING_SAVE_PATH, NULL); if (!config_load_file(global_get_ptr(), - path_get(RARCH_PATH_CONFIG), config_get_ptr())) + path_get(RARCH_PATH_CONFIG), settings)) goto error; /* Restore the libretro_path we're using * since it will be overwritten by the override when reloading. */ path_set(RARCH_PATH_CORE, buf); - runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED), - 1, 100, false, - NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + if (settings->bools.notification_show_config_override_load) + runloop_msg_queue_push(msg_hash_to_str(MSG_CONFIG_OVERRIDE_LOADED), + 1, 100, false, + NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); /* Reset save paths. */ retroarch_override_setting_set(RARCH_OVERRIDE_SETTING_STATE_PATH, NULL); @@ -3550,6 +3655,8 @@ bool config_load_remap(const char *directory_input_remapping, const char *rarch_path_basename = path_get(RARCH_PATH_BASENAME); const char *game_name = path_basename(rarch_path_basename); enum msg_hash_enums msg_remap_loaded = MSG_GAME_REMAP_FILE_LOADED; + settings_t *settings = config_get_ptr(); + bool notification_show_remap_load = settings->bools.notification_show_remap_load; char content_dir_name[PATH_MAX_LENGTH]; if (string_is_empty(core_name) || string_is_empty(game_name)) @@ -3650,9 +3757,11 @@ bool config_load_remap(const char *directory_input_remapping, return false; success: - runloop_msg_queue_push( - msg_hash_to_str(msg_remap_loaded), 1, 100, false, - NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + if (notification_show_remap_load) + runloop_msg_queue_push( + msg_hash_to_str(msg_remap_loaded), 1, 100, false, + NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + free(content_path); free(remap_directory); free(core_path); @@ -3684,6 +3793,28 @@ static void config_parse_file(global_t *global) } } } + +static void video_driver_save_settings(config_file_t *conf) +{ + global_t *global = global_get_ptr(); + if (!conf) + return; + + config_set_int(conf, "gamma_correction", + global->console.screen.gamma_correction); + config_set_bool(conf, "flicker_filter_enable", + global->console.flickerfilter_enable); + config_set_bool(conf, "soft_filter_enable", + global->console.softfilter_enable); + + config_set_int(conf, "soft_filter_index", + global->console.screen.soft_filter_index); + config_set_int(conf, "current_resolution_id", + global->console.screen.resolutions.current.id); + config_set_int(conf, "flicker_filter_index", + global->console.screen.flicker_filter_index); +} + /** * config_save_autoconf_profile: * @path : Path that shall be written to. @@ -3773,8 +3904,8 @@ bool config_save_autoconf_profile(const char *path, unsigned user) config_set_string(conf, "input_device", input_config_get_device_name(user)); - pid_user = input_config_get_pid(user); - vid_user = input_config_get_vid(user); + pid_user = input_config_get_device_pid(user); + vid_user = input_config_get_device_vid(user); if (pid_user && vid_user) { @@ -4304,4 +4435,288 @@ bool config_replace(bool config_replace_save_on_exit, char *path) return task_push_start_dummy_core(&content_info); } + +/** + * input_remapping_load_file: + * @data : Path to config file. + * + * Loads a remap file from disk to memory. + * + * Returns: true (1) if successful, otherwise false (0). + **/ +bool input_remapping_load_file(void *data, const char *path) +{ + unsigned i, j, k; + config_file_t *conf = (config_file_t*)data; + settings_t *settings = config_get_ptr(); + global_t *global = global_get_ptr(); + + if (!conf || string_is_empty(path)) + return false; + + if (!string_is_empty(global->name.remapfile)) + input_remapping_set_defaults(true); + global->name.remapfile = strdup(path); + + for (i = 0; i < MAX_USERS; i++) + { + char s1[64], s2[64], s3[64]; + char btn_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; + char key_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; + char stk_ident[8][192] = {{0}}; + + char key_strings[RARCH_FIRST_CUSTOM_BIND + 8][128] = { + "b", "y", "select", "start", + "up", "down", "left", "right", + "a", "x", "l", "r", "l2", "r2", + "l3", "r3", "l_x+", "l_x-", "l_y+", "l_y-", "r_x+", "r_x-", "r_y+", "r_y-" }; + + old_analog_dpad_mode[i] = settings->uints.input_analog_dpad_mode[i]; + old_libretro_device[i] = settings->uints.input_libretro_device[i]; + + s1[0] = '\0'; + s2[0] = '\0'; + s3[0] = '\0'; + + snprintf(s1, sizeof(s1), "input_player%u_btn", i + 1); + snprintf(s2, sizeof(s2), "input_player%u_key", i + 1); + snprintf(s3, sizeof(s3), "input_player%u_stk", i + 1); + + for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) + { + if (j < RARCH_FIRST_CUSTOM_BIND) + { + int btn_remap = -1; + int key_remap = -1; + + fill_pathname_join_delim(btn_ident[j], s1, + key_strings[j], '_', sizeof(btn_ident[j])); + fill_pathname_join_delim(key_ident[j], s2, + key_strings[j], '_', sizeof(btn_ident[j])); + + if (config_get_int(conf, btn_ident[j], &btn_remap)) + { + if (btn_remap == -1) + btn_remap = RARCH_UNMAPPED; + + configuration_set_uint(settings, + settings->uints.input_remap_ids[i][j], btn_remap); + } + + if (!config_get_int(conf, key_ident[j], &key_remap)) + key_remap = RETROK_UNKNOWN; + + configuration_set_uint(settings, + settings->uints.input_keymapper_ids[i][j], key_remap); + } + else + { + int stk_remap = -1; + k = j - RARCH_FIRST_CUSTOM_BIND; + + fill_pathname_join_delim(stk_ident[k], s3, + key_strings[j], '$', sizeof(stk_ident[k])); + + snprintf(stk_ident[k], + sizeof(stk_ident[k]), + "%s_%s", + s3, + key_strings[j]); + + if (config_get_int(conf, stk_ident[k], &stk_remap)) + { + if (stk_remap == -1) + stk_remap = RARCH_UNMAPPED; + + configuration_set_uint(settings, + settings->uints.input_remap_ids[i][j], stk_remap); + } + } + } + + snprintf(s1, sizeof(s1), "input_player%u_analog_dpad_mode", i + 1); + CONFIG_GET_INT_BASE(conf, settings, uints.input_analog_dpad_mode[i], s1); + + snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1); + CONFIG_GET_INT_BASE(conf, settings, uints.input_libretro_device[i], s1); + } + + config_file_free(conf); + + return true; +} + +/** + * input_remapping_save_file: + * @path : Path to remapping file (relative path). + * + * Saves remapping values to file. + * + * Returns: true (1) if successful, otherwise false (0). + **/ +bool input_remapping_save_file(const char *path) +{ + bool ret; + unsigned i, j, k; + size_t path_size = PATH_MAX_LENGTH * sizeof(char); + char *buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + char *remap_file = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + config_file_t *conf = NULL; + unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS)); + settings_t *settings = config_get_ptr(); + const char *dir_input_remapping = settings->paths.directory_input_remapping; + + buf[0] = remap_file[0] = '\0'; + + fill_pathname_join(buf, dir_input_remapping, path, path_size); + fill_pathname_noext(remap_file, buf, ".rmp", path_size); + + free(buf); + + if (!(conf = config_file_new_from_path_to_string(remap_file))) + { + if (!(conf = config_file_new_alloc())) + { + free(remap_file); + return false; + } + } + + for (i = 0; i < max_users; i++) + { + char s1[64], s2[64], s3[64]; + char btn_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; + char key_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; + char stk_ident[8][128] = {{0}}; + + char key_strings[RARCH_FIRST_CUSTOM_BIND + 8][128] = { + "b", "y", "select", "start", + "up", "down", "left", "right", + "a", "x", "l", "r", "l2", "r2", + "l3", "r3", "l_x+", "l_x-", "l_y+", "l_y-", "r_x+", "r_x-", "r_y+", "r_y-" }; + + s1[0] = '\0'; + s2[0] = '\0'; + + snprintf(s1, sizeof(s1), "input_player%u_btn", i + 1); + snprintf(s2, sizeof(s2), "input_player%u_key", i + 1); + snprintf(s3, sizeof(s1), "input_player%u_stk", i + 1); + + for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) + { + unsigned remap_id = settings->uints.input_remap_ids[i][j]; + unsigned keymap_id = settings->uints.input_keymapper_ids[i][j]; + + if (j < RARCH_FIRST_CUSTOM_BIND) + { + fill_pathname_join_delim(btn_ident[j], s1, + key_strings[j], '_', sizeof(btn_ident[j])); + fill_pathname_join_delim(key_ident[j], s2, + key_strings[j], '_', sizeof(btn_ident[j])); + + /* only save values that have been modified */ + if (remap_id != j && remap_id != RARCH_UNMAPPED) + config_set_int(conf, btn_ident[j], + settings->uints.input_remap_ids[i][j]); + else if (remap_id != j && remap_id == RARCH_UNMAPPED) + config_set_int(conf, btn_ident[j], -1); + else + config_unset(conf, btn_ident[j]); + + if (keymap_id != RETROK_UNKNOWN) + config_set_int(conf, key_ident[j], + settings->uints.input_keymapper_ids[i][j]); + } + else + { + k = j - RARCH_FIRST_CUSTOM_BIND; + fill_pathname_join_delim(stk_ident[k], s3, + key_strings[j], '_', sizeof(stk_ident[k])); + if (remap_id != j && remap_id != RARCH_UNMAPPED) + config_set_int(conf, stk_ident[k], + settings->uints.input_remap_ids[i][j]); + else if (remap_id != j && remap_id == RARCH_UNMAPPED) + config_set_int(conf, stk_ident[k], + -1); + else + config_unset(conf, stk_ident[k]); + } + } + + snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1); + config_set_int(conf, s1, input_config_get_device(i)); + snprintf(s1, sizeof(s1), "input_player%u_analog_dpad_mode", i + 1); + config_set_int(conf, s1, settings->uints.input_analog_dpad_mode[i]); + } + + ret = config_file_write(conf, remap_file, true); + config_file_free(conf); + + free(remap_file); + return ret; +} + +bool input_remapping_remove_file(const char *path, + const char *dir_input_remapping) +{ + bool ret = false; + size_t path_size = PATH_MAX_LENGTH * sizeof(char); + char *buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + char *remap_file = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); + buf[0] = remap_file[0] = '\0'; + + fill_pathname_join(buf, dir_input_remapping, path, path_size); + fill_pathname_noext(remap_file, buf, ".rmp", path_size); + + ret = filestream_delete(remap_file) == 0 ? true : false; + free(buf); + free(remap_file); + return ret; +} + +void input_remapping_set_defaults(bool deinit) +{ + unsigned i, j; + settings_t *settings = config_get_ptr(); + global_t *global = global_get_ptr(); + + if (!global) + return; + + if (deinit) + { + if (!string_is_empty(global->name.remapfile)) + free(global->name.remapfile); + global->name.remapfile = NULL; + rarch_ctl(RARCH_CTL_UNSET_REMAPS_CORE_ACTIVE, NULL); + rarch_ctl(RARCH_CTL_UNSET_REMAPS_CONTENT_DIR_ACTIVE, NULL); + rarch_ctl(RARCH_CTL_UNSET_REMAPS_GAME_ACTIVE, NULL); + } + + for (i = 0; i < MAX_USERS; i++) + { + for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) + { + if (j < RARCH_FIRST_CUSTOM_BIND) + { + const struct retro_keybind *keybind = &input_config_binds[i][j]; + if (keybind) + configuration_set_uint(settings, + settings->uints.input_remap_ids[i][j], keybind->id); + configuration_set_uint(settings, + settings->uints.input_keymapper_ids[i][j], RETROK_UNKNOWN); + } + else + configuration_set_uint(settings, + settings->uints.input_remap_ids[i][j], j); + } + + if (old_analog_dpad_mode[i]) + configuration_set_uint(settings, + settings->uints.input_analog_dpad_mode[i], old_analog_dpad_mode[i]); + if (old_libretro_device[i]) + configuration_set_uint(settings, + settings->uints.input_libretro_device[i], old_libretro_device[i]); + } +} #endif diff --git a/configuration.h b/configuration.h index c906a79b65..16cf0ade4d 100644 --- a/configuration.h +++ b/configuration.h @@ -158,6 +158,13 @@ typedef struct settings /* Menu */ bool filter_by_current_core; bool menu_enable_widgets; + bool menu_show_load_content_animation; + bool notification_show_autoconfig; + bool notification_show_cheats_applied; + bool notification_show_remap_load; + bool notification_show_config_override_load; + bool notification_show_set_initial_disk; + bool notification_show_fast_forward; bool menu_widget_scale_auto; bool menu_show_start_screen; bool menu_pause_libretro; @@ -306,10 +313,14 @@ typedef struct settings bool cheevos_verbose_enable; bool cheevos_auto_screenshot; bool cheevos_start_active; + bool cheevos_unlock_sound_enable; /* Camera */ bool camera_allow; + /* Bluetooth */ + bool bluetooth_allow; + /* WiFi */ bool wifi_allow; @@ -356,6 +367,9 @@ typedef struct settings bool network_remote_enable_user[MAX_USERS]; bool load_dummy_on_core_shutdown; bool check_firmware_before_loading; +#ifndef HAVE_DYNAMIC + bool always_reload_core_on_run_content; +#endif bool game_specific_options; bool auto_overrides_enable; @@ -639,6 +653,7 @@ typedef struct settings char video_driver[32]; char record_driver[32]; char camera_driver[32]; + char bluetooth_driver[32]; char wifi_driver[32]; char led_driver[32]; char location_driver[32]; @@ -759,6 +774,15 @@ typedef struct settings **/ const char *config_get_default_camera(void); +/** + * config_get_default_bluetooth: + * + * Gets default bluetooth driver. + * + * Returns: Default bluetooth driver. + **/ +const char *config_get_default_bluetooth(void); + /** * config_get_default_wifi: * diff --git a/content.h b/content.h index e2b8ee6ed9..fb979003b6 100644 --- a/content.h +++ b/content.h @@ -51,8 +51,8 @@ bool content_load_state(const char* path, bool load_to_backup_buffer, bool autol /* Save a state from memory to disk. */ bool content_save_state(const char *path, bool save_to_disk, bool autosave); -/* Returns true if a save state task is in progress */ -bool content_save_state_in_progress(void); +/* Waits for any in-progress save state tasks to finish */ +void content_wait_for_save_state_task(void); /* Copy a save state. */ bool content_rename_state(const char *origin, const char *dest); diff --git a/core.h b/core.h index 35d7961ca0..470ca98b5f 100644 --- a/core.h +++ b/core.h @@ -156,7 +156,9 @@ typedef struct retro_callbacks bool core_set_default_callbacks(struct retro_callbacks *cbs); +#ifdef HAVE_REWIND bool core_set_rewind_callbacks(void); +#endif #ifdef HAVE_NETWORKING bool core_set_netplay_callbacks(void); diff --git a/core_backup.c b/core_backup.c index 71097ffb66..776d2c2b66 100644 --- a/core_backup.c +++ b/core_backup.c @@ -536,23 +536,27 @@ core_backup_list_t *core_backup_list_init( dir_list_sort(dir_list, true); /* Create core backup list */ - backup_list = (core_backup_list_t*)calloc(1, sizeof(*backup_list)); + backup_list = (core_backup_list_t*)malloc(sizeof(*backup_list)); if (!backup_list) goto error; + backup_list->entries = NULL; + backup_list->capacity = 0; + backup_list->size = 0; + /* Create entries array * (Note: Set this to the full size of the directory * list - this may be larger than we need, but saves * many inefficiencies later) */ - entries = (core_backup_list_entry_t*)calloc(dir_list->size, sizeof(*entries)); + entries = (core_backup_list_entry_t*) + calloc(dir_list->size, sizeof(*entries)); if (!entries) goto error; backup_list->entries = entries; backup_list->capacity = dir_list->size; - backup_list->size = 0; /* Loop over backup files and parse file names */ for (i = 0; i < dir_list->size; i++) diff --git a/core_info.c b/core_info.c index 63a2fd167d..252f6972da 100644 --- a/core_info.c +++ b/core_info.c @@ -114,31 +114,25 @@ static void core_info_list_resolve_all_firmware( char path_key[64]; char desc_key[64]; char opt_key[64]; + struct config_entry_list + *entry = NULL; bool tmp_bool = false; - char *tmp = NULL; path_key[0] = desc_key[0] = opt_key[0] = '\0'; snprintf(path_key, sizeof(path_key), "firmware%u_path", c); snprintf(desc_key, sizeof(desc_key), "firmware%u_desc", c); snprintf(opt_key, sizeof(opt_key), "firmware%u_opt", c); - if (config_get_string(config, path_key, &tmp)) - { - if (!string_is_empty(tmp)) - info->firmware[c].path = strdup(tmp); - free(tmp); - tmp = NULL; - } - if (config_get_string(config, desc_key, &tmp)) - { - if (!string_is_empty(tmp)) - info->firmware[c].desc = strdup(tmp); - free(tmp); - tmp = NULL; - } - if (tmp) - free(tmp); - tmp = NULL; + entry = config_get_entry(config, path_key, NULL); + + if (entry && !string_is_empty(entry->value)) + info->firmware[c].path = strdup(entry->value); + + entry = config_get_entry(config, desc_key, NULL); + + if (entry && !string_is_empty(entry->value)) + info->firmware[c].desc = strdup(entry->value); + if (config_get_bool(config, opt_key , &tmp_bool)) info->firmware[c].optional = tmp_bool; } @@ -304,14 +298,20 @@ static core_info_list_t *core_info_list_new(const char *path, if (!contents) return NULL; - core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list)); + core_info_list = (core_info_list_t*)malloc(sizeof(*core_info_list)); if (!core_info_list) { string_list_free(contents); return NULL; } - core_info = (core_info_t*)calloc(contents->size, sizeof(*core_info)); + core_info_list->list = NULL; + core_info_list->count = 0; + core_info_list->all_ext = NULL; + + core_info = (core_info_t*) + calloc(contents->size, sizeof(*core_info)); + if (!core_info) { core_info_list_free(core_info_list); @@ -319,8 +319,8 @@ static core_info_list_t *core_info_list_new(const char *path, return NULL; } - core_info_list->list = core_info; - core_info_list->count = contents->size; + core_info_list->list = core_info; + core_info_list->count = contents->size; for (i = 0; i < contents->size; i++) { @@ -330,188 +330,130 @@ static core_info_list_t *core_info_list_new(const char *path, if (conf) { - char *tmp = NULL; + bool tmp_bool = false; + unsigned tmp_uint = 0; + struct config_entry_list + *entry = config_get_entry(conf, "display_name", NULL); - if (config_get_string(conf, "display_name", &tmp)) + if (entry && !string_is_empty(entry->value)) + core_info[i].display_name = strdup(entry->value); + + entry = config_get_entry(conf, "display_version", NULL); + + if (entry && !string_is_empty(entry->value)) + core_info[i].display_version = strdup(entry->value); + + entry = config_get_entry(conf, "corename", NULL); + + if (entry && !string_is_empty(entry->value)) + core_info[i].core_name = strdup(entry->value); + + entry = config_get_entry(conf, "systemname", NULL); + + if (entry && !string_is_empty(entry->value)) + core_info[i].systemname = strdup(entry->value); + + entry = config_get_entry(conf, "systemid", NULL); + + if (entry && !string_is_empty(entry->value)) + core_info[i].system_id = strdup(entry->value); + + entry = config_get_entry(conf, "manufacturer", NULL); + + if (entry && !string_is_empty(entry->value)) + core_info[i].system_manufacturer = strdup(entry->value); + + config_get_uint(conf, "firmware_count", &tmp_uint); + core_info[i].firmware_count = tmp_uint; + + entry = config_get_entry(conf, "supported_extensions", NULL); + + if (entry && !string_is_empty(entry->value)) { - if (!string_is_empty(tmp)) - core_info[i].display_name = strdup(tmp); - free(tmp); - tmp = NULL; - } - if (config_get_string(conf, "display_version", &tmp)) - { - if (!string_is_empty(tmp)) - core_info[i].display_version = strdup(tmp); - free(tmp); - tmp = NULL; - } - if (config_get_string(conf, "corename", &tmp)) - { - if (!string_is_empty(tmp)) - core_info[i].core_name = strdup(tmp); - free(tmp); - tmp = NULL; + core_info[i].supported_extensions = strdup(entry->value); + core_info[i].supported_extensions_list = + string_split(core_info[i].supported_extensions, "|"); } - if (config_get_string(conf, "systemname", &tmp)) + entry = config_get_entry(conf, "authors", NULL); + + if (entry && !string_is_empty(entry->value)) { - if (!string_is_empty(tmp)) - core_info[i].systemname = strdup(tmp); - free(tmp); - tmp = NULL; + core_info[i].authors = strdup(entry->value); + core_info[i].authors_list = + string_split(core_info[i].authors, "|"); } - if (config_get_string(conf, "systemid", &tmp)) + entry = config_get_entry(conf, "permissions", NULL); + + if (entry && !string_is_empty(entry->value)) { - if (!string_is_empty(tmp)) - core_info[i].system_id = strdup(tmp); - free(tmp); - tmp = NULL; + core_info[i].permissions = strdup(entry->value); + core_info[i].permissions_list = + string_split(core_info[i].permissions, "|"); } - if (config_get_string(conf, "manufacturer", &tmp)) + entry = config_get_entry(conf, "license", NULL); + + if (entry && !string_is_empty(entry->value)) { - if (!string_is_empty(tmp)) - core_info[i].system_manufacturer = strdup(tmp); - free(tmp); - tmp = NULL; + core_info[i].licenses = strdup(entry->value); + core_info[i].licenses_list = + string_split(core_info[i].licenses, "|"); } + entry = config_get_entry(conf, "categories", NULL); + + if (entry && !string_is_empty(entry->value)) { - unsigned count = 0; - config_get_uint(conf, "firmware_count", &count); - core_info[i].firmware_count = count; + core_info[i].categories = strdup(entry->value); + core_info[i].categories_list = + string_split(core_info[i].categories, "|"); } - if (config_get_string(conf, "supported_extensions", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].supported_extensions = strdup(tmp); - core_info[i].supported_extensions_list = - string_split(core_info[i].supported_extensions, "|"); - } + entry = config_get_entry(conf, "database", NULL); - free(tmp); - tmp = NULL; + if (entry && !string_is_empty(entry->value)) + { + core_info[i].databases = strdup(entry->value); + core_info[i].databases_list = + string_split(core_info[i].databases, "|"); } - if (config_get_string(conf, "authors", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].authors = strdup(tmp); - core_info[i].authors_list = - string_split(core_info[i].authors, "|"); - } + entry = config_get_entry(conf, "notes", NULL); - free(tmp); - tmp = NULL; + if (entry && !string_is_empty(entry->value)) + { + core_info[i].notes = strdup(entry->value); + core_info[i].note_list = + string_split(core_info[i].notes, "|"); } - if (config_get_string(conf, "permissions", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].permissions = strdup(tmp); - core_info[i].permissions_list = - string_split(core_info[i].permissions, "|"); - } + entry = config_get_entry(conf, "required_hw_api", NULL); - free(tmp); - tmp = NULL; + if (entry && !string_is_empty(entry->value)) + { + core_info[i].required_hw_api = strdup(entry->value); + core_info[i].required_hw_api_list = + string_split(core_info[i].required_hw_api, "|"); } - if (config_get_string(conf, "license", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].licenses = strdup(tmp); - core_info[i].licenses_list = - string_split(core_info[i].licenses, "|"); - } + entry = config_get_entry(conf, "description", NULL); - free(tmp); - tmp = NULL; - } + if (entry && !string_is_empty(entry->value)) + core_info[i].description = strdup(entry->value); - if (config_get_string(conf, "categories", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].categories = strdup(tmp); - core_info[i].categories_list = - string_split(core_info[i].categories, "|"); - } + if (config_get_bool(conf, "supports_no_game", + &tmp_bool)) + core_info[i].supports_no_game = tmp_bool; - free(tmp); - tmp = NULL; - } + if (config_get_bool(conf, "database_match_archive_member", + &tmp_bool)) + core_info[i].database_match_archive_member = tmp_bool; - if (config_get_string(conf, "database", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].databases = strdup(tmp); - core_info[i].databases_list = - string_split(core_info[i].databases, "|"); - } - - free(tmp); - tmp = NULL; - } - - if (config_get_string(conf, "notes", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].notes = strdup(tmp); - core_info[i].note_list = string_split(core_info[i].notes, "|"); - } - - free(tmp); - tmp = NULL; - } - - if (config_get_string(conf, "required_hw_api", &tmp)) - { - if (!string_is_empty(tmp)) - { - core_info[i].required_hw_api = strdup(tmp); - core_info[i].required_hw_api_list = string_split(core_info[i].required_hw_api, "|"); - } - - free(tmp); - tmp = NULL; - } - - if (config_get_string(conf, "description", &tmp)) - { - if (!string_is_empty(tmp)) - core_info[i].description = strdup(tmp); - free(tmp); - tmp = NULL; - } - - if (tmp) - free(tmp); - tmp = NULL; - - { - bool tmp_bool = false; - if (config_get_bool(conf, "supports_no_game", - &tmp_bool)) - core_info[i].supports_no_game = tmp_bool; - - if (config_get_bool(conf, "database_match_archive_member", - &tmp_bool)) - core_info[i].database_match_archive_member = tmp_bool; - - if (config_get_bool(conf, "is_experimental", - &tmp_bool)) - core_info[i].is_experimental = tmp_bool; - } + if (config_get_bool(conf, "is_experimental", + &tmp_bool)) + core_info[i].is_experimental = tmp_bool; core_info[i].config_data = conf; } @@ -735,11 +677,47 @@ void core_info_free_current_core(core_info_state_t *p_coreinfo) bool core_info_init_current_core(void) { - core_info_state_t *p_coreinfo = coreinfo_get_ptr(); - core_info_t *current = (core_info_t*)calloc(1, sizeof(*current)); + core_info_state_t *p_coreinfo = coreinfo_get_ptr(); + core_info_t *current = (core_info_t*) + malloc(sizeof(*current)); if (!current) return false; - p_coreinfo->current = current; + current->supports_no_game = false; + current->database_match_archive_member = false; + current->is_experimental = false; + current->is_locked = false; + current->firmware_count = 0; + current->path = NULL; + current->config_data = NULL; + current->display_name = NULL; + current->display_version = NULL; + current->core_name = NULL; + current->system_manufacturer = NULL; + current->systemname = NULL; + current->system_id = NULL; + current->supported_extensions = NULL; + current->authors = NULL; + current->permissions = NULL; + current->licenses = NULL; + current->categories = NULL; + current->databases = NULL; + current->notes = NULL; + current->required_hw_api = NULL; + current->description = NULL; + current->categories_list = NULL; + current->databases_list = NULL; + current->note_list = NULL; + current->supported_extensions_list = NULL; + current->authors_list = NULL; + current->permissions_list = NULL; + current->licenses_list = NULL; + current->required_hw_api_list = NULL; + current->firmware = NULL; + current->core_file_id.str = NULL; + current->core_file_id.len = 0; + current->userdata = NULL; + + p_coreinfo->current = current; return true; } @@ -912,8 +890,9 @@ void core_info_get_name(const char *path, char *s, size_t len, for (i = 0; i < contents->size; i++) { + struct config_entry_list + *entry = NULL; config_file_t *conf = NULL; - char *new_core_name = NULL; const char *current_path = contents->elems[i].data; if (!string_is_equal(path_basename(current_path), core_path_basename)) @@ -925,13 +904,13 @@ void core_info_get_name(const char *path, char *s, size_t len, if (!conf) continue; - if (config_get_string(conf, get_display_name - ? "display_name" : "corename", - &new_core_name)) - { - strlcpy(s, new_core_name, len); - free(new_core_name); - } + if (get_display_name) + entry = config_get_entry(conf, "display_name", NULL); + else + entry = config_get_entry(conf, "corename", NULL); + + if (entry && !string_is_empty(entry->value)) + strlcpy(s, entry->value, len); config_file_free(conf); break; @@ -1077,17 +1056,17 @@ bool core_info_list_get_display_name(core_info_list_t *core_info_list, bool core_info_get_display_name(const char *path, char *s, size_t len) { - char *tmp = NULL; + struct config_entry_list + *entry = NULL; config_file_t *conf = config_file_new_from_path_to_string(path); if (!conf) return false; - if (config_get_string(conf, "display_name", &tmp)) - { - strlcpy(s, tmp, len); - free(tmp); - } + entry = config_get_entry(conf, "display_name", NULL); + + if (entry && !string_is_empty(entry->value)) + strlcpy(s, entry->value, len); config_file_free(conf); return true; @@ -1100,7 +1079,8 @@ bool core_info_get_display_name(const char *path, char *s, size_t len) * Returns NULL if 'path' is invalid. */ core_updater_info_t *core_info_get_core_updater_info(const char *path) { - char *tmp_str = NULL; + struct config_entry_list + *entry = NULL; bool tmp_bool = false; core_updater_info_t *info = NULL; config_file_t *conf = NULL; @@ -1115,53 +1095,39 @@ core_updater_info_t *core_info_get_core_updater_info(const char *path) return NULL; /* Create info struct */ - info = (core_updater_info_t*)calloc(1, sizeof(*info)); + info = (core_updater_info_t*)malloc(sizeof(*info)); if (!info) return NULL; + info->is_experimental = false; + info->display_name = NULL; + info->description = NULL; + info->licenses = NULL; + /* Fetch required parameters */ /* > is_experimental */ - info->is_experimental = false; if (config_get_bool(conf, "is_experimental", &tmp_bool)) - info->is_experimental = tmp_bool; + info->is_experimental = tmp_bool; /* > display_name */ - info->display_name = NULL; - if (config_get_string(conf, "display_name", &tmp_str)) - { - if (!string_is_empty(tmp_str)) - info->display_name = tmp_str; - else - free(tmp_str); + entry = config_get_entry(conf, "display_name", NULL); - tmp_str = NULL; - } + if (entry && !string_is_empty(entry->value)) + info->display_name = strdup(entry->value); /* > description */ - info->description = NULL; - if (config_get_string(conf, "description", &tmp_str)) - { - if (!string_is_empty(tmp_str)) - info->description = tmp_str; - else - free(tmp_str); + entry = config_get_entry(conf, "description", NULL); - tmp_str = NULL; - } + if (entry && !string_is_empty(entry->value)) + info->description = strdup(entry->value); /* > licenses */ - info->licenses = NULL; - if (config_get_string(conf, "license", &tmp_str)) - { - if (!string_is_empty(tmp_str)) - info->licenses = tmp_str; - else - free(tmp_str); + entry = config_get_entry(conf, "license", NULL); - tmp_str = NULL; - } + if (entry && !string_is_empty(entry->value)) + info->licenses = strdup(entry->value); /* Clean up */ config_file_free(conf); diff --git a/core_updater_list.c b/core_updater_list.c index 3bd973cbb0..60f7457b02 100644 --- a/core_updater_list.c +++ b/core_updater_list.c @@ -109,7 +109,7 @@ core_updater_list_t *core_updater_list_init(size_t max_size) return NULL; /* Create core updater list */ - core_list = (core_updater_list_t*)calloc(1, sizeof(*core_list)); + core_list = (core_updater_list_t*)malloc(sizeof(*core_list)); if (!core_list) return NULL; diff --git a/cores/libretro-ffmpeg/ffmpeg_core.c b/cores/libretro-ffmpeg/ffmpeg_core.c index c5f48592eb..c4c2d5e232 100644 --- a/cores/libretro-ffmpeg/ffmpeg_core.c +++ b/cores/libretro-ffmpeg/ffmpeg_core.c @@ -67,6 +67,8 @@ extern "C" { s ##_version() & 0xFF); static bool reset_triggered; +static bool libretro_supports_bitmasks = false; + static void fallback_log(enum retro_log_level level, const char *fmt, ...) { va_list va; @@ -193,11 +195,20 @@ static struct { unsigned width; unsigned height; - + double interpolate_fps; unsigned sample_rate; float aspect; + + struct + { + double time; + unsigned hours; + unsigned minutes; + unsigned seconds; + } duration; + } media; #ifdef HAVE_SSA @@ -231,10 +242,15 @@ void CORE_PREFIX(retro_init)(void) reset_triggered = false; av_register_all(); + + if (CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_GET_INPUT_BITMASKS, NULL)) + libretro_supports_bitmasks = true; } void CORE_PREFIX(retro_deinit)(void) -{} +{ + libretro_supports_bitmasks = false; +} unsigned CORE_PREFIX(retro_api_version)(void) { @@ -473,7 +489,13 @@ static void check_variables(bool firststart) static void seek_frame(int seek_frames) { char msg[256]; - struct retro_message msg_obj = {0}; + struct retro_message_ext msg_obj = {0}; + unsigned seek_hours = 0; + unsigned seek_minutes = 0; + unsigned seek_seconds = 0; + int8_t seek_progress = -1; + + msg[0] = '\0'; if ((seek_frames < 0 && (unsigned)-seek_frames > frame_cnt) || reset_triggered) frame_cnt = 0; @@ -484,10 +506,34 @@ static void seek_frame(int seek_frames) do_seek = true; seek_time = frame_cnt / media.interpolate_fps; - snprintf(msg, sizeof(msg), "Seek: %u s.", (unsigned)seek_time); - msg_obj.msg = msg; - msg_obj.frames = 180; - CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE, &msg_obj); + /* Convert seek time to a printable format */ + seek_seconds = (unsigned)seek_time; + seek_minutes = seek_seconds / 60; + seek_seconds %= 60; + seek_hours = seek_minutes / 60; + seek_minutes %= 60; + + snprintf(msg, sizeof(msg), "%02d:%02d:%02d / %02d:%02d:%02d", + seek_hours, seek_minutes, seek_seconds, + media.duration.hours, media.duration.minutes, media.duration.seconds); + + /* Get current progress */ + if (media.duration.time > 0.0) + { + seek_progress = (int8_t)((100.0 * seek_time / media.duration.time) + 0.5); + seek_progress = (seek_progress < -1) ? -1 : seek_progress; + seek_progress = (seek_progress > 100) ? 100 : seek_progress; + } + + /* Send message to frontend */ + msg_obj.msg = msg; + msg_obj.duration = 2000; + msg_obj.priority = 3; + msg_obj.level = RETRO_LOG_INFO; + msg_obj.target = RETRO_MESSAGE_TARGET_OSD; + msg_obj.type = RETRO_MESSAGE_TYPE_PROGRESS; + msg_obj.progress = seek_progress; + CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE_EXT, &msg_obj); if (seek_frames < 0) { @@ -522,6 +568,7 @@ void CORE_PREFIX(retro_run)(void) double min_pts; int16_t audio_buffer[2048]; bool left, right, up, down, l, r; + int16_t ret = 0; size_t to_read_frames = 0; int seek_frames = 0; bool updated = false; @@ -552,20 +599,28 @@ void CORE_PREFIX(retro_run)(void) CORE_PREFIX(input_poll_cb)(); - left = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_LEFT); - right = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_RIGHT); - up = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_UP) || - CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_WHEELUP); - down = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_DOWN) || - CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_WHEELDOWN); - l = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_L); - r = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, - RETRO_DEVICE_ID_JOYPAD_R); + if (libretro_supports_bitmasks) + ret = CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, + 0, RETRO_DEVICE_ID_JOYPAD_MASK); + else + { + unsigned i; + for (i = RETRO_DEVICE_ID_JOYPAD_B; i <= RETRO_DEVICE_ID_JOYPAD_R; i++) + if (CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_JOYPAD, 0, i)) + ret |= (1 << i); + } + + if (CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_WHEELUP)) + ret |= (1 << RETRO_DEVICE_ID_JOYPAD_UP); + if (CORE_PREFIX(input_state_cb)(0, RETRO_DEVICE_MOUSE, 0, RETRO_DEVICE_ID_MOUSE_WHEELDOWN)) + ret |= (1 << RETRO_DEVICE_ID_JOYPAD_DOWN); + + left = ret & (1 << RETRO_DEVICE_ID_JOYPAD_LEFT); + right = ret & (1 << RETRO_DEVICE_ID_JOYPAD_RIGHT); + up = ret & (1 << RETRO_DEVICE_ID_JOYPAD_UP); + down = ret & (1 << RETRO_DEVICE_ID_JOYPAD_DOWN); + l = ret & (1 << RETRO_DEVICE_ID_JOYPAD_L); + r = ret & (1 << RETRO_DEVICE_ID_JOYPAD_R); if (left && !last_left) seek_frames -= 10 * media.interpolate_fps; @@ -579,7 +634,9 @@ void CORE_PREFIX(retro_run)(void) if (l && !last_l && audio_streams_num > 0) { char msg[256]; - struct retro_message msg_obj = {0}; + struct retro_message_ext msg_obj = {0}; + + msg[0] = '\0'; slock_lock(decode_thread_lock); audio_streams_ptr = (audio_streams_ptr + 1) % audio_streams_num; @@ -587,23 +644,36 @@ void CORE_PREFIX(retro_run)(void) snprintf(msg, sizeof(msg), "Audio Track #%d.", audio_streams_ptr); - msg_obj.msg = msg; - msg_obj.frames = 180; - CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE, &msg_obj); + msg_obj.msg = msg; + msg_obj.duration = 3000; + msg_obj.priority = 1; + msg_obj.level = RETRO_LOG_INFO; + msg_obj.target = RETRO_MESSAGE_TARGET_ALL; + msg_obj.type = RETRO_MESSAGE_TYPE_NOTIFICATION; + msg_obj.progress = -1; + CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE_EXT, &msg_obj); } else if (r && !last_r && subtitle_streams_num > 0) { char msg[256]; - struct retro_message msg_obj = {0}; + struct retro_message_ext msg_obj = {0}; + + msg[0] = '\0'; slock_lock(decode_thread_lock); subtitle_streams_ptr = (subtitle_streams_ptr + 1) % subtitle_streams_num; slock_unlock(decode_thread_lock); snprintf(msg, sizeof(msg), "Subtitle Track #%d.", subtitle_streams_ptr); - msg_obj.msg = msg; - msg_obj.frames = 180; - CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE, &msg_obj); + + msg_obj.msg = msg; + msg_obj.duration = 3000; + msg_obj.priority = 1; + msg_obj.level = RETRO_LOG_INFO; + msg_obj.target = RETRO_MESSAGE_TARGET_ALL; + msg_obj.type = RETRO_MESSAGE_TYPE_NOTIFICATION; + msg_obj.progress = -1; + CORE_PREFIX(environ_cb)(RETRO_ENVIRONMENT_SET_MESSAGE_EXT, &msg_obj); } last_left = left; @@ -649,7 +719,7 @@ void CORE_PREFIX(retro_run)(void) to_read_bytes = to_read_frames * sizeof(int16_t) * 2; slock_lock(fifo_lock); - while (!decode_thread_dead && fifo_read_avail(audio_decode_fifo) < to_read_bytes) + while (!decode_thread_dead && FIFO_READ_AVAIL(audio_decode_fifo) < to_read_bytes) { main_sleeping = true; scond_signal(fifo_decode_cond); @@ -658,7 +728,7 @@ void CORE_PREFIX(retro_run)(void) } reading_pts = decode_last_audio_time - - (double)fifo_read_avail(audio_decode_fifo) / (media.sample_rate * sizeof(int16_t) * 2); + (double)FIFO_READ_AVAIL(audio_decode_fifo) / (media.sample_rate * sizeof(int16_t) * 2); expected_pts = (double)audio_frames / media.sample_rate; old_pts_bias = pts_bias; pts_bias = reading_pts - expected_pts; @@ -707,15 +777,17 @@ void CORE_PREFIX(retro_run)(void) if (!decode_thread_dead) { unsigned y; - const uint8_t *src; int stride, width; - uint32_t *data = video_frame_temp_buffer; - + const uint8_t *src = NULL; video_decoder_context_t *ctx = NULL; + uint32_t *data = NULL; + video_buffer_get_finished_slot(video_buffer, &ctx); pts = ctx->pts; -#ifndef HAVE_OPENGLES +#ifdef HAVE_OPENGLES + data = video_frame_temp_buffer; +#else glBindBuffer(GL_PIXEL_UNPACK_BUFFER, frames[1].pbo); #ifdef __MACH__ data = (uint32_t*)glMapBuffer(GL_PIXEL_UNPACK_BUFFER, GL_WRITE_ONLY); @@ -1190,6 +1262,28 @@ static bool init_media_info(void) av_q2d(vctx->sample_aspect_ratio) / vctx->height; } + if (fctx) + { + if (fctx->duration != AV_NOPTS_VALUE) + { + int64_t duration = fctx->duration + (fctx->duration <= INT64_MAX - 5000 ? 5000 : 0); + media.duration.time = (double)(duration / AV_TIME_BASE); + media.duration.seconds = (unsigned)media.duration.time; + media.duration.minutes = media.duration.seconds / 60; + media.duration.seconds %= 60; + media.duration.hours = media.duration.minutes / 60; + media.duration.minutes %= 60; + } + else + { + media.duration.time = 0.0; + media.duration.hours = 0; + media.duration.minutes = 0; + media.duration.seconds = 0; + log_cb(RETRO_LOG_ERROR, "[FFMPEG] Could not determine media duration\n"); + } + } + #ifdef HAVE_SSA if (sctx[0]) { @@ -1496,7 +1590,8 @@ static int16_t *decode_audio(AVCodecContext *ctx, AVPacket *pkt, pts = frame->best_effort_timestamp; slock_lock(fifo_lock); - while (!decode_thread_dead && fifo_write_avail(audio_decode_fifo) < required_buffer) + while (!decode_thread_dead && + FIFO_WRITE_AVAIL(audio_decode_fifo) < required_buffer) { if (!main_sleeping) scond_wait(fifo_decode_cond, fifo_lock); diff --git a/cores/libretro-ffmpeg/packet_buffer.c b/cores/libretro-ffmpeg/packet_buffer.c index 5b9fd7a06b..85fa8127a4 100644 --- a/cores/libretro-ffmpeg/packet_buffer.c +++ b/cores/libretro-ffmpeg/packet_buffer.c @@ -1,10 +1,12 @@ #include "packet_buffer.h" -struct AVPacketNode { +struct AVPacketNode +{ AVPacket *data; struct AVPacketNode *next; struct AVPacketNode *previous; }; + typedef struct AVPacketNode AVPacketNode_t; struct packet_buffer @@ -14,7 +16,7 @@ struct packet_buffer size_t size; }; -packet_buffer_t *packet_buffer_create() +packet_buffer_t *packet_buffer_create(void) { packet_buffer_t *b = (packet_buffer_t*)malloc(sizeof(packet_buffer_t)); if (!b) diff --git a/cores/libretro-ffmpeg/packet_buffer.h b/cores/libretro-ffmpeg/packet_buffer.h index 2cbf9cc656..f268be97f4 100644 --- a/cores/libretro-ffmpeg/packet_buffer.h +++ b/cores/libretro-ffmpeg/packet_buffer.h @@ -6,7 +6,13 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif #include +#ifdef __cplusplus +} +#endif #include diff --git a/cores/libretro-ffmpeg/video_buffer.c b/cores/libretro-ffmpeg/video_buffer.c index d59354ae09..603a5e89ad 100644 --- a/cores/libretro-ffmpeg/video_buffer.c +++ b/cores/libretro-ffmpeg/video_buffer.c @@ -1,4 +1,10 @@ +#ifdef __cplusplus +extern "C" { +#endif #include +#ifdef __cplusplus +} +#endif #include @@ -6,7 +12,7 @@ enum kbStatus { - KB_OPEN, + KB_OPEN = 0, KB_IN_PROGRESS, KB_FINISHED }; @@ -23,32 +29,41 @@ struct video_buffer int64_t tail; }; -video_buffer_t *video_buffer_create(size_t capacity, int frame_size, int width, int height) +video_buffer_t *video_buffer_create( + size_t capacity, int frame_size, int width, int height) { + unsigned i; video_buffer_t *b = (video_buffer_t*)malloc(sizeof(video_buffer_t)); if (!b) return NULL; - memset(b, 0, sizeof(video_buffer_t)); - b->capacity = capacity; + b->buffer = NULL; + b->capacity = capacity; + b->lock = NULL; + b->open_cond = NULL; + b->finished_cond = NULL; + b->head = 0; + b->tail = 0; + b->status = (enum kbStatus*)malloc(sizeof(enum kbStatus) * capacity); - b->status = (enum kbStatus*)malloc(sizeof(enum kbStatus) * capacity); if (!b->status) goto fail; - for (int i = 0; i < capacity; i++) - b->status[i] = KB_OPEN; - b->lock = slock_new(); - b->open_cond = scond_new(); + for (i = 0; i < capacity; i++) + b->status[i] = KB_OPEN; + + b->lock = slock_new(); + b->open_cond = scond_new(); b->finished_cond = scond_new(); if (!b->lock || !b->open_cond || !b->finished_cond) goto fail; - b->buffer = (video_decoder_context_t*)malloc(sizeof(video_decoder_context_t) * capacity); + b->buffer = (video_decoder_context_t*) + malloc(sizeof(video_decoder_context_t) * capacity); if (!b->buffer) goto fail; - for (int i = 0; i < capacity; i++) + for (i = 0; i < (unsigned)capacity; i++) { b->buffer[i].index = i; b->buffer[i].pts = 0; @@ -60,15 +75,17 @@ video_buffer_t *video_buffer_create(size_t capacity, int frame_size, int width, b->buffer[i].target = av_frame_alloc(); b->buffer[i].frame_buf = (uint8_t*)av_malloc(frame_size); - avpicture_fill((AVPicture*)b->buffer[i].target, (const uint8_t*)b->buffer[i].frame_buf, + avpicture_fill((AVPicture*) + b->buffer[i].target, + (const uint8_t*)b->buffer[i].frame_buf, PIX_FMT_RGB32, width, height); - if (!b->buffer[i].sws || - !b->buffer[i].source || + if (!b->buffer[i].sws || + !b->buffer[i].source || #if LIBAVUTIL_VERSION_MAJOR > 55 !b->buffer[i].hw_source || #endif - !b->buffer[i].target || + !b->buffer[i].target || !b->buffer[i].frame_buf) goto fail; } @@ -81,6 +98,7 @@ fail: void video_buffer_destroy(video_buffer_t *video_buffer) { + unsigned i; if (!video_buffer) return; @@ -89,22 +107,25 @@ void video_buffer_destroy(video_buffer_t *video_buffer) scond_free(video_buffer->finished_cond); free(video_buffer->status); if (video_buffer->buffer) - for (int i = 0; i < video_buffer->capacity; i++) + { + for (i = 0; i < video_buffer->capacity; i++) { - #if LIBAVUTIL_VERSION_MAJOR > 55 +#if LIBAVUTIL_VERSION_MAJOR > 55 av_frame_free(&video_buffer->buffer[i].hw_source); - #endif +#endif av_frame_free(&video_buffer->buffer[i].source); av_frame_free(&video_buffer->buffer[i].target); av_freep(&video_buffer->buffer[i].frame_buf); sws_freeContext(video_buffer->buffer[i].sws); } + } free(video_buffer->buffer); free(video_buffer); } void video_buffer_clear(video_buffer_t *video_buffer) { + unsigned i; if (!video_buffer) return; @@ -115,13 +136,14 @@ void video_buffer_clear(video_buffer_t *video_buffer) video_buffer->head = 0; video_buffer->tail = 0; - for (int i = 0; i < video_buffer->capacity; i++) + for (i = 0; i < video_buffer->capacity; i++) video_buffer->status[i] = KB_OPEN; slock_unlock(video_buffer->lock); } -void video_buffer_get_open_slot(video_buffer_t *video_buffer, video_decoder_context_t **context) +void video_buffer_get_open_slot( + video_buffer_t *video_buffer, video_decoder_context_t **context) { slock_lock(video_buffer->lock); @@ -136,7 +158,8 @@ void video_buffer_get_open_slot(video_buffer_t *video_buffer, video_decoder_cont slock_unlock(video_buffer->lock); } -void video_buffer_return_open_slot(video_buffer_t *video_buffer, video_decoder_context_t *context) +void video_buffer_return_open_slot( + video_buffer_t *video_buffer, video_decoder_context_t *context) { slock_lock(video_buffer->lock); @@ -150,7 +173,9 @@ void video_buffer_return_open_slot(video_buffer_t *video_buffer, video_decoder_c slock_unlock(video_buffer->lock); } -void video_buffer_open_slot(video_buffer_t *video_buffer, video_decoder_context_t *context) +void video_buffer_open_slot( + video_buffer_t *video_buffer, + video_decoder_context_t *context) { slock_lock(video_buffer->lock); @@ -165,7 +190,9 @@ void video_buffer_open_slot(video_buffer_t *video_buffer, video_decoder_context_ slock_unlock(video_buffer->lock); } -void video_buffer_get_finished_slot(video_buffer_t *video_buffer, video_decoder_context_t **context) +void video_buffer_get_finished_slot( + video_buffer_t *video_buffer, + video_decoder_context_t **context) { slock_lock(video_buffer->lock); @@ -175,7 +202,9 @@ void video_buffer_get_finished_slot(video_buffer_t *video_buffer, video_decoder_ slock_unlock(video_buffer->lock); } -void video_buffer_finish_slot(video_buffer_t *video_buffer, video_decoder_context_t *context) +void video_buffer_finish_slot( + video_buffer_t *video_buffer, + video_decoder_context_t *context) { slock_lock(video_buffer->lock); diff --git a/cores/libretro-ffmpeg/video_buffer.h b/cores/libretro-ffmpeg/video_buffer.h index d9b5d3bd3a..c5ea2093a5 100644 --- a/cores/libretro-ffmpeg/video_buffer.h +++ b/cores/libretro-ffmpeg/video_buffer.h @@ -10,9 +10,17 @@ #include #endif +#ifdef __cplusplus +extern "C" { +#endif + #include #include +#ifdef __cplusplus +} +#endif + #include RETRO_BEGIN_DECLS diff --git a/ctr/ctr_system.c b/ctr/ctr_system.c index 515eab1f50..4f690d6eaa 100644 --- a/ctr/ctr_system.c +++ b/ctr/ctr_system.c @@ -82,9 +82,8 @@ void __attribute__((weak)) __libctru_init(void (*retAddr)(void)) { /* Store the return address */ __system_retAddr = NULL; - if (envIsHomebrew()) { + if (envIsHomebrew()) __system_retAddr = retAddr; - } /* Initialize the synchronization subsystem */ __sync_init(); diff --git a/ctr/gpu_old.c b/ctr/gpu_old.c index c79ff9ffc0..249418387e 100644 --- a/ctr/gpu_old.c +++ b/ctr/gpu_old.c @@ -28,11 +28,12 @@ void GPU_Reset(u32* gxbuf, u32* gpuBuf, u32 gpuBufSize) void GPU_SetFloatUniform(GPU_SHADER_TYPE type, u32 startreg, u32* data, u32 numreg) { - int regOffset; - if(!data) + int regOffset = 0x0;; + if (!data) return; - regOffset = (type == GPU_GEOMETRY_SHADER) ? (-0x30) : (0x0); + if (type == GPU_GEOMETRY_SHADER) + regOffset = (-0x30); GPUCMD_AddWrite(GPUREG_VSH_FLOATUNIFORM_CONFIG+regOffset, 0x80000000 | startreg); @@ -153,28 +154,28 @@ void GPU_SetTextureEnable(GPU_TEXUNIT units) void GPU_SetTexture(GPU_TEXUNIT unit, u32* data, u16 width, u16 height, u32 param, GPU_TEXCOLOR colorType) { switch (unit) - { - case GPU_TEXUNIT0: - GPUCMD_AddWrite(GPUREG_TEXUNIT0_TYPE, colorType); - GPUCMD_AddWrite(GPUREG_TEXUNIT0_ADDR1, ((u32)data) >> 3); - GPUCMD_AddWrite(GPUREG_TEXUNIT0_DIM, (width << 16)|height); - GPUCMD_AddWrite(GPUREG_TEXUNIT0_PARAM, param); - break; + { + case GPU_TEXUNIT0: + GPUCMD_AddWrite(GPUREG_TEXUNIT0_TYPE, colorType); + GPUCMD_AddWrite(GPUREG_TEXUNIT0_ADDR1, ((u32)data) >> 3); + GPUCMD_AddWrite(GPUREG_TEXUNIT0_DIM, (width << 16)|height); + GPUCMD_AddWrite(GPUREG_TEXUNIT0_PARAM, param); + break; - case GPU_TEXUNIT1: - GPUCMD_AddWrite(GPUREG_TEXUNIT1_TYPE, colorType); - GPUCMD_AddWrite(GPUREG_TEXUNIT1_ADDR, ((u32)data) >> 3); - GPUCMD_AddWrite(GPUREG_TEXUNIT1_DIM, (width << 16)|height); - GPUCMD_AddWrite(GPUREG_TEXUNIT1_PARAM, param); - break; + case GPU_TEXUNIT1: + GPUCMD_AddWrite(GPUREG_TEXUNIT1_TYPE, colorType); + GPUCMD_AddWrite(GPUREG_TEXUNIT1_ADDR, ((u32)data) >> 3); + GPUCMD_AddWrite(GPUREG_TEXUNIT1_DIM, (width << 16)|height); + GPUCMD_AddWrite(GPUREG_TEXUNIT1_PARAM, param); + break; - case GPU_TEXUNIT2: - GPUCMD_AddWrite(GPUREG_TEXUNIT2_TYPE, colorType); - GPUCMD_AddWrite(GPUREG_TEXUNIT2_ADDR, ((u32)data) >> 3); - GPUCMD_AddWrite(GPUREG_TEXUNIT2_DIM, (width << 16)|height); - GPUCMD_AddWrite(GPUREG_TEXUNIT2_PARAM, param); - break; - } + case GPU_TEXUNIT2: + GPUCMD_AddWrite(GPUREG_TEXUNIT2_TYPE, colorType); + GPUCMD_AddWrite(GPUREG_TEXUNIT2_ADDR, ((u32)data) >> 3); + GPUCMD_AddWrite(GPUREG_TEXUNIT2_DIM, (width << 16)|height); + GPUCMD_AddWrite(GPUREG_TEXUNIT2_PARAM, param); + break; + } } void GPU_SetTextureBorderColor(GPU_TEXUNIT unit,u32 borderColor) @@ -266,7 +267,6 @@ void GPU_SetTexEnv(u8 id, u16 rgbSources, u16 alphaSources, u16 rgbOperands, u16 u32 param[0x5]; if(id > 6) return; - memset(param, 0x00, 5*4); param[0x0] = (alphaSources << 16) | (rgbSources); param[0x1] = (alphaOperands << 12) | (rgbOperands); diff --git a/database_info.c b/database_info.c index b5fe450856..6f9fe9366c 100644 --- a/database_info.c +++ b/database_info.c @@ -217,7 +217,8 @@ static int database_cursor_iterate(libretrodb_cursor_t *cur, if (!string_is_empty(val_string)) db_info->franchise = strdup(val_string); } - else if (string_ends_with(str, "_rating")) + else if (string_ends_with_size(str, "_rating", + strlen(str), STRLEN_CONST("_rating"))) { if (string_is_equal(str, "bbfc_rating")) { @@ -364,7 +365,7 @@ database_info_handle_t *database_info_dir_init(const char *dir, core_info_list_t *core_info_list = NULL; struct string_list *list = NULL; database_info_handle_t *db = (database_info_handle_t*) - calloc(1, sizeof(*db)); + malloc(sizeof(*db)); if (!db) return NULL; @@ -383,10 +384,10 @@ database_info_handle_t *database_info_dir_init(const char *dir, dir_list_prioritize(list); - db->list = list; - db->list_ptr = 0; - db->status = DATABASE_STATUS_ITERATE; - db->type = type; + db->status = DATABASE_STATUS_ITERATE; + db->type = type; + db->list_ptr = 0; + db->list = list; return db; } @@ -397,7 +398,7 @@ database_info_handle_t *database_info_file_init(const char *path, union string_list_elem_attr attr; struct string_list *list = NULL; database_info_handle_t *db = (database_info_handle_t*) - calloc(1, sizeof(*db)); + malloc(sizeof(*db)); if (!db) return NULL; @@ -414,10 +415,10 @@ database_info_handle_t *database_info_file_init(const char *path, string_list_append(list, path, attr); - db->list_ptr = 0; - db->list = list; - db->status = DATABASE_STATUS_ITERATE; - db->type = type; + db->status = DATABASE_STATUS_ITERATE; + db->type = type; + db->list_ptr = 0; + db->list = list; return db; } @@ -498,6 +499,10 @@ database_info_list_t *database_info_list_new( free(db_info.rom_name); if (db_info.serial) free(db_info.serial); + if (db_info.md5) + free(db_info.md5); + if (db_info.sha1) + free(db_info.sha1); database_info_list_free(database_info_list); free(database_info); free(database_info_list); diff --git a/database_info.h b/database_info.h index 5349269a90..bba0c525ee 100644 --- a/database_info.h +++ b/database_info.h @@ -76,7 +76,6 @@ typedef struct enum database_type type; size_t list_ptr; struct string_list *list; - file_archive_transfer_t state; } database_info_handle_t; typedef struct diff --git a/deps/7zip/7zDec.c b/deps/7zip/7zDec.c index 4ed17b2340..71943924a9 100644 --- a/deps/7zip/7zDec.c +++ b/deps/7zip/7zDec.c @@ -23,44 +23,60 @@ #define k_SPARC 0x03030805 #define k_BCJ2 0x0303011B -static SRes SzDecodeLzma(CSzCoderInfo *coder, uint64_t inSize, ILookInStream *inStream, - uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain) +static SRes SzDecodeLzma(CSzCoderInfo *coder, + uint64_t inSize, ILookInStream *inStream, + uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain) { + int result; CLzmaDec state; - SRes res = SZ_OK; + SRes res = SZ_OK; LzmaDec_Construct(&state); - RINOK(LzmaDec_AllocateProbs(&state, coder->Props.data, (unsigned)coder->Props.size, allocMain)); - state.dic = outBuffer; + result = LzmaDec_AllocateProbs( + &state, coder->Props.data, + (unsigned)coder->Props.size, allocMain); + if (result != 0) + return result; + state.dic = outBuffer; state.dicBufSize = outSize; LzmaDec_Init(&state); for (;;) { - uint8_t *inBuf = NULL; + uint8_t *inBuf = NULL; size_t lookahead = (1 << 18); if (lookahead > inSize) - lookahead = (size_t)inSize; - res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead); + lookahead = (size_t)inSize; + res = inStream->Look( + (void *)inStream, (const void **)&inBuf, &lookahead); + if (res != SZ_OK) break; { - size_t inProcessed = (size_t)lookahead, dicPos = state.dicPos; ELzmaStatus status; - res = LzmaDec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); - lookahead -= inProcessed; - inSize -= inProcessed; + size_t inProcessed = (size_t)lookahead, dicPos = state.dicPos; + res = LzmaDec_DecodeToDic( + &state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) break; - if (state.dicPos == state.dicBufSize || (inProcessed == 0 && dicPos == state.dicPos)) + + if ( + state.dicPos == state.dicBufSize || + (inProcessed == 0 && dicPos == state.dicPos)) { - if (state.dicBufSize != outSize || lookahead != 0 || + if ( + state.dicBufSize != outSize || + lookahead != 0 || (status != LZMA_STATUS_FINISHED_WITH_MARK && status != LZMA_STATUS_MAYBE_FINISHED_WITHOUT_MARK)) res = SZ_ERROR_DATA; break; } + res = inStream->Skip((void *)inStream, inProcessed); if (res != SZ_OK) break; @@ -71,153 +87,185 @@ static SRes SzDecodeLzma(CSzCoderInfo *coder, uint64_t inSize, ILookInStream *in return res; } -static SRes SzDecodeLzma2(CSzCoderInfo *coder, uint64_t inSize, ILookInStream *inStream, - uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain) +static SRes SzDecodeLzma2(CSzCoderInfo *coder, + uint64_t inSize, ILookInStream *inStream, + uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain) { - CLzma2Dec state; - SRes res = SZ_OK; + int result; + CLzma2Dec state; + SRes res = SZ_OK; - Lzma2Dec_Construct(&state); - if (coder->Props.size != 1) - return SZ_ERROR_DATA; - RINOK(Lzma2Dec_AllocateProbs(&state, coder->Props.data[0], allocMain)); - state.decoder.dic = outBuffer; - state.decoder.dicBufSize = outSize; - Lzma2Dec_Init(&state); + Lzma2Dec_Construct(&state); + if (coder->Props.size != 1) + return SZ_ERROR_DATA; - for (;;) - { - uint8_t *inBuf = NULL; - size_t lookahead = (1 << 18); - if (lookahead > inSize) - lookahead = (size_t)inSize; - res = inStream->Look((void *)inStream, (const void **)&inBuf, &lookahead); - if (res != SZ_OK) - break; + result = Lzma2Dec_AllocateProbs(&state, coder->Props.data[0], allocMain); + if (result != 0) + return result; - { - size_t inProcessed = (size_t)lookahead, dicPos = state.decoder.dicPos; - ELzmaStatus status; - res = Lzma2Dec_DecodeToDic(&state, outSize, inBuf, &inProcessed, LZMA_FINISH_END, &status); - lookahead -= inProcessed; - inSize -= inProcessed; + state.decoder.dic = outBuffer; + state.decoder.dicBufSize = outSize; + Lzma2Dec_Init(&state); + + for (;;) + { + uint8_t *inBuf = NULL; + size_t lookahead = (1 << 18); + if (lookahead > inSize) + lookahead = (size_t)inSize; + res = inStream->Look( + (void *)inStream, (const void **)&inBuf, &lookahead); if (res != SZ_OK) - break; - if (state.decoder.dicPos == state.decoder.dicBufSize || (inProcessed == 0 && dicPos == state.decoder.dicPos)) + break; + { - if (state.decoder.dicBufSize != outSize || lookahead != 0 || - (status != LZMA_STATUS_FINISHED_WITH_MARK)) - res = SZ_ERROR_DATA; - break; + ELzmaStatus status; + size_t inProcessed = (size_t)lookahead, dicPos = state.decoder.dicPos; + res = Lzma2Dec_DecodeToDic( + &state, outSize, inBuf, &inProcessed, + LZMA_FINISH_END, &status); + lookahead -= inProcessed; + inSize -= inProcessed; + if (res != SZ_OK) + break; + if ( + state.decoder.dicPos == state.decoder.dicBufSize || + (inProcessed == 0 && dicPos == state.decoder.dicPos)) + { + if (state.decoder.dicBufSize != outSize || lookahead != 0 || + (status != LZMA_STATUS_FINISHED_WITH_MARK)) + res = SZ_ERROR_DATA; + break; + } + res = inStream->Skip((void *)inStream, inProcessed); + if (res != SZ_OK) + break; } - res = inStream->Skip((void *)inStream, inProcessed); - if (res != SZ_OK) - break; - } - } + } - Lzma2Dec_FreeProbs(&state, allocMain); - return res; + Lzma2Dec_FreeProbs(&state, allocMain); + return res; } -static SRes SzDecodeCopy(uint64_t inSize, ILookInStream *inStream, uint8_t *outBuffer) +static SRes SzDecodeCopy(uint64_t inSize, + ILookInStream *inStream, uint8_t *outBuffer) { - while (inSize > 0) - { - void *inBuf; - size_t curSize = (1 << 18); - if (curSize > inSize) - curSize = (size_t)inSize; - RINOK(inStream->Look((void *)inStream, (const void **)&inBuf, &curSize)); - if (curSize == 0) - return SZ_ERROR_INPUT_EOF; - memcpy(outBuffer, inBuf, curSize); - outBuffer += curSize; - inSize -= curSize; - RINOK(inStream->Skip((void *)inStream, curSize)); - } - return SZ_OK; + while (inSize > 0) + { + int result; + void *inBuf = NULL; + size_t curSize = (1 << 18); + if (curSize > inSize) + curSize = (size_t)inSize; + result = inStream->Look( + (void *)inStream, (const void **)&inBuf, &curSize); + + if (result != 0) + return result; + if (curSize == 0) + return SZ_ERROR_INPUT_EOF; + + memcpy(outBuffer, inBuf, curSize); + outBuffer += curSize; + inSize -= curSize; + result = inStream->Skip((void *)inStream, curSize); + + if (result != 0) + return result; + } + return SZ_OK; } -static bool IS_MAIN_METHOD(uint32_t m) +static bool is_main_method(uint32_t m) { - switch(m) - { - case k_Copy: - case k_LZMA: - case k_LZMA2: - return true; - } - return false; + switch(m) + { + case k_Copy: + case k_LZMA: + case k_LZMA2: + return true; + default: + break; + } + return false; } -static bool IS_SUPPORTED_CODER(const CSzCoderInfo *c) +static bool is_supported_coder(const CSzCoderInfo *c) { return c->NumInStreams == 1 && c->NumOutStreams == 1 && c->MethodID <= (uint32_t)0xFFFFFFFF && - IS_MAIN_METHOD((uint32_t)c->MethodID); + is_main_method((uint32_t)c->MethodID); } #define IS_BCJ2(c) ((c)->MethodID == k_BCJ2 && (c)->NumInStreams == 4 && (c)->NumOutStreams == 1) -static SRes CheckSupportedFolder(const CSzFolder *f) +static SRes check_supported_folder(const CSzFolder *f) { if (f->NumCoders < 1 || f->NumCoders > 4) return SZ_ERROR_UNSUPPORTED; - if (!IS_SUPPORTED_CODER(&f->Coders[0])) + + if (!is_supported_coder(&f->Coders[0])) return SZ_ERROR_UNSUPPORTED; - if (f->NumCoders == 1) + + switch (f->NumCoders) { - if (f->NumPackStreams != 1 || f->PackStreams[0] != 0 || f->NumBindPairs != 0) - return SZ_ERROR_UNSUPPORTED; - return SZ_OK; - } - if (f->NumCoders == 2) - { - CSzCoderInfo *c = &f->Coders[1]; - if (c->MethodID > (uint32_t)0xFFFFFFFF || - c->NumInStreams != 1 || - c->NumOutStreams != 1 || - f->NumPackStreams != 1 || - f->PackStreams[0] != 0 || - f->NumBindPairs != 1 || - f->BindPairs[0].InIndex != 1 || - f->BindPairs[0].OutIndex != 0) - return SZ_ERROR_UNSUPPORTED; - switch ((uint32_t)c->MethodID) - { - case k_BCJ: - case k_ARM: - break; - default: - return SZ_ERROR_UNSUPPORTED; - } - return SZ_OK; - } - if (f->NumCoders == 4) - { - if (!IS_SUPPORTED_CODER(&f->Coders[1]) || - !IS_SUPPORTED_CODER(&f->Coders[2]) || - !IS_BCJ2(&f->Coders[3])) - return SZ_ERROR_UNSUPPORTED; - if (f->NumPackStreams != 4 || - f->PackStreams[0] != 2 || - f->PackStreams[1] != 6 || - f->PackStreams[2] != 1 || - f->PackStreams[3] != 0 || - f->NumBindPairs != 3 || - f->BindPairs[0].InIndex != 5 || f->BindPairs[0].OutIndex != 0 || - f->BindPairs[1].InIndex != 4 || f->BindPairs[1].OutIndex != 1 || - f->BindPairs[2].InIndex != 3 || f->BindPairs[2].OutIndex != 2) - return SZ_ERROR_UNSUPPORTED; - return SZ_OK; + case 1: + if ( f->NumPackStreams != 1 + || f->PackStreams[0] != 0 + || f->NumBindPairs != 0) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; + case 2: + { + CSzCoderInfo *c = &f->Coders[1]; + + if (c->MethodID > (uint32_t)0xFFFFFFFF || + c->NumInStreams != 1 || + c->NumOutStreams != 1 || + f->NumPackStreams != 1 || + f->PackStreams[0] != 0 || + f->NumBindPairs != 1 || + f->BindPairs[0].InIndex != 1 || + f->BindPairs[0].OutIndex != 0) + return SZ_ERROR_UNSUPPORTED; + + switch ((uint32_t)c->MethodID) + { + case k_BCJ: + case k_ARM: + break; + default: + return SZ_ERROR_UNSUPPORTED; + } + } + return SZ_OK; + case 4: + if (!is_supported_coder(&f->Coders[1]) || + !is_supported_coder(&f->Coders[2]) || + !IS_BCJ2(&f->Coders[3])) + return SZ_ERROR_UNSUPPORTED; + + if (f->NumPackStreams != 4 || + f->PackStreams[0] != 2 || + f->PackStreams[1] != 6 || + f->PackStreams[2] != 1 || + f->PackStreams[3] != 0 || + f->NumBindPairs != 3 || + f->BindPairs[0].InIndex != 5 || + f->BindPairs[0].OutIndex != 0 || + f->BindPairs[1].InIndex != 4 || + f->BindPairs[1].OutIndex != 1 || + f->BindPairs[2].InIndex != 3 || + f->BindPairs[2].OutIndex != 2) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; } return SZ_ERROR_UNSUPPORTED; } -static uint64_t GetSum(const uint64_t *values, uint32_t idx) +static uint64_t get_sum(const uint64_t *values, uint32_t idx) { uint64_t sum = 0; uint32_t i; @@ -226,134 +274,169 @@ static uint64_t GetSum(const uint64_t *values, uint32_t idx) return sum; } -#define CASE_BRA_CONV(isa) case k_ ## isa: isa ## _Convert(outBuffer, outSize, 0, 0); break; - -static SRes SzFolder_Decode2(const CSzFolder *folder, const uint64_t *packSizes, - ILookInStream *inStream, uint64_t startPos, - uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain, - uint8_t *tempBuf[]) +static SRes SzFolder_Decode2(const CSzFolder *folder, + const uint64_t *packSizes, + ILookInStream *inStream, uint64_t startPos, + uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain, + uint8_t *tempBuf[]) { - uint32_t ci; - size_t tempSizes[3] = { 0, 0, 0}; - size_t tempSize3 = 0; - uint8_t *tempBuf3 = 0; + uint32_t ci; + size_t tempSizes[3] = { 0, 0, 0}; + size_t tempSize3 = 0; + uint8_t *tempBuf3 = 0; + int result = check_supported_folder(folder); - RINOK(CheckSupportedFolder(folder)); + if (result != 0) + return result; - for (ci = 0; ci < folder->NumCoders; ci++) - { - CSzCoderInfo *coder = &folder->Coders[ci]; + for (ci = 0; ci < folder->NumCoders; ci++) + { + CSzCoderInfo *coder = &folder->Coders[ci]; - if (IS_MAIN_METHOD((uint32_t)coder->MethodID)) - { - uint32_t si = 0; - uint64_t offset; - uint64_t inSize; - uint8_t *outBufCur = outBuffer; - size_t outSizeCur = outSize; - if (folder->NumCoders == 4) + if (is_main_method((uint32_t)coder->MethodID)) { - uint32_t indices[] = { 3, 2, 0 }; - uint64_t unpackSize = folder->UnpackSizes[ci]; - si = indices[ci]; - if (ci < 2) - { - uint8_t *temp; - outSizeCur = (size_t)unpackSize; - if (outSizeCur != unpackSize) + int result; + uint64_t offset = 0; + uint64_t inSize = 0; + uint32_t si = 0; + uint8_t *outBufCur = outBuffer; + size_t outSizeCur = outSize; + + if (folder->NumCoders == 4) + { + uint32_t indices[] = { 3, 2, 0 }; + uint64_t unpackSize = folder->UnpackSizes[ci]; + si = indices[ci]; + + if (ci < 2) + { + uint8_t *temp; + outSizeCur = (size_t)unpackSize; + if (outSizeCur != unpackSize) + return SZ_ERROR_MEM; + temp = (uint8_t *)IAlloc_Alloc(allocMain, outSizeCur); + if (temp == 0 && outSizeCur != 0) + return SZ_ERROR_MEM; + outBufCur = tempBuf[1 - ci] = temp; + tempSizes[1 - ci] = outSizeCur; + } + else if (ci == 2) + { + if (unpackSize > outSize) /* check it */ + return SZ_ERROR_PARAM; + tempBuf3 = outBufCur = outBuffer + + (outSize - (size_t)unpackSize); + tempSize3 = outSizeCur = (size_t)unpackSize; + } + else + return SZ_ERROR_UNSUPPORTED; + } + + offset = get_sum(packSizes, si); + inSize = packSizes[si]; + result = LookInStream_SeekTo(inStream, startPos + offset); + + if (result != 0) + return result; + + switch (coder->MethodID) + { + case k_Copy: + if (inSize != outSizeCur) /* check it */ + return SZ_ERROR_DATA; + result = SzDecodeCopy(inSize, inStream, outBufCur); + if (result != 0) + return result; + break; + case k_LZMA: + result = SzDecodeLzma( + coder, inSize, inStream, + outBufCur, outSizeCur, allocMain); + if (result != 0) + return result; + break; + case k_LZMA2: + result = SzDecodeLzma2( + coder, inSize, inStream, + outBufCur, outSizeCur, allocMain); + if (result != 0) + return result; + break; + default: + return SZ_ERROR_UNSUPPORTED; + } + } + else if (coder->MethodID == k_BCJ2) + { + SRes res; + int result; + uint64_t offset = get_sum(packSizes, 1); + uint64_t s3Size = packSizes[1]; + + if (ci != 3) + return SZ_ERROR_UNSUPPORTED; + + result = LookInStream_SeekTo(inStream, startPos + offset); + + if (result != 0) + return result; + + tempSizes[2] = (size_t)s3Size; + if (tempSizes[2] != s3Size) return SZ_ERROR_MEM; - temp = (uint8_t *)IAlloc_Alloc(allocMain, outSizeCur); - if (temp == 0 && outSizeCur != 0) - return SZ_ERROR_MEM; - outBufCur = tempBuf[1 - ci] = temp; - tempSizes[1 - ci] = outSizeCur; - } - else if (ci == 2) - { - if (unpackSize > outSize) /* check it */ - return SZ_ERROR_PARAM; - tempBuf3 = outBufCur = outBuffer + (outSize - (size_t)unpackSize); - tempSize3 = outSizeCur = (size_t)unpackSize; - } - else - return SZ_ERROR_UNSUPPORTED; - } - offset = GetSum(packSizes, si); - inSize = packSizes[si]; - RINOK(LookInStream_SeekTo(inStream, startPos + offset)); - if (coder->MethodID == k_Copy) - { - if (inSize != outSizeCur) /* check it */ - return SZ_ERROR_DATA; - RINOK(SzDecodeCopy(inSize, inStream, outBufCur)); - } - else if (coder->MethodID == k_LZMA) - { - RINOK(SzDecodeLzma(coder, inSize, inStream, outBufCur, outSizeCur, allocMain)); - } - else if (coder->MethodID == k_LZMA2) - { - RINOK(SzDecodeLzma2(coder, inSize, inStream, outBufCur, outSizeCur, allocMain)); + tempBuf[2] = (uint8_t *)IAlloc_Alloc(allocMain, tempSizes[2]); + if (tempBuf[2] == 0 && tempSizes[2] != 0) + return SZ_ERROR_MEM; + + res = SzDecodeCopy(s3Size, inStream, tempBuf[2]); + if (res != 0) + return res; + + res = Bcj2_Decode( + tempBuf3, tempSize3, + tempBuf[0], tempSizes[0], + tempBuf[1], tempSizes[1], + tempBuf[2], tempSizes[2], + outBuffer, outSize); + + if (res != 0) + return res; } else - return SZ_ERROR_UNSUPPORTED; - } - else if (coder->MethodID == k_BCJ2) - { - uint64_t offset = GetSum(packSizes, 1); - uint64_t s3Size = packSizes[1]; - SRes res; - if (ci != 3) - return SZ_ERROR_UNSUPPORTED; - RINOK(LookInStream_SeekTo(inStream, startPos + offset)); - tempSizes[2] = (size_t)s3Size; - if (tempSizes[2] != s3Size) - return SZ_ERROR_MEM; - tempBuf[2] = (uint8_t *)IAlloc_Alloc(allocMain, tempSizes[2]); - if (tempBuf[2] == 0 && tempSizes[2] != 0) - return SZ_ERROR_MEM; - res = SzDecodeCopy(s3Size, inStream, tempBuf[2]); - RINOK(res) - - res = Bcj2_Decode( - tempBuf3, tempSize3, - tempBuf[0], tempSizes[0], - tempBuf[1], tempSizes[1], - tempBuf[2], tempSizes[2], - outBuffer, outSize); - RINOK(res) - } - else - { - if (ci != 1) - return SZ_ERROR_UNSUPPORTED; - switch(coder->MethodID) { - case k_BCJ: - { - uint32_t state; - x86_Convert_Init(state); - x86_Convert(outBuffer, outSize, 0, &state, 0); - break; - } - CASE_BRA_CONV(ARM) - default: - return SZ_ERROR_UNSUPPORTED; + if (ci != 1) + return SZ_ERROR_UNSUPPORTED; + switch(coder->MethodID) + { + case k_BCJ: + { + uint32_t state; + x86_Convert_Init(state); + x86_Convert(outBuffer, outSize, 0, &state, 0); + break; + } + case k_ARM: + ARM_Convert(outBuffer, outSize, 0, 0); + break; + default: + return SZ_ERROR_UNSUPPORTED; + } } - } - } - return SZ_OK; + } + return SZ_OK; } SRes SzFolder_Decode(const CSzFolder *folder, const uint64_t *packSizes, ILookInStream *inStream, uint64_t startPos, uint8_t *outBuffer, size_t outSize, ISzAlloc *allocMain) { - uint8_t *tempBuf[3] = { 0, 0, 0}; int i; - SRes res = SzFolder_Decode2(folder, packSizes, inStream, startPos, - outBuffer, (size_t)outSize, allocMain, tempBuf); + uint8_t *tempBuf[3] = { 0, 0, 0}; + SRes res = SzFolder_Decode2(folder, + packSizes, inStream, startPos, + outBuffer, (size_t)outSize, allocMain, tempBuf); + for (i = 0; i < 3; i++) IAlloc_Free(allocMain, tempBuf[i]); return res; diff --git a/deps/7zip/7zFile.c b/deps/7zip/7zFile.c index 6dc10da40c..25f4452f91 100644 --- a/deps/7zip/7zFile.c +++ b/deps/7zip/7zFile.c @@ -2,236 +2,110 @@ 2009-11-24 : Igor Pavlov : Public domain */ #include +#define SKIP_STDIO_REDEFINES +#include #include "7zFile.h" -#ifndef USE_WINDOWS_FILE - #ifndef UNDER_CE #include #endif -#else - -/* - ReadFile and WriteFile functions in Windows have BUG: - If you Read or Write 64MB or more (probably min_failure_size = 64MB - 32KB + 1) - from/to Network file, it returns ERROR_NO_SYSTEM_RESOURCES - (Insufficient system resources exist to complete the requested service). - Probably in some version of Windows there are problems with other sizes: - for 32 MB (maybe also for 16 MB). - And message can be "Network connection was lost" - */ - -#define kChunkSizeMax (1 << 22) - -#endif - void File_Construct(CSzFile *p) { -#ifdef USE_WINDOWS_FILE - p->handle = INVALID_HANDLE_VALUE; -#else p->file = NULL; -#endif } -#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) static WRes File_Open(CSzFile *p, const char *name, int writeMode) { -#ifdef USE_WINDOWS_FILE - p->handle = CreateFileA(name, - writeMode ? GENERIC_WRITE : GENERIC_READ, - FILE_SHARE_READ, NULL, - writeMode ? CREATE_ALWAYS : OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); -#else - p->file = fopen(name, writeMode ? "wb+" : "rb"); - return (p->file != 0) ? 0 : + p->file = rfopen(name, writeMode ? "wb+" : "rb"); + if (!p->file) + { #ifdef UNDER_CE - 2; /* ENOENT */ + return 2; /* ENOENT */ #else - errno; -#endif + return errno; #endif + } + + return 0; } -WRes InFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 0); } -WRes OutFile_Open(CSzFile *p, const char *name) { return File_Open(p, name, 1); } -#endif - -#ifdef USE_WINDOWS_FILE -static WRes File_OpenW(CSzFile *p, const WCHAR *name, int writeMode) +WRes InFile_Open(CSzFile *p, const char *name) { - p->handle = CreateFileW(name, - writeMode ? GENERIC_WRITE : GENERIC_READ, - FILE_SHARE_READ, NULL, - writeMode ? CREATE_ALWAYS : OPEN_EXISTING, - FILE_ATTRIBUTE_NORMAL, NULL); - return (p->handle != INVALID_HANDLE_VALUE) ? 0 : GetLastError(); + return File_Open(p, name, 0); +} + +WRes OutFile_Open(CSzFile *p, const char *name) +{ + return File_Open(p, name, 1); } -WRes InFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 0); } -WRes OutFile_OpenW(CSzFile *p, const WCHAR *name) { return File_OpenW(p, name, 1); } -#endif WRes File_Close(CSzFile *p) { -#ifdef USE_WINDOWS_FILE - if (p->handle != INVALID_HANDLE_VALUE) + if (p->file) { - if (!CloseHandle(p->handle)) - return GetLastError(); - p->handle = INVALID_HANDLE_VALUE; - } -#else - if (p->file != NULL) - { - int res = fclose(p->file); + int res = rfclose((RFILE*)p->file); if (res != 0) return res; p->file = NULL; } -#endif return 0; } WRes File_Read(CSzFile *p, void *data, size_t *size) { - size_t originalSize = *size; + int64_t originalSize = *size; if (originalSize == 0) return 0; -#ifdef USE_WINDOWS_FILE - - *size = 0; - do - { - DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; - DWORD processed = 0; - BOOL res = ReadFile(p->handle, data, curSize, &processed, NULL); - data = (void *)((uint8_t*)data + processed); - originalSize -= processed; - *size += processed; - if (!res) - return GetLastError(); - if (processed == 0) - break; - } - while (originalSize > 0); - return 0; - -#else - - *size = fread(data, 1, originalSize, p->file); + *size = rfread(data, 1, originalSize, (RFILE*)p->file); if (*size == originalSize) return 0; - return ferror(p->file); - -#endif + return rferror((RFILE*)p->file); } WRes File_Write(CSzFile *p, const void *data, size_t *size) { - size_t originalSize = *size; + int64_t originalSize = *size; if (originalSize == 0) return 0; -#ifdef USE_WINDOWS_FILE - - *size = 0; - do - { - DWORD curSize = (originalSize > kChunkSizeMax) ? kChunkSizeMax : (DWORD)originalSize; - DWORD processed = 0; - BOOL res = WriteFile(p->handle, data, curSize, &processed, NULL); - data = (void *)((uint8_t*)data + processed); - originalSize -= processed; - *size += processed; - if (!res) - return GetLastError(); - if (processed == 0) - break; - } - while (originalSize > 0); - return 0; - -#else - - *size = fwrite(data, 1, originalSize, p->file); + *size = rfwrite(data, 1, originalSize, (RFILE*)p->file); if (*size == originalSize) return 0; - return ferror(p->file); - -#endif + return rferror((RFILE*)p->file); } WRes File_Seek(CSzFile *p, int64_t *pos, ESzSeek origin) { -#ifdef USE_WINDOWS_FILE - - LARGE_INTEGER value; - DWORD moveMethod; - value.LowPart = (DWORD)*pos; - value.HighPart = (LONG)((uint64_t)*pos >> 16 >> 16); /* for case when uint64_t is 32-bit only */ + int whence; + int64_t res; switch (origin) { - case SZ_SEEK_SET: moveMethod = FILE_BEGIN; break; - case SZ_SEEK_CUR: moveMethod = FILE_CURRENT; break; - case SZ_SEEK_END: moveMethod = FILE_END; break; - default: return ERROR_INVALID_PARAMETER; + case SZ_SEEK_SET: + whence = SEEK_SET; + break; + case SZ_SEEK_CUR: + whence = SEEK_CUR; + break; + case SZ_SEEK_END: + whence = SEEK_END; + break; + default: + return 1; } - value.LowPart = SetFilePointer(p->handle, value.LowPart, &value.HighPart, moveMethod); - if (value.LowPart == 0xFFFFFFFF) - { - WRes res = GetLastError(); - if (res != NO_ERROR) - return res; - } - *pos = ((int64_t)value.HighPart << 32) | value.LowPart; - return 0; - -#else - - int moveMethod; - int res; - switch (origin) - { - case SZ_SEEK_SET: moveMethod = SEEK_SET; break; - case SZ_SEEK_CUR: moveMethod = SEEK_CUR; break; - case SZ_SEEK_END: moveMethod = SEEK_END; break; - default: return 1; - } - res = fseek(p->file, (long)*pos, moveMethod); - *pos = ftell(p->file); + res = rfseek((RFILE*)p->file, (int64_t)*pos, whence); + *pos = rftell((RFILE*)p->file); return res; - -#endif } WRes File_GetLength(CSzFile *p, uint64_t *length) { -#ifdef USE_WINDOWS_FILE - - DWORD sizeHigh; - DWORD sizeLow = GetFileSize(p->handle, &sizeHigh); - if (sizeLow == 0xFFFFFFFF) - { - DWORD res = GetLastError(); - if (res != NO_ERROR) - return res; - } - *length = (((uint64_t)sizeHigh) << 32) + sizeLow; - return 0; - -#else - - long pos = ftell(p->file); - int res = fseek(p->file, 0, SEEK_END); - *length = ftell(p->file); - fseek(p->file, pos, SEEK_SET); + int64_t pos = rftell((RFILE*)p->file); + int64_t res = rfseek((RFILE*)p->file, 0, SEEK_END); + *length = rftell((RFILE*)p->file); + rfseek((RFILE*)p->file, pos, SEEK_SET); return res; - -#endif } @@ -248,7 +122,6 @@ void FileSeqInStream_CreateVTable(CFileSeqInStream *p) p->s.Read = FileSeqInStream_Read; } - /* ---------- FileInStream ---------- */ static SRes FileInStream_Read(void *pp, void *buf, size_t *size) @@ -283,3 +156,5 @@ void FileOutStream_CreateVTable(CFileOutStream *p) { p->s.Write = FileOutStream_Write; } + +#undef SKIP_STDIO_REDEFINES diff --git a/deps/7zip/7zFile.h b/deps/7zip/7zFile.h index 33910ec420..f89e2f8e24 100644 --- a/deps/7zip/7zFile.h +++ b/deps/7zip/7zFile.h @@ -4,15 +4,7 @@ #ifndef __7Z_FILE_H #define __7Z_FILE_H -#ifdef _WIN32 -#define USE_WINDOWS_FILE -#endif - -#ifdef USE_WINDOWS_FILE -#include -#else #include -#endif #include "7zTypes.h" @@ -24,22 +16,12 @@ extern "C" { typedef struct { - #ifdef USE_WINDOWS_FILE - HANDLE handle; - #else - FILE *file; - #endif + void *file; } CSzFile; void File_Construct(CSzFile *p); -#if !defined(UNDER_CE) || !defined(USE_WINDOWS_FILE) WRes InFile_Open(CSzFile *p, const char *name); WRes OutFile_Open(CSzFile *p, const char *name); -#endif -#ifdef USE_WINDOWS_FILE -WRes InFile_OpenW(CSzFile *p, const WCHAR *name); -WRes OutFile_OpenW(CSzFile *p, const WCHAR *name); -#endif WRes File_Close(CSzFile *p); /* reads max(*size, remain file's size) bytes */ diff --git a/deps/7zip/7zIn.c b/deps/7zip/7zIn.c index 62c1d5eb82..0e4ec7e4c9 100644 --- a/deps/7zip/7zIn.c +++ b/deps/7zip/7zIn.c @@ -10,13 +10,33 @@ uint8_t k7zSignature[k7zSignatureSize] = {'7', 'z', 0xBC, 0xAF, 0x27, 0x1C}; -#define RINOM(x) { if ((x) == 0) return SZ_ERROR_MEM; } - #define NUM_FOLDER_CODERS_MAX 32 #define NUM_CODER_STREAMS_MAX 32 +#ifdef MY_CPU_LE_UNALIGN +#define GetUi16(p) (*(const uint16_t *)(p)) +#define GetUi32(p) (*(const uint32_t *)(p)) +#define GetUi64(p) (*(const uint64_t *)(p)) +#else +#define GetUi16(p) (((const uint8_t *)(p))[0] | ((uint16_t)((const uint8_t *)(p))[1] << 8)) +#define GetUi32(p) ( \ + ((const uint8_t *)(p))[0] | \ + ((uint32_t)((const uint8_t *)(p))[1] << 8) | \ + ((uint32_t)((const uint8_t *)(p))[2] << 16) | \ + ((uint32_t)((const uint8_t *)(p))[3] << 24)) +#define GetUi64(p) (GetUi32(p) | ((uint64_t)GetUi32(((const uint8_t *)(p)) + 4) << 32)) +#endif + +typedef struct _CSzState +{ + uint8_t *Data; + size_t Size; +}CSzData; + +/* Forward declarations */ void SzFolder_Free(CSzFolder *p, ISzAlloc *alloc); -int SzFolder_FindBindPairForOutStream(CSzFolder *p, uint32_t outStreamIndex); +int SzFolder_FindBindPairForOutStream(CSzFolder *p, + uint32_t outStreamIndex); void SzCoderInfo_Init(CSzCoderInfo *p) { @@ -31,15 +51,15 @@ void SzCoderInfo_Free(CSzCoderInfo *p, ISzAlloc *alloc) void SzFolder_Init(CSzFolder *p) { - p->Coders = 0; - p->BindPairs = 0; - p->PackStreams = 0; - p->UnpackSizes = 0; - p->NumCoders = 0; - p->NumBindPairs = 0; - p->NumPackStreams = 0; + p->Coders = 0; + p->BindPairs = 0; + p->PackStreams = 0; + p->UnpackSizes = 0; + p->NumCoders = 0; + p->NumBindPairs = 0; + p->NumPackStreams = 0; p->UnpackCRCDefined = 0; - p->UnpackCRC = 0; + p->UnpackCRC = 0; p->NumUnpackStreams = 0; } @@ -58,8 +78,8 @@ void SzFolder_Free(CSzFolder *p, ISzAlloc *alloc) uint32_t SzFolder_GetNumOutStreams(CSzFolder *p) { - uint32_t result = 0; uint32_t i; + uint32_t result = 0; for (i = 0; i < p->NumCoders; i++) result += p->Coders[i].NumOutStreams; return result; @@ -92,29 +112,28 @@ uint64_t SzFolder_GetUnpackSize(CSzFolder *p) for (i--; i >= 0; i--) if (SzFolder_FindBindPairForOutStream(p, i) < 0) return p->UnpackSizes[i]; - /* throw 1; */ return 0; } void SzFile_Init(CSzFileItem *p) { - p->HasStream = 1; - p->IsDir = 0; - p->IsAnti = 0; - p->CrcDefined = 0; + p->HasStream = 1; + p->IsDir = 0; + p->IsAnti = 0; + p->CrcDefined = 0; p->MTimeDefined = 0; } void SzAr_Init(CSzAr *p) { - p->PackSizes = 0; + p->PackSizes = 0; p->PackCRCsDefined = 0; - p->PackCRCs = 0; - p->Folders = 0; - p->Files = 0; - p->NumPackStreams = 0; - p->NumFolders = 0; - p->NumFiles = 0; + p->PackCRCs = 0; + p->Folders = 0; + p->Files = 0; + p->NumPackStreams = 0; + p->NumFolders = 0; + p->NumFiles = 0; } void SzAr_Free(CSzAr *p, ISzAlloc *alloc) @@ -137,10 +156,10 @@ void SzArEx_Init(CSzArEx *p) { SzAr_Init(&p->db); p->FolderStartPackStreamIndex = 0; - p->PackStreamStartPositions = 0; - p->FolderStartFileIndex = 0; - p->FileIndexToFolderIndexMap = 0; - p->FileNameOffsets = 0; + p->PackStreamStartPositions = 0; + p->FolderStartFileIndex = 0; + p->FileIndexToFolderIndexMap = 0; + p->FileNameOffsets = 0; Buf_Init(&p->FileNames); } @@ -158,34 +177,34 @@ void SzArEx_Free(CSzArEx *p, ISzAlloc *alloc) SzArEx_Init(p); } -/* - uint64_t GetFolderPackStreamSize(int folderIndex, int streamIndex) const - { +#if 0 +uint64_t GetFolderPackStreamSize(int folderIndex, int streamIndex) +{ return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex]; - } +} - uint64_t GetFilePackSize(int fileIndex) const - { +uint64_t GetFilePackSize(int fileIndex) +{ int folderIndex = FileIndexToFolderIndexMap[fileIndex]; if (folderIndex >= 0) { - const CSzFolder &folderInfo = Folders[folderIndex]; - if (FolderStartFileIndex[folderIndex] == fileIndex) - return GetFolderFullPackSize(folderIndex); + const CSzFolder &folderInfo = Folders[folderIndex]; + if (FolderStartFileIndex[folderIndex] == fileIndex) + return GetFolderFullPackSize(folderIndex); } return 0; - } - */ +} +#endif #define MY_ALLOC(T, p, size, alloc) { if ((size) == 0) p = 0; else \ if ((p = (T *)IAlloc_Alloc(alloc, (size) * sizeof(T))) == 0) return SZ_ERROR_MEM; } static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc) { - uint32_t startPos = 0; - uint64_t startPosSize = 0; uint32_t i; - uint32_t folderIndex = 0; + uint32_t startPos = 0; + uint64_t startPosSize = 0; + uint32_t folderIndex = 0; uint32_t indexInFolder = 0; MY_ALLOC(uint32_t, p->FolderStartPackStreamIndex, p->db.NumFolders, alloc); for (i = 0; i < p->db.NumFolders; i++) @@ -208,7 +227,8 @@ static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc) for (i = 0; i < p->db.NumFiles; i++) { CSzFileItem *file = p->db.Files + i; - int emptyStream = !file->HasStream; + int emptyStream = !file->HasStream; + if (emptyStream && indexInFolder == 0) { p->FileIndexToFolderIndexMap[i] = (uint32_t)-1; @@ -230,10 +250,14 @@ static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc) folderIndex++; } } + p->FileIndexToFolderIndexMap[i] = folderIndex; + if (emptyStream) continue; + indexInFolder++; + if (indexInFolder >= p->db.Folders[folderIndex].NumUnpackStreams) { folderIndex++; @@ -244,18 +268,21 @@ static SRes SzArEx_Fill(CSzArEx *p, ISzAlloc *alloc) } -uint64_t SzArEx_GetFolderStreamPos(const CSzArEx *p, uint32_t folderIndex, uint32_t indexInFolder) +uint64_t SzArEx_GetFolderStreamPos( + const CSzArEx *p, uint32_t folderIndex, uint32_t indexInFolder) { return p->dataPos + p->PackStreamStartPositions[p->FolderStartPackStreamIndex[folderIndex] + indexInFolder]; } -int SzArEx_GetFolderFullPackSize(const CSzArEx *p, uint32_t folderIndex, uint64_t *resSize) +int SzArEx_GetFolderFullPackSize( + const CSzArEx *p, uint32_t folderIndex, uint64_t *resSize) { - uint32_t packStreamIndex = p->FolderStartPackStreamIndex[folderIndex]; - CSzFolder *folder = p->db.Folders + folderIndex; - uint64_t size = 0; uint32_t i; + uint64_t size = 0; + uint32_t packStreamIndex = p->FolderStartPackStreamIndex[folderIndex]; + CSzFolder *folder = p->db.Folders + folderIndex; + for (i = 0; i < folder->NumPackStreams; i++) { uint64_t t = size + p->db.PackSizes[packStreamIndex + i]; @@ -277,12 +304,6 @@ static int TestSignatureCandidate(uint8_t *testuint8_ts) return 1; } -typedef struct _CSzState -{ - uint8_t *Data; - size_t Size; -}CSzData; - static SRes SzReaduint8_t(CSzData *sd, uint8_t *b) { if (sd->Size == 0) @@ -297,7 +318,9 @@ static SRes SzReaduint8_ts(CSzData *sd, uint8_t *data, size_t size) size_t i; for (i = 0; i < size; i++) { - RINOK(SzReaduint8_t(sd, data + i)); + int result = SzReaduint8_t(sd, data + i); + if (result != 0) + return result; } return SZ_OK; } @@ -308,8 +331,10 @@ static SRes SzReaduint32_t(CSzData *sd, uint32_t *value) *value = 0; for (i = 0; i < 4; i++) { - uint8_t b; - RINOK(SzReaduint8_t(sd, &b)); + uint8_t b = 0; + int result = SzReaduint8_t(sd, &b); + if (result != 0) + return result; *value |= ((uint32_t)(b) << (8 * i)); } return SZ_OK; @@ -317,21 +342,30 @@ static SRes SzReaduint32_t(CSzData *sd, uint32_t *value) static SRes SzReadNumber(CSzData *sd, uint64_t *value) { - uint8_t firstuint8_t; - uint8_t mask = 0x80; int i; - RINOK(SzReaduint8_t(sd, &firstuint8_t)); - *value = 0; + uint8_t firstuint8_t = 0; + uint8_t mask = 0x80; + int result = SzReaduint8_t(sd, &firstuint8_t); + + if (result != 0) + return result; + + *value = 0; + for (i = 0; i < 8; i++) { - uint8_t b; + int result; + uint8_t b = 0; if ((firstuint8_t & mask) == 0) { uint64_t highPart = firstuint8_t & (mask - 1); *value += (highPart << (8 * i)); return SZ_OK; } - RINOK(SzReaduint8_t(sd, &b)); + result = SzReaduint8_t(sd, &b); + + if (result != 0) + return result; *value |= ((uint64_t)b << (8 * i)); mask >>= 1; } @@ -341,7 +375,9 @@ static SRes SzReadNumber(CSzData *sd, uint64_t *value) static SRes SzReadNumber32(CSzData *sd, uint32_t *value) { uint64_t value64; - RINOK(SzReadNumber(sd, &value64)); + int result = SzReadNumber(sd, &value64); + if (result != 0) + return result; if (value64 >= 0x80000000) return SZ_ERROR_UNSUPPORTED; if (value64 >= ((uint64_t)(1) << ((sizeof(size_t) - 1) * 8 + 2))) @@ -367,7 +403,9 @@ static SRes SzSkeepDataSize(CSzData *sd, uint64_t size) static SRes SzSkeepData(CSzData *sd) { uint64_t size; - RINOK(SzReadNumber(sd, &size)); + int result = SzReadNumber(sd, &size); + if (result != 0) + return result; return SzSkeepDataSize(sd, size); } @@ -376,7 +414,9 @@ static SRes SzReadArchiveProperties(CSzData *sd) for (;;) { uint64_t type; - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + if (result != 0) + return result; if (type == k7zIdEnd) break; SzSkeepData(sd); @@ -389,27 +429,34 @@ static SRes SzWaitAttribute(CSzData *sd, uint64_t attribute) for (;;) { uint64_t type; - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + if (result != 0) + return result; if (type == attribute) return SZ_OK; if (type == k7zIdEnd) return SZ_ERROR_ARCHIVE; - RINOK(SzSkeepData(sd)); + result = SzSkeepData(sd); + if (result != 0) + return result; } } -static SRes SzReadBoolVector(CSzData *sd, size_t numItems, uint8_t **v, ISzAlloc *alloc) +static SRes SzReadBoolVector( + CSzData *sd, size_t numItems, uint8_t **v, ISzAlloc *alloc) { - uint8_t b = 0; - uint8_t mask = 0; size_t i; + uint8_t b = 0; + uint8_t mask = 0; MY_ALLOC(uint8_t, *v, numItems, alloc); for (i = 0; i < numItems; i++) { if (mask == 0) { - RINOK(SzReaduint8_t(sd, &b)); - mask = 0x80; + int result = SzReaduint8_t(sd, &b); + if (result != 0) + return result; + mask = 0x80; } (*v)[i] = (uint8_t)(((b & mask) != 0) ? 1 : 0); mask >>= 1; @@ -419,9 +466,12 @@ static SRes SzReadBoolVector(CSzData *sd, size_t numItems, uint8_t **v, ISzAlloc static SRes SzReadBoolVector2(CSzData *sd, size_t numItems, uint8_t **v, ISzAlloc *alloc) { - uint8_t allAreDefined; size_t i; - RINOK(SzReaduint8_t(sd, &allAreDefined)); + uint8_t allAreDefined = 0; + int result = SzReaduint8_t(sd, &allAreDefined); + + if (result != 0) + return result; if (allAreDefined == 0) return SzReadBoolVector(sd, numItems, v, alloc); MY_ALLOC(uint8_t, *v, numItems, alloc); @@ -438,13 +488,22 @@ static SRes SzReadHashDigests( ISzAlloc *alloc) { size_t i; - RINOK(SzReadBoolVector2(sd, numItems, digestsDefined, alloc)); + int result = SzReadBoolVector2(sd, numItems, digestsDefined, alloc); + + if (result != 0) + return result; + MY_ALLOC(uint32_t, *digests, numItems, alloc); + for (i = 0; i < numItems; i++) + { if ((*digestsDefined)[i]) { - RINOK(SzReaduint32_t(sd, (*digests) + i)); + int result = SzReaduint32_t(sd, (*digests) + i); + if (result != 0) + return result; } + } return SZ_OK; } @@ -458,30 +517,44 @@ static SRes SzReadPackInfo( ISzAlloc *alloc) { uint32_t i; - RINOK(SzReadNumber(sd, dataOffset)); - RINOK(SzReadNumber32(sd, numPackStreams)); + int result = SzReadNumber(sd, dataOffset); - RINOK(SzWaitAttribute(sd, k7zIdSize)); + if (result != 0) + return result; + result = SzReadNumber32(sd, numPackStreams); + if (result != 0) + return result; + result = SzWaitAttribute(sd, k7zIdSize); + if (result != 0) + return result; MY_ALLOC(uint64_t, *packSizes, (size_t)*numPackStreams, alloc); for (i = 0; i < *numPackStreams; i++) { - RINOK(SzReadNumber(sd, (*packSizes) + i)); + result = SzReadNumber(sd, (*packSizes) + i); + if (result != 0) + return result; } for (;;) { uint64_t type; - RINOK(SzReadID(sd, &type)); + result = SzReadID(sd, &type); + if (result != 0) + return result; if (type == k7zIdEnd) break; if (type == k7zIdCRC) { - RINOK(SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, alloc)); + result = SzReadHashDigests(sd, (size_t)*numPackStreams, packCRCsDefined, packCRCs, alloc); + if (result != 0) + return result; continue; } - RINOK(SzSkeepData(sd)); + result = SzSkeepData(sd); + if (result != 0) + return result; } if (*packCRCsDefined == 0) { @@ -498,17 +571,27 @@ static SRes SzReadPackInfo( static SRes SzReadSwitch(CSzData *sd) { - uint8_t external; - RINOK(SzReaduint8_t(sd, &external)); - return (external == 0) ? SZ_OK: SZ_ERROR_UNSUPPORTED; + uint8_t external = 0; + int result = SzReaduint8_t(sd, &external); + if (result != 0) + return result; + if (external != 0) + return SZ_ERROR_UNSUPPORTED; + return SZ_OK; } static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) { - uint32_t numCoders, numBindPairs, numPackStreams, i; - uint32_t numInStreams = 0, numOutStreams = 0; + unsigned i; + uint32_t numBindPairs = 0; + uint32_t numPackStreams = 0; + uint32_t numInStreams = 0; + uint32_t numOutStreams = 0; + uint32_t numCoders = 0; + int result = SzReadNumber32(sd, &numCoders); - RINOK(SzReadNumber32(sd, &numCoders)); + if (result != 0) + return result; if (numCoders > NUM_FOLDER_CODERS_MAX) return SZ_ERROR_UNSUPPORTED; folder->NumCoders = numCoders; @@ -520,57 +603,89 @@ static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) for (i = 0; i < numCoders; i++) { - uint8_t mainuint8_t; + unsigned idSize, j; + uint8_t longID[15]; + uint8_t mainuint8_t = 0; CSzCoderInfo *coder = folder->Coders + i; - { - unsigned idSize, j; - uint8_t longID[15]; - RINOK(SzReaduint8_t(sd, &mainuint8_t)); - idSize = (unsigned)(mainuint8_t & 0xF); - RINOK(SzReaduint8_ts(sd, longID, idSize)); - if (idSize > sizeof(coder->MethodID)) - return SZ_ERROR_UNSUPPORTED; - coder->MethodID = 0; - for (j = 0; j < idSize; j++) - coder->MethodID |= (uint64_t)longID[idSize - 1 - j] << (8 * j); + int result = SzReaduint8_t(sd, &mainuint8_t); - if ((mainuint8_t & 0x10) != 0) - { - RINOK(SzReadNumber32(sd, &coder->NumInStreams)); - RINOK(SzReadNumber32(sd, &coder->NumOutStreams)); - if (coder->NumInStreams > NUM_CODER_STREAMS_MAX || - coder->NumOutStreams > NUM_CODER_STREAMS_MAX) - return SZ_ERROR_UNSUPPORTED; - } - else - { - coder->NumInStreams = 1; - coder->NumOutStreams = 1; - } - if ((mainuint8_t & 0x20) != 0) - { - uint64_t propertiesSize = 0; - RINOK(SzReadNumber(sd, &propertiesSize)); - if (!Buf_Create(&coder->Props, (size_t)propertiesSize, alloc)) - return SZ_ERROR_MEM; - RINOK(SzReaduint8_ts(sd, coder->Props.data, (size_t)propertiesSize)); - } + if (result != 0) + return result; + + idSize = (unsigned)(mainuint8_t & 0xF); + + result = SzReaduint8_ts(sd, longID, idSize); + + if (result != 0) + return result; + if (idSize > sizeof(coder->MethodID)) + return SZ_ERROR_UNSUPPORTED; + + coder->MethodID = 0; + for (j = 0; j < idSize; j++) + coder->MethodID |= (uint64_t)longID[idSize - 1 - j] << (8 * j); + + if ((mainuint8_t & 0x10) != 0) + { + int result = SzReadNumber32(sd, &coder->NumInStreams); + + if (result != 0) + return result; + + result = SzReadNumber32(sd, &coder->NumOutStreams); + + if (result != 0) + return result; + + if (coder->NumInStreams > NUM_CODER_STREAMS_MAX || + coder->NumOutStreams > NUM_CODER_STREAMS_MAX) + return SZ_ERROR_UNSUPPORTED; + } + else + { + coder->NumInStreams = 1; + coder->NumOutStreams = 1; + } + if ((mainuint8_t & 0x20) != 0) + { + uint64_t propertiesSize = 0; + int result = SzReadNumber(sd, &propertiesSize); + + if (result != 0) + return result; + if (!Buf_Create(&coder->Props, (size_t)propertiesSize, alloc)) + return SZ_ERROR_MEM; + result = SzReaduint8_ts(sd, coder->Props.data, (size_t)propertiesSize); + if (result != 0) + return result; } while ((mainuint8_t & 0x80) != 0) { - RINOK(SzReaduint8_t(sd, &mainuint8_t)); - RINOK(SzSkeepDataSize(sd, (mainuint8_t & 0xF))); + result = SzReaduint8_t(sd, &mainuint8_t); + if (result != 0) + return result; + result = SzSkeepDataSize(sd, (mainuint8_t & 0xF)); + if (result != 0) + return result; if ((mainuint8_t & 0x10) != 0) { uint32_t n; - RINOK(SzReadNumber32(sd, &n)); - RINOK(SzReadNumber32(sd, &n)); + int result = SzReadNumber32(sd, &n); + if (result != 0) + return result; + result = SzReadNumber32(sd, &n); + if (result != 0) + return result; } if ((mainuint8_t & 0x20) != 0) { uint64_t propertiesSize = 0; - RINOK(SzReadNumber(sd, &propertiesSize)); - RINOK(SzSkeepDataSize(sd, propertiesSize)); + int result = SzReadNumber(sd, &propertiesSize); + if (result != 0) + return result; + result = SzSkeepDataSize(sd, propertiesSize); + if (result != 0) + return result; } } numInStreams += coder->NumInStreams; @@ -586,8 +701,13 @@ static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) for (i = 0; i < numBindPairs; i++) { CSzBindPair *bp = folder->BindPairs + i; - RINOK(SzReadNumber32(sd, &bp->InIndex)); - RINOK(SzReadNumber32(sd, &bp->OutIndex)); + int result = SzReadNumber32(sd, &bp->InIndex); + + if (result != 0) + return result; + result = SzReadNumber32(sd, &bp->OutIndex); + if (result != 0) + return result; } if (numInStreams < numBindPairs) @@ -608,7 +728,9 @@ static SRes SzGetNextFolderItem(CSzData *sd, CSzFolder *folder, ISzAlloc *alloc) else for (i = 0; i < numPackStreams; i++) { - RINOK(SzReadNumber32(sd, folder->PackStreams + i)); + int result = SzReadNumber32(sd, folder->PackStreams + i); + if (result != 0) + return result; } return SZ_OK; } @@ -621,10 +743,21 @@ static SRes SzReadUnpackInfo( ISzAlloc *allocTemp) { uint32_t i; - RINOK(SzWaitAttribute(sd, k7zIdFolder)); - RINOK(SzReadNumber32(sd, numFolders)); + int result = SzWaitAttribute(sd, k7zIdFolder); + + if (result != 0) + return result; + + result = SzReadNumber32(sd, numFolders); + + if (result != 0) + return result; + { - RINOK(SzReadSwitch(sd)); + result = SzReadSwitch(sd); + + if (result != 0) + return result; MY_ALLOC(CSzFolder, *folders, (size_t)*numFolders, alloc); @@ -633,11 +766,17 @@ static SRes SzReadUnpackInfo( for (i = 0; i < *numFolders; i++) { - RINOK(SzGetNextFolderItem(sd, (*folders) + i, alloc)); + result = SzGetNextFolderItem(sd, (*folders) + i, alloc); + + if (result != 0) + return result; } } - RINOK(SzWaitAttribute(sd, k7zIdCodersUnpackSize)); + result = SzWaitAttribute(sd, k7zIdCodersUnpackSize); + + if (result != 0) + return result; for (i = 0; i < *numFolders; i++) { @@ -649,22 +788,27 @@ static SRes SzReadUnpackInfo( for (j = 0; j < numOutStreams; j++) { - RINOK(SzReadNumber(sd, folder->UnpackSizes + j)); + int result = SzReadNumber(sd, folder->UnpackSizes + j); + if (result != 0) + return result; } } for (;;) { uint64_t type; - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + if (result != 0) + return result; if (type == k7zIdEnd) return SZ_OK; if (type == k7zIdCRC) { - SRes res; uint8_t *crcsDefined = 0; - uint32_t *crcs = 0; - res = SzReadHashDigests(sd, *numFolders, &crcsDefined, &crcs, allocTemp); + uint32_t *crcs = 0; + SRes res = SzReadHashDigests( + sd, *numFolders, &crcsDefined, &crcs, allocTemp); + if (res == SZ_OK) { for (i = 0; i < *numFolders; i++) @@ -676,10 +820,13 @@ static SRes SzReadUnpackInfo( } IAlloc_Free(allocTemp, crcs); IAlloc_Free(allocTemp, crcsDefined); - RINOK(res); + if (res != 0) + return res; continue; } - RINOK(SzSkeepData(sd)); + result = SzSkeepData(sd); + if (result != 0) + return result; } } @@ -693,9 +840,10 @@ static SRes SzReadSubStreamsInfo( uint32_t **digests, ISzAlloc *allocTemp) { - uint64_t type = 0; + int result; uint32_t i; - uint32_t si = 0; + uint64_t type = 0; + uint32_t si = 0; uint32_t numDigests = 0; for (i = 0; i < numFolders; i++) @@ -704,16 +852,21 @@ static SRes SzReadSubStreamsInfo( for (;;) { - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + if (result != 0) + return result; if (type == k7zIdNumUnpackStream) { *numUnpackStreams = 0; for (i = 0; i < numFolders; i++) { - uint32_t numStreams; - RINOK(SzReadNumber32(sd, &numStreams)); - folders[i].NumUnpackStreams = numStreams; - *numUnpackStreams += numStreams; + uint32_t numStreams = 0; + int result = SzReadNumber32(sd, &numStreams); + + if (result != 0) + return result; + folders[i].NumUnpackStreams = numStreams; + *numUnpackStreams += numStreams; } continue; } @@ -721,23 +874,28 @@ static SRes SzReadSubStreamsInfo( break; if (type == k7zIdEnd) break; - RINOK(SzSkeepData(sd)); + result = SzSkeepData(sd); + if (result != 0) + return result; } if (*numUnpackStreams == 0) { - *unpackSizes = 0; + *unpackSizes = 0; *digestsDefined = 0; - *digests = 0; + *digests = 0; } else { *unpackSizes = (uint64_t *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(uint64_t)); - RINOM(*unpackSizes); + if (*unpackSizes == 0) + return SZ_ERROR_MEM; *digestsDefined = (uint8_t *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(uint8_t)); - RINOM(*digestsDefined); + if (*digestsDefined == 0) + return SZ_ERROR_MEM; *digests = (uint32_t *)IAlloc_Alloc(allocTemp, (size_t)*numUnpackStreams * sizeof(uint32_t)); - RINOM(*digests); + if (*digests == 0) + return SZ_ERROR_MEM; } for (i = 0; i < numFolders; i++) @@ -755,15 +913,20 @@ static SRes SzReadSubStreamsInfo( for (j = 1; j < numSubstreams; j++) { uint64_t size; - RINOK(SzReadNumber(sd, &size)); + int result = SzReadNumber(sd, &size); + + if (result != 0) + return result; (*unpackSizes)[si++] = size; - sum += size; + sum += size; } (*unpackSizes)[si++] = SzFolder_GetUnpackSize(folders + i) - sum; } if (type == k7zIdSize) { - RINOK(SzReadID(sd, &type)); + result = SzReadID(sd, &type); + if (result != 0) + return result; } for (i = 0; i < *numUnpackStreams; i++) @@ -816,15 +979,20 @@ static SRes SzReadSubStreamsInfo( } IAlloc_Free(allocTemp, digestsDefined2); IAlloc_Free(allocTemp, digests2); - RINOK(res); + if (res != 0) + return res; } else if (type == k7zIdEnd) return SZ_OK; else { - RINOK(SzSkeepData(sd)); + result = SzSkeepData(sd); + if (result != 0) + return result; } - RINOK(SzReadID(sd, &type)); + result = SzReadID(sd, &type); + if (result != 0) + return result; } } @@ -843,7 +1011,10 @@ static SRes SzReadStreamsInfo( for (;;) { uint64_t type; - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + + if (result != 0) + return result; if ((uint64_t)(int)type != type) return SZ_ERROR_UNSUPPORTED; switch((int)type) @@ -852,19 +1023,26 @@ static SRes SzReadStreamsInfo( return SZ_OK; case k7zIdPackInfo: { - RINOK(SzReadPackInfo(sd, dataOffset, &p->NumPackStreams, - &p->PackSizes, &p->PackCRCsDefined, &p->PackCRCs, alloc)); + int result = SzReadPackInfo(sd, dataOffset, &p->NumPackStreams, + &p->PackSizes, &p->PackCRCsDefined, &p->PackCRCs, alloc); + if (result != 0) + return result; + break; } case k7zIdUnpackInfo: { - RINOK(SzReadUnpackInfo(sd, &p->NumFolders, &p->Folders, alloc, allocTemp)); + int result = SzReadUnpackInfo(sd, &p->NumFolders, &p->Folders, alloc, allocTemp); + if (result != 0) + return result; break; } case k7zIdSubStreamsInfo: { - RINOK(SzReadSubStreamsInfo(sd, p->NumFolders, p->Folders, - numUnpackStreams, unpackSizes, digestsDefined, digests, allocTemp)); + int result = SzReadSubStreamsInfo(sd, p->NumFolders, p->Folders, + numUnpackStreams, unpackSizes, digestsDefined, digests, allocTemp); + if (result != 0) + return result; break; } default: @@ -873,20 +1051,24 @@ static SRes SzReadStreamsInfo( } } -size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, size_t fileIndex, uint16_t *dest) +size_t SzArEx_GetFileNameUtf16(const CSzArEx *p, + size_t fileIndex, uint16_t *dest) { - size_t len = p->FileNameOffsets[fileIndex + 1] - p->FileNameOffsets[fileIndex]; + size_t len = p->FileNameOffsets[fileIndex + 1] - + p->FileNameOffsets[fileIndex]; if (dest != 0) { size_t i; - const uint8_t *src = p->FileNames.data + (p->FileNameOffsets[fileIndex] * 2); + const uint8_t *src = p->FileNames.data + + (p->FileNameOffsets[fileIndex] * 2); for (i = 0; i < len; i++) dest[i] = GetUi16(src + i * 2); } return len; } -static SRes SzReadFileNames(const uint8_t *p, size_t size, uint32_t numFiles, size_t *sizes) +static SRes SzReadFileNames(const uint8_t *p, + size_t size, uint32_t numFiles, size_t *sizes) { uint32_t i; size_t pos = 0; @@ -919,33 +1101,43 @@ static SRes SzReadHeader2( ISzAlloc *allocMain, ISzAlloc *allocTemp) { + uint32_t i; uint64_t type; uint32_t numUnpackStreams = 0; - uint32_t numFiles = 0; - CSzFileItem *files = 0; - uint32_t numEmptyStreams = 0; - uint32_t i; + uint32_t numFiles = 0; + CSzFileItem *files = 0; + uint32_t numEmptyStreams = 0; + int result = SzReadID(sd, &type); - RINOK(SzReadID(sd, &type)); + if (result != 0) + return result; if (type == k7zIdArchiveProperties) { - RINOK(SzReadArchiveProperties(sd)); - RINOK(SzReadID(sd, &type)); + result = SzReadArchiveProperties(sd); + if (result != 0) + return result; + result = SzReadID(sd, &type); + if (result != 0) + return result; } if (type == k7zIdMainStreamsInfo) { - RINOK(SzReadStreamsInfo(sd, + result = SzReadStreamsInfo(sd, &p->dataPos, &p->db, &numUnpackStreams, unpackSizes, digestsDefined, - digests, allocMain, allocTemp)); + digests, allocMain, allocTemp); + if (result != 0) + return result; p->dataPos += p->startPosAfterHeader; - RINOK(SzReadID(sd, &type)); + result = SzReadID(sd, &type); + if (result != 0) + return result; } if (type == k7zIdEnd) @@ -953,7 +1145,9 @@ static SRes SzReadHeader2( if (type != k7zIdFilesInfo) return SZ_ERROR_ARCHIVE; - RINOK(SzReadNumber32(sd, &numFiles)); + result = SzReadNumber32(sd, &numFiles); + if (result != 0) + return result; p->db.NumFiles = numFiles; MY_ALLOC(CSzFileItem, files, (size_t)numFiles, allocMain); @@ -965,37 +1159,54 @@ static SRes SzReadHeader2( for (;;) { uint64_t size; - RINOK(SzReadID(sd, &type)); + int result = SzReadID(sd, &type); + + if (result != 0) + return result; if (type == k7zIdEnd) break; - RINOK(SzReadNumber(sd, &size)); + + result = SzReadNumber(sd, &size); + + if (result != 0) + return result; if (size > sd->Size) return SZ_ERROR_ARCHIVE; + if ((uint64_t)(int)type != type) { - RINOK(SzSkeepDataSize(sd, size)); + int result = SzSkeepDataSize(sd, size); + if (result != 0) + return result; } else switch((int)type) { case k7zIdName: { - size_t namesSize; - RINOK(SzReadSwitch(sd)); - namesSize = (size_t)size - 1; + int result = SzReadSwitch(sd); + size_t namesSize = (size_t)size - 1; + if (result != 0) + return result; if ((namesSize & 1) != 0) return SZ_ERROR_ARCHIVE; if (!Buf_Create(&p->FileNames, namesSize, allocMain)) return SZ_ERROR_MEM; MY_ALLOC(size_t, p->FileNameOffsets, numFiles + 1, allocMain); memcpy(p->FileNames.data, sd->Data, namesSize); - RINOK(SzReadFileNames(sd->Data, namesSize >> 1, numFiles, p->FileNameOffsets)) - RINOK(SzSkeepDataSize(sd, namesSize)); + result = SzReadFileNames(sd->Data, namesSize >> 1, numFiles, p->FileNameOffsets); + if (result != 0) + return result; + result = SzSkeepDataSize(sd, namesSize); + if (result != 0) + return result; break; } case k7zIdEmptyStream: { - RINOK(SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp)); + int result = SzReadBoolVector(sd, numFiles, emptyStreamVector, allocTemp); + if (result != 0) + return result; numEmptyStreams = 0; for (i = 0; i < numFiles; i++) if ((*emptyStreamVector)[i]) @@ -1004,22 +1215,31 @@ static SRes SzReadHeader2( } case k7zIdEmptyFile: { - RINOK(SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp)); + int result = SzReadBoolVector(sd, numEmptyStreams, emptyFileVector, allocTemp); + if (result != 0) + return result; break; } case k7zIdWinAttributes: { - RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp)); - RINOK(SzReadSwitch(sd)); + int result = SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp); + if (result != 0) + return result; + result = SzReadSwitch(sd); + if (result != 0) + return result; + for (i = 0; i < numFiles; i++) { - CSzFileItem *f = &files[i]; - uint8_t defined = (*lwtVector)[i]; + CSzFileItem *f = &files[i]; + uint8_t defined = (*lwtVector)[i]; f->AttribDefined = defined; - f->Attrib = 0; + f->Attrib = 0; if (defined) { - RINOK(SzReaduint32_t(sd, &f->Attrib)); + result = SzReaduint32_t(sd, &f->Attrib); + if (result != 0) + return result; } } IAlloc_Free(allocTemp, *lwtVector); @@ -1028,18 +1248,28 @@ static SRes SzReadHeader2( } case k7zIdMTime: { - RINOK(SzReadBoolVector2(sd, numFiles, lwtVector, allocTemp)); - RINOK(SzReadSwitch(sd)); + int result = SzReadBoolVector2(sd, + numFiles, lwtVector, allocTemp); + if (result != 0) + return result; + result = SzReadSwitch(sd); + if (result != 0) + return result; + for (i = 0; i < numFiles; i++) { - CSzFileItem *f = &files[i]; + CSzFileItem *f = &files[i]; uint8_t defined = (*lwtVector)[i]; f->MTimeDefined = defined; - f->MTime.Low = f->MTime.High = 0; + f->MTime.Low = f->MTime.High = 0; if (defined) { - RINOK(SzReaduint32_t(sd, &f->MTime.Low)); - RINOK(SzReaduint32_t(sd, &f->MTime.High)); + result = SzReaduint32_t(sd, &f->MTime.Low); + if (result != 0) + return result; + result = SzReaduint32_t(sd, &f->MTime.High); + if (result != 0) + return result; } } IAlloc_Free(allocTemp, *lwtVector); @@ -1048,27 +1278,31 @@ static SRes SzReadHeader2( } default: { - RINOK(SzSkeepDataSize(sd, size)); + result = SzSkeepDataSize(sd, size); + if (result != 0) + return result; } } } { uint32_t emptyFileIndex = 0; - uint32_t sizeIndex = 0; + uint32_t sizeIndex = 0; for (i = 0; i < numFiles; i++) { - CSzFileItem *file = files + i; - file->IsAnti = 0; + CSzFileItem *file = files + i; + file->IsAnti = 0; + if (*emptyStreamVector == 0) - file->HasStream = 1; + file->HasStream = 1; else - file->HasStream = (uint8_t)((*emptyStreamVector)[i] ? 0 : 1); + file->HasStream = (uint8_t)((*emptyStreamVector)[i] ? 0 : 1); + if (file->HasStream) { - file->IsDir = 0; - file->Size = (*unpackSizes)[sizeIndex]; - file->Crc = (*digests)[sizeIndex]; + file->IsDir = 0; + file->Size = (*unpackSizes)[sizeIndex]; + file->Crc = (*digests)[sizeIndex]; file->CrcDefined = (uint8_t)(*digestsDefined)[sizeIndex]; sizeIndex++; } @@ -1077,10 +1311,11 @@ static SRes SzReadHeader2( if (*emptyFileVector == 0) file->IsDir = 1; else - file->IsDir = (uint8_t)((*emptyFileVector)[emptyFileIndex] ? 0 : 1); + file->IsDir = (uint8_t) + ((*emptyFileVector)[emptyFileIndex] ? 0 : 1); emptyFileIndex++; - file->Size = 0; - file->Crc = 0; + file->Size = 0; + file->Crc = 0; file->CrcDefined = 0; } } @@ -1094,13 +1329,13 @@ static SRes SzReadHeader( ISzAlloc *allocMain, ISzAlloc *allocTemp) { - uint64_t *unpackSizes = 0; - uint8_t *digestsDefined = 0; - uint32_t *digests = 0; + uint64_t *unpackSizes = 0; + uint8_t *digestsDefined = 0; + uint32_t *digests = 0; uint8_t *emptyStreamVector = 0; - uint8_t *emptyFileVector = 0; - uint8_t *lwtVector = 0; - SRes res = SzReadHeader2(p, sd, + uint8_t *emptyFileVector = 0; + uint8_t *lwtVector = 0; + SRes res = SzReadHeader2(p, sd, &unpackSizes, &digestsDefined, &digests, &emptyStreamVector, &emptyFileVector, &lwtVector, allocMain, allocTemp); @@ -1124,25 +1359,29 @@ static SRes SzReadAndDecodePackedStreams2( uint32_t **digests, ISzAlloc *allocTemp) { - - uint32_t numUnpackStreams = 0; - uint64_t dataStartPos; - CSzFolder *folder; - uint64_t unpackSize; SRes res; - - RINOK(SzReadStreamsInfo(sd, &dataStartPos, p, + CSzFolder *folder = NULL; + uint64_t dataStartPos = 0; + uint64_t unpackSize = 0; + uint32_t numUnpackStreams = 0; + int result = SzReadStreamsInfo(sd, &dataStartPos, p, &numUnpackStreams, unpackSizes, digestsDefined, digests, - allocTemp, allocTemp)); + allocTemp, allocTemp); + + if (result != 0) + return result; dataStartPos += baseOffset; if (p->NumFolders != 1) return SZ_ERROR_ARCHIVE; - folder = p->Folders; + folder = p->Folders; unpackSize = SzFolder_GetUnpackSize(folder); - RINOK(LookInStream_SeekTo(inStream, dataStartPos)); + result = LookInStream_SeekTo(inStream, dataStartPos); + + if (result != 0) + return result; if (!Buf_Create(outBuffer, (size_t)unpackSize, allocTemp)) return SZ_ERROR_MEM; @@ -1150,7 +1389,8 @@ static SRes SzReadAndDecodePackedStreams2( res = SzFolder_Decode(folder, p->PackSizes, inStream, dataStartPos, outBuffer->data, (size_t)unpackSize, allocTemp); - RINOK(res); + if (res != 0) + return res; if (folder->UnpackCRCDefined) if (CrcCalc(outBuffer->data, (size_t)unpackSize) != folder->UnpackCRC) return SZ_ERROR_CRC; @@ -1165,14 +1405,17 @@ static SRes SzReadAndDecodePackedStreams( ISzAlloc *allocTemp) { CSzAr p; - uint64_t *unpackSizes = 0; - uint8_t *digestsDefined = 0; - uint32_t *digests = 0; SRes res; + uint64_t *unpackSizes = 0; + uint8_t *digestsDefined = 0; + uint32_t *digests = 0; + SzAr_Init(&p); + res = SzReadAndDecodePackedStreams2(inStream, sd, outBuffer, baseOffset, &p, &unpackSizes, &digestsDefined, &digests, allocTemp); + SzAr_Free(&p, allocTemp); IAlloc_Free(allocTemp, unpackSizes); IAlloc_Free(allocTemp, digestsDefined); @@ -1186,27 +1429,33 @@ static SRes SzArEx_Open2( ISzAlloc *allocMain, ISzAlloc *allocTemp) { + SRes res; + CBuf buffer; uint8_t header[k7zStartHeaderSize]; - int64_t startArcPos; uint64_t nextHeaderOffset, nextHeaderSize; size_t nextHeaderSizeT; uint32_t nextHeaderCRC; - CBuf buffer; - SRes res; + int64_t startArcPos = 0; + int result = inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR); - startArcPos = 0; - RINOK(inStream->Seek(inStream, &startArcPos, SZ_SEEK_CUR)); + if (result != 0) + return result; - RINOK(LookInStream_Read2(inStream, header, k7zStartHeaderSize, SZ_ERROR_NO_ARCHIVE)); + result = LookInStream_Read2(inStream, header, + k7zStartHeaderSize, + SZ_ERROR_NO_ARCHIVE); + + if (result != 0) + return result; if (!TestSignatureCandidate(header)) return SZ_ERROR_NO_ARCHIVE; if (header[6] != k7zMajorVersion) return SZ_ERROR_UNSUPPORTED; - nextHeaderOffset = GetUi64(header + 12); - nextHeaderSize = GetUi64(header + 20); - nextHeaderCRC = GetUi32(header + 28); + nextHeaderOffset = GetUi64(header + 12); + nextHeaderSize = GetUi64(header + 20); + nextHeaderCRC = GetUi32(header + 28); p->startPosAfterHeader = startArcPos + k7zStartHeaderSize; @@ -1224,14 +1473,19 @@ static SRes SzArEx_Open2( { int64_t pos = 0; - RINOK(inStream->Seek(inStream, &pos, SZ_SEEK_END)); + int result = inStream->Seek(inStream, &pos, SZ_SEEK_END); + + if (result != 0) + return result; if ((uint64_t)pos < startArcPos + nextHeaderOffset || (uint64_t)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset || (uint64_t)pos < startArcPos + k7zStartHeaderSize + nextHeaderOffset + nextHeaderSize) return SZ_ERROR_INPUT_EOF; } - RINOK(LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset)); + result = LookInStream_SeekTo(inStream, startArcPos + k7zStartHeaderSize + nextHeaderOffset); + if (result != 0) + return result; if (!Buf_Create(&buffer, nextHeaderSizeT, allocTemp)) return SZ_ERROR_MEM; @@ -1280,7 +1534,8 @@ static SRes SzArEx_Open2( return res; } -SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, ISzAlloc *allocMain, ISzAlloc *allocTemp) +SRes SzArEx_Open(CSzArEx *p, ILookInStream *inStream, + ISzAlloc *allocMain, ISzAlloc *allocTemp) { SRes res = SzArEx_Open2(p, inStream, allocMain, allocTemp); if (res != SZ_OK) @@ -1301,32 +1556,35 @@ SRes SzArEx_Extract( ISzAlloc *allocTemp) { uint32_t folderIndex = p->FileIndexToFolderIndexMap[fileIndex]; - SRes res = SZ_OK; - *offset = 0; - *outSizeProcessed = 0; + SRes res = SZ_OK; + *offset = 0; + *outSizeProcessed = 0; + if (folderIndex == (uint32_t)-1) { IAlloc_Free(allocMain, *outBuffer); - *blockIndex = folderIndex; - *outBuffer = 0; + *blockIndex = folderIndex; + *outBuffer = 0; *outBufferSize = 0; return SZ_OK; } if (*outBuffer == 0 || *blockIndex != folderIndex) { - CSzFolder *folder = p->db.Folders + folderIndex; + int result; + CSzFolder *folder = p->db.Folders + folderIndex; uint64_t unpackSizeSpec = SzFolder_GetUnpackSize(folder); - size_t unpackSize = (size_t)unpackSizeSpec; - uint64_t startOffset = SzArEx_GetFolderStreamPos(p, folderIndex, 0); + size_t unpackSize = (size_t)unpackSizeSpec; + uint64_t startOffset = SzArEx_GetFolderStreamPos(p, folderIndex, 0); if (unpackSize != unpackSizeSpec) return SZ_ERROR_MEM; *blockIndex = folderIndex; IAlloc_Free(allocMain, *outBuffer); *outBuffer = 0; - - RINOK(LookInStream_SeekTo(inStream, startOffset)); + result = LookInStream_SeekTo(inStream, startOffset); + if (result != 0) + return result; if (res == SZ_OK) { @@ -1337,6 +1595,7 @@ SRes SzArEx_Extract( if (*outBuffer == 0) res = SZ_ERROR_MEM; } + if (res == SZ_OK) { res = SzFolder_Decode(folder, @@ -1354,6 +1613,7 @@ SRes SzArEx_Extract( } } } + if (res == SZ_OK) { uint32_t i; diff --git a/deps/7zip/7zStream.c b/deps/7zip/7zStream.c index 1fc86d064c..1aac4d777b 100644 --- a/deps/7zip/7zStream.c +++ b/deps/7zip/7zStream.c @@ -7,18 +7,29 @@ #include "7zTypes.h" -SRes SeqInStream_Readuint8_t(ISeqInStream *stream, uint8_t *buf); +SRes SeqInStream_Readuint8_t(ISeqInStream *stream, uint8_t *buf) +{ + size_t processed = 1; + int result = stream->Read(stream, buf, &processed); + if (result != 0) + return result; + if (processed != 1) + return SZ_ERROR_INPUT_EOF; + return SZ_OK; +} SRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType) { while (size != 0) { size_t processed = size; - RINOK(stream->Read(stream, buf, &processed)); + int result = stream->Read(stream, buf, &processed); + if (result != 0) + return result; if (processed == 0) return errorType; - buf = (void *)((uint8_t *)buf + processed); - size -= processed; + buf = (void *)((uint8_t *)buf + processed); + size -= processed; } return SZ_OK; } @@ -28,12 +39,6 @@ SRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size) return SeqInStream_Read2(stream, buf, size, SZ_ERROR_INPUT_EOF); } -SRes SeqInStream_Readuint8_t(ISeqInStream *stream, uint8_t *buf) -{ - size_t processed = 1; - RINOK(stream->Read(stream, buf, &processed)); - return (processed == 1) ? SZ_OK : SZ_ERROR_INPUT_EOF; -} SRes LookInStream_SeekTo(ILookInStream *stream, uint64_t offset) { @@ -43,24 +48,30 @@ SRes LookInStream_SeekTo(ILookInStream *stream, uint64_t offset) SRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size) { + int result; const void *lookBuf; if (*size == 0) return SZ_OK; - RINOK(stream->Look(stream, &lookBuf, size)); + result = stream->Look(stream, &lookBuf, size); + if (result != 0) + return result; memcpy(buf, lookBuf, *size); return stream->Skip(stream, *size); } -SRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType) +SRes LookInStream_Read2(ILookInStream *stream, + void *buf, size_t size, SRes errorType) { while (size != 0) { size_t processed = size; - RINOK(stream->Read(stream, buf, &processed)); + int result = stream->Read(stream, buf, &processed); + if (result != 0) + return result; if (processed == 0) return errorType; - buf = (void *)((uint8_t *)buf + processed); - size -= processed; + buf = (void *)((uint8_t *)buf + processed); + size -= processed; } return SZ_OK; } diff --git a/deps/7zip/7zTypes.h b/deps/7zip/7zTypes.h index 7d2217d891..6332d868a8 100644 --- a/deps/7zip/7zTypes.h +++ b/deps/7zip/7zTypes.h @@ -41,13 +41,9 @@ EXTERN_C_BEGIN #define SZ_ERROR_ARCHIVE 16 #define SZ_ERROR_NO_ARCHIVE 17 -typedef int SRes; +typedef int64_t SRes; -#ifdef _WIN32 -typedef unsigned WRes; -#else -typedef int WRes; -#endif +typedef int64_t WRes; #ifndef RINOK #define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; } diff --git a/deps/7zip/CpuArch.h b/deps/7zip/CpuArch.h index fc9ee527cb..c26a5a99bd 100644 --- a/deps/7zip/CpuArch.h +++ b/deps/7zip/CpuArch.h @@ -11,9 +11,10 @@ extern "C" { #endif -/* -MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and CPU supports unaligned memory accesses. -If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of platform. +/* MY_CPU_LE_UNALIGN means that CPU is LITTLE ENDIAN and + CPU supports unaligned memory accesses. + If MY_CPU_LE_UNALIGN is not defined, we don't know + about these properties of platform. */ #if defined(_M_X64) || defined(_M_AMD64) || defined(__x86_64__) @@ -48,23 +49,6 @@ If MY_CPU_LE_UNALIGN is not defined, we don't know about these properties of pla #define MY_CPU_LE_UNALIGN #endif -#ifdef MY_CPU_LE_UNALIGN - -#define GetUi16(p) (*(const uint16_t *)(p)) -#define GetUi32(p) (*(const uint32_t *)(p)) -#define GetUi64(p) (*(const uint64_t *)(p)) -#else -#define GetUi16(p) (((const uint8_t *)(p))[0] | ((uint16_t)((const uint8_t *)(p))[1] << 8)) - -#define GetUi32(p) ( \ - ((const uint8_t *)(p))[0] | \ - ((uint32_t)((const uint8_t *)(p))[1] << 8) | \ - ((uint32_t)((const uint8_t *)(p))[2] << 16) | \ - ((uint32_t)((const uint8_t *)(p))[3] << 24)) - -#define GetUi64(p) (GetUi32(p) | ((uint64_t)GetUi32(((const uint8_t *)(p)) + 4) << 32)) -#endif - #ifdef __cplusplus } #endif diff --git a/deps/7zip/Lzma2Dec.c b/deps/7zip/Lzma2Dec.c index 5b8a61c7d5..0a4ed84907 100644 --- a/deps/7zip/Lzma2Dec.c +++ b/deps/7zip/Lzma2Dec.c @@ -66,14 +66,18 @@ static SRes Lzma2Dec_GetOldProps(uint8_t prop, uint8_t *props) SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, uint8_t prop, ISzAlloc *alloc) { uint8_t props[LZMA_PROPS_SIZE]; - RINOK(Lzma2Dec_GetOldProps(prop, props)); + int result = Lzma2Dec_GetOldProps(prop, props); + if (result != 0) + return result; return LzmaDec_AllocateProbs(&p->decoder, props, LZMA_PROPS_SIZE, alloc); } SRes Lzma2Dec_Allocate(CLzma2Dec *p, uint8_t prop, ISzAlloc *alloc) { uint8_t props[LZMA_PROPS_SIZE]; - RINOK(Lzma2Dec_GetOldProps(prop, props)); + int result = Lzma2Dec_GetOldProps(prop, props); + if (result != 0) + return result; return LzmaDec_Allocate(&p->decoder, props, LZMA_PROPS_SIZE, alloc); } @@ -259,7 +263,8 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, size_t dicLimit, outSizeProcessed = p->decoder.dicPos - dicPos; p->unpackSize -= (uint32_t)outSizeProcessed; - RINOK(res); + if (res != 0) + return res; if (*status == LZMA_STATUS_NEEDS_MORE_INPUT) return res; @@ -321,8 +326,9 @@ SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, uint8_t *dest, size_t *destLen, const ui SRes Lzma2Decode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, uint8_t prop, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) { - CLzma2Dec decoder; SRes res; + int result; + CLzma2Dec decoder; size_t outSize = *destLen, inSize = *srcLen; uint8_t props[LZMA_PROPS_SIZE]; @@ -333,8 +339,12 @@ SRes Lzma2Decode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *src decoder.decoder.dic = dest; decoder.decoder.dicBufSize = outSize; - RINOK(Lzma2Dec_GetOldProps(prop, props)); - RINOK(LzmaDec_AllocateProbs(&decoder.decoder, props, LZMA_PROPS_SIZE, alloc)); + result = Lzma2Dec_GetOldProps(prop, props); + if (result != 0) + return result; + result = LzmaDec_AllocateProbs(&decoder.decoder, props, LZMA_PROPS_SIZE, alloc); + if (result != 0) + return result; *srcLen = inSize; res = Lzma2Dec_DecodeToDic(&decoder, outSize, src, srcLen, finishMode, status); diff --git a/deps/7zip/LzmaDec.c b/deps/7zip/LzmaDec.c index 5325053939..909f6ac29d 100644 --- a/deps/7zip/LzmaDec.c +++ b/deps/7zip/LzmaDec.c @@ -494,6 +494,7 @@ static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uin { do { + int result; size_t limit2 = limit; if (p->checkDicSize == 0) { @@ -501,12 +502,17 @@ static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uin if (limit - p->dicPos > rem) limit2 = p->dicPos + rem; } - RINOK(LzmaDec_DecodeReal(p, limit2, bufLimit)); + result = LzmaDec_DecodeReal(p, limit2, bufLimit); + if (result != 0) + return result; if (p->processedPos >= p->prop.dicSize) p->checkDicSize = p->prop.dicSize; LzmaDec_WriteRem(p, limit); } - while (p->dicPos < limit && p->buf < bufLimit && p->remainLen < kMatchSpecLenStart); + while ( + p->dicPos < limit && + p->buf < bufLimit && + p->remainLen < kMatchSpecLenStart); if (p->remainLen > kMatchSpecLenStart) { @@ -517,101 +523,108 @@ static int MY_FAST_CALL LzmaDec_DecodeReal2(CLzmaDec *p, size_t limit, const uin typedef enum { - DUMMY_ERROR, /* unexpected end of input stream */ + DUMMY_ERROR = 0, /* unexpected end of input stream */ DUMMY_LIT, DUMMY_MATCH, DUMMY_REP } ELzmaDummy; -static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const uint8_t *buf, size_t inSize) +static ELzmaDummy LzmaDec_TryDummy( + const CLzmaDec *p, const uint8_t *buf, size_t inSize) { - uint32_t range = p->range; - uint32_t codes = p->code; - const uint8_t *bufLimit = buf + inSize; - uint16_t *probs = p->probs; - unsigned state = p->state; ELzmaDummy res; + uint32_t bound; + unsigned ttt; + uint32_t range = p->range; + uint32_t codes = p->code; + const uint8_t *bufLimit = buf + inSize; + uint16_t *probs = p->probs; + unsigned state = p->state; + unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + uint16_t *prob = probs + IsMatch + + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) { - uint16_t *prob; - uint32_t bound; - unsigned ttt; - unsigned posState = (p->processedPos) & ((1 << p->prop.pb) - 1); + UPDATE_0_CHECK - prob = probs + IsMatch + (state << kNumPosBitsMax) + posState; - IF_BIT_0_CHECK(prob) + /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ + + prob = probs + Literal; + if (p->checkDicSize != 0 || p->processedPos != 0) + prob += (LZMA_LIT_SIZE * + ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + + (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); + + if (state < kNumLitStates) { - UPDATE_0_CHECK - - /* if (bufLimit - buf >= 7) return DUMMY_LIT; */ - - prob = probs + Literal; - if (p->checkDicSize != 0 || p->processedPos != 0) - prob += (LZMA_LIT_SIZE * - ((((p->processedPos) & ((1 << (p->prop.lp)) - 1)) << p->prop.lc) + - (p->dic[(p->dicPos == 0 ? p->dicBufSize : p->dicPos) - 1] >> (8 - p->prop.lc)))); - - if (state < kNumLitStates) - { - unsigned symbol = 1; - do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); - } - else - { - unsigned matchuint8_t = p->dic[p->dicPos - p->reps[0] + - ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; - unsigned offs = 0x100; - unsigned symbol = 1; - do - { - unsigned bit; - uint16_t *probLit; - matchuint8_t <<= 1; - bit = (matchuint8_t & offs); - probLit = prob + offs + bit + symbol; - GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) - } - while (symbol < 0x100); - } - res = DUMMY_LIT; + unsigned symbol = 1; + do { GET_BIT_CHECK(prob + symbol, symbol) } while (symbol < 0x100); } else { - unsigned len; - UPDATE_1_CHECK; + unsigned matchuint8_t = p->dic[p->dicPos - p->reps[0] + + ((p->dicPos < p->reps[0]) ? p->dicBufSize : 0)]; + unsigned offs = 0x100; + unsigned symbol = 1; + do + { + unsigned bit; + uint16_t *probLit; + matchuint8_t <<= 1; + bit = (matchuint8_t & offs); + probLit = prob + offs + bit + symbol; + GET_BIT2_CHECK(probLit, symbol, offs &= ~bit, offs &= bit) + } + while (symbol < 0x100); + } + res = DUMMY_LIT; + } + else + { + unsigned len; + UPDATE_1_CHECK; - prob = probs + IsRep + state; + prob = probs + IsRep + state; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + state = 0; + prob = probs + LenCoder; + res = DUMMY_MATCH; + } + else + { + UPDATE_1_CHECK; + res = DUMMY_REP; + prob = probs + IsRepG0 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; - state = 0; - prob = probs + LenCoder; - res = DUMMY_MATCH; + prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; + IF_BIT_0_CHECK(prob) + { + UPDATE_0_CHECK; + NORMALIZE_CHECK; + return DUMMY_REP; + } + else + { + UPDATE_1_CHECK; + } } else { UPDATE_1_CHECK; - res = DUMMY_REP; - prob = probs + IsRepG0 + state; + prob = probs + IsRepG1 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; - prob = probs + IsRep0Long + (state << kNumPosBitsMax) + posState; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - NORMALIZE_CHECK; - return DUMMY_REP; - } - else - { - UPDATE_1_CHECK; - } } else { UPDATE_1_CHECK; - prob = probs + IsRepG1 + state; + prob = probs + IsRepG2 + state; IF_BIT_0_CHECK(prob) { UPDATE_0_CHECK; @@ -619,92 +632,83 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const uint8_t *buf, size_t else { UPDATE_1_CHECK; - prob = probs + IsRepG2 + state; - IF_BIT_0_CHECK(prob) - { - UPDATE_0_CHECK; - } - else - { - UPDATE_1_CHECK; - } } } - state = kNumStates; - prob = probs + RepLenCoder; } + state = kNumStates; + prob = probs + RepLenCoder; + } + { + unsigned limit, offset; + uint16_t *probLen = prob + LenChoice; + IF_BIT_0_CHECK(probLen) { - unsigned limit, offset; - uint16_t *probLen = prob + LenChoice; + UPDATE_0_CHECK; + probLen = prob + LenLow + (posState << kLenNumLowBits); + offset = 0; + limit = 1 << kLenNumLowBits; + } + else + { + UPDATE_1_CHECK; + probLen = prob + LenChoice2; IF_BIT_0_CHECK(probLen) { UPDATE_0_CHECK; - probLen = prob + LenLow + (posState << kLenNumLowBits); - offset = 0; - limit = 1 << kLenNumLowBits; + probLen = prob + LenMid + (posState << kLenNumMidBits); + offset = kLenNumLowSymbols; + limit = 1 << kLenNumMidBits; } else { UPDATE_1_CHECK; - probLen = prob + LenChoice2; - IF_BIT_0_CHECK(probLen) - { - UPDATE_0_CHECK; - probLen = prob + LenMid + (posState << kLenNumMidBits); - offset = kLenNumLowSymbols; - limit = 1 << kLenNumMidBits; - } - else - { - UPDATE_1_CHECK; - probLen = prob + LenHigh; - offset = kLenNumLowSymbols + kLenNumMidSymbols; - limit = 1 << kLenNumHighBits; - } + probLen = prob + LenHigh; + offset = kLenNumLowSymbols + kLenNumMidSymbols; + limit = 1 << kLenNumHighBits; } - TREE_DECODE_CHECK(probLen, limit, len); - len += offset; } + TREE_DECODE_CHECK(probLen, limit, len); + len += offset; + } - if (state < 4) + if (state < 4) + { + unsigned posSlot; + prob = probs + PosSlot + + ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << + kNumPosSlotBits); + TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); + if (posSlot >= kStartPosModelIndex) { - unsigned posSlot; - prob = probs + PosSlot + - ((len < kNumLenToPosStates ? len : kNumLenToPosStates - 1) << - kNumPosSlotBits); - TREE_DECODE_CHECK(prob, 1 << kNumPosSlotBits, posSlot); - if (posSlot >= kStartPosModelIndex) + int numDirectBits = ((posSlot >> 1) - 1); + + /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ + + if (posSlot < kEndPosModelIndex) { - int numDirectBits = ((posSlot >> 1) - 1); - - /* if (bufLimit - buf >= 8) return DUMMY_MATCH; */ - - if (posSlot < kEndPosModelIndex) + prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + } + else + { + numDirectBits -= kNumAlignBits; + do { - prob = probs + SpecPos + ((2 | (posSlot & 1)) << numDirectBits) - posSlot - 1; + NORMALIZE_CHECK + range >>= 1; + codes -= range & (((codes - range) >> 31) - 1); + /* if (codes >= range) codes -= range; */ } - else + while (--numDirectBits != 0); + prob = probs + Align; + numDirectBits = kNumAlignBits; + } + { + unsigned i = 1; + do { - numDirectBits -= kNumAlignBits; - do - { - NORMALIZE_CHECK - range >>= 1; - codes -= range & (((codes - range) >> 31) - 1); - /* if (codes >= range) codes -= range; */ - } - while (--numDirectBits != 0); - prob = probs + Align; - numDirectBits = kNumAlignBits; - } - { - unsigned i = 1; - do - { - GET_BIT_CHECK(prob + i, i); - } - while (--numDirectBits != 0); + GET_BIT_CHECK(prob + i, i); } + while (--numDirectBits != 0); } } } @@ -713,26 +717,27 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const uint8_t *buf, size_t return res; } - static void LzmaDec_InitRc(CLzmaDec *p, const uint8_t *data) { - p->code = ((uint32_t)data[1] << 24) | ((uint32_t)data[2] << 16) | ((uint32_t)data[3] << 8) | ((uint32_t)data[4]); - p->range = 0xFFFFFFFF; + p->code = ( + (uint32_t)data[1] << 24) | + ((uint32_t)data[2] << 16) | + ((uint32_t)data[3] << 8) | + ((uint32_t)data[4]); + p->range = 0xFFFFFFFF; p->needFlush = 0; } -void LzmaDec_InitDicAndState(CLzmaDec *p, bool initDic, bool initState); - void LzmaDec_InitDicAndState(CLzmaDec *p, bool initDic, bool initState) { - p->needFlush = 1; - p->remainLen = 0; - p->tempBufSize = 0; + p->needFlush = 1; + p->remainLen = 0; + p->tempBufSize = 0; if (initDic) { - p->processedPos = 0; - p->checkDicSize = 0; + p->processedPos = 0; + p->checkDicSize = 0; p->needInitState = 1; } if (initState) @@ -747,17 +752,19 @@ void LzmaDec_Init(CLzmaDec *p) static void LzmaDec_InitStateReal(CLzmaDec *p) { - uint32_t numProbs = Literal + ((uint32_t)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); uint32_t i; - uint16_t *probs = p->probs; + uint32_t numProbs = Literal + + ((uint32_t)LZMA_LIT_SIZE << (p->prop.lc + p->prop.lp)); + uint16_t *probs = p->probs; for (i = 0; i < numProbs; i++) - probs[i] = kBitModelTotal >> 1; - p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; - p->state = 0; - p->needInitState = 0; + probs[i] = kBitModelTotal >> 1; + p->reps[0] = p->reps[1] = p->reps[2] = p->reps[3] = 1; + p->state = 0; + p->needInitState = 0; } -SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit, const uint8_t *src, size_t *srcLen, +SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit, + const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { size_t inSize = *srcLen; @@ -772,7 +779,8 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit, const uint8_t *src, size_ if (p->needFlush != 0) { - for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; (*srcLen)++, inSize--) + for (; inSize > 0 && p->tempBufSize < RC_INIT_SIZE; + (*srcLen)++, inSize--) p->tempBuf[p->tempBufSize++] = *src++; if (p->tempBufSize < RC_INIT_SIZE) { @@ -881,36 +889,37 @@ SRes LzmaDec_DecodeToDic(CLzmaDec *p, size_t dicLimit, const uint8_t *src, size_ SRes LzmaDec_DecodeToBuf(CLzmaDec *p, uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status) { size_t outSize = *destLen; - size_t inSize = *srcLen; - *srcLen = *destLen = 0; + size_t inSize = *srcLen; + *srcLen = *destLen = 0; + for (;;) { - size_t inSizeCur = inSize, outSizeCur, dicPos; - ELzmaFinishMode curFinishMode; SRes res; + ELzmaFinishMode curFinishMode; + size_t inSizeCur = inSize, outSizeCur, dicPos; if (p->dicPos == p->dicBufSize) - p->dicPos = 0; - dicPos = p->dicPos; + p->dicPos = 0; + dicPos = p->dicPos; if (outSize > p->dicBufSize - dicPos) { - outSizeCur = p->dicBufSize; + outSizeCur = p->dicBufSize; curFinishMode = LZMA_FINISH_ANY; } else { - outSizeCur = dicPos + outSize; + outSizeCur = dicPos + outSize; curFinishMode = finishMode; } - res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); - src += inSizeCur; - inSize -= inSizeCur; - *srcLen += inSizeCur; - outSizeCur = p->dicPos - dicPos; + res = LzmaDec_DecodeToDic(p, outSizeCur, src, &inSizeCur, curFinishMode, status); + src += inSizeCur; + inSize -= inSizeCur; + *srcLen += inSizeCur; + outSizeCur = p->dicPos - dicPos; memcpy(dest, p->dic + dicPos, outSizeCur); - dest += outSizeCur; - outSize -= outSizeCur; - *destLen += outSizeCur; + dest += outSizeCur; + outSize -= outSizeCur; + *destLen += outSizeCur; if (res != 0) return res; if (outSizeCur == 0 || outSize == 0) @@ -944,25 +953,29 @@ SRes LzmaProps_Decode(CLzmaProps *p, const uint8_t *data, unsigned size) if (size < LZMA_PROPS_SIZE) return SZ_ERROR_UNSUPPORTED; else - dicSize = data[1] | ((uint32_t)data[2] << 8) | ((uint32_t)data[3] << 16) | ((uint32_t)data[4] << 24); + dicSize = data[1] | + ((uint32_t)data[2] << 8) | + ((uint32_t)data[3] << 16) | + ((uint32_t)data[4] << 24); if (dicSize < LZMA_DIC_MIN) dicSize = LZMA_DIC_MIN; p->dicSize = dicSize; - d = data[0]; + d = data[0]; if (d >= (9 * 5 * 5)) return SZ_ERROR_UNSUPPORTED; - p->lc = d % 9; - d /= 9; - p->pb = d / 5; - p->lp = d % 5; + p->lc = d % 9; + d /= 9; + p->pb = d / 5; + p->lp = d % 5; return SZ_OK; } -static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) +static SRes LzmaDec_AllocateProbs2( + CLzmaDec *p, const CLzmaProps *propNew, ISzAlloc *alloc) { uint32_t numProbs = LzmaProps_GetNumProbs(propNew); if (p->probs == 0 || numProbs != p->numProbs) @@ -976,22 +989,37 @@ static SRes LzmaDec_AllocateProbs2(CLzmaDec *p, const CLzmaProps *propNew, ISzAl return SZ_OK; } -SRes LzmaDec_AllocateProbs(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISzAlloc *alloc) +SRes LzmaDec_AllocateProbs(CLzmaDec *p, + const uint8_t *props, unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; - RINOK(LzmaProps_Decode(&propNew, props, propsSize)); - RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); - p->prop = propNew; + int result = LzmaProps_Decode(&propNew, props, propsSize); + if (result != 0) + return result; + result = LzmaDec_AllocateProbs2(p, &propNew, alloc); + if (result != 0) + return result; + p->prop = propNew; return SZ_OK; } -SRes LzmaDec_Allocate(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISzAlloc *alloc) +SRes LzmaDec_Allocate(CLzmaDec *p, const uint8_t *props, + unsigned propsSize, ISzAlloc *alloc) { CLzmaProps propNew; size_t dicBufSize; - RINOK(LzmaProps_Decode(&propNew, props, propsSize)); - RINOK(LzmaDec_AllocateProbs2(p, &propNew, alloc)); + int result = LzmaProps_Decode(&propNew, props, propsSize); + + if (result != 0) + return result; + + result = LzmaDec_AllocateProbs2(p, &propNew, alloc); + + if (result != 0) + return result; + dicBufSize = propNew.dicSize; + if (p->dic == 0 || dicBufSize != p->dicBufSize) { LzmaDec_FreeDict(p, alloc); @@ -1007,7 +1035,8 @@ SRes LzmaDec_Allocate(CLzmaDec *p, const uint8_t *props, unsigned propsSize, ISz return SZ_OK; } -SRes LzmaDecode(uint8_t *dest, size_t *destLen, const uint8_t *src, size_t *srcLen, +SRes LzmaDecode(uint8_t *dest, size_t *destLen, + const uint8_t *src, size_t *srcLen, const uint8_t *propData, unsigned propSize, ELzmaFinishMode finishMode, ELzmaStatus *status, ISzAlloc *alloc) { diff --git a/deps/7zip/LzmaEnc.c b/deps/7zip/LzmaEnc.c index d66c0acb08..c05244a8a2 100644 --- a/deps/7zip/LzmaEnc.c +++ b/deps/7zip/LzmaEnc.c @@ -38,47 +38,66 @@ void LzmaEncProps_Init(CLzmaEncProps *p) { - p->level = 5; - p->dictSize = p->mc = 0; - p->reduceSize = (uint64_t)(int64_t)-1; - p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; + p->level = 5; + p->dictSize = p->mc = 0; + p->reduceSize = (uint64_t)(int64_t)-1; + p->lc = p->lp = p->pb = p->algo = p->fb = p->btMode = p->numHashBytes = p->numThreads = -1; p->writeEndMark = 0; } void LzmaEncProps_Normalize(CLzmaEncProps *p) { int level = p->level; - if (level < 0) level = 5; - p->level = level; + if (level < 0) + level = 5; + p->level = level; - if (p->dictSize == 0) p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); + if (p->dictSize == 0) + p->dictSize = (level <= 5 ? (1 << (level * 2 + 14)) : (level == 6 ? (1 << 25) : (1 << 26))); if (p->dictSize > p->reduceSize) { unsigned i; for (i = 11; i <= 30; i++) { - if ((uint32_t)p->reduceSize <= ((uint32_t)2 << i)) { p->dictSize = ((uint32_t)2 << i); break; } - if ((uint32_t)p->reduceSize <= ((uint32_t)3 << i)) { p->dictSize = ((uint32_t)3 << i); break; } + if ((uint32_t)p->reduceSize <= ((uint32_t)2 << i)) + { + p->dictSize = ((uint32_t)2 << i); + break; + } + if ((uint32_t)p->reduceSize <= ((uint32_t)3 << i)) + { + p->dictSize = ((uint32_t)3 << i); + break; + } } } - if (p->lc < 0) p->lc = 3; - if (p->lp < 0) p->lp = 0; - if (p->pb < 0) p->pb = 2; + if (p->lc < 0) + p->lc = 3; + if (p->lp < 0) + p->lp = 0; + if (p->pb < 0) + p->pb = 2; - if (p->algo < 0) p->algo = (level < 5 ? 0 : 1); - if (p->fb < 0) p->fb = (level < 7 ? 32 : 64); - if (p->btMode < 0) p->btMode = (p->algo == 0 ? 0 : 1); - if (p->numHashBytes < 0) p->numHashBytes = 4; - if (p->mc == 0) p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); + if (p->algo < 0) + p->algo = (level < 5 ? 0 : 1); + if (p->fb < 0) + p->fb = (level < 7 ? 32 : 64); + if (p->btMode < 0) + p->btMode = (p->algo == 0 ? 0 : 1); + if (p->numHashBytes < 0) + p->numHashBytes = 4; + if (p->mc == 0) + p->mc = (16 + (p->fb >> 1)) >> (p->btMode ? 0 : 1); if (p->numThreads < 0) - p->numThreads = - #ifndef _7ZIP_ST - ((p->btMode && p->algo) ? 2 : 1); - #else - 1; - #endif + { +#ifndef _7ZIP_ST + p->numThreads = ((p->btMode && p->algo) ? 2 : 1); +#else + p->numThreads = 1; +#endif + } } uint32_t LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) @@ -96,14 +115,14 @@ uint32_t LzmaEncProps_GetDictSize(const CLzmaEncProps *props2) static void LzmaEnc_FastPosInit(unsigned char *g_FastPos) { unsigned slot; - g_FastPos[0] = 0; - g_FastPos[1] = 1; - g_FastPos += 2; + g_FastPos[0] = 0; + g_FastPos[1] = 1; + g_FastPos += 2; for (slot = 2; slot < kNumLogBits * 2; slot++) { - size_t k = ((size_t)1 << ((slot >> 1) - 1)); size_t j; + size_t k = ((size_t)1 << ((slot >> 1) - 1)); for (j = 0; j < k; j++) g_FastPos[j] = (unsigned char)slot; g_FastPos += k; @@ -244,123 +263,123 @@ typedef struct typedef struct { - void *matchFinderObj; - IMatchFinder matchFinder; + void *matchFinderObj; + IMatchFinder matchFinder; - uint32_t optimumEndIndex; - uint32_t optimumCurrentIndex; + uint32_t optimumEndIndex; + uint32_t optimumCurrentIndex; - uint32_t longestMatchLength; - uint32_t numPairs; - uint32_t numAvail; + uint32_t longestMatchLength; + uint32_t numPairs; + uint32_t numAvail; - uint32_t numFastBytes; - uint32_t additionalOffset; - uint32_t reps[LZMA_NUM_REPS]; - uint32_t state; + uint32_t numFastBytes; + uint32_t additionalOffset; + uint32_t reps[LZMA_NUM_REPS]; + uint32_t state; - unsigned lc, lp, pb; - unsigned lpMask, pbMask; - unsigned lclp; + unsigned lc, lp, pb; + unsigned lpMask, pbMask; + unsigned lclp; - CLzmaProb *litProbs; + CLzmaProb *litProbs; - bool fastMode; - bool writeEndMark; - bool finished; - bool multiThread; - bool needInit; + bool fastMode; + bool writeEndMark; + bool finished; + bool multiThread; + bool needInit; - uint64_t nowPos64; + uint64_t nowPos64; - uint32_t matchPriceCount; - uint32_t alignPriceCount; + uint32_t matchPriceCount; + uint32_t alignPriceCount; - uint32_t distTableSize; + uint32_t distTableSize; - uint32_t dictSize; - SRes result; + uint32_t dictSize; + SRes result; - CRangeEnc rc; + CRangeEnc rc; - #ifndef _7ZIP_ST - bool mtMode; - CMatchFinderMt matchFinderMt; - #endif +#ifndef _7ZIP_ST + bool mtMode; + CMatchFinderMt matchFinderMt; +#endif - CMatchFinder matchFinderBase; + CMatchFinder matchFinderBase; - #ifndef _7ZIP_ST - unsigned char pad[128]; - #endif +#ifndef _7ZIP_ST + unsigned char pad[128]; +#endif - COptimal opt[kNumOpts]; + COptimal opt[kNumOpts]; - unsigned char g_FastPos[1 << kNumLogBits]; + unsigned char g_FastPos[1 << kNumLogBits]; - uint32_t ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; - uint32_t matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; + uint32_t ProbPrices[kBitModelTotal >> kNumMoveReducingBits]; + uint32_t matches[LZMA_MATCH_LEN_MAX * 2 + 2 + 1]; - uint32_t posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; - uint32_t distancesPrices[kNumLenToPosStates][kNumFullDistances]; - uint32_t alignPrices[kAlignTableSize]; + uint32_t posSlotPrices[kNumLenToPosStates][kDistTableSizeMax]; + uint32_t distancesPrices[kNumLenToPosStates][kNumFullDistances]; + uint32_t alignPrices[kAlignTableSize]; - CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; - CLzmaProb isRep[kNumStates]; - CLzmaProb isRepG0[kNumStates]; - CLzmaProb isRepG1[kNumStates]; - CLzmaProb isRepG2[kNumStates]; - CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isMatch[kNumStates][LZMA_NUM_PB_STATES_MAX]; + CLzmaProb isRep[kNumStates]; + CLzmaProb isRepG0[kNumStates]; + CLzmaProb isRepG1[kNumStates]; + CLzmaProb isRepG2[kNumStates]; + CLzmaProb isRep0Long[kNumStates][LZMA_NUM_PB_STATES_MAX]; - CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; - CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; - CLzmaProb posAlignEncoder[1 << kNumAlignBits]; + CLzmaProb posSlotEncoder[kNumLenToPosStates][1 << kNumPosSlotBits]; + CLzmaProb posEncoders[kNumFullDistances - kEndPosModelIndex]; + CLzmaProb posAlignEncoder[1 << kNumAlignBits]; - CLenPriceEnc lenEnc; - CLenPriceEnc repLenEnc; + CLenPriceEnc lenEnc; + CLenPriceEnc repLenEnc; - CSaveState saveState; + CSaveState saveState; - #ifndef _7ZIP_ST - unsigned char pad2[128]; - #endif +#ifndef _7ZIP_ST + unsigned char pad2[128]; +#endif } CLzmaEnc; void LzmaEnc_SaveState(CLzmaEncHandle pp) { - CLzmaEnc *p = (CLzmaEnc *)pp; - CSaveState *dest = &p->saveState; - int i; - dest->lenEnc = p->lenEnc; - dest->repLenEnc = p->repLenEnc; - dest->state = p->state; + int i; + CLzmaEnc *p = (CLzmaEnc *)pp; + CSaveState *dest = &p->saveState; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; - for (i = 0; i < kNumStates; i++) - { - memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); - memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); - } - for (i = 0; i < kNumLenToPosStates; i++) - memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); - memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); - memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); - memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); - memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); - memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); - memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); - memcpy(dest->reps, p->reps, sizeof(p->reps)); - memcpy(dest->litProbs, p->litProbs, ((uint32_t)0x300 << p->lclp) * sizeof(CLzmaProb)); + for (i = 0; i < kNumStates; i++) + { + memcpy(dest->isMatch[i], p->isMatch[i], sizeof(p->isMatch[i])); + memcpy(dest->isRep0Long[i], p->isRep0Long[i], sizeof(p->isRep0Long[i])); + } + for (i = 0; i < kNumLenToPosStates; i++) + memcpy(dest->posSlotEncoder[i], p->posSlotEncoder[i], sizeof(p->posSlotEncoder[i])); + memcpy(dest->isRep, p->isRep, sizeof(p->isRep)); + memcpy(dest->isRepG0, p->isRepG0, sizeof(p->isRepG0)); + memcpy(dest->isRepG1, p->isRepG1, sizeof(p->isRepG1)); + memcpy(dest->isRepG2, p->isRepG2, sizeof(p->isRepG2)); + memcpy(dest->posEncoders, p->posEncoders, sizeof(p->posEncoders)); + memcpy(dest->posAlignEncoder, p->posAlignEncoder, sizeof(p->posAlignEncoder)); + memcpy(dest->reps, p->reps, sizeof(p->reps)); + memcpy(dest->litProbs, p->litProbs, ((uint32_t)0x300 << p->lclp) * sizeof(CLzmaProb)); } void LzmaEnc_RestoreState(CLzmaEncHandle pp) { - CLzmaEnc *dest = (CLzmaEnc *)pp; - const CSaveState *p = &dest->saveState; int i; - dest->lenEnc = p->lenEnc; - dest->repLenEnc = p->repLenEnc; - dest->state = p->state; + CLzmaEnc *dest = (CLzmaEnc *)pp; + const CSaveState *p = &dest->saveState; + dest->lenEnc = p->lenEnc; + dest->repLenEnc = p->repLenEnc; + dest->state = p->state; for (i = 0; i < kNumStates; i++) { @@ -381,11 +400,13 @@ void LzmaEnc_RestoreState(CLzmaEncHandle pp) SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) { - CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEnc *p = (CLzmaEnc *)pp; CLzmaEncProps props = *props2; + LzmaEncProps_Normalize(&props); - if (props.lc > LZMA_LC_MAX + if ( + props.lc > LZMA_LC_MAX || props.lp > LZMA_LP_MAX || props.pb > LZMA_PB_MAX || props.dictSize > ((uint64_t)1 << kDicLogSizeMaxCompress) @@ -394,17 +415,17 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) p->dictSize = props.dictSize; { - unsigned fb = props.fb; + unsigned fb = props.fb; if (fb < 5) - fb = 5; + fb = 5; if (fb > LZMA_MATCH_LEN_MAX) - fb = LZMA_MATCH_LEN_MAX; - p->numFastBytes = fb; + fb = LZMA_MATCH_LEN_MAX; + p->numFastBytes = fb; } - p->lc = props.lc; - p->lp = props.lp; - p->pb = props.pb; - p->fastMode = (props.algo == 0); + p->lc = props.lc; + p->lp = props.lp; + p->pb = props.pb; + p->fastMode = (props.algo == 0); p->matchFinderBase.btMode = (unsigned char)(props.btMode ? 1 : 0); { uint32_t numHashBytes = 4; @@ -422,16 +443,16 @@ SRes LzmaEnc_SetProps(CLzmaEncHandle pp, const CLzmaEncProps *props2) p->writeEndMark = props.writeEndMark; - #ifndef _7ZIP_ST - /* +#ifndef _7ZIP_ST +#if 0 if (newMultiThread != _multiThread) { - ReleaseMatchFinder(); - _multiThread = newMultiThread; + ReleaseMatchFinder(); + _multiThread = newMultiThread; } - */ +#endif p->multiThread = (props.numThreads > 1); - #endif +#endif return SZ_OK; } @@ -449,8 +470,8 @@ static const int kShortRepNextStates[kNumStates]= {9, 9, 9, 9, 9, 9, 9, 11, 11, static void RangeEnc_Construct(CRangeEnc *p) { - p->outStream = NULL; - p->bufBase = NULL; + p->outStream = NULL; + p->bufBase = NULL; } #define RangeEnc_GetProcessed(p) ((p)->processed + ((p)->buf - (p)->bufBase) + (p)->cacheSize) @@ -458,112 +479,113 @@ static void RangeEnc_Construct(CRangeEnc *p) #define RC_BUF_SIZE (1 << 16) static int RangeEnc_Alloc(CRangeEnc *p, ISzAlloc *alloc) { - if (!p->bufBase) - { - p->bufBase = (unsigned char *)alloc->Alloc(alloc, RC_BUF_SIZE); - if (!p->bufBase) - return 0; - p->bufLim = p->bufBase + RC_BUF_SIZE; - } - return 1; + if (!p->bufBase) + { + p->bufBase = (unsigned char *)alloc->Alloc(alloc, RC_BUF_SIZE); + if (!p->bufBase) + return 0; + p->bufLim = p->bufBase + RC_BUF_SIZE; + } + return 1; } static void RangeEnc_Free(CRangeEnc *p, ISzAlloc *alloc) { - alloc->Free(alloc, p->bufBase); - p->bufBase = 0; + alloc->Free(alloc, p->bufBase); + p->bufBase = 0; } static void RangeEnc_Init(CRangeEnc *p) { - /* Stream.Init(); */ - p->low = 0; - p->range = 0xFFFFFFFF; - p->cacheSize = 1; - p->cache = 0; + /* Stream.Init(); */ + p->low = 0; + p->range = 0xFFFFFFFF; + p->cacheSize = 1; + p->cache = 0; - p->buf = p->bufBase; + p->buf = p->bufBase; - p->processed = 0; - p->res = SZ_OK; + p->processed = 0; + p->res = SZ_OK; } static void RangeEnc_FlushStream(CRangeEnc *p) { - size_t num; - if (p->res != SZ_OK) - return; - num = p->buf - p->bufBase; - if (num != p->outStream->Write(p->outStream, p->bufBase, num)) - p->res = SZ_ERROR_WRITE; - p->processed += num; - p->buf = p->bufBase; + size_t num; + if (p->res != SZ_OK) + return; + num = p->buf - p->bufBase; + if (num != p->outStream->Write(p->outStream, p->bufBase, num)) + p->res = SZ_ERROR_WRITE; + p->processed += num; + p->buf = p->bufBase; } static void MY_FAST_CALL RangeEnc_ShiftLow(CRangeEnc *p) { - if ((uint32_t)p->low < (uint32_t)0xFF000000 || (unsigned)(p->low >> 32) != 0) - { - unsigned char temp = p->cache; - do - { - unsigned char *buf = p->buf; - *buf++ = (unsigned char)(temp + (unsigned char)(p->low >> 32)); - p->buf = buf; - if (buf == p->bufLim) - RangeEnc_FlushStream(p); - temp = 0xFF; - } - while (--p->cacheSize != 0); - p->cache = (unsigned char)((uint32_t)p->low >> 24); - } - p->cacheSize++; - p->low = (uint32_t)p->low << 8; + if ((uint32_t)p->low < (uint32_t)0xFF000000 || (unsigned)(p->low >> 32) != 0) + { + unsigned char temp = p->cache; + do + { + unsigned char *buf = p->buf; + *buf++ = (unsigned char)(temp + (unsigned char)(p->low >> 32)); + p->buf = buf; + if (buf == p->bufLim) + RangeEnc_FlushStream(p); + temp = 0xFF; + } + while (--p->cacheSize != 0); + p->cache = (unsigned char)((uint32_t)p->low >> 24); + } + p->cacheSize++; + p->low = (uint32_t)p->low << 8; } static void RangeEnc_FlushData(CRangeEnc *p) { - int i; - for (i = 0; i < 5; i++) - RangeEnc_ShiftLow(p); + int i; + for (i = 0; i < 5; i++) + RangeEnc_ShiftLow(p); } -static void RangeEnc_EncodeDirectBits(CRangeEnc *p, uint32_t value, unsigned numBits) +static void RangeEnc_EncodeDirectBits( + CRangeEnc *p, uint32_t value, unsigned numBits) { - do - { - p->range >>= 1; - p->low += p->range & (0 - ((value >> --numBits) & 1)); - if (p->range < kTopValue) - { - p->range <<= 8; - RangeEnc_ShiftLow(p); - } - } - while (numBits != 0); + do + { + p->range >>= 1; + p->low += p->range & (0 - ((value >> --numBits) & 1)); + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } + } + while (numBits != 0); } static void RangeEnc_EncodeBit(CRangeEnc *p, CLzmaProb *prob, uint32_t symbol) { - uint32_t ttt = *prob; - uint32_t newBound = (p->range >> kNumBitModelTotalBits) * ttt; - if (symbol == 0) - { - p->range = newBound; - ttt += (kBitModelTotal - ttt) >> kNumMoveBits; - } - else - { - p->low += newBound; - p->range -= newBound; - ttt -= ttt >> kNumMoveBits; - } - *prob = (CLzmaProb)ttt; - if (p->range < kTopValue) - { - p->range <<= 8; - RangeEnc_ShiftLow(p); - } + uint32_t ttt = *prob; + uint32_t newBound = (p->range >> kNumBitModelTotalBits) * ttt; + if (symbol == 0) + { + p->range = newBound; + ttt += (kBitModelTotal - ttt) >> kNumMoveBits; + } + else + { + p->low += newBound; + p->range -= newBound; + ttt -= ttt >> kNumMoveBits; + } + *prob = (CLzmaProb)ttt; + if (p->range < kTopValue) + { + p->range <<= 8; + RangeEnc_ShiftLow(p); + } } static void LitEnc_Encode(CRangeEnc *p, CLzmaProb *probs, uint32_t symbol) @@ -627,101 +649,103 @@ static void LzmaEnc_InitPriceTables(uint32_t *ProbPrices) #define GET_PRICE_0a(prob) ProbPrices[(prob) >> kNumMoveReducingBits] #define GET_PRICE_1a(prob) ProbPrices[((prob) ^ (kBitModelTotal - 1)) >> kNumMoveReducingBits] -static uint32_t LitEnc_GetPrice(const CLzmaProb *probs, uint32_t symbol, const uint32_t *ProbPrices) +static uint32_t LitEnc_GetPrice( + const CLzmaProb *probs, uint32_t symbol, + const uint32_t *ProbPrices) { - uint32_t price = 0; - symbol |= 0x100; - do - { - price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); - symbol <<= 1; - } - while (symbol < 0x10000); - return price; + uint32_t price = 0; + symbol |= 0x100; + do + { + price += GET_PRICEa(probs[symbol >> 8], (symbol >> 7) & 1); + symbol <<= 1; + }while (symbol < 0x10000); + return price; } static uint32_t LitEnc_GetPriceMatched(const CLzmaProb *probs, uint32_t symbol, uint32_t matchByte, const uint32_t *ProbPrices) { - uint32_t price = 0; - uint32_t offs = 0x100; - symbol |= 0x100; - do - { - matchByte <<= 1; - price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); - symbol <<= 1; - offs &= ~(matchByte ^ symbol); - } - while (symbol < 0x10000); - return price; + uint32_t price = 0; + uint32_t offs = 0x100; + symbol |= 0x100; + do + { + matchByte <<= 1; + price += GET_PRICEa(probs[offs + (matchByte & offs) + (symbol >> 8)], (symbol >> 7) & 1); + symbol <<= 1; + offs &= ~(matchByte ^ symbol); + }while (symbol < 0x10000); + return price; } -static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, uint32_t symbol) +static void RcTree_Encode(CRangeEnc *rc, CLzmaProb *probs, + int numBitLevels, uint32_t symbol) { - uint32_t m = 1; - int i; - for (i = numBitLevels; i != 0;) - { - uint32_t bit; - i--; - bit = (symbol >> i) & 1; - RangeEnc_EncodeBit(rc, probs + m, bit); - m = (m << 1) | bit; - } + uint32_t m = 1; + int i; + for (i = numBitLevels; i != 0;) + { + uint32_t bit; + i--; + bit = (symbol >> i) & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + } } -static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, int numBitLevels, uint32_t symbol) +static void RcTree_ReverseEncode(CRangeEnc *rc, CLzmaProb *probs, + int numBitLevels, uint32_t symbol) { - uint32_t m = 1; - int i; - for (i = 0; i < numBitLevels; i++) - { - uint32_t bit = symbol & 1; - RangeEnc_EncodeBit(rc, probs + m, bit); - m = (m << 1) | bit; - symbol >>= 1; - } + uint32_t m = 1; + int i; + for (i = 0; i < numBitLevels; i++) + { + uint32_t bit = symbol & 1; + RangeEnc_EncodeBit(rc, probs + m, bit); + m = (m << 1) | bit; + symbol >>= 1; + } } -static uint32_t RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, uint32_t symbol, const uint32_t *ProbPrices) +static uint32_t RcTree_GetPrice(const CLzmaProb *probs, int numBitLevels, + uint32_t symbol, const uint32_t *ProbPrices) { - uint32_t price = 0; - symbol |= (1 << numBitLevels); - while (symbol != 1) - { - price += GET_PRICEa(probs[symbol >> 1], symbol & 1); - symbol >>= 1; - } - return price; + uint32_t price = 0; + symbol |= (1 << numBitLevels); + while (symbol != 1) + { + price += GET_PRICEa(probs[symbol >> 1], symbol & 1); + symbol >>= 1; + } + return price; } static uint32_t RcTree_ReverseGetPrice(const CLzmaProb *probs, int numBitLevels, uint32_t symbol, const uint32_t *ProbPrices) { - uint32_t price = 0; - uint32_t m = 1; - int i; - for (i = numBitLevels; i != 0; i--) - { - uint32_t bit = symbol & 1; - symbol >>= 1; - price += GET_PRICEa(probs[m], bit); - m = (m << 1) | bit; - } - return price; + uint32_t price = 0; + uint32_t m = 1; + int i; + for (i = numBitLevels; i != 0; i--) + { + uint32_t bit = symbol & 1; + symbol >>= 1; + price += GET_PRICEa(probs[m], bit); + m = (m << 1) | bit; + } + return price; } - static void LenEnc_Init(CLenEnc *p) { - unsigned i; - p->choice = p->choice2 = kProbInitValue; - for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) - p->low[i] = kProbInitValue; - for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) - p->mid[i] = kProbInitValue; - for (i = 0; i < kLenNumHighSymbols; i++) - p->high[i] = kProbInitValue; + unsigned i; + p->choice = p->choice2 = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumLowBits); i++) + p->low[i] = kProbInitValue; + for (i = 0; i < (LZMA_NUM_PB_STATES_MAX << kLenNumMidBits); i++) + p->mid[i] = kProbInitValue; + for (i = 0; i < kLenNumHighSymbols; i++) + p->high[i] = kProbInitValue; } static void LenEnc_Encode(CLenEnc *p, CRangeEnc *rc, uint32_t symbol, uint32_t posState) @@ -1715,160 +1739,164 @@ void LzmaEnc_Destroy(CLzmaEncHandle p, ISzAlloc *alloc, ISzAlloc *allocBig) static SRes LzmaEnc_CodeOneBlock(CLzmaEnc *p, bool useLimits, uint32_t maxPackSize, uint32_t maxUnpackSize) { - uint32_t nowPos32, startPos32; - if (p->needInit) - { - p->matchFinder.Init(p->matchFinderObj); - p->needInit = 0; - } + int result; + uint32_t nowPos32, startPos32; + if (p->needInit) + { + p->matchFinder.Init(p->matchFinderObj); + p->needInit = 0; + } - if (p->finished) - return p->result; - RINOK(CheckErrors(p)); + if (p->finished) + return p->result; + result = CheckErrors(p); - nowPos32 = (uint32_t)p->nowPos64; - startPos32 = nowPos32; + if (result != 0) + return result; - if (p->nowPos64 == 0) - { - uint32_t numPairs; - unsigned char curByte; - if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) - return Flush(p, nowPos32); - ReadMatchDistances(p, &numPairs); - RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); - p->state = kLiteralNextStates[p->state]; - curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset); - LitEnc_Encode(&p->rc, p->litProbs, curByte); - p->additionalOffset--; - nowPos32++; - } + nowPos32 = (uint32_t)p->nowPos64; + startPos32 = nowPos32; - if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) - for (;;) - { - uint32_t pos, len, posState; - - if (p->fastMode) - len = GetOptimumFast(p, &pos); - else - len = GetOptimum(p, nowPos32, &pos); - - posState = nowPos32 & p->pbMask; - if (len == 1 && pos == (uint32_t)-1) - { + if (p->nowPos64 == 0) + { + uint32_t numPairs; unsigned char curByte; - CLzmaProb *probs; - const unsigned char *data; - - RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); - data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; - curByte = *data; - probs = LIT_PROBS(nowPos32, *(data - 1)); - if (IsCharState(p->state)) - LitEnc_Encode(&p->rc, probs, curByte); - else - LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); - p->state = kLiteralNextStates[p->state]; - } - else - { - RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); - if (pos < LZMA_NUM_REPS) - { - RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); - if (pos == 0) - { - RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); - RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); - } - else - { - uint32_t distance = p->reps[pos]; - RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); - if (pos == 1) - RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); - else - { - RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); - RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); - if (pos == 3) - p->reps[3] = p->reps[2]; - p->reps[2] = p->reps[1]; - } - p->reps[1] = p->reps[0]; - p->reps[0] = distance; - } - if (len == 1) - p->state = kShortRepNextStates[p->state]; - else - { - LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); - p->state = kRepNextStates[p->state]; - } - } - else - { - uint32_t posSlot; - RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); - p->state = kMatchNextStates[p->state]; - LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); - pos -= LZMA_NUM_REPS; - GetPosSlot(pos, posSlot); - RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); - - if (posSlot >= kStartPosModelIndex) - { - uint32_t footerBits = ((posSlot >> 1) - 1); - uint32_t base = ((2 | (posSlot & 1)) << footerBits); - uint32_t posReduced = pos - base; - - if (posSlot < kEndPosModelIndex) - RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); - else - { - RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); - RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); - p->alignPriceCount++; - } - } - p->reps[3] = p->reps[2]; - p->reps[2] = p->reps[1]; - p->reps[1] = p->reps[0]; - p->reps[0] = pos; - p->matchPriceCount++; - } - } - p->additionalOffset -= len; - nowPos32 += len; - if (p->additionalOffset == 0) - { - uint32_t processed; - if (!p->fastMode) - { - if (p->matchPriceCount >= (1 << 7)) - FillDistancesPrices(p); - if (p->alignPriceCount >= kAlignTableSize) - FillAlignPrices(p); - } if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) - break; - processed = nowPos32 - startPos32; - if (useLimits) + return Flush(p, nowPos32); + ReadMatchDistances(p, &numPairs); + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][0], 0); + p->state = kLiteralNextStates[p->state]; + curByte = *(p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset); + LitEnc_Encode(&p->rc, p->litProbs, curByte); + p->additionalOffset--; + nowPos32++; + } + + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) != 0) + for (;;) { - if (processed + kNumOpts + 300 >= maxUnpackSize || - RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) - break; + uint32_t pos, len, posState; + + if (p->fastMode) + len = GetOptimumFast(p, &pos); + else + len = GetOptimum(p, nowPos32, &pos); + + posState = nowPos32 & p->pbMask; + if (len == 1 && pos == (uint32_t)-1) + { + unsigned char curByte; + CLzmaProb *probs; + const unsigned char *data; + + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 0); + data = p->matchFinder.GetPointerToCurrentPos(p->matchFinderObj) - p->additionalOffset; + curByte = *data; + probs = LIT_PROBS(nowPos32, *(data - 1)); + if (IsCharState(p->state)) + LitEnc_Encode(&p->rc, probs, curByte); + else + LitEnc_EncodeMatched(&p->rc, probs, curByte, *(data - p->reps[0] - 1)); + p->state = kLiteralNextStates[p->state]; + } + else + { + RangeEnc_EncodeBit(&p->rc, &p->isMatch[p->state][posState], 1); + if (pos < LZMA_NUM_REPS) + { + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 1); + if (pos == 0) + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 0); + RangeEnc_EncodeBit(&p->rc, &p->isRep0Long[p->state][posState], ((len == 1) ? 0 : 1)); + } + else + { + uint32_t distance = p->reps[pos]; + RangeEnc_EncodeBit(&p->rc, &p->isRepG0[p->state], 1); + if (pos == 1) + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 0); + else + { + RangeEnc_EncodeBit(&p->rc, &p->isRepG1[p->state], 1); + RangeEnc_EncodeBit(&p->rc, &p->isRepG2[p->state], pos - 2); + if (pos == 3) + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + } + p->reps[1] = p->reps[0]; + p->reps[0] = distance; + } + if (len == 1) + p->state = kShortRepNextStates[p->state]; + else + { + LenEnc_Encode2(&p->repLenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + p->state = kRepNextStates[p->state]; + } + } + else + { + uint32_t posSlot; + RangeEnc_EncodeBit(&p->rc, &p->isRep[p->state], 0); + p->state = kMatchNextStates[p->state]; + LenEnc_Encode2(&p->lenEnc, &p->rc, len - LZMA_MATCH_LEN_MIN, posState, !p->fastMode, p->ProbPrices); + pos -= LZMA_NUM_REPS; + GetPosSlot(pos, posSlot); + RcTree_Encode(&p->rc, p->posSlotEncoder[GetLenToPosState(len)], kNumPosSlotBits, posSlot); + + if (posSlot >= kStartPosModelIndex) + { + uint32_t footerBits = ((posSlot >> 1) - 1); + uint32_t base = ((2 | (posSlot & 1)) << footerBits); + uint32_t posReduced = pos - base; + + if (posSlot < kEndPosModelIndex) + RcTree_ReverseEncode(&p->rc, p->posEncoders + base - posSlot - 1, footerBits, posReduced); + else + { + RangeEnc_EncodeDirectBits(&p->rc, posReduced >> kNumAlignBits, footerBits - kNumAlignBits); + RcTree_ReverseEncode(&p->rc, p->posAlignEncoder, kNumAlignBits, posReduced & kAlignMask); + p->alignPriceCount++; + } + } + p->reps[3] = p->reps[2]; + p->reps[2] = p->reps[1]; + p->reps[1] = p->reps[0]; + p->reps[0] = pos; + p->matchPriceCount++; + } + } + p->additionalOffset -= len; + nowPos32 += len; + if (p->additionalOffset == 0) + { + uint32_t processed; + if (!p->fastMode) + { + if (p->matchPriceCount >= (1 << 7)) + FillDistancesPrices(p); + if (p->alignPriceCount >= kAlignTableSize) + FillAlignPrices(p); + } + if (p->matchFinder.GetNumAvailableBytes(p->matchFinderObj) == 0) + break; + processed = nowPos32 - startPos32; + if (useLimits) + { + if (processed + kNumOpts + 300 >= maxUnpackSize || + RangeEnc_GetProcessed(&p->rc) + kNumOpts * 2 >= maxPackSize) + break; + } + else if (processed >= (1 << 17)) + { + p->nowPos64 += nowPos32 - startPos32; + return CheckErrors(p); + } + } } - else if (processed >= (1 << 17)) - { - p->nowPos64 += nowPos32 - startPos32; - return CheckErrors(p); - } - } - } - p->nowPos64 += nowPos32 - startPos32; - return Flush(p, nowPos32); + p->nowPos64 += nowPos32 - startPos32; + return Flush(p, nowPos32); } #define kBigHashDicLimit ((uint32_t)1 << 24) @@ -1904,20 +1932,26 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, uint32_t keepWindowSize, ISzAlloc *alloc, if (beforeSize + p->dictSize < keepWindowSize) beforeSize = keepWindowSize - p->dictSize; - #ifndef _7ZIP_ST +#ifndef _7ZIP_ST if (p->mtMode) { - RINOK(MatchFinderMt_Create(&p->matchFinderMt, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)); - p->matchFinderObj = &p->matchFinderMt; - MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); + int result = MatchFinderMt_Create(&p->matchFinderMt, + p->dictSize, beforeSize, p->numFastBytes, + LZMA_MATCH_LEN_MAX, allocBig); + if (result != 0) + return result; + p->matchFinderObj = &p->matchFinderMt; + MatchFinderMt_CreateVTable(&p->matchFinderMt, &p->matchFinder); } else - #endif +#endif { - if (!MatchFinder_Create(&p->matchFinderBase, p->dictSize, beforeSize, p->numFastBytes, LZMA_MATCH_LEN_MAX, allocBig)) - return SZ_ERROR_MEM; - p->matchFinderObj = &p->matchFinderBase; - MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); + if (!MatchFinder_Create(&p->matchFinderBase, + p->dictSize, beforeSize, p->numFastBytes, + LZMA_MATCH_LEN_MAX, allocBig)) + return SZ_ERROR_MEM; + p->matchFinderObj = &p->matchFinderBase; + MatchFinder_CreateVTable(&p->matchFinderBase, &p->matchFinder); } return SZ_OK; @@ -1926,32 +1960,31 @@ static SRes LzmaEnc_Alloc(CLzmaEnc *p, uint32_t keepWindowSize, ISzAlloc *alloc, void LzmaEnc_Init(CLzmaEnc *p) { uint32_t i; - p->state = 0; + p->state = 0; for (i = 0 ; i < LZMA_NUM_REPS; i++) - p->reps[i] = 0; + p->reps[i] = 0; RangeEnc_Init(&p->rc); - for (i = 0; i < kNumStates; i++) { uint32_t j; for (j = 0; j < LZMA_NUM_PB_STATES_MAX; j++) { - p->isMatch[i][j] = kProbInitValue; + p->isMatch[i][j] = kProbInitValue; p->isRep0Long[i][j] = kProbInitValue; } - p->isRep[i] = kProbInitValue; - p->isRepG0[i] = kProbInitValue; - p->isRepG1[i] = kProbInitValue; - p->isRepG2[i] = kProbInitValue; + p->isRep[i] = kProbInitValue; + p->isRepG0[i] = kProbInitValue; + p->isRepG1[i] = kProbInitValue; + p->isRepG2[i] = kProbInitValue; } { - uint32_t num = (uint32_t)0x300 << (p->lp + p->lc); - CLzmaProb *probs = p->litProbs; + uint32_t num = (uint32_t)0x300 << (p->lp + p->lc); + CLzmaProb *probs = p->litProbs; for (i = 0; i < num; i++) - probs[i] = kProbInitValue; + probs[i] = kProbInitValue; } { @@ -1974,12 +2007,12 @@ void LzmaEnc_Init(CLzmaEnc *p) for (i = 0; i < (1 << kNumAlignBits); i++) p->posAlignEncoder[i] = kProbInitValue; - p->optimumEndIndex = 0; + p->optimumEndIndex = 0; p->optimumCurrentIndex = 0; - p->additionalOffset = 0; + p->additionalOffset = 0; - p->pbMask = (1 << p->pb) - 1; - p->lpMask = (1 << p->lp) - 1; + p->pbMask = (1 << p->pb) - 1; + p->lpMask = (1 << p->lp) - 1; } void LzmaEnc_InitPrices(CLzmaEnc *p) @@ -1990,37 +2023,45 @@ void LzmaEnc_InitPrices(CLzmaEnc *p) FillAlignPrices(p); } - p->lenEnc.tableSize = + p->lenEnc.tableSize = p->repLenEnc.tableSize = p->numFastBytes + 1 - LZMA_MATCH_LEN_MIN; LenPriceEnc_UpdateTables(&p->lenEnc, 1 << p->pb, p->ProbPrices); LenPriceEnc_UpdateTables(&p->repLenEnc, 1 << p->pb, p->ProbPrices); } -static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, uint32_t keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +static SRes LzmaEnc_AllocAndInit(CLzmaEnc *p, + uint32_t keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { - uint32_t i; - for (i = 0; i < (uint32_t)kDicLogSizeMaxCompress; i++) - if (p->dictSize <= ((uint32_t)1 << i)) - break; - p->distTableSize = i * 2; + uint32_t i; + int result; + for (i = 0; i < (uint32_t)kDicLogSizeMaxCompress; i++) + if (p->dictSize <= ((uint32_t)1 << i)) + break; + p->distTableSize = i * 2; - p->finished = false; - p->result = SZ_OK; - RINOK(LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig)); - LzmaEnc_Init(p); - LzmaEnc_InitPrices(p); - p->nowPos64 = 0; - return SZ_OK; + p->finished = false; + p->result = SZ_OK; + + result = LzmaEnc_Alloc(p, keepWindowSize, alloc, allocBig); + + if (result != 0) + return result; + + LzmaEnc_Init(p); + LzmaEnc_InitPrices(p); + p->nowPos64 = 0; + return SZ_OK; } -static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, - ISzAlloc *alloc, ISzAlloc *allocBig) +static SRes LzmaEnc_Prepare(CLzmaEncHandle pp, + ISeqOutStream *outStream, ISeqInStream *inStream, + ISzAlloc *alloc, ISzAlloc *allocBig) { - CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEnc *p = (CLzmaEnc *)pp; p->matchFinderBase.stream = inStream; - p->needInit = 1; - p->rc.outStream = outStream; + p->needInit = 1; + p->rc.outStream = outStream; return LzmaEnc_AllocAndInit(p, 0, alloc, allocBig); } @@ -2028,21 +2069,23 @@ SRes LzmaEnc_PrepareForLzma2(CLzmaEncHandle pp, ISeqInStream *inStream, uint32_t keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { - CLzmaEnc *p = (CLzmaEnc *)pp; + CLzmaEnc *p = (CLzmaEnc *)pp; p->matchFinderBase.stream = inStream; - p->needInit = 1; + p->needInit = 1; return LzmaEnc_AllocAndInit(p, keepWindowSize, alloc, allocBig); } -static void LzmaEnc_SetInputBuf(CLzmaEnc *p, const unsigned char *src, size_t srcLen) +static void LzmaEnc_SetInputBuf(CLzmaEnc *p, + const unsigned char *src, size_t srcLen) { - p->matchFinderBase.directInput = 1; - p->matchFinderBase.bufferBase = (unsigned char *)src; + p->matchFinderBase.directInput = 1; + p->matchFinderBase.bufferBase = (unsigned char *)src; p->matchFinderBase.directInputRem = srcLen; } -SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, const unsigned char *src, size_t srcLen, - uint32_t keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) +SRes LzmaEnc_MemPrepare(CLzmaEncHandle pp, + const unsigned char *src, size_t srcLen, + uint32_t keepWindowSize, ISzAlloc *alloc, ISzAlloc *allocBig) { CLzmaEnc *p = (CLzmaEnc *)pp; LzmaEnc_SetInputBuf(p, src, srcLen); @@ -2060,7 +2103,6 @@ void LzmaEnc_Finish(CLzmaEncHandle pp) #endif } - typedef struct { ISeqOutStream funcTable; @@ -2071,16 +2113,16 @@ typedef struct static size_t MyWrite(void *pp, const void *data, size_t size) { - CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; - if (p->rem < size) - { - size = p->rem; - p->overflow = true; - } - memcpy(p->data, data, size); - p->rem -= size; - p->data += size; - return size; + CSeqOutStreamBuf *p = (CSeqOutStreamBuf *)pp; + if (p->rem < size) + { + size = p->rem; + p->overflow = true; + } + memcpy(p->data, data, size); + p->rem -= size; + p->data += size; + return size; } @@ -2107,25 +2149,26 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, bool reInit, CSeqOutStreamBuf outStream; outStream.funcTable.Write = MyWrite; - outStream.data = dest; - outStream.rem = *destLen; - outStream.overflow = false; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = false; - p->writeEndMark = false; - p->finished = false; - p->result = SZ_OK; + p->writeEndMark = false; + p->finished = false; + p->result = SZ_OK; if (reInit) LzmaEnc_Init(p); LzmaEnc_InitPrices(p); - nowPos64 = p->nowPos64; + nowPos64 = p->nowPos64; RangeEnc_Init(&p->rc); - p->rc.outStream = &outStream.funcTable; + p->rc.outStream = &outStream.funcTable; - res = LzmaEnc_CodeOneBlock(p, true, desiredPackSize, *unpackSize); + res = LzmaEnc_CodeOneBlock(p, true, + desiredPackSize, *unpackSize); - *unpackSize = (uint32_t)(p->nowPos64 - nowPos64); - *destLen -= outStream.rem; + *unpackSize = (uint32_t)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; if (outStream.overflow) return SZ_ERROR_OUTPUT_EOF; @@ -2135,53 +2178,61 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, bool reInit, static SRes LzmaEnc_Encode2(CLzmaEnc *p, ICompressProgress *progress) { - SRes res = SZ_OK; + SRes res = SZ_OK; +#ifndef _7ZIP_ST + unsigned char allocaDummy[0x300]; + allocaDummy[0] = 0; + allocaDummy[1] = allocaDummy[0]; +#endif - #ifndef _7ZIP_ST - unsigned char allocaDummy[0x300]; - allocaDummy[0] = 0; - allocaDummy[1] = allocaDummy[0]; - #endif - - for (;;) - { - res = LzmaEnc_CodeOneBlock(p, false, 0, 0); - if (res != SZ_OK || p->finished) - break; - if (progress) - { - res = progress->Progress(progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); - if (res != SZ_OK) + for (;;) + { + res = LzmaEnc_CodeOneBlock(p, false, 0, 0); + if (res != SZ_OK || p->finished) + break; + if (progress) { - res = SZ_ERROR_PROGRESS; - break; + res = progress->Progress( + progress, p->nowPos64, RangeEnc_GetProcessed(&p->rc)); + + if (res != SZ_OK) + { + res = SZ_ERROR_PROGRESS; + break; + } } - } - } + } - LzmaEnc_Finish(p); + LzmaEnc_Finish(p); - return res; + return res; } -SRes LzmaEnc_Encode(CLzmaEncHandle pp, ISeqOutStream *outStream, ISeqInStream *inStream, ICompressProgress *progress, - ISzAlloc *alloc, ISzAlloc *allocBig) +SRes LzmaEnc_Encode(CLzmaEncHandle pp, + ISeqOutStream *outStream, + ISeqInStream *inStream, ICompressProgress *progress, + ISzAlloc *alloc, ISzAlloc *allocBig) { - RINOK(LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig)); - return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); + int result = LzmaEnc_Prepare(pp, outStream, inStream, alloc, allocBig); + if (result != 0) + return result; + return LzmaEnc_Encode2((CLzmaEnc *)pp, progress); } -SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, unsigned char *props, size_t *size) +SRes LzmaEnc_WriteProperties( + CLzmaEncHandle pp, unsigned char *props, size_t *size) { - CLzmaEnc *p = (CLzmaEnc *)pp; unsigned i; + CLzmaEnc *p = (CLzmaEnc *)pp; uint32_t dictSize = p->dictSize; + if (*size < LZMA_PROPS_SIZE) return SZ_ERROR_PARAM; - *size = LZMA_PROPS_SIZE; - props[0] = (unsigned char)((p->pb * 5 + p->lp) * 9 + p->lc); + + *size = LZMA_PROPS_SIZE; + props[0] = (unsigned char)((p->pb * 5 + p->lp) * 9 + p->lc); if (dictSize >= ((uint32_t)1 << 22)) { @@ -2201,23 +2252,26 @@ SRes LzmaEnc_WriteProperties(CLzmaEncHandle pp, unsigned char *props, size_t *si } -SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, - int writeEndMark, ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, + unsigned char *dest, size_t *destLen, + const unsigned char *src, size_t srcLen, + int writeEndMark, ICompressProgress *progress, + ISzAlloc *alloc, ISzAlloc *allocBig) { SRes res; - CLzmaEnc *p = (CLzmaEnc *)pp; - CSeqOutStreamBuf outStream; + CLzmaEnc *p = (CLzmaEnc *)pp; outStream.funcTable.Write = MyWrite; - outStream.data = dest; - outStream.rem = *destLen; - outStream.overflow = false; + outStream.data = dest; + outStream.rem = *destLen; + outStream.overflow = false; - p->writeEndMark = writeEndMark; - p->rc.outStream = &outStream.funcTable; + p->writeEndMark = writeEndMark; + p->rc.outStream = &outStream.funcTable; - res = LzmaEnc_MemPrepare(pp, src, srcLen, 0, alloc, allocBig); + res = LzmaEnc_MemPrepare( + pp, src, srcLen, 0, alloc, allocBig); if (res == SZ_OK) { @@ -2233,24 +2287,26 @@ SRes LzmaEnc_MemEncode(CLzmaEncHandle pp, unsigned char *dest, size_t *destLen, } -SRes LzmaEncode(unsigned char *dest, size_t *destLen, const unsigned char *src, size_t srcLen, - const CLzmaEncProps *props, unsigned char *propsEncoded, size_t *propsSize, int writeEndMark, - ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) +SRes LzmaEncode(unsigned char *dest, size_t *destLen, + const unsigned char *src, size_t srcLen, + const CLzmaEncProps *props, + unsigned char *propsEncoded, size_t *propsSize, int writeEndMark, + ICompressProgress *progress, ISzAlloc *alloc, ISzAlloc *allocBig) { - CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); - SRes res; - if (!p) - return SZ_ERROR_MEM; + SRes res; + CLzmaEnc *p = (CLzmaEnc *)LzmaEnc_Create(alloc); + if (!p) + return SZ_ERROR_MEM; - res = LzmaEnc_SetProps(p, props); - if (res == SZ_OK) - { - res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); - if (res == SZ_OK) - res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, - writeEndMark, progress, alloc, allocBig); - } + res = LzmaEnc_SetProps(p, props); + if (res == SZ_OK) + { + res = LzmaEnc_WriteProperties(p, propsEncoded, propsSize); + if (res == SZ_OK) + res = LzmaEnc_MemEncode(p, dest, destLen, src, srcLen, + writeEndMark, progress, alloc, allocBig); + } - LzmaEnc_Destroy(p, alloc, allocBig); - return res; + LzmaEnc_Destroy(p, alloc, allocBig); + return res; } diff --git a/deps/libz/adler32.c b/deps/libz/adler32.c index 3958febd72..66210cb406 100644 --- a/deps/libz/adler32.c +++ b/deps/libz/adler32.c @@ -48,17 +48,19 @@ /* ========================================================================= */ uint32_t adler32(uint32_t adler, const uint8_t *buf, size_t len) { + int k; uint32_t s1 = adler & 0xffff; uint32_t s2 = (adler >> 16) & 0xffff; - int k; if (buf == NULL) return 1L; - while (len > 0) { - k = len < NMAX ? (int)len : NMAX; + while (len > 0) + { + k = len < NMAX ? (int)len : NMAX; len -= k; - while (k >= 16) { + while (k >= 16) + { DO16(buf); buf += 16; k -= 16; diff --git a/deps/libz/compress.c b/deps/libz/compress.c index 37eb4d9699..924939dc1d 100644 --- a/deps/libz/compress.c +++ b/deps/libz/compress.c @@ -21,34 +21,38 @@ */ int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level) { - z_stream stream; int err; + z_stream stream; - stream.next_in = (Bytef *)source; + stream.next_in = (Bytef *)source; stream.avail_in = (uInt)sourceLen; #ifdef MAXSEG_64K /* Check for source > 64K on 16-bit machine: */ - if ((uLong)stream.avail_in != sourceLen) return Z_BUF_ERROR; + if ((uLong)stream.avail_in != sourceLen) + return Z_BUF_ERROR; #endif - stream.next_out = dest; + stream.next_out = dest; stream.avail_out = (uInt)*destLen; - if ((uLong)stream.avail_out != *destLen) return Z_BUF_ERROR; + if ((uLong)stream.avail_out != *destLen) + return Z_BUF_ERROR; - stream.zalloc = Z_NULL; - stream.zfree = Z_NULL; - stream.opaque = (voidpf)0; + stream.zalloc = Z_NULL; + stream.zfree = Z_NULL; + stream.opaque = (voidpf)0; - err = deflateInit(&stream, level); - if (err != Z_OK) return err; + err = deflateInit(&stream, level); + if (err != Z_OK) + return err; - err = deflate(&stream, Z_FINISH); - if (err != Z_STREAM_END) { + err = deflate(&stream, Z_FINISH); + if (err != Z_STREAM_END) + { deflateEnd(&stream); return err == Z_OK ? Z_BUF_ERROR : err; } *destLen = stream.total_out; - err = deflateEnd(&stream); + err = deflateEnd(&stream); return err; } @@ -65,6 +69,8 @@ int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen */ uLong compressBound (uLong sourceLen) { - return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + + return sourceLen + + (sourceLen >> 12) + + (sourceLen >> 14) + (sourceLen >> 25) + 13; } diff --git a/deps/libz/deflate.c b/deps/libz/deflate.c index 10b188540c..9e9a31dd41 100644 --- a/deps/libz/deflate.c +++ b/deps/libz/deflate.c @@ -49,10 +49,6 @@ /* @(#) $Id$ */ -#ifdef DEBUG -#include -#endif - #include "deflate.h" const char deflate_copyright[] = " deflate 1.2.8 Copyright 1995-2013 Jean-loup Gailly and Mark Adler "; @@ -76,23 +72,13 @@ typedef enum { typedef block_state (*compress_func) (deflate_state *s, int flush); /* Compression function. Returns the block state after the call. */ -static void fill_window (deflate_state *s); static block_state deflate_stored (deflate_state *s, int flush); static block_state deflate_fast (deflate_state *s, int flush); #ifndef FASTEST static block_state deflate_slow (deflate_state *s, int flush); #endif -static block_state deflate_rle (deflate_state *s, int flush); -static block_state deflate_huff (deflate_state *s, int flush); -static void lm_init (deflate_state *s); -static void putShortMSB (deflate_state *s, uInt b); -static void flush_pending (z_streamp strm); -static int read_buf (z_streamp strm, Bytef *buf, unsigned size); #ifdef ASMV void match_init (void); /* asm code initialization */ -uInt longest_match (deflate_state *s, IPos cur_match); -#else -static uInt longest_match (deflate_state *s, IPos cur_match); #endif /* =========================================================================== @@ -191,9 +177,52 @@ static const config configuration_table[10] = { s->head[s->hash_size-1] = NIL; \ zmemzero((Bytef *)s->head, (unsigned)(s->hash_size-1)*sizeof(*s->head)); -int deflateResetKeep (z_streamp strm); +/* ========================================================================= */ +int deflateResetKeep (z_streamp strm) +{ + deflate_state *s; -int deflatePending (z_streamp strm, unsigned *pending, int *bits); + if ( strm == Z_NULL + || strm->state == Z_NULL + ) + return Z_STREAM_ERROR; + + strm->total_in = strm->total_out = 0; + strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ + strm->data_type = Z_UNKNOWN; + + s = (deflate_state *)strm->state; + s->pending = 0; + s->pending_out = s->pending_buf; + + if (s->wrap < 0) + s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ + s->status = s->wrap ? INIT_STATE : BUSY_STATE; + strm->adler = +#ifdef GZIP + s->wrap == 2 ? crc32(0L, Z_NULL, 0) : +#endif + adler32(0L, Z_NULL, 0); + s->last_flush = Z_NO_FLUSH; + + _tr_init(s); + + return Z_OK; +} + +/* ========================================================================= */ +int deflatePending (z_streamp strm, unsigned *pending, int *bits) +{ + struct internal_state_deflate *state = + (struct internal_state_deflate*)strm->state; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + if (pending != Z_NULL) + *pending = state->pending; + if (bits != Z_NULL) + *bits = state->bi_valid; + return Z_OK; +} /* ========================================================================= */ int deflateInit_(z_streamp strm, int level, const char *version, int stream_size) @@ -217,94 +246,281 @@ int deflateInit2_(z_streamp strm, int level, int method, int windowBits, int mem */ if (version == Z_NULL || version[0] != my_version[0] || - stream_size != sizeof(z_stream)) { + stream_size != sizeof(z_stream)) return Z_VERSION_ERROR; - } - if (strm == Z_NULL) return Z_STREAM_ERROR; - strm->msg = Z_NULL; - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO + if (strm == Z_NULL) return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif - } - if (strm->zfree == NULL) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif + + strm->msg = Z_NULL; + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + strm->zfree = zcfree; #ifdef FASTEST - if (level != 0) level = 1; + if (level != 0) + level = 1; #else - if (level == Z_DEFAULT_COMPRESSION) level = 6; + if (level == Z_DEFAULT_COMPRESSION) + level = 6; #endif - if (windowBits < 0) { /* suppress zlib wrapper */ - wrap = 0; + if (windowBits < 0) + { /* suppress zlib wrapper */ + wrap = 0; windowBits = -windowBits; } #ifdef GZIP - else if (windowBits > 15) { - wrap = 2; /* write gzip wrapper instead */ + else if (windowBits > 15) + { + wrap = 2; /* write gzip wrapper instead */ windowBits -= 16; } #endif if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method != Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_FIXED) { + strategy < 0 || strategy > Z_FIXED) return Z_STREAM_ERROR; - } - if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ - s = (deflate_state *) ZALLOC(strm, 1, sizeof(deflate_state)); - if (s == Z_NULL) return Z_MEM_ERROR; - strm->state = (struct internal_state*)s; - s->strm = strm; - s->wrap = wrap; - s->gzhead = Z_NULL; - s->w_bits = windowBits; - s->w_size = 1 << s->w_bits; - s->w_mask = s->w_size - 1; + if (windowBits == 8) + windowBits = 9; /* until 256-byte window bug fixed */ + s = (deflate_state *)calloc(1, sizeof(deflate_state)); - s->hash_bits = memLevel + 7; - s->hash_size = 1 << s->hash_bits; - s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + if (s == Z_NULL) + return Z_MEM_ERROR; - s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); - s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); - s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos)); + strm->state = (struct internal_state*)s; + s->strm = strm; - s->high_water = 0; /* nothing written to s->window yet */ + s->wrap = wrap; + s->gzhead = Z_NULL; + s->w_bits = windowBits; + s->w_size = 1 << s->w_bits; + s->w_mask = s->w_size - 1; + + s->hash_bits = memLevel + 7; + s->hash_size = 1 << s->hash_bits; + s->hash_mask = s->hash_size - 1; + s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + + s->window = (Bytef*)calloc(s->w_size, 2*sizeof(Byte)); + s->prev = (Posf*) calloc(s->w_size, sizeof(Pos)); + s->head = (Posf*) calloc(s->hash_size, sizeof(Pos)); + + s->high_water = 0; /* nothing written to s->window yet */ s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ - overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + overlay = (ushf *)calloc(s->lit_bufsize, sizeof(ush)+2); s->pending_buf = (uchf *) overlay; s->pending_buf_size = (ulg)s->lit_bufsize * (sizeof(ush)+2L); if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL || - s->pending_buf == Z_NULL) { + s->pending_buf == Z_NULL) + { s->status = FINISH_STATE; strm->msg = ERR_MSG(Z_MEM_ERROR); deflateEnd (strm); return Z_MEM_ERROR; } - s->d_buf = overlay + s->lit_bufsize/sizeof(ush); - s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; - s->level = level; + s->level = level; s->strategy = strategy; - s->method = (Byte)method; + s->method = (Byte)method; return deflateReset(strm); } +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->next_in buffer and copying from it. + * (See also flush_pending()). + */ +static int read_buf(z_streamp strm, Bytef *buf, unsigned size) +{ + struct internal_state_deflate + *state = (struct internal_state_deflate*)strm->state; + unsigned len = strm->avail_in; + + if (len > size) + len = size; + if (len == 0) + return 0; + + strm->avail_in -= len; + + memcpy(buf, strm->next_in, len); + if (state->wrap == 1) + strm->adler = adler32(strm->adler, buf, len); +#ifdef GZIP + else if (state->wrap == 2) + strm->adler = crc32(strm->adler, buf, len); +#endif + strm->next_in += len; + strm->total_in += len; + + return (int)len; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +static void fill_window(deflate_state *s) +{ + register unsigned n, m; + register Posf *p; + unsigned more; /* Amount of free space at the end of the window. */ + uInt wsize = s->w_size; + + Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); + + /* Deal with !@#$% 64K limit: */ + if (sizeof(int) <= 2) { + if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + more = wsize; + + } else if (more == (unsigned)(-1)) { + /* Very unlikely, but possible on 16 bit machine if + * strstart == 0 && lookahead == 1 (input done a byte at time) + */ + more--; + } + } + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s->strstart >= wsize+MAX_DIST(s)) { + + memcpy(s->window, s->window+wsize, (unsigned)wsize); + s->match_start -= wsize; + s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ + s->block_start -= (long) wsize; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + n = s->hash_size; + p = &s->head[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + } while (--n); + + n = wsize; +#ifndef FASTEST + p = &s->prev[n]; + do { + m = *--p; + *p = (Pos)(m >= wsize ? m-wsize : NIL); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); +#endif + more += wsize; + } + if (s->strm->avail_in == 0) break; + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + Assert(more >= 2, "more < 2"); + + n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); + s->lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s->lookahead + s->insert >= MIN_MATCH) { + uInt str = s->strstart - s->insert; + s->ins_h = s->window[str]; + UPDATE_HASH(s, s->ins_h, s->window[str + 1]); +#if MIN_MATCH != 3 + Call UPDATE_HASH() MIN_MATCH-3 more times +#endif + while (s->insert) { + UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); +#ifndef FASTEST + s->prev[str & s->w_mask] = s->head[s->ins_h]; +#endif + s->head[s->ins_h] = (Pos)str; + str++; + s->insert--; + if (s->lookahead + s->insert < MIN_MATCH) + break; + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ + if (s->high_water < s->window_size) { + ulg curr = s->strstart + (ulg)(s->lookahead); + ulg init; + + if (s->high_water < curr) { + /* Previous high water mark below current data -- zero WIN_INIT + * bytes or up to end of window, whichever is less. + */ + init = s->window_size - curr; + if (init > WIN_INIT) + init = WIN_INIT; + zmemzero(s->window + curr, (unsigned)init); + s->high_water = curr + init; + } + else if (s->high_water < (ulg)curr + WIN_INIT) { + /* High water mark at or above current data, but below current data + * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up + * to end of window, whichever is less. + */ + init = (ulg)curr + WIN_INIT - s->high_water; + if (init > s->window_size - s->high_water) + init = s->window_size - s->high_water; + zmemzero(s->window + s->high_water, (unsigned)init); + s->high_water += init; + } + } + + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "not enough room for search"); +} + + /* ========================================================================= */ int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLength) { @@ -327,24 +543,28 @@ int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLeng s->wrap = 0; /* avoid computing Adler-32 in read_buf */ /* if dictionary would fill window, just replace the history */ - if (dictLength >= s->w_size) { - if (wrap == 0) { /* already empty otherwise */ + if (dictLength >= s->w_size) + { + if (wrap == 0) + { + /* already empty otherwise */ CLEAR_HASH(s); s->strstart = 0; s->block_start = 0L; s->insert = 0; } dictionary += dictLength - s->w_size; /* use the tail */ - dictLength = s->w_size; + dictLength = s->w_size; } /* insert dictionary into window and hash */ - avail = strm->avail_in; - next = strm->next_in; + avail = strm->avail_in; + next = strm->next_in; strm->avail_in = dictLength; - strm->next_in = (Bytef *)dictionary; + strm->next_in = (Bytef *)dictionary; fill_window(s); - while (s->lookahead >= MIN_MATCH) { + while (s->lookahead >= MIN_MATCH) + { str = s->strstart; n = s->lookahead - (MIN_MATCH-1); do { @@ -359,58 +579,53 @@ int deflateSetDictionary (z_streamp strm, const Bytef *dictionary, uInt dictLeng s->lookahead = MIN_MATCH-1; fill_window(s); } - s->strstart += s->lookahead; - s->block_start = (long)s->strstart; - s->insert = s->lookahead; - s->lookahead = 0; - s->match_length = s->prev_length = MIN_MATCH-1; + s->strstart += s->lookahead; + s->block_start = (long)s->strstart; + s->insert = s->lookahead; + s->lookahead = 0; + s->match_length = s->prev_length = MIN_MATCH-1; s->match_available = 0; - strm->next_in = next; - strm->avail_in = avail; - s->wrap = wrap; + strm->next_in = next; + strm->avail_in = avail; + s->wrap = wrap; return Z_OK; } -/* ========================================================================= */ -int deflateResetKeep (z_streamp strm) +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +static void lm_init (deflate_state *s) { - deflate_state *s; + s->window_size = (ulg)2L*s->w_size; - if (strm == Z_NULL || strm->state == Z_NULL || - strm->zalloc == Z_NULL || strm->zfree == Z_NULL) { - return Z_STREAM_ERROR; - } + CLEAR_HASH(s); - strm->total_in = strm->total_out = 0; - strm->msg = Z_NULL; /* use zfree if we ever allocate msg dynamically */ - strm->data_type = Z_UNKNOWN; + /* Set the default configuration parameters: + */ + s->max_lazy_match = configuration_table[s->level].max_lazy; + s->good_match = configuration_table[s->level].good_length; + s->nice_match = configuration_table[s->level].nice_length; + s->max_chain_length = configuration_table[s->level].max_chain; - s = (deflate_state *)strm->state; - s->pending = 0; - s->pending_out = s->pending_buf; - - if (s->wrap < 0) { - s->wrap = -s->wrap; /* was made negative by deflate(..., Z_FINISH); */ - } - s->status = s->wrap ? INIT_STATE : BUSY_STATE; - strm->adler = -#ifdef GZIP - s->wrap == 2 ? crc32(0L, Z_NULL, 0) : + s->strstart = 0; + s->block_start = 0L; + s->lookahead = 0; + s->insert = 0; + s->match_length = s->prev_length = MIN_MATCH-1; + s->match_available = 0; + s->ins_h = 0; +#ifndef FASTEST +#ifdef ASMV + match_init(); /* initialize the asm code */ +#endif #endif - adler32(0L, Z_NULL, 0); - s->last_flush = Z_NO_FLUSH; - - _tr_init(s); - - return Z_OK; } + /* ========================================================================= */ int deflateReset (z_streamp strm) { - int ret; - - ret = deflateResetKeep(strm); + int ret = deflateResetKeep(strm); if (ret == Z_OK) lm_init((deflate_state*)strm->state); return ret; @@ -419,36 +634,30 @@ int deflateReset (z_streamp strm) /* ========================================================================= */ int deflateSetHeader (z_streamp strm, gz_headerp head) { - struct internal_state_deflate *state = (struct internal_state_deflate*)strm->state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + struct internal_state_deflate *state = + (struct internal_state_deflate*)strm->state; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; if (state->wrap != 2) return Z_STREAM_ERROR; state->gzhead = head; return Z_OK; } -/* ========================================================================= */ -int deflatePending (z_streamp strm, unsigned *pending, int *bits) -{ - struct internal_state_deflate *state = (struct internal_state_deflate*)strm->state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - if (pending != Z_NULL) - *pending = state->pending; - if (bits != Z_NULL) - *bits = state->bi_valid; - return Z_OK; -} - /* ========================================================================= */ int deflatePrime (z_streamp strm, int bits, int value) { deflate_state *s; int put; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + s = (deflate_state*)strm->state; + if ((Bytef *)(s->d_buf) < s->pending_out + ((Buf_size + 7) >> 3)) return Z_BUF_ERROR; + do { put = Buf_size - s->bi_valid; if (put > bits) @@ -469,28 +678,34 @@ int deflateParams(z_streamp strm, int level, int strategy) compress_func func; int err = Z_OK; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + s = (deflate_state*)strm->state; #ifdef FASTEST - if (level != 0) level = 1; + if (level != 0) + level = 1; #else - if (level == Z_DEFAULT_COMPRESSION) level = 6; + if (level == Z_DEFAULT_COMPRESSION) + level = 6; #endif - if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { + if (level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) return Z_STREAM_ERROR; - } + func = configuration_table[s->level].func; if ((strategy != s->strategy || func != configuration_table[level].func) && - strm->total_in != 0) { + strm->total_in != 0) + { /* Flush the last buffer: */ err = deflate(strm, Z_BLOCK); if (err == Z_BUF_ERROR && s->pending == 0) err = Z_OK; } - if (s->level != level) { - s->level = level; + if (s->level != level) + { + s->level = level; s->max_lazy_match = configuration_table[level].max_lazy; s->good_match = configuration_table[level].good_length; s->nice_match = configuration_table[level].nice_length; @@ -505,11 +720,13 @@ int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, { deflate_state *s; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - s = (deflate_state*)strm->state; - s->good_match = good_length; - s->max_lazy_match = max_lazy; - s->nice_match = nice_length; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + + s = (deflate_state*)strm->state; + s->good_match = good_length; + s->max_lazy_match = max_lazy; + s->nice_match = nice_length; s->max_chain_length = max_chain; return Z_OK; } @@ -534,11 +751,11 @@ int deflateTune(z_streamp strm, int good_length, int max_lazy, int nice_length, uLong deflateBound(z_streamp strm, uLong sourceLen) { deflate_state *s; - uLong complen, wraplen; + uLong wraplen; Bytef *str; /* conservative upper bound for compressed data */ - complen = sourceLen + + uLong complen = sourceLen + ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; /* if can't get parameters, return conservative bound plus zlib wrapper */ @@ -547,7 +764,9 @@ uLong deflateBound(z_streamp strm, uLong sourceLen) /* compute wrapper length */ s = (deflate_state*)strm->state; - switch (s->wrap) { + + switch (s->wrap) + { case 0: /* raw deflate */ wraplen = 0; break; @@ -556,7 +775,8 @@ uLong deflateBound(z_streamp strm, uLong sourceLen) break; case 2: /* gzip wrapper */ wraplen = 18; - if (s->gzhead != Z_NULL) { /* user-supplied gzip header */ + if (s->gzhead != Z_NULL) + { /* user-supplied gzip header */ if (s->gzhead->extra != Z_NULL) wraplen += 2 + s->gzhead->extra_len; str = s->gzhead->name; @@ -611,19 +831,158 @@ static void flush_pending(z_streamp strm) _tr_flush_bits(s); len = s->pending; if (len > strm->avail_out) len = strm->avail_out; - if (len == 0) return; + if (len == 0) + return; - zmemcpy(strm->next_out, s->pending_out, len); + memcpy(strm->next_out, s->pending_out, len); strm->next_out += len; s->pending_out += len; strm->total_out += len; strm->avail_out -= len; s->pending -= len; - if (s->pending == 0) { + if (s->pending == 0) s->pending_out = s->pending_buf; - } } +/* =========================================================================== + * Flush the current block, with given end-of-file flag. + * IN assertion: strstart is set to the end of the current match. + */ +#define FLUSH_BLOCK_ONLY(s, last) { \ + _tr_flush_block(s, (s->block_start >= 0L ? \ + (charf *)&s->window[(unsigned)s->block_start] : \ + (charf *)Z_NULL), \ + (ulg)((long)s->strstart - s->block_start), \ + (last)); \ + s->block_start = s->strstart; \ + flush_pending(s->strm); \ +} + +/* Same but force premature exit if necessary. */ +#define FLUSH_BLOCK(s, last) { \ + FLUSH_BLOCK_ONLY(s, last); \ + if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ +} + + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +static block_state deflate_huff(deflate_state *s, int flush) +{ + int bflush; /* set if current block must be flushed */ + + for (;;) + { + /* Make sure that we have a literal to write. */ + if (s->lookahead == 0) + { + fill_window(s); + if (s->lookahead == 0) + { + if (flush == Z_NO_FLUSH) + return need_more; + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s->match_length = 0; + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) + { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +static block_state deflate_rle(deflate_state *s, int flush) +{ + int bflush; /* set if current block must be flushed */ + uInt prev; /* byte at distance one to match */ + Bytef *scan, *strend; /* scan goes up to strend for length of run */ + + for (;;) + { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s->lookahead <= MAX_MATCH) + { + fill_window(s); + if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) + return need_more; + if (s->lookahead == 0) + break; /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s->match_length = 0; + if (s->lookahead >= MIN_MATCH && s->strstart > 0) + { + scan = s->window + s->strstart - 1; + prev = *scan; + if (prev == *++scan && prev == *++scan && prev == *++scan) + { + strend = s->window + s->strstart + MAX_MATCH; + do { + } while (prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + prev == *++scan && prev == *++scan && + scan < strend); + s->match_length = MAX_MATCH - (int)(strend - scan); + if (s->match_length > s->lookahead) + s->match_length = s->lookahead; + } + Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s->match_length >= MIN_MATCH) + { + _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); + + s->lookahead -= s->match_length; + s->strstart += s->match_length; + s->match_length = 0; + } + else + { + /* No match, output a literal byte */ + _tr_tally_lit (s, s->window[s->strstart], bflush); + s->lookahead--; + s->strstart++; + } + if (bflush) FLUSH_BLOCK(s, 0); + } + s->insert = 0; + if (flush == Z_FINISH) + { + FLUSH_BLOCK(s, 1); + return finish_done; + } + if (s->last_lit) + FLUSH_BLOCK(s, 0); + return block_done; +} + + /* ========================================================================= */ int deflate (z_streamp strm, int flush) { @@ -631,9 +990,9 @@ int deflate (z_streamp strm, int flush) deflate_state *s; if (strm == Z_NULL || strm->state == Z_NULL || - flush > Z_BLOCK || flush < 0) { + flush > Z_BLOCK || flush < 0) return Z_STREAM_ERROR; - } + s = (deflate_state*)strm->state; if (strm->next_out == Z_NULL || @@ -643,19 +1002,22 @@ int deflate (z_streamp strm, int flush) } if (strm->avail_out == 0) ERR_RETURN(strm, Z_BUF_ERROR); - s->strm = strm; /* just in case */ - old_flush = s->last_flush; + s->strm = strm; /* just in case */ + old_flush = s->last_flush; s->last_flush = flush; /* Write the header */ - if (s->status == INIT_STATE) { + if (s->status == INIT_STATE) + { #ifdef GZIP - if (s->wrap == 2) { + if (s->wrap == 2) + { strm->adler = crc32(0L, Z_NULL, 0); put_byte(s, 31); put_byte(s, 139); put_byte(s, 8); - if (s->gzhead == Z_NULL) { + if (s->gzhead == Z_NULL) + { put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); @@ -667,7 +1029,8 @@ int deflate (z_streamp strm, int flush) put_byte(s, OS_CODE); s->status = BUSY_STATE; } - else { + else + { put_byte(s, (s->gzhead->text ? 1 : 0) + (s->gzhead->hcrc ? 2 : 0) + (s->gzhead->extra == Z_NULL ? 0 : 4) + @@ -942,27 +1305,28 @@ int deflateEnd (z_streamp strm) struct internal_state_deflate *state; int status; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct internal_state_deflate*)strm->state; + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct internal_state_deflate*)strm->state; status = state->status; + if (status != INIT_STATE && status != EXTRA_STATE && status != NAME_STATE && status != COMMENT_STATE && status != HCRC_STATE && status != BUSY_STATE && - status != FINISH_STATE) { + status != FINISH_STATE) return Z_STREAM_ERROR; - } /* Deallocate in reverse order of allocations: */ - TRY_FREE(strm, state->pending_buf); - TRY_FREE(strm, state->head); - TRY_FREE(strm, state->prev); - TRY_FREE(strm, state->window); + free(state->pending_buf); + free(state->head); + free(state->prev); + free(state->window); - ZFREE(strm, state); + free(state); state = Z_NULL; return status == BUSY_STATE ? Z_DATA_ERROR : Z_OK; @@ -982,112 +1346,50 @@ int deflateCopy (z_streamp dest, z_streamp source) deflate_state *ss; ushf *overlay; - - if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) { + if (source == Z_NULL || dest == Z_NULL || source->state == Z_NULL) return Z_STREAM_ERROR; - } - ss = (deflate_state*)source->state; + ss = (deflate_state*)source->state; - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + memcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - ds = (deflate_state *) ZALLOC(dest, 1, sizeof(deflate_state)); - if (ds == Z_NULL) return Z_MEM_ERROR; - dest->state = (struct internal_state FAR *) ds; - zmemcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); - ds->strm = dest; + ds = (deflate_state *)calloc(1, sizeof(deflate_state)); + if (ds == Z_NULL) + return Z_MEM_ERROR; + dest->state = (struct internal_state FAR *) ds; + memcpy((voidpf)ds, (voidpf)ss, sizeof(deflate_state)); + ds->strm = dest; - ds->window = (Bytef *) ZALLOC(dest, ds->w_size, 2*sizeof(Byte)); - ds->prev = (Posf *) ZALLOC(dest, ds->w_size, sizeof(Pos)); - ds->head = (Posf *) ZALLOC(dest, ds->hash_size, sizeof(Pos)); - overlay = (ushf *) ZALLOC(dest, ds->lit_bufsize, sizeof(ush)+2); + ds->window = (Bytef *)calloc(ds->w_size, 2*sizeof(Byte)); + ds->prev = (Posf *) calloc(ds->w_size, sizeof(Pos)); + ds->head = (Posf *) calloc(ds->hash_size, sizeof(Pos)); + overlay = (ushf *) calloc(ds->lit_bufsize, sizeof(ush)+2); ds->pending_buf = (uchf *) overlay; if (ds->window == Z_NULL || ds->prev == Z_NULL || ds->head == Z_NULL || - ds->pending_buf == Z_NULL) { + ds->pending_buf == Z_NULL) + { deflateEnd (dest); return Z_MEM_ERROR; } - /* following zmemcpy do not work for 16-bit MSDOS */ - zmemcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); - zmemcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); - zmemcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); - zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); - ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); - ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); - ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + memcpy(ds->window, ss->window, ds->w_size * 2 * sizeof(Byte)); + memcpy((voidpf)ds->prev, (voidpf)ss->prev, ds->w_size * sizeof(Pos)); + memcpy((voidpf)ds->head, (voidpf)ss->head, ds->hash_size * sizeof(Pos)); + memcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size); - ds->l_desc.dyn_tree = ds->dyn_ltree; - ds->d_desc.dyn_tree = ds->dyn_dtree; + ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf); + ds->d_buf = overlay + ds->lit_bufsize/sizeof(ush); + ds->l_buf = ds->pending_buf + (1+sizeof(ush))*ds->lit_bufsize; + + ds->l_desc.dyn_tree = ds->dyn_ltree; + ds->d_desc.dyn_tree = ds->dyn_dtree; ds->bl_desc.dyn_tree = ds->bl_tree; return Z_OK; #endif /* MAXSEG_64K */ } -/* =========================================================================== - * Read a new buffer from the current input stream, update the adler32 - * and total number of bytes read. All deflate() input goes through - * this function so some applications may wish to modify it to avoid - * allocating a large strm->next_in buffer and copying from it. - * (See also flush_pending()). - */ -static int read_buf(z_streamp strm, Bytef *buf, unsigned size) -{ - struct internal_state_deflate *state = (struct internal_state_deflate*)strm->state; - unsigned len = strm->avail_in; - - if (len > size) len = size; - if (len == 0) return 0; - - strm->avail_in -= len; - - zmemcpy(buf, strm->next_in, len); - if (state->wrap == 1) { - strm->adler = adler32(strm->adler, buf, len); - } -#ifdef GZIP - else if (state->wrap == 2) { - strm->adler = crc32(strm->adler, buf, len); - } -#endif - strm->next_in += len; - strm->total_in += len; - - return (int)len; -} - -/* =========================================================================== - * Initialize the "longest match" routines for a new zlib stream - */ -static void lm_init (deflate_state *s) -{ - s->window_size = (ulg)2L*s->w_size; - - CLEAR_HASH(s); - - /* Set the default configuration parameters: - */ - s->max_lazy_match = configuration_table[s->level].max_lazy; - s->good_match = configuration_table[s->level].good_length; - s->nice_match = configuration_table[s->level].nice_length; - s->max_chain_length = configuration_table[s->level].max_chain; - - s->strstart = 0; - s->block_start = 0L; - s->lookahead = 0; - s->insert = 0; - s->match_length = s->prev_length = MIN_MATCH-1; - s->match_available = 0; - s->ins_h = 0; -#ifndef FASTEST -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -#endif -} - #ifndef FASTEST /* =========================================================================== * Set match_start to the longest match starting at the given string and @@ -1104,12 +1406,14 @@ static void lm_init (deflate_state *s) */ static uInt longest_match(deflate_state *s, IPos cur_match) { - unsigned chain_length = s->max_chain_length;/* max hash chain length */ - register Bytef *scan = s->window + s->strstart; /* current string */ register Bytef *match; /* matched string */ register int len; /* length of current match */ - int best_len = s->prev_length; /* best match length so far */ - int nice_match = s->nice_match; /* stop if match long enough */ + unsigned chain_length = s->max_chain_length; /* max hash chain length */ + register Bytef *scan = s->window + s->strstart; /* current string */ + int best_len = s->prev_length; + /* best match length so far */ + int nice_match = s->nice_match; + /* stop if match long enough */ IPos limit = s->strstart > (IPos)MAX_DIST(s) ? s->strstart - (IPos)MAX_DIST(s) : NIL; /* Stop when cur_match becomes <= limit. To simplify the code, @@ -1122,11 +1426,11 @@ static uInt longest_match(deflate_state *s, IPos cur_match) /* Compare two bytes at a time. Note: this is not always beneficial. * Try with and without -DUNALIGNED_OK to check. */ - register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; - register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); + register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; + register ush scan_start = *(ushf*)scan; + register ush scan_end = *(ushf*)(scan+best_len-1); #else - register Bytef *strend = s->window + s->strstart + MAX_MATCH; + register Bytef *strend = s->window + s->strstart + MAX_MATCH; register Byte scan_end1 = scan[best_len-1]; register Byte scan_end = scan[best_len]; #endif @@ -1137,13 +1441,14 @@ static uInt longest_match(deflate_state *s, IPos cur_match) Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); /* Do not waste too much time if we already have a good match: */ - if (s->prev_length >= s->good_match) { + if (s->prev_length >= s->good_match) chain_length >>= 2; - } + /* Do not look for matches beyond the end of the input. This is necessary * to make deflate deterministic. */ - if ((uInt)nice_match > s->lookahead) nice_match = s->lookahead; + if ((uInt)nice_match > s->lookahead) + nice_match = s->lookahead; Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); @@ -1197,7 +1502,8 @@ static uInt longest_match(deflate_state *s, IPos cur_match) if (match[best_len] != scan_end || match[best_len-1] != scan_end1 || *match != *scan || - *++match != scan[1]) continue; + *++match != scan[1]) + continue; /* The check at best_len-1 can be removed because it will be made * again later. (This heuristic is not always a win.) @@ -1304,180 +1610,6 @@ static uInt longest_match(s, cur_match) #endif /* FASTEST */ -/* =========================================================================== - * Fill the window when the lookahead becomes insufficient. - * Updates strstart and lookahead. - * - * IN assertion: lookahead < MIN_LOOKAHEAD - * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD - * At least one byte has been read, or avail_in == 0; reads are - * performed for at least two bytes (required for the zip translate_eol - * option -- not supported here). - */ -static void fill_window(deflate_state *s) -{ - register unsigned n, m; - register Posf *p; - unsigned more; /* Amount of free space at the end of the window. */ - uInt wsize = s->w_size; - - Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); - - do { - more = (unsigned)(s->window_size -(ulg)s->lookahead -(ulg)s->strstart); - - /* Deal with !@#$% 64K limit: */ - if (sizeof(int) <= 2) { - if (more == 0 && s->strstart == 0 && s->lookahead == 0) { - more = wsize; - - } else if (more == (unsigned)(-1)) { - /* Very unlikely, but possible on 16 bit machine if - * strstart == 0 && lookahead == 1 (input done a byte at time) - */ - more--; - } - } - - /* If the window is almost full and there is insufficient lookahead, - * move the upper half to the lower one to make room in the upper half. - */ - if (s->strstart >= wsize+MAX_DIST(s)) { - - zmemcpy(s->window, s->window+wsize, (unsigned)wsize); - s->match_start -= wsize; - s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ - s->block_start -= (long) wsize; - - /* Slide the hash table (could be avoided with 32 bit values - at the expense of memory usage). We slide even when level == 0 - to keep the hash table consistent if we switch back to level > 0 - later. (Using level 0 permanently is not an optimal usage of - zlib, so we don't care about this pathological case.) - */ - n = s->hash_size; - p = &s->head[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - } while (--n); - - n = wsize; -#ifndef FASTEST - p = &s->prev[n]; - do { - m = *--p; - *p = (Pos)(m >= wsize ? m-wsize : NIL); - /* If n is not on any hash chain, prev[n] is garbage but - * its value will never be used. - */ - } while (--n); -#endif - more += wsize; - } - if (s->strm->avail_in == 0) break; - - /* If there was no sliding: - * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && - * more == window_size - lookahead - strstart - * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) - * => more >= window_size - 2*WSIZE + 2 - * In the BIG_MEM or MMAP case (not yet supported), - * window_size == input_size + MIN_LOOKAHEAD && - * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. - * Otherwise, window_size == 2*WSIZE so more >= 2. - * If there was sliding, more >= WSIZE. So in all cases, more >= 2. - */ - Assert(more >= 2, "more < 2"); - - n = read_buf(s->strm, s->window + s->strstart + s->lookahead, more); - s->lookahead += n; - - /* Initialize the hash value now that we have some input: */ - if (s->lookahead + s->insert >= MIN_MATCH) { - uInt str = s->strstart - s->insert; - s->ins_h = s->window[str]; - UPDATE_HASH(s, s->ins_h, s->window[str + 1]); -#if MIN_MATCH != 3 - Call UPDATE_HASH() MIN_MATCH-3 more times -#endif - while (s->insert) { - UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); -#ifndef FASTEST - s->prev[str & s->w_mask] = s->head[s->ins_h]; -#endif - s->head[s->ins_h] = (Pos)str; - str++; - s->insert--; - if (s->lookahead + s->insert < MIN_MATCH) - break; - } - } - /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, - * but this is not important since only literal bytes will be emitted. - */ - - } while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0); - - /* If the WIN_INIT bytes after the end of the current data have never been - * written, then zero those bytes in order to avoid memory check reports of - * the use of uninitialized (or uninitialised as Julian writes) bytes by - * the longest match routines. Update the high water mark for the next - * time through here. WIN_INIT is set to MAX_MATCH since the longest match - * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. - */ - if (s->high_water < s->window_size) { - ulg curr = s->strstart + (ulg)(s->lookahead); - ulg init; - - if (s->high_water < curr) { - /* Previous high water mark below current data -- zero WIN_INIT - * bytes or up to end of window, whichever is less. - */ - init = s->window_size - curr; - if (init > WIN_INIT) - init = WIN_INIT; - zmemzero(s->window + curr, (unsigned)init); - s->high_water = curr + init; - } - else if (s->high_water < (ulg)curr + WIN_INIT) { - /* High water mark at or above current data, but below current data - * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up - * to end of window, whichever is less. - */ - init = (ulg)curr + WIN_INIT - s->high_water; - if (init > s->window_size - s->high_water) - init = s->window_size - s->high_water; - zmemzero(s->window + s->high_water, (unsigned)init); - s->high_water += init; - } - } - - Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, - "not enough room for search"); -} - -/* =========================================================================== - * Flush the current block, with given end-of-file flag. - * IN assertion: strstart is set to the end of the current match. - */ -#define FLUSH_BLOCK_ONLY(s, last) { \ - _tr_flush_block(s, (s->block_start >= 0L ? \ - (charf *)&s->window[(unsigned)s->block_start] : \ - (charf *)Z_NULL), \ - (ulg)((long)s->strstart - s->block_start), \ - (last)); \ - s->block_start = s->strstart; \ - flush_pending(s->strm); \ - Tracev((stderr,"[FLUSH]")); \ -} - -/* Same but force premature exit if necessary. */ -#define FLUSH_BLOCK(s, last) { \ - FLUSH_BLOCK_ONLY(s, last); \ - if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \ -} - /* =========================================================================== * Copy without compression as much as possible from the input stream, return * the current block state. @@ -1495,15 +1627,15 @@ static block_state deflate_stored(deflate_state *s, int flush) ulg max_block_size = 0xffff; ulg max_start; - if (max_block_size > s->pending_buf_size - 5) { + if (max_block_size > s->pending_buf_size - 5) max_block_size = s->pending_buf_size - 5; - } /* Copy as much as possible from input to output: */ - for (;;) { + for (;;) + { /* Fill the window as much as possible: */ - if (s->lookahead <= 1) { - + if (s->lookahead <= 1) + { Assert(s->strstart < s->w_size+MAX_DIST(s) || s->block_start >= (long)s->w_size, "slide too late"); @@ -1519,7 +1651,8 @@ static block_state deflate_stored(deflate_state *s, int flush) /* Emit a stored block if pending_buf will be full: */ max_start = s->block_start + max_block_size; - if (s->strstart == 0 || (ulg)s->strstart >= max_start) { + if (s->strstart == 0 || (ulg)s->strstart >= max_start) + { /* strstart == 0 is possible when wraparound on 16-bit machine */ s->lookahead = (uInt)(s->strstart - max_start); s->strstart = (uInt)max_start; @@ -1533,7 +1666,8 @@ static block_state deflate_stored(deflate_state *s, int flush) } } s->insert = 0; - if (flush == Z_FINISH) { + if (flush == Z_FINISH) + { FLUSH_BLOCK(s, 1); return finish_done; } @@ -1554,32 +1688,36 @@ static block_state deflate_fast(deflate_state *s, int flush) IPos hash_head; /* head of the hash chain */ int bflush; /* set if current block must be flushed */ - for (;;) { + for (;;) + { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ - if (s->lookahead < MIN_LOOKAHEAD) { + if (s->lookahead < MIN_LOOKAHEAD) + { fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ + if (s->lookahead == 0) + break; /* flush the current block */ } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { + if (s->lookahead >= MIN_MATCH) + { INSERT_STRING(s, s->strstart, hash_head); } /* Find the longest match, discarding those <= prev_length. * At this point we have always match_length < MIN_MATCH */ - if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) { + if (hash_head != NIL && s->strstart - hash_head <= MAX_DIST(s)) + { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). @@ -1587,7 +1725,8 @@ static block_state deflate_fast(deflate_state *s, int flush) s->match_length = longest_match (s, hash_head); /* longest_match() sets match_start */ } - if (s->match_length >= MIN_MATCH) { + if (s->match_length >= MIN_MATCH) + { _tr_tally_dist(s, s->strstart - s->match_start, s->match_length - MIN_MATCH, bflush); @@ -1598,7 +1737,8 @@ static block_state deflate_fast(deflate_state *s, int flush) */ #ifndef FASTEST if (s->match_length <= s->max_insert_length && - s->lookahead >= MIN_MATCH) { + s->lookahead >= MIN_MATCH) + { s->match_length--; /* string at strstart already in table */ do { s->strstart++; @@ -1608,7 +1748,8 @@ static block_state deflate_fast(deflate_state *s, int flush) */ } while (--s->match_length != 0); s->strstart++; - } else + } + else #endif { s->strstart += s->match_length; @@ -1622,9 +1763,10 @@ static block_state deflate_fast(deflate_state *s, int flush) * matter since it will be recomputed at next deflate call. */ } - } else { + } + else + { /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); _tr_tally_lit (s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; @@ -1632,7 +1774,8 @@ static block_state deflate_fast(deflate_state *s, int flush) if (bflush) FLUSH_BLOCK(s, 0); } s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { + if (flush == Z_FINISH) + { FLUSH_BLOCK(s, 1); return finish_done; } @@ -1653,25 +1796,28 @@ static block_state deflate_slow(deflate_state *s, int flush) int bflush; /* set if current block must be flushed */ /* Process the input block. */ - for (;;) { + for (;;) + { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ - if (s->lookahead < MIN_LOOKAHEAD) { + if (s->lookahead < MIN_LOOKAHEAD) + { fill_window(s); - if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) { + if (s->lookahead < MIN_LOOKAHEAD && flush == Z_NO_FLUSH) return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ + if (s->lookahead == 0) + break; /* flush the current block */ } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; - if (s->lookahead >= MIN_MATCH) { + if (s->lookahead >= MIN_MATCH) + { INSERT_STRING(s, s->strstart, hash_head); } @@ -1681,7 +1827,8 @@ static block_state deflate_slow(deflate_state *s, int flush) s->match_length = MIN_MATCH-1; if (hash_head != NIL && s->prev_length < s->max_lazy_match && - s->strstart - hash_head <= MAX_DIST(s)) { + s->strstart - hash_head <= MAX_DIST(s)) + { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). @@ -1694,7 +1841,8 @@ static block_state deflate_slow(deflate_state *s, int flush) || (s->match_length == MIN_MATCH && s->strstart - s->match_start > TOO_FAR) #endif - )) { + )) + { /* If prev_match is also MIN_MATCH, match_start is garbage * but we will ignore the current match anyway. @@ -1705,7 +1853,8 @@ static block_state deflate_slow(deflate_state *s, int flush) /* If there was a match at the previous step and the current * match is not better, output the previous match: */ - if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) { + if (s->prev_length >= MIN_MATCH && s->match_length <= s->prev_length) + { uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; /* Do not insert strings in hash table beyond this. */ @@ -1730,12 +1879,13 @@ static block_state deflate_slow(deflate_state *s, int flush) if (bflush) FLUSH_BLOCK(s, 0); - } else if (s->match_available) { + } + else if (s->match_available) + { /* If there was no match at the previous position, output a * single literal. If there was a match but the current match * is longer, truncate the previous match to a single literal. */ - Tracevv((stderr,"%c", s->window[s->strstart-1])); _tr_tally_lit(s, s->window[s->strstart-1], bflush); if (bflush) { FLUSH_BLOCK_ONLY(s, 0); @@ -1743,7 +1893,9 @@ static block_state deflate_slow(deflate_state *s, int flush) s->strstart++; s->lookahead--; if (s->strm->avail_out == 0) return need_more; - } else { + } + else + { /* There is no previous match to compare with, wait for * the next step to decide. */ @@ -1753,13 +1905,14 @@ static block_state deflate_slow(deflate_state *s, int flush) } } Assert (flush != Z_NO_FLUSH, "no flush?"); - if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart-1])); + if (s->match_available) + { _tr_tally_lit(s, s->window[s->strstart-1], bflush); s->match_available = 0; } s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; - if (flush == Z_FINISH) { + if (flush == Z_FINISH) + { FLUSH_BLOCK(s, 1); return finish_done; } @@ -1769,109 +1922,3 @@ static block_state deflate_slow(deflate_state *s, int flush) } #endif /* FASTEST */ -/* =========================================================================== - * For Z_RLE, simply look for runs of bytes, generate matches only of distance - * one. Do not maintain a hash table. (It will be regenerated if this run of - * deflate switches away from Z_RLE.) - */ -static block_state deflate_rle(deflate_state *s, int flush) -{ - int bflush; /* set if current block must be flushed */ - uInt prev; /* byte at distance one to match */ - Bytef *scan, *strend; /* scan goes up to strend for length of run */ - - for (;;) { - /* Make sure that we always have enough lookahead, except - * at the end of the input file. We need MAX_MATCH bytes - * for the longest run, plus one for the unrolled loop. - */ - if (s->lookahead <= MAX_MATCH) { - fill_window(s); - if (s->lookahead <= MAX_MATCH && flush == Z_NO_FLUSH) { - return need_more; - } - if (s->lookahead == 0) break; /* flush the current block */ - } - - /* See how many times the previous byte repeats */ - s->match_length = 0; - if (s->lookahead >= MIN_MATCH && s->strstart > 0) { - scan = s->window + s->strstart - 1; - prev = *scan; - if (prev == *++scan && prev == *++scan && prev == *++scan) { - strend = s->window + s->strstart + MAX_MATCH; - do { - } while (prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - prev == *++scan && prev == *++scan && - scan < strend); - s->match_length = MAX_MATCH - (int)(strend - scan); - if (s->match_length > s->lookahead) - s->match_length = s->lookahead; - } - Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); - } - - /* Emit match if have run of MIN_MATCH or longer, else emit literal */ - if (s->match_length >= MIN_MATCH) { - _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush); - - s->lookahead -= s->match_length; - s->strstart += s->match_length; - s->match_length = 0; - } else { - /* No match, output a literal byte */ - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - } - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} - -/* =========================================================================== - * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. - * (It will be regenerated if this run of deflate switches away from Huffman.) - */ -static block_state deflate_huff(deflate_state *s, int flush) -{ - int bflush; /* set if current block must be flushed */ - - for (;;) { - /* Make sure that we have a literal to write. */ - if (s->lookahead == 0) { - fill_window(s); - if (s->lookahead == 0) { - if (flush == Z_NO_FLUSH) - return need_more; - break; /* flush the current block */ - } - } - - /* Output a literal byte */ - s->match_length = 0; - Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); - s->lookahead--; - s->strstart++; - if (bflush) FLUSH_BLOCK(s, 0); - } - s->insert = 0; - if (flush == Z_FINISH) { - FLUSH_BLOCK(s, 1); - return finish_done; - } - if (s->last_lit) - FLUSH_BLOCK(s, 0); - return block_done; -} diff --git a/deps/libz/deflate.h b/deps/libz/deflate.h index 82fe93e224..dc15703aff 100644 --- a/deps/libz/deflate.h +++ b/deps/libz/deflate.h @@ -249,11 +249,6 @@ typedef struct internal_state_deflate { uInt matches; /* number of string matches in current block */ uInt insert; /* bytes at end of window left to insert */ -#ifdef DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - ush bi_buf; /* Output buffer. bits are inserted starting at the bottom (least * significant bits). @@ -309,16 +304,10 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, * used. */ -#ifndef DEBUG /* Inline versions of _tr_tally for speed: */ -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch ZLIB_INTERNAL _length_code[]; - extern uch ZLIB_INTERNAL _dist_code[]; -#else - extern const uch ZLIB_INTERNAL _length_code[]; - extern const uch ZLIB_INTERNAL _dist_code[]; -#endif +extern const uch ZLIB_INTERNAL _length_code[]; +extern const uch ZLIB_INTERNAL _dist_code[]; # define _tr_tally_lit(s, c, flush) \ { uch cc = (c); \ @@ -337,10 +326,5 @@ void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf, s->dyn_dtree[d_code(dist)].Freq++; \ flush = (s->last_lit == s->lit_bufsize-1); \ } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif #endif /* DEFLATE_H */ diff --git a/deps/libz/gzclose.c b/deps/libz/gzclose.c index edeee0344b..bed49eaa39 100644 --- a/deps/libz/gzclose.c +++ b/deps/libz/gzclose.c @@ -20,8 +20,8 @@ int gzclose(gzFile file) return Z_STREAM_ERROR; state = (gz_statep)file; - return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file); -#else - return gzclose_r(file); + if (state->mode != GZ_READ) + return gzclose_w(file); #endif + return gzclose_r(file); } diff --git a/deps/libz/gzlib.c b/deps/libz/gzlib.c index 2d17b27ebd..cf3641a015 100644 --- a/deps/libz/gzlib.c +++ b/deps/libz/gzlib.c @@ -15,14 +15,6 @@ #endif #endif -/* Forward declarations */ -z_off_t gzoffset(gzFile file); -int gzbuffer(gzFile file, unsigned size); - -/* Local functions */ -static void gz_reset OF((gz_statep)); -static gzFile gz_open OF((const void *, int, const char *)); - #if defined UNDER_CE /* Map the Windows error number in ERROR to a locale-dependent error message @@ -34,8 +26,7 @@ static gzFile gz_open OF((const void *, int, const char *)); The gz_strwinerror function does not change the current setting of GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) - DWORD error; +char ZLIB_INTERNAL *gz_strwinerror (DWORD error) { static char buf[1024]; @@ -78,24 +69,25 @@ char ZLIB_INTERNAL *gz_strwinerror (error) /* Reset gzip file state */ static void gz_reset(gz_statep state) { - state->x.have = 0; /* no output data available */ - if (state->mode == GZ_READ) { /* for reading ... */ - state->eof = 0; /* not at end of file */ - state->past = 0; /* have not read past end yet */ - state->how = LOOK; /* look for gzip header */ + state->x.have = 0; /* no output data available */ + if (state->mode == GZ_READ) /* for reading ... */ + { + state->eof = 0; /* not at end of file */ + state->past = 0; /* have not read past end yet */ + state->how = LOOK; /* look for gzip header */ } - state->seek = 0; /* no seek request pending */ + state->seek = 0; /* no seek request pending */ gz_error(state, Z_OK, NULL); /* clear error */ - state->x.pos = 0; /* no uncompressed data yet */ + state->x.pos = 0; /* no uncompressed data yet */ state->strm.avail_in = 0; /* no input data yet */ } /* Open a gzip file either by name or file descriptor. */ static gzFile gz_open(const void *path, int fd, const char *mode) { + int oflag; gz_statep state; size_t len; - int oflag; #ifdef O_CLOEXEC int cloexec = 0; #endif @@ -108,23 +100,25 @@ static gzFile gz_open(const void *path, int fd, const char *mode) return NULL; /* allocate gzFile structure to return */ - state = (gz_statep)malloc(sizeof(gz_state)); + state = (gz_statep)malloc(sizeof(gz_state)); if (state == NULL) return NULL; state->size = 0; /* no buffers allocated yet */ state->want = GZBUFSIZE; /* requested buffer size */ - state->msg = NULL; /* no error message yet */ + state->msg = NULL; /* no error message yet */ /* interpret mode */ - state->mode = GZ_NONE; - state->level = Z_DEFAULT_COMPRESSION; + state->mode = GZ_NONE; + state->level = Z_DEFAULT_COMPRESSION; state->strategy = Z_DEFAULT_STRATEGY; - state->direct = 0; - while (*mode) { + state->direct = 0; + while (*mode) + { if (*mode >= '0' && *mode <= '9') state->level = *mode - '0'; else - switch (*mode) { + switch (*mode) + { case 'r': state->mode = GZ_READ; break; @@ -173,14 +167,17 @@ static gzFile gz_open(const void *path, int fd, const char *mode) } /* must provide an "r", "w", or "a" */ - if (state->mode == GZ_NONE) { + if (state->mode == GZ_NONE) + { free(state); return NULL; } /* can't force transparent read */ - if (state->mode == GZ_READ) { - if (state->direct) { + if (state->mode == GZ_READ) + { + if (state->direct) + { free(state); return NULL; } @@ -189,7 +186,8 @@ static gzFile gz_open(const void *path, int fd, const char *mode) /* save the path name for error messages */ #ifdef _WIN32 - if (fd == -2) { + if (fd == -2) + { len = wcstombs(NULL, (const wchar_t*)path, 0); if (len == (size_t)-1) len = 0; @@ -198,7 +196,8 @@ static gzFile gz_open(const void *path, int fd, const char *mode) #endif len = strlen((const char *)path); state->path = (char *)malloc(len + 1); - if (state->path == NULL) { + if (state->path == NULL) + { free(state); return NULL; } @@ -252,7 +251,8 @@ static gzFile gz_open(const void *path, int fd, const char *mode) state->mode = GZ_WRITE; /* simplify later checks */ /* save the current position for rewinding (only if reading) */ - if (state->mode == GZ_READ) { + if (state->mode == GZ_READ) + { state->start = LSEEK(state->fd, 0, SEEK_CUR); if (state->start == -1) state->start = 0; } @@ -330,8 +330,10 @@ int gzrewind(gzFile file) state = (gz_statep)file; /* check that we're reading and that there's no error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) + if ( + state->mode != GZ_READ || + ( state->err != Z_OK + && state->err != Z_BUF_ERROR)) return -1; /* back up and start over */ @@ -344,22 +346,24 @@ int gzrewind(gzFile file) z_off64_t gzseek64(gzFile file, z_off64_t offset, int whence) { unsigned n; - z_off64_t ret; gz_statep state; /* get internal structure and check integrity */ if (file == NULL) return -1; state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) + if ( state->mode != GZ_READ && + state->mode != GZ_WRITE) return -1; /* check that there's no error */ - if (state->err != Z_OK && state->err != Z_BUF_ERROR) + if ( state->err != Z_OK && + state->err != Z_BUF_ERROR) return -1; /* can only seek from start or relative to current position */ - if (whence != SEEK_SET && whence != SEEK_CUR) + if ( whence != SEEK_SET && + whence != SEEK_CUR) return -1; /* normalize offset to a SEEK_CUR specification */ @@ -370,23 +374,28 @@ z_off64_t gzseek64(gzFile file, z_off64_t offset, int whence) state->seek = 0; /* if within raw area while reading, just go there */ - if (state->mode == GZ_READ && state->how == MODE_COPY && - state->x.pos + offset >= 0) { - ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR); + if ( state->mode == GZ_READ && + state->how == MODE_COPY && + state->x.pos + offset >= 0) + { + z_off64_t ret = LSEEK( + state->fd, offset - state->x.have, SEEK_CUR); if (ret == -1) return -1; - state->x.have = 0; - state->eof = 0; - state->past = 0; - state->seek = 0; + state->x.have = 0; + state->eof = 0; + state->past = 0; + state->seek = 0; gz_error(state, Z_OK, NULL); - state->strm.avail_in = 0; - state->x.pos += offset; + state->strm.avail_in = 0; + state->x.pos += offset; return state->x.pos; } - /* calculate skip amount, rewinding if needed for back seek when reading */ - if (offset < 0) { + /* calculate skip amount, rewinding if + * needed for back seek when reading */ + if (offset < 0) + { if (state->mode != GZ_READ) /* writing -- can't go backwards */ return -1; offset += state->x.pos; @@ -397,17 +406,19 @@ z_off64_t gzseek64(gzFile file, z_off64_t offset, int whence) } /* if reading, skip what's in output buffer (one less gzgetc() check) */ - if (state->mode == GZ_READ) { + if (state->mode == GZ_READ) + { n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? (unsigned)offset : state->x.have; state->x.have -= n; state->x.next += n; - state->x.pos += n; - offset -= n; + state->x.pos += n; + offset -= n; } /* request skip (if not zero) */ - if (offset) { + if (offset) + { state->seek = 1; state->skip = offset; } @@ -416,9 +427,7 @@ z_off64_t gzseek64(gzFile file, z_off64_t offset, int whence) z_off_t gzseek(gzFile file, z_off_t offset, int whence) { - z_off64_t ret; - - ret = gzseek64(file, (z_off64_t)offset, whence); + z_off64_t ret = gzseek64(file, (z_off64_t)offset, whence); return ret == (z_off_t)ret ? (z_off_t)ret : -1; } @@ -430,7 +439,8 @@ z_off64_t gztell64(gzFile file) if (file == NULL) return -1; state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) + if ( state->mode != GZ_READ && + state->mode != GZ_WRITE) return -1; /* return position */ @@ -439,9 +449,7 @@ z_off64_t gztell64(gzFile file) z_off_t gztell(gzFile file) { - z_off64_t ret; - - ret = gztell64(file); + z_off64_t ret = gztell64(file); return ret == (z_off_t)ret ? (z_off_t)ret : -1; } @@ -480,7 +488,8 @@ int gzeof(gzFile file) if (file == NULL) return 0; state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) + if ( state->mode != GZ_READ && + state->mode != GZ_WRITE) return 0; /* return end-of-file state */ @@ -495,7 +504,9 @@ const char * gzerror(gzFile file, int *errnum) if (file == NULL) return NULL; state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) + + if ( state->mode != GZ_READ && + state->mode != GZ_WRITE) return NULL; /* return error information */ @@ -513,12 +524,15 @@ void gzclearerr(gzFile file) if (file == NULL) return; state = (gz_statep)file; - if (state->mode != GZ_READ && state->mode != GZ_WRITE) + + if ( state->mode != GZ_READ && + state->mode != GZ_WRITE) return; /* clear error and end-of-file */ - if (state->mode == GZ_READ) { - state->eof = 0; + if (state->mode == GZ_READ) + { + state->eof = 0; state->past = 0; } gz_error(state, Z_OK, NULL); @@ -533,7 +547,8 @@ void gzclearerr(gzFile file) void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) { /* free previously allocated message and clear */ - if (state->msg != NULL) { + if (state->msg != NULL) + { if (state->err != Z_MEM_ERROR) free(state->msg); state->msg = NULL; @@ -554,7 +569,8 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) /* construct error message with path */ if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == - NULL) { + NULL) + { state->err = Z_MEM_ERROR; return; } @@ -566,7 +582,6 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) strlcat(state->msg, ": ", sizeof(state->msg)); strlcat(state->msg, msg, sizeof(state->msg)); #endif - return; } #ifndef INT_MAX @@ -574,7 +589,7 @@ void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) available) -- we need to do this to cover cases where 2's complement not used, since C standard permits 1's complement and sign-bit representations, otherwise we could just use ((unsigned)-1) >> 1 */ -unsigned ZLIB_INTERNAL gz_intmax() +unsigned ZLIB_INTERNAL gz_intmax(void) { unsigned p, q; diff --git a/deps/libz/gzread.c b/deps/libz/gzread.c index 966125baee..92dc9b3993 100644 --- a/deps/libz/gzread.c +++ b/deps/libz/gzread.c @@ -5,16 +5,6 @@ #include "gzguts.h" -/* Local functions */ -static int gz_load (gz_statep, unsigned char *, unsigned, unsigned *); -static int gz_avail (gz_statep); -static int gz_look (gz_statep); -static int gz_decomp (gz_statep); -static int gz_fetch (gz_statep); -static int gz_skip (gz_statep, z_off64_t); - -int gzgetc_(gzFile file); - /* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from state->fd, and update state->eof, state->err, and state->msg as appropriate. This function needs to loop on read(), since read() is not guaranteed to @@ -30,7 +20,8 @@ static int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned * break; *have += ret; } while (*have < len); - if (ret < 0) { + if (ret < 0) + { gz_error(state, Z_ERRNO, zstrerror()); return -1; } @@ -53,8 +44,10 @@ static int gz_avail(gz_statep state) if (state->err != Z_OK && state->err != Z_BUF_ERROR) return -1; - if (state->eof == 0) { - if (strm->avail_in) { /* copy what's there to the start */ + if (state->eof == 0) + { + if (strm->avail_in) /* copy what's there to the start */ + { unsigned char *p = state->in; unsigned const char *q = strm->next_in; unsigned n = strm->avail_in; @@ -85,11 +78,13 @@ static int gz_look(gz_statep state) z_streamp strm = &(state->strm); /* allocate read buffers and inflate memory */ - if (state->size == 0) { + if (state->size == 0) + { /* allocate buffers */ state->in = (unsigned char *)malloc(state->want); state->out = (unsigned char *)malloc(state->want << 1); - if (state->in == NULL || state->out == NULL) { + if (state->in == NULL || state->out == NULL) + { if (state->out != NULL) free(state->out); if (state->in != NULL) @@ -105,7 +100,8 @@ static int gz_look(gz_statep state) state->strm.opaque = Z_NULL; state->strm.avail_in = 0; state->strm.next_in = Z_NULL; - if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) { /* gunzip */ + if (inflateInit2(&(state->strm), 15 + 16) != Z_OK) /* gunzip */ + { free(state->out); free(state->in); state->size = 0; @@ -115,7 +111,8 @@ static int gz_look(gz_statep state) } /* get at least the magic bytes in the input buffer */ - if (strm->avail_in < 2) { + if (strm->avail_in < 2) + { if (gz_avail(state) == -1) return -1; if (strm->avail_in == 0) @@ -129,8 +126,10 @@ static int gz_look(gz_statep state) file -- for here we assume that if a gzip file is being written, then the header will be written in a single operation, so that reading a single byte is sufficient indication that it is not a gzip file) */ - if (strm->avail_in > 1 && - strm->next_in[0] == 31 && strm->next_in[1] == 139) { + if ( strm->avail_in > 1 && + strm->next_in[0] == 31 && + strm->next_in[1] == 139) + { inflateReset(strm); state->how = MODE_GZIP; state->direct = 0; @@ -139,10 +138,11 @@ static int gz_look(gz_statep state) /* no gzip header -- if we were decoding gzip before, then this is trailing garbage. Ignore the trailing garbage and finish. */ - if (state->direct == 0) { + if (state->direct == 0) + { strm->avail_in = 0; - state->eof = 1; - state->x.have = 0; + state->eof = 1; + state->x.have = 0; return 0; } @@ -150,12 +150,13 @@ static int gz_look(gz_statep state) the output buffer is larger than the input buffer, which also assures space for gzungetc() */ state->x.next = state->out; - if (strm->avail_in) { + if (strm->avail_in) + { memcpy(state->x.next, strm->next_in, strm->avail_in); state->x.have = strm->avail_in; strm->avail_in = 0; } - state->how = MODE_COPY; + state->how = MODE_COPY; state->direct = 1; return 0; } @@ -168,32 +169,36 @@ static int gz_look(gz_statep state) static int gz_decomp(gz_statep state) { int ret = Z_OK; - unsigned had; z_streamp strm = &(state->strm); - /* fill output buffer up to end of deflate stream */ - had = strm->avail_out; - do { + unsigned had = strm->avail_out; + + do + { /* get more input for inflate() */ if (strm->avail_in == 0 && gz_avail(state) == -1) return -1; - if (strm->avail_in == 0) { + if (strm->avail_in == 0) + { gz_error(state, Z_BUF_ERROR, "unexpected end of file"); break; } /* decompress and handle errors */ ret = inflate(strm, Z_NO_FLUSH); - if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) { + if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) + { gz_error(state, Z_STREAM_ERROR, "internal error: inflate stream corrupt"); return -1; } - if (ret == Z_MEM_ERROR) { + if (ret == Z_MEM_ERROR) + { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; } - if (ret == Z_DATA_ERROR) { /* deflate stream invalid */ + if (ret == Z_DATA_ERROR) /* deflate stream invalid */ + { gz_error(state, Z_DATA_ERROR, strm->msg == NULL ? "compressed data error" : strm->msg); return -1; @@ -201,7 +206,7 @@ static int gz_decomp(gz_statep state) } while (strm->avail_out && ret != Z_STREAM_END); /* update available output */ - state->x.have = had - strm->avail_out; + state->x.have = had - strm->avail_out; state->x.next = strm->next_out - state->x.have; /* if the gzip stream completed successfully, look for another */ @@ -222,8 +227,10 @@ static int gz_fetch(gz_statep state) { z_streamp strm = &(state->strm); - do { - switch(state->how) { + do + { + switch(state->how) + { case LOOK: /* -> LOOK, MODE_COPY (only if never GZIP), or MODE_GZIP */ if (gz_look(state) == -1) return -1; @@ -254,7 +261,8 @@ static int gz_skip(gz_statep state, z_off64_t len) /* skip over len bytes or reach end-of-file, whichever comes first */ while (len) /* skip over whatever is in output buffer */ - if (state->x.have) { + if (state->x.have) + { n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > len ? (unsigned)len : state->x.have; state->x.have -= n; @@ -268,7 +276,8 @@ static int gz_skip(gz_statep state, z_off64_t len) break; /* need more data to skip -- load up output buffer */ - else { + else + { /* get more output, looking for header if required */ if (gz_fetch(state) == -1) return -1; @@ -286,16 +295,19 @@ int gzread(gzFile file, voidp buf, unsigned len) if (file == NULL) return -1; state = (gz_statep)file; - strm = &(state->strm); + strm = &(state->strm); /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) + if ( + state->mode != GZ_READ || + ( state->err != Z_OK && + state->err != Z_BUF_ERROR)) return -1; /* since an int is returned, make sure len fits in one, otherwise return with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { + if ((int)len < 0) + { gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); return -1; } @@ -305,7 +317,8 @@ int gzread(gzFile file, voidp buf, unsigned len) return 0; /* process a skip request */ - if (state->seek) { + if (state->seek) + { state->seek = 0; if (gz_skip(state, state->skip) == -1) return -1; @@ -313,10 +326,12 @@ int gzread(gzFile file, voidp buf, unsigned len) /* get len bytes to buf, or less than len if at the end */ got = 0; - n = 0; - do { + n = 0; + do + { /* first just try copying data from the output buffer */ - if (state->x.have) { + if (state->x.have) + { n = state->x.have > len ? len : state->x.have; memcpy(buf, state->x.next, n); state->x.next += n; @@ -324,14 +339,16 @@ int gzread(gzFile file, voidp buf, unsigned len) } /* output buffer empty -- return if we're at the end of the input */ - else if (state->eof && strm->avail_in == 0) { + else if (state->eof && strm->avail_in == 0) + { state->past = 1; /* tried to read past end */ break; } /* need output data -- for small len or new stream load up our output buffer */ - else if (state->how == LOOK || len < (state->size << 1)) { + else if (state->how == LOOK || len < (state->size << 1)) + { /* get more output, looking for header if required */ if (gz_fetch(state) == -1) return -1; @@ -341,26 +358,28 @@ int gzread(gzFile file, voidp buf, unsigned len) } /* large len -- read directly into user buffer */ - else if (state->how == MODE_COPY) { /* read directly */ + else if (state->how == MODE_COPY) /* read directly */ + { if (gz_load(state, (unsigned char *)buf, len, &n) == -1) return -1; } /* large len -- decompress directly into user buffer */ - else { /* state->how == GZIP */ + else /* state->how == GZIP */ + { strm->avail_out = len; - strm->next_out = (unsigned char *)buf; + strm->next_out = (unsigned char *)buf; if (gz_decomp(state) == -1) return -1; - n = state->x.have; - state->x.have = 0; + n = state->x.have; + state->x.have = 0; } /* update progress */ - len -= n; - buf = (char *)buf + n; - got += n; - state->x.pos += n; + len -= n; + buf = (char *)buf + n; + got += n; + state->x.pos += n; } while (len); /* return number of bytes read into user buffer (will fit in int) */ @@ -384,12 +403,15 @@ int gzgetc(gzFile file) state = (gz_statep)file; /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) + if ( + state->mode != GZ_READ || + (state->err != Z_OK && + state->err != Z_BUF_ERROR)) return -1; /* try output buffer (no need to check for skip request) */ - if (state->x.have) { + if (state->x.have) + { state->x.have--; state->x.pos++; return *(state->x.next)++; @@ -415,12 +437,15 @@ int gzungetc(int c, gzFile file) state = (gz_statep)file; /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) + if ( + state->mode != GZ_READ || + (state->err != Z_OK && + state->err != Z_BUF_ERROR)) return -1; /* process a skip request */ - if (state->seek) { + if (state->seek) + { state->seek = 0; if (gz_skip(state, state->skip) == -1) return -1; @@ -431,34 +456,37 @@ int gzungetc(int c, gzFile file) return -1; /* if output buffer empty, put byte at end (allows more pushing) */ - if (state->x.have == 0) { - state->x.have = 1; - state->x.next = state->out + (state->size << 1) - 1; + if (state->x.have == 0) + { + state->x.have = 1; + state->x.next = state->out + (state->size << 1) - 1; state->x.next[0] = c; state->x.pos--; - state->past = 0; + state->past = 0; return c; } /* if no room, give up (must have already done a gzungetc()) */ - if (state->x.have == (state->size << 1)) { + if (state->x.have == (state->size << 1)) + { gz_error(state, Z_DATA_ERROR, "out of room to push characters"); return -1; } /* slide output data if needed and insert byte before existing data */ - if (state->x.next == state->out) { - unsigned char *src = state->out + state->x.have; + if (state->x.next == state->out) + { + unsigned char *src = state->out + state->x.have; unsigned char *dest = state->out + (state->size << 1); while (src > state->out) *--dest = *--src; - state->x.next = dest; + state->x.next = dest; } state->x.have++; state->x.next--; state->x.next[0] = c; state->x.pos--; - state->past = 0; + state->past = 0; return c; } @@ -475,12 +503,15 @@ char * gzgets(gzFile file, char *buf, int len) state = (gz_statep)file; /* check that we're reading and that there's no (serious) error */ - if (state->mode != GZ_READ || - (state->err != Z_OK && state->err != Z_BUF_ERROR)) + if ( + state->mode != GZ_READ || + (state->err != Z_OK && + state->err != Z_BUF_ERROR)) return NULL; /* process a skip request */ - if (state->seek) { + if (state->seek) + { state->seek = 0; if (gz_skip(state, state->skip) == -1) return NULL; @@ -495,13 +526,15 @@ char * gzgets(gzFile file, char *buf, int len) /* assure that something is in the output buffer */ if (state->x.have == 0 && gz_fetch(state) == -1) return NULL; /* error */ - if (state->x.have == 0) { /* end of file */ + + if (state->x.have == 0) /* end of file */ + { state->past = 1; /* read past end */ break; /* return what we have */ } /* look for end-of-line in current output buffer */ - n = state->x.have > left ? left : state->x.have; + n = state->x.have > left ? left : state->x.have; eol = (unsigned char *)memchr(state->x.next, '\n', n); if (eol != NULL) n = (unsigned)(eol - state->x.next) + 1; @@ -510,9 +543,9 @@ char * gzgets(gzFile file, char *buf, int len) memcpy(buf, state->x.next, n); state->x.have -= n; state->x.next += n; - state->x.pos += n; - left -= n; - buf += n; + state->x.pos += n; + left -= n; + buf += n; } while (left && eol == NULL); /* return terminated string, or if nothing, end of file */ @@ -533,7 +566,9 @@ int gzdirect(gzFile file) /* if the state is not known, but we can find out, then do so (this is mainly for right after a gzopen() or gzdopen()) */ - if (state->mode == GZ_READ && state->how == LOOK && state->x.have == 0) + if ( state->mode == GZ_READ && + state->how == LOOK && + state->x.have == 0) (void)gz_look(state); /* return 1 if transparent, 0 if processing a gzip stream */ @@ -555,7 +590,8 @@ int gzclose_r(gzFile file) return Z_STREAM_ERROR; /* free memory and close file */ - if (state->size) { + if (state->size) + { inflateEnd(&(state->strm)); free(state->out); free(state->in); diff --git a/deps/libz/gzwrite.c b/deps/libz/gzwrite.c index a73adb4644..3eaf1fca84 100644 --- a/deps/libz/gzwrite.c +++ b/deps/libz/gzwrite.c @@ -3,15 +3,10 @@ * For conditions of distribution and use, see copyright notice in zlib.h */ +#include + #include "gzguts.h" -/* Local functions */ -static int gz_init (gz_statep); -static int gz_comp (gz_statep, int); -static int gz_zero (gz_statep, z_off64_t); - -int gzvprintf(gzFile file, const char *format, va_list va); - /* Initialize state for writing a gzip file. Mark initialization by setting state->size to non-zero. Return -1 on failure or 0 on success. */ static int gz_init(gz_statep state) @@ -21,43 +16,48 @@ static int gz_init(gz_statep state) /* allocate input buffer */ state->in = (unsigned char *)malloc(state->want); - if (state->in == NULL) { + if (state->in == NULL) + { gz_error(state, Z_MEM_ERROR, "out of memory"); return -1; } /* only need output buffer and deflate state if compressing */ - if (!state->direct) { - /* allocate output buffer */ - state->out = (unsigned char *)malloc(state->want); - if (state->out == NULL) { - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } + if (!state->direct) + { + /* allocate output buffer */ + state->out = (unsigned char *)malloc(state->want); + if (state->out == NULL) + { + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } - /* allocate deflate memory, set up for gzip compression */ - strm->zalloc = Z_NULL; - strm->zfree = Z_NULL; - strm->opaque = Z_NULL; - ret = deflateInit2(strm, state->level, Z_DEFLATED, - MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); - if (ret != Z_OK) { - free(state->out); - free(state->in); - gz_error(state, Z_MEM_ERROR, "out of memory"); - return -1; - } + /* allocate deflate memory, set up for gzip compression */ + strm->zalloc = Z_NULL; + strm->zfree = Z_NULL; + strm->opaque = Z_NULL; + ret = deflateInit2(strm, state->level, Z_DEFLATED, + MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy); + if (ret != Z_OK) + { + free(state->out); + free(state->in); + gz_error(state, Z_MEM_ERROR, "out of memory"); + return -1; + } } /* mark state as initialized */ - state->size = state->want; + state->size = state->want; /* initialize write buffer if compressing */ - if (!state->direct) { - strm->avail_out = state->size; - strm->next_out = state->out; - state->x.next = strm->next_out; + if (!state->direct) + { + strm->avail_out = state->size; + strm->next_out = state->out; + state->x.next = strm->next_out; } return 0; } @@ -79,9 +79,11 @@ static int gz_comp(gz_statep state, int flush) return -1; /* write directly if requested */ - if (state->direct) { + if (state->direct) + { got = write(state->fd, strm->next_in, strm->avail_in); - if (got < 0 || (unsigned)got != strm->avail_in) { + if (got < 0 || (unsigned)got != strm->avail_in) + { gz_error(state, Z_ERRNO, zstrerror()); return -1; } @@ -95,24 +97,28 @@ static int gz_comp(gz_statep state, int flush) /* write out current buffer contents if full, or if flushing, but if doing Z_FINISH then don't write until we get to Z_STREAM_END */ if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && - (flush != Z_FINISH || ret == Z_STREAM_END))) { - have = (unsigned)(strm->next_out - state->x.next); - if (have && ((got = write(state->fd, state->x.next, have)) < 0 || - (unsigned)got != have)) { - gz_error(state, Z_ERRNO, zstrerror()); - return -1; - } - if (strm->avail_out == 0) { - strm->avail_out = state->size; - strm->next_out = state->out; - } - state->x.next = strm->next_out; + (flush != Z_FINISH || ret == Z_STREAM_END))) + { + have = (unsigned)(strm->next_out - state->x.next); + if (have && ((got = write(state->fd, state->x.next, have)) < 0 || + (unsigned)got != have)) + { + gz_error(state, Z_ERRNO, zstrerror()); + return -1; + } + if (strm->avail_out == 0) + { + strm->avail_out = state->size; + strm->next_out = state->out; + } + state->x.next = strm->next_out; } /* compress */ have = strm->avail_out; - ret = deflate(strm, flush); - if (ret == Z_STREAM_ERROR) { + ret = deflate(strm, flush); + if (ret == Z_STREAM_ERROR) + { gz_error(state, Z_STREAM_ERROR, "internal error: deflate stream corrupt"); return -1; @@ -132,7 +138,6 @@ static int gz_comp(gz_statep state, int flush) static int gz_zero(gz_statep state, z_off64_t len) { int first; - unsigned n; z_streamp strm = &(state->strm); /* consume whatever's left in the input buffer */ @@ -141,16 +146,18 @@ static int gz_zero(gz_statep state, z_off64_t len) /* compress len zeros (len guaranteed > 0) */ first = 1; - while (len) { - n = GT_OFF(state->size) || (z_off64_t)state->size > len ? + while (len) + { + unsigned n = GT_OFF(state->size) || (z_off64_t)state->size > len ? (unsigned)len : state->size; - if (first) { + if (first) + { memset(state->in, 0, n); first = 0; } strm->avail_in = n; - strm->next_in = state->in; - state->x.pos += n; + strm->next_in = state->in; + state->x.pos += n; if (gz_comp(state, Z_NO_FLUSH) == -1) return -1; len -= n; @@ -160,23 +167,25 @@ static int gz_zero(gz_statep state, z_off64_t len) int gzwrite(gzFile file, voidpc buf, unsigned len) { - unsigned put = len; gz_statep state; z_streamp strm; + unsigned put = len; /* get internal structure */ if (file == NULL) return 0; state = (gz_statep)file; - strm = &(state->strm); + strm = &(state->strm); /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) + if ( state->mode != GZ_WRITE || + state->err != Z_OK) return 0; /* since an int is returned, make sure len fits in one, otherwise return with an error (this avoids the flaw in the interface) */ - if ((int)len < 0) { + if ((int)len < 0) + { gz_error(state, Z_DATA_ERROR, "requested length does not fit in int"); return 0; } @@ -190,44 +199,47 @@ int gzwrite(gzFile file, voidpc buf, unsigned len) return 0; /* check for seek request */ - if (state->seek) { + if (state->seek) + { state->seek = 0; if (gz_zero(state, state->skip) == -1) return 0; } /* for small len, copy to input buffer, otherwise compress directly */ - if (len < state->size) { - /* copy to input buffer, compress when full */ - do { - unsigned have, copy; + if (len < state->size) + { + /* copy to input buffer, compress when full */ + do { + unsigned have, copy; - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - copy = state->size - have; - if (copy > len) - copy = len; - memcpy(state->in + have, buf, copy); - strm->avail_in += copy; - state->x.pos += copy; - buf = (const char *)buf + copy; - len -= copy; - if (len && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - } while (len); + if (strm->avail_in == 0) + strm->next_in = state->in; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + copy = state->size - have; + if (copy > len) + copy = len; + memcpy(state->in + have, buf, copy); + strm->avail_in += copy; + state->x.pos += copy; + buf = (const char *)buf + copy; + len -= copy; + if (len && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; + } while (len); } - else { - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; + else + { + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; - /* directly compress user buffer to file */ - strm->avail_in = len; - strm->next_in = (Bytef *)buf; - state->x.pos += len; - if (gz_comp(state, Z_NO_FLUSH) == -1) - return 0; + /* directly compress user buffer to file */ + strm->avail_in = len; + strm->next_in = (Bytef *)buf; + state->x.pos += len; + if (gz_comp(state, Z_NO_FLUSH) == -1) + return 0; } /* input was all buffered or compressed (put will fit in int) */ @@ -236,314 +248,244 @@ int gzwrite(gzFile file, voidpc buf, unsigned len) int gzputc(gzFile file, int c) { - unsigned have; - unsigned char buf[1]; - gz_statep state; - z_streamp strm; + unsigned have; + unsigned char buf[1]; + gz_statep state; + z_streamp strm; - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return -1; + /* check that we're writing and that there's no error */ + if ( state->mode != GZ_WRITE || + state->err != Z_OK) + return -1; - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } + /* check for seek request */ + if (state->seek) + { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } - /* try writing to input buffer for speed (state->size == 0 if buffer not - initialized) */ - if (state->size) { - if (strm->avail_in == 0) - strm->next_in = state->in; - have = (unsigned)((strm->next_in + strm->avail_in) - state->in); - if (have < state->size) { - state->in[have] = c; - strm->avail_in++; - state->x.pos++; - return c & 0xff; - } - } + /* try writing to input buffer for speed (state->size == 0 if buffer not + initialized) */ + if (state->size) + { + if (strm->avail_in == 0) + strm->next_in = state->in; + have = (unsigned)((strm->next_in + strm->avail_in) - state->in); + if (have < state->size) + { + state->in[have] = c; + strm->avail_in++; + state->x.pos++; + return c & 0xff; + } + } - /* no room in buffer or not initialized, use gz_write() */ - buf[0] = c; - if (gzwrite(file, buf, 1) != 1) - return -1; - return c & 0xff; + /* no room in buffer or not initialized, use gz_write() */ + buf[0] = c; + if (gzwrite(file, buf, 1) != 1) + return -1; + return c & 0xff; } int gzputs(gzFile file, const char *str) { - int ret; - unsigned len; - - /* write string */ - len = (unsigned)strlen(str); - ret = gzwrite(file, str, len); - return ret == 0 && len != 0 ? -1 : ret; + /* write string */ + unsigned len = (unsigned)strlen(str); + int ret = gzwrite(file, str, len); + return ret == 0 && len != 0 ? -1 : ret; } -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -#include - int gzvprintf(gzFile file, const char *format, va_list va) { - int size, len; - gz_statep state; - z_streamp strm; + int size, len; + gz_statep state; + z_streamp strm; - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; + strm = &(state->strm); - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return 0; - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; + /* make sure we have some buffer space */ + if (state->size == 0 && gz_init(state) == -1) + return 0; - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } + /* check for seek request */ + if (state->seek) { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return 0; + } - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; + /* consume whatever's left in the input buffer */ + if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) + return 0; - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; + /* do the printf() into the input buffer, put length in len */ + size = (int)(state->size); + state->in[size - 1] = 0; #ifdef NO_vsnprintf # ifdef HAS_vsprintf_void - (void)vsprintf((char *)(state->in), format, va); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; + (void)vsprintf((char *)(state->in), format, va); + for (len = 0; len < size; len++) + if (state->in[len] == 0) break; # else - len = vsprintf((char *)(state->in), format, va); + len = vsprintf((char *)(state->in), format, va); # endif #else # ifdef HAS_vsnprintf_void - (void)vsnprintf((char *)(state->in), size, format, va); - len = strlen((char *)(state->in)); + (void)vsnprintf((char *)(state->in), size, format, va); + len = strlen((char *)(state->in)); # else - len = vsnprintf((char *)(state->in), size, format, va); + len = vsnprintf((char *)(state->in), size, format, va); # endif #endif - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; + /* check that printf() results fit in buffer */ + if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) + return 0; - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; + /* update buffer and position, defer compression until needed */ + strm->avail_in = (unsigned)len; + strm->next_in = state->in; + state->x.pos += len; + return len; } int gzprintf(gzFile file, const char *format, ...) { - va_list va; - int ret; + va_list va; + int ret; - va_start(va, format); - ret = gzvprintf(file, format, va); - va_end(va); - return ret; + va_start(va, format); + ret = gzvprintf(file, format, va); + va_end(va); + return ret; } -#else /* !STDC && !Z_HAVE_STDARG_H */ - -int gzprintf (gzFile file, const char *format, int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, - int a11, int a12, int a13, int a14, int a15, int a16, int a17, int a18, int a19, int a20) -{ - int size, len; - gz_statep state; - z_streamp strm; - - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; - strm = &(state->strm); - - /* check that can really pass pointer in ints */ - if (sizeof(int) != sizeof(void *)) - return 0; - - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return 0; - - /* make sure we have some buffer space */ - if (state->size == 0 && gz_init(state) == -1) - return 0; - - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return 0; - } - - /* consume whatever's left in the input buffer */ - if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1) - return 0; - - /* do the printf() into the input buffer, put length in len */ - size = (int)(state->size); - state->in[size - 1] = 0; -#ifdef NO_snprintf -# ifdef HAS_sprintf_void - sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - for (len = 0; len < size; len++) - if (state->in[len] == 0) break; -# else - len = sprintf((char *)(state->in), format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); -# endif -#else -# ifdef HAS_snprintf_void - snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, a7, a8, - a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20); - len = strlen((char *)(state->in)); -# else - len = snprintf((char *)(state->in), size, format, a1, a2, a3, a4, a5, a6, - a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, - a19, a20); -# endif -#endif - - /* check that printf() results fit in buffer */ - if (len <= 0 || len >= (int)size || state->in[size - 1] != 0) - return 0; - - /* update buffer and position, defer compression until needed */ - strm->avail_in = (unsigned)len; - strm->next_in = state->in; - state->x.pos += len; - return len; -} - -#endif - int gzflush(gzFile file, int flush) { - gz_statep state; + gz_statep state; - /* get internal structure */ - if (file == NULL) - return -1; - state = (gz_statep)file; + /* get internal structure */ + if (file == NULL) + return -1; + state = (gz_statep)file; - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; + /* check that we're writing and that there's no error */ + if (state->mode != GZ_WRITE || state->err != Z_OK) + return Z_STREAM_ERROR; - /* check flush parameter */ - if (flush < 0 || flush > Z_FINISH) - return Z_STREAM_ERROR; + /* check flush parameter */ + if (flush < 0 || flush > Z_FINISH) + return Z_STREAM_ERROR; - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } + /* check for seek request */ + if (state->seek) + { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } - /* compress remaining data with requested flush */ - gz_comp(state, flush); - return state->err; + /* compress remaining data with requested flush */ + gz_comp(state, flush); + return state->err; } int gzsetparams(gzFile file, int level, int strategy) { - gz_statep state; - z_streamp strm; + gz_statep state; + z_streamp strm; - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; - strm = &(state->strm); + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; + strm = &(state->strm); - /* check that we're writing and that there's no error */ - if (state->mode != GZ_WRITE || state->err != Z_OK) - return Z_STREAM_ERROR; + /* check that we're writing and that there's no error */ + if ( state->mode != GZ_WRITE || + state->err != Z_OK) + return Z_STREAM_ERROR; - /* if no change is requested, then do nothing */ - if (level == state->level && strategy == state->strategy) - return Z_OK; + /* if no change is requested, then do nothing */ + if ( level == state->level && + strategy == state->strategy) + return Z_OK; - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - return -1; - } + /* check for seek request */ + if (state->seek) + { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + return -1; + } - /* change compression parameters for subsequent input */ - if (state->size) { - /* flush previous input with previous parameters before changing */ - if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) - return state->err; - deflateParams(strm, level, strategy); - } - state->level = level; - state->strategy = strategy; - return Z_OK; + /* change compression parameters for subsequent input */ + if (state->size) + { + /* flush previous input with previous parameters before changing */ + if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1) + return state->err; + deflateParams(strm, level, strategy); + } + state->level = level; + state->strategy = strategy; + return Z_OK; } int gzclose_w(gzFile file) { - int ret = Z_OK; - gz_statep state; + int ret = Z_OK; + gz_statep state; - /* get internal structure */ - if (file == NULL) - return Z_STREAM_ERROR; - state = (gz_statep)file; + /* get internal structure */ + if (file == NULL) + return Z_STREAM_ERROR; + state = (gz_statep)file; - /* check that we're writing */ - if (state->mode != GZ_WRITE) - return Z_STREAM_ERROR; + /* check that we're writing */ + if (state->mode != GZ_WRITE) + return Z_STREAM_ERROR; - /* check for seek request */ - if (state->seek) { - state->seek = 0; - if (gz_zero(state, state->skip) == -1) - ret = state->err; - } + /* check for seek request */ + if (state->seek) + { + state->seek = 0; + if (gz_zero(state, state->skip) == -1) + ret = state->err; + } - /* flush, free memory, and close file */ - if (gz_comp(state, Z_FINISH) == -1) - ret = state->err; - if (state->size) { - if (!state->direct) { - (void)deflateEnd(&(state->strm)); - free(state->out); - } - free(state->in); - } - gz_error(state, Z_OK, NULL); - free(state->path); - if (close(state->fd) == -1) - ret = Z_ERRNO; - free(state); - return ret; + /* flush, free memory, and close file */ + if (gz_comp(state, Z_FINISH) == -1) + ret = state->err; + if (state->size) + { + if (!state->direct) + { + (void)deflateEnd(&(state->strm)); + free(state->out); + } + free(state->in); + } + gz_error(state, Z_OK, NULL); + free(state->path); + if (close(state->fd) == -1) + ret = Z_ERRNO; + free(state); + return ret; } diff --git a/deps/libz/inffast.c b/deps/libz/inffast.c index a88859f37d..74c893eac8 100644 --- a/deps/libz/inffast.c +++ b/deps/libz/inffast.c @@ -10,25 +10,6 @@ #ifndef ASMINF -/* Allow machine dependent optimization for post-increment or pre-increment. - Based on testing to date, - Pre-increment preferred for: - - PowerPC G3 (Adler) - - MIPS R5000 (Randers-Pehrson) - Post-increment preferred for: - - none - No measurable difference: - - Pentium III (Anderson) - - M68060 (Nikl) - */ -#ifdef POSTINC -# define OFF 0 -# define PUP(a) *(a)++ -#else -# define OFF 1 -# define PUP(a) *++(a) -#endif - /* Decode literal, length, and distance codes and write out the resulting literal and match bytes until either not enough input or output is @@ -66,26 +47,7 @@ output space. */ void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) { - struct inflate_state FAR *state; - unsigned char FAR *in; /* local strm->next_in */ - unsigned char FAR *last; /* have enough input while in < last */ - unsigned char FAR *out; /* local strm->next_out */ - unsigned char FAR *beg; /* inflate()'s initial strm->next_out */ - unsigned char FAR *end; /* while out < end, enough space available */ -#ifdef INFLATE_STRICT - unsigned dmax; /* maximum distance from zlib header */ -#endif - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned wnext; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */ - unsigned long hold; /* local strm->hold */ - unsigned bits; /* local strm->bits */ - code const FAR *lcode; /* local strm->lencode */ - code const FAR *dcode; /* local strm->distcode */ - unsigned lmask; /* mask for first level of length codes */ - unsigned dmask; /* mask for first level of distance codes */ - code here; /* retrieved table entry */ + code const *here; /* retrieved table entry */ unsigned op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ unsigned len; /* match length, unused bytes */ @@ -93,211 +55,209 @@ void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) unsigned char FAR *from; /* where to copy match from */ /* copy state to local variables */ - state = (struct inflate_state FAR *)strm->state; - in = strm->next_in - OFF; - last = in + (strm->avail_in - 5); - out = strm->next_out - OFF; - beg = out - (start - strm->avail_out); - end = out + (strm->avail_out - 257); -#ifdef INFLATE_STRICT - dmax = state->dmax; -#endif - wsize = state->wsize; - whave = state->whave; - wnext = state->wnext; - window = state->window; - hold = state->hold; - bits = state->bits; - lcode = state->lencode; - dcode = state->distcode; - lmask = (1U << state->lenbits) - 1; - dmask = (1U << state->distbits) - 1; + struct inflate_state FAR *state = (struct inflate_state FAR *)strm->state; + unsigned char FAR *in = strm->next_in; + unsigned char FAR *last = in + (strm->avail_in - 5); + unsigned char FAR *out = strm->next_out; + unsigned char FAR *beg = out - (start - strm->avail_out); + unsigned char FAR *end = out + (strm->avail_out - 257); + unsigned wsize = state->wsize; + unsigned whave = state->whave; + unsigned wnext = state->wnext; + unsigned char FAR *window = state->window; + unsigned long hold = state->hold; + unsigned bits = state->bits; + code const FAR *lcode = state->lencode; + code const FAR *dcode = state->distcode; + unsigned lmask = (1U << state->lenbits) - 1; + unsigned dmask = (1U << state->distbits) - 1; /* decode literals and length/distances until end-of-block or not enough input data or output space */ - do { - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; + do + { + if (bits < 15) + { + hold += (unsigned long)(*in++) << bits; bits += 8; - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } - here = lcode[hold & lmask]; + here = lcode + (hold & lmask); dolen: - op = (unsigned)(here.bits); + op = (unsigned)(here->bits); hold >>= op; bits -= op; - op = (unsigned)(here.op); - if (op == 0) { /* literal */ - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); - PUP(out) = (unsigned char)(here.val); - } - else if (op & 16) { /* length base */ - len = (unsigned)(here.val); + op = (unsigned)(here->op); + if (op == 0) /* literal */ + *out++ = (unsigned char)(here->val); + else if (op & 16) /* length base */ + { + len = (unsigned)(here->val); op &= 15; /* number of extra bits */ - if (op) { - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + if (op) + { + if (bits < op) + { + hold += (unsigned long)(*in++) << bits; bits += 8; } - len += (unsigned)hold & ((1U << op) - 1); + len += (unsigned)hold & ((1U << op) - 1); hold >>= op; - bits -= op; + bits -= op; } - Tracevv((stderr, "inflate: length %u\n", len)); - if (bits < 15) { - hold += (unsigned long)(PUP(in)) << bits; + + if (bits < 15) + { + hold += (unsigned long)(*in++) << bits; bits += 8; - hold += (unsigned long)(PUP(in)) << bits; + hold += (unsigned long)(*in++) << bits; bits += 8; } - here = dcode[hold & dmask]; + + here = dcode + (hold & dmask); + dodist: - op = (unsigned)(here.bits); + op = (unsigned)(here->bits); hold >>= op; bits -= op; - op = (unsigned)(here.op); - if (op & 16) { /* distance base */ - dist = (unsigned)(here.val); + op = (unsigned)(here->op); + if (op & 16) /* distance base */ + { + dist = (unsigned)(here->val); op &= 15; /* number of extra bits */ - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + if (bits < op) + { + hold += (unsigned long)(*in++) << bits; bits += 8; - if (bits < op) { - hold += (unsigned long)(PUP(in)) << bits; + if (bits < op) + { + hold += (unsigned long)(*in++) << bits; bits += 8; } } - dist += (unsigned)hold & ((1U << op) - 1); -#ifdef INFLATE_STRICT - if (dist > dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif + dist += (unsigned)hold & ((1U << op) - 1); hold >>= op; - bits -= op; - Tracevv((stderr, "inflate: distance %u\n", dist)); - op = (unsigned)(out - beg); /* max distance in output */ - if (dist > op) { /* see if copy from window */ - op = dist - op; /* distance back in window */ - if (op > whave) { - if (state->sane) { + bits -= op; + op = (unsigned)(out - beg); /* max distance in output */ + if (dist > op) /* see if copy from window */ + { + op = dist - op; /* distance back in window */ + if (op > whave) + { + if (state->sane) + { strm->msg = (char *)"invalid distance too far back"; state->mode = BAD; break; } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - if (len <= op - whave) { - do { - PUP(out) = 0; - } while (--len); - continue; - } - len -= op - whave; - do { - PUP(out) = 0; - } while (--op > whave); - if (op == 0) { - from = out - dist; - do { - PUP(out) = PUP(from); - } while (--len); - continue; - } -#endif } - from = window - OFF; - if (wnext == 0) { /* very common case */ + from = window; + if (wnext == 0) /* very common case */ + { from += wsize - op; - if (op < len) { /* some from window */ + if (op < len) /* some from window */ + { len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } - else if (wnext < op) { /* wrap around window */ + else if (wnext < op) /* wrap around window */ + { from += wsize + wnext - op; op -= wnext; - if (op < len) { /* some from end of window */ + if (op < len) /* some from end of window */ + { len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); - from = window - OFF; - if (wnext < len) { /* some from start of window */ + from = window; + if (wnext < len) /* some from start of window */ + { op = wnext; len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } } - else { /* contiguous in window */ + else /* contiguous in window */ + { from += wnext - op; - if (op < len) { /* some from window */ + if (op < len) /* some from window */ + { len -= op; do { - PUP(out) = PUP(from); + *out++ = *from++; } while (--op); from = out - dist; /* rest from output */ } } - while (len > 2) { - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); + + while (len > 2) + { + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; len -= 3; } - if (len) { - PUP(out) = PUP(from); + + if (len) + { + *out++ = *from++; if (len > 1) - PUP(out) = PUP(from); + *out++ = *from++; } } - else { + else + { from = out - dist; /* copy direct from output */ do { /* minimum length is three */ - PUP(out) = PUP(from); - PUP(out) = PUP(from); - PUP(out) = PUP(from); + *out++ = *from++; + *out++ = *from++; + *out++ = *from++; len -= 3; - } while (len > 2); - if (len) { - PUP(out) = PUP(from); + }while(len > 2); + + if (len) + { + *out++ = *from++; if (len > 1) - PUP(out) = PUP(from); + *out++ = *from++; } } } - else if ((op & 64) == 0) { /* 2nd level distance code */ - here = dcode[here.val + (hold & ((1U << op) - 1))]; + else if ((op & 64) == 0) /* 2nd level distance code */ + { + here = dcode + here->val + (hold & ((1U << op) - 1)); goto dodist; } - else { - strm->msg = (char *)"invalid distance code"; + else + { + strm->msg = (char *)"invalid distance code"; state->mode = BAD; break; } } - else if ((op & 64) == 0) { /* 2nd level length code */ - here = lcode[here.val + (hold & ((1U << op) - 1))]; + else if ((op & 64) == 0) /* 2nd level length code */ + { + here = lcode + here->val + (hold & ((1U << op) - 1)); goto dolen; } - else if (op & 32) { /* end-of-block */ - Tracevv((stderr, "inflate: end of block\n")); + else if (op & 32) /* end-of-block */ + { state->mode = TYPE; break; } - else { + else + { strm->msg = (char *)"invalid literal/length code"; state->mode = BAD; break; @@ -305,20 +265,19 @@ dodist: } while (in < last && out < end); /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ - len = bits >> 3; - in -= len; - bits -= len << 3; - hold &= (1U << bits) - 1; + len = bits >> 3; + in -= len; + bits -= len << 3; + hold &= (1U << bits) - 1; /* update state and return */ - strm->next_in = in + OFF; - strm->next_out = out + OFF; - strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); - strm->avail_out = (unsigned)(out < end ? + strm->next_in = in; + strm->next_out = out; + strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last)); + strm->avail_out = (unsigned)(out < end ? 257 + (end - out) : 257 - (out - end)); - state->hold = hold; - state->bits = bits; - return; + state->hold = hold; + state->bits = bits; } /* diff --git a/deps/libz/inflate.c b/deps/libz/inflate.c index 183a75784b..3e6d9688fa 100644 --- a/deps/libz/inflate.c +++ b/deps/libz/inflate.c @@ -95,59 +95,51 @@ #define Z_TREES 6 #endif - /* function prototypes */ -int inflateReset2(z_streamp strm, int windowBits); - static void fixedtables (struct inflate_state FAR *state); - static int updatewindow (z_streamp strm, const unsigned char FAR *end, - unsigned copy); -#ifdef BUILDFIXED -void makefixed (void); -#endif -static unsigned syncsearch (unsigned FAR *have, const unsigned char FAR *buf, - unsigned len); - -long inflateMark(z_streamp strm); - -int inflateResetKeep(z_streamp strm); - -int inflateUndermine(z_streamp strm, int subvert); - -int inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength); - int inflateResetKeep(z_streamp strm) { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - strm->total_in = strm->total_out = state->total = 0; - strm->msg = Z_NULL; - if (state->wrap) /* to support ill-conceived Java test suite */ - strm->adler = state->wrap & 1; - state->mode = HEAD; - state->last = 0; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + strm->total_in = strm->total_out = state->total = 0; + strm->msg = Z_NULL; + + /* to support ill-conceived Java test suite */ + if (state->wrap) + strm->adler = state->wrap & 1; + + state->mode = HEAD; + state->last = 0; state->havedict = 0; - state->dmax = 32768U; - state->head = Z_NULL; - state->hold = 0; - state->bits = 0; - state->lencode = state->distcode = state->next = state->codes; - state->sane = 1; - state->back = -1; - Tracev((stderr, "inflate: reset\n")); + state->head = Z_NULL; + state->hold = 0; + state->bits = 0; + state->lencode = state->distcode = state->next = state->codes; + state->sane = 1; + state->back = -1; return Z_OK; } int inflateReset(z_streamp strm) { + int ret; struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; state->wsize = 0; state->whave = 0; state->wnext = 0; - return inflateResetKeep(strm); + + ret = inflateResetKeep(strm); + + return ret; } int inflateReset2(z_streamp strm, int windowBits) @@ -156,17 +148,20 @@ int inflateReset2(z_streamp strm, int windowBits) struct inflate_state FAR *state = NULL; /* get the state */ - if (strm == Z_NULL || strm->state == Z_NULL) + if ( strm == Z_NULL || + strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; + state = (struct inflate_state FAR *)strm->state; /* extract wrap request from windowBits parameter */ - if (windowBits < 0) { - wrap = 0; - windowBits = -windowBits; + if (windowBits < 0) + { + wrap = 0; + windowBits = -windowBits; } - else { - wrap = (windowBits >> 4) + 1; + else + { + wrap = (windowBits >> 4) + 5; #ifdef GUNZIP if (windowBits < 48) windowBits &= 15; @@ -176,50 +171,86 @@ int inflateReset2(z_streamp strm, int windowBits) /* set number of window bits, free window if different */ if (windowBits && (windowBits < 8 || windowBits > 15)) return Z_STREAM_ERROR; - if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) { - ZFREE(strm, state->window); + + if ( state->window != Z_NULL && + state->wbits != (unsigned)windowBits) + { + free(state->window); state->window = Z_NULL; } /* update state and reset the rest of it */ - state->wrap = wrap; + state->wrap = wrap; state->wbits = (unsigned)windowBits; return inflateReset(strm); } -int inflateInit2_(z_streamp strm, int windowBits, const char *version, int stream_size) +int inflateInit2_(z_streamp strm, int windowBits, + const char *version, int stream_size) { int ret; + unsigned i; struct inflate_state FAR *state; - if (version == Z_NULL || version[0] != ZLIB_VERSION[0] || + if ( version == Z_NULL || + version[0] != ZLIB_VERSION[0] || stream_size != (int)(sizeof(z_stream))) return Z_VERSION_ERROR; - if (strm == Z_NULL) return Z_STREAM_ERROR; - strm->msg = Z_NULL; /* in case we return an error */ - if (strm->zalloc == (alloc_func)0) { -#ifdef Z_SOLO + if (strm == Z_NULL) return Z_STREAM_ERROR; -#else - strm->zalloc = zcalloc; - strm->opaque = (voidpf)0; -#endif + strm->msg = Z_NULL; /* in case we return an error */ + strm->zalloc = zcalloc; + strm->opaque = (voidpf)0; + strm->zfree = zcfree; + state = (struct inflate_state FAR *) + malloc(sizeof(*state)); + if (state == Z_NULL) + return Z_MEM_ERROR; + state->mode = HEAD; + state->last = 0; + state->wrap = 0; + state->havedict = 0; + state->flags = 0; + state->check = 0; + state->total = 0; + state->head = Z_NULL; + state->wbits = 0; + state->wsize = 0; + state->whave = 0; + state->wnext = 0; + state->window = Z_NULL; + state->hold = 0; + state->bits = 0; + state->length = 0; + state->offset = 0; + state->extra = 0; + state->lencode = Z_NULL; + state->distcode = Z_NULL; + state->lenbits = 0; + state->distbits = 0; + state->ncode = 0; + state->nlen = 0; + state->ndist = 0; + state->have = 0; + state->next = Z_NULL; + for (i = 0; i < 320; i++) + state->lens[i] = 0; + for (i = 0; i < 288; i++) + state->work[i] = 0; + for (i = 0; i < ENOUGH; i++) + { + state->codes[i].op = 0; + state->codes[i].bits = 0; + state->codes[i].val = 0; } - if (strm->zfree == Z_NULL) -#ifdef Z_SOLO - return Z_STREAM_ERROR; -#else - strm->zfree = zcfree; -#endif - state = (struct inflate_state FAR *) - ZALLOC(strm, 1, sizeof(struct inflate_state)); - if (state == Z_NULL) return Z_MEM_ERROR; - Tracev((stderr, "inflate: allocated\n")); - strm->state = (struct internal_state FAR *)state; - state->window = Z_NULL; - ret = inflateReset2(strm, windowBits); - if (ret != Z_OK) { - ZFREE(strm, state); + state->sane = 0; + state->back = 0; + state->was = 0; + strm->state = (struct internal_state FAR *)state; + ret = inflateReset2(strm, windowBits); + if (ret != Z_OK) + { + free(state); strm->state = Z_NULL; } return ret; @@ -234,17 +265,24 @@ int inflatePrime(z_streamp strm, int bits, int value) { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - if (bits < 0) { + if (strm == Z_NULL || strm->state == Z_NULL) + return Z_STREAM_ERROR; + + state = (struct inflate_state FAR *)strm->state; + + if (bits < 0) + { state->hold = 0; state->bits = 0; return Z_OK; } - if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR; - value &= (1L << bits) - 1; - state->hold += value << state->bits; - state->bits += bits; + if (bits > 16 || state->bits + bits > 32) + return Z_STREAM_ERROR; + + value &= (1L << bits) - 1; + state->hold += (unsigned)value << state->bits; + state->bits += bits; + return Z_OK; } @@ -266,24 +304,29 @@ static void fixedtables(struct inflate_state FAR *state) static code fixed[544]; /* build fixed huffman tables if first call (may not be thread safe) */ - if (virgin) { - unsigned sym, bits; + if (virgin) + { + unsigned bits; static code *next; - /* literal/length table */ - sym = 0; - while (sym < 144) state->lens[sym++] = 8; - while (sym < 256) state->lens[sym++] = 9; - while (sym < 280) state->lens[sym++] = 7; - while (sym < 288) state->lens[sym++] = 8; - next = fixed; - lenfix = next; - bits = 9; + unsigned sym = 0; + while (sym < 144) + state->lens[sym++] = 8; + while (sym < 256) + state->lens[sym++] = 9; + while (sym < 280) + state->lens[sym++] = 7; + while (sym < 288) + state->lens[sym++] = 8; + next = fixed; + lenfix = next; + bits = 9; inflate_table(LENS, state->lens, 288, &(next), &(bits), state->work); /* distance table */ - sym = 0; - while (sym < 32) state->lens[sym++] = 5; + sym = 0; + while (sym < 32) + state->lens[sym++] = 5; distfix = next; bits = 5; inflate_table(DISTS, state->lens, 32, &(next), &(bits), state->work); @@ -294,8 +337,8 @@ static void fixedtables(struct inflate_state FAR *state) #else /* !BUILDFIXED */ # include "inffixed.h" #endif /* BUILDFIXED */ - state->lencode = lenfix; - state->lenbits = 9; + state->lencode = lenfix; + state->lenbits = 9; state->distcode = distfix; state->distbits = 5; } @@ -377,46 +420,53 @@ void makefixed(void) */ static int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) { - struct inflate_state FAR *state; unsigned dist; - - state = (struct inflate_state FAR *)strm->state; + struct inflate_state FAR *state = (struct inflate_state FAR *)strm->state; /* if it hasn't been done already, allocate space for the window */ - if (state->window == Z_NULL) { + if (state->window == Z_NULL) + { state->window = (unsigned char FAR *) - ZALLOC(strm, 1U << state->wbits, + calloc(1U << state->wbits, sizeof(unsigned char)); - if (state->window == Z_NULL) return 1; + if (state->window == Z_NULL) + return 1; } /* if window not in use yet, initialize */ - if (state->wsize == 0) { + if (state->wsize == 0) + { state->wsize = 1U << state->wbits; state->wnext = 0; state->whave = 0; } /* copy state->wsize or less output bytes into the circular window */ - if (copy >= state->wsize) { - zmemcpy(state->window, end - state->wsize, state->wsize); + if (copy >= state->wsize) + { + memcpy(state->window, end - state->wsize, state->wsize); state->wnext = 0; state->whave = state->wsize; } - else { + else + { dist = state->wsize - state->wnext; if (dist > copy) dist = copy; - zmemcpy(state->window + state->wnext, end - copy, dist); + memcpy(state->window + state->wnext, end - copy, dist); copy -= dist; - if (copy) { - zmemcpy(state->window, end - copy, copy); + if (copy) + { + memcpy(state->window, end - copy, copy); state->wnext = copy; state->whave = state->wsize; } - else { + else + { state->wnext += dist; - if (state->wnext == state->wsize) state->wnext = 0; - if (state->whave < state->wsize) state->whave += dist; + if (state->wnext == state->wsize) + state->wnext = 0; + if (state->whave < state->wsize) + state->whave += dist; } } return 0; @@ -516,88 +566,6 @@ static int updatewindow(z_streamp strm, const Bytef *end, unsigned copy) bits -= bits & 7; \ } while (0) -/* - inflate() uses a state machine to process as much input data and generate as - much output data as possible before returning. The state machine is - structured roughly as follows: - - for (;;) switch (state) { - ... - case STATEn: - if (not enough input data or output space to make progress) - return; - ... make progress ... - state = STATEm; - break; - ... - } - - so when inflate() is called again, the same case is attempted again, and - if the appropriate resources are provided, the machine proceeds to the - next state. The NEEDBITS() macro is usually the way the state evaluates - whether it can proceed or should return. NEEDBITS() does the return if - the requested bits are not available. The typical use of the BITS macros -is: - -NEEDBITS(n); -... do something with BITS(n) ... -DROPBITS(n); - -where NEEDBITS(n) either returns from inflate() if there isn't enough -input left to load n bits into the accumulator, or it continues. BITS(n) -gives the low n bits in the accumulator. When done, DROPBITS(n) drops -the low n bits off the accumulator. INITBITS() clears the accumulator -and sets the number of available bits to zero. BYTEBITS() discards just -enough bits to put the accumulator on a byte boundary. After BYTEBITS() -and a NEEDBITS(8), then BITS(8) would return the next byte in the stream. - -NEEDBITS(n) uses PULLBYTE() to get an available byte of input, or to return -if there is no input available. The decoding of variable length codes uses -PULLBYTE() directly in order to pull just enough bytes to decode the next -code, and no more. - -Some states loop until they get enough input, making sure that enough -state information is maintained to continue the loop where it left off -if NEEDBITS() returns in the loop. For example, want, need, and keep -would all have to actually be part of the saved state in case NEEDBITS() -returns: - -case STATEw: -while (want < need) { -NEEDBITS(n); -keep[want++] = BITS(n); -DROPBITS(n); -} -state = STATEx; -case STATEx: - -As shown above, if the next state is also the next case, then the break -is omitted. - -A state may also return if there is not enough output space available to -complete that state. Those states are copying stored data, writing a -literal byte, and copying a matching string. - -When returning, a "goto inf_leave" is used to update the total counters, -update the check value, and determine whether any progress has been made -during that inflate() call in order to return the proper return code. -Progress is defined as a change in either strm->avail_in or strm->avail_out. -When there is a window, goto inf_leave will update the window with the last -output written. If a goto inf_leave occurs in the middle of decompression -and there is no window currently, goto inf_leave will create one and copy -output to the window for the next call of inflate(). - -In this implementation, the flush parameter of inflate() only affects the -return code (per zlib.h). inflate() always writes as much as possible to -strm->next_out, given the space available and the provided input--the effect -documented in zlib.h of Z_SYNC_FLUSH. Furthermore, inflate() always defers -the allocation of and copying into a sliding window until necessary, which -provides the effect documented in zlib.h for Z_FINISH when the entire input -stream available. So the only thing the flush parameter actually does is: -when flush is set to Z_FINISH, inflate() cannot return Z_OK. Instead it -will return Z_BUF_ERROR if it has not reached the end of the stream. -*/ - int inflate(z_streamp strm, int flush) { struct inflate_state FAR *state; @@ -639,6 +607,8 @@ int inflate(z_streamp strm, int flush) NEEDBITS(16); #ifdef GUNZIP if ((state->wrap & 2) && hold == 0x8b1f) { /* gzip header */ + if (state->wbits == 0) + state->wbits = 15; state->check = crc32(0L, Z_NULL, 0); CRC2(state->check, hold); INITBITS(); @@ -665,14 +635,12 @@ int inflate(z_streamp strm, int flush) DROPBITS(4); len = BITS(4) + 8; if (state->wbits == 0) - state->wbits = len; - else if (len > state->wbits) { + state->wbits = len; + if (len > 15 || len > state->wbits) { strm->msg = (char *)"invalid window size"; state->mode = BAD; break; } - state->dmax = 1U << len; - Tracev((stderr, "inflate: zlib header ok\n")); strm->adler = state->check = adler32(0L, Z_NULL, 0); state->mode = hold & 0x200 ? DICTID : TYPE; INITBITS(); @@ -693,14 +661,16 @@ int inflate(z_streamp strm, int flush) } if (state->head != Z_NULL) state->head->text = (int)((hold >> 8) & 1); - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); state->mode = TIME; case TIME: NEEDBITS(32); if (state->head != Z_NULL) state->head->time = hold; - if (state->flags & 0x0200) CRC4(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC4(state->check, hold); INITBITS(); state->mode = OS; case OS: @@ -709,7 +679,8 @@ int inflate(z_streamp strm, int flush) state->head->xflags = (int)(hold & 0xff); state->head->os = (int)(hold >> 8); } - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); state->mode = EXLEN; case EXLEN: @@ -718,7 +689,8 @@ int inflate(z_streamp strm, int flush) state->length = (unsigned)(hold); if (state->head != Z_NULL) state->head->extra_len = (unsigned)hold; - if (state->flags & 0x0200) CRC2(state->check, hold); + if ((state->flags & 0x0200) && (state->wrap & 4)) + CRC2(state->check, hold); INITBITS(); } else if (state->head != Z_NULL) @@ -732,11 +704,11 @@ int inflate(z_streamp strm, int flush) if (state->head != Z_NULL && state->head->extra != Z_NULL) { len = state->head->extra_len - state->length; - zmemcpy(state->head->extra + len, next, + memcpy(state->head->extra + len, next, len + copy > state->head->extra_max ? state->head->extra_max - len : copy); } - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -757,7 +729,7 @@ int inflate(z_streamp strm, int flush) state->length < state->head->name_max) state->head->name[state->length++] = len; } while (len && copy < have); - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -778,7 +750,7 @@ int inflate(z_streamp strm, int flush) state->length < state->head->comm_max) state->head->comment[state->length++] = len; } while (len && copy < have); - if (state->flags & 0x0200) + if ((state->flags & 0x0200) && (state->wrap & 4)) state->check = crc32(state->check, next, copy); have -= copy; next += copy; @@ -790,7 +762,7 @@ int inflate(z_streamp strm, int flush) case HCRC: if (state->flags & 0x0200) { NEEDBITS(16); - if (hold != (state->check & 0xffff)) { + if ((state->wrap & 4) && hold != (state->check & 0xffff)) { strm->msg = (char *)"header crc mismatch"; state->mode = BAD; break; @@ -830,14 +802,10 @@ int inflate(z_streamp strm, int flush) DROPBITS(1); switch (BITS(2)) { case 0: /* stored block */ - Tracev((stderr, "inflate: stored block%s\n", - state->last ? " (last)" : "")); state->mode = STORED; break; case 1: /* fixed block */ fixedtables(state); - Tracev((stderr, "inflate: fixed codes block%s\n", - state->last ? " (last)" : "")); state->mode = LEN_; /* decode codes */ if (flush == Z_TREES) { DROPBITS(2); @@ -845,8 +813,6 @@ int inflate(z_streamp strm, int flush) } break; case 2: /* dynamic block */ - Tracev((stderr, "inflate: dynamic codes block%s\n", - state->last ? " (last)" : "")); state->mode = TABLE; break; case 3: @@ -864,8 +830,6 @@ int inflate(z_streamp strm, int flush) break; } state->length = (unsigned)hold & 0xffff; - Tracev((stderr, "inflate: stored length %u\n", - state->length)); INITBITS(); state->mode = COPY_; if (flush == Z_TREES) goto inf_leave; @@ -877,7 +841,7 @@ int inflate(z_streamp strm, int flush) if (copy > have) copy = have; if (copy > left) copy = left; if (copy == 0) goto inf_leave; - zmemcpy(put, next, copy); + memcpy(put, next, copy); have -= copy; next += copy; left -= copy; @@ -885,7 +849,6 @@ int inflate(z_streamp strm, int flush) state->length -= copy; break; } - Tracev((stderr, "inflate: stored end\n")); state->mode = TYPE; break; case TABLE: @@ -903,7 +866,6 @@ int inflate(z_streamp strm, int flush) break; } #endif - Tracev((stderr, "inflate: table sizes ok\n")); state->have = 0; state->mode = LENLENS; case LENLENS: @@ -924,7 +886,6 @@ int inflate(z_streamp strm, int flush) state->mode = BAD; break; } - Tracev((stderr, "inflate: code lengths ok\n")); state->have = 0; state->mode = CODELENS; case CODELENS: @@ -1007,7 +968,6 @@ int inflate(z_streamp strm, int flush) state->mode = BAD; break; } - Tracev((stderr, "inflate: codes ok\n")); state->mode = LEN_; if (flush == Z_TREES) goto inf_leave; case LEN_: @@ -1042,14 +1002,10 @@ int inflate(z_streamp strm, int flush) state->back += here.bits; state->length = (unsigned)here.val; if ((int)(here.op) == 0) { - Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? - "inflate: literal '%c'\n" : - "inflate: literal 0x%02x\n", here.val)); state->mode = LIT; break; } if (here.op & 32) { - Tracevv((stderr, "inflate: end of block\n")); state->back = -1; state->mode = TYPE; break; @@ -1068,7 +1024,6 @@ int inflate(z_streamp strm, int flush) DROPBITS(state->extra); state->back += state->extra; } - Tracevv((stderr, "inflate: length %u\n", state->length)); state->was = state->length; state->mode = DIST; case DIST: @@ -1105,14 +1060,6 @@ int inflate(z_streamp strm, int flush) DROPBITS(state->extra); state->back += state->extra; } -#ifdef INFLATE_STRICT - if (state->offset > state->dmax) { - strm->msg = (char *)"invalid distance too far back"; - state->mode = BAD; - break; - } -#endif - Tracevv((stderr, "inflate: distance %u\n", state->offset)); state->mode = MATCH; case MATCH: if (left == 0) goto inf_leave; @@ -1125,19 +1072,6 @@ int inflate(z_streamp strm, int flush) state->mode = BAD; break; } -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - Trace((stderr, "inflate.c too far\n")); - copy -= state->whave; - if (copy > state->length) copy = state->length; - if (copy > left) copy = left; - left -= copy; - state->length -= copy; - do { - *put++ = 0; - } while (--copy); - if (state->length == 0) state->mode = LEN; - break; -#endif } if (copy > state->wnext) { copy -= state->wnext; @@ -1171,11 +1105,11 @@ int inflate(z_streamp strm, int flush) out -= left; strm->total_out += out; state->total += out; - if (out) + if ((state->wrap & 4) && out) strm->adler = state->check = UPDATE(state->check, put - out, out); out = left; - if (( + if ((state->wrap & 4) && ( #ifdef GUNZIP state->flags ? hold : #endif @@ -1185,7 +1119,6 @@ int inflate(z_streamp strm, int flush) break; } INITBITS(); - Tracev((stderr, "inflate: check matches trailer\n")); } #ifdef GUNZIP state->mode = LENGTH; @@ -1198,7 +1131,6 @@ int inflate(z_streamp strm, int flush) break; } INITBITS(); - Tracev((stderr, "inflate: length matches trailer\n")); } #endif state->mode = DONE; @@ -1234,7 +1166,7 @@ inf_leave: strm->total_in += in; strm->total_out += out; state->total += out; - if (state->wrap && out) + if ((state->wrap & 4) && out) strm->adler = state->check = UPDATE(state->check, strm->next_out - out, out); strm->data_type = state->bits + (state->last ? 64 : 0) + @@ -1248,13 +1180,16 @@ inf_leave: int inflateEnd(z_streamp strm) { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL || strm->zfree == Z_NULL) + if ( + strm == Z_NULL || + strm->state == Z_NULL + ) return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - if (state->window != Z_NULL) ZFREE(strm, state->window); - ZFREE(strm, strm->state); + if (state->window != Z_NULL) + free(state->window); + free(strm->state); strm->state = Z_NULL; - Tracev((stderr, "inflate: end\n")); return Z_OK; } @@ -1263,36 +1198,47 @@ int inflateGetDictionary(z_streamp strm, Bytef *dictionary, uInt *dictLength) struct inflate_state FAR *state; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if ( + strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; /* copy dictionary */ - if (state->whave && dictionary != Z_NULL) { - zmemcpy(dictionary, state->window + state->wnext, + if (state->whave && dictionary != Z_NULL) + { + memcpy(dictionary, state->window + state->wnext, state->whave - state->wnext); - zmemcpy(dictionary + state->whave - state->wnext, + memcpy(dictionary + state->whave - state->wnext, state->window, state->wnext); } + if (dictLength != Z_NULL) *dictLength = state->whave; + return Z_OK; } -int inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLength) +int inflateSetDictionary(z_streamp strm, + const Bytef *dictionary, uInt dictLength) { - struct inflate_state FAR *state; - unsigned long dictid; int ret; + struct inflate_state FAR *state; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; - if (state->wrap != 0 && state->mode != DICT) + if ( state->wrap != 0 && + state->mode != DICT) return Z_STREAM_ERROR; /* check for correct dictionary identifier */ - if (state->mode == DICT) { - dictid = adler32(0L, Z_NULL, 0); + if (state->mode == DICT) + { + unsigned long dictid = adler32(0L, Z_NULL, 0); dictid = adler32(dictid, dictionary, dictLength); if (dictid != state->check) return Z_DATA_ERROR; @@ -1301,12 +1247,14 @@ int inflateSetDictionary(z_streamp strm, const Bytef *dictionary, uInt dictLengt /* copy dictionary to window using updatewindow(), which will amend the existing dictionary if appropriate */ ret = updatewindow(strm, dictionary + dictLength, dictLength); - if (ret) { + + if (ret) + { state->mode = MEM; return Z_MEM_ERROR; } + state->havedict = 1; - Tracev((stderr, "inflate: dictionary set\n")); return Z_OK; } @@ -1315,13 +1263,18 @@ int inflateGetHeader(z_streamp strm, gz_headerp head) struct inflate_state FAR *state; /* check state */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; - if ((state->wrap & 2) == 0) return Z_STREAM_ERROR; + + if ((state->wrap & 2) == 0) + return Z_STREAM_ERROR; /* save header structure */ state->head = head; - head->done = 0; + head->done = 0; return Z_OK; } @@ -1336,14 +1289,14 @@ int inflateGetHeader(z_streamp strm, gz_headerp head) called again with more data and the *have state. *have is initialized to zero for the first call. */ -static unsigned syncsearch(unsigned FAR *have, const unsigned char FAR *buf, unsigned len) +static unsigned syncsearch(unsigned FAR *have, + const unsigned char FAR *buf, unsigned len) { - unsigned got; - unsigned next; + unsigned got = *have; + unsigned next = 0; - got = *have; - next = 0; - while (next < len && got < 4) { + while (next < len && got < 4) + { if ((int)(buf[next]) == (got < 2 ? 0 : 0xff)) got++; else if (buf[next]) @@ -1364,37 +1317,48 @@ int inflateSync(z_streamp strm) struct inflate_state FAR *state; /* check parameters */ - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; - if (strm->avail_in == 0 && state->bits < 8) return Z_BUF_ERROR; + if (strm->avail_in == 0 && state->bits < 8) + return Z_BUF_ERROR; /* if first time, start search in bit buffer */ - if (state->mode != SYNC) { - state->mode = SYNC; + if (state->mode != SYNC) + { + state->mode = SYNC; state->hold <<= state->bits & 7; - state->bits -= state->bits & 7; - len = 0; - while (state->bits >= 8) { - buf[len++] = (unsigned char)(state->hold); + state->bits -= state->bits & 7; + len = 0; + while (state->bits >= 8) + { + buf[len++] = (unsigned char)(state->hold); state->hold >>= 8; - state->bits -= 8; + state->bits -= 8; } - state->have = 0; + state->have = 0; syncsearch(&(state->have), buf, len); } /* search available input */ - len = syncsearch(&(state->have), strm->next_in, strm->avail_in); + len = syncsearch(&(state->have), strm->next_in, strm->avail_in); strm->avail_in -= len; - strm->next_in += len; + strm->next_in += len; strm->total_in += len; /* return no joy or set up to restart inflate() on a new block */ - if (state->have != 4) return Z_DATA_ERROR; - in = strm->total_in; out = strm->total_out; + if (state->have != 4) + return Z_DATA_ERROR; + if (state->mode == HEAD) + state->wrap = 0; /* never processed header, so assume raw */ + + in = strm->total_in; + out = strm->total_out; inflateReset(strm); - strm->total_in = in; strm->total_out = out; - state->mode = TYPE; + strm->total_in = in; + strm->total_out = out; + state->mode = TYPE; return Z_OK; } @@ -1410,53 +1374,106 @@ int inflateSyncPoint(z_streamp strm) { struct inflate_state FAR *state; - if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; state = (struct inflate_state FAR *)strm->state; return state->mode == STORED && state->bits == 0; } int inflateCopy(z_streamp dest, z_streamp source) { + unsigned i; + unsigned wsize; struct inflate_state FAR *state; struct inflate_state FAR *copy; unsigned char FAR *window; - unsigned wsize; /* check input */ - if (dest == Z_NULL || source == Z_NULL || source->state == Z_NULL || - source->zalloc == Z_NULL || source->zfree == Z_NULL) + if ( dest == Z_NULL || + source == Z_NULL || + source->state == Z_NULL + ) return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)source->state; /* allocate space */ copy = (struct inflate_state FAR *) - ZALLOC(source, 1, sizeof(struct inflate_state)); - if (copy == Z_NULL) return Z_MEM_ERROR; - window = Z_NULL; - if (state->window != Z_NULL) { + malloc(sizeof(*copy)); + if (copy == Z_NULL) + return Z_MEM_ERROR; + window = Z_NULL; + copy->mode = HEAD; + copy->last = 0; + copy->wrap = 0; + copy->havedict = 0; + copy->flags = 0; + copy->check = 0; + copy->total = 0; + copy->head = Z_NULL; + copy->wbits = 0; + copy->wsize = 0; + copy->whave = 0; + copy->wnext = 0; + copy->window = Z_NULL; + copy->hold = 0; + copy->bits = 0; + copy->length = 0; + copy->offset = 0; + copy->extra = 0; + copy->lencode = Z_NULL; + copy->distcode = Z_NULL; + copy->lenbits = 0; + copy->distbits = 0; + copy->ncode = 0; + copy->nlen = 0; + copy->ndist = 0; + copy->have = 0; + copy->next = Z_NULL; + for (i = 0; i < 320; i++) + copy->lens[i] = 0; + for (i = 0; i < 288; i++) + copy->work[i] = 0; + for (i = 0; i < ENOUGH; i++) + { + copy->codes[i].op = 0; + copy->codes[i].bits = 0; + copy->codes[i].val = 0; + } + copy->sane = 0; + copy->back = 0; + copy->was = 0; + if (state->window != Z_NULL) + { window = (unsigned char FAR *) - ZALLOC(source, 1U << state->wbits, sizeof(unsigned char)); - if (window == Z_NULL) { - ZFREE(source, copy); + calloc(1U << state->wbits, sizeof(unsigned char)); + if (window == Z_NULL) + { + free(copy); return Z_MEM_ERROR; } } /* copy state */ - zmemcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); - zmemcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); - if (state->lencode >= state->codes && - state->lencode <= state->codes + ENOUGH - 1) { - copy->lencode = copy->codes + (state->lencode - state->codes); + memcpy((voidpf)dest, (voidpf)source, sizeof(z_stream)); + memcpy((voidpf)copy, (voidpf)state, sizeof(struct inflate_state)); + + if ( state->lencode >= state->codes && + state->lencode <= state->codes + ENOUGH - 1) + { + copy->lencode = copy->codes + (state->lencode - state->codes); copy->distcode = copy->codes + (state->distcode - state->codes); } copy->next = copy->codes + (state->next - state->codes); - if (window != Z_NULL) { + + if (window != Z_NULL) + { wsize = 1U << state->wbits; - zmemcpy(window, state->window, wsize); + memcpy(window, state->window, wsize); } copy->window = window; - dest->state = (struct internal_state FAR *)copy; + dest->state = (struct internal_state FAR *)copy; return Z_OK; } @@ -1466,24 +1483,38 @@ int inflateUndermine(z_streamp strm, int subvert) if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; - state = (struct inflate_state FAR *)strm->state; - state->sane = !subvert; -#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR - return Z_OK; -#else + + state = (struct inflate_state FAR *)strm->state; state->sane = 1; + return Z_DATA_ERROR; -#endif +} + +int inflateValidate(z_streamp strm, int check) +{ + struct inflate_state FAR *state; + + if ( strm == Z_NULL || + strm->state == Z_NULL) + return Z_STREAM_ERROR; + state = (struct inflate_state FAR *)strm->state; + if (check && state->wrap) + state->wrap |= 4; + else + state->wrap &= ~4; + return Z_OK; } long inflateMark(z_streamp strm) { struct inflate_state FAR *state = NULL; - if (strm == Z_NULL || strm->state == Z_NULL) - return -1L << 16; + if ( strm == Z_NULL || + strm->state == Z_NULL) + return -(1L << 16); + state = (struct inflate_state FAR *)strm->state; - return ((long)(state->back) << 16) + - (state->mode == COPY ? state->length : + return (long)(((unsigned long)((long)state->back)) << 16) + + (state->mode == COPY ? state->length : (state->mode == MATCH ? state->was - state->length : 0)); } diff --git a/deps/libz/inflate.h b/deps/libz/inflate.h index dbc173afb0..656455ead4 100644 --- a/deps/libz/inflate.h +++ b/deps/libz/inflate.h @@ -84,10 +84,10 @@ typedef enum { struct inflate_state { inflate_mode mode; /* current inflate mode */ int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ + int wrap; /* bit 0 true for zlib, bit 1 true for gzip, + bit 2 true to validate check value */ int havedict; /* true if dictionary provided */ int flags; /* gzip header method and flags (0 if zlib) */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ unsigned long check; /* protected copy of check value */ unsigned long total; /* protected copy of output count */ gz_headerp head; /* where to save gzip header information */ diff --git a/deps/libz/trees.c b/deps/libz/trees.c index b2e9f9f15a..0d609ae15f 100644 --- a/deps/libz/trees.c +++ b/deps/libz/trees.c @@ -32,14 +32,8 @@ /* @(#) $Id$ */ -/* #define GEN_TREES_H */ - #include "deflate.h" -#ifdef DEBUG -# include -#endif - /* =========================================================================== * Constants */ @@ -80,39 +74,7 @@ static const uch bl_order[BL_CODES] #define DIST_CODE_LEN 512 /* see definition of array dist_code below */ -#if defined(GEN_TREES_H) || !defined(STDC) -/* non ANSI compilers may not accept trees.h */ - -static ct_data static_ltree[L_CODES+2]; -/* The static literal tree. Since the bit lengths are imposed, there is no - * need for the L_CODES extra codes used during heap construction. However - * The codes 286 and 287 are needed to build a canonical tree (see _tr_init - * below). - */ - -static ct_data static_dtree[D_CODES]; -/* The static distance tree. (Actually a trivial tree since all codes use - * 5 bits.) - */ - -uch _dist_code[DIST_CODE_LEN]; -/* Distance codes. The first 256 values correspond to the distances - * 3 .. 258, the last 256 values correspond to the top 8 bits of - * the 15 bit distances. - */ - -uch _length_code[MAX_MATCH-MIN_MATCH+1]; -/* length code for each normalized match length (0 == MIN_MATCH) */ - -static int base_length[LENGTH_CODES]; -/* First normalized length for each code (0 = MIN_MATCH) */ - -static int base_dist[D_CODES]; -/* First normalized distance for each code (0 = distance of 1) */ - -#else -# include "trees.h" -#endif /* GEN_TREES_H */ +#include "trees.h" struct static_tree_desc_s { const ct_data *static_tree; /* static tree or NULL */ @@ -135,29 +97,12 @@ static static_tree_desc static_bl_desc = * Local (static) routines in this file. */ -static void tr_static_init (void); -static void init_block (deflate_state *s); -static void pqdownheap (deflate_state *s, ct_data *tree, int k); -static void gen_bitlen (deflate_state *s, tree_desc *desc); -static void gen_codes (ct_data *tree, int max_code, ushf *bl_count); -static void build_tree (deflate_state *s, tree_desc *desc); -static void scan_tree (deflate_state *s, ct_data *tree, int max_code); -static void send_tree (deflate_state *s, ct_data *tree, int max_code); -static int build_bl_tree (deflate_state *s); -static void send_all_trees (deflate_state *s, int lcodes, int dcodes, - int blcodes); static void compress_block (deflate_state *s, const ct_data *ltree, const ct_data *dtree); static int detect_data_type (deflate_state *s); static unsigned bi_reverse (unsigned value, int length); static void bi_windup (deflate_state *s); static void bi_flush (deflate_state *s); -static void copy_block (deflate_state *s, charf *buf, unsigned len, - int header); - -#ifdef GEN_TREES_H -static void gen_trees_header (void); -#endif # define send_code(s, c, tree) send_bits(s, tree[c].Code, tree[c].Len) /* Send a code of the given tree. c and tree must not have side effects */ @@ -175,30 +120,6 @@ static void gen_trees_header (void); * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ -#ifdef DEBUG -static void send_bits (deflate_state *s, int value, int length); - -static void send_bits(deflate_state *s, int value, int length) -{ - Tracevv((stderr," l %2d v %4x ", length, value)); - Assert(length > 0 && length <= 15, "invalid length"); - s->bits_sent += (ulg)length; - - /* If not enough room in bi_buf, use (valid) bits from bi_buf and - * (16 - bi_valid) bits from value, leaving (width - (16-bi_valid)) - * unused bits in value. - */ - if (s->bi_valid > (int)Buf_size - length) { - s->bi_buf |= (ush)value << s->bi_valid; - put_short(s, s->bi_buf); - s->bi_buf = (ush)value >> (Buf_size - s->bi_valid); - s->bi_valid += length - Buf_size; - } else { - s->bi_buf |= (ush)value << s->bi_valid; - s->bi_valid += length; - } -} -#else /* !DEBUG */ #define send_bits(s, value, length) \ { int len = length;\ @@ -213,184 +134,6 @@ static void send_bits(deflate_state *s, int value, int length) s->bi_valid += len;\ }\ } -#endif /* DEBUG */ - - -/* the arguments must not have side effects */ - -/* =========================================================================== - * Initialize the various 'constant' tables. - */ -static void tr_static_init(void) -{ -#if defined(GEN_TREES_H) || !defined(STDC) - static int static_init_done = 0; - int n; /* iterates over tree elements */ - int bits; /* bit counter */ - int length; /* length value */ - int codes; /* code value */ - int dist; /* distance index */ - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - if (static_init_done) return; - - /* For some embedded targets, global variables are not initialized: */ -#ifdef NO_INIT_GLOBAL_POINTERS - static_l_desc.static_tree = static_ltree; - static_l_desc.extra_bits = extra_lbits; - static_d_desc.static_tree = static_dtree; - static_d_desc.extra_bits = extra_dbits; - static_bl_desc.extra_bits = extra_blbits; -#endif - - /* Initialize the mapping length (0..255) -> length code (0..28) */ - length = 0; - for (codes = 0; codes < LENGTH_CODES-1; codes++) { - base_length[codes] = length; - for (n = 0; n < (1< dist code (0..29) */ - dist = 0; - for (codes = 0 ; codes < 16; codes++) { - base_dist[codes] = dist; - for (n = 0; n < (1<>= 7; /* from now on, all distances are divided by 128 */ - for ( ; codes < D_CODES; codes++) { - base_dist[codes] = dist << 7; - for (n = 0; n < (1<<(extra_dbits[codes]-7)); n++) { - _dist_code[256 + dist++] = (uch)codes; - } - } - Assert (dist == 256, "tr_static_init: 256+dist != 512"); - - /* Construct the codes of the static literal tree */ - for (bits = 0; bits <= MAX_BITS; bits++) bl_count[bits] = 0; - n = 0; - while (n <= 143) static_ltree[n++].Len = 8, bl_count[8]++; - while (n <= 255) static_ltree[n++].Len = 9, bl_count[9]++; - while (n <= 279) static_ltree[n++].Len = 7, bl_count[7]++; - while (n <= 287) static_ltree[n++].Len = 8, bl_count[8]++; - /* Codes 286 and 287 do not exist, but we must include them in the - * tree construction to get a canonical Huffman tree (longest code - * all ones) - */ - gen_codes((ct_data *)static_ltree, L_CODES+1, bl_count); - - /* The static distance tree is trivial: */ - for (n = 0; n < D_CODES; n++) { - static_dtree[n].Len = 5; - static_dtree[n].Code = bi_reverse((unsigned)n, 5); - } - static_init_done = 1; - -# ifdef GEN_TREES_H - gen_trees_header(); -# endif -#endif /* defined(GEN_TREES_H) || !defined(STDC) */ -} - -/* =========================================================================== - * Genererate the file trees.h describing the static trees. - */ -#ifdef GEN_TREES_H -# ifndef DEBUG -# include -# endif - -# define SEPARATOR(i, last, width) \ - ((i) == (last)? "\n};\n\n" : \ - ((i) % (width) == (width)-1 ? ",\n" : ", ")) - -void gen_trees_header(void) -{ - FILE *header = fopen("trees.h", "w"); - int i; - - Assert (header != NULL, "Can't open trees.h"); - fprintf(header, - "/* header created automatically with -DGEN_TREES_H */\n\n"); - - fprintf(header, "local const ct_data static_ltree[L_CODES+2] = {\n"); - for (i = 0; i < L_CODES+2; i++) { - fprintf(header, "{{%3u},{%3u}}%s", static_ltree[i].Code, - static_ltree[i].Len, SEPARATOR(i, L_CODES+1, 5)); - } - - fprintf(header, "local const ct_data static_dtree[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "{{%2u},{%2u}}%s", static_dtree[i].Code, - static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5)); - } - - fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n"); - for (i = 0; i < DIST_CODE_LEN; i++) { - fprintf(header, "%2u%s", _dist_code[i], - SEPARATOR(i, DIST_CODE_LEN-1, 20)); - } - - fprintf(header, - "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n"); - for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) { - fprintf(header, "%2u%s", _length_code[i], - SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20)); - } - - fprintf(header, "local const int base_length[LENGTH_CODES] = {\n"); - for (i = 0; i < LENGTH_CODES; i++) { - fprintf(header, "%1u%s", base_length[i], - SEPARATOR(i, LENGTH_CODES-1, 20)); - } - - fprintf(header, "local const int base_dist[D_CODES] = {\n"); - for (i = 0; i < D_CODES; i++) { - fprintf(header, "%5u%s", base_dist[i], - SEPARATOR(i, D_CODES-1, 10)); - } - - fclose(header); -} -#endif /* GEN_TREES_H */ - -/* =========================================================================== - * Initialize the tree data structures for a new zlib stream. - */ -void ZLIB_INTERNAL _tr_init(deflate_state *s) -{ - tr_static_init(); - - s->l_desc.dyn_tree = s->dyn_ltree; - s->l_desc.stat_desc = &static_l_desc; - - s->d_desc.dyn_tree = s->dyn_dtree; - s->d_desc.stat_desc = &static_d_desc; - - s->bl_desc.dyn_tree = s->bl_tree; - s->bl_desc.stat_desc = &static_bl_desc; - - s->bi_buf = 0; - s->bi_valid = 0; -#ifdef DEBUG - s->compressed_len = 0L; - s->bits_sent = 0L; -#endif - - /* Initialize the first block of the first file: */ - init_block(s); -} /* =========================================================================== * Initialize a new block. @@ -409,6 +152,30 @@ static void init_block(deflate_state *s) s->last_lit = s->matches = 0; } + +/* the arguments must not have side effects */ + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +void ZLIB_INTERNAL _tr_init(deflate_state *s) +{ + s->l_desc.dyn_tree = s->dyn_ltree; + s->l_desc.stat_desc = &static_l_desc; + + s->d_desc.dyn_tree = s->dyn_dtree; + s->d_desc.stat_desc = &static_d_desc; + + s->bl_desc.dyn_tree = s->bl_tree; + s->bl_desc.stat_desc = &static_bl_desc; + + s->bi_buf = 0; + s->bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + #define SMALLEST 1 /* Index within the heap array of least frequent node in the Huffman tree */ @@ -573,7 +340,6 @@ static void gen_codes (ct_data *tree, int max_code, ushf *bl_count) */ Assert (codes + bl_count[MAX_BITS]-1 == (1<opt_len += 3*(max_blindex+1) + 5+5+4; - Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", - s->opt_len, s->static_len)); return max_blindex; } @@ -811,21 +575,16 @@ static void send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, "too many codes"); - Tracev((stderr, "\nbl counts: ")); send_bits(s, lcodes-257, 5); /* not +255 as stated in appnote.txt */ send_bits(s, dcodes-1, 5); send_bits(s, blcodes-4, 4); /* not -3 as stated in appnote.txt */ for (rank = 0; rank < blcodes; rank++) { - Tracev((stderr, "\nbl code %2d ", bl_order[rank])); send_bits(s, s->bl_tree[bl_order[rank]].Len, 3); } - Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); send_tree(s, (ct_data *)s->dyn_ltree, lcodes-1); /* literal tree */ - Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); send_tree(s, (ct_data *)s->dyn_dtree, dcodes-1); /* distance tree */ - Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); } /* =========================================================================== @@ -834,11 +593,11 @@ static void send_all_trees(deflate_state *s, int lcodes, int dcodes, int blcodes void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf, ulg stored_len, int last) { send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */ -#ifdef DEBUG - s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L; - s->compressed_len += (stored_len + 4) << 3; -#endif - copy_block(s, buf, (unsigned)stored_len, 1); /* with header */ + bi_windup(s); /* align on byte boundary */ + put_short(s, (ush)stored_len); + put_short(s, (ush)~stored_len); + memcpy(s->pending_buf + s->pending, buf, stored_len); + s->pending += stored_len; } /* =========================================================================== @@ -857,9 +616,6 @@ void ZLIB_INTERNAL _tr_align(deflate_state *s) { send_bits(s, STATIC_TREES<<1, 3); send_code(s, END_BLOCK, static_ltree); -#ifdef DEBUG - s->compressed_len += 10L; /* 3 for block type, 7 for EOB */ -#endif bi_flush(s); } @@ -881,12 +637,8 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, /* Construct the literal and distance trees */ build_tree(s, (tree_desc *)(&(s->l_desc))); - Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); build_tree(s, (tree_desc *)(&(s->d_desc))); - Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, - s->static_len)); /* At this point, opt_len and static_len are the total bit lengths of * the compressed block data, excluding the tree representations. */ @@ -900,10 +652,6 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, opt_lenb = (s->opt_len+3+7)>>3; static_lenb = (s->static_len+3+7)>>3; - Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", - opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, - s->last_lit)); - if (static_lenb <= opt_lenb) opt_lenb = static_lenb; } else { @@ -933,18 +681,12 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, send_bits(s, (STATIC_TREES<<1)+last, 3); compress_block(s, (const ct_data *)static_ltree, (const ct_data *)static_dtree); -#ifdef DEBUG - s->compressed_len += 3 + s->static_len; -#endif } else { send_bits(s, (DYN_TREES<<1)+last, 3); send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1, max_blindex+1); compress_block(s, (const ct_data *)s->dyn_ltree, (const ct_data *)s->dyn_dtree); -#ifdef DEBUG - s->compressed_len += 3 + s->opt_len; -#endif } Assert (s->compressed_len == s->bits_sent, "bad compressed size"); /* The above check is made mod 2^32, for files larger than 512 MB @@ -954,12 +696,7 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, if (last) { bi_windup(s); -#ifdef DEBUG - s->compressed_len += 7; /* align on byte boundary */ -#endif } - Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, - s->compressed_len-7*last)); } /* =========================================================================== @@ -997,9 +734,6 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, (5L+extra_dbits[dcode]); } out_length >>= 3; - Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", - s->last_lit, in_length, out_length, - 100L - out_length*100L/in_length)); if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1; } #endif @@ -1141,30 +875,4 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf, ulg stored_len, } s->bi_buf = 0; s->bi_valid = 0; -#ifdef DEBUG - s->bits_sent = (s->bits_sent+7) & ~7; -#endif - } - - /* =========================================================================== - * Copy a stored block, storing first the length and its - * one's complement if requested. - */ - static void copy_block(deflate_state *s, charf *buf, unsigned len, int header) - { - bi_windup(s); /* align on byte boundary */ - - if (header) { - put_short(s, (ush)len); - put_short(s, (ush)~len); -#ifdef DEBUG - s->bits_sent += 2*16; -#endif - } -#ifdef DEBUG - s->bits_sent += (ulg)len<<3; -#endif - while (len--) { - put_byte(s, *buf++); - } } diff --git a/deps/libz/uncompr.c b/deps/libz/uncompr.c index ccf666422f..222098ee6a 100644 --- a/deps/libz/uncompr.c +++ b/deps/libz/uncompr.c @@ -21,36 +21,44 @@ enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, or Z_DATA_ERROR if the input data was corrupted. */ -int uncompress (unsigned char *dest, uint32_t *destLen, const unsigned char *source, uint32_t sourceLen) +int uncompress ( + unsigned char *dest, + uint32_t *destLen, + const unsigned char *source, + uint32_t sourceLen) { - z_stream stream; int err; + z_stream stream; - stream.next_in = (Bytef *)source; - stream.avail_in = (uInt)sourceLen; + stream.next_in = (Bytef*)source; + stream.avail_in = (uInt)sourceLen; /* Check for source > 64K on 16-bit machine: */ - if ((uint32_t)stream.avail_in != sourceLen) return Z_BUF_ERROR; + if ((uint32_t)stream.avail_in != sourceLen) + return Z_BUF_ERROR; - stream.next_out = dest; + stream.next_out = dest; stream.avail_out = (uInt)*destLen; - if ((uint32_t)stream.avail_out != *destLen) return Z_BUF_ERROR; + if ((uint32_t)stream.avail_out != *destLen) + return Z_BUF_ERROR; - stream.zalloc = Z_NULL; - stream.zfree = Z_NULL; + stream.zalloc = Z_NULL; + stream.zfree = Z_NULL; err = inflateInit(&stream); - if (err != Z_OK) return err; + if (err != Z_OK) + return err; err = inflate(&stream, Z_FINISH); if (err != Z_STREAM_END) { inflateEnd(&stream); - if (err == Z_NEED_DICT || (err == Z_BUF_ERROR && stream.avail_in == 0)) + if ( err == Z_NEED_DICT || + (err == Z_BUF_ERROR && stream.avail_in == 0)) return Z_DATA_ERROR; return err; } *destLen = stream.total_out; - err = inflateEnd(&stream); + err = inflateEnd(&stream); return err; } diff --git a/deps/libz/zutil.c b/deps/libz/zutil.c index 79cc2e8d85..2e97acca80 100644 --- a/deps/libz/zutil.c +++ b/deps/libz/zutil.c @@ -30,36 +30,63 @@ const char * zlibVersion(void) uLong zlibCompileFlags(void) { - uLong flags; + uLong flags = 0; - flags = 0; - switch ((int)(sizeof(uInt))) { - case 2: break; - case 4: flags += 1; break; - case 8: flags += 2; break; - default: flags += 3; + switch ((int)(sizeof(uInt))) + { + case 2: + break; + case 4: + flags += 1; + break; + case 8: + flags += 2; + break; + default: + flags += 3; } - switch ((int)(sizeof(uLong))) { - case 2: break; - case 4: flags += 1 << 2; break; - case 8: flags += 2 << 2; break; - default: flags += 3 << 2; + + switch ((int)(sizeof(uLong))) + { + case 2: + break; + case 4: + flags += 1 << 2; + break; + case 8: + flags += 2 << 2; + break; + default: + flags += 3 << 2; } - switch ((int)(sizeof(voidpf))) { - case 2: break; - case 4: flags += 1 << 4; break; - case 8: flags += 2 << 4; break; - default: flags += 3 << 4; + + switch ((int)(sizeof(voidpf))) + { + case 2: + break; + case 4: + flags += 1 << 4; + break; + case 8: + flags += 2 << 4; + break; + default: + flags += 3 << 4; } - switch ((int)(sizeof(z_off_t))) { - case 2: break; - case 4: flags += 1 << 6; break; - case 8: flags += 2 << 6; break; - default: flags += 3 << 6; + + switch ((int)(sizeof(z_off_t))) + { + case 2: + break; + case 4: + flags += 1 << 6; + break; + case 8: + flags += 2 << 6; + break; + default: + flags += 3 << 6; } -#ifdef DEBUG - flags += 1 << 8; -#endif #if defined(ASMV) || defined(ASMINF) flags += 1 << 9; #endif @@ -111,20 +138,6 @@ uLong zlibCompileFlags(void) return flags; } -#ifdef DEBUG - -# ifndef verbose -# define verbose 0 -# endif -int ZLIB_INTERNAL z_verbose = verbose; - -void ZLIB_INTERNAL z_error (char *m) -{ - fprintf(stderr, "%s\n", m); - exit(1); -} -#endif - /* exported to allow conversion of error code to string for compress() and * uncompress() */ @@ -151,5 +164,4 @@ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size) void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr) { free(ptr); - if (opaque) return; /* make compiler happy */ } diff --git a/deps/mbedtls/aes.c b/deps/mbedtls/aes.c index d36b231fb4..cff9c6a48b 100644 --- a/deps/mbedtls/aes.c +++ b/deps/mbedtls/aes.c @@ -43,15 +43,6 @@ #include "mbedtls/aesni.h" #endif -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_AES_ALT) #include "arc4_alt.h" @@ -84,273 +75,6 @@ static int aes_padlock_ace = -1; #endif -#if defined(MBEDTLS_AES_ROM_TABLES) -/* - * Forward S-box - */ -static const unsigned char FSb[256] = -{ - 0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, - 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, - 0xCA, 0x82, 0xC9, 0x7D, 0xFA, 0x59, 0x47, 0xF0, - 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, - 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC, - 0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, - 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, - 0x07, 0x12, 0x80, 0xE2, 0xEB, 0x27, 0xB2, 0x75, - 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, - 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84, - 0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, - 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF, - 0xD0, 0xEF, 0xAA, 0xFB, 0x43, 0x4D, 0x33, 0x85, - 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8, - 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5, - 0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2, - 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, - 0xC4, 0xA7, 0x7E, 0x3D, 0x64, 0x5D, 0x19, 0x73, - 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, - 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB, - 0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, - 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79, - 0xE7, 0xC8, 0x37, 0x6D, 0x8D, 0xD5, 0x4E, 0xA9, - 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08, - 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6, - 0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A, - 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, - 0x61, 0x35, 0x57, 0xB9, 0x86, 0xC1, 0x1D, 0x9E, - 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, - 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF, - 0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, - 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16 -}; - -/* - * Forward tables - */ -#define FT \ -\ - V(A5,63,63,C6), V(84,7C,7C,F8), V(99,77,77,EE), V(8D,7B,7B,F6), \ - V(0D,F2,F2,FF), V(BD,6B,6B,D6), V(B1,6F,6F,DE), V(54,C5,C5,91), \ - V(50,30,30,60), V(03,01,01,02), V(A9,67,67,CE), V(7D,2B,2B,56), \ - V(19,FE,FE,E7), V(62,D7,D7,B5), V(E6,AB,AB,4D), V(9A,76,76,EC), \ - V(45,CA,CA,8F), V(9D,82,82,1F), V(40,C9,C9,89), V(87,7D,7D,FA), \ - V(15,FA,FA,EF), V(EB,59,59,B2), V(C9,47,47,8E), V(0B,F0,F0,FB), \ - V(EC,AD,AD,41), V(67,D4,D4,B3), V(FD,A2,A2,5F), V(EA,AF,AF,45), \ - V(BF,9C,9C,23), V(F7,A4,A4,53), V(96,72,72,E4), V(5B,C0,C0,9B), \ - V(C2,B7,B7,75), V(1C,FD,FD,E1), V(AE,93,93,3D), V(6A,26,26,4C), \ - V(5A,36,36,6C), V(41,3F,3F,7E), V(02,F7,F7,F5), V(4F,CC,CC,83), \ - V(5C,34,34,68), V(F4,A5,A5,51), V(34,E5,E5,D1), V(08,F1,F1,F9), \ - V(93,71,71,E2), V(73,D8,D8,AB), V(53,31,31,62), V(3F,15,15,2A), \ - V(0C,04,04,08), V(52,C7,C7,95), V(65,23,23,46), V(5E,C3,C3,9D), \ - V(28,18,18,30), V(A1,96,96,37), V(0F,05,05,0A), V(B5,9A,9A,2F), \ - V(09,07,07,0E), V(36,12,12,24), V(9B,80,80,1B), V(3D,E2,E2,DF), \ - V(26,EB,EB,CD), V(69,27,27,4E), V(CD,B2,B2,7F), V(9F,75,75,EA), \ - V(1B,09,09,12), V(9E,83,83,1D), V(74,2C,2C,58), V(2E,1A,1A,34), \ - V(2D,1B,1B,36), V(B2,6E,6E,DC), V(EE,5A,5A,B4), V(FB,A0,A0,5B), \ - V(F6,52,52,A4), V(4D,3B,3B,76), V(61,D6,D6,B7), V(CE,B3,B3,7D), \ - V(7B,29,29,52), V(3E,E3,E3,DD), V(71,2F,2F,5E), V(97,84,84,13), \ - V(F5,53,53,A6), V(68,D1,D1,B9), V(00,00,00,00), V(2C,ED,ED,C1), \ - V(60,20,20,40), V(1F,FC,FC,E3), V(C8,B1,B1,79), V(ED,5B,5B,B6), \ - V(BE,6A,6A,D4), V(46,CB,CB,8D), V(D9,BE,BE,67), V(4B,39,39,72), \ - V(DE,4A,4A,94), V(D4,4C,4C,98), V(E8,58,58,B0), V(4A,CF,CF,85), \ - V(6B,D0,D0,BB), V(2A,EF,EF,C5), V(E5,AA,AA,4F), V(16,FB,FB,ED), \ - V(C5,43,43,86), V(D7,4D,4D,9A), V(55,33,33,66), V(94,85,85,11), \ - V(CF,45,45,8A), V(10,F9,F9,E9), V(06,02,02,04), V(81,7F,7F,FE), \ - V(F0,50,50,A0), V(44,3C,3C,78), V(BA,9F,9F,25), V(E3,A8,A8,4B), \ - V(F3,51,51,A2), V(FE,A3,A3,5D), V(C0,40,40,80), V(8A,8F,8F,05), \ - V(AD,92,92,3F), V(BC,9D,9D,21), V(48,38,38,70), V(04,F5,F5,F1), \ - V(DF,BC,BC,63), V(C1,B6,B6,77), V(75,DA,DA,AF), V(63,21,21,42), \ - V(30,10,10,20), V(1A,FF,FF,E5), V(0E,F3,F3,FD), V(6D,D2,D2,BF), \ - V(4C,CD,CD,81), V(14,0C,0C,18), V(35,13,13,26), V(2F,EC,EC,C3), \ - V(E1,5F,5F,BE), V(A2,97,97,35), V(CC,44,44,88), V(39,17,17,2E), \ - V(57,C4,C4,93), V(F2,A7,A7,55), V(82,7E,7E,FC), V(47,3D,3D,7A), \ - V(AC,64,64,C8), V(E7,5D,5D,BA), V(2B,19,19,32), V(95,73,73,E6), \ - V(A0,60,60,C0), V(98,81,81,19), V(D1,4F,4F,9E), V(7F,DC,DC,A3), \ - V(66,22,22,44), V(7E,2A,2A,54), V(AB,90,90,3B), V(83,88,88,0B), \ - V(CA,46,46,8C), V(29,EE,EE,C7), V(D3,B8,B8,6B), V(3C,14,14,28), \ - V(79,DE,DE,A7), V(E2,5E,5E,BC), V(1D,0B,0B,16), V(76,DB,DB,AD), \ - V(3B,E0,E0,DB), V(56,32,32,64), V(4E,3A,3A,74), V(1E,0A,0A,14), \ - V(DB,49,49,92), V(0A,06,06,0C), V(6C,24,24,48), V(E4,5C,5C,B8), \ - V(5D,C2,C2,9F), V(6E,D3,D3,BD), V(EF,AC,AC,43), V(A6,62,62,C4), \ - V(A8,91,91,39), V(A4,95,95,31), V(37,E4,E4,D3), V(8B,79,79,F2), \ - V(32,E7,E7,D5), V(43,C8,C8,8B), V(59,37,37,6E), V(B7,6D,6D,DA), \ - V(8C,8D,8D,01), V(64,D5,D5,B1), V(D2,4E,4E,9C), V(E0,A9,A9,49), \ - V(B4,6C,6C,D8), V(FA,56,56,AC), V(07,F4,F4,F3), V(25,EA,EA,CF), \ - V(AF,65,65,CA), V(8E,7A,7A,F4), V(E9,AE,AE,47), V(18,08,08,10), \ - V(D5,BA,BA,6F), V(88,78,78,F0), V(6F,25,25,4A), V(72,2E,2E,5C), \ - V(24,1C,1C,38), V(F1,A6,A6,57), V(C7,B4,B4,73), V(51,C6,C6,97), \ - V(23,E8,E8,CB), V(7C,DD,DD,A1), V(9C,74,74,E8), V(21,1F,1F,3E), \ - V(DD,4B,4B,96), V(DC,BD,BD,61), V(86,8B,8B,0D), V(85,8A,8A,0F), \ - V(90,70,70,E0), V(42,3E,3E,7C), V(C4,B5,B5,71), V(AA,66,66,CC), \ - V(D8,48,48,90), V(05,03,03,06), V(01,F6,F6,F7), V(12,0E,0E,1C), \ - V(A3,61,61,C2), V(5F,35,35,6A), V(F9,57,57,AE), V(D0,B9,B9,69), \ - V(91,86,86,17), V(58,C1,C1,99), V(27,1D,1D,3A), V(B9,9E,9E,27), \ - V(38,E1,E1,D9), V(13,F8,F8,EB), V(B3,98,98,2B), V(33,11,11,22), \ - V(BB,69,69,D2), V(70,D9,D9,A9), V(89,8E,8E,07), V(A7,94,94,33), \ - V(B6,9B,9B,2D), V(22,1E,1E,3C), V(92,87,87,15), V(20,E9,E9,C9), \ - V(49,CE,CE,87), V(FF,55,55,AA), V(78,28,28,50), V(7A,DF,DF,A5), \ - V(8F,8C,8C,03), V(F8,A1,A1,59), V(80,89,89,09), V(17,0D,0D,1A), \ - V(DA,BF,BF,65), V(31,E6,E6,D7), V(C6,42,42,84), V(B8,68,68,D0), \ - V(C3,41,41,82), V(B0,99,99,29), V(77,2D,2D,5A), V(11,0F,0F,1E), \ - V(CB,B0,B0,7B), V(FC,54,54,A8), V(D6,BB,BB,6D), V(3A,16,16,2C) - -#define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t FT0[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t FT1[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t FT2[256] = { FT }; -#undef V - -#define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t FT3[256] = { FT }; -#undef V - -#undef FT - -/* - * Reverse S-box - */ -static const unsigned char RSb[256] = -{ - 0x52, 0x09, 0x6A, 0xD5, 0x30, 0x36, 0xA5, 0x38, - 0xBF, 0x40, 0xA3, 0x9E, 0x81, 0xF3, 0xD7, 0xFB, - 0x7C, 0xE3, 0x39, 0x82, 0x9B, 0x2F, 0xFF, 0x87, - 0x34, 0x8E, 0x43, 0x44, 0xC4, 0xDE, 0xE9, 0xCB, - 0x54, 0x7B, 0x94, 0x32, 0xA6, 0xC2, 0x23, 0x3D, - 0xEE, 0x4C, 0x95, 0x0B, 0x42, 0xFA, 0xC3, 0x4E, - 0x08, 0x2E, 0xA1, 0x66, 0x28, 0xD9, 0x24, 0xB2, - 0x76, 0x5B, 0xA2, 0x49, 0x6D, 0x8B, 0xD1, 0x25, - 0x72, 0xF8, 0xF6, 0x64, 0x86, 0x68, 0x98, 0x16, - 0xD4, 0xA4, 0x5C, 0xCC, 0x5D, 0x65, 0xB6, 0x92, - 0x6C, 0x70, 0x48, 0x50, 0xFD, 0xED, 0xB9, 0xDA, - 0x5E, 0x15, 0x46, 0x57, 0xA7, 0x8D, 0x9D, 0x84, - 0x90, 0xD8, 0xAB, 0x00, 0x8C, 0xBC, 0xD3, 0x0A, - 0xF7, 0xE4, 0x58, 0x05, 0xB8, 0xB3, 0x45, 0x06, - 0xD0, 0x2C, 0x1E, 0x8F, 0xCA, 0x3F, 0x0F, 0x02, - 0xC1, 0xAF, 0xBD, 0x03, 0x01, 0x13, 0x8A, 0x6B, - 0x3A, 0x91, 0x11, 0x41, 0x4F, 0x67, 0xDC, 0xEA, - 0x97, 0xF2, 0xCF, 0xCE, 0xF0, 0xB4, 0xE6, 0x73, - 0x96, 0xAC, 0x74, 0x22, 0xE7, 0xAD, 0x35, 0x85, - 0xE2, 0xF9, 0x37, 0xE8, 0x1C, 0x75, 0xDF, 0x6E, - 0x47, 0xF1, 0x1A, 0x71, 0x1D, 0x29, 0xC5, 0x89, - 0x6F, 0xB7, 0x62, 0x0E, 0xAA, 0x18, 0xBE, 0x1B, - 0xFC, 0x56, 0x3E, 0x4B, 0xC6, 0xD2, 0x79, 0x20, - 0x9A, 0xDB, 0xC0, 0xFE, 0x78, 0xCD, 0x5A, 0xF4, - 0x1F, 0xDD, 0xA8, 0x33, 0x88, 0x07, 0xC7, 0x31, - 0xB1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xEC, 0x5F, - 0x60, 0x51, 0x7F, 0xA9, 0x19, 0xB5, 0x4A, 0x0D, - 0x2D, 0xE5, 0x7A, 0x9F, 0x93, 0xC9, 0x9C, 0xEF, - 0xA0, 0xE0, 0x3B, 0x4D, 0xAE, 0x2A, 0xF5, 0xB0, - 0xC8, 0xEB, 0xBB, 0x3C, 0x83, 0x53, 0x99, 0x61, - 0x17, 0x2B, 0x04, 0x7E, 0xBA, 0x77, 0xD6, 0x26, - 0xE1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0C, 0x7D -}; - -/* - * Reverse tables - */ -#define RT \ -\ - V(50,A7,F4,51), V(53,65,41,7E), V(C3,A4,17,1A), V(96,5E,27,3A), \ - V(CB,6B,AB,3B), V(F1,45,9D,1F), V(AB,58,FA,AC), V(93,03,E3,4B), \ - V(55,FA,30,20), V(F6,6D,76,AD), V(91,76,CC,88), V(25,4C,02,F5), \ - V(FC,D7,E5,4F), V(D7,CB,2A,C5), V(80,44,35,26), V(8F,A3,62,B5), \ - V(49,5A,B1,DE), V(67,1B,BA,25), V(98,0E,EA,45), V(E1,C0,FE,5D), \ - V(02,75,2F,C3), V(12,F0,4C,81), V(A3,97,46,8D), V(C6,F9,D3,6B), \ - V(E7,5F,8F,03), V(95,9C,92,15), V(EB,7A,6D,BF), V(DA,59,52,95), \ - V(2D,83,BE,D4), V(D3,21,74,58), V(29,69,E0,49), V(44,C8,C9,8E), \ - V(6A,89,C2,75), V(78,79,8E,F4), V(6B,3E,58,99), V(DD,71,B9,27), \ - V(B6,4F,E1,BE), V(17,AD,88,F0), V(66,AC,20,C9), V(B4,3A,CE,7D), \ - V(18,4A,DF,63), V(82,31,1A,E5), V(60,33,51,97), V(45,7F,53,62), \ - V(E0,77,64,B1), V(84,AE,6B,BB), V(1C,A0,81,FE), V(94,2B,08,F9), \ - V(58,68,48,70), V(19,FD,45,8F), V(87,6C,DE,94), V(B7,F8,7B,52), \ - V(23,D3,73,AB), V(E2,02,4B,72), V(57,8F,1F,E3), V(2A,AB,55,66), \ - V(07,28,EB,B2), V(03,C2,B5,2F), V(9A,7B,C5,86), V(A5,08,37,D3), \ - V(F2,87,28,30), V(B2,A5,BF,23), V(BA,6A,03,02), V(5C,82,16,ED), \ - V(2B,1C,CF,8A), V(92,B4,79,A7), V(F0,F2,07,F3), V(A1,E2,69,4E), \ - V(CD,F4,DA,65), V(D5,BE,05,06), V(1F,62,34,D1), V(8A,FE,A6,C4), \ - V(9D,53,2E,34), V(A0,55,F3,A2), V(32,E1,8A,05), V(75,EB,F6,A4), \ - V(39,EC,83,0B), V(AA,EF,60,40), V(06,9F,71,5E), V(51,10,6E,BD), \ - V(F9,8A,21,3E), V(3D,06,DD,96), V(AE,05,3E,DD), V(46,BD,E6,4D), \ - V(B5,8D,54,91), V(05,5D,C4,71), V(6F,D4,06,04), V(FF,15,50,60), \ - V(24,FB,98,19), V(97,E9,BD,D6), V(CC,43,40,89), V(77,9E,D9,67), \ - V(BD,42,E8,B0), V(88,8B,89,07), V(38,5B,19,E7), V(DB,EE,C8,79), \ - V(47,0A,7C,A1), V(E9,0F,42,7C), V(C9,1E,84,F8), V(00,00,00,00), \ - V(83,86,80,09), V(48,ED,2B,32), V(AC,70,11,1E), V(4E,72,5A,6C), \ - V(FB,FF,0E,FD), V(56,38,85,0F), V(1E,D5,AE,3D), V(27,39,2D,36), \ - V(64,D9,0F,0A), V(21,A6,5C,68), V(D1,54,5B,9B), V(3A,2E,36,24), \ - V(B1,67,0A,0C), V(0F,E7,57,93), V(D2,96,EE,B4), V(9E,91,9B,1B), \ - V(4F,C5,C0,80), V(A2,20,DC,61), V(69,4B,77,5A), V(16,1A,12,1C), \ - V(0A,BA,93,E2), V(E5,2A,A0,C0), V(43,E0,22,3C), V(1D,17,1B,12), \ - V(0B,0D,09,0E), V(AD,C7,8B,F2), V(B9,A8,B6,2D), V(C8,A9,1E,14), \ - V(85,19,F1,57), V(4C,07,75,AF), V(BB,DD,99,EE), V(FD,60,7F,A3), \ - V(9F,26,01,F7), V(BC,F5,72,5C), V(C5,3B,66,44), V(34,7E,FB,5B), \ - V(76,29,43,8B), V(DC,C6,23,CB), V(68,FC,ED,B6), V(63,F1,E4,B8), \ - V(CA,DC,31,D7), V(10,85,63,42), V(40,22,97,13), V(20,11,C6,84), \ - V(7D,24,4A,85), V(F8,3D,BB,D2), V(11,32,F9,AE), V(6D,A1,29,C7), \ - V(4B,2F,9E,1D), V(F3,30,B2,DC), V(EC,52,86,0D), V(D0,E3,C1,77), \ - V(6C,16,B3,2B), V(99,B9,70,A9), V(FA,48,94,11), V(22,64,E9,47), \ - V(C4,8C,FC,A8), V(1A,3F,F0,A0), V(D8,2C,7D,56), V(EF,90,33,22), \ - V(C7,4E,49,87), V(C1,D1,38,D9), V(FE,A2,CA,8C), V(36,0B,D4,98), \ - V(CF,81,F5,A6), V(28,DE,7A,A5), V(26,8E,B7,DA), V(A4,BF,AD,3F), \ - V(E4,9D,3A,2C), V(0D,92,78,50), V(9B,CC,5F,6A), V(62,46,7E,54), \ - V(C2,13,8D,F6), V(E8,B8,D8,90), V(5E,F7,39,2E), V(F5,AF,C3,82), \ - V(BE,80,5D,9F), V(7C,93,D0,69), V(A9,2D,D5,6F), V(B3,12,25,CF), \ - V(3B,99,AC,C8), V(A7,7D,18,10), V(6E,63,9C,E8), V(7B,BB,3B,DB), \ - V(09,78,26,CD), V(F4,18,59,6E), V(01,B7,9A,EC), V(A8,9A,4F,83), \ - V(65,6E,95,E6), V(7E,E6,FF,AA), V(08,CF,BC,21), V(E6,E8,15,EF), \ - V(D9,9B,E7,BA), V(CE,36,6F,4A), V(D4,09,9F,EA), V(D6,7C,B0,29), \ - V(AF,B2,A4,31), V(31,23,3F,2A), V(30,94,A5,C6), V(C0,66,A2,35), \ - V(37,BC,4E,74), V(A6,CA,82,FC), V(B0,D0,90,E0), V(15,D8,A7,33), \ - V(4A,98,04,F1), V(F7,DA,EC,41), V(0E,50,CD,7F), V(2F,F6,91,17), \ - V(8D,D6,4D,76), V(4D,B0,EF,43), V(54,4D,AA,CC), V(DF,04,96,E4), \ - V(E3,B5,D1,9E), V(1B,88,6A,4C), V(B8,1F,2C,C1), V(7F,51,65,46), \ - V(04,EA,5E,9D), V(5D,35,8C,01), V(73,74,87,FA), V(2E,41,0B,FB), \ - V(5A,1D,67,B3), V(52,D2,DB,92), V(33,56,10,E9), V(13,47,D6,6D), \ - V(8C,61,D7,9A), V(7A,0C,A1,37), V(8E,14,F8,59), V(89,3C,13,EB), \ - V(EE,27,A9,CE), V(35,C9,61,B7), V(ED,E5,1C,E1), V(3C,B1,47,7A), \ - V(59,DF,D2,9C), V(3F,73,F2,55), V(79,CE,14,18), V(BF,37,C7,73), \ - V(EA,CD,F7,53), V(5B,AA,FD,5F), V(14,6F,3D,DF), V(86,DB,44,78), \ - V(81,F3,AF,CA), V(3E,C4,68,B9), V(2C,34,24,38), V(5F,40,A3,C2), \ - V(72,C3,1D,16), V(0C,25,E2,BC), V(8B,49,3C,28), V(41,95,0D,FF), \ - V(71,01,A8,39), V(DE,B3,0C,08), V(9C,E4,B4,D8), V(90,C1,56,64), \ - V(61,84,CB,7B), V(70,B6,32,D5), V(74,5C,6C,48), V(42,57,B8,D0) - -#define V(a,b,c,d) 0x##a##b##c##d -static const uint32_t RT0[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##b##c##d##a -static const uint32_t RT1[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##c##d##a##b -static const uint32_t RT2[256] = { RT }; -#undef V - -#define V(a,b,c,d) 0x##d##a##b##c -static const uint32_t RT3[256] = { RT }; -#undef V - -#undef RT - -/* - * Round constants - */ -static const uint32_t RCON[10] = -{ - 0x00000001, 0x00000002, 0x00000004, 0x00000008, - 0x00000010, 0x00000020, 0x00000040, 0x00000080, - 0x0000001B, 0x00000036 -}; - -#else /* MBEDTLS_AES_ROM_TABLES */ - /* * Forward S-box & tables */ @@ -459,8 +183,6 @@ static void aes_gen_tables( void ) } } -#endif /* MBEDTLS_AES_ROM_TABLES */ - void mbedtls_aes_init( mbedtls_aes_context *ctx ) { memset( ctx, 0, sizeof( mbedtls_aes_context ) ); @@ -484,14 +206,12 @@ int mbedtls_aes_setkey_enc( mbedtls_aes_context *ctx, const unsigned char *key, unsigned int i; uint32_t *RK; -#if !defined(MBEDTLS_AES_ROM_TABLES) if( aes_init_done == 0 ) { aes_gen_tables(); aes_init_done = 1; } -#endif switch( keybits ) { @@ -762,13 +482,6 @@ int mbedtls_internal_aes_encrypt( mbedtls_aes_context *ctx, } #endif /* !MBEDTLS_AES_ENCRYPT_ALT */ -void mbedtls_aes_encrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - mbedtls_internal_aes_encrypt( ctx, input, output ); -} - /* * AES-ECB block decryption */ @@ -828,13 +541,6 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx, } #endif /* !MBEDTLS_AES_DECRYPT_ALT */ -void mbedtls_aes_decrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ) -{ - mbedtls_internal_aes_decrypt( ctx, input, output ); -} - /* * AES-ECB block encryption/decryption */ @@ -1050,456 +756,4 @@ int mbedtls_aes_crypt_ctr( mbedtls_aes_context *ctx, #endif /* !MBEDTLS_AES_ALT */ -#if defined(MBEDTLS_SELF_TEST) -/* - * AES test vectors from: - * - * http://csrc.nist.gov/archive/aes/rijndael/rijndael-vals.zip - */ -static const unsigned char aes_test_ecb_dec[3][16] = -{ - { 0x44, 0x41, 0x6A, 0xC2, 0xD1, 0xF5, 0x3C, 0x58, - 0x33, 0x03, 0x91, 0x7E, 0x6B, 0xE9, 0xEB, 0xE0 }, - { 0x48, 0xE3, 0x1E, 0x9E, 0x25, 0x67, 0x18, 0xF2, - 0x92, 0x29, 0x31, 0x9C, 0x19, 0xF1, 0x5B, 0xA4 }, - { 0x05, 0x8C, 0xCF, 0xFD, 0xBB, 0xCB, 0x38, 0x2D, - 0x1F, 0x6F, 0x56, 0x58, 0x5D, 0x8A, 0x4A, 0xDE } -}; - -static const unsigned char aes_test_ecb_enc[3][16] = -{ - { 0xC3, 0x4C, 0x05, 0x2C, 0xC0, 0xDA, 0x8D, 0x73, - 0x45, 0x1A, 0xFE, 0x5F, 0x03, 0xBE, 0x29, 0x7F }, - { 0xF3, 0xF6, 0x75, 0x2A, 0xE8, 0xD7, 0x83, 0x11, - 0x38, 0xF0, 0x41, 0x56, 0x06, 0x31, 0xB1, 0x14 }, - { 0x8B, 0x79, 0xEE, 0xCC, 0x93, 0xA0, 0xEE, 0x5D, - 0xFF, 0x30, 0xB4, 0xEA, 0x21, 0x63, 0x6D, 0xA4 } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const unsigned char aes_test_cbc_dec[3][16] = -{ - { 0xFA, 0xCA, 0x37, 0xE0, 0xB0, 0xC8, 0x53, 0x73, - 0xDF, 0x70, 0x6E, 0x73, 0xF7, 0xC9, 0xAF, 0x86 }, - { 0x5D, 0xF6, 0x78, 0xDD, 0x17, 0xBA, 0x4E, 0x75, - 0xB6, 0x17, 0x68, 0xC6, 0xAD, 0xEF, 0x7C, 0x7B }, - { 0x48, 0x04, 0xE1, 0x81, 0x8F, 0xE6, 0x29, 0x75, - 0x19, 0xA3, 0xE8, 0x8C, 0x57, 0x31, 0x04, 0x13 } -}; - -static const unsigned char aes_test_cbc_enc[3][16] = -{ - { 0x8A, 0x05, 0xFC, 0x5E, 0x09, 0x5A, 0xF4, 0x84, - 0x8A, 0x08, 0xD3, 0x28, 0xD3, 0x68, 0x8E, 0x3D }, - { 0x7B, 0xD9, 0x66, 0xD5, 0x3A, 0xD8, 0xC1, 0xBB, - 0x85, 0xD2, 0xAD, 0xFA, 0xE8, 0x7B, 0xB1, 0x04 }, - { 0xFE, 0x3C, 0x53, 0x65, 0x3E, 0x2F, 0x45, 0xB5, - 0x6F, 0xCD, 0x88, 0xB2, 0xCC, 0x89, 0x8F, 0xF0 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) -/* - * AES-CFB128 test vectors from: - * - * http://csrc.nist.gov/publications/nistpubs/800-38a/sp800-38a.pdf - */ -static const unsigned char aes_test_cfb128_key[3][32] = -{ - { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C }, - { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B }, - { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 } -}; - -static const unsigned char aes_test_cfb128_iv[16] = -{ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F -}; - -static const unsigned char aes_test_cfb128_pt[64] = -{ - 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A, - 0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C, - 0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51, - 0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11, - 0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF, - 0xF6, 0x9F, 0x24, 0x45, 0xDF, 0x4F, 0x9B, 0x17, - 0xAD, 0x2B, 0x41, 0x7B, 0xE6, 0x6C, 0x37, 0x10 -}; - -static const unsigned char aes_test_cfb128_ct[3][64] = -{ - { 0x3B, 0x3F, 0xD9, 0x2E, 0xB7, 0x2D, 0xAD, 0x20, - 0x33, 0x34, 0x49, 0xF8, 0xE8, 0x3C, 0xFB, 0x4A, - 0xC8, 0xA6, 0x45, 0x37, 0xA0, 0xB3, 0xA9, 0x3F, - 0xCD, 0xE3, 0xCD, 0xAD, 0x9F, 0x1C, 0xE5, 0x8B, - 0x26, 0x75, 0x1F, 0x67, 0xA3, 0xCB, 0xB1, 0x40, - 0xB1, 0x80, 0x8C, 0xF1, 0x87, 0xA4, 0xF4, 0xDF, - 0xC0, 0x4B, 0x05, 0x35, 0x7C, 0x5D, 0x1C, 0x0E, - 0xEA, 0xC4, 0xC6, 0x6F, 0x9F, 0xF7, 0xF2, 0xE6 }, - { 0xCD, 0xC8, 0x0D, 0x6F, 0xDD, 0xF1, 0x8C, 0xAB, - 0x34, 0xC2, 0x59, 0x09, 0xC9, 0x9A, 0x41, 0x74, - 0x67, 0xCE, 0x7F, 0x7F, 0x81, 0x17, 0x36, 0x21, - 0x96, 0x1A, 0x2B, 0x70, 0x17, 0x1D, 0x3D, 0x7A, - 0x2E, 0x1E, 0x8A, 0x1D, 0xD5, 0x9B, 0x88, 0xB1, - 0xC8, 0xE6, 0x0F, 0xED, 0x1E, 0xFA, 0xC4, 0xC9, - 0xC0, 0x5F, 0x9F, 0x9C, 0xA9, 0x83, 0x4F, 0xA0, - 0x42, 0xAE, 0x8F, 0xBA, 0x58, 0x4B, 0x09, 0xFF }, - { 0xDC, 0x7E, 0x84, 0xBF, 0xDA, 0x79, 0x16, 0x4B, - 0x7E, 0xCD, 0x84, 0x86, 0x98, 0x5D, 0x38, 0x60, - 0x39, 0xFF, 0xED, 0x14, 0x3B, 0x28, 0xB1, 0xC8, - 0x32, 0x11, 0x3C, 0x63, 0x31, 0xE5, 0x40, 0x7B, - 0xDF, 0x10, 0x13, 0x24, 0x15, 0xE5, 0x4B, 0x92, - 0xA1, 0x3E, 0xD0, 0xA8, 0x26, 0x7A, 0xE2, 0xF9, - 0x75, 0xA3, 0x85, 0x74, 0x1A, 0xB9, 0xCE, 0xF8, - 0x20, 0x31, 0x62, 0x3D, 0x55, 0xB1, 0xE4, 0x71 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * AES-CTR test vectors from: - * - * http://www.faqs.org/rfcs/rfc3686.html - */ - -static const unsigned char aes_test_ctr_key[3][16] = -{ - { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, - 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E }, - { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7, - 0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63 }, - { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8, - 0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC } -}; - -static const unsigned char aes_test_ctr_nonce_counter[3][16] = -{ - { 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59, - 0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0xE0, 0x01, 0x7B, 0x27, 0x77, 0x7F, 0x3F, - 0x4A, 0x17, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x01 } -}; - -static const unsigned char aes_test_ctr_pt[3][48] = -{ - { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62, - 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23 } -}; - -static const unsigned char aes_test_ctr_ct[3][48] = -{ - { 0xE4, 0x09, 0x5D, 0x4F, 0xB7, 0xA7, 0xB3, 0x79, - 0x2D, 0x61, 0x75, 0xA3, 0x26, 0x13, 0x11, 0xB8 }, - { 0x51, 0x04, 0xA1, 0x06, 0x16, 0x8A, 0x72, 0xD9, - 0x79, 0x0D, 0x41, 0xEE, 0x8E, 0xDA, 0xD3, 0x88, - 0xEB, 0x2E, 0x1E, 0xFC, 0x46, 0xDA, 0x57, 0xC8, - 0xFC, 0xE6, 0x30, 0xDF, 0x91, 0x41, 0xBE, 0x28 }, - { 0xC1, 0xCF, 0x48, 0xA8, 0x9F, 0x2F, 0xFD, 0xD9, - 0xCF, 0x46, 0x52, 0xE9, 0xEF, 0xDB, 0x72, 0xD7, - 0x45, 0x40, 0xA4, 0x2B, 0xDE, 0x6D, 0x78, 0x36, - 0xD5, 0x9A, 0x5C, 0xEA, 0xAE, 0xF3, 0x10, 0x53, - 0x25, 0xB2, 0x07, 0x2F } -}; - -static const int aes_test_ctr_len[3] = - { 16, 32, 36 }; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -/* - * Checkup routine - */ -int mbedtls_aes_self_test( int verbose ) -{ - int ret = 0, i, j, u, v; - unsigned char key[32]; - unsigned char buf[64]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) || defined(MBEDTLS_CIPHER_MODE_CFB) - unsigned char iv[16]; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char prv[16]; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) || defined(MBEDTLS_CIPHER_MODE_CFB) - size_t offset; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - int len; - unsigned char nonce_counter[16]; - unsigned char stream_block[16]; -#endif - mbedtls_aes_context ctx; - - memset( key, 0, 32 ); - mbedtls_aes_init( &ctx ); - - /* - * ECB mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-ECB-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memset( buf, 0, 16 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - mbedtls_aes_setkey_dec( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_ecb( &ctx, v, buf, buf ); - - if( memcmp( buf, aes_test_ecb_dec[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_ecb( &ctx, v, buf, buf ); - - if( memcmp( buf, aes_test_ecb_enc[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CBC-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memset( iv , 0, 16 ); - memset( prv, 0, 16 ); - memset( buf, 0, 16 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - mbedtls_aes_setkey_dec( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - mbedtls_aes_crypt_cbc( &ctx, v, 16, iv, buf, buf ); - - if( memcmp( buf, aes_test_cbc_dec[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - for( j = 0; j < 10000; j++ ) - { - unsigned char tmp[16]; - - mbedtls_aes_crypt_cbc( &ctx, v, 16, iv, buf, buf ); - - memcpy( tmp, prv, 16 ); - memcpy( prv, buf, 16 ); - memcpy( buf, tmp, 16 ); - } - - if( memcmp( prv, aes_test_cbc_enc[u], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CFB) - /* - * CFB128 mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CFB128-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( iv, aes_test_cfb128_iv, 16 ); - memcpy( key, aes_test_cfb128_key[u], 16 + u * 8 ); - - offset = 0; - mbedtls_aes_setkey_enc( &ctx, key, 128 + u * 64 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - memcpy( buf, aes_test_cfb128_ct[u], 64 ); - mbedtls_aes_crypt_cfb128( &ctx, v, 64, &offset, iv, buf, buf ); - - if( memcmp( buf, aes_test_cfb128_pt, 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - memcpy( buf, aes_test_cfb128_pt, 64 ); - mbedtls_aes_crypt_cfb128( &ctx, v, 64, &offset, iv, buf, buf ); - - if( memcmp( buf, aes_test_cfb128_ct[u], 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CFB */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - /* - * CTR mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " AES-CTR-128 (%s): ", - ( v == MBEDTLS_AES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( nonce_counter, aes_test_ctr_nonce_counter[u], 16 ); - memcpy( key, aes_test_ctr_key[u], 16 ); - - offset = 0; - mbedtls_aes_setkey_enc( &ctx, key, 128 ); - - if( v == MBEDTLS_AES_DECRYPT ) - { - len = aes_test_ctr_len[u]; - memcpy( buf, aes_test_ctr_ct[u], len ); - - mbedtls_aes_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, aes_test_ctr_pt[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - else - { - len = aes_test_ctr_len[u]; - memcpy( buf, aes_test_ctr_pt[u], len ); - - mbedtls_aes_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, aes_test_ctr_ct[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - - ret = 0; - -exit: - mbedtls_aes_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_AES_C */ diff --git a/deps/mbedtls/arc4.c b/deps/mbedtls/arc4.c index 26954c6f35..b909552c78 100644 --- a/deps/mbedtls/arc4.c +++ b/deps/mbedtls/arc4.c @@ -36,15 +36,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_ARC4_ALT) #include "arc4_alt.h" @@ -126,77 +117,4 @@ int mbedtls_arc4_crypt( mbedtls_arc4_context *ctx, size_t length, const unsigned #endif /* !MBEDTLS_ARC4_ALT */ -#if defined(MBEDTLS_SELF_TEST) -/* - * ARC4 tests vectors as posted by Eric Rescorla in sep. 1994: - * - * http://groups.google.com/group/comp.security.misc/msg/10a300c9d21afca0 - */ -static const unsigned char arc4_test_key[3][8] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char arc4_test_pt[3][8] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char arc4_test_ct[3][8] = -{ - { 0x75, 0xB7, 0x87, 0x80, 0x99, 0xE0, 0xC5, 0x96 }, - { 0x74, 0x94, 0xC2, 0xE7, 0x10, 0x4B, 0x08, 0x79 }, - { 0xDE, 0x18, 0x89, 0x41, 0xA3, 0x37, 0x5D, 0x3A } -}; - -/* - * Checkup routine - */ -int mbedtls_arc4_self_test( int verbose ) -{ - int i, ret = 0; - unsigned char ibuf[8]; - unsigned char obuf[8]; - mbedtls_arc4_context ctx; - - mbedtls_arc4_init( &ctx ); - - for( i = 0; i < 3; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " ARC4 test #%d: ", i + 1 ); - - memcpy( ibuf, arc4_test_pt[i], 8 ); - - mbedtls_arc4_setup( &ctx, arc4_test_key[i], 8 ); - mbedtls_arc4_crypt( &ctx, 8, ibuf, obuf ); - - if( memcmp( obuf, arc4_test_ct[i], 8 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_arc4_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_ARC4_C */ diff --git a/deps/mbedtls/asn1parse.c b/deps/mbedtls/asn1parse.c index 0e5b28eac0..1a519f5b3e 100644 --- a/deps/mbedtls/asn1parse.c +++ b/deps/mbedtls/asn1parse.c @@ -35,13 +35,7 @@ #include "mbedtls/bignum.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #include "arc4_alt.h" @@ -266,7 +260,7 @@ int mbedtls_asn1_get_sequence_of( unsigned char **p, /* Allocate and assign next pointer */ if( *p < end ) { - cur->next = (mbedtls_asn1_sequence*)mbedtls_calloc( 1, + cur->next = (mbedtls_asn1_sequence*)calloc( 1, sizeof( mbedtls_asn1_sequence ) ); if( cur->next == NULL ) @@ -352,8 +346,8 @@ void mbedtls_asn1_free_named_data( mbedtls_asn1_named_data *cur ) if( cur == NULL ) return; - mbedtls_free( cur->oid.p ); - mbedtls_free( cur->val.p ); + free( cur->oid.p ); + free( cur->val.p ); mbedtls_zeroize( cur, sizeof( mbedtls_asn1_named_data ) ); } @@ -366,7 +360,7 @@ void mbedtls_asn1_free_named_data_list( mbedtls_asn1_named_data **head ) { *head = cur->next; mbedtls_asn1_free_named_data( cur ); - mbedtls_free( cur ); + free( cur ); } } diff --git a/deps/mbedtls/asn1write.c b/deps/mbedtls/asn1write.c index effb78a6db..b48d87085f 100644 --- a/deps/mbedtls/asn1write.c +++ b/deps/mbedtls/asn1write.c @@ -30,14 +30,7 @@ #include "mbedtls/asn1write.h" #include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif int mbedtls_asn1_write_len( unsigned char **p, unsigned char *start, size_t len ) { @@ -334,27 +327,27 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data if( ( cur = mbedtls_asn1_find_named_data( *head, oid, oid_len ) ) == NULL ) { /* Add new entry if not present yet based on OID */ - cur = (mbedtls_asn1_named_data*)mbedtls_calloc( 1, + cur = (mbedtls_asn1_named_data*)calloc( 1, sizeof(mbedtls_asn1_named_data) ); if( cur == NULL ) return( NULL ); cur->oid.len = oid_len; - cur->oid.p = (unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)mbedtls_calloc( 1, oid_len ); + cur->oid.p = (unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)(unsigned char*)calloc( 1, oid_len ); if( cur->oid.p == NULL ) { - mbedtls_free( cur ); + free( cur ); return( NULL ); } memcpy( cur->oid.p, oid, oid_len ); cur->val.len = val_len; - cur->val.p = (unsigned char*)mbedtls_calloc( 1, val_len ); + cur->val.p = (unsigned char*)calloc( 1, val_len ); if( cur->val.p == NULL ) { - mbedtls_free( cur->oid.p ); - mbedtls_free( cur ); + free( cur->oid.p ); + free( cur ); return( NULL ); } @@ -368,11 +361,11 @@ mbedtls_asn1_named_data *mbedtls_asn1_store_named_data( mbedtls_asn1_named_data * Preserve old data until the allocation succeeded, to leave list in * a consistent state in case allocation fails. */ - void *p = mbedtls_calloc( 1, val_len ); + void *p = calloc( 1, val_len ); if( p == NULL ) return( NULL ); - mbedtls_free( cur->val.p ); + free( cur->val.p ); cur->val.p = (unsigned char*)p; cur->val.len = val_len; } diff --git a/deps/mbedtls/base64.c b/deps/mbedtls/base64.c index f06b57b31f..af1ea2395b 100644 --- a/deps/mbedtls/base64.c +++ b/deps/mbedtls/base64.c @@ -31,16 +31,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#include -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - static const unsigned char base64_enc_map[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', @@ -227,67 +217,4 @@ int mbedtls_base64_decode( unsigned char *dst, size_t dlen, size_t *olen, return( 0 ); } -#if defined(MBEDTLS_SELF_TEST) - -static const unsigned char base64_test_dec[64] = -{ - 0x24, 0x48, 0x6E, 0x56, 0x87, 0x62, 0x5A, 0xBD, - 0xBF, 0x17, 0xD9, 0xA2, 0xC4, 0x17, 0x1A, 0x01, - 0x94, 0xED, 0x8F, 0x1E, 0x11, 0xB3, 0xD7, 0x09, - 0x0C, 0xB6, 0xE9, 0x10, 0x6F, 0x22, 0xEE, 0x13, - 0xCA, 0xB3, 0x07, 0x05, 0x76, 0xC9, 0xFA, 0x31, - 0x6C, 0x08, 0x34, 0xFF, 0x8D, 0xC2, 0x6C, 0x38, - 0x00, 0x43, 0xE9, 0x54, 0x97, 0xAF, 0x50, 0x4B, - 0xD1, 0x41, 0xBA, 0x95, 0x31, 0x5A, 0x0B, 0x97 -}; - -static const unsigned char base64_test_enc[] = - "JEhuVodiWr2/F9mixBcaAZTtjx4Rs9cJDLbpEG8i7hPK" - "swcFdsn6MWwINP+Nwmw4AEPpVJevUEvRQbqVMVoLlw=="; - -/* - * Checkup routine - */ -int mbedtls_base64_self_test( int verbose ) -{ - size_t len; - const unsigned char *src; - unsigned char buffer[128]; - - if( verbose != 0 ) - mbedtls_printf( " Base64 encoding test: " ); - - src = base64_test_dec; - - if( mbedtls_base64_encode( buffer, sizeof( buffer ), &len, src, 64 ) != 0 || - memcmp( base64_test_enc, buffer, 88 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n Base64 decoding test: " ); - - src = base64_test_enc; - - if( mbedtls_base64_decode( buffer, sizeof( buffer ), &len, src, 88 ) != 0 || - memcmp( base64_test_dec, buffer, 64 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_BASE64_C */ diff --git a/deps/mbedtls/bignum.c b/deps/mbedtls/bignum.c index d3a150c3c1..d887d2928a 100644 --- a/deps/mbedtls/bignum.c +++ b/deps/mbedtls/bignum.c @@ -48,15 +48,8 @@ #include -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif /* Implementation that should never be optimized out by the compiler */ static void mbedtls_mpi_zeroize( mbedtls_mpi_uint *v, size_t n ) { @@ -100,7 +93,7 @@ void mbedtls_mpi_free( mbedtls_mpi *X ) if( X->p != NULL ) { mbedtls_mpi_zeroize( X->p, X->n ); - mbedtls_free( X->p ); + free( X->p ); } X->s = 1; @@ -120,14 +113,14 @@ int mbedtls_mpi_grow( mbedtls_mpi *X, size_t nblimbs ) if( X->n < nblimbs ) { - if( ( p = (mbedtls_mpi_uint*)mbedtls_calloc( nblimbs, ciL ) ) == NULL ) + if( ( p = (mbedtls_mpi_uint*)calloc( nblimbs, ciL ) ) == NULL ) return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); if( X->p != NULL ) { memcpy( p, X->p, X->n * ciL ); mbedtls_mpi_zeroize( X->p, X->n ); - mbedtls_free( X->p ); + free( X->p ); } X->n = nblimbs; @@ -158,14 +151,14 @@ int mbedtls_mpi_shrink( mbedtls_mpi *X, size_t nblimbs ) if( i < nblimbs ) i = nblimbs; - if( ( p = (mbedtls_mpi_uint*)mbedtls_calloc( i, ciL ) ) == NULL ) + if( ( p = (mbedtls_mpi_uint*)calloc( i, ciL ) ) == NULL ) return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); if( X->p != NULL ) { memcpy( p, X->p, i * ciL ); mbedtls_mpi_zeroize( X->p, X->n ); - mbedtls_free( X->p ); + free( X->p ); } X->n = i; @@ -658,7 +651,7 @@ int mbedtls_mpi_write_file( const char *p, const mbedtls_mpi *X, int radix, FILE return( MBEDTLS_ERR_MPI_FILE_IO_ERROR ); } else - mbedtls_printf( "%s%s", p, s ); + printf( "%s%s", p, s ); cleanup: @@ -2270,178 +2263,4 @@ cleanup: #endif /* MBEDTLS_GENPRIME */ -#if defined(MBEDTLS_SELF_TEST) - -#define GCD_PAIR_COUNT 3 - -static const int gcd_pairs[GCD_PAIR_COUNT][3] = -{ - { 693, 609, 21 }, - { 1764, 868, 28 }, - { 768454923, 542167814, 1 } -}; - -/* - * Checkup routine - */ -int mbedtls_mpi_self_test( int verbose ) -{ - int ret, i; - mbedtls_mpi A, E, N, X, Y, U, V; - - mbedtls_mpi_init( &A ); mbedtls_mpi_init( &E ); mbedtls_mpi_init( &N ); mbedtls_mpi_init( &X ); - mbedtls_mpi_init( &Y ); mbedtls_mpi_init( &U ); mbedtls_mpi_init( &V ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &A, 16, - "EFE021C2645FD1DC586E69184AF4A31E" \ - "D5F53E93B5F123FA41680867BA110131" \ - "944FE7952E2517337780CB0DB80E61AA" \ - "E7C8DDC6C5C6AADEB34EB38A2F40D5E6" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &E, 16, - "B2E7EFD37075B9F03FF989C7C5051C20" \ - "34D2A323810251127E7BF8625A4F49A5" \ - "F3E27F4DA8BD59C47D6DAABA4C8127BD" \ - "5B5C25763222FEFCCFC38B832366C29E" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &N, 16, - "0066A198186C18C10B2F5ED9B522752A" \ - "9830B69916E535C8F047518A889A43A5" \ - "94B6BED27A168D31D4A52F88925AA8F5" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &X, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "602AB7ECA597A3D6B56FF9829A5E8B85" \ - "9E857EA95A03512E2BAE7391688D264A" \ - "A5663B0341DB9CCFD2C4C5F421FEC814" \ - "8001B72E848A38CAE1C65F78E56ABDEF" \ - "E12D3C039B8A02D6BE593F0BBBDA56F1" \ - "ECF677152EF804370C1A305CAF3B5BF1" \ - "30879B56C61DE584A0F53A2447A51E" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #1 (mul_mpi): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_div_mpi( &X, &Y, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "256567336059E52CAE22925474705F39A94" ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &V, 16, - "6613F26162223DF488E9CD48CC132C7A" \ - "0AC93C701B001B092E4E5B9F73BCD27B" \ - "9EE50D0657C77F374E903CDFA4C642" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #2 (div_mpi): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 || - mbedtls_mpi_cmp_mpi( &Y, &V ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &X, &A, &E, &N, NULL ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "36E139AEA55215609D2816998ED020BB" \ - "BD96C37890F65171D948E9BC7CBAA4D9" \ - "325D24D6A3C12710F10A09FA08AB87" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #3 (exp_mod): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &X, &A, &N ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &U, 16, - "003A0AAEDD7E784FC07D8F9EC6E3BFD5" \ - "C3DBA76456363A10869622EAC2DD84EC" \ - "C5B8A74DAC4D09E03B5E0BE779F2DF61" ) ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #4 (inv_mod): " ); - - if( mbedtls_mpi_cmp_mpi( &X, &U ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MPI test #5 (simple gcd): " ); - - for( i = 0; i < GCD_PAIR_COUNT; i++ ) - { - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &X, gcd_pairs[i][0] ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &Y, gcd_pairs[i][1] ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &A, &X, &Y ) ); - - if( mbedtls_mpi_cmp_int( &A, gcd_pairs[i][2] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed at %d\n", i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - - if( ret != 0 && verbose != 0 ) - mbedtls_printf( "Unexpected error, return code = %08X\n", ret ); - - mbedtls_mpi_free( &A ); mbedtls_mpi_free( &E ); mbedtls_mpi_free( &N ); mbedtls_mpi_free( &X ); - mbedtls_mpi_free( &Y ); mbedtls_mpi_free( &U ); mbedtls_mpi_free( &V ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_BIGNUM_C */ diff --git a/deps/mbedtls/camellia.c b/deps/mbedtls/camellia.c index f8debc0744..de40f614d0 100644 --- a/deps/mbedtls/camellia.c +++ b/deps/mbedtls/camellia.c @@ -37,15 +37,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_CAMELLIA_ALT) #include "arc4_alt.h" @@ -688,382 +679,4 @@ int mbedtls_camellia_crypt_ctr( mbedtls_camellia_context *ctx, #endif /* MBEDTLS_CIPHER_MODE_CTR */ #endif /* !MBEDTLS_CAMELLIA_ALT */ -#if defined(MBEDTLS_SELF_TEST) - -/* - * Camellia test vectors from: - * - * http://info.isl.ntt.co.jp/crypt/eng/camellia/technology.html: - * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/cryptrec/intermediate.txt - * http://info.isl.ntt.co.jp/crypt/eng/camellia/dl/cryptrec/t_camellia.txt - * (For each bitlength: Key 0, Nr 39) - */ -#define CAMELLIA_TESTS_ECB 2 - -static const unsigned char camellia_test_ecb_key[3][CAMELLIA_TESTS_ECB][32] = -{ - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, - { - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10, - 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } - }, -}; - -static const unsigned char camellia_test_ecb_plain[CAMELLIA_TESTS_ECB][16] = -{ - { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 }, - { 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char camellia_test_ecb_cipher[3][CAMELLIA_TESTS_ECB][16] = -{ - { - { 0x67, 0x67, 0x31, 0x38, 0x54, 0x96, 0x69, 0x73, - 0x08, 0x57, 0x06, 0x56, 0x48, 0xea, 0xbe, 0x43 }, - { 0x38, 0x3C, 0x6C, 0x2A, 0xAB, 0xEF, 0x7F, 0xDE, - 0x25, 0xCD, 0x47, 0x0B, 0xF7, 0x74, 0xA3, 0x31 } - }, - { - { 0xb4, 0x99, 0x34, 0x01, 0xb3, 0xe9, 0x96, 0xf8, - 0x4e, 0xe5, 0xce, 0xe7, 0xd7, 0x9b, 0x09, 0xb9 }, - { 0xD1, 0x76, 0x3F, 0xC0, 0x19, 0xD7, 0x7C, 0xC9, - 0x30, 0xBF, 0xF2, 0xA5, 0x6F, 0x7C, 0x93, 0x64 } - }, - { - { 0x9a, 0xcc, 0x23, 0x7d, 0xff, 0x16, 0xd7, 0x6c, - 0x20, 0xef, 0x7c, 0x91, 0x9e, 0x3a, 0x75, 0x09 }, - { 0x05, 0x03, 0xFB, 0x10, 0xAB, 0x24, 0x1E, 0x7C, - 0xF4, 0x5D, 0x8C, 0xDE, 0xEE, 0x47, 0x43, 0x35 } - } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -#define CAMELLIA_TESTS_CBC 3 - -static const unsigned char camellia_test_cbc_key[3][32] = -{ - { 0x2B, 0x7E, 0x15, 0x16, 0x28, 0xAE, 0xD2, 0xA6, - 0xAB, 0xF7, 0x15, 0x88, 0x09, 0xCF, 0x4F, 0x3C } - , - { 0x8E, 0x73, 0xB0, 0xF7, 0xDA, 0x0E, 0x64, 0x52, - 0xC8, 0x10, 0xF3, 0x2B, 0x80, 0x90, 0x79, 0xE5, - 0x62, 0xF8, 0xEA, 0xD2, 0x52, 0x2C, 0x6B, 0x7B } - , - { 0x60, 0x3D, 0xEB, 0x10, 0x15, 0xCA, 0x71, 0xBE, - 0x2B, 0x73, 0xAE, 0xF0, 0x85, 0x7D, 0x77, 0x81, - 0x1F, 0x35, 0x2C, 0x07, 0x3B, 0x61, 0x08, 0xD7, - 0x2D, 0x98, 0x10, 0xA3, 0x09, 0x14, 0xDF, 0xF4 } -}; - -static const unsigned char camellia_test_cbc_iv[16] = - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F } -; - -static const unsigned char camellia_test_cbc_plain[CAMELLIA_TESTS_CBC][16] = -{ - { 0x6B, 0xC1, 0xBE, 0xE2, 0x2E, 0x40, 0x9F, 0x96, - 0xE9, 0x3D, 0x7E, 0x11, 0x73, 0x93, 0x17, 0x2A }, - { 0xAE, 0x2D, 0x8A, 0x57, 0x1E, 0x03, 0xAC, 0x9C, - 0x9E, 0xB7, 0x6F, 0xAC, 0x45, 0xAF, 0x8E, 0x51 }, - { 0x30, 0xC8, 0x1C, 0x46, 0xA3, 0x5C, 0xE4, 0x11, - 0xE5, 0xFB, 0xC1, 0x19, 0x1A, 0x0A, 0x52, 0xEF } - -}; - -static const unsigned char camellia_test_cbc_cipher[3][CAMELLIA_TESTS_CBC][16] = -{ - { - { 0x16, 0x07, 0xCF, 0x49, 0x4B, 0x36, 0xBB, 0xF0, - 0x0D, 0xAE, 0xB0, 0xB5, 0x03, 0xC8, 0x31, 0xAB }, - { 0xA2, 0xF2, 0xCF, 0x67, 0x16, 0x29, 0xEF, 0x78, - 0x40, 0xC5, 0xA5, 0xDF, 0xB5, 0x07, 0x48, 0x87 }, - { 0x0F, 0x06, 0x16, 0x50, 0x08, 0xCF, 0x8B, 0x8B, - 0x5A, 0x63, 0x58, 0x63, 0x62, 0x54, 0x3E, 0x54 } - }, - { - { 0x2A, 0x48, 0x30, 0xAB, 0x5A, 0xC4, 0xA1, 0xA2, - 0x40, 0x59, 0x55, 0xFD, 0x21, 0x95, 0xCF, 0x93 }, - { 0x5D, 0x5A, 0x86, 0x9B, 0xD1, 0x4C, 0xE5, 0x42, - 0x64, 0xF8, 0x92, 0xA6, 0xDD, 0x2E, 0xC3, 0xD5 }, - { 0x37, 0xD3, 0x59, 0xC3, 0x34, 0x98, 0x36, 0xD8, - 0x84, 0xE3, 0x10, 0xAD, 0xDF, 0x68, 0xC4, 0x49 } - }, - { - { 0xE6, 0xCF, 0xA3, 0x5F, 0xC0, 0x2B, 0x13, 0x4A, - 0x4D, 0x2C, 0x0B, 0x67, 0x37, 0xAC, 0x3E, 0xDA }, - { 0x36, 0xCB, 0xEB, 0x73, 0xBD, 0x50, 0x4B, 0x40, - 0x70, 0xB1, 0xB7, 0xDE, 0x2B, 0x21, 0xEB, 0x50 }, - { 0xE3, 0x1A, 0x60, 0x55, 0x29, 0x7D, 0x96, 0xCA, - 0x33, 0x30, 0xCD, 0xF1, 0xB1, 0x86, 0x0A, 0x83 } - } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -#if defined(MBEDTLS_CIPHER_MODE_CTR) -/* - * Camellia-CTR test vectors from: - * - * http://www.faqs.org/rfcs/rfc5528.html - */ - -static const unsigned char camellia_test_ctr_key[3][16] = -{ - { 0xAE, 0x68, 0x52, 0xF8, 0x12, 0x10, 0x67, 0xCC, - 0x4B, 0xF7, 0xA5, 0x76, 0x55, 0x77, 0xF3, 0x9E }, - { 0x7E, 0x24, 0x06, 0x78, 0x17, 0xFA, 0xE0, 0xD7, - 0x43, 0xD6, 0xCE, 0x1F, 0x32, 0x53, 0x91, 0x63 }, - { 0x76, 0x91, 0xBE, 0x03, 0x5E, 0x50, 0x20, 0xA8, - 0xAC, 0x6E, 0x61, 0x85, 0x29, 0xF9, 0xA0, 0xDC } -}; - -static const unsigned char camellia_test_ctr_nonce_counter[3][16] = -{ - { 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0x6C, 0xB6, 0xDB, 0xC0, 0x54, 0x3B, 0x59, - 0xDA, 0x48, 0xD9, 0x0B, 0x00, 0x00, 0x00, 0x01 }, - { 0x00, 0xE0, 0x01, 0x7B, 0x27, 0x77, 0x7F, 0x3F, - 0x4A, 0x17, 0x86, 0xF0, 0x00, 0x00, 0x00, 0x01 } -}; - -static const unsigned char camellia_test_ctr_pt[3][48] = -{ - { 0x53, 0x69, 0x6E, 0x67, 0x6C, 0x65, 0x20, 0x62, - 0x6C, 0x6F, 0x63, 0x6B, 0x20, 0x6D, 0x73, 0x67 }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F }, - - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F, - 0x20, 0x21, 0x22, 0x23 } -}; - -static const unsigned char camellia_test_ctr_ct[3][48] = -{ - { 0xD0, 0x9D, 0xC2, 0x9A, 0x82, 0x14, 0x61, 0x9A, - 0x20, 0x87, 0x7C, 0x76, 0xDB, 0x1F, 0x0B, 0x3F }, - { 0xDB, 0xF3, 0xC7, 0x8D, 0xC0, 0x83, 0x96, 0xD4, - 0xDA, 0x7C, 0x90, 0x77, 0x65, 0xBB, 0xCB, 0x44, - 0x2B, 0x8E, 0x8E, 0x0F, 0x31, 0xF0, 0xDC, 0xA7, - 0x2C, 0x74, 0x17, 0xE3, 0x53, 0x60, 0xE0, 0x48 }, - { 0xB1, 0x9D, 0x1F, 0xCD, 0xCB, 0x75, 0xEB, 0x88, - 0x2F, 0x84, 0x9C, 0xE2, 0x4D, 0x85, 0xCF, 0x73, - 0x9C, 0xE6, 0x4B, 0x2B, 0x5C, 0x9D, 0x73, 0xF1, - 0x4F, 0x2D, 0x5D, 0x9D, 0xCE, 0x98, 0x89, 0xCD, - 0xDF, 0x50, 0x86, 0x96 } -}; - -static const int camellia_test_ctr_len[3] = - { 16, 32, 36 }; -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - -/* - * Checkup routine - */ -int mbedtls_camellia_self_test( int verbose ) -{ - int i, j, u, v; - unsigned char key[32]; - unsigned char buf[64]; - unsigned char src[16]; - unsigned char dst[16]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char iv[16]; -#endif -#if defined(MBEDTLS_CIPHER_MODE_CTR) - size_t offset, len; - unsigned char nonce_counter[16]; - unsigned char stream_block[16]; -#endif - - mbedtls_camellia_context ctx; - - memset( key, 0, 32 ); - - for( j = 0; j < 6; j++ ) { - u = j >> 1; - v = j & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-ECB-%3d (%s): ", 128 + u * 64, - (v == MBEDTLS_CAMELLIA_DECRYPT) ? "dec" : "enc"); - - for( i = 0; i < CAMELLIA_TESTS_ECB; i++ ) { - memcpy( key, camellia_test_ecb_key[u][i], 16 + 8 * u ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - mbedtls_camellia_setkey_dec( &ctx, key, 128 + u * 64 ); - memcpy( src, camellia_test_ecb_cipher[u][i], 16 ); - memcpy( dst, camellia_test_ecb_plain[i], 16 ); - } else { /* MBEDTLS_CAMELLIA_ENCRYPT */ - mbedtls_camellia_setkey_enc( &ctx, key, 128 + u * 64 ); - memcpy( src, camellia_test_ecb_plain[i], 16 ); - memcpy( dst, camellia_test_ecb_cipher[u][i], 16 ); - } - - mbedtls_camellia_crypt_ecb( &ctx, v, src, buf ); - - if( memcmp( buf, dst, 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( j = 0; j < 6; j++ ) - { - u = j >> 1; - v = j & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-CBC-%3d (%s): ", 128 + u * 64, - ( v == MBEDTLS_CAMELLIA_DECRYPT ) ? "dec" : "enc" ); - - memcpy( src, camellia_test_cbc_iv, 16 ); - memcpy( dst, camellia_test_cbc_iv, 16 ); - memcpy( key, camellia_test_cbc_key[u], 16 + 8 * u ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - mbedtls_camellia_setkey_dec( &ctx, key, 128 + u * 64 ); - } else { - mbedtls_camellia_setkey_enc( &ctx, key, 128 + u * 64 ); - } - - for( i = 0; i < CAMELLIA_TESTS_CBC; i++ ) { - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) { - memcpy( iv , src, 16 ); - memcpy( src, camellia_test_cbc_cipher[u][i], 16 ); - memcpy( dst, camellia_test_cbc_plain[i], 16 ); - } else { /* MBEDTLS_CAMELLIA_ENCRYPT */ - memcpy( iv , dst, 16 ); - memcpy( src, camellia_test_cbc_plain[i], 16 ); - memcpy( dst, camellia_test_cbc_cipher[u][i], 16 ); - } - - mbedtls_camellia_crypt_cbc( &ctx, v, 16, iv, src, buf ); - - if( memcmp( buf, dst, 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CTR) - /* - * CTR mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " CAMELLIA-CTR-128 (%s): ", - ( v == MBEDTLS_CAMELLIA_DECRYPT ) ? "dec" : "enc" ); - - memcpy( nonce_counter, camellia_test_ctr_nonce_counter[u], 16 ); - memcpy( key, camellia_test_ctr_key[u], 16 ); - - offset = 0; - mbedtls_camellia_setkey_enc( &ctx, key, 128 ); - - if( v == MBEDTLS_CAMELLIA_DECRYPT ) - { - len = camellia_test_ctr_len[u]; - memcpy( buf, camellia_test_ctr_ct[u], len ); - - mbedtls_camellia_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, camellia_test_ctr_pt[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - len = camellia_test_ctr_len[u]; - memcpy( buf, camellia_test_ctr_pt[u], len ); - - mbedtls_camellia_crypt_ctr( &ctx, len, &offset, nonce_counter, stream_block, - buf, buf ); - - if( memcmp( buf, camellia_test_ctr_ct[u], len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); -#endif /* MBEDTLS_CIPHER_MODE_CTR */ - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_CAMELLIA_C */ diff --git a/deps/mbedtls/ccm.c b/deps/mbedtls/ccm.c index a899ceecc7..3c0c912095 100644 --- a/deps/mbedtls/ccm.c +++ b/deps/mbedtls/ccm.c @@ -40,15 +40,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - #include "arc4_alt.h" #define CCM_ENCRYPT 0 @@ -345,117 +336,4 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length, return( 0 ); } - -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/* - * Examples 1 to 3 from SP800-38C Appendix C - */ - -#define NB_TESTS 3 - -/* - * The data is the same for all tests, only the used length changes - */ -static const unsigned char ccm_key[] = { - 0x40, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, - 0x48, 0x49, 0x4a, 0x4b, 0x4c, 0x4d, 0x4e, 0x4f -}; - -static const unsigned char iv[] = { - 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, - 0x18, 0x19, 0x1a, 0x1b -}; - -static const unsigned char ad[] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13 -}; - -static const unsigned char msg[] = { - 0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, - 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, - 0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, -}; - -static const size_t iv_len [NB_TESTS] = { 7, 8, 12 }; -static const size_t add_len[NB_TESTS] = { 8, 16, 20 }; -static const size_t msg_len[NB_TESTS] = { 4, 16, 24 }; -static const size_t tag_len[NB_TESTS] = { 4, 6, 8 }; - -static const unsigned char res[NB_TESTS][32] = { - { 0x71, 0x62, 0x01, 0x5b, 0x4d, 0xac, 0x25, 0x5d }, - { 0xd2, 0xa1, 0xf0, 0xe0, 0x51, 0xea, 0x5f, 0x62, - 0x08, 0x1a, 0x77, 0x92, 0x07, 0x3d, 0x59, 0x3d, - 0x1f, 0xc6, 0x4f, 0xbf, 0xac, 0xcd }, - { 0xe3, 0xb2, 0x01, 0xa9, 0xf5, 0xb7, 0x1a, 0x7a, - 0x9b, 0x1c, 0xea, 0xec, 0xcd, 0x97, 0xe7, 0x0b, - 0x61, 0x76, 0xaa, 0xd9, 0xa4, 0x42, 0x8a, 0xa5, - 0x48, 0x43, 0x92, 0xfb, 0xc1, 0xb0, 0x99, 0x51 } -}; - -int mbedtls_ccm_self_test( int verbose ) -{ - mbedtls_ccm_context ctx; - unsigned char out[32]; - size_t i; - int ret; - - mbedtls_ccm_init( &ctx ); - - if( mbedtls_ccm_setkey( &ctx, MBEDTLS_CIPHER_ID_AES, ccm_key, 8 * sizeof ccm_key ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( " CCM: setup failed" ); - - return( 1 ); - } - - for( i = 0; i < NB_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " CCM-AES #%u: ", (unsigned int) i + 1 ); - - ret = mbedtls_ccm_encrypt_and_tag( &ctx, msg_len[i], - iv, iv_len[i], ad, add_len[i], - msg, out, - out + msg_len[i], tag_len[i] ); - - if( ret != 0 || - memcmp( out, res[i], msg_len[i] + tag_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_ccm_auth_decrypt( &ctx, msg_len[i], - iv, iv_len[i], ad, add_len[i], - res[i], out, - res[i] + msg_len[i], tag_len[i] ); - - if( ret != 0 || - memcmp( out, msg, msg_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - mbedtls_ccm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - #endif /* MBEDTLS_CCM_C */ diff --git a/deps/mbedtls/cipher.c b/deps/mbedtls/cipher.c index b5503a0279..a075b51d5d 100644 --- a/deps/mbedtls/cipher.c +++ b/deps/mbedtls/cipher.c @@ -45,17 +45,6 @@ #include "mbedtls/ccm.h" #endif -#if defined(MBEDTLS_CMAC_C) -#include "mbedtls/cmac.h" -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - #if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_NULL_CIPHER) #define MBEDTLS_CIPHER_MODE_STREAM #endif @@ -135,14 +124,6 @@ void mbedtls_cipher_free( mbedtls_cipher_context_t *ctx ) if( ctx == NULL ) return; -#if defined(MBEDTLS_CMAC_C) - if( ctx->cmac_ctx ) - { - mbedtls_zeroize( ctx->cmac_ctx, sizeof( mbedtls_cmac_context_t ) ); - mbedtls_free( ctx->cmac_ctx ); - } -#endif - if( ctx->cipher_ctx ) ctx->cipher_info->base->ctx_free_func( ctx->cipher_ctx ); @@ -846,17 +827,20 @@ int mbedtls_cipher_auth_encrypt( mbedtls_cipher_context_t *ctx, if( MBEDTLS_MODE_GCM == ctx->cipher_info->mode ) { *olen = ilen; - return( mbedtls_gcm_crypt_and_tag( ctx->cipher_ctx, MBEDTLS_GCM_ENCRYPT, ilen, - iv, iv_len, ad, ad_len, input, output, - tag_len, tag ) ); + return( mbedtls_gcm_crypt_and_tag( + (mbedtls_gcm_context*)ctx->cipher_ctx, + MBEDTLS_GCM_ENCRYPT, ilen, + iv, iv_len, ad, ad_len, input, output, + tag_len, tag ) ); } #endif /* MBEDTLS_GCM_C */ #if defined(MBEDTLS_CCM_C) if( MBEDTLS_MODE_CCM == ctx->cipher_info->mode ) { *olen = ilen; - return( mbedtls_ccm_encrypt_and_tag( ctx->cipher_ctx, ilen, - iv, iv_len, ad, ad_len, input, output, + return( mbedtls_ccm_encrypt_and_tag( + (mbedtls_ccm_context*)ctx->cipher_ctx, ilen, + iv, iv_len, ad, ad_len, input, output, tag, tag_len ) ); } #endif /* MBEDTLS_CCM_C */ @@ -880,9 +864,10 @@ int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx, int ret; *olen = ilen; - ret = mbedtls_gcm_auth_decrypt( ctx->cipher_ctx, ilen, - iv, iv_len, ad, ad_len, - tag, tag_len, input, output ); + ret = mbedtls_gcm_auth_decrypt( + (mbedtls_gcm_context*)ctx->cipher_ctx, ilen, + iv, iv_len, ad, ad_len, + tag, tag_len, input, output ); if( ret == MBEDTLS_ERR_GCM_AUTH_FAILED ) ret = MBEDTLS_ERR_CIPHER_AUTH_FAILED; @@ -896,7 +881,8 @@ int mbedtls_cipher_auth_decrypt( mbedtls_cipher_context_t *ctx, int ret; *olen = ilen; - ret = mbedtls_ccm_auth_decrypt( ctx->cipher_ctx, ilen, + ret = mbedtls_ccm_auth_decrypt( + (mbedtls_ccm_context*)ctx->cipher_ctx, ilen, iv, iv_len, ad, ad_len, input, output, tag, tag_len ); diff --git a/deps/mbedtls/cipher_wrap.c b/deps/mbedtls/cipher_wrap.c index dabc7a25d4..2e9a5fb6d2 100644 --- a/deps/mbedtls/cipher_wrap.c +++ b/deps/mbedtls/cipher_wrap.c @@ -61,23 +61,14 @@ #include "mbedtls/ccm.h" #endif -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #if defined(MBEDTLS_GCM_C) /* shared by all GCM ciphers */ static void *gcm_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_gcm_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_gcm_context ) ); if( ctx != NULL ) mbedtls_gcm_init( (mbedtls_gcm_context *) ctx ); @@ -88,7 +79,7 @@ static void *gcm_ctx_alloc( void ) static void gcm_ctx_free( void *ctx ) { mbedtls_gcm_free((mbedtls_gcm_context*)ctx); - mbedtls_free(ctx); + free(ctx); } #endif /* MBEDTLS_GCM_C */ @@ -96,7 +87,7 @@ static void gcm_ctx_free( void *ctx ) /* shared by all CCM ciphers */ static void *ccm_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ccm_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_ccm_context ) ); if( ctx != NULL ) mbedtls_ccm_init( (mbedtls_ccm_context *) ctx ); @@ -107,7 +98,7 @@ static void *ccm_ctx_alloc( void ) static void ccm_ctx_free( void *ctx ) { mbedtls_ccm_free((mbedtls_ccm_context*)ctx); - mbedtls_free( ctx ); + free( ctx ); } #endif /* MBEDTLS_CCM_C */ @@ -162,7 +153,7 @@ static int aes_setkey_enc_wrap( void *ctx, const unsigned char *key, static void * aes_ctx_alloc( void ) { - mbedtls_aes_context *aes = (mbedtls_aes_context*)mbedtls_calloc( 1, sizeof( mbedtls_aes_context ) ); + mbedtls_aes_context *aes = (mbedtls_aes_context*)calloc( 1, sizeof( mbedtls_aes_context ) ); if( aes == NULL ) return( NULL ); @@ -175,7 +166,7 @@ static void * aes_ctx_alloc( void ) static void aes_ctx_free( void *ctx ) { mbedtls_aes_free( (mbedtls_aes_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static const mbedtls_cipher_base_t aes_info = { @@ -519,7 +510,7 @@ static int camellia_setkey_enc_wrap( void *ctx, const unsigned char *key, static void * camellia_ctx_alloc( void ) { mbedtls_camellia_context *ctx = (mbedtls_camellia_context*) - mbedtls_calloc( 1, sizeof( mbedtls_camellia_context ) ); + calloc( 1, sizeof( mbedtls_camellia_context ) ); if( ctx == NULL ) return( NULL ); @@ -532,7 +523,7 @@ static void * camellia_ctx_alloc( void ) static void camellia_ctx_free( void *ctx ) { mbedtls_camellia_free( (mbedtls_camellia_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static const mbedtls_cipher_base_t camellia_info = { @@ -907,7 +898,7 @@ static int des3_set3key_enc_wrap( void *ctx, const unsigned char *key, static void * des_ctx_alloc( void ) { mbedtls_des_context *des = (mbedtls_des_context*) - mbedtls_calloc( 1, sizeof( mbedtls_des_context ) ); + calloc( 1, sizeof( mbedtls_des_context ) ); if( des == NULL ) return( NULL ); @@ -920,12 +911,12 @@ static void * des_ctx_alloc( void ) static void des_ctx_free( void *ctx ) { mbedtls_des_free( (mbedtls_des_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void * des3_ctx_alloc( void ) { - mbedtls_des3_context *des3 = (mbedtls_des3_context*)mbedtls_calloc( 1, sizeof( mbedtls_des3_context ) ); + mbedtls_des3_context *des3 = (mbedtls_des3_context*)calloc( 1, sizeof( mbedtls_des3_context ) ); if( des3 == NULL ) return( NULL ); @@ -938,7 +929,7 @@ static void * des3_ctx_alloc( void ) static void des3_ctx_free( void *ctx ) { mbedtls_des3_free( (mbedtls_des3_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static const mbedtls_cipher_base_t des_info = { @@ -1123,7 +1114,7 @@ static int blowfish_setkey_wrap( void *ctx, const unsigned char *key, static void * blowfish_ctx_alloc( void ) { - mbedtls_blowfish_context *ctx = (mbedtls_blowfish_context*)mbedtls_calloc( 1, sizeof( mbedtls_blowfish_context ) ); + mbedtls_blowfish_context *ctx = (mbedtls_blowfish_context*)calloc( 1, sizeof( mbedtls_blowfish_context ) ); if( ctx == NULL ) return( NULL ); @@ -1136,7 +1127,7 @@ static void * blowfish_ctx_alloc( void ) static void blowfish_ctx_free( void *ctx ) { mbedtls_blowfish_free( (mbedtls_blowfish_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static const mbedtls_cipher_base_t blowfish_info = { @@ -1232,7 +1223,7 @@ static int arc4_setkey_wrap( void *ctx, const unsigned char *key, static void * arc4_ctx_alloc( void ) { - mbedtls_arc4_context *ctx = (mbedtls_arc4_context*)mbedtls_calloc( 1, sizeof( mbedtls_arc4_context ) ); + mbedtls_arc4_context *ctx = (mbedtls_arc4_context*)calloc( 1, sizeof( mbedtls_arc4_context ) ); if( ctx == NULL ) return( NULL ); @@ -1245,7 +1236,7 @@ static void * arc4_ctx_alloc( void ) static void arc4_ctx_free( void *ctx ) { mbedtls_arc4_free( (mbedtls_arc4_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static const mbedtls_cipher_base_t arc4_base_info = { diff --git a/deps/mbedtls/cmac.c b/deps/mbedtls/cmac.c deleted file mode 100644 index 0f0c772636..0000000000 --- a/deps/mbedtls/cmac.c +++ /dev/null @@ -1,1071 +0,0 @@ -/** - * \file cmac.c - * - * \brief NIST SP800-38B compliant CMAC implementation for AES and 3DES - * - * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References: - * - * - NIST SP 800-38B Recommendation for Block Cipher Modes of Operation: The - * CMAC Mode for Authentication - * http://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-38b.pdf - * - * - RFC 4493 - The AES-CMAC Algorithm - * https://tools.ietf.org/html/rfc4493 - * - * - RFC 4615 - The Advanced Encryption Standard-Cipher-based Message - * Authentication Code-Pseudo-Random Function-128 (AES-CMAC-PRF-128) - * Algorithm for the Internet Key Exchange Protocol (IKE) - * https://tools.ietf.org/html/rfc4615 - * - * Additional test vectors: ISO/IEC 9797-1 - * - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_CMAC_C) - -#include "mbedtls/cmac.h" - -#include - - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#if defined(MBEDTLS_SELF_TEST) -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_SELF_TEST */ -#endif /* MBEDTLS_PLATFORM_C */ - -#include "arc4_alt.h" - -/* - * Multiplication by u in the Galois field of GF(2^n) - * - * As explained in NIST SP 800-38B, this can be computed: - * - * If MSB(p) = 0, then p = (p << 1) - * If MSB(p) = 1, then p = (p << 1) ^ R_n - * with R_64 = 0x1B and R_128 = 0x87 - * - * Input and output MUST NOT point to the same buffer - * Block size must be 8 bytes or 16 bytes - the block sizes for DES and AES. - */ -static int cmac_multiply_by_u( unsigned char *output, - const unsigned char *input, - size_t blocksize ) -{ - const unsigned char R_128 = 0x87; - const unsigned char R_64 = 0x1B; - unsigned char R_n, mask; - unsigned char overflow = 0x00; - int i; - - if( blocksize == MBEDTLS_AES_BLOCK_SIZE ) - { - R_n = R_128; - } - else if( blocksize == MBEDTLS_DES3_BLOCK_SIZE ) - { - R_n = R_64; - } - else - { - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - for( i = (int)blocksize - 1; i >= 0; i-- ) - { - output[i] = input[i] << 1 | overflow; - overflow = input[i] >> 7; - } - - /* mask = ( input[0] >> 7 ) ? 0xff : 0x00 - * using bit operations to avoid branches */ - - /* MSVC has a warning about unary minus on unsigned, but this is - * well-defined and precisely what we want to do here */ -#if defined(_MSC_VER) -#pragma warning( push ) -#pragma warning( disable : 4146 ) -#endif - mask = - ( input[0] >> 7 ); -#if defined(_MSC_VER) -#pragma warning( pop ) -#endif - - output[ blocksize - 1 ] ^= R_n & mask; - - return( 0 ); -} - -/* - * Generate subkeys - * - * - as specified by RFC 4493, section 2.3 Subkey Generation Algorithm - */ -static int cmac_generate_subkeys( mbedtls_cipher_context_t *ctx, - unsigned char* K1, unsigned char* K2 ) -{ - int ret; - unsigned char L[MBEDTLS_CIPHER_BLKSIZE_MAX]; - size_t olen, block_size; - - mbedtls_zeroize( L, sizeof( L ) ); - - block_size = ctx->cipher_info->block_size; - - /* Calculate Ek(0) */ - if( ( ret = mbedtls_cipher_update( ctx, L, block_size, L, &olen ) ) != 0 ) - goto exit; - - /* - * Generate K1 and K2 - */ - if( ( ret = cmac_multiply_by_u( K1, L , block_size ) ) != 0 ) - goto exit; - - if( ( ret = cmac_multiply_by_u( K2, K1 , block_size ) ) != 0 ) - goto exit; - -exit: - mbedtls_zeroize( L, sizeof( L ) ); - - return( ret ); -} - -static void cmac_xor_block( unsigned char *output, const unsigned char *input1, - const unsigned char *input2, - const size_t block_size ) -{ - size_t index; - - for( index = 0; index < block_size; index++ ) - output[ index ] = input1[ index ] ^ input2[ index ]; -} - -/* - * Create padded last block from (partial) last block. - * - * We can't use the padding option from the cipher layer, as it only works for - * CBC and we use ECB mode, and anyway we need to XOR K1 or K2 in addition. - */ -static void cmac_pad( unsigned char padded_block[MBEDTLS_CIPHER_BLKSIZE_MAX], - size_t padded_block_len, - const unsigned char *last_block, - size_t last_block_len ) -{ - size_t j; - - for( j = 0; j < padded_block_len; j++ ) - { - if( j < last_block_len ) - padded_block[j] = last_block[j]; - else if( j == last_block_len ) - padded_block[j] = 0x80; - else - padded_block[j] = 0x00; - } -} - -int mbedtls_cipher_cmac_starts( mbedtls_cipher_context_t *ctx, - const unsigned char *key, size_t keybits ) -{ - mbedtls_cipher_type_t type; - mbedtls_cmac_context_t *cmac_ctx; - int retval; - - if( ctx == NULL || ctx->cipher_info == NULL || key == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - if( ( retval = mbedtls_cipher_setkey( ctx, key, (int)keybits, - MBEDTLS_ENCRYPT ) ) != 0 ) - return( retval ); - - type = ctx->cipher_info->type; - - switch( type ) - { - case MBEDTLS_CIPHER_AES_128_ECB: - case MBEDTLS_CIPHER_AES_192_ECB: - case MBEDTLS_CIPHER_AES_256_ECB: - case MBEDTLS_CIPHER_DES_EDE3_ECB: - break; - default: - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - } - - /* Allocated and initialise in the cipher context memory for the CMAC - * context */ - cmac_ctx = mbedtls_calloc( 1, sizeof( mbedtls_cmac_context_t ) ); - if( cmac_ctx == NULL ) - return( MBEDTLS_ERR_CIPHER_ALLOC_FAILED ); - - ctx->cmac_ctx = cmac_ctx; - - mbedtls_zeroize( cmac_ctx->state, sizeof( cmac_ctx->state ) ); - - return 0; -} - -int mbedtls_cipher_cmac_update( mbedtls_cipher_context_t *ctx, - const unsigned char *input, size_t ilen ) -{ - mbedtls_cmac_context_t* cmac_ctx; - unsigned char *state; - int ret = 0; - size_t n, j, olen, block_size; - - if( ctx == NULL || ctx->cipher_info == NULL || input == NULL || - ctx->cmac_ctx == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - cmac_ctx = ctx->cmac_ctx; - block_size = ctx->cipher_info->block_size; - state = ctx->cmac_ctx->state; - - /* Is there data still to process from the last call, that's greater in - * size than a block? */ - if( cmac_ctx->unprocessed_len > 0 && - ilen > block_size - cmac_ctx->unprocessed_len ) - { - memcpy( &cmac_ctx->unprocessed_block[cmac_ctx->unprocessed_len], - input, - block_size - cmac_ctx->unprocessed_len ); - - cmac_xor_block( state, cmac_ctx->unprocessed_block, state, block_size ); - - if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, - &olen ) ) != 0 ) - { - goto exit; - } - - input += block_size - cmac_ctx->unprocessed_len; - ilen -= block_size - cmac_ctx->unprocessed_len; - cmac_ctx->unprocessed_len = 0; - } - - /* n is the number of blocks including any final partial block */ - n = ( ilen + block_size - 1 ) / block_size; - - /* Iterate across the input data in block sized chunks, excluding any - * final partial or complete block */ - for( j = 1; j < n; j++ ) - { - cmac_xor_block( state, input, state, block_size ); - - if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, - &olen ) ) != 0 ) - goto exit; - - ilen -= block_size; - input += block_size; - } - - /* If there is data left over that wasn't aligned to a block */ - if( ilen > 0 ) - { - memcpy( &cmac_ctx->unprocessed_block[cmac_ctx->unprocessed_len], - input, - ilen ); - cmac_ctx->unprocessed_len += ilen; - } - -exit: - return( ret ); -} - -int mbedtls_cipher_cmac_finish( mbedtls_cipher_context_t *ctx, - unsigned char *output ) -{ - mbedtls_cmac_context_t* cmac_ctx; - unsigned char *state, *last_block; - unsigned char K1[MBEDTLS_CIPHER_BLKSIZE_MAX]; - unsigned char K2[MBEDTLS_CIPHER_BLKSIZE_MAX]; - unsigned char M_last[MBEDTLS_CIPHER_BLKSIZE_MAX]; - int ret; - size_t olen, block_size; - - if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL || - output == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - cmac_ctx = ctx->cmac_ctx; - block_size = ctx->cipher_info->block_size; - state = cmac_ctx->state; - - mbedtls_zeroize( K1, sizeof( K1 ) ); - mbedtls_zeroize( K2, sizeof( K2 ) ); - cmac_generate_subkeys( ctx, K1, K2 ); - - last_block = cmac_ctx->unprocessed_block; - - /* Calculate last block */ - if( cmac_ctx->unprocessed_len < block_size ) - { - cmac_pad( M_last, block_size, last_block, cmac_ctx->unprocessed_len ); - cmac_xor_block( M_last, M_last, K2, block_size ); - } - else - { - /* Last block is complete block */ - cmac_xor_block( M_last, last_block, K1, block_size ); - } - - - cmac_xor_block( state, M_last, state, block_size ); - if( ( ret = mbedtls_cipher_update( ctx, state, block_size, state, - &olen ) ) != 0 ) - { - goto exit; - } - - memcpy( output, state, block_size ); - -exit: - /* Wipe the generated keys on the stack, and any other transients to avoid - * side channel leakage */ - mbedtls_zeroize( K1, sizeof( K1 ) ); - mbedtls_zeroize( K2, sizeof( K2 ) ); - - cmac_ctx->unprocessed_len = 0; - mbedtls_zeroize( cmac_ctx->unprocessed_block, - sizeof( cmac_ctx->unprocessed_block ) ); - - mbedtls_zeroize( state, MBEDTLS_CIPHER_BLKSIZE_MAX ); - return( ret ); -} - -int mbedtls_cipher_cmac_reset( mbedtls_cipher_context_t *ctx ) -{ - mbedtls_cmac_context_t* cmac_ctx; - - if( ctx == NULL || ctx->cipher_info == NULL || ctx->cmac_ctx == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - cmac_ctx = ctx->cmac_ctx; - - /* Reset the internal state */ - cmac_ctx->unprocessed_len = 0; - mbedtls_zeroize( cmac_ctx->unprocessed_block, - sizeof( cmac_ctx->unprocessed_block ) ); - mbedtls_zeroize( cmac_ctx->state, - sizeof( cmac_ctx->state ) ); - - return( 0 ); -} - -int mbedtls_cipher_cmac( const mbedtls_cipher_info_t *cipher_info, - const unsigned char *key, size_t keylen, - const unsigned char *input, size_t ilen, - unsigned char *output ) -{ - mbedtls_cipher_context_t ctx; - int ret; - - if( cipher_info == NULL || key == NULL || input == NULL || output == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - mbedtls_cipher_init( &ctx ); - - if( ( ret = mbedtls_cipher_setup( &ctx, cipher_info ) ) != 0 ) - goto exit; - - ret = mbedtls_cipher_cmac_starts( &ctx, key, keylen ); - if( ret != 0 ) - goto exit; - - ret = mbedtls_cipher_cmac_update( &ctx, input, ilen ); - if( ret != 0 ) - goto exit; - - ret = mbedtls_cipher_cmac_finish( &ctx, output ); - -exit: - mbedtls_cipher_free( &ctx ); - - return( ret ); -} - -#if defined(MBEDTLS_AES_C) -/* - * Implementation of AES-CMAC-PRF-128 defined in RFC 4615 - */ -int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_length, - const unsigned char *input, size_t in_len, - unsigned char *output ) -{ - int ret; - const mbedtls_cipher_info_t *cipher_info; - unsigned char zero_key[MBEDTLS_AES_BLOCK_SIZE]; - unsigned char int_key[MBEDTLS_AES_BLOCK_SIZE]; - - if( key == NULL || input == NULL || output == NULL ) - return( MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA ); - - cipher_info = mbedtls_cipher_info_from_type( MBEDTLS_CIPHER_AES_128_ECB ); - if( cipher_info == NULL ) - { - /* Failing at this point must be due to a build issue */ - ret = MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE; - goto exit; - } - - if( key_length == MBEDTLS_AES_BLOCK_SIZE ) - { - /* Use key as is */ - memcpy( int_key, key, MBEDTLS_AES_BLOCK_SIZE ); - } - else - { - memset( zero_key, 0, MBEDTLS_AES_BLOCK_SIZE ); - - ret = mbedtls_cipher_cmac( cipher_info, zero_key, 128, key, - key_length, int_key ); - if( ret != 0 ) - goto exit; - } - - ret = mbedtls_cipher_cmac( cipher_info, int_key, 128, input, in_len, - output ); - -exit: - mbedtls_zeroize( int_key, sizeof( int_key ) ); - - return( ret ); -} -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_SELF_TEST) -/* - * CMAC test data for SP800-38B - * http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/AES_CMAC.pdf - * http://csrc.nist.gov/groups/ST/toolkit/documents/Examples/TDES_CMAC.pdf - * - * AES-CMAC-PRF-128 test data from RFC 4615 - * https://tools.ietf.org/html/rfc4615#page-4 - */ - -#define NB_CMAC_TESTS_PER_KEY 4 -#define NB_PRF_TESTS 3 - -#if defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) -/* All CMAC test inputs are truncated from the same 64 byte buffer. */ -static const unsigned char test_message[] = { - /* PT */ - 0x6b, 0xc1, 0xbe, 0xe2, 0x2e, 0x40, 0x9f, 0x96, - 0xe9, 0x3d, 0x7e, 0x11, 0x73, 0x93, 0x17, 0x2a, - 0xae, 0x2d, 0x8a, 0x57, 0x1e, 0x03, 0xac, 0x9c, - 0x9e, 0xb7, 0x6f, 0xac, 0x45, 0xaf, 0x8e, 0x51, - 0x30, 0xc8, 0x1c, 0x46, 0xa3, 0x5c, 0xe4, 0x11, - 0xe5, 0xfb, 0xc1, 0x19, 0x1a, 0x0a, 0x52, 0xef, - 0xf6, 0x9f, 0x24, 0x45, 0xdf, 0x4f, 0x9b, 0x17, - 0xad, 0x2b, 0x41, 0x7b, 0xe6, 0x6c, 0x37, 0x10 -}; -#endif /* MBEDTLS_AES_C || MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) -/* Truncation point of message for AES CMAC tests */ -static const unsigned int aes_message_lengths[NB_CMAC_TESTS_PER_KEY] = { - /* Mlen */ - 0, - 16, - 20, - 64 -}; - -/* CMAC-AES128 Test Data */ -static const unsigned char aes_128_key[16] = { - 0x2b, 0x7e, 0x15, 0x16, 0x28, 0xae, 0xd2, 0xa6, - 0xab, 0xf7, 0x15, 0x88, 0x09, 0xcf, 0x4f, 0x3c -}; -static const unsigned char aes_128_subkeys[2][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* K1 */ - 0xfb, 0xee, 0xd6, 0x18, 0x35, 0x71, 0x33, 0x66, - 0x7c, 0x85, 0xe0, 0x8f, 0x72, 0x36, 0xa8, 0xde - }, - { - /* K2 */ - 0xf7, 0xdd, 0xac, 0x30, 0x6a, 0xe2, 0x66, 0xcc, - 0xf9, 0x0b, 0xc1, 0x1e, 0xe4, 0x6d, 0x51, 0x3b - } -}; -static const unsigned char aes_128_expected_result[NB_CMAC_TESTS_PER_KEY][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* Example #1 */ - 0xbb, 0x1d, 0x69, 0x29, 0xe9, 0x59, 0x37, 0x28, - 0x7f, 0xa3, 0x7d, 0x12, 0x9b, 0x75, 0x67, 0x46 - }, - { - /* Example #2 */ - 0x07, 0x0a, 0x16, 0xb4, 0x6b, 0x4d, 0x41, 0x44, - 0xf7, 0x9b, 0xdd, 0x9d, 0xd0, 0x4a, 0x28, 0x7c - }, - { - /* Example #3 */ - 0x7d, 0x85, 0x44, 0x9e, 0xa6, 0xea, 0x19, 0xc8, - 0x23, 0xa7, 0xbf, 0x78, 0x83, 0x7d, 0xfa, 0xde - }, - { - /* Example #4 */ - 0x51, 0xf0, 0xbe, 0xbf, 0x7e, 0x3b, 0x9d, 0x92, - 0xfc, 0x49, 0x74, 0x17, 0x79, 0x36, 0x3c, 0xfe - } -}; - -/* CMAC-AES192 Test Data */ -static const unsigned char aes_192_key[24] = { - 0x8e, 0x73, 0xb0, 0xf7, 0xda, 0x0e, 0x64, 0x52, - 0xc8, 0x10, 0xf3, 0x2b, 0x80, 0x90, 0x79, 0xe5, - 0x62, 0xf8, 0xea, 0xd2, 0x52, 0x2c, 0x6b, 0x7b -}; -static const unsigned char aes_192_subkeys[2][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* K1 */ - 0x44, 0x8a, 0x5b, 0x1c, 0x93, 0x51, 0x4b, 0x27, - 0x3e, 0xe6, 0x43, 0x9d, 0xd4, 0xda, 0xa2, 0x96 - }, - { - /* K2 */ - 0x89, 0x14, 0xb6, 0x39, 0x26, 0xa2, 0x96, 0x4e, - 0x7d, 0xcc, 0x87, 0x3b, 0xa9, 0xb5, 0x45, 0x2c - } -}; -static const unsigned char aes_192_expected_result[NB_CMAC_TESTS_PER_KEY][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* Example #1 */ - 0xd1, 0x7d, 0xdf, 0x46, 0xad, 0xaa, 0xcd, 0xe5, - 0x31, 0xca, 0xc4, 0x83, 0xde, 0x7a, 0x93, 0x67 - }, - { - /* Example #2 */ - 0x9e, 0x99, 0xa7, 0xbf, 0x31, 0xe7, 0x10, 0x90, - 0x06, 0x62, 0xf6, 0x5e, 0x61, 0x7c, 0x51, 0x84 - }, - { - /* Example #3 */ - 0x3d, 0x75, 0xc1, 0x94, 0xed, 0x96, 0x07, 0x04, - 0x44, 0xa9, 0xfa, 0x7e, 0xc7, 0x40, 0xec, 0xf8 - }, - { - /* Example #4 */ - 0xa1, 0xd5, 0xdf, 0x0e, 0xed, 0x79, 0x0f, 0x79, - 0x4d, 0x77, 0x58, 0x96, 0x59, 0xf3, 0x9a, 0x11 - } -}; - -/* CMAC-AES256 Test Data */ -static const unsigned char aes_256_key[32] = { - 0x60, 0x3d, 0xeb, 0x10, 0x15, 0xca, 0x71, 0xbe, - 0x2b, 0x73, 0xae, 0xf0, 0x85, 0x7d, 0x77, 0x81, - 0x1f, 0x35, 0x2c, 0x07, 0x3b, 0x61, 0x08, 0xd7, - 0x2d, 0x98, 0x10, 0xa3, 0x09, 0x14, 0xdf, 0xf4 -}; -static const unsigned char aes_256_subkeys[2][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* K1 */ - 0xca, 0xd1, 0xed, 0x03, 0x29, 0x9e, 0xed, 0xac, - 0x2e, 0x9a, 0x99, 0x80, 0x86, 0x21, 0x50, 0x2f - }, - { - /* K2 */ - 0x95, 0xa3, 0xda, 0x06, 0x53, 0x3d, 0xdb, 0x58, - 0x5d, 0x35, 0x33, 0x01, 0x0c, 0x42, 0xa0, 0xd9 - } -}; -static const unsigned char aes_256_expected_result[NB_CMAC_TESTS_PER_KEY][MBEDTLS_AES_BLOCK_SIZE] = { - { - /* Example #1 */ - 0x02, 0x89, 0x62, 0xf6, 0x1b, 0x7b, 0xf8, 0x9e, - 0xfc, 0x6b, 0x55, 0x1f, 0x46, 0x67, 0xd9, 0x83 - }, - { - /* Example #2 */ - 0x28, 0xa7, 0x02, 0x3f, 0x45, 0x2e, 0x8f, 0x82, - 0xbd, 0x4b, 0xf2, 0x8d, 0x8c, 0x37, 0xc3, 0x5c - }, - { - /* Example #3 */ - 0x15, 0x67, 0x27, 0xdc, 0x08, 0x78, 0x94, 0x4a, - 0x02, 0x3c, 0x1f, 0xe0, 0x3b, 0xad, 0x6d, 0x93 - }, - { - /* Example #4 */ - 0xe1, 0x99, 0x21, 0x90, 0x54, 0x9f, 0x6e, 0xd5, - 0x69, 0x6a, 0x2c, 0x05, 0x6c, 0x31, 0x54, 0x10 - } -}; -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_DES_C) -/* Truncation point of message for 3DES CMAC tests */ -static const unsigned int des3_message_lengths[NB_CMAC_TESTS_PER_KEY] = { - 0, - 16, - 20, - 32 -}; - -/* CMAC-TDES (Generation) - 2 Key Test Data */ -static const unsigned char des3_2key_key[24] = { - /* Key1 */ - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, - /* Key2 */ - 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xEF, 0x01, - /* Key3 */ - 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef -}; -static const unsigned char des3_2key_subkeys[2][8] = { - { - /* K1 */ - 0x0d, 0xd2, 0xcb, 0x7a, 0x3d, 0x88, 0x88, 0xd9 - }, - { - /* K2 */ - 0x1b, 0xa5, 0x96, 0xf4, 0x7b, 0x11, 0x11, 0xb2 - } -}; -static const unsigned char des3_2key_expected_result[NB_CMAC_TESTS_PER_KEY][MBEDTLS_DES3_BLOCK_SIZE] = { - { - /* Sample #1 */ - 0x79, 0xce, 0x52, 0xa7, 0xf7, 0x86, 0xa9, 0x60 - }, - { - /* Sample #2 */ - 0xcc, 0x18, 0xa0, 0xb7, 0x9a, 0xf2, 0x41, 0x3b - }, - { - /* Sample #3 */ - 0xc0, 0x6d, 0x37, 0x7e, 0xcd, 0x10, 0x19, 0x69 - }, - { - /* Sample #4 */ - 0x9c, 0xd3, 0x35, 0x80, 0xf9, 0xb6, 0x4d, 0xfb - } -}; - -/* CMAC-TDES (Generation) - 3 Key Test Data */ -static const unsigned char des3_3key_key[24] = { - /* Key1 */ - 0x01, 0x23, 0x45, 0x67, 0x89, 0xaa, 0xcd, 0xef, - /* Key2 */ - 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, - /* Key3 */ - 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef, 0x01, 0x23 -}; -static const unsigned char des3_3key_subkeys[2][8] = { - { - /* K1 */ - 0x9d, 0x74, 0xe7, 0x39, 0x33, 0x17, 0x96, 0xc0 - }, - { - /* K2 */ - 0x3a, 0xe9, 0xce, 0x72, 0x66, 0x2f, 0x2d, 0x9b - } -}; -static const unsigned char des3_3key_expected_result[NB_CMAC_TESTS_PER_KEY][MBEDTLS_DES3_BLOCK_SIZE] = { - { - /* Sample #1 */ - 0x7d, 0xb0, 0xd3, 0x7d, 0xf9, 0x36, 0xc5, 0x50 - }, - { - /* Sample #2 */ - 0x30, 0x23, 0x9c, 0xf1, 0xf5, 0x2e, 0x66, 0x09 - }, - { - /* Sample #3 */ - 0x6c, 0x9f, 0x3e, 0xe4, 0x92, 0x3f, 0x6b, 0xe2 - }, - { - /* Sample #4 */ - 0x99, 0x42, 0x9b, 0xd0, 0xbF, 0x79, 0x04, 0xe5 - } -}; - -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) -/* AES AES-CMAC-PRF-128 Test Data */ -static const unsigned char PRFK[] = { - /* Key */ - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0xed, 0xcb -}; - -/* Sizes in bytes */ -static const size_t PRFKlen[NB_PRF_TESTS] = { - 18, - 16, - 10 -}; - -/* Message */ -static const unsigned char PRFM[] = { - 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, - 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, - 0x10, 0x11, 0x12, 0x13 -}; - -static const unsigned char PRFT[NB_PRF_TESTS][16] = { - { - 0x84, 0xa3, 0x48, 0xa4, 0xa4, 0x5d, 0x23, 0x5b, - 0xab, 0xff, 0xfc, 0x0d, 0x2b, 0x4d, 0xa0, 0x9a - }, - { - 0x98, 0x0a, 0xe8, 0x7b, 0x5f, 0x4c, 0x9c, 0x52, - 0x14, 0xf5, 0xb6, 0xa8, 0x45, 0x5e, 0x4c, 0x2d - }, - { - 0x29, 0x0d, 0x9e, 0x11, 0x2e, 0xdb, 0x09, 0xee, - 0x14, 0x1f, 0xcf, 0x64, 0xc0, 0xb7, 0x2f, 0x3d - } -}; -#endif /* MBEDTLS_AES_C */ - -static int cmac_test_subkeys( int verbose, - const char* testname, - const unsigned char* key, - int keybits, - const unsigned char* subkeys, - mbedtls_cipher_type_t cipher_type, - int block_size, - int num_tests ) -{ - int i, ret; - mbedtls_cipher_context_t ctx; - const mbedtls_cipher_info_t *cipher_info; - unsigned char K1[MBEDTLS_CIPHER_BLKSIZE_MAX]; - unsigned char K2[MBEDTLS_CIPHER_BLKSIZE_MAX]; - - cipher_info = mbedtls_cipher_info_from_type( cipher_type ); - if( cipher_info == NULL ) - { - /* Failing at this point must be due to a build issue */ - return( MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE ); - } - - for( i = 0; i < num_tests; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " %s CMAC subkey #%u: ", testname, i + 1 ); - - mbedtls_cipher_init( &ctx ); - - if( ( ret = mbedtls_cipher_setup( &ctx, cipher_info ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "test execution failed\n" ); - - goto cleanup; - } - - if( ( ret = mbedtls_cipher_setkey( &ctx, key, keybits, - MBEDTLS_ENCRYPT ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "test execution failed\n" ); - - goto cleanup; - } - - ret = cmac_generate_subkeys( &ctx, K1, K2 ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - goto cleanup; - } - - if( ( ret = memcmp( K1, subkeys, block_size ) ) != 0 || - ( ret = memcmp( K2, &subkeys[block_size], block_size ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - goto cleanup; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - mbedtls_cipher_free( &ctx ); - } - - goto exit; - -cleanup: - mbedtls_cipher_free( &ctx ); - -exit: - return( ret ); -} - -static int cmac_test_wth_cipher( int verbose, - const char* testname, - const unsigned char* key, - int keybits, - const unsigned char* messages, - const unsigned int message_lengths[4], - const unsigned char* expected_result, - mbedtls_cipher_type_t cipher_type, - int block_size, - int num_tests ) -{ - const mbedtls_cipher_info_t *cipher_info; - int i, ret; - unsigned char output[MBEDTLS_CIPHER_BLKSIZE_MAX]; - - cipher_info = mbedtls_cipher_info_from_type( cipher_type ); - if( cipher_info == NULL ) - { - /* Failing at this point must be due to a build issue */ - ret = MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE; - goto exit; - } - - for( i = 0; i < num_tests; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " %s CMAC #%u: ", testname, i + 1 ); - - if( ( ret = mbedtls_cipher_cmac( cipher_info, key, keybits, messages, - message_lengths[i], output ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - goto exit; - } - - if( ( ret = memcmp( output, &expected_result[i * block_size], block_size ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - -exit: - return( ret ); -} - -#if defined(MBEDTLS_AES_C) -static int test_aes128_cmac_prf( int verbose ) -{ - int i; - int ret; - unsigned char output[MBEDTLS_AES_BLOCK_SIZE]; - - for( i = 0; i < NB_PRF_TESTS; i++ ) - { - mbedtls_printf( " AES CMAC 128 PRF #%u: ", i ); - ret = mbedtls_aes_cmac_prf_128( PRFK, PRFKlen[i], PRFM, 20, output ); - if( ret != 0 || - memcmp( output, PRFT[i], MBEDTLS_AES_BLOCK_SIZE ) != 0 ) - { - - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - else if( verbose != 0 ) - { - mbedtls_printf( "passed\n" ); - } - } - return( ret ); -} -#endif /* MBEDTLS_AES_C */ - -int mbedtls_cmac_self_test( int verbose ) -{ - int ret; - -#if defined(MBEDTLS_AES_C) - /* AES-128 */ - if( ( ret = cmac_test_subkeys( verbose, - "AES 128", - aes_128_key, - 128, - (const unsigned char*)aes_128_subkeys, - MBEDTLS_CIPHER_AES_128_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = cmac_test_wth_cipher( verbose, - "AES 128", - aes_128_key, - 128, - test_message, - aes_message_lengths, - (const unsigned char*)aes_128_expected_result, - MBEDTLS_CIPHER_AES_128_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - /* AES-192 */ - if( ( ret = cmac_test_subkeys( verbose, - "AES 192", - aes_192_key, - 192, - (const unsigned char*)aes_192_subkeys, - MBEDTLS_CIPHER_AES_192_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = cmac_test_wth_cipher( verbose, - "AES 192", - aes_192_key, - 192, - test_message, - aes_message_lengths, - (const unsigned char*)aes_192_expected_result, - MBEDTLS_CIPHER_AES_192_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - /* AES-256 */ - if( ( ret = cmac_test_subkeys( verbose, - "AES 256", - aes_256_key, - 256, - (const unsigned char*)aes_256_subkeys, - MBEDTLS_CIPHER_AES_256_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = cmac_test_wth_cipher ( verbose, - "AES 256", - aes_256_key, - 256, - test_message, - aes_message_lengths, - (const unsigned char*)aes_256_expected_result, - MBEDTLS_CIPHER_AES_256_ECB, - MBEDTLS_AES_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_DES_C) - /* 3DES 2 key */ - if( ( ret = cmac_test_subkeys( verbose, - "3DES 2 key", - des3_2key_key, - 192, - (const unsigned char*)des3_2key_subkeys, - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_DES3_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = cmac_test_wth_cipher( verbose, - "3DES 2 key", - des3_2key_key, - 192, - test_message, - des3_message_lengths, - (const unsigned char*)des3_2key_expected_result, - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_DES3_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - /* 3DES 3 key */ - if( ( ret = cmac_test_subkeys( verbose, - "3DES 3 key", - des3_3key_key, - 192, - (const unsigned char*)des3_3key_subkeys, - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_DES3_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } - - if( ( ret = cmac_test_wth_cipher( verbose, - "3DES 3 key", - des3_3key_key, - 192, - test_message, - des3_message_lengths, - (const unsigned char*)des3_3key_expected_result, - MBEDTLS_CIPHER_DES_EDE3_ECB, - MBEDTLS_DES3_BLOCK_SIZE, - NB_CMAC_TESTS_PER_KEY ) ) != 0 ) - { - return( ret ); - } -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_AES_C) - if( ( ret = test_aes128_cmac_prf( verbose ) ) != 0 ) - return( ret ); -#endif /* MBEDTLS_AES_C */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_CMAC_C */ diff --git a/deps/mbedtls/ctr_drbg.c b/deps/mbedtls/ctr_drbg.c index 1c3d89f0b3..f886be94b3 100644 --- a/deps/mbedtls/ctr_drbg.c +++ b/deps/mbedtls/ctr_drbg.c @@ -40,15 +40,6 @@ #include #endif -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #include "arc4_alt.h" /* @@ -472,120 +463,4 @@ int mbedtls_ctr_drbg_update_seed_file( mbedtls_ctr_drbg_context *ctx, const char } #endif /* MBEDTLS_FS_IO */ -#if defined(MBEDTLS_SELF_TEST) - -static const unsigned char entropy_source_pr[96] = - { 0xc1, 0x80, 0x81, 0xa6, 0x5d, 0x44, 0x02, 0x16, - 0x19, 0xb3, 0xf1, 0x80, 0xb1, 0xc9, 0x20, 0x02, - 0x6a, 0x54, 0x6f, 0x0c, 0x70, 0x81, 0x49, 0x8b, - 0x6e, 0xa6, 0x62, 0x52, 0x6d, 0x51, 0xb1, 0xcb, - 0x58, 0x3b, 0xfa, 0xd5, 0x37, 0x5f, 0xfb, 0xc9, - 0xff, 0x46, 0xd2, 0x19, 0xc7, 0x22, 0x3e, 0x95, - 0x45, 0x9d, 0x82, 0xe1, 0xe7, 0x22, 0x9f, 0x63, - 0x31, 0x69, 0xd2, 0x6b, 0x57, 0x47, 0x4f, 0xa3, - 0x37, 0xc9, 0x98, 0x1c, 0x0b, 0xfb, 0x91, 0x31, - 0x4d, 0x55, 0xb9, 0xe9, 0x1c, 0x5a, 0x5e, 0xe4, - 0x93, 0x92, 0xcf, 0xc5, 0x23, 0x12, 0xd5, 0x56, - 0x2c, 0x4a, 0x6e, 0xff, 0xdc, 0x10, 0xd0, 0x68 }; - -static const unsigned char entropy_source_nopr[64] = - { 0x5a, 0x19, 0x4d, 0x5e, 0x2b, 0x31, 0x58, 0x14, - 0x54, 0xde, 0xf6, 0x75, 0xfb, 0x79, 0x58, 0xfe, - 0xc7, 0xdb, 0x87, 0x3e, 0x56, 0x89, 0xfc, 0x9d, - 0x03, 0x21, 0x7c, 0x68, 0xd8, 0x03, 0x38, 0x20, - 0xf9, 0xe6, 0x5e, 0x04, 0xd8, 0x56, 0xf3, 0xa9, - 0xc4, 0x4a, 0x4c, 0xbd, 0xc1, 0xd0, 0x08, 0x46, - 0xf5, 0x98, 0x3d, 0x77, 0x1c, 0x1b, 0x13, 0x7e, - 0x4e, 0x0f, 0x9d, 0x8e, 0xf4, 0x09, 0xf9, 0x2e }; - -static const unsigned char nonce_pers_pr[16] = - { 0xd2, 0x54, 0xfc, 0xff, 0x02, 0x1e, 0x69, 0xd2, - 0x29, 0xc9, 0xcf, 0xad, 0x85, 0xfa, 0x48, 0x6c }; - -static const unsigned char nonce_pers_nopr[16] = - { 0x1b, 0x54, 0xb8, 0xff, 0x06, 0x42, 0xbf, 0xf5, - 0x21, 0xf1, 0x5c, 0x1c, 0x0b, 0x66, 0x5f, 0x3f }; - -static const unsigned char ctr_result_pr[16] = - { 0x34, 0x01, 0x16, 0x56, 0xb4, 0x29, 0x00, 0x8f, - 0x35, 0x63, 0xec, 0xb5, 0xf2, 0x59, 0x07, 0x23 }; - -static const unsigned char ctr_result_nopr[16] = - { 0xa0, 0x54, 0x30, 0x3d, 0x8a, 0x7e, 0xa9, 0x88, - 0x9d, 0x90, 0x3e, 0x07, 0x7c, 0x6f, 0x21, 0x8f }; - -static size_t test_offset; -static int ctr_drbg_self_test_entropy( void *data, unsigned char *buf, - size_t len ) -{ - const unsigned char *p = data; - memcpy( buf, p + test_offset, len ); - test_offset += len; - return( 0 ); -} - -#define CHK( c ) if( (c) != 0 ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - return( 1 ); \ - } - -/* - * Checkup routine - */ -int mbedtls_ctr_drbg_self_test( int verbose ) -{ - mbedtls_ctr_drbg_context ctx; - unsigned char buf[16]; - - mbedtls_ctr_drbg_init( &ctx ); - - /* - * Based on a NIST CTR_DRBG test vector (PR = True) - */ - if( verbose != 0 ) - mbedtls_printf( " CTR_DRBG (PR = TRUE) : " ); - - test_offset = 0; - CHK( mbedtls_ctr_drbg_seed_entropy_len( &ctx, ctr_drbg_self_test_entropy, - (void *) entropy_source_pr, nonce_pers_pr, 16, 32 ) ); - mbedtls_ctr_drbg_set_prediction_resistance( &ctx, MBEDTLS_CTR_DRBG_PR_ON ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - CHK( memcmp( buf, ctr_result_pr, MBEDTLS_CTR_DRBG_BLOCKSIZE ) ); - - mbedtls_ctr_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - /* - * Based on a NIST CTR_DRBG test vector (PR = FALSE) - */ - if( verbose != 0 ) - mbedtls_printf( " CTR_DRBG (PR = FALSE): " ); - - mbedtls_ctr_drbg_init( &ctx ); - - test_offset = 0; - CHK( mbedtls_ctr_drbg_seed_entropy_len( &ctx, ctr_drbg_self_test_entropy, - (void *) entropy_source_nopr, nonce_pers_nopr, 16, 32 ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, 16 ) ); - CHK( mbedtls_ctr_drbg_reseed( &ctx, NULL, 0 ) ); - CHK( mbedtls_ctr_drbg_random( &ctx, buf, 16 ) ); - CHK( memcmp( buf, ctr_result_nopr, 16 ) ); - - mbedtls_ctr_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_CTR_DRBG_C */ diff --git a/deps/mbedtls/debug.c b/deps/mbedtls/debug.c index 95a61789f2..71300725e9 100644 --- a/deps/mbedtls/debug.c +++ b/deps/mbedtls/debug.c @@ -27,15 +27,7 @@ #if defined(MBEDTLS_DEBUG_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#define mbedtls_time_t time_t -#define mbedtls_snprintf snprintf -#endif #include "mbedtls/debug.h" @@ -66,7 +58,7 @@ static void debug_send_line( const mbedtls_ssl_context *ssl, int level, */ #if defined(MBEDTLS_THREADING_C) char idstr[20 + DEBUG_BUF_SIZE]; /* 0x + 16 nibbles + ': ' */ - mbedtls_snprintf( idstr, sizeof( idstr ), "%p: %s", (void*)ssl, str ); + snprintf( idstr, sizeof( idstr ), "%p: %s", (void*)ssl, str ); ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, idstr ); #else ssl->conf->f_dbg( ssl->conf->p_dbg, level, file, line, str ); @@ -133,7 +125,7 @@ void mbedtls_debug_print_ret( const mbedtls_ssl_context *ssl, int level, if( ret == MBEDTLS_ERR_SSL_WANT_READ ) return; - mbedtls_snprintf( str, sizeof( str ), "%s() returned %d (-0x%04x)\n", + snprintf( str, sizeof( str ), "%s() returned %d (-0x%04x)\n", text, ret, -ret ); debug_send_line( ssl, level, file, line, str ); @@ -150,7 +142,7 @@ void mbedtls_debug_print_buf( const mbedtls_ssl_context *ssl, int level, if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) return; - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "dumping '%s' (%u bytes)\n", + snprintf( str + idx, sizeof( str ) - idx, "dumping '%s' (%u bytes)\n", text, (unsigned int) len ); debug_send_line( ssl, level, file, line, str ); @@ -166,19 +158,19 @@ void mbedtls_debug_print_buf( const mbedtls_ssl_context *ssl, int level, { if( i > 0 ) { - mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); + snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); debug_send_line( ssl, level, file, line, str ); idx = 0; memset( txt, 0, sizeof( txt ) ); } - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, "%04x: ", + idx += snprintf( str + idx, sizeof( str ) - idx, "%04x: ", (unsigned int) i ); } - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %02x", + idx += snprintf( str + idx, sizeof( str ) - idx, " %02x", (unsigned int) buf[i] ); txt[i % 16] = ( buf[i] > 31 && buf[i] < 127 ) ? buf[i] : '.' ; } @@ -186,9 +178,9 @@ void mbedtls_debug_print_buf( const mbedtls_ssl_context *ssl, int level, if( len > 0 ) { for( /* i = i */; i % 16 != 0; i++ ) - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " " ); + idx += snprintf( str + idx, sizeof( str ) - idx, " " ); - mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); + snprintf( str + idx, sizeof( str ) - idx, " %s\n", txt ); debug_send_line( ssl, level, file, line, str ); } } @@ -203,10 +195,10 @@ void mbedtls_debug_print_ecp( const mbedtls_ssl_context *ssl, int level, if( ssl->conf == NULL || ssl->conf->f_dbg == NULL || level > debug_threshold ) return; - mbedtls_snprintf( str, sizeof( str ), "%s(X)", text ); + snprintf( str, sizeof( str ), "%s(X)", text ); mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->X ); - mbedtls_snprintf( str, sizeof( str ), "%s(Y)", text ); + snprintf( str, sizeof( str ), "%s(Y)", text ); mbedtls_debug_print_mpi( ssl, level, file, line, str, &X->Y ); } #endif /* MBEDTLS_ECP_C */ @@ -231,7 +223,7 @@ void mbedtls_debug_print_mpi( const mbedtls_ssl_context *ssl, int level, if( ( ( X->p[n] >> j ) & 1 ) != 0 ) break; - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "value of '%s' (%d bits) is:\n", + snprintf( str + idx, sizeof( str ) - idx, "value of '%s' (%d bits) is:\n", text, (int) ( ( n * ( sizeof(mbedtls_mpi_uint) << 3 ) ) + j + 1 ) ); debug_send_line( ssl, level, file, line, str ); @@ -253,13 +245,13 @@ void mbedtls_debug_print_mpi( const mbedtls_ssl_context *ssl, int level, { if( j > 0 ) { - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "\n" ); + snprintf( str + idx, sizeof( str ) - idx, "\n" ); debug_send_line( ssl, level, file, line, str ); idx = 0; } } - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " %02x", (unsigned int) + idx += snprintf( str + idx, sizeof( str ) - idx, " %02x", (unsigned int) ( X->p[i - 1] >> ( k << 3 ) ) & 0xFF ); j++; @@ -268,9 +260,9 @@ void mbedtls_debug_print_mpi( const mbedtls_ssl_context *ssl, int level, } if( zeros == 1 ) - idx += mbedtls_snprintf( str + idx, sizeof( str ) - idx, " 00" ); + idx += snprintf( str + idx, sizeof( str ) - idx, " 00" ); - mbedtls_snprintf( str + idx, sizeof( str ) - idx, "\n" ); + snprintf( str + idx, sizeof( str ) - idx, "\n" ); debug_send_line( ssl, level, file, line, str ); } #endif /* MBEDTLS_BIGNUM_C */ @@ -298,7 +290,7 @@ static void debug_print_pk( const mbedtls_ssl_context *ssl, int level, if( items[i].type == MBEDTLS_PK_DEBUG_NONE ) return; - mbedtls_snprintf( name, sizeof( name ), "%s%s", text, items[i].name ); + snprintf( name, sizeof( name ), "%s%s", text, items[i].name ); name[sizeof( name ) - 1] = '\0'; if( items[i].type == MBEDTLS_PK_DEBUG_MPI ) @@ -353,7 +345,7 @@ void mbedtls_debug_print_crt( const mbedtls_ssl_context *ssl, int level, { char buf[1024]; - mbedtls_snprintf( str, sizeof( str ), "%s #%d:\n", text, ++i ); + snprintf( str, sizeof( str ), "%s #%d:\n", text, ++i ); debug_send_line( ssl, level, file, line, str ); mbedtls_x509_crt_info( buf, sizeof( buf ) - 1, "", crt ); diff --git a/deps/mbedtls/des.c b/deps/mbedtls/des.c index 1c50f24cd9..7d7f90ba02 100644 --- a/deps/mbedtls/des.c +++ b/deps/mbedtls/des.c @@ -37,15 +37,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_DES_ALT) #include "arc4_alt.h" @@ -808,251 +799,4 @@ int mbedtls_des3_crypt_cbc( mbedtls_des3_context *ctx, #endif /* !MBEDTLS_DES_ALT */ -#if defined(MBEDTLS_SELF_TEST) -/* - * DES and 3DES test vectors from: - * - * http://csrc.nist.gov/groups/STM/cavp/documents/des/tripledes-vectors.zip - */ -static const unsigned char des3_test_keys[24] = -{ - 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, - 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, - 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF, 0x01, 0x23 -}; - -static const unsigned char des3_test_buf[8] = -{ - 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 -}; - -static const unsigned char des3_test_ecb_dec[3][8] = -{ - { 0xCD, 0xD6, 0x4F, 0x2F, 0x94, 0x27, 0xC1, 0x5D }, - { 0x69, 0x96, 0xC8, 0xFA, 0x47, 0xA2, 0xAB, 0xEB }, - { 0x83, 0x25, 0x39, 0x76, 0x44, 0x09, 0x1A, 0x0A } -}; - -static const unsigned char des3_test_ecb_enc[3][8] = -{ - { 0x6A, 0x2A, 0x19, 0xF4, 0x1E, 0xCA, 0x85, 0x4B }, - { 0x03, 0xE6, 0x9F, 0x5B, 0xFA, 0x58, 0xEB, 0x42 }, - { 0xDD, 0x17, 0xE8, 0xB8, 0xB4, 0x37, 0xD2, 0x32 } -}; - -#if defined(MBEDTLS_CIPHER_MODE_CBC) -static const unsigned char des3_test_iv[8] = -{ - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, -}; - -static const unsigned char des3_test_cbc_dec[3][8] = -{ - { 0x12, 0x9F, 0x40, 0xB9, 0xD2, 0x00, 0x56, 0xB3 }, - { 0x47, 0x0E, 0xFC, 0x9A, 0x6B, 0x8E, 0xE3, 0x93 }, - { 0xC5, 0xCE, 0xCF, 0x63, 0xEC, 0xEC, 0x51, 0x4C } -}; - -static const unsigned char des3_test_cbc_enc[3][8] = -{ - { 0x54, 0xF1, 0x5A, 0xF6, 0xEB, 0xE3, 0xA4, 0xB4 }, - { 0x35, 0x76, 0x11, 0x56, 0x5F, 0xA1, 0x8E, 0x4D }, - { 0xCB, 0x19, 0x1F, 0x85, 0xD1, 0xED, 0x84, 0x39 } -}; -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - -/* - * Checkup routine - */ -int mbedtls_des_self_test( int verbose ) -{ - int i, j, u, v, ret = 0; - mbedtls_des_context ctx; - mbedtls_des3_context ctx3; - unsigned char buf[8]; -#if defined(MBEDTLS_CIPHER_MODE_CBC) - unsigned char prv[8]; - unsigned char iv[8]; -#endif - - mbedtls_des_init( &ctx ); - mbedtls_des3_init( &ctx3 ); - /* - * ECB mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " DES%c-ECB-%3d (%s): ", - ( u == 0 ) ? ' ' : '3', 56 + u * 56, - ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( buf, des3_test_buf, 8 ); - - switch( i ) - { - case 0: - mbedtls_des_setkey_dec( &ctx, des3_test_keys ); - break; - - case 1: - mbedtls_des_setkey_enc( &ctx, des3_test_keys ); - break; - - case 2: - mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); - break; - - case 3: - mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); - break; - - case 4: - mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); - break; - - case 5: - mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); - break; - - default: - return( 1 ); - } - - for( j = 0; j < 10000; j++ ) - { - if( u == 0 ) - mbedtls_des_crypt_ecb( &ctx, buf, buf ); - else - mbedtls_des3_crypt_ecb( &ctx3, buf, buf ); - } - - if( ( v == MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_ecb_dec[u], 8 ) != 0 ) || - ( v != MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_ecb_enc[u], 8 ) != 0 ) ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -#if defined(MBEDTLS_CIPHER_MODE_CBC) - /* - * CBC mode - */ - for( i = 0; i < 6; i++ ) - { - u = i >> 1; - v = i & 1; - - if( verbose != 0 ) - mbedtls_printf( " DES%c-CBC-%3d (%s): ", - ( u == 0 ) ? ' ' : '3', 56 + u * 56, - ( v == MBEDTLS_DES_DECRYPT ) ? "dec" : "enc" ); - - memcpy( iv, des3_test_iv, 8 ); - memcpy( prv, des3_test_iv, 8 ); - memcpy( buf, des3_test_buf, 8 ); - - switch( i ) - { - case 0: - mbedtls_des_setkey_dec( &ctx, des3_test_keys ); - break; - - case 1: - mbedtls_des_setkey_enc( &ctx, des3_test_keys ); - break; - - case 2: - mbedtls_des3_set2key_dec( &ctx3, des3_test_keys ); - break; - - case 3: - mbedtls_des3_set2key_enc( &ctx3, des3_test_keys ); - break; - - case 4: - mbedtls_des3_set3key_dec( &ctx3, des3_test_keys ); - break; - - case 5: - mbedtls_des3_set3key_enc( &ctx3, des3_test_keys ); - break; - - default: - return( 1 ); - } - - if( v == MBEDTLS_DES_DECRYPT ) - { - for( j = 0; j < 10000; j++ ) - { - if( u == 0 ) - mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); - else - mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); - } - } - else - { - for( j = 0; j < 10000; j++ ) - { - unsigned char tmp[8]; - - if( u == 0 ) - mbedtls_des_crypt_cbc( &ctx, v, 8, iv, buf, buf ); - else - mbedtls_des3_crypt_cbc( &ctx3, v, 8, iv, buf, buf ); - - memcpy( tmp, prv, 8 ); - memcpy( prv, buf, 8 ); - memcpy( buf, tmp, 8 ); - } - - memcpy( buf, prv, 8 ); - } - - if( ( v == MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_cbc_dec[u], 8 ) != 0 ) || - ( v != MBEDTLS_DES_DECRYPT && - memcmp( buf, des3_test_cbc_enc[u], 8 ) != 0 ) ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } -#endif /* MBEDTLS_CIPHER_MODE_CBC */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_des_free( &ctx ); - mbedtls_des3_free( &ctx3 ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_DES_C */ diff --git a/deps/mbedtls/dhm.c b/deps/mbedtls/dhm.c index 241e0590ae..e70a1fb755 100644 --- a/deps/mbedtls/dhm.c +++ b/deps/mbedtls/dhm.c @@ -47,15 +47,8 @@ #include "mbedtls/asn1.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #include "arc4_alt.h" @@ -530,7 +523,7 @@ static int load_file( const char *path, unsigned char **buf, size_t *n ) *n = (size_t) size; if( *n + 1 == 0 || - ( *buf = (unsigned char*)mbedtls_calloc( 1, *n + 1 ) ) == NULL ) + ( *buf = (unsigned char*)calloc( 1, *n + 1 ) ) == NULL ) { fclose( f ); return( MBEDTLS_ERR_DHM_ALLOC_FAILED ); @@ -539,7 +532,7 @@ static int load_file( const char *path, unsigned char **buf, size_t *n ) if( fread( *buf, 1, *n, f ) != *n ) { fclose( f ); - mbedtls_free( *buf ); + free( *buf ); return( MBEDTLS_ERR_DHM_FILE_IO_ERROR ); } @@ -568,57 +561,11 @@ int mbedtls_dhm_parse_dhmfile( mbedtls_dhm_context *dhm, const char *path ) ret = mbedtls_dhm_parse_dhm( dhm, buf, n ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } #endif /* MBEDTLS_FS_IO */ #endif /* MBEDTLS_ASN1_PARSE_C */ -#if defined(MBEDTLS_SELF_TEST) - -static const char mbedtls_test_dhm_params[] = -"-----BEGIN DH PARAMETERS-----\r\n" -"MIGHAoGBAJ419DBEOgmQTzo5qXl5fQcN9TN455wkOL7052HzxxRVMyhYmwQcgJvh\r\n" -"1sa18fyfR9OiVEMYglOpkqVoGLN7qd5aQNNi5W7/C+VBdHTBJcGZJyyP5B3qcz32\r\n" -"9mLJKudlVudV0Qxk5qUJaPZ/xupz0NyoVpviuiBOI1gNi8ovSXWzAgEC\r\n" -"-----END DH PARAMETERS-----\r\n"; - -static const size_t mbedtls_test_dhm_params_len = sizeof( mbedtls_test_dhm_params ); - -/* - * Checkup routine - */ -int mbedtls_dhm_self_test( int verbose ) -{ - int ret; - mbedtls_dhm_context dhm; - - mbedtls_dhm_init( &dhm ); - - if( verbose != 0 ) - mbedtls_printf( " DHM parameter load: " ); - - if( ( ret = mbedtls_dhm_parse_dhm( &dhm, - (const unsigned char *) mbedtls_test_dhm_params, - mbedtls_test_dhm_params_len ) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n" ); - -exit: - mbedtls_dhm_free( &dhm ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_DHM_C */ diff --git a/deps/mbedtls/ecdsa.c b/deps/mbedtls/ecdsa.c index 4156f3c3c4..dbbc5a4360 100644 --- a/deps/mbedtls/ecdsa.c +++ b/deps/mbedtls/ecdsa.c @@ -339,18 +339,6 @@ cleanup: return( ret ); } -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) && \ - defined(MBEDTLS_ECDSA_DETERMINISTIC) -int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - mbedtls_md_type_t md_alg ) -{ - return( mbedtls_ecdsa_write_signature( ctx, md_alg, hash, hlen, sig, slen, - NULL, NULL ) ); -} -#endif - /* * Read and check signature */ diff --git a/deps/mbedtls/ecjpake.c b/deps/mbedtls/ecjpake.c deleted file mode 100644 index 9218c5d172..0000000000 --- a/deps/mbedtls/ecjpake.c +++ /dev/null @@ -1,1103 +0,0 @@ -/* - * Elliptic curve J-PAKE - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -/* - * References in the code are to the Thread v1.0 Specification, - * available to members of the Thread Group http://threadgroup.org/ - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ECJPAKE_C) - -#include "mbedtls/ecjpake.h" - -#include - -/* - * Convert a mbedtls_ecjpake_role to identifier string - */ -static const char * const ecjpake_id[] = { - "client", - "server" -}; - -#define ID_MINE ( ecjpake_id[ ctx->role ] ) -#define ID_PEER ( ecjpake_id[ 1 - ctx->role ] ) - -/* - * Initialize context - */ -void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx ) -{ - if( ctx == NULL ) - return; - - ctx->md_info = NULL; - mbedtls_ecp_group_init( &ctx->grp ); - ctx->point_format = MBEDTLS_ECP_PF_UNCOMPRESSED; - - mbedtls_ecp_point_init( &ctx->Xm1 ); - mbedtls_ecp_point_init( &ctx->Xm2 ); - mbedtls_ecp_point_init( &ctx->Xp1 ); - mbedtls_ecp_point_init( &ctx->Xp2 ); - mbedtls_ecp_point_init( &ctx->Xp ); - - mbedtls_mpi_init( &ctx->xm1 ); - mbedtls_mpi_init( &ctx->xm2 ); - mbedtls_mpi_init( &ctx->s ); -} - -/* - * Free context - */ -void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx ) -{ - if( ctx == NULL ) - return; - - ctx->md_info = NULL; - mbedtls_ecp_group_free( &ctx->grp ); - - mbedtls_ecp_point_free( &ctx->Xm1 ); - mbedtls_ecp_point_free( &ctx->Xm2 ); - mbedtls_ecp_point_free( &ctx->Xp1 ); - mbedtls_ecp_point_free( &ctx->Xp2 ); - mbedtls_ecp_point_free( &ctx->Xp ); - - mbedtls_mpi_free( &ctx->xm1 ); - mbedtls_mpi_free( &ctx->xm2 ); - mbedtls_mpi_free( &ctx->s ); -} - -/* - * Setup context - */ -int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx, - mbedtls_ecjpake_role role, - mbedtls_md_type_t hash, - mbedtls_ecp_group_id curve, - const unsigned char *secret, - size_t len ) -{ - int ret; - - ctx->role = role; - - if( ( ctx->md_info = mbedtls_md_info_from_type( hash ) ) == NULL ) - return( MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->s, secret, len ) ); - -cleanup: - if( ret != 0 ) - mbedtls_ecjpake_free( ctx ); - - return( ret ); -} - -/* - * Check if context is ready for use - */ -int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx ) -{ - if( ctx->md_info == NULL || - ctx->grp.id == MBEDTLS_ECP_DP_NONE || - ctx->s.p == NULL ) - { - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - } - - return( 0 ); -} - -/* - * Write a point plus its length to a buffer - */ -static int ecjpake_write_len_point( unsigned char **p, - const unsigned char *end, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *P ) -{ - int ret; - size_t len; - - /* Need at least 4 for length plus 1 for point */ - if( end < *p || end - *p < 5 ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - ret = mbedtls_ecp_point_write_binary( grp, P, pf, - &len, *p + 4, end - ( *p + 4 ) ); - if( ret != 0 ) - return( ret ); - - (*p)[0] = (unsigned char)( ( len >> 24 ) & 0xFF ); - (*p)[1] = (unsigned char)( ( len >> 16 ) & 0xFF ); - (*p)[2] = (unsigned char)( ( len >> 8 ) & 0xFF ); - (*p)[3] = (unsigned char)( ( len ) & 0xFF ); - - *p += 4 + len; - - return( 0 ); -} - -/* - * Size of the temporary buffer for ecjpake_hash: - * 3 EC points plus their length, plus ID and its length (4 + 6 bytes) - */ -#define ECJPAKE_HASH_BUF_LEN ( 3 * ( 4 + MBEDTLS_ECP_MAX_PT_LEN ) + 4 + 6 ) - -/* - * Compute hash for ZKP (7.4.2.2.2.1) - */ -static int ecjpake_hash( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_ecp_point *V, - const mbedtls_ecp_point *X, - const char *id, - mbedtls_mpi *h ) -{ - int ret; - unsigned char buf[ECJPAKE_HASH_BUF_LEN]; - unsigned char *p = buf; - const unsigned char *end = buf + sizeof( buf ); - const size_t id_len = strlen( id ); - unsigned char hash[MBEDTLS_MD_MAX_SIZE]; - - /* Write things to temporary buffer */ - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); - MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); - - if( end - p < 4 ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - *p++ = (unsigned char)( ( id_len >> 24 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len >> 16 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len >> 8 ) & 0xFF ); - *p++ = (unsigned char)( ( id_len ) & 0xFF ); - - if( end < p || (size_t)( end - p ) < id_len ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - memcpy( p, id, id_len ); - p += id_len; - - /* Compute hash */ - mbedtls_md( md_info, buf, p - buf, hash ); - - /* Turn it into an integer mod n */ - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, - mbedtls_md_get_size( md_info ) ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); - -cleanup: - return( ret ); -} - -/* - * Parse a ECShnorrZKP (7.4.2.2.2) and verify it (7.4.2.3.3) - */ -static int ecjpake_zkp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_ecp_point *X, - const char *id, - const unsigned char **p, - const unsigned char *end ) -{ - int ret; - mbedtls_ecp_point V, VV; - mbedtls_mpi r, h; - size_t r_len; - - mbedtls_ecp_point_init( &V ); - mbedtls_ecp_point_init( &VV ); - mbedtls_mpi_init( &r ); - mbedtls_mpi_init( &h ); - - /* - * struct { - * ECPoint V; - * opaque r<1..2^8-1>; - * } ECSchnorrZKP; - */ - if( end < *p ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); - - if( end < *p || (size_t)( end - *p ) < 1 ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - r_len = *(*p)++; - - if( end < *p || (size_t)( end - *p ) < r_len ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &r, *p, r_len ) ); - *p += r_len; - - /* - * Verification - */ - MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( (mbedtls_ecp_group *) grp, - &VV, &h, X, &r, G ) ); - - if( mbedtls_ecp_point_cmp( &VV, &V ) != 0 ) - { - ret = MBEDTLS_ERR_ECP_VERIFY_FAILED; - goto cleanup; - } - -cleanup: - mbedtls_ecp_point_free( &V ); - mbedtls_ecp_point_free( &VV ); - mbedtls_mpi_free( &r ); - mbedtls_mpi_free( &h ); - - return( ret ); -} - -/* - * Generate ZKP (7.4.2.3.2) and write it as ECSchnorrZKP (7.4.2.2.2) - */ -static int ecjpake_zkp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - const mbedtls_mpi *x, - const mbedtls_ecp_point *X, - const char *id, - unsigned char **p, - const unsigned char *end, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point V; - mbedtls_mpi v; - mbedtls_mpi h; /* later recycled to hold r */ - size_t len; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - mbedtls_ecp_point_init( &V ); - mbedtls_mpi_init( &v ); - mbedtls_mpi_init( &h ); - - /* Compute signature */ - MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, - G, &v, &V, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &h, &h, x ) ); /* x*h */ - MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &h, &v, &h ) ); /* v - x*h */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &h, &h, &grp->N ) ); /* r */ - - /* Write it out */ - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, &V, - pf, &len, *p, end - *p ) ); - *p += len; - - len = mbedtls_mpi_size( &h ); /* actually r */ - if( end < *p || (size_t)( end - *p ) < 1 + len || len > 255 ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - - *(*p)++ = (unsigned char)( len & 0xFF ); - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &h, *p, len ) ); /* r */ - *p += len; - -cleanup: - mbedtls_ecp_point_free( &V ); - mbedtls_mpi_free( &v ); - mbedtls_mpi_free( &h ); - - return( ret ); -} - -/* - * Parse a ECJPAKEKeyKP (7.4.2.2.1) and check proof - * Output: verified public key X - */ -static int ecjpake_kkp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_ecp_point *X, - const char *id, - const unsigned char **p, - const unsigned char *end ) -{ - int ret; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BAD_INPUT_DATA ); - - /* - * struct { - * ECPoint X; - * ECSchnorrZKP zkp; - * } ECJPAKEKeyKP; - */ - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, X, p, end - *p ) ); - if( mbedtls_ecp_is_zero( X ) ) - { - ret = MBEDTLS_ERR_ECP_INVALID_KEY; - goto cleanup; - } - - MBEDTLS_MPI_CHK( ecjpake_zkp_read( md_info, grp, pf, G, X, id, p, end ) ); - -cleanup: - return( ret ); -} - -/* - * Generate an ECJPAKEKeyKP - * Output: the serialized structure, plus private/public key pair - */ -static int ecjpake_kkp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_mpi *x, - mbedtls_ecp_point *X, - const char *id, - unsigned char **p, - const unsigned char *end, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - size_t len; - - if( end < *p ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - /* Generate key (7.4.2.3.1) and write it out */ - MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair_base( (mbedtls_ecp_group *) grp, G, x, X, - f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( grp, X, - pf, &len, *p, end - *p ) ); - *p += len; - - /* Generate and write proof */ - MBEDTLS_MPI_CHK( ecjpake_zkp_write( md_info, grp, pf, G, x, X, id, - p, end, f_rng, p_rng ) ); - -cleanup: - return( ret ); -} - -/* - * Read a ECJPAKEKeyKPPairList (7.4.2.3) and check proofs - * Ouputs: verified peer public keys Xa, Xb - */ -static int ecjpake_kkpp_read( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_ecp_point *Xa, - mbedtls_ecp_point *Xb, - const char *id, - const unsigned char *buf, - size_t len ) -{ - int ret; - const unsigned char *p = buf; - const unsigned char *end = buf + len; - - /* - * struct { - * ECJPAKEKeyKP ecjpake_key_kp_pair_list[2]; - * } ECJPAKEKeyKPPairList; - */ - MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xa, id, &p, end ) ); - MBEDTLS_MPI_CHK( ecjpake_kkp_read( md_info, grp, pf, G, Xb, id, &p, end ) ); - - if( p != end ) - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - -cleanup: - return( ret ); -} - -/* - * Generate a ECJPAKEKeyKPPairList - * Outputs: the serialized structure, plus two private/public key pairs - */ -static int ecjpake_kkpp_write( const mbedtls_md_info_t *md_info, - const mbedtls_ecp_group *grp, - const int pf, - const mbedtls_ecp_point *G, - mbedtls_mpi *xm1, - mbedtls_ecp_point *Xa, - mbedtls_mpi *xm2, - mbedtls_ecp_point *Xb, - const char *id, - unsigned char *buf, - size_t len, - size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - unsigned char *p = buf; - const unsigned char *end = buf + len; - - MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm1, Xa, id, - &p, end, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( ecjpake_kkp_write( md_info, grp, pf, G, xm2, Xb, id, - &p, end, f_rng, p_rng ) ); - - *olen = p - buf; - -cleanup: - return( ret ); -} - -/* - * Read and process the first round message - */ -int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ) -{ - return( ecjpake_kkpp_read( ctx->md_info, &ctx->grp, ctx->point_format, - &ctx->grp.G, - &ctx->Xp1, &ctx->Xp2, ID_PEER, - buf, len ) ); -} - -/* - * Generate and write the first round message - */ -int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - return( ecjpake_kkpp_write( ctx->md_info, &ctx->grp, ctx->point_format, - &ctx->grp.G, - &ctx->xm1, &ctx->Xm1, &ctx->xm2, &ctx->Xm2, - ID_MINE, buf, len, olen, f_rng, p_rng ) ); -} - -/* - * Compute the sum of three points R = A + B + C - */ -static int ecjpake_ecp_add3( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, - const mbedtls_ecp_point *A, - const mbedtls_ecp_point *B, - const mbedtls_ecp_point *C ) -{ - int ret; - mbedtls_mpi one; - - mbedtls_mpi_init( &one ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, A, &one, B ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( grp, R, &one, R, &one, C ) ); - -cleanup: - mbedtls_mpi_free( &one ); - - return( ret ); -} - -/* - * Read and process second round message (C: 7.4.2.5, S: 7.4.2.6) - */ -int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ) -{ - int ret; - const unsigned char *p = buf; - const unsigned char *end = buf + len; - mbedtls_ecp_group grp; - mbedtls_ecp_point G; /* C: GB, S: GA */ - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &G ); - - /* - * Server: GA = X3 + X4 + X1 (7.4.2.6.1) - * Client: GB = X1 + X2 + X3 (7.4.2.5.1) - * Unified: G = Xm1 + Xm2 + Xp1 - * We need that before parsing in order to check Xp as we read it - */ - MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, - &ctx->Xm1, &ctx->Xm2, &ctx->Xp1 ) ); - - /* - * struct { - * ECParameters curve_params; // only client reading server msg - * ECJPAKEKeyKP ecjpake_key_kp; - * } Client/ServerECJPAKEParams; - */ - if( ctx->role == MBEDTLS_ECJPAKE_CLIENT ) - { - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_group( &grp, &p, len ) ); - if( grp.id != ctx->grp.id ) - { - ret = MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE; - goto cleanup; - } - } - - MBEDTLS_MPI_CHK( ecjpake_kkp_read( ctx->md_info, &ctx->grp, - ctx->point_format, - &G, &ctx->Xp, ID_PEER, &p, end ) ); - - if( p != end ) - { - ret = MBEDTLS_ERR_ECP_BAD_INPUT_DATA; - goto cleanup; - } - -cleanup: - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &G ); - - return( ret ); -} - -/* - * Compute R = +/- X * S mod N, taking care not to leak S - */ -static int ecjpake_mul_secret( mbedtls_mpi *R, int sign, - const mbedtls_mpi *X, - const mbedtls_mpi *S, - const mbedtls_mpi *N, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_mpi b; /* Blinding value, then s + N * blinding */ - - mbedtls_mpi_init( &b ); - - /* b = s + rnd-128-bit * N */ - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &b, 16, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &b, &b, N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &b, &b, S ) ); - - /* R = sign * X * b mod N */ - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( R, X, &b ) ); - R->s *= sign; - MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( R, R, N ) ); - -cleanup: - mbedtls_mpi_free( &b ); - - return( ret ); -} - -/* - * Generate and write the second round message (S: 7.4.2.5, C: 7.4.2.6) - */ -int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point G; /* C: GA, S: GB */ - mbedtls_ecp_point Xm; /* C: Xc, S: Xs */ - mbedtls_mpi xm; /* C: xc, S: xs */ - unsigned char *p = buf; - const unsigned char *end = buf + len; - size_t ec_len; - - mbedtls_ecp_point_init( &G ); - mbedtls_ecp_point_init( &Xm ); - mbedtls_mpi_init( &xm ); - - /* - * First generate private/public key pair (S: 7.4.2.5.1, C: 7.4.2.6.1) - * - * Client: GA = X1 + X3 + X4 | xs = x2 * s | Xc = xc * GA - * Server: GB = X3 + X1 + X2 | xs = x4 * s | Xs = xs * GB - * Unified: G = Xm1 + Xp1 + Xp2 | xm = xm2 * s | Xm = xm * G - */ - MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, - &ctx->Xp1, &ctx->Xp2, &ctx->Xm1 ) ); - MBEDTLS_MPI_CHK( ecjpake_mul_secret( &xm, 1, &ctx->xm2, &ctx->s, - &ctx->grp.N, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &Xm, &xm, &G, f_rng, p_rng ) ); - - /* - * Now write things out - * - * struct { - * ECParameters curve_params; // only server writing its message - * ECJPAKEKeyKP ecjpake_key_kp; - * } Client/ServerECJPAKEParams; - */ - if( ctx->role == MBEDTLS_ECJPAKE_SERVER ) - { - if( end < p ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_group( &ctx->grp, &ec_len, - p, end - p ) ); - p += ec_len; - } - - if( end < p ) - { - ret = MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL; - goto cleanup; - } - MBEDTLS_MPI_CHK( mbedtls_ecp_tls_write_point( &ctx->grp, &Xm, - ctx->point_format, &ec_len, p, end - p ) ); - p += ec_len; - - MBEDTLS_MPI_CHK( ecjpake_zkp_write( ctx->md_info, &ctx->grp, - ctx->point_format, - &G, &xm, &Xm, ID_MINE, - &p, end, f_rng, p_rng ) ); - - *olen = p - buf; - -cleanup: - mbedtls_ecp_point_free( &G ); - mbedtls_ecp_point_free( &Xm ); - mbedtls_mpi_free( &xm ); - - return( ret ); -} - -/* - * Derive PMS (7.4.2.7 / 7.4.2.8) - */ -int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ) -{ - int ret; - mbedtls_ecp_point K; - mbedtls_mpi m_xm2_s, one; - unsigned char kx[MBEDTLS_ECP_MAX_BYTES]; - size_t x_bytes; - - *olen = mbedtls_md_get_size( ctx->md_info ); - if( len < *olen ) - return( MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL ); - - mbedtls_ecp_point_init( &K ); - mbedtls_mpi_init( &m_xm2_s ); - mbedtls_mpi_init( &one ); - - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); - - /* - * Client: K = ( Xs - X4 * x2 * s ) * x2 - * Server: K = ( Xc - X2 * x4 * s ) * x4 - * Unified: K = ( Xp - Xp2 * xm2 * s ) * xm2 - */ - MBEDTLS_MPI_CHK( ecjpake_mul_secret( &m_xm2_s, -1, &ctx->xm2, &ctx->s, - &ctx->grp.N, f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, &K, - &one, &ctx->Xp, - &m_xm2_s, &ctx->Xp2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &K, &ctx->xm2, &K, - f_rng, p_rng ) ); - - /* PMS = SHA-256( K.X ) */ - x_bytes = ( ctx->grp.pbits + 7 ) / 8; - MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &K.X, kx, x_bytes ) ); - MBEDTLS_MPI_CHK( mbedtls_md( ctx->md_info, kx, x_bytes, buf ) ); - -cleanup: - mbedtls_ecp_point_free( &K ); - mbedtls_mpi_free( &m_xm2_s ); - mbedtls_mpi_free( &one ); - - return( ret ); -} - -#undef ID_MINE -#undef ID_PEER - - -#if defined(MBEDTLS_SELF_TEST) - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - -#if !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ - !defined(MBEDTLS_SHA256_C) -int mbedtls_ecjpake_self_test( int verbose ) -{ - (void) verbose; - return( 0 ); -} -#else - -static const unsigned char ecjpake_test_password[] = { - 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x6a, 0x70, 0x61, 0x6b, 0x65, 0x74, - 0x65, 0x73, 0x74 -}; - -static const unsigned char ecjpake_test_x1[] = { - 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, - 0x0d, 0x0e, 0x0f, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, - 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x21 -}; - -static const unsigned char ecjpake_test_x2[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x3[] = { - 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6a, 0x6b, 0x6c, - 0x6d, 0x6e, 0x6f, 0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, - 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, 0x81 -}; - -static const unsigned char ecjpake_test_x4[] = { - 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, - 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, - 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, 0xe1 -}; - -static const unsigned char ecjpake_test_cli_one[] = { - 0x41, 0x04, 0xac, 0xcf, 0x01, 0x06, 0xef, 0x85, 0x8f, 0xa2, 0xd9, 0x19, - 0x33, 0x13, 0x46, 0x80, 0x5a, 0x78, 0xb5, 0x8b, 0xba, 0xd0, 0xb8, 0x44, - 0xe5, 0xc7, 0x89, 0x28, 0x79, 0x14, 0x61, 0x87, 0xdd, 0x26, 0x66, 0xad, - 0xa7, 0x81, 0xbb, 0x7f, 0x11, 0x13, 0x72, 0x25, 0x1a, 0x89, 0x10, 0x62, - 0x1f, 0x63, 0x4d, 0xf1, 0x28, 0xac, 0x48, 0xe3, 0x81, 0xfd, 0x6e, 0xf9, - 0x06, 0x07, 0x31, 0xf6, 0x94, 0xa4, 0x41, 0x04, 0x1d, 0xd0, 0xbd, 0x5d, - 0x45, 0x66, 0xc9, 0xbe, 0xd9, 0xce, 0x7d, 0xe7, 0x01, 0xb5, 0xe8, 0x2e, - 0x08, 0xe8, 0x4b, 0x73, 0x04, 0x66, 0x01, 0x8a, 0xb9, 0x03, 0xc7, 0x9e, - 0xb9, 0x82, 0x17, 0x22, 0x36, 0xc0, 0xc1, 0x72, 0x8a, 0xe4, 0xbf, 0x73, - 0x61, 0x0d, 0x34, 0xde, 0x44, 0x24, 0x6e, 0xf3, 0xd9, 0xc0, 0x5a, 0x22, - 0x36, 0xfb, 0x66, 0xa6, 0x58, 0x3d, 0x74, 0x49, 0x30, 0x8b, 0xab, 0xce, - 0x20, 0x72, 0xfe, 0x16, 0x66, 0x29, 0x92, 0xe9, 0x23, 0x5c, 0x25, 0x00, - 0x2f, 0x11, 0xb1, 0x50, 0x87, 0xb8, 0x27, 0x38, 0xe0, 0x3c, 0x94, 0x5b, - 0xf7, 0xa2, 0x99, 0x5d, 0xda, 0x1e, 0x98, 0x34, 0x58, 0x41, 0x04, 0x7e, - 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, 0xd7, 0x92, 0x62, - 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, 0x40, 0x9a, 0xc5, - 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, 0x79, 0x0a, 0xeb, - 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, 0xd1, 0xc3, 0x35, - 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, 0xe3, 0x2b, 0xb0, - 0x13, 0xbb, 0x2b, 0x41, 0x04, 0xa4, 0x95, 0x58, 0xd3, 0x2e, 0xd1, 0xeb, - 0xfc, 0x18, 0x16, 0xaf, 0x4f, 0xf0, 0x9b, 0x55, 0xfc, 0xb4, 0xca, 0x47, - 0xb2, 0xa0, 0x2d, 0x1e, 0x7c, 0xaf, 0x11, 0x79, 0xea, 0x3f, 0xe1, 0x39, - 0x5b, 0x22, 0xb8, 0x61, 0x96, 0x40, 0x16, 0xfa, 0xba, 0xf7, 0x2c, 0x97, - 0x56, 0x95, 0xd9, 0x3d, 0x4d, 0xf0, 0xe5, 0x19, 0x7f, 0xe9, 0xf0, 0x40, - 0x63, 0x4e, 0xd5, 0x97, 0x64, 0x93, 0x77, 0x87, 0xbe, 0x20, 0xbc, 0x4d, - 0xee, 0xbb, 0xf9, 0xb8, 0xd6, 0x0a, 0x33, 0x5f, 0x04, 0x6c, 0xa3, 0xaa, - 0x94, 0x1e, 0x45, 0x86, 0x4c, 0x7c, 0xad, 0xef, 0x9c, 0xf7, 0x5b, 0x3d, - 0x8b, 0x01, 0x0e, 0x44, 0x3e, 0xf0 -}; - -static const unsigned char ecjpake_test_srv_one[] = { - 0x41, 0x04, 0x7e, 0xa6, 0xe3, 0xa4, 0x48, 0x70, 0x37, 0xa9, 0xe0, 0xdb, - 0xd7, 0x92, 0x62, 0xb2, 0xcc, 0x27, 0x3e, 0x77, 0x99, 0x30, 0xfc, 0x18, - 0x40, 0x9a, 0xc5, 0x36, 0x1c, 0x5f, 0xe6, 0x69, 0xd7, 0x02, 0xe1, 0x47, - 0x79, 0x0a, 0xeb, 0x4c, 0xe7, 0xfd, 0x65, 0x75, 0xab, 0x0f, 0x6c, 0x7f, - 0xd1, 0xc3, 0x35, 0x93, 0x9a, 0xa8, 0x63, 0xba, 0x37, 0xec, 0x91, 0xb7, - 0xe3, 0x2b, 0xb0, 0x13, 0xbb, 0x2b, 0x41, 0x04, 0x09, 0xf8, 0x5b, 0x3d, - 0x20, 0xeb, 0xd7, 0x88, 0x5c, 0xe4, 0x64, 0xc0, 0x8d, 0x05, 0x6d, 0x64, - 0x28, 0xfe, 0x4d, 0xd9, 0x28, 0x7a, 0xa3, 0x65, 0xf1, 0x31, 0xf4, 0x36, - 0x0f, 0xf3, 0x86, 0xd8, 0x46, 0x89, 0x8b, 0xc4, 0xb4, 0x15, 0x83, 0xc2, - 0xa5, 0x19, 0x7f, 0x65, 0xd7, 0x87, 0x42, 0x74, 0x6c, 0x12, 0xa5, 0xec, - 0x0a, 0x4f, 0xfe, 0x2f, 0x27, 0x0a, 0x75, 0x0a, 0x1d, 0x8f, 0xb5, 0x16, - 0x20, 0x93, 0x4d, 0x74, 0xeb, 0x43, 0xe5, 0x4d, 0xf4, 0x24, 0xfd, 0x96, - 0x30, 0x6c, 0x01, 0x17, 0xbf, 0x13, 0x1a, 0xfa, 0xbf, 0x90, 0xa9, 0xd3, - 0x3d, 0x11, 0x98, 0xd9, 0x05, 0x19, 0x37, 0x35, 0x14, 0x41, 0x04, 0x19, - 0x0a, 0x07, 0x70, 0x0f, 0xfa, 0x4b, 0xe6, 0xae, 0x1d, 0x79, 0xee, 0x0f, - 0x06, 0xae, 0xb5, 0x44, 0xcd, 0x5a, 0xdd, 0xaa, 0xbe, 0xdf, 0x70, 0xf8, - 0x62, 0x33, 0x21, 0x33, 0x2c, 0x54, 0xf3, 0x55, 0xf0, 0xfb, 0xfe, 0xc7, - 0x83, 0xed, 0x35, 0x9e, 0x5d, 0x0b, 0xf7, 0x37, 0x7a, 0x0f, 0xc4, 0xea, - 0x7a, 0xce, 0x47, 0x3c, 0x9c, 0x11, 0x2b, 0x41, 0xcc, 0xd4, 0x1a, 0xc5, - 0x6a, 0x56, 0x12, 0x41, 0x04, 0x36, 0x0a, 0x1c, 0xea, 0x33, 0xfc, 0xe6, - 0x41, 0x15, 0x64, 0x58, 0xe0, 0xa4, 0xea, 0xc2, 0x19, 0xe9, 0x68, 0x31, - 0xe6, 0xae, 0xbc, 0x88, 0xb3, 0xf3, 0x75, 0x2f, 0x93, 0xa0, 0x28, 0x1d, - 0x1b, 0xf1, 0xfb, 0x10, 0x60, 0x51, 0xdb, 0x96, 0x94, 0xa8, 0xd6, 0xe8, - 0x62, 0xa5, 0xef, 0x13, 0x24, 0xa3, 0xd9, 0xe2, 0x78, 0x94, 0xf1, 0xee, - 0x4f, 0x7c, 0x59, 0x19, 0x99, 0x65, 0xa8, 0xdd, 0x4a, 0x20, 0x91, 0x84, - 0x7d, 0x2d, 0x22, 0xdf, 0x3e, 0xe5, 0x5f, 0xaa, 0x2a, 0x3f, 0xb3, 0x3f, - 0xd2, 0xd1, 0xe0, 0x55, 0xa0, 0x7a, 0x7c, 0x61, 0xec, 0xfb, 0x8d, 0x80, - 0xec, 0x00, 0xc2, 0xc9, 0xeb, 0x12 -}; - -static const unsigned char ecjpake_test_srv_two[] = { - 0x03, 0x00, 0x17, 0x41, 0x04, 0x0f, 0xb2, 0x2b, 0x1d, 0x5d, 0x11, 0x23, - 0xe0, 0xef, 0x9f, 0xeb, 0x9d, 0x8a, 0x2e, 0x59, 0x0a, 0x1f, 0x4d, 0x7c, - 0xed, 0x2c, 0x2b, 0x06, 0x58, 0x6e, 0x8f, 0x2a, 0x16, 0xd4, 0xeb, 0x2f, - 0xda, 0x43, 0x28, 0xa2, 0x0b, 0x07, 0xd8, 0xfd, 0x66, 0x76, 0x54, 0xca, - 0x18, 0xc5, 0x4e, 0x32, 0xa3, 0x33, 0xa0, 0x84, 0x54, 0x51, 0xe9, 0x26, - 0xee, 0x88, 0x04, 0xfd, 0x7a, 0xf0, 0xaa, 0xa7, 0xa6, 0x41, 0x04, 0x55, - 0x16, 0xea, 0x3e, 0x54, 0xa0, 0xd5, 0xd8, 0xb2, 0xce, 0x78, 0x6b, 0x38, - 0xd3, 0x83, 0x37, 0x00, 0x29, 0xa5, 0xdb, 0xe4, 0x45, 0x9c, 0x9d, 0xd6, - 0x01, 0xb4, 0x08, 0xa2, 0x4a, 0xe6, 0x46, 0x5c, 0x8a, 0xc9, 0x05, 0xb9, - 0xeb, 0x03, 0xb5, 0xd3, 0x69, 0x1c, 0x13, 0x9e, 0xf8, 0x3f, 0x1c, 0xd4, - 0x20, 0x0f, 0x6c, 0x9c, 0xd4, 0xec, 0x39, 0x22, 0x18, 0xa5, 0x9e, 0xd2, - 0x43, 0xd3, 0xc8, 0x20, 0xff, 0x72, 0x4a, 0x9a, 0x70, 0xb8, 0x8c, 0xb8, - 0x6f, 0x20, 0xb4, 0x34, 0xc6, 0x86, 0x5a, 0xa1, 0xcd, 0x79, 0x06, 0xdd, - 0x7c, 0x9b, 0xce, 0x35, 0x25, 0xf5, 0x08, 0x27, 0x6f, 0x26, 0x83, 0x6c -}; - -static const unsigned char ecjpake_test_cli_two[] = { - 0x41, 0x04, 0x69, 0xd5, 0x4e, 0xe8, 0x5e, 0x90, 0xce, 0x3f, 0x12, 0x46, - 0x74, 0x2d, 0xe5, 0x07, 0xe9, 0x39, 0xe8, 0x1d, 0x1d, 0xc1, 0xc5, 0xcb, - 0x98, 0x8b, 0x58, 0xc3, 0x10, 0xc9, 0xfd, 0xd9, 0x52, 0x4d, 0x93, 0x72, - 0x0b, 0x45, 0x54, 0x1c, 0x83, 0xee, 0x88, 0x41, 0x19, 0x1d, 0xa7, 0xce, - 0xd8, 0x6e, 0x33, 0x12, 0xd4, 0x36, 0x23, 0xc1, 0xd6, 0x3e, 0x74, 0x98, - 0x9a, 0xba, 0x4a, 0xff, 0xd1, 0xee, 0x41, 0x04, 0x07, 0x7e, 0x8c, 0x31, - 0xe2, 0x0e, 0x6b, 0xed, 0xb7, 0x60, 0xc1, 0x35, 0x93, 0xe6, 0x9f, 0x15, - 0xbe, 0x85, 0xc2, 0x7d, 0x68, 0xcd, 0x09, 0xcc, 0xb8, 0xc4, 0x18, 0x36, - 0x08, 0x91, 0x7c, 0x5c, 0x3d, 0x40, 0x9f, 0xac, 0x39, 0xfe, 0xfe, 0xe8, - 0x2f, 0x72, 0x92, 0xd3, 0x6f, 0x0d, 0x23, 0xe0, 0x55, 0x91, 0x3f, 0x45, - 0xa5, 0x2b, 0x85, 0xdd, 0x8a, 0x20, 0x52, 0xe9, 0xe1, 0x29, 0xbb, 0x4d, - 0x20, 0x0f, 0x01, 0x1f, 0x19, 0x48, 0x35, 0x35, 0xa6, 0xe8, 0x9a, 0x58, - 0x0c, 0x9b, 0x00, 0x03, 0xba, 0xf2, 0x14, 0x62, 0xec, 0xe9, 0x1a, 0x82, - 0xcc, 0x38, 0xdb, 0xdc, 0xae, 0x60, 0xd9, 0xc5, 0x4c -}; - -static const unsigned char ecjpake_test_pms[] = { - 0xf3, 0xd4, 0x7f, 0x59, 0x98, 0x44, 0xdb, 0x92, 0xa5, 0x69, 0xbb, 0xe7, - 0x98, 0x1e, 0x39, 0xd9, 0x31, 0xfd, 0x74, 0x3b, 0xf2, 0x2e, 0x98, 0xf9, - 0xb4, 0x38, 0xf7, 0x19, 0xd3, 0xc4, 0xf3, 0x51 -}; - -/* Load my private keys and generate the correponding public keys */ -static int ecjpake_test_load( mbedtls_ecjpake_context *ctx, - const unsigned char *xm1, size_t len1, - const unsigned char *xm2, size_t len2 ) -{ - int ret; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm1, xm1, len1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm2, xm2, len2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm1, &ctx->xm1, - &ctx->grp.G, NULL, NULL ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &ctx->grp, &ctx->Xm2, &ctx->xm2, - &ctx->grp.G, NULL, NULL ) ); - -cleanup: - return( ret ); -} - -/* For tests we don't need a secure RNG; - * use the LGC from Numerical Recipes for simplicity */ -static int ecjpake_lgc( void *p, unsigned char *out, size_t len ) -{ - static uint32_t x = 42; - (void) p; - - while( len > 0 ) - { - size_t use_len = len > 4 ? 4 : len; - x = 1664525 * x + 1013904223; - memcpy( out, &x, use_len ); - out += use_len; - len -= use_len; - } - - return( 0 ); -} - -#define TEST_ASSERT( x ) \ - do { \ - if( x ) \ - ret = 0; \ - else \ - { \ - ret = 1; \ - goto cleanup; \ - } \ - } while( 0 ) - -/* - * Checkup routine - */ -int mbedtls_ecjpake_self_test( int verbose ) -{ - int ret; - mbedtls_ecjpake_context cli; - mbedtls_ecjpake_context srv; - unsigned char buf[512], pms[32]; - size_t len, pmslen; - - mbedtls_ecjpake_init( &cli ); - mbedtls_ecjpake_init( &srv ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #0 (setup): " ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &cli, MBEDTLS_ECJPAKE_CLIENT, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, - ecjpake_test_password, - sizeof( ecjpake_test_password ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_setup( &srv, MBEDTLS_ECJPAKE_SERVER, - MBEDTLS_MD_SHA256, MBEDTLS_ECP_DP_SECP256R1, - ecjpake_test_password, - sizeof( ecjpake_test_password ) ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #1 (random handshake): " ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_one( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &srv, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_one( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &cli, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_two( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &cli, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &cli, - pms, sizeof( pms ), &pmslen, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_write_round_two( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &srv, buf, len ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == pmslen ); - TEST_ASSERT( memcmp( buf, pms, len ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECJPAKE test #2 (reference handshake): " ); - - /* Simulate generation of round one */ - MBEDTLS_MPI_CHK( ecjpake_test_load( &cli, - ecjpake_test_x1, sizeof( ecjpake_test_x1 ), - ecjpake_test_x2, sizeof( ecjpake_test_x2 ) ) ); - - MBEDTLS_MPI_CHK( ecjpake_test_load( &srv, - ecjpake_test_x3, sizeof( ecjpake_test_x3 ), - ecjpake_test_x4, sizeof( ecjpake_test_x4 ) ) ); - - /* Read round one */ - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &srv, - ecjpake_test_cli_one, - sizeof( ecjpake_test_cli_one ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_one( &cli, - ecjpake_test_srv_one, - sizeof( ecjpake_test_srv_one ) ) == 0 ); - - /* Skip generation of round two, read round two */ - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &cli, - ecjpake_test_srv_two, - sizeof( ecjpake_test_srv_two ) ) == 0 ); - - TEST_ASSERT( mbedtls_ecjpake_read_round_two( &srv, - ecjpake_test_cli_two, - sizeof( ecjpake_test_cli_two ) ) == 0 ); - - /* Server derives PMS */ - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &srv, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == sizeof( ecjpake_test_pms ) ); - TEST_ASSERT( memcmp( buf, ecjpake_test_pms, len ) == 0 ); - - memset( buf, 0, len ); /* Avoid interferences with next step */ - - /* Client derives PMS */ - TEST_ASSERT( mbedtls_ecjpake_derive_secret( &cli, - buf, sizeof( buf ), &len, ecjpake_lgc, NULL ) == 0 ); - - TEST_ASSERT( len == sizeof( ecjpake_test_pms ) ); - TEST_ASSERT( memcmp( buf, ecjpake_test_pms, len ) == 0 ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - mbedtls_ecjpake_free( &cli ); - mbedtls_ecjpake_free( &srv ); - - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#undef TEST_ASSERT - -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED && MBEDTLS_SHA256_C */ - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_ECJPAKE_C */ diff --git a/deps/mbedtls/ecp.c b/deps/mbedtls/ecp.c index 71f4e2fcb6..8de5b61705 100644 --- a/deps/mbedtls/ecp.c +++ b/deps/mbedtls/ecp.c @@ -55,33 +55,15 @@ #if !defined(MBEDTLS_ECP_ALT) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif + +#include #include "mbedtls/ecp_internal.h" -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - #include "arc4_alt.h" -#if defined(MBEDTLS_SELF_TEST) -/* - * Counts of point addition and doubling, and field multiplications. - * Used to test resistance of point multiplication to simple timing attacks. - */ -static unsigned long add_count, dbl_count, mul_count; -#endif - #if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) || \ defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) || \ defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) || \ @@ -339,7 +321,7 @@ void mbedtls_ecp_group_free( mbedtls_ecp_group *grp ) { for( i = 0; i < grp->T_size; i++ ) mbedtls_ecp_point_free( &grp->T[i] ); - mbedtls_free( grp->T ); + free( grp->T ); } mbedtls_zeroize( grp, sizeof( mbedtls_ecp_group ) ); @@ -702,11 +684,7 @@ cleanup: /* * Reduce a mbedtls_mpi mod p in-place, general case, to use after mbedtls_mpi_mul_mpi */ -#if defined(MBEDTLS_SELF_TEST) -#define INC_MUL_COUNT mul_count++; -#else #define INC_MUL_COUNT -#endif #define MOD_MUL( N ) do { MBEDTLS_MPI_CHK( ecp_modp( &N, grp ) ); INC_MUL_COUNT } \ while( 0 ) @@ -810,7 +788,7 @@ static int ecp_normalize_jac_many( const mbedtls_ecp_group *grp, } #endif - if( ( c = (mbedtls_mpi*)mbedtls_calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) + if( ( c = (mbedtls_mpi*)calloc( t_len, sizeof( mbedtls_mpi ) ) ) == NULL ) return( MBEDTLS_ERR_ECP_ALLOC_FAILED ); mbedtls_mpi_init( &u ); mbedtls_mpi_init( &Zi ); mbedtls_mpi_init( &ZZi ); @@ -872,7 +850,7 @@ cleanup: mbedtls_mpi_free( &u ); mbedtls_mpi_free( &Zi ); mbedtls_mpi_free( &ZZi ); for( i = 0; i < t_len; i++ ) mbedtls_mpi_free( &c[i] ); - mbedtls_free( c ); + free( c ); return( ret ); } @@ -922,10 +900,6 @@ static int ecp_double_jac( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, int ret; mbedtls_mpi M, S, T, U; -#if defined(MBEDTLS_SELF_TEST) - dbl_count++; -#endif - #if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT) if ( mbedtls_internal_ecp_grp_capable( grp ) ) { @@ -1020,10 +994,6 @@ static int ecp_add_mixed( const mbedtls_ecp_group *grp, mbedtls_ecp_point *R, int ret; mbedtls_mpi T1, T2, T3, T4, X, Y, Z; -#if defined(MBEDTLS_SELF_TEST) - add_count++; -#endif - #if defined(MBEDTLS_ECP_ADD_MIXED_ALT) if ( mbedtls_internal_ecp_grp_capable( grp ) ) { @@ -1405,7 +1375,7 @@ static int ecp_mul_comb( mbedtls_ecp_group *grp, mbedtls_ecp_point *R, if( T == NULL ) { - T = (mbedtls_ecp_point*)mbedtls_calloc( pre_len, sizeof( mbedtls_ecp_point ) ); + T = (mbedtls_ecp_point*)calloc( pre_len, sizeof( mbedtls_ecp_point ) ); if( T == NULL ) { ret = MBEDTLS_ERR_ECP_ALLOC_FAILED; @@ -1448,7 +1418,7 @@ cleanup: { for( i = 0; i < pre_len; i++ ) mbedtls_ecp_point_free( &T[i] ); - mbedtls_free( T ); + free( T ); } mbedtls_mpi_free( &M ); @@ -2057,137 +2027,6 @@ cleanup: return( ret ); } -#if defined(MBEDTLS_SELF_TEST) - -/* - * Checkup routine - */ -int mbedtls_ecp_self_test( int verbose ) -{ - int ret; - size_t i; - mbedtls_ecp_group grp; - mbedtls_ecp_point R, P; - mbedtls_mpi m; - unsigned long add_c_prev, dbl_c_prev, mul_c_prev; - /* exponents especially adapted for secp192r1 */ - const char *exponents[] = - { - "000000000000000000000000000000000000000000000001", /* one */ - "FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22830", /* N - 1 */ - "5EA6F389A38B8BC81E767753B15AA5569E1782E30ABE7D25", /* random */ - "400000000000000000000000000000000000000000000000", /* one and zeros */ - "7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF", /* all ones */ - "555555555555555555555555555555555555555555555555", /* 101010... */ - }; - - mbedtls_ecp_group_init( &grp ); - mbedtls_ecp_point_init( &R ); - mbedtls_ecp_point_init( &P ); - mbedtls_mpi_init( &m ); - - /* Use secp192r1 if available, or any available curve */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &grp, MBEDTLS_ECP_DP_SECP192R1 ) ); -#else - MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &grp, mbedtls_ecp_curve_list()->grp_id ) ); -#endif - - if( verbose != 0 ) - mbedtls_printf( " ECP test #1 (constant op_count, base point G): " ); - - /* Do a dummy multiplication first to trigger precomputation */ - MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &m, 2 ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &P, &m, &grp.G, NULL, NULL ) ); - - add_count = 0; - dbl_count = 0; - mul_count = 0; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[0] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &grp.G, NULL, NULL ) ); - - for( i = 1; i < sizeof( exponents ) / sizeof( exponents[0] ); i++ ) - { - add_c_prev = add_count; - dbl_c_prev = dbl_count; - mul_c_prev = mul_count; - add_count = 0; - dbl_count = 0; - mul_count = 0; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &grp.G, NULL, NULL ) ); - - if( add_count != add_c_prev || - dbl_count != dbl_c_prev || - mul_count != mul_c_prev ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (%u)\n", (unsigned int) i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " ECP test #2 (constant op_count, other point): " ); - /* We computed P = 2G last time, use it */ - - add_count = 0; - dbl_count = 0; - mul_count = 0; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[0] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &P, NULL, NULL ) ); - - for( i = 1; i < sizeof( exponents ) / sizeof( exponents[0] ); i++ ) - { - add_c_prev = add_count; - dbl_c_prev = dbl_count; - mul_c_prev = mul_count; - add_count = 0; - dbl_count = 0; - mul_count = 0; - - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &m, 16, exponents[i] ) ); - MBEDTLS_MPI_CHK( mbedtls_ecp_mul( &grp, &R, &m, &P, NULL, NULL ) ); - - if( add_count != add_c_prev || - dbl_count != dbl_c_prev || - mul_count != mul_c_prev ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (%u)\n", (unsigned int) i ); - - ret = 1; - goto cleanup; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - - if( ret < 0 && verbose != 0 ) - mbedtls_printf( "Unexpected error, return code = %08X\n", ret ); - - mbedtls_ecp_group_free( &grp ); - mbedtls_ecp_point_free( &R ); - mbedtls_ecp_point_free( &P ); - mbedtls_mpi_free( &m ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* !MBEDTLS_ECP_ALT */ #endif /* MBEDTLS_ECP_C */ diff --git a/deps/mbedtls/entropy.c b/deps/mbedtls/entropy.c index 75e2ea7389..f91db91b10 100644 --- a/deps/mbedtls/entropy.c +++ b/deps/mbedtls/entropy.c @@ -27,12 +27,6 @@ #if defined(MBEDTLS_ENTROPY_C) -#if defined(MBEDTLS_TEST_NULL_ENTROPY) -#warning "**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined! " -#warning "**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES " -#warning "**** THIS BUILD IS *NOT* SUITABLE FOR PRODUCTION USE " -#endif - #include "mbedtls/entropy.h" #include "mbedtls/entropy_poll.h" @@ -42,23 +36,6 @@ #include #endif -#if defined(MBEDTLS_ENTROPY_NV_SEED) -#include "mbedtls/platform.h" -#endif - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if defined(MBEDTLS_HAVEGE_C) -#include "mbedtls/havege.h" -#endif - #include "arc4_alt.h" #define ENTROPY_MAX_LOOP 256 /**< Maximum amount to loop before error */ @@ -76,49 +53,24 @@ void mbedtls_entropy_init( mbedtls_entropy_context *ctx ) #else mbedtls_sha256_starts( &ctx->accumulator, 0 ); #endif -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_init( &ctx->havege_data ); -#endif -#if defined(MBEDTLS_TEST_NULL_ENTROPY) - mbedtls_entropy_add_source( ctx, mbedtls_null_entropy_poll, NULL, - 1, MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif - -#if !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) mbedtls_entropy_add_source( ctx, mbedtls_platform_entropy_poll, NULL, MBEDTLS_ENTROPY_MIN_PLATFORM, MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif #if defined(MBEDTLS_TIMING_C) mbedtls_entropy_add_source( ctx, mbedtls_hardclock_poll, NULL, MBEDTLS_ENTROPY_MIN_HARDCLOCK, MBEDTLS_ENTROPY_SOURCE_WEAK ); #endif -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_entropy_add_source( ctx, mbedtls_havege_poll, &ctx->havege_data, - MBEDTLS_ENTROPY_MIN_HAVEGE, - MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif #if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) mbedtls_entropy_add_source( ctx, mbedtls_hardware_poll, NULL, MBEDTLS_ENTROPY_MIN_HARDWARE, MBEDTLS_ENTROPY_SOURCE_STRONG ); #endif -#if defined(MBEDTLS_ENTROPY_NV_SEED) - mbedtls_entropy_add_source( ctx, mbedtls_nv_seed_poll, NULL, - MBEDTLS_ENTROPY_BLOCK_SIZE, - MBEDTLS_ENTROPY_SOURCE_STRONG ); -#endif -#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */ } void mbedtls_entropy_free( mbedtls_entropy_context *ctx ) { -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_free( &ctx->havege_data ); -#endif #if defined(MBEDTLS_THREADING_C) mbedtls_mutex_free( &ctx->mutex ); #endif @@ -289,18 +241,6 @@ int mbedtls_entropy_func( void *data, unsigned char *output, size_t len ) if( len > MBEDTLS_ENTROPY_BLOCK_SIZE ) return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); -#if defined(MBEDTLS_ENTROPY_NV_SEED) - /* Update the NV entropy seed before generating any entropy for outside - * use. - */ - if( ctx->initial_entropy_run == 0 ) - { - ctx->initial_entropy_run = 1; - if( ( ret = mbedtls_entropy_update_nv_seed( ctx ) ) != 0 ) - return( ret ); - } -#endif - #if defined(MBEDTLS_THREADING_C) if( ( ret = mbedtls_mutex_lock( &ctx->mutex ) ) != 0 ) return( ret ); @@ -375,27 +315,6 @@ exit: return( ret ); } -#if defined(MBEDTLS_ENTROPY_NV_SEED) -int mbedtls_entropy_update_nv_seed( mbedtls_entropy_context *ctx ) -{ - int ret = MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR; - unsigned char buf[ MBEDTLS_ENTROPY_MAX_SEED_SIZE ]; - - /* Read new seed and write it to NV */ - if( ( ret = mbedtls_entropy_func( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) ) != 0 ) - return( ret ); - - if( mbedtls_nv_seed_write( buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) < 0 ) - return( MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR ); - - /* Manually update the remaining stream with a separator value to diverge */ - memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE ); - mbedtls_entropy_update_manual( ctx, buf, MBEDTLS_ENTROPY_BLOCK_SIZE ); - - return( 0 ); -} -#endif /* MBEDTLS_ENTROPY_NV_SEED */ - #if defined(MBEDTLS_FS_IO) int mbedtls_entropy_write_seed_file( mbedtls_entropy_context *ctx, const char *path ) { @@ -452,201 +371,4 @@ int mbedtls_entropy_update_seed_file( mbedtls_entropy_context *ctx, const char * } #endif /* MBEDTLS_FS_IO */ -#if defined(MBEDTLS_SELF_TEST) -#if !defined(MBEDTLS_TEST_NULL_ENTROPY) -/* - * Dummy source function - */ -static int entropy_dummy_source( void *data, unsigned char *output, - size_t len, size_t *olen ) -{ - ((void) data); - - memset( output, 0x2a, len ); - *olen = len; - - return( 0 ); -} -#endif /* !MBEDTLS_TEST_NULL_ENTROPY */ - -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - -static int mbedtls_entropy_source_self_test_gather( unsigned char *buf, size_t buf_len ) -{ - int ret = 0; - size_t entropy_len = 0; - size_t olen = 0; - size_t attempts = buf_len; - - while( attempts > 0 && entropy_len < buf_len ) - { - if( ( ret = mbedtls_hardware_poll( NULL, buf + entropy_len, - buf_len - entropy_len, &olen ) ) != 0 ) - return( ret ); - - entropy_len += olen; - attempts--; - } - - if( entropy_len < buf_len ) - { - ret = 1; - } - - return( ret ); -} - - -static int mbedtls_entropy_source_self_test_check_bits( const unsigned char *buf, - size_t buf_len ) -{ - unsigned char set= 0xFF; - unsigned char unset = 0x00; - size_t i; - - for( i = 0; i < buf_len; i++ ) - { - set &= buf[i]; - unset |= buf[i]; - } - - return( set == 0xFF || unset == 0x00 ); -} - -/* - * A test to ensure hat the entropy sources are functioning correctly - * and there is no obvious failure. The test performs the following checks: - * - The entropy source is not providing only 0s (all bits unset) or 1s (all - * bits set). - * - The entropy source is not providing values in a pattern. Because the - * hardware could be providing data in an arbitrary length, this check polls - * the hardware entropy source twice and compares the result to ensure they - * are not equal. - * - The error code returned by the entropy source is not an error. - */ -int mbedtls_entropy_source_self_test( int verbose ) -{ - int ret = 0; - unsigned char buf0[2 * sizeof( unsigned long long int )]; - unsigned char buf1[2 * sizeof( unsigned long long int )]; - - if( verbose != 0 ) - mbedtls_printf( " ENTROPY_BIAS test: " ); - - memset( buf0, 0x00, sizeof( buf0 ) ); - memset( buf1, 0x00, sizeof( buf1 ) ); - - if( ( ret = mbedtls_entropy_source_self_test_gather( buf0, sizeof( buf0 ) ) ) != 0 ) - goto cleanup; - if( ( ret = mbedtls_entropy_source_self_test_gather( buf1, sizeof( buf1 ) ) ) != 0 ) - goto cleanup; - - /* Make sure that the returned values are not all 0 or 1 */ - if( ( ret = mbedtls_entropy_source_self_test_check_bits( buf0, sizeof( buf0 ) ) ) != 0 ) - goto cleanup; - if( ( ret = mbedtls_entropy_source_self_test_check_bits( buf1, sizeof( buf1 ) ) ) != 0 ) - goto cleanup; - - /* Make sure that the entropy source is not returning values in a - * pattern */ - ret = memcmp( buf0, buf1, sizeof( buf0 ) ) == 0; - -cleanup: - if( verbose != 0 ) - { - if( ret != 0 ) - mbedtls_printf( "failed\n" ); - else - mbedtls_printf( "passed\n" ); - - mbedtls_printf( "\n" ); - } - - return( ret != 0 ); -} - -#endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ - -/* - * The actual entropy quality is hard to test, but we can at least - * test that the functions don't cause errors and write the correct - * amount of data to buffers. - */ -int mbedtls_entropy_self_test( int verbose ) -{ - int ret = 1; -#if !defined(MBEDTLS_TEST_NULL_ENTROPY) - mbedtls_entropy_context ctx; - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; - unsigned char acc[MBEDTLS_ENTROPY_BLOCK_SIZE] = { 0 }; - size_t i, j; -#endif /* !MBEDTLS_TEST_NULL_ENTROPY */ - - if( verbose != 0 ) - mbedtls_printf( " ENTROPY test: " ); - -#if !defined(MBEDTLS_TEST_NULL_ENTROPY) - mbedtls_entropy_init( &ctx ); - - /* First do a gather to make sure we have default sources */ - if( ( ret = mbedtls_entropy_gather( &ctx ) ) != 0 ) - goto cleanup; - - ret = mbedtls_entropy_add_source( &ctx, entropy_dummy_source, NULL, 16, - MBEDTLS_ENTROPY_SOURCE_WEAK ); - if( ret != 0 ) - goto cleanup; - - if( ( ret = mbedtls_entropy_update_manual( &ctx, buf, sizeof buf ) ) != 0 ) - goto cleanup; - - /* - * To test that mbedtls_entropy_func writes correct number of bytes: - * - use the whole buffer and rely on ASan to detect overruns - * - collect entropy 8 times and OR the result in an accumulator: - * any byte should then be 0 with probably 2^(-64), so requiring - * each of the 32 or 64 bytes to be non-zero has a false failure rate - * of at most 2^(-58) which is acceptable. - */ - for( i = 0; i < 8; i++ ) - { - if( ( ret = mbedtls_entropy_func( &ctx, buf, sizeof( buf ) ) ) != 0 ) - goto cleanup; - - for( j = 0; j < sizeof( buf ); j++ ) - acc[j] |= buf[j]; - } - - for( j = 0; j < sizeof( buf ); j++ ) - { - if( acc[j] == 0 ) - { - ret = 1; - goto cleanup; - } - } - -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - if( ( ret = mbedtls_entropy_source_self_test( 0 ) ) != 0 ) - goto cleanup; -#endif - -cleanup: - mbedtls_entropy_free( &ctx ); -#endif /* !MBEDTLS_TEST_NULL_ENTROPY */ - - if( verbose != 0 ) - { - if( ret != 0 ) - mbedtls_printf( "failed\n" ); - else - mbedtls_printf( "passed\n" ); - - mbedtls_printf( "\n" ); - } - - return( ret != 0 ); -} -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_ENTROPY_C */ diff --git a/deps/mbedtls/entropy_poll.c b/deps/mbedtls/entropy_poll.c index 7d0d9450ea..2b9ad1293f 100644 --- a/deps/mbedtls/entropy_poll.c +++ b/deps/mbedtls/entropy_poll.c @@ -34,14 +34,6 @@ #include #include "mbedtls/timing.h" #endif -#if defined(MBEDTLS_HAVEGE_C) -#include "mbedtls/havege.h" -#endif -#if defined(MBEDTLS_ENTROPY_NV_SEED) -#include "mbedtls/platform.h" -#endif - -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ !defined(__APPLE__) && !defined(_WIN32) && !defined(__HAIKU__) @@ -56,8 +48,9 @@ #include #include -int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len, - size_t *olen ) +int mbedtls_platform_entropy_poll( + void *data, unsigned char *output, size_t len, + size_t *olen ) { HCRYPTPROV provider; ((void) data); @@ -65,9 +58,7 @@ int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len if( CryptAcquireContext( &provider, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) == FALSE ) - { return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - } if( CryptGenRandom( provider, (DWORD) len, output ) == FALSE ) { @@ -189,24 +180,6 @@ int mbedtls_platform_entropy_poll( void *data, return( 0 ); } #endif /* _WIN32 && !EFIX64 && !EFI32 */ -#endif /* !MBEDTLS_NO_PLATFORM_ENTROPY */ - -#if defined(MBEDTLS_TEST_NULL_ENTROPY) -int mbedtls_null_entropy_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - ((void) data); - ((void) output); - *olen = 0; - - if( len < sizeof(unsigned char) ) - return( 0 ); - - *olen = sizeof(unsigned char); - - return( 0 ); -} -#endif #if defined(MBEDTLS_TIMING_C) int mbedtls_hardclock_poll( void *data, @@ -226,43 +199,4 @@ int mbedtls_hardclock_poll( void *data, } #endif /* MBEDTLS_TIMING_C */ -#if defined(MBEDTLS_HAVEGE_C) -int mbedtls_havege_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - mbedtls_havege_state *hs = (mbedtls_havege_state *) data; - *olen = 0; - - if( mbedtls_havege_random( hs, output, len ) != 0 ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - *olen = len; - - return( 0 ); -} -#endif /* MBEDTLS_HAVEGE_C */ - -#if defined(MBEDTLS_ENTROPY_NV_SEED) -int mbedtls_nv_seed_poll( void *data, - unsigned char *output, size_t len, size_t *olen ) -{ - unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE]; - size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE; - ((void) data); - - memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE ); - - if( mbedtls_nv_seed_read( buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) < 0 ) - return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED ); - - if( len < use_len ) - use_len = len; - - memcpy( output, buf, use_len ); - *olen = use_len; - - return( 0 ); -} -#endif /* MBEDTLS_ENTROPY_NV_SEED */ - #endif /* MBEDTLS_ENTROPY_C */ diff --git a/deps/mbedtls/error.c b/deps/mbedtls/error.c deleted file mode 100644 index 9f4f7c752a..0000000000 --- a/deps/mbedtls/error.c +++ /dev/null @@ -1,707 +0,0 @@ -/* - * Error message information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_ERROR_C) || defined(MBEDTLS_ERROR_STRERROR_DUMMY) -#include "mbedtls/error.h" -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_snprintf snprintf -#define mbedtls_time_t time_t -#endif - -#if defined(MBEDTLS_ERROR_C) - -#include - -#if defined(MBEDTLS_AES_C) -#include "mbedtls/aes.h" -#endif - -#if defined(MBEDTLS_BASE64_C) -#include "mbedtls/base64.h" -#endif - -#if defined(MBEDTLS_BIGNUM_C) -#include "mbedtls/bignum.h" -#endif - -#if defined(MBEDTLS_BLOWFISH_C) -#include "mbedtls/blowfish.h" -#endif - -#if defined(MBEDTLS_CAMELLIA_C) -#include "mbedtls/camellia.h" -#endif - -#if defined(MBEDTLS_CCM_C) -#include "mbedtls/ccm.h" -#endif - -#if defined(MBEDTLS_CIPHER_C) -#include "mbedtls/cipher.h" -#endif - -#if defined(MBEDTLS_CTR_DRBG_C) -#include "mbedtls/ctr_drbg.h" -#endif - -#if defined(MBEDTLS_DES_C) -#include "mbedtls/des.h" -#endif - -#if defined(MBEDTLS_DHM_C) -#include "mbedtls/dhm.h" -#endif - -#if defined(MBEDTLS_ECP_C) -#include "mbedtls/ecp.h" -#endif - -#if defined(MBEDTLS_ENTROPY_C) -#include "mbedtls/entropy.h" -#endif - -#if defined(MBEDTLS_GCM_C) -#include "mbedtls/gcm.h" -#endif - -#if defined(MBEDTLS_HMAC_DRBG_C) -#include "mbedtls/hmac_drbg.h" -#endif - -#if defined(MBEDTLS_MD_C) -#include "mbedtls/md.h" -#endif - -#if defined(MBEDTLS_NET_C) -#include "mbedtls/net_sockets.h" -#endif - -#if defined(MBEDTLS_OID_C) -#include "mbedtls/oid.h" -#endif - -#if defined(MBEDTLS_PADLOCK_C) -#include "mbedtls/padlock.h" -#endif - -#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) -#include "mbedtls/pem.h" -#endif - -#if defined(MBEDTLS_PK_C) -#include "mbedtls/pk.h" -#endif - -#if defined(MBEDTLS_PKCS12_C) -#include "mbedtls/pkcs12.h" -#endif - -#if defined(MBEDTLS_PKCS5_C) -#include "mbedtls/pkcs5.h" -#endif - -#if defined(MBEDTLS_RSA_C) -#include "mbedtls/rsa.h" -#endif - -#if defined(MBEDTLS_SSL_TLS_C) -#include "mbedtls/ssl.h" -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) -#include "mbedtls/x509.h" -#endif - -#if defined(MBEDTLS_XTEA_C) -#include "mbedtls/xtea.h" -#endif - - -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - size_t len; - int use_ret; - - if( buflen == 0 ) - return; - - memset( buf, 0x00, buflen ); - - if( ret < 0 ) - ret = -ret; - - if( ret & 0xFF80 ) - { - use_ret = ret & 0xFF80; - - /* High level error codes - * - * BEGIN generated code */ -#if defined(MBEDTLS_CIPHER_C) - if( use_ret == -(MBEDTLS_ERR_CIPHER_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "CIPHER - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_INVALID_PADDING) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Input data contains invalid padding and is rejected" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_FULL_BLOCK_EXPECTED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Decryption of block requires a full block" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "CIPHER - Authentication failed (for AEAD modes)" ); - if( use_ret == -(MBEDTLS_ERR_CIPHER_INVALID_CONTEXT) ) - mbedtls_snprintf( buf, buflen, "CIPHER - The context is invalid, eg because it was free()ed" ); -#endif /* MBEDTLS_CIPHER_C */ - -#if defined(MBEDTLS_DHM_C) - if( use_ret == -(MBEDTLS_ERR_DHM_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "DHM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_DHM_READ_PARAMS_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Reading of the DHM parameters failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_MAKE_PARAMS_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Making of the DHM parameters failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_READ_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Reading of the public values failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_MAKE_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Making of the public value failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_CALC_SECRET_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Calculation of the DHM secret failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "DHM - The ASN.1 data is not formatted correctly" ); - if( use_ret == -(MBEDTLS_ERR_DHM_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "DHM - Allocation of memory failed" ); - if( use_ret == -(MBEDTLS_ERR_DHM_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "DHM - Read/write of file failed" ); -#endif /* MBEDTLS_DHM_C */ - -#if defined(MBEDTLS_ECP_C) - if( use_ret == -(MBEDTLS_ERR_ECP_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "ECP - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_ECP_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "ECP - The buffer is too small to write to" ); - if( use_ret == -(MBEDTLS_ERR_ECP_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "ECP - Requested curve not available" ); - if( use_ret == -(MBEDTLS_ERR_ECP_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - The signature is not valid" ); - if( use_ret == -(MBEDTLS_ERR_ECP_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_ECP_RANDOM_FAILED) ) - mbedtls_snprintf( buf, buflen, "ECP - Generation of random value, such as (ephemeral) key, failed" ); - if( use_ret == -(MBEDTLS_ERR_ECP_INVALID_KEY) ) - mbedtls_snprintf( buf, buflen, "ECP - Invalid private or public key" ); - if( use_ret == -(MBEDTLS_ERR_ECP_SIG_LEN_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "ECP - Signature is valid but shorter than the user-supplied length" ); -#endif /* MBEDTLS_ECP_C */ - -#if defined(MBEDTLS_MD_C) - if( use_ret == -(MBEDTLS_ERR_MD_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "MD - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_MD_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "MD - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_MD_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "MD - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_MD_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "MD - Opening or reading of file failed" ); -#endif /* MBEDTLS_MD_C */ - -#if defined(MBEDTLS_PEM_PARSE_C) || defined(MBEDTLS_PEM_WRITE_C) - if( use_ret == -(MBEDTLS_ERR_PEM_NO_HEADER_FOOTER_PRESENT) ) - mbedtls_snprintf( buf, buflen, "PEM - No PEM header or footer found" ); - if( use_ret == -(MBEDTLS_ERR_PEM_INVALID_DATA) ) - mbedtls_snprintf( buf, buflen, "PEM - PEM string is not as expected" ); - if( use_ret == -(MBEDTLS_ERR_PEM_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "PEM - Failed to allocate memory" ); - if( use_ret == -(MBEDTLS_ERR_PEM_INVALID_ENC_IV) ) - mbedtls_snprintf( buf, buflen, "PEM - RSA IV is not in hex-format" ); - if( use_ret == -(MBEDTLS_ERR_PEM_UNKNOWN_ENC_ALG) ) - mbedtls_snprintf( buf, buflen, "PEM - Unsupported key encryption algorithm" ); - if( use_ret == -(MBEDTLS_ERR_PEM_PASSWORD_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "PEM - Private key password can't be empty" ); - if( use_ret == -(MBEDTLS_ERR_PEM_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PEM - Given private key password does not allow for correct decryption" ); - if( use_ret == -(MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PEM - Unavailable feature, e.g. hashing/encryption combination" ); - if( use_ret == -(MBEDTLS_ERR_PEM_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PEM - Bad input parameters to function" ); -#endif /* MBEDTLS_PEM_PARSE_C || MBEDTLS_PEM_WRITE_C */ - -#if defined(MBEDTLS_PK_C) - if( use_ret == -(MBEDTLS_ERR_PK_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "PK - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_PK_TYPE_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - Type mismatch, eg attempt to encrypt with an ECDSA key" ); - if( use_ret == -(MBEDTLS_ERR_PK_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PK - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PK_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "PK - Read/write of file failed" ); - if( use_ret == -(MBEDTLS_ERR_PK_KEY_INVALID_VERSION) ) - mbedtls_snprintf( buf, buflen, "PK - Unsupported key version" ); - if( use_ret == -(MBEDTLS_ERR_PK_KEY_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PK - Invalid key tag or value" ); - if( use_ret == -(MBEDTLS_ERR_PK_UNKNOWN_PK_ALG) ) - mbedtls_snprintf( buf, buflen, "PK - Key algorithm is unsupported (only RSA and EC are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_PASSWORD_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "PK - Private key password can't be empty" ); - if( use_ret == -(MBEDTLS_ERR_PK_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - Given private key password does not allow for correct decryption" ); - if( use_ret == -(MBEDTLS_ERR_PK_INVALID_PUBKEY) ) - mbedtls_snprintf( buf, buflen, "PK - The pubkey tag or value is invalid (only RSA and EC are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_INVALID_ALG) ) - mbedtls_snprintf( buf, buflen, "PK - The algorithm tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE) ) - mbedtls_snprintf( buf, buflen, "PK - Elliptic curve is unsupported (only NIST curves are supported)" ); - if( use_ret == -(MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PK - Unavailable feature, e.g. RSA disabled for RSA key" ); - if( use_ret == -(MBEDTLS_ERR_PK_SIG_LEN_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PK - The signature is valid but its length is less than expected" ); -#endif /* MBEDTLS_PK_C */ - -#if defined(MBEDTLS_PKCS12_C) - if( use_ret == -(MBEDTLS_ERR_PKCS12_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Feature not available, e.g. unsupported encryption scheme" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_PBE_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - PBE ASN.1 data not as expected" ); - if( use_ret == -(MBEDTLS_ERR_PKCS12_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PKCS12 - Given private key password does not allow for correct decryption" ); -#endif /* MBEDTLS_PKCS12_C */ - -#if defined(MBEDTLS_PKCS5_C) - if( use_ret == -(MBEDTLS_ERR_PKCS5_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Unexpected ASN.1 data" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Requested encryption or digest alg not available" ); - if( use_ret == -(MBEDTLS_ERR_PKCS5_PASSWORD_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "PKCS5 - Given private key password does not allow for correct decryption" ); -#endif /* MBEDTLS_PKCS5_C */ - -#if defined(MBEDTLS_RSA_C) - if( use_ret == -(MBEDTLS_ERR_RSA_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "RSA - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_RSA_INVALID_PADDING) ) - mbedtls_snprintf( buf, buflen, "RSA - Input data contains invalid padding and is rejected" ); - if( use_ret == -(MBEDTLS_ERR_RSA_KEY_GEN_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - Something failed during generation of a key" ); - if( use_ret == -(MBEDTLS_ERR_RSA_KEY_CHECK_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - Key failed to pass the library's validity check" ); - if( use_ret == -(MBEDTLS_ERR_RSA_PUBLIC_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The public key operation failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_PRIVATE_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The private key operation failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The PKCS#1 verification failed" ); - if( use_ret == -(MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE) ) - mbedtls_snprintf( buf, buflen, "RSA - The output buffer for decryption is not large enough" ); - if( use_ret == -(MBEDTLS_ERR_RSA_RNG_FAILED) ) - mbedtls_snprintf( buf, buflen, "RSA - The random generator failed to generate non-zeros" ); -#endif /* MBEDTLS_RSA_C */ - -#if defined(MBEDTLS_SSL_TLS_C) - if( use_ret == -(MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "SSL - The requested feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "SSL - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INVALID_MAC) ) - mbedtls_snprintf( buf, buflen, "SSL - Verification of the message MAC failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INVALID_RECORD) ) - mbedtls_snprintf( buf, buflen, "SSL - An invalid SSL record was received" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CONN_EOF) ) - mbedtls_snprintf( buf, buflen, "SSL - The connection indicated an EOF" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNKNOWN_CIPHER) ) - mbedtls_snprintf( buf, buflen, "SSL - An unknown cipher was received" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_CIPHER_CHOSEN) ) - mbedtls_snprintf( buf, buflen, "SSL - The server has no ciphersuites in common with the client" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_RNG) ) - mbedtls_snprintf( buf, buflen, "SSL - No RNG was provided to the SSL module" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_CLIENT_CERTIFICATE) ) - mbedtls_snprintf( buf, buflen, "SSL - No client certification received from the client, but required by the authentication mode" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CERTIFICATE_TOO_LARGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Our own certificate(s) is/are too large to send in an SSL message" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CERTIFICATE_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - The own certificate is not set, but needed by the server" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PRIVATE_KEY_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - The own private key or pre-shared key is not set, but needed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CA_CHAIN_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - No CA Chain is set, but required to operate" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNEXPECTED_MESSAGE) ) - mbedtls_snprintf( buf, buflen, "SSL - An unexpected message was received from our peer" ); - if( use_ret == -(MBEDTLS_ERR_SSL_FATAL_ALERT_MESSAGE) ) - { - mbedtls_snprintf( buf, buflen, "SSL - A fatal alert message was received from our peer" ); - return; - } - if( use_ret == -(MBEDTLS_ERR_SSL_PEER_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Verification of our peer failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PEER_CLOSE_NOTIFY) ) - mbedtls_snprintf( buf, buflen, "SSL - The peer notified us that the connection is going to be closed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_HELLO) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientHello handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerHello handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the Certificate handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_REQUEST) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the CertificateRequest handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_KEY_EXCHANGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerKeyExchange handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO_DONE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ServerHelloDone handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_RP) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Read Public" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CLIENT_KEY_EXCHANGE_CS) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ClientKeyExchange handshake message failed in DHM / ECDH Calculate Secret" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CERTIFICATE_VERIFY) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the CertificateVerify handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_CHANGE_CIPHER_SPEC) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the ChangeCipherSpec handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_FINISHED) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the Finished handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HW_ACCEL_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Hardware acceleration function returned with error" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HW_ACCEL_FALLTHROUGH) ) - mbedtls_snprintf( buf, buflen, "SSL - Hardware acceleration function skipped / left alone data" ); - if( use_ret == -(MBEDTLS_ERR_SSL_COMPRESSION_FAILED) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the compression / decompression failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION) ) - mbedtls_snprintf( buf, buflen, "SSL - Handshake protocol not within min/max boundaries" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BAD_HS_NEW_SESSION_TICKET) ) - mbedtls_snprintf( buf, buflen, "SSL - Processing of the NewSessionTicket handshake message failed" ); - if( use_ret == -(MBEDTLS_ERR_SSL_SESSION_TICKET_EXPIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - Session ticket has expired" ); - if( use_ret == -(MBEDTLS_ERR_SSL_PK_TYPE_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "SSL - Public key type mismatch (eg, asked for RSA key exchange and presented EC key)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNKNOWN_IDENTITY) ) - mbedtls_snprintf( buf, buflen, "SSL - Unknown identity received (eg, PSK identity)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INTERNAL_ERROR) ) - mbedtls_snprintf( buf, buflen, "SSL - Internal error (eg, unexpected failure in lower-level module)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_COUNTER_WRAPPING) ) - mbedtls_snprintf( buf, buflen, "SSL - A counter would wrap (eg, too many messages exchanged)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WAITING_SERVER_HELLO_RENEGO) ) - mbedtls_snprintf( buf, buflen, "SSL - Unexpected message at ServerHello in renegotiation" ); - if( use_ret == -(MBEDTLS_ERR_SSL_HELLO_VERIFY_REQUIRED) ) - mbedtls_snprintf( buf, buflen, "SSL - DTLS client must retry for hello verification" ); - if( use_ret == -(MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "SSL - A buffer is too small to receive or write a message" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NO_USABLE_CIPHERSUITE) ) - mbedtls_snprintf( buf, buflen, "SSL - None of the common ciphersuites is usable (eg, no suitable certificate, see debug messages)" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WANT_READ) ) - mbedtls_snprintf( buf, buflen, "SSL - Connection requires a read call" ); - if( use_ret == -(MBEDTLS_ERR_SSL_WANT_WRITE) ) - mbedtls_snprintf( buf, buflen, "SSL - Connection requires a write call" ); - if( use_ret == -(MBEDTLS_ERR_SSL_TIMEOUT) ) - mbedtls_snprintf( buf, buflen, "SSL - The operation timed out" ); - if( use_ret == -(MBEDTLS_ERR_SSL_CLIENT_RECONNECT) ) - mbedtls_snprintf( buf, buflen, "SSL - The client initiated a reconnect from the same port" ); - if( use_ret == -(MBEDTLS_ERR_SSL_UNEXPECTED_RECORD) ) - mbedtls_snprintf( buf, buflen, "SSL - Record header looks valid but is not expected" ); - if( use_ret == -(MBEDTLS_ERR_SSL_NON_FATAL) ) - mbedtls_snprintf( buf, buflen, "SSL - The alert message received indicates a non-fatal error" ); - if( use_ret == -(MBEDTLS_ERR_SSL_INVALID_VERIFY_HASH) ) - mbedtls_snprintf( buf, buflen, "SSL - Couldn't set the hash for verifying CertificateVerify" ); -#endif /* MBEDTLS_SSL_TLS_C */ - -#if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) - if( use_ret == -(MBEDTLS_ERR_X509_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "X509 - Unavailable feature, e.g. RSA hashing/encryption combination" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_OID) ) - mbedtls_snprintf( buf, buflen, "X509 - Requested OID is unknown" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_FORMAT) ) - mbedtls_snprintf( buf, buflen, "X509 - The CRT/CRL/CSR format is invalid, e.g. different type expected" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_VERSION) ) - mbedtls_snprintf( buf, buflen, "X509 - The CRT/CRL/CSR version element is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_SERIAL) ) - mbedtls_snprintf( buf, buflen, "X509 - The serial tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_ALG) ) - mbedtls_snprintf( buf, buflen, "X509 - The algorithm tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_NAME) ) - mbedtls_snprintf( buf, buflen, "X509 - The name tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_DATE) ) - mbedtls_snprintf( buf, buflen, "X509 - The date tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_SIGNATURE) ) - mbedtls_snprintf( buf, buflen, "X509 - The signature tag or value invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_INVALID_EXTENSIONS) ) - mbedtls_snprintf( buf, buflen, "X509 - The extension tag or value is invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_VERSION) ) - mbedtls_snprintf( buf, buflen, "X509 - CRT/CRL/CSR has an unsupported version number" ); - if( use_ret == -(MBEDTLS_ERR_X509_UNKNOWN_SIG_ALG) ) - mbedtls_snprintf( buf, buflen, "X509 - Signature algorithm (oid) is unsupported" ); - if( use_ret == -(MBEDTLS_ERR_X509_SIG_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "X509 - Signature algorithms do not match. (see \\c ::mbedtls_x509_crt sig_oid)" ); - if( use_ret == -(MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) ) - mbedtls_snprintf( buf, buflen, "X509 - Certificate verification failed, e.g. CRL, CA or signature check failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_CERT_UNKNOWN_FORMAT) ) - mbedtls_snprintf( buf, buflen, "X509 - Format not recognized as DER or PEM" ); - if( use_ret == -(MBEDTLS_ERR_X509_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "X509 - Input invalid" ); - if( use_ret == -(MBEDTLS_ERR_X509_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "X509 - Allocation of memory failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "X509 - Read/write of file failed" ); - if( use_ret == -(MBEDTLS_ERR_X509_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "X509 - Destination buffer is too small" ); -#endif /* MBEDTLS_X509_USE_C || MBEDTLS_X509_CREATE_C */ - /* END generated code */ - - if( strlen( buf ) == 0 ) - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); - } - - use_ret = ret & ~0xFF80; - - if( use_ret == 0 ) - return; - - /* If high level code is present, make a concatenation between both - * error strings. */ - len = strlen( buf ); - - if( len > 0 ) - { - if( buflen - len < 5 ) - return; - - mbedtls_snprintf( buf + len, buflen - len, " : " ); - - buf += len + 3; - buflen -= len + 3; - } - - /* Low level error codes - * - * BEGIN generated code - */ -#if defined(MBEDTLS_AES_C) - if( use_ret == -(MBEDTLS_ERR_AES_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "AES - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "AES - Invalid data input length" ); -#endif /* MBEDTLS_AES_C */ - -#if defined(MBEDTLS_ASN1_PARSE_C) - if( use_ret == -(MBEDTLS_ERR_ASN1_OUT_OF_DATA) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Out of data when parsing an ASN1 data structure" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_UNEXPECTED_TAG) ) - mbedtls_snprintf( buf, buflen, "ASN1 - ASN1 tag was of an unexpected value" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_INVALID_LENGTH) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Error when trying to determine the length or invalid length" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_LENGTH_MISMATCH) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Actual length differs from expected length" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_INVALID_DATA) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Data is invalid. (not used)" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Memory allocation failed" ); - if( use_ret == -(MBEDTLS_ERR_ASN1_BUF_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "ASN1 - Buffer too small when writing ASN.1 data structure" ); -#endif /* MBEDTLS_ASN1_PARSE_C */ - -#if defined(MBEDTLS_BASE64_C) - if( use_ret == -(MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "BASE64 - Output buffer too small" ); - if( use_ret == -(MBEDTLS_ERR_BASE64_INVALID_CHARACTER) ) - mbedtls_snprintf( buf, buflen, "BASE64 - Invalid character in input" ); -#endif /* MBEDTLS_BASE64_C */ - -#if defined(MBEDTLS_BIGNUM_C) - if( use_ret == -(MBEDTLS_ERR_MPI_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - An error occurred while reading from or writing to a file" ); - if( use_ret == -(MBEDTLS_ERR_MPI_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_MPI_INVALID_CHARACTER) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - There is an invalid character in the digit string" ); - if( use_ret == -(MBEDTLS_ERR_MPI_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The buffer is too small to write to" ); - if( use_ret == -(MBEDTLS_ERR_MPI_NEGATIVE_VALUE) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input arguments are negative or result in illegal output" ); - if( use_ret == -(MBEDTLS_ERR_MPI_DIVISION_BY_ZERO) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input argument for division is zero, which is not allowed" ); - if( use_ret == -(MBEDTLS_ERR_MPI_NOT_ACCEPTABLE) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - The input arguments are not acceptable" ); - if( use_ret == -(MBEDTLS_ERR_MPI_ALLOC_FAILED) ) - mbedtls_snprintf( buf, buflen, "BIGNUM - Memory allocation failed" ); -#endif /* MBEDTLS_BIGNUM_C */ - -#if defined(MBEDTLS_BLOWFISH_C) - if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_BLOWFISH_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "BLOWFISH - Invalid data input length" ); -#endif /* MBEDTLS_BLOWFISH_C */ - -#if defined(MBEDTLS_CAMELLIA_C) - if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_KEY_LENGTH) ) - mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid key length" ); - if( use_ret == -(MBEDTLS_ERR_CAMELLIA_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "CAMELLIA - Invalid data input length" ); -#endif /* MBEDTLS_CAMELLIA_C */ - -#if defined(MBEDTLS_CCM_C) - if( use_ret == -(MBEDTLS_ERR_CCM_BAD_INPUT) ) - mbedtls_snprintf( buf, buflen, "CCM - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_CCM_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "CCM - Authenticated decryption failed" ); -#endif /* MBEDTLS_CCM_C */ - -#if defined(MBEDTLS_CTR_DRBG_C) - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - The entropy source failed" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_REQUEST_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Too many random requested in single call" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_INPUT_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Input too large (Entropy + additional)" ); - if( use_ret == -(MBEDTLS_ERR_CTR_DRBG_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "CTR_DRBG - Read/write error in file" ); -#endif /* MBEDTLS_CTR_DRBG_C */ - -#if defined(MBEDTLS_DES_C) - if( use_ret == -(MBEDTLS_ERR_DES_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "DES - The data input has an invalid length" ); -#endif /* MBEDTLS_DES_C */ - -#if defined(MBEDTLS_ENTROPY_C) - if( use_ret == -(MBEDTLS_ERR_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - Critical entropy source failure" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_MAX_SOURCES) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No more sources can be added" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No sources have been added to poll" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_NO_STRONG_SOURCE) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - No strong sources have been added to poll" ); - if( use_ret == -(MBEDTLS_ERR_ENTROPY_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "ENTROPY - Read/write error in file" ); -#endif /* MBEDTLS_ENTROPY_C */ - -#if defined(MBEDTLS_GCM_C) - if( use_ret == -(MBEDTLS_ERR_GCM_AUTH_FAILED) ) - mbedtls_snprintf( buf, buflen, "GCM - Authenticated decryption failed" ); - if( use_ret == -(MBEDTLS_ERR_GCM_BAD_INPUT) ) - mbedtls_snprintf( buf, buflen, "GCM - Bad input parameters to function" ); -#endif /* MBEDTLS_GCM_C */ - -#if defined(MBEDTLS_HMAC_DRBG_C) - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_REQUEST_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Too many random requested in single call" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_INPUT_TOO_BIG) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Input too large (Entropy + additional)" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_FILE_IO_ERROR) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - Read/write error in file" ); - if( use_ret == -(MBEDTLS_ERR_HMAC_DRBG_ENTROPY_SOURCE_FAILED) ) - mbedtls_snprintf( buf, buflen, "HMAC_DRBG - The entropy source failed" ); -#endif /* MBEDTLS_HMAC_DRBG_C */ - -#if defined(MBEDTLS_NET_C) - if( use_ret == -(MBEDTLS_ERR_NET_SOCKET_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Failed to open a socket" ); - if( use_ret == -(MBEDTLS_ERR_NET_CONNECT_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - The connection to the given server / port failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_BIND_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Binding of the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_LISTEN_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Could not listen on the socket" ); - if( use_ret == -(MBEDTLS_ERR_NET_ACCEPT_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Could not accept the incoming connection" ); - if( use_ret == -(MBEDTLS_ERR_NET_RECV_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Reading information from the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_SEND_FAILED) ) - mbedtls_snprintf( buf, buflen, "NET - Sending information through the socket failed" ); - if( use_ret == -(MBEDTLS_ERR_NET_CONN_RESET) ) - mbedtls_snprintf( buf, buflen, "NET - Connection was reset by peer" ); - if( use_ret == -(MBEDTLS_ERR_NET_UNKNOWN_HOST) ) - mbedtls_snprintf( buf, buflen, "NET - Failed to get an IP address for the given hostname" ); - if( use_ret == -(MBEDTLS_ERR_NET_BUFFER_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "NET - Buffer is too small to hold the data" ); - if( use_ret == -(MBEDTLS_ERR_NET_INVALID_CONTEXT) ) - mbedtls_snprintf( buf, buflen, "NET - The context is invalid, eg because it was free()ed" ); -#endif /* MBEDTLS_NET_C */ - -#if defined(MBEDTLS_OID_C) - if( use_ret == -(MBEDTLS_ERR_OID_NOT_FOUND) ) - mbedtls_snprintf( buf, buflen, "OID - OID is not found" ); - if( use_ret == -(MBEDTLS_ERR_OID_BUF_TOO_SMALL) ) - mbedtls_snprintf( buf, buflen, "OID - output buffer is too small" ); -#endif /* MBEDTLS_OID_C */ - -#if defined(MBEDTLS_PADLOCK_C) - if( use_ret == -(MBEDTLS_ERR_PADLOCK_DATA_MISALIGNED) ) - mbedtls_snprintf( buf, buflen, "PADLOCK - Input data should be aligned" ); -#endif /* MBEDTLS_PADLOCK_C */ - -#if defined(MBEDTLS_THREADING_C) - if( use_ret == -(MBEDTLS_ERR_THREADING_FEATURE_UNAVAILABLE) ) - mbedtls_snprintf( buf, buflen, "THREADING - The selected feature is not available" ); - if( use_ret == -(MBEDTLS_ERR_THREADING_BAD_INPUT_DATA) ) - mbedtls_snprintf( buf, buflen, "THREADING - Bad input parameters to function" ); - if( use_ret == -(MBEDTLS_ERR_THREADING_MUTEX_ERROR) ) - mbedtls_snprintf( buf, buflen, "THREADING - Locking / unlocking / free failed with error code" ); -#endif /* MBEDTLS_THREADING_C */ - -#if defined(MBEDTLS_XTEA_C) - if( use_ret == -(MBEDTLS_ERR_XTEA_INVALID_INPUT_LENGTH) ) - mbedtls_snprintf( buf, buflen, "XTEA - The data input has an invalid length" ); -#endif /* MBEDTLS_XTEA_C */ - /* END generated code */ - - if( strlen( buf ) != 0 ) - return; - - mbedtls_snprintf( buf, buflen, "UNKNOWN ERROR CODE (%04X)", use_ret ); -} - -#else /* MBEDTLS_ERROR_C */ - -#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) - -/* - * Provide an non-function in case MBEDTLS_ERROR_C is not defined - */ -void mbedtls_strerror( int ret, char *buf, size_t buflen ) -{ - ((void) ret); - - if( buflen > 0 ) - buf[0] = '\0'; -} - -#endif /* MBEDTLS_ERROR_STRERROR_DUMMY */ - -#endif /* MBEDTLS_ERROR_C */ diff --git a/deps/mbedtls/gcm.c b/deps/mbedtls/gcm.c index 0939004f9a..573104379e 100644 --- a/deps/mbedtls/gcm.c +++ b/deps/mbedtls/gcm.c @@ -45,15 +45,6 @@ #include "mbedtls/aesni.h" #endif -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - /* * 32-bit integer manipulation macros (big endian) */ @@ -505,447 +496,4 @@ void mbedtls_gcm_free( mbedtls_gcm_context *ctx ) mbedtls_zeroize( ctx, sizeof( mbedtls_gcm_context ) ); } -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/* - * AES-GCM test vectors from: - * - * http://csrc.nist.gov/groups/STM/cavp/documents/mac/gcmtestvectors.zip - */ -#define MAX_TESTS 6 - -static const int key_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 1 }; - -static const unsigned char gcm_key[MAX_TESTS][32] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08, - 0xfe, 0xff, 0xe9, 0x92, 0x86, 0x65, 0x73, 0x1c, - 0x6d, 0x6a, 0x8f, 0x94, 0x67, 0x30, 0x83, 0x08 }, -}; - -static const size_t gcm_iv_len[MAX_TESTS] = - { 12, 12, 12, 12, 8, 60 }; - -static const int iv_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 2 }; - -static const unsigned char gcm_iv[MAX_TESTS][64] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0xca, 0xfe, 0xba, 0xbe, 0xfa, 0xce, 0xdb, 0xad, - 0xde, 0xca, 0xf8, 0x88 }, - { 0x93, 0x13, 0x22, 0x5d, 0xf8, 0x84, 0x06, 0xe5, - 0x55, 0x90, 0x9c, 0x5a, 0xff, 0x52, 0x69, 0xaa, - 0x6a, 0x7a, 0x95, 0x38, 0x53, 0x4f, 0x7d, 0xa1, - 0xe4, 0xc3, 0x03, 0xd2, 0xa3, 0x18, 0xa7, 0x28, - 0xc3, 0xc0, 0xc9, 0x51, 0x56, 0x80, 0x95, 0x39, - 0xfc, 0xf0, 0xe2, 0x42, 0x9a, 0x6b, 0x52, 0x54, - 0x16, 0xae, 0xdb, 0xf5, 0xa0, 0xde, 0x6a, 0x57, - 0xa6, 0x37, 0xb3, 0x9b }, -}; - -static const size_t gcm_add_len[MAX_TESTS] = - { 0, 0, 0, 20, 20, 20 }; - -static const int add_index[MAX_TESTS] = - { 0, 0, 0, 1, 1, 1 }; - -static const unsigned char additional[MAX_TESTS][64] = -{ - { 0x00 }, - { 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xfe, 0xed, 0xfa, 0xce, 0xde, 0xad, 0xbe, 0xef, - 0xab, 0xad, 0xda, 0xd2 }, -}; - -static const size_t pt_len[MAX_TESTS] = - { 0, 16, 64, 60, 60, 60 }; - -static const int pt_index[MAX_TESTS] = - { 0, 0, 1, 1, 1, 1 }; - -static const unsigned char pt[MAX_TESTS][64] = -{ - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }, - { 0xd9, 0x31, 0x32, 0x25, 0xf8, 0x84, 0x06, 0xe5, - 0xa5, 0x59, 0x09, 0xc5, 0xaf, 0xf5, 0x26, 0x9a, - 0x86, 0xa7, 0xa9, 0x53, 0x15, 0x34, 0xf7, 0xda, - 0x2e, 0x4c, 0x30, 0x3d, 0x8a, 0x31, 0x8a, 0x72, - 0x1c, 0x3c, 0x0c, 0x95, 0x95, 0x68, 0x09, 0x53, - 0x2f, 0xcf, 0x0e, 0x24, 0x49, 0xa6, 0xb5, 0x25, - 0xb1, 0x6a, 0xed, 0xf5, 0xaa, 0x0d, 0xe6, 0x57, - 0xba, 0x63, 0x7b, 0x39, 0x1a, 0xaf, 0xd2, 0x55 }, -}; - -static const unsigned char ct[MAX_TESTS * 3][64] = -{ - { 0x00 }, - { 0x03, 0x88, 0xda, 0xce, 0x60, 0xb6, 0xa3, 0x92, - 0xf3, 0x28, 0xc2, 0xb9, 0x71, 0xb2, 0xfe, 0x78 }, - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, - 0x3d, 0x58, 0xe0, 0x91, 0x47, 0x3f, 0x59, 0x85 }, - { 0x42, 0x83, 0x1e, 0xc2, 0x21, 0x77, 0x74, 0x24, - 0x4b, 0x72, 0x21, 0xb7, 0x84, 0xd0, 0xd4, 0x9c, - 0xe3, 0xaa, 0x21, 0x2f, 0x2c, 0x02, 0xa4, 0xe0, - 0x35, 0xc1, 0x7e, 0x23, 0x29, 0xac, 0xa1, 0x2e, - 0x21, 0xd5, 0x14, 0xb2, 0x54, 0x66, 0x93, 0x1c, - 0x7d, 0x8f, 0x6a, 0x5a, 0xac, 0x84, 0xaa, 0x05, - 0x1b, 0xa3, 0x0b, 0x39, 0x6a, 0x0a, 0xac, 0x97, - 0x3d, 0x58, 0xe0, 0x91 }, - { 0x61, 0x35, 0x3b, 0x4c, 0x28, 0x06, 0x93, 0x4a, - 0x77, 0x7f, 0xf5, 0x1f, 0xa2, 0x2a, 0x47, 0x55, - 0x69, 0x9b, 0x2a, 0x71, 0x4f, 0xcd, 0xc6, 0xf8, - 0x37, 0x66, 0xe5, 0xf9, 0x7b, 0x6c, 0x74, 0x23, - 0x73, 0x80, 0x69, 0x00, 0xe4, 0x9f, 0x24, 0xb2, - 0x2b, 0x09, 0x75, 0x44, 0xd4, 0x89, 0x6b, 0x42, - 0x49, 0x89, 0xb5, 0xe1, 0xeb, 0xac, 0x0f, 0x07, - 0xc2, 0x3f, 0x45, 0x98 }, - { 0x8c, 0xe2, 0x49, 0x98, 0x62, 0x56, 0x15, 0xb6, - 0x03, 0xa0, 0x33, 0xac, 0xa1, 0x3f, 0xb8, 0x94, - 0xbe, 0x91, 0x12, 0xa5, 0xc3, 0xa2, 0x11, 0xa8, - 0xba, 0x26, 0x2a, 0x3c, 0xca, 0x7e, 0x2c, 0xa7, - 0x01, 0xe4, 0xa9, 0xa4, 0xfb, 0xa4, 0x3c, 0x90, - 0xcc, 0xdc, 0xb2, 0x81, 0xd4, 0x8c, 0x7c, 0x6f, - 0xd6, 0x28, 0x75, 0xd2, 0xac, 0xa4, 0x17, 0x03, - 0x4c, 0x34, 0xae, 0xe5 }, - { 0x00 }, - { 0x98, 0xe7, 0x24, 0x7c, 0x07, 0xf0, 0xfe, 0x41, - 0x1c, 0x26, 0x7e, 0x43, 0x84, 0xb0, 0xf6, 0x00 }, - { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, - 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, - 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, - 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, - 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, - 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, - 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, - 0xcc, 0xda, 0x27, 0x10, 0xac, 0xad, 0xe2, 0x56 }, - { 0x39, 0x80, 0xca, 0x0b, 0x3c, 0x00, 0xe8, 0x41, - 0xeb, 0x06, 0xfa, 0xc4, 0x87, 0x2a, 0x27, 0x57, - 0x85, 0x9e, 0x1c, 0xea, 0xa6, 0xef, 0xd9, 0x84, - 0x62, 0x85, 0x93, 0xb4, 0x0c, 0xa1, 0xe1, 0x9c, - 0x7d, 0x77, 0x3d, 0x00, 0xc1, 0x44, 0xc5, 0x25, - 0xac, 0x61, 0x9d, 0x18, 0xc8, 0x4a, 0x3f, 0x47, - 0x18, 0xe2, 0x44, 0x8b, 0x2f, 0xe3, 0x24, 0xd9, - 0xcc, 0xda, 0x27, 0x10 }, - { 0x0f, 0x10, 0xf5, 0x99, 0xae, 0x14, 0xa1, 0x54, - 0xed, 0x24, 0xb3, 0x6e, 0x25, 0x32, 0x4d, 0xb8, - 0xc5, 0x66, 0x63, 0x2e, 0xf2, 0xbb, 0xb3, 0x4f, - 0x83, 0x47, 0x28, 0x0f, 0xc4, 0x50, 0x70, 0x57, - 0xfd, 0xdc, 0x29, 0xdf, 0x9a, 0x47, 0x1f, 0x75, - 0xc6, 0x65, 0x41, 0xd4, 0xd4, 0xda, 0xd1, 0xc9, - 0xe9, 0x3a, 0x19, 0xa5, 0x8e, 0x8b, 0x47, 0x3f, - 0xa0, 0xf0, 0x62, 0xf7 }, - { 0xd2, 0x7e, 0x88, 0x68, 0x1c, 0xe3, 0x24, 0x3c, - 0x48, 0x30, 0x16, 0x5a, 0x8f, 0xdc, 0xf9, 0xff, - 0x1d, 0xe9, 0xa1, 0xd8, 0xe6, 0xb4, 0x47, 0xef, - 0x6e, 0xf7, 0xb7, 0x98, 0x28, 0x66, 0x6e, 0x45, - 0x81, 0xe7, 0x90, 0x12, 0xaf, 0x34, 0xdd, 0xd9, - 0xe2, 0xf0, 0x37, 0x58, 0x9b, 0x29, 0x2d, 0xb3, - 0xe6, 0x7c, 0x03, 0x67, 0x45, 0xfa, 0x22, 0xe7, - 0xe9, 0xb7, 0x37, 0x3b }, - { 0x00 }, - { 0xce, 0xa7, 0x40, 0x3d, 0x4d, 0x60, 0x6b, 0x6e, - 0x07, 0x4e, 0xc5, 0xd3, 0xba, 0xf3, 0x9d, 0x18 }, - { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62, 0x89, 0x80, 0x15, 0xad }, - { 0x52, 0x2d, 0xc1, 0xf0, 0x99, 0x56, 0x7d, 0x07, - 0xf4, 0x7f, 0x37, 0xa3, 0x2a, 0x84, 0x42, 0x7d, - 0x64, 0x3a, 0x8c, 0xdc, 0xbf, 0xe5, 0xc0, 0xc9, - 0x75, 0x98, 0xa2, 0xbd, 0x25, 0x55, 0xd1, 0xaa, - 0x8c, 0xb0, 0x8e, 0x48, 0x59, 0x0d, 0xbb, 0x3d, - 0xa7, 0xb0, 0x8b, 0x10, 0x56, 0x82, 0x88, 0x38, - 0xc5, 0xf6, 0x1e, 0x63, 0x93, 0xba, 0x7a, 0x0a, - 0xbc, 0xc9, 0xf6, 0x62 }, - { 0xc3, 0x76, 0x2d, 0xf1, 0xca, 0x78, 0x7d, 0x32, - 0xae, 0x47, 0xc1, 0x3b, 0xf1, 0x98, 0x44, 0xcb, - 0xaf, 0x1a, 0xe1, 0x4d, 0x0b, 0x97, 0x6a, 0xfa, - 0xc5, 0x2f, 0xf7, 0xd7, 0x9b, 0xba, 0x9d, 0xe0, - 0xfe, 0xb5, 0x82, 0xd3, 0x39, 0x34, 0xa4, 0xf0, - 0x95, 0x4c, 0xc2, 0x36, 0x3b, 0xc7, 0x3f, 0x78, - 0x62, 0xac, 0x43, 0x0e, 0x64, 0xab, 0xe4, 0x99, - 0xf4, 0x7c, 0x9b, 0x1f }, - { 0x5a, 0x8d, 0xef, 0x2f, 0x0c, 0x9e, 0x53, 0xf1, - 0xf7, 0x5d, 0x78, 0x53, 0x65, 0x9e, 0x2a, 0x20, - 0xee, 0xb2, 0xb2, 0x2a, 0xaf, 0xde, 0x64, 0x19, - 0xa0, 0x58, 0xab, 0x4f, 0x6f, 0x74, 0x6b, 0xf4, - 0x0f, 0xc0, 0xc3, 0xb7, 0x80, 0xf2, 0x44, 0x45, - 0x2d, 0xa3, 0xeb, 0xf1, 0xc5, 0xd8, 0x2c, 0xde, - 0xa2, 0x41, 0x89, 0x97, 0x20, 0x0e, 0xf8, 0x2e, - 0x44, 0xae, 0x7e, 0x3f }, -}; - -static const unsigned char tag[MAX_TESTS * 3][16] = -{ - { 0x58, 0xe2, 0xfc, 0xce, 0xfa, 0x7e, 0x30, 0x61, - 0x36, 0x7f, 0x1d, 0x57, 0xa4, 0xe7, 0x45, 0x5a }, - { 0xab, 0x6e, 0x47, 0xd4, 0x2c, 0xec, 0x13, 0xbd, - 0xf5, 0x3a, 0x67, 0xb2, 0x12, 0x57, 0xbd, 0xdf }, - { 0x4d, 0x5c, 0x2a, 0xf3, 0x27, 0xcd, 0x64, 0xa6, - 0x2c, 0xf3, 0x5a, 0xbd, 0x2b, 0xa6, 0xfa, 0xb4 }, - { 0x5b, 0xc9, 0x4f, 0xbc, 0x32, 0x21, 0xa5, 0xdb, - 0x94, 0xfa, 0xe9, 0x5a, 0xe7, 0x12, 0x1a, 0x47 }, - { 0x36, 0x12, 0xd2, 0xe7, 0x9e, 0x3b, 0x07, 0x85, - 0x56, 0x1b, 0xe1, 0x4a, 0xac, 0xa2, 0xfc, 0xcb }, - { 0x61, 0x9c, 0xc5, 0xae, 0xff, 0xfe, 0x0b, 0xfa, - 0x46, 0x2a, 0xf4, 0x3c, 0x16, 0x99, 0xd0, 0x50 }, - { 0xcd, 0x33, 0xb2, 0x8a, 0xc7, 0x73, 0xf7, 0x4b, - 0xa0, 0x0e, 0xd1, 0xf3, 0x12, 0x57, 0x24, 0x35 }, - { 0x2f, 0xf5, 0x8d, 0x80, 0x03, 0x39, 0x27, 0xab, - 0x8e, 0xf4, 0xd4, 0x58, 0x75, 0x14, 0xf0, 0xfb }, - { 0x99, 0x24, 0xa7, 0xc8, 0x58, 0x73, 0x36, 0xbf, - 0xb1, 0x18, 0x02, 0x4d, 0xb8, 0x67, 0x4a, 0x14 }, - { 0x25, 0x19, 0x49, 0x8e, 0x80, 0xf1, 0x47, 0x8f, - 0x37, 0xba, 0x55, 0xbd, 0x6d, 0x27, 0x61, 0x8c }, - { 0x65, 0xdc, 0xc5, 0x7f, 0xcf, 0x62, 0x3a, 0x24, - 0x09, 0x4f, 0xcc, 0xa4, 0x0d, 0x35, 0x33, 0xf8 }, - { 0xdc, 0xf5, 0x66, 0xff, 0x29, 0x1c, 0x25, 0xbb, - 0xb8, 0x56, 0x8f, 0xc3, 0xd3, 0x76, 0xa6, 0xd9 }, - { 0x53, 0x0f, 0x8a, 0xfb, 0xc7, 0x45, 0x36, 0xb9, - 0xa9, 0x63, 0xb4, 0xf1, 0xc4, 0xcb, 0x73, 0x8b }, - { 0xd0, 0xd1, 0xc8, 0xa7, 0x99, 0x99, 0x6b, 0xf0, - 0x26, 0x5b, 0x98, 0xb5, 0xd4, 0x8a, 0xb9, 0x19 }, - { 0xb0, 0x94, 0xda, 0xc5, 0xd9, 0x34, 0x71, 0xbd, - 0xec, 0x1a, 0x50, 0x22, 0x70, 0xe3, 0xcc, 0x6c }, - { 0x76, 0xfc, 0x6e, 0xce, 0x0f, 0x4e, 0x17, 0x68, - 0xcd, 0xdf, 0x88, 0x53, 0xbb, 0x2d, 0x55, 0x1b }, - { 0x3a, 0x33, 0x7d, 0xbf, 0x46, 0xa7, 0x92, 0xc4, - 0x5e, 0x45, 0x49, 0x13, 0xfe, 0x2e, 0xa8, 0xf2 }, - { 0xa4, 0x4a, 0x82, 0x66, 0xee, 0x1c, 0x8e, 0xb0, - 0xc8, 0xb5, 0xd4, 0xcf, 0x5a, 0xe9, 0xf1, 0x9a }, -}; - -int mbedtls_gcm_self_test( int verbose ) -{ - mbedtls_gcm_context ctx; - unsigned char buf[64]; - unsigned char tag_buf[16]; - int i, j, ret; - mbedtls_cipher_id_t cipher = MBEDTLS_CIPHER_ID_AES; - - mbedtls_gcm_init( &ctx ); - - for( j = 0; j < 3; j++ ) - { - int key_len = 128 + 64 * j; - - for( i = 0; i < MAX_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d (%s): ", - key_len, i, "enc" ); - - mbedtls_gcm_setkey( &ctx, cipher, gcm_key[key_index[i]], key_len ); - - ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_ENCRYPT, - pt_len[i], - gcm_iv[iv_index[i]], gcm_iv_len[i], - additional[add_index[i]], gcm_add_len[i], - pt[pt_index[i]], buf, 16, tag_buf ); - - if( ret != 0 || - memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d (%s): ", - key_len, i, "dec" ); - - mbedtls_gcm_setkey( &ctx, cipher, gcm_key[key_index[i]], key_len ); - - ret = mbedtls_gcm_crypt_and_tag( &ctx, MBEDTLS_GCM_DECRYPT, - pt_len[i], - gcm_iv[iv_index[i]], gcm_iv_len[i], - additional[add_index[i]], gcm_add_len[i], - ct[j * 6 + i], buf, 16, tag_buf ); - - if( ret != 0 || - memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", - key_len, i, "enc" ); - - mbedtls_gcm_setkey( &ctx, cipher, gcm_key[key_index[i]], key_len ); - - ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_ENCRYPT, - gcm_iv[iv_index[i]], gcm_iv_len[i], - additional[add_index[i]], gcm_add_len[i] ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( pt_len[i] > 32 ) - { - size_t rest_len = pt_len[i] - 32; - ret = mbedtls_gcm_update( &ctx, 32, pt[pt_index[i]], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_gcm_update( &ctx, rest_len, pt[pt_index[i]] + 32, - buf + 32 ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - ret = mbedtls_gcm_update( &ctx, pt_len[i], pt[pt_index[i]], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); - if( ret != 0 || - memcmp( buf, ct[j * 6 + i], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " AES-GCM-%3d #%d split (%s): ", - key_len, i, "dec" ); - - mbedtls_gcm_setkey( &ctx, cipher, gcm_key[key_index[i]], key_len ); - - ret = mbedtls_gcm_starts( &ctx, MBEDTLS_GCM_DECRYPT, - gcm_iv[iv_index[i]], gcm_iv_len[i], - additional[add_index[i]], gcm_add_len[i] ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( pt_len[i] > 32 ) - { - size_t rest_len = pt_len[i] - 32; - ret = mbedtls_gcm_update( &ctx, 32, ct[j * 6 + i], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - ret = mbedtls_gcm_update( &ctx, rest_len, ct[j * 6 + i] + 32, - buf + 32 ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - else - { - ret = mbedtls_gcm_update( &ctx, pt_len[i], ct[j * 6 + i], buf ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - ret = mbedtls_gcm_finish( &ctx, tag_buf, 16 ); - if( ret != 0 || - memcmp( buf, pt[pt_index[i]], pt_len[i] ) != 0 || - memcmp( tag_buf, tag[j * 6 + i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - mbedtls_gcm_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - } - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - #endif /* MBEDTLS_GCM_C */ diff --git a/deps/mbedtls/havege.c b/deps/mbedtls/havege.c deleted file mode 100644 index 8109ae8ad8..0000000000 --- a/deps/mbedtls/havege.c +++ /dev/null @@ -1,242 +0,0 @@ -/** - * \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The HAVEGE RNG was designed by Andre Seznec in 2002. - * - * http://www.irisa.fr/caps/projects/hipsor/publi.php - * - * Contact: seznec(at)irisa_dot_fr - orocheco(at)irisa_dot_fr - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_HAVEGE_C) - -#include "mbedtls/havege.h" -#include "mbedtls/timing.h" - -#include - -#include "arc4_alt.h" - -/* ------------------------------------------------------------------------ - * On average, one iteration accesses two 8-word blocks in the havege WALK - * table, and generates 16 words in the RES array. - * - * The data read in the WALK table is updated and permuted after each use. - * The result of the hardware clock counter read is used for this update. - * - * 25 conditional tests are present. The conditional tests are grouped in - * two nested groups of 12 conditional tests and 1 test that controls the - * permutation; on average, there should be 6 tests executed and 3 of them - * should be mispredicted. - * ------------------------------------------------------------------------ - */ - -#define SWAP(X,Y) { int *T = X; X = Y; Y = T; } - -#define TST1_ENTER if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1; -#define TST2_ENTER if( PTEST & 1 ) { PTEST ^= 3; PTEST >>= 1; - -#define TST1_LEAVE U1++; } -#define TST2_LEAVE U2++; } - -#define ONE_ITERATION \ - \ - PTEST = PT1 >> 20; \ - \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - TST1_ENTER TST1_ENTER TST1_ENTER TST1_ENTER \ - \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - TST1_LEAVE TST1_LEAVE TST1_LEAVE TST1_LEAVE \ - \ - PTX = (PT1 >> 18) & 7; \ - PT1 &= 0x1FFF; \ - PT2 &= 0x1FFF; \ - CLK = (int) mbedtls_timing_hardclock(); \ - \ - i = 0; \ - A = &WALK[PT1 ]; RES[i++] ^= *A; \ - B = &WALK[PT2 ]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 1]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 4]; RES[i++] ^= *D; \ - \ - IN = (*A >> (1)) ^ (*A << (31)) ^ CLK; \ - *A = (*B >> (2)) ^ (*B << (30)) ^ CLK; \ - *B = IN ^ U1; \ - *C = (*C >> (3)) ^ (*C << (29)) ^ CLK; \ - *D = (*D >> (4)) ^ (*D << (28)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 2]; RES[i++] ^= *A; \ - B = &WALK[PT2 ^ 2]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 3]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 6]; RES[i++] ^= *D; \ - \ - if( PTEST & 1 ) SWAP( A, C ); \ - \ - IN = (*A >> (5)) ^ (*A << (27)) ^ CLK; \ - *A = (*B >> (6)) ^ (*B << (26)) ^ CLK; \ - *B = IN; CLK = (int) mbedtls_timing_hardclock(); \ - *C = (*C >> (7)) ^ (*C << (25)) ^ CLK; \ - *D = (*D >> (8)) ^ (*D << (24)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 4]; \ - B = &WALK[PT2 ^ 1]; \ - \ - PTEST = PT2 >> 1; \ - \ - PT2 = (RES[(i - 8) ^ PTY] ^ WALK[PT2 ^ PTY ^ 7]); \ - PT2 = ((PT2 & 0x1FFF) & (~8)) ^ ((PT1 ^ 8) & 0x8); \ - PTY = (PT2 >> 10) & 7; \ - \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - TST2_ENTER TST2_ENTER TST2_ENTER TST2_ENTER \ - \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - TST2_LEAVE TST2_LEAVE TST2_LEAVE TST2_LEAVE \ - \ - C = &WALK[PT1 ^ 5]; \ - D = &WALK[PT2 ^ 5]; \ - \ - RES[i++] ^= *A; \ - RES[i++] ^= *B; \ - RES[i++] ^= *C; \ - RES[i++] ^= *D; \ - \ - IN = (*A >> ( 9)) ^ (*A << (23)) ^ CLK; \ - *A = (*B >> (10)) ^ (*B << (22)) ^ CLK; \ - *B = IN ^ U2; \ - *C = (*C >> (11)) ^ (*C << (21)) ^ CLK; \ - *D = (*D >> (12)) ^ (*D << (20)) ^ CLK; \ - \ - A = &WALK[PT1 ^ 6]; RES[i++] ^= *A; \ - B = &WALK[PT2 ^ 3]; RES[i++] ^= *B; \ - C = &WALK[PT1 ^ 7]; RES[i++] ^= *C; \ - D = &WALK[PT2 ^ 7]; RES[i++] ^= *D; \ - \ - IN = (*A >> (13)) ^ (*A << (19)) ^ CLK; \ - *A = (*B >> (14)) ^ (*B << (18)) ^ CLK; \ - *B = IN; \ - *C = (*C >> (15)) ^ (*C << (17)) ^ CLK; \ - *D = (*D >> (16)) ^ (*D << (16)) ^ CLK; \ - \ - PT1 = ( RES[( i - 8 ) ^ PTX] ^ \ - WALK[PT1 ^ PTX ^ 7] ) & (~1); \ - PT1 ^= (PT2 ^ 0x10) & 0x10; \ - \ - for( n++, i = 0; i < 16; i++ ) \ - hs->pool[n % MBEDTLS_HAVEGE_COLLECT_SIZE] ^= RES[i]; - -/* - * Entropy gathering function - */ -static void havege_fill( mbedtls_havege_state *hs ) -{ - int i, n = 0; - int U1, U2, *A, *B, *C, *D; - int PT1, PT2, *WALK, RES[16]; - int PTX, PTY, CLK, PTEST, IN; - - WALK = hs->WALK; - PT1 = hs->PT1; - PT2 = hs->PT2; - - PTX = U1 = 0; - PTY = U2 = 0; - - (void)PTX; - - memset( RES, 0, sizeof( RES ) ); - - while( n < MBEDTLS_HAVEGE_COLLECT_SIZE * 4 ) - { - ONE_ITERATION - ONE_ITERATION - ONE_ITERATION - ONE_ITERATION - } - - hs->PT1 = PT1; - hs->PT2 = PT2; - - hs->offset[0] = 0; - hs->offset[1] = MBEDTLS_HAVEGE_COLLECT_SIZE / 2; -} - -/* - * HAVEGE initialization - */ -void mbedtls_havege_init( mbedtls_havege_state *hs ) -{ - memset( hs, 0, sizeof( mbedtls_havege_state ) ); - - havege_fill( hs ); -} - -void mbedtls_havege_free( mbedtls_havege_state *hs ) -{ - if( hs == NULL ) - return; - - mbedtls_zeroize( hs, sizeof( mbedtls_havege_state ) ); -} - -/* - * HAVEGE rand function - */ -int mbedtls_havege_random( void *p_rng, unsigned char *buf, size_t len ) -{ - int val; - size_t use_len; - mbedtls_havege_state *hs = (mbedtls_havege_state *) p_rng; - unsigned char *p = buf; - - while( len > 0 ) - { - use_len = len; - if( use_len > sizeof(int) ) - use_len = sizeof(int); - - if( hs->offset[1] >= MBEDTLS_HAVEGE_COLLECT_SIZE ) - havege_fill( hs ); - - val = hs->pool[hs->offset[0]++]; - val ^= hs->pool[hs->offset[1]++]; - - memcpy( p, &val, use_len ); - - len -= use_len; - p += use_len; - } - - return( 0 ); -} - -#endif /* MBEDTLS_HAVEGE_C */ diff --git a/deps/mbedtls/hmac_drbg.c b/deps/mbedtls/hmac_drbg.c index a8ed885c82..b16a682b14 100644 --- a/deps/mbedtls/hmac_drbg.c +++ b/deps/mbedtls/hmac_drbg.c @@ -41,15 +41,6 @@ #include #endif -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_SELF_TEST */ -#endif /* MBEDTLS_PLATFORM_C */ - #include "arc4_alt.h" /* @@ -397,130 +388,4 @@ int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const ch } #endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_SELF_TEST) - -#if !defined(MBEDTLS_SHA1_C) -/* Dummy checkup routine */ -int mbedtls_hmac_drbg_self_test( int verbose ) -{ - (void) verbose; - return( 0 ); -} -#else - -#define OUTPUT_LEN 80 - -/* From a NIST PR=true test vector */ -static const unsigned char entropy_pr[] = { - 0xa0, 0xc9, 0xab, 0x58, 0xf1, 0xe2, 0xe5, 0xa4, 0xde, 0x3e, 0xbd, 0x4f, - 0xf7, 0x3e, 0x9c, 0x5b, 0x64, 0xef, 0xd8, 0xca, 0x02, 0x8c, 0xf8, 0x11, - 0x48, 0xa5, 0x84, 0xfe, 0x69, 0xab, 0x5a, 0xee, 0x42, 0xaa, 0x4d, 0x42, - 0x17, 0x60, 0x99, 0xd4, 0x5e, 0x13, 0x97, 0xdc, 0x40, 0x4d, 0x86, 0xa3, - 0x7b, 0xf5, 0x59, 0x54, 0x75, 0x69, 0x51, 0xe4 }; -static const unsigned char hmac_result_pr[OUTPUT_LEN] = { - 0x9a, 0x00, 0xa2, 0xd0, 0x0e, 0xd5, 0x9b, 0xfe, 0x31, 0xec, 0xb1, 0x39, - 0x9b, 0x60, 0x81, 0x48, 0xd1, 0x96, 0x9d, 0x25, 0x0d, 0x3c, 0x1e, 0x94, - 0x10, 0x10, 0x98, 0x12, 0x93, 0x25, 0xca, 0xb8, 0xfc, 0xcc, 0x2d, 0x54, - 0x73, 0x19, 0x70, 0xc0, 0x10, 0x7a, 0xa4, 0x89, 0x25, 0x19, 0x95, 0x5e, - 0x4b, 0xc6, 0x00, 0x1d, 0x7f, 0x4e, 0x6a, 0x2b, 0xf8, 0xa3, 0x01, 0xab, - 0x46, 0x05, 0x5c, 0x09, 0xa6, 0x71, 0x88, 0xf1, 0xa7, 0x40, 0xee, 0xf3, - 0xe1, 0x5c, 0x02, 0x9b, 0x44, 0xaf, 0x03, 0x44 }; - -/* From a NIST PR=false test vector */ -static const unsigned char entropy_nopr[] = { - 0x79, 0x34, 0x9b, 0xbf, 0x7c, 0xdd, 0xa5, 0x79, 0x95, 0x57, 0x86, 0x66, - 0x21, 0xc9, 0x13, 0x83, 0x11, 0x46, 0x73, 0x3a, 0xbf, 0x8c, 0x35, 0xc8, - 0xc7, 0x21, 0x5b, 0x5b, 0x96, 0xc4, 0x8e, 0x9b, 0x33, 0x8c, 0x74, 0xe3, - 0xe9, 0x9d, 0xfe, 0xdf }; -static const unsigned char hmac_result_nopr[OUTPUT_LEN] = { - 0xc6, 0xa1, 0x6a, 0xb8, 0xd4, 0x20, 0x70, 0x6f, 0x0f, 0x34, 0xab, 0x7f, - 0xec, 0x5a, 0xdc, 0xa9, 0xd8, 0xca, 0x3a, 0x13, 0x3e, 0x15, 0x9c, 0xa6, - 0xac, 0x43, 0xc6, 0xf8, 0xa2, 0xbe, 0x22, 0x83, 0x4a, 0x4c, 0x0a, 0x0a, - 0xff, 0xb1, 0x0d, 0x71, 0x94, 0xf1, 0xc1, 0xa5, 0xcf, 0x73, 0x22, 0xec, - 0x1a, 0xe0, 0x96, 0x4e, 0xd4, 0xbf, 0x12, 0x27, 0x46, 0xe0, 0x87, 0xfd, - 0xb5, 0xb3, 0xe9, 0x1b, 0x34, 0x93, 0xd5, 0xbb, 0x98, 0xfa, 0xed, 0x49, - 0xe8, 0x5f, 0x13, 0x0f, 0xc8, 0xa4, 0x59, 0xb7 }; - -/* "Entropy" from buffer */ -static size_t test_offset; -static int hmac_drbg_self_test_entropy( void *data, - unsigned char *buf, size_t len ) -{ - const unsigned char *p = (const unsigned char*)data; - memcpy( buf, p + test_offset, len ); - test_offset += len; - return( 0 ); -} - -#define CHK( c ) if( (c) != 0 ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - return( 1 ); \ - } - -/* - * Checkup routine for HMAC_DRBG with SHA-1 - */ -int mbedtls_hmac_drbg_self_test( int verbose ) -{ - mbedtls_hmac_drbg_context ctx; - unsigned char buf[OUTPUT_LEN]; - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ); - - mbedtls_hmac_drbg_init( &ctx ); - - /* - * PR = True - */ - if( verbose != 0 ) - mbedtls_printf( " HMAC_DRBG (PR = True) : " ); - - test_offset = 0; - CHK( mbedtls_hmac_drbg_seed( &ctx, md_info, - hmac_drbg_self_test_entropy, (void *) entropy_pr, - NULL, 0 ) ); - mbedtls_hmac_drbg_set_prediction_resistance( &ctx, MBEDTLS_HMAC_DRBG_PR_ON ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( memcmp( buf, hmac_result_pr, OUTPUT_LEN ) ); - mbedtls_hmac_drbg_free( &ctx ); - - mbedtls_hmac_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - /* - * PR = False - */ - if( verbose != 0 ) - mbedtls_printf( " HMAC_DRBG (PR = False) : " ); - - mbedtls_hmac_drbg_init( &ctx ); - - test_offset = 0; - CHK( mbedtls_hmac_drbg_seed( &ctx, md_info, - hmac_drbg_self_test_entropy, (void *) entropy_nopr, - NULL, 0 ) ); - CHK( mbedtls_hmac_drbg_reseed( &ctx, NULL, 0 ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( mbedtls_hmac_drbg_random( &ctx, buf, OUTPUT_LEN ) ); - CHK( memcmp( buf, hmac_result_nopr, OUTPUT_LEN ) ); - mbedtls_hmac_drbg_free( &ctx ); - - mbedtls_hmac_drbg_free( &ctx ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} -#endif /* MBEDTLS_SHA1_C */ -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_HMAC_DRBG_C */ diff --git a/deps/mbedtls/mbedtls/aes.h b/deps/mbedtls/mbedtls/aes.h index 3fbb3688f5..b58c2180ad 100644 --- a/deps/mbedtls/mbedtls/aes.h +++ b/deps/mbedtls/mbedtls/aes.h @@ -32,6 +32,8 @@ #include #include +#include + /* padlock.c and aesni.c rely on these values! */ #define MBEDTLS_AES_ENCRYPT 1 #define MBEDTLS_AES_DECRYPT 0 @@ -39,11 +41,6 @@ #define MBEDTLS_ERR_AES_INVALID_KEY_LENGTH -0x0020 /**< Invalid key length. */ #define MBEDTLS_ERR_AES_INVALID_INPUT_LENGTH -0x0022 /**< Invalid data input length. */ -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - #if !defined(MBEDTLS_AES_ALT) /* Regular implementation */ @@ -279,43 +276,6 @@ int mbedtls_internal_aes_decrypt( mbedtls_aes_context *ctx, const unsigned char input[16], unsigned char output[16] ); -#if !defined(MBEDTLS_DEPRECATED_REMOVED) -#if defined(MBEDTLS_DEPRECATED_WARNING) -#define MBEDTLS_DEPRECATED __attribute__((deprecated)) -#else -#define MBEDTLS_DEPRECATED -#endif -/** - * \brief Deprecated internal AES block encryption function - * without return value. - * - * \deprecated Superseded by mbedtls_aes_encrypt_ext() in 2.5.0 - * - * \param ctx AES context - * \param input Plaintext block - * \param output Output (ciphertext) block - */ -MBEDTLS_DEPRECATED void mbedtls_aes_encrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ); - -/** - * \brief Deprecated internal AES block decryption function - * without return value. - * - * \deprecated Superseded by mbedtls_aes_decrypt_ext() in 2.5.0 - * - * \param ctx AES context - * \param input Ciphertext block - * \param output Output (plaintext) block - */ -MBEDTLS_DEPRECATED void mbedtls_aes_decrypt( mbedtls_aes_context *ctx, - const unsigned char input[16], - unsigned char output[16] ); - -#undef MBEDTLS_DEPRECATED -#endif /* !MBEDTLS_DEPRECATED_REMOVED */ - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/bn_mul.h b/deps/mbedtls/mbedtls/bn_mul.h index cac3f14577..41173e0368 100644 --- a/deps/mbedtls/mbedtls/bn_mul.h +++ b/deps/mbedtls/mbedtls/bn_mul.h @@ -404,78 +404,6 @@ #endif /* PPC32 */ -/* - * The Sparc(64) assembly is reported to be broken. - * Disable it for now, until we're able to fix it. - */ -#if 0 && defined(__sparc__) -#if defined(__sparc64__) - -#define MULADDC_INIT \ - asm( \ - "ldx %3, %%o0 \n\t" \ - "ldx %4, %%o1 \n\t" \ - "ld %5, %%o2 \n\t" \ - "ld %6, %%o3 \n\t" - -#define MULADDC_CORE \ - "ld [%%o0], %%o4 \n\t" \ - "inc 4, %%o0 \n\t" \ - "ld [%%o1], %%o5 \n\t" \ - "umul %%o3, %%o4, %%o4 \n\t" \ - "addcc %%o4, %%o2, %%o4 \n\t" \ - "rd %%y, %%g1 \n\t" \ - "addx %%g1, 0, %%g1 \n\t" \ - "addcc %%o4, %%o5, %%o4 \n\t" \ - "st %%o4, [%%o1] \n\t" \ - "addx %%g1, 0, %%o2 \n\t" \ - "inc 4, %%o1 \n\t" - - #define MULADDC_STOP \ - "st %%o2, %0 \n\t" \ - "stx %%o1, %1 \n\t" \ - "stx %%o0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "g1", "o0", "o1", "o2", "o3", "o4", \ - "o5" \ - ); - -#else /* __sparc64__ */ - -#define MULADDC_INIT \ - asm( \ - "ld %3, %%o0 \n\t" \ - "ld %4, %%o1 \n\t" \ - "ld %5, %%o2 \n\t" \ - "ld %6, %%o3 \n\t" - -#define MULADDC_CORE \ - "ld [%%o0], %%o4 \n\t" \ - "inc 4, %%o0 \n\t" \ - "ld [%%o1], %%o5 \n\t" \ - "umul %%o3, %%o4, %%o4 \n\t" \ - "addcc %%o4, %%o2, %%o4 \n\t" \ - "rd %%y, %%g1 \n\t" \ - "addx %%g1, 0, %%g1 \n\t" \ - "addcc %%o4, %%o5, %%o4 \n\t" \ - "st %%o4, [%%o1] \n\t" \ - "addx %%g1, 0, %%o2 \n\t" \ - "inc 4, %%o1 \n\t" - -#define MULADDC_STOP \ - "st %%o2, %0 \n\t" \ - "st %%o1, %1 \n\t" \ - "st %%o0, %2 \n\t" \ - : "=m" (c), "=m" (d), "=m" (s) \ - : "m" (s), "m" (d), "m" (c), "m" (b) \ - : "g1", "o0", "o1", "o2", "o3", "o4", \ - "o5" \ - ); - -#endif /* __sparc64__ */ -#endif /* __sparc__ */ - #if defined(__microblaze__) || defined(microblaze) #define MULADDC_INIT \ diff --git a/deps/mbedtls/mbedtls/ccm.h b/deps/mbedtls/mbedtls/ccm.h index ef75839baa..65b4f7bb16 100644 --- a/deps/mbedtls/mbedtls/ccm.h +++ b/deps/mbedtls/mbedtls/ccm.h @@ -125,15 +125,6 @@ int mbedtls_ccm_auth_decrypt( mbedtls_ccm_context *ctx, size_t length, const unsigned char *input, unsigned char *output, const unsigned char *tag, size_t tag_len ); -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_AES_C) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_ccm_self_test( int verbose ); -#endif /* MBEDTLS_SELF_TEST && MBEDTLS_AES_C */ - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/check_config.h b/deps/mbedtls/mbedtls/check_config.h index fa72454e53..62350679f3 100644 --- a/deps/mbedtls/mbedtls/check_config.h +++ b/deps/mbedtls/mbedtls/check_config.h @@ -38,33 +38,11 @@ #error "mbed TLS requires a platform with 8-bit chars" #endif -#if defined(_WIN32) -#if !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_C is required on Windows" -#endif - -/* Fix the config here. Not convenient to put an #ifdef _WIN32 in config.h as - * it would confuse config.pl. */ -#if !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && \ - !defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) -#define MBEDTLS_PLATFORM_SNPRINTF_ALT -#endif -#endif /* _WIN32 */ - #if defined(TARGET_LIKE_MBED) && \ ( defined(MBEDTLS_NET_C) || defined(MBEDTLS_TIMING_C) ) #error "The NET and TIMING modules are not available for mbed OS - please use the network and timing functions provided by mbed OS" #endif -#if defined(MBEDTLS_DEPRECATED_WARNING) && \ - !defined(__GNUC__) && !defined(__clang__) -#error "MBEDTLS_DEPRECATED_WARNING only works with GCC and Clang" -#endif - -#if defined(MBEDTLS_HAVE_TIME_DATE) && !defined(MBEDTLS_HAVE_TIME) -#error "MBEDTLS_HAVE_TIME_DATE without MBEDTLS_HAVE_TIME does not make sense" -#endif - #if defined(MBEDTLS_AESNI_C) && !defined(MBEDTLS_HAVE_ASM) #error "MBEDTLS_AESNI_C defined, but not all prerequisites" #endif @@ -77,11 +55,6 @@ #error "MBEDTLS_DHM_C defined, but not all prerequisites" #endif -#if defined(MBEDTLS_CMAC_C) && \ - !defined(MBEDTLS_AES_C) && !defined(MBEDTLS_DES_C) -#error "MBEDTLS_CMAC_C defined, but not all prerequisites" -#endif - #if defined(MBEDTLS_ECDH_C) && !defined(MBEDTLS_ECP_C) #error "MBEDTLS_ECDH_C defined, but not all prerequisites" #endif @@ -93,11 +66,6 @@ #error "MBEDTLS_ECDSA_C defined, but not all prerequisites" #endif -#if defined(MBEDTLS_ECJPAKE_C) && \ - ( !defined(MBEDTLS_ECP_C) || !defined(MBEDTLS_MD_C) ) -#error "MBEDTLS_ECJPAKE_C defined, but not all prerequisites" -#endif - #if defined(MBEDTLS_ECDSA_DETERMINISTIC) && !defined(MBEDTLS_HMAC_DRBG_C) #error "MBEDTLS_ECDSA_DETERMINISTIC defined, but not all prerequisites" #endif @@ -135,16 +103,6 @@ #error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites" #endif -#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \ - ( !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) ) -#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites" -#endif -#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \ - ( defined(MBEDTLS_ENTROPY_NV_SEED) || defined(MBEDTLS_ENTROPY_HARDWARE_ALT) || \ - defined(MBEDTLS_HAVEGE_C) ) -#error "MBEDTLS_TEST_NULL_ENTROPY defined, but entropy sources too" -#endif - #if defined(MBEDTLS_GCM_C) && ( \ !defined(MBEDTLS_AES_C) && !defined(MBEDTLS_CAMELLIA_C) ) #error "MBEDTLS_GCM_C defined, but not all prerequisites" @@ -182,10 +140,6 @@ #error "MBEDTLS_ECP_NORMALIZE_MXZ_ALT defined, but not all prerequisites" #endif -#if defined(MBEDTLS_HAVEGE_C) && !defined(MBEDTLS_TIMING_C) -#error "MBEDTLS_HAVEGE_C defined, but not all prerequisites" -#endif - #if defined(MBEDTLS_HMAC_DRBG_C) && !defined(MBEDTLS_MD_C) #error "MBEDTLS_HMAC_DRBG_C defined, but not all prerequisites" #endif @@ -239,17 +193,6 @@ #error "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED defined, but not all prerequisites" #endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) && \ - ( !defined(MBEDTLS_ECJPAKE_C) || !defined(MBEDTLS_SHA256_C) || \ - !defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) ) -#error "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && \ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_MEMORY_BUFFER_ALLOC_C defined, but not all prerequisites" -#endif - #if defined(MBEDTLS_PADLOCK_C) && !defined(MBEDTLS_HAVE_ASM) #error "MBEDTLS_PADLOCK_C defined, but not all prerequisites" #endif @@ -275,203 +218,6 @@ #error "MBEDTLS_PK_WRITE_C defined, but not all prerequisites" #endif -#if defined(MBEDTLS_PKCS11_C) && !defined(MBEDTLS_PK_C) -#error "MBEDTLS_PKCS11_C defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_EXIT_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_EXIT_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_EXIT) ||\ - defined(MBEDTLS_PLATFORM_EXIT_ALT) ) -#error "MBEDTLS_PLATFORM_EXIT_MACRO and MBEDTLS_PLATFORM_STD_EXIT/MBEDTLS_PLATFORM_EXIT_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_TIME_ALT) &&\ - ( !defined(MBEDTLS_PLATFORM_C) ||\ - !defined(MBEDTLS_HAVE_TIME) ) -#error "MBEDTLS_PLATFORM_TIME_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_TIME_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) ||\ - !defined(MBEDTLS_HAVE_TIME) ) -#error "MBEDTLS_PLATFORM_TIME_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) ||\ - !defined(MBEDTLS_HAVE_TIME) ) -#error "MBEDTLS_PLATFORM_TIME_TYPE_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_TIME_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_TIME) ||\ - defined(MBEDTLS_PLATFORM_TIME_ALT) ) -#error "MBEDTLS_PLATFORM_TIME_MACRO and MBEDTLS_PLATFORM_STD_TIME/MBEDTLS_PLATFORM_TIME_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_TIME) ||\ - defined(MBEDTLS_PLATFORM_TIME_ALT) ) -#error "MBEDTLS_PLATFORM_TIME_TYPE_MACRO and MBEDTLS_PLATFORM_STD_TIME/MBEDTLS_PLATFORM_TIME_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_FPRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_FPRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_FPRINTF) ||\ - defined(MBEDTLS_PLATFORM_FPRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_FPRINTF_MACRO and MBEDTLS_PLATFORM_STD_FPRINTF/MBEDTLS_PLATFORM_FPRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_PLATFORM_FREE_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) &&\ - defined(MBEDTLS_PLATFORM_STD_FREE) -#error "MBEDTLS_PLATFORM_FREE_MACRO and MBEDTLS_PLATFORM_STD_FREE cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) && !defined(MBEDTLS_PLATFORM_CALLOC_MACRO) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO must be defined if MBEDTLS_PLATFORM_FREE_MACRO is" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_PLATFORM_MEMORY) ) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) &&\ - defined(MBEDTLS_PLATFORM_STD_CALLOC) -#error "MBEDTLS_PLATFORM_CALLOC_MACRO and MBEDTLS_PLATFORM_STD_CALLOC cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_CALLOC_MACRO) && !defined(MBEDTLS_PLATFORM_FREE_MACRO) -#error "MBEDTLS_PLATFORM_FREE_MACRO must be defined if MBEDTLS_PLATFORM_CALLOC_MACRO is" -#endif - -#if defined(MBEDTLS_PLATFORM_MEMORY) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_MEMORY defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_PRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_PRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_PRINTF) ||\ - defined(MBEDTLS_PLATFORM_PRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_PRINTF_MACRO and MBEDTLS_PLATFORM_STD_PRINTF/MBEDTLS_PLATFORM_PRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_SNPRINTF_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) && !defined(MBEDTLS_PLATFORM_C) -#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_SNPRINTF) ||\ - defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) ) -#error "MBEDTLS_PLATFORM_SNPRINTF_MACRO and MBEDTLS_PLATFORM_STD_SNPRINTF/MBEDTLS_PLATFORM_SNPRINTF_ALT cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) &&\ - !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) -#error "MBEDTLS_PLATFORM_STD_MEM_HDR defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_CALLOC) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_CALLOC defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_FREE) && !defined(MBEDTLS_PLATFORM_MEMORY) -#error "MBEDTLS_PLATFORM_STD_FREE defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_EXIT) &&\ - !defined(MBEDTLS_PLATFORM_EXIT_ALT) -#error "MBEDTLS_PLATFORM_STD_EXIT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_TIME) &&\ - ( !defined(MBEDTLS_PLATFORM_TIME_ALT) ||\ - !defined(MBEDTLS_HAVE_TIME) ) -#error "MBEDTLS_PLATFORM_STD_TIME defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_FPRINTF) &&\ - !defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_FPRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_PRINTF) &&\ - !defined(MBEDTLS_PLATFORM_PRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_PRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_SNPRINTF) &&\ - !defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -#error "MBEDTLS_PLATFORM_STD_SNPRINTF defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_ENTROPY_NV_SEED) &&\ - ( !defined(MBEDTLS_PLATFORM_C) || !defined(MBEDTLS_ENTROPY_C) ) -#error "MBEDTLS_ENTROPY_NV_SEED defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) &&\ - !defined(MBEDTLS_ENTROPY_NV_SEED) -#error "MBEDTLS_PLATFORM_NV_SEED_ALT defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) &&\ - !defined(MBEDTLS_PLATFORM_NV_SEED_ALT) -#error "MBEDTLS_PLATFORM_STD_NV_SEED_READ defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) &&\ - !defined(MBEDTLS_PLATFORM_NV_SEED_ALT) -#error "MBEDTLS_PLATFORM_STD_NV_SEED_WRITE defined, but not all prerequisites" -#endif - -#if defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) ||\ - defined(MBEDTLS_PLATFORM_NV_SEED_ALT) ) -#error "MBEDTLS_PLATFORM_NV_SEED_READ_MACRO and MBEDTLS_PLATFORM_STD_NV_SEED_READ cannot be defined simultaneously" -#endif - -#if defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO) &&\ - ( defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) ||\ - defined(MBEDTLS_PLATFORM_NV_SEED_ALT) ) -#error "MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO and MBEDTLS_PLATFORM_STD_NV_SEED_WRITE cannot be defined simultaneously" -#endif - #if defined(MBEDTLS_RSA_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ !defined(MBEDTLS_OID_C) ) #error "MBEDTLS_RSA_C defined, but not all prerequisites" @@ -614,10 +360,6 @@ #endif #undef MBEDTLS_THREADING_IMPL -#if defined(MBEDTLS_VERSION_FEATURES) && !defined(MBEDTLS_VERSION_C) -#error "MBEDTLS_VERSION_FEATURES defined, but not all prerequisites" -#endif - #if defined(MBEDTLS_X509_USE_C) && ( !defined(MBEDTLS_BIGNUM_C) || \ !defined(MBEDTLS_OID_C) || !defined(MBEDTLS_ASN1_PARSE_C) || \ !defined(MBEDTLS_PK_PARSE_C) ) diff --git a/deps/mbedtls/mbedtls/cipher.h b/deps/mbedtls/mbedtls/cipher.h index f806573572..8148678a8b 100644 --- a/deps/mbedtls/mbedtls/cipher.h +++ b/deps/mbedtls/mbedtls/cipher.h @@ -243,11 +243,6 @@ typedef struct { /** Cipher-specific context */ void *cipher_ctx; - -#if defined(MBEDTLS_CMAC_C) - /** CMAC Specific context */ - mbedtls_cmac_context_t *cmac_ctx; -#endif } mbedtls_cipher_context_t; /** diff --git a/deps/mbedtls/mbedtls/cmac.h b/deps/mbedtls/mbedtls/cmac.h index 9a2b96bc92..a95b6d86fb 100644 --- a/deps/mbedtls/mbedtls/cmac.h +++ b/deps/mbedtls/mbedtls/cmac.h @@ -154,15 +154,6 @@ int mbedtls_aes_cmac_prf_128( const unsigned char *key, size_t key_len, unsigned char output[16] ); #endif /* MBEDTLS_AES_C */ -#if defined(MBEDTLS_SELF_TEST) && ( defined(MBEDTLS_AES_C) || defined(MBEDTLS_DES_C) ) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_cmac_self_test( int verbose ); -#endif /* MBEDTLS_SELF_TEST && ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/compat-1.3.h b/deps/mbedtls/mbedtls/compat-1.3.h index bba1d2c247..bda4883d77 100644 --- a/deps/mbedtls/mbedtls/compat-1.3.h +++ b/deps/mbedtls/mbedtls/compat-1.3.h @@ -24,12 +24,6 @@ * This file is part of mbed TLS (https://tls.mbed.org) */ -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) - -#if defined(MBEDTLS_DEPRECATED_WARNING) -#warning "Including compat-1.3.h is deprecated" -#endif - #ifndef MBEDTLS_COMPAT13_H #define MBEDTLS_COMPAT13_H @@ -45,9 +39,6 @@ #if defined MBEDTLS_AES_C #define POLARSSL_AES_C MBEDTLS_AES_C #endif -#if defined MBEDTLS_AES_ROM_TABLES -#define POLARSSL_AES_ROM_TABLES MBEDTLS_AES_ROM_TABLES -#endif #if defined MBEDTLS_ARC4_ALT #define POLARSSL_ARC4_ALT MBEDTLS_ARC4_ALT #endif @@ -117,15 +108,6 @@ #if defined MBEDTLS_CTR_DRBG_C #define POLARSSL_CTR_DRBG_C MBEDTLS_CTR_DRBG_C #endif -#if defined MBEDTLS_DEBUG_C -#define POLARSSL_DEBUG_C MBEDTLS_DEBUG_C -#endif -#if defined MBEDTLS_DEPRECATED_REMOVED -#define POLARSSL_DEPRECATED_REMOVED MBEDTLS_DEPRECATED_REMOVED -#endif -#if defined MBEDTLS_DEPRECATED_WARNING -#define POLARSSL_DEPRECATED_WARNING MBEDTLS_DEPRECATED_WARNING -#endif #if defined MBEDTLS_DES_ALT #define POLARSSL_DES_ALT MBEDTLS_DES_ALT #endif @@ -204,9 +186,6 @@ #if defined MBEDTLS_ENTROPY_FORCE_SHA256 #define POLARSSL_ENTROPY_FORCE_SHA256 MBEDTLS_ENTROPY_FORCE_SHA256 #endif -#if defined MBEDTLS_ERROR_C -#define POLARSSL_ERROR_C MBEDTLS_ERROR_C -#endif #if defined MBEDTLS_ERROR_STRERROR_DUMMY #define POLARSSL_ERROR_STRERROR_DUMMY MBEDTLS_ERROR_STRERROR_DUMMY #endif @@ -219,18 +198,12 @@ #if defined MBEDTLS_GENPRIME #define POLARSSL_GENPRIME MBEDTLS_GENPRIME #endif -#if defined MBEDTLS_HAVEGE_C -#define POLARSSL_HAVEGE_C MBEDTLS_HAVEGE_C -#endif #if defined MBEDTLS_HAVE_ASM #define POLARSSL_HAVE_ASM MBEDTLS_HAVE_ASM #endif #if defined MBEDTLS_HAVE_SSE2 #define POLARSSL_HAVE_SSE2 MBEDTLS_HAVE_SSE2 #endif -#if defined MBEDTLS_HAVE_TIME -#define POLARSSL_HAVE_TIME MBEDTLS_HAVE_TIME -#endif #if defined MBEDTLS_HMAC_DRBG_C #define POLARSSL_HMAC_DRBG_C MBEDTLS_HMAC_DRBG_C #endif @@ -276,24 +249,6 @@ #if defined MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED #define POLARSSL_KEY_EXCHANGE_RSA_PSK_ENABLED MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED #endif -#if defined MBEDTLS_MD2_ALT -#define POLARSSL_MD2_ALT MBEDTLS_MD2_ALT -#endif -#if defined MBEDTLS_MD2_C -#define POLARSSL_MD2_C MBEDTLS_MD2_C -#endif -#if defined MBEDTLS_MD2_PROCESS_ALT -#define POLARSSL_MD2_PROCESS_ALT MBEDTLS_MD2_PROCESS_ALT -#endif -#if defined MBEDTLS_MD4_ALT -#define POLARSSL_MD4_ALT MBEDTLS_MD4_ALT -#endif -#if defined MBEDTLS_MD4_C -#define POLARSSL_MD4_C MBEDTLS_MD4_C -#endif -#if defined MBEDTLS_MD4_PROCESS_ALT -#define POLARSSL_MD4_PROCESS_ALT MBEDTLS_MD4_PROCESS_ALT -#endif #if defined MBEDTLS_MD5_ALT #define POLARSSL_MD5_ALT MBEDTLS_MD5_ALT #endif @@ -309,15 +264,6 @@ #if defined MBEDTLS_MEMORY_ALIGN_MULTIPLE #define POLARSSL_MEMORY_ALIGN_MULTIPLE MBEDTLS_MEMORY_ALIGN_MULTIPLE #endif -#if defined MBEDTLS_MEMORY_BACKTRACE -#define POLARSSL_MEMORY_BACKTRACE MBEDTLS_MEMORY_BACKTRACE -#endif -#if defined MBEDTLS_MEMORY_BUFFER_ALLOC_C -#define POLARSSL_MEMORY_BUFFER_ALLOC_C MBEDTLS_MEMORY_BUFFER_ALLOC_C -#endif -#if defined MBEDTLS_MEMORY_DEBUG -#define POLARSSL_MEMORY_DEBUG MBEDTLS_MEMORY_DEBUG -#endif #if defined MBEDTLS_MPI_MAX_SIZE #define POLARSSL_MPI_MAX_SIZE MBEDTLS_MPI_MAX_SIZE #endif @@ -327,12 +273,6 @@ #if defined MBEDTLS_NET_C #define POLARSSL_NET_C MBEDTLS_NET_C #endif -#if defined MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#define POLARSSL_NO_DEFAULT_ENTROPY_SOURCES MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#endif -#if defined MBEDTLS_NO_PLATFORM_ENTROPY -#define POLARSSL_NO_PLATFORM_ENTROPY MBEDTLS_NO_PLATFORM_ENTROPY -#endif #if defined MBEDTLS_OID_C #define POLARSSL_OID_C MBEDTLS_OID_C #endif @@ -345,9 +285,6 @@ #if defined MBEDTLS_PEM_WRITE_C #define POLARSSL_PEM_WRITE_C MBEDTLS_PEM_WRITE_C #endif -#if defined MBEDTLS_PKCS11_C -#define POLARSSL_PKCS11_C MBEDTLS_PKCS11_C -#endif #if defined MBEDTLS_PKCS12_C #define POLARSSL_PKCS12_C MBEDTLS_PKCS12_C #endif @@ -375,9 +312,6 @@ #if defined MBEDTLS_PK_WRITE_C #define POLARSSL_PK_WRITE_C MBEDTLS_PK_WRITE_C #endif -#if defined MBEDTLS_PLATFORM_C -#define POLARSSL_PLATFORM_C MBEDTLS_PLATFORM_C -#endif #if defined MBEDTLS_PLATFORM_EXIT_ALT #define POLARSSL_PLATFORM_EXIT_ALT MBEDTLS_PLATFORM_EXIT_ALT #endif @@ -396,9 +330,6 @@ #if defined MBEDTLS_PLATFORM_MEMORY #define POLARSSL_PLATFORM_MEMORY MBEDTLS_PLATFORM_MEMORY #endif -#if defined MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#define POLARSSL_PLATFORM_NO_STD_FUNCTIONS MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#endif #if defined MBEDTLS_PLATFORM_PRINTF_ALT #define POLARSSL_PLATFORM_PRINTF_ALT MBEDTLS_PLATFORM_PRINTF_ALT #endif @@ -411,18 +342,12 @@ #if defined MBEDTLS_PLATFORM_SNPRINTF_MACRO #define POLARSSL_PLATFORM_SNPRINTF_MACRO MBEDTLS_PLATFORM_SNPRINTF_MACRO #endif -#if defined MBEDTLS_PLATFORM_STD_EXIT -#define POLARSSL_PLATFORM_STD_EXIT MBEDTLS_PLATFORM_STD_EXIT -#endif #if defined MBEDTLS_PLATFORM_STD_FPRINTF #define POLARSSL_PLATFORM_STD_FPRINTF MBEDTLS_PLATFORM_STD_FPRINTF #endif #if defined MBEDTLS_PLATFORM_STD_FREE #define POLARSSL_PLATFORM_STD_FREE MBEDTLS_PLATFORM_STD_FREE #endif -#if defined MBEDTLS_PLATFORM_STD_MEM_HDR -#define POLARSSL_PLATFORM_STD_MEM_HDR MBEDTLS_PLATFORM_STD_MEM_HDR -#endif #if defined MBEDTLS_PLATFORM_STD_PRINTF #define POLARSSL_PLATFORM_STD_PRINTF MBEDTLS_PLATFORM_STD_PRINTF #endif @@ -447,12 +372,6 @@ #if defined MBEDTLS_RSA_C #define POLARSSL_RSA_C MBEDTLS_RSA_C #endif -#if defined MBEDTLS_RSA_NO_CRT -#define POLARSSL_RSA_NO_CRT MBEDTLS_RSA_NO_CRT -#endif -#if defined MBEDTLS_SELF_TEST -#define POLARSSL_SELF_TEST MBEDTLS_SELF_TEST -#endif #if defined MBEDTLS_SHA1_ALT #define POLARSSL_SHA1_ALT MBEDTLS_SHA1_ALT #endif @@ -576,18 +495,12 @@ #if defined MBEDTLS_THREADING_PTHREAD #define POLARSSL_THREADING_PTHREAD MBEDTLS_THREADING_PTHREAD #endif -#if defined MBEDTLS_TIMING_ALT -#define POLARSSL_TIMING_ALT MBEDTLS_TIMING_ALT -#endif #if defined MBEDTLS_TIMING_C #define POLARSSL_TIMING_C MBEDTLS_TIMING_C #endif #if defined MBEDTLS_VERSION_C #define POLARSSL_VERSION_C MBEDTLS_VERSION_C #endif -#if defined MBEDTLS_VERSION_FEATURES -#define POLARSSL_VERSION_FEATURES MBEDTLS_VERSION_FEATURES -#endif #if defined MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 #define POLARSSL_X509_ALLOW_EXTENSIONS_NON_V3 MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 #endif @@ -633,9 +546,6 @@ #if defined MBEDTLS_XTEA_C #define POLARSSL_XTEA_C MBEDTLS_XTEA_C #endif -#if defined MBEDTLS_ZLIB_SUPPORT -#define POLARSSL_ZLIB_SUPPORT MBEDTLS_ZLIB_SUPPORT -#endif /* * Misc names (macros, types, functions, enum constants...) @@ -1943,7 +1853,7 @@ #define entropy_update_manual mbedtls_entropy_update_manual #define entropy_update_seed_file mbedtls_entropy_update_seed_file #define entropy_write_seed_file mbedtls_entropy_write_seed_file -#define error_strerror mbedtls_strerror +#define error_strerror strerror #define f_source_ptr mbedtls_entropy_f_source_ptr #define gcm_auth_decrypt mbedtls_gcm_auth_decrypt #define gcm_context mbedtls_gcm_context @@ -2175,15 +2085,15 @@ #define platform_set_fprintf mbedtls_platform_set_fprintf #define platform_set_printf mbedtls_platform_set_printf #define platform_set_snprintf mbedtls_platform_set_snprintf -#define polarssl_exit mbedtls_exit -#define polarssl_fprintf mbedtls_fprintf -#define polarssl_free mbedtls_free +#define polarssl_exit exit +#define polarssl_fprintf fprintf +#define polarssl_free free #define polarssl_mutex_free mbedtls_mutex_free #define polarssl_mutex_init mbedtls_mutex_init #define polarssl_mutex_lock mbedtls_mutex_lock #define polarssl_mutex_unlock mbedtls_mutex_unlock -#define polarssl_printf mbedtls_printf -#define polarssl_snprintf mbedtls_snprintf +#define polarssl_printf printf +#define polarssl_snprintf snprintf #define polarssl_strerror mbedtls_strerror #define ripemd160 mbedtls_ripemd160 #define ripemd160_context mbedtls_ripemd160_context @@ -2520,4 +2430,3 @@ #define xtea_setup mbedtls_xtea_setup #endif /* compat-1.3.h */ -#endif /* MBEDTLS_DEPRECATED_REMOVED */ diff --git a/deps/mbedtls/mbedtls/config.h b/deps/mbedtls/mbedtls/config.h index 6ea52a9b32..fa1a83897f 100644 --- a/deps/mbedtls/mbedtls/config.h +++ b/deps/mbedtls/mbedtls/config.h @@ -97,21 +97,6 @@ #define MBEDTLS_HAVE_SSE2 #endif -/** - * \def MBEDTLS_HAVE_TIME - * - * System has time.h and time(). - * The time does not need to be correct, only time differences are used, - * by contrast with MBEDTLS_HAVE_TIME_DATE - * - * Defining MBEDTLS_HAVE_TIME allows you to specify MBEDTLS_PLATFORM_TIME_ALT, - * MBEDTLS_PLATFORM_TIME_MACRO, MBEDTLS_PLATFORM_TIME_TYPE_MACRO and - * MBEDTLS_PLATFORM_STD_TIME. - * - * Comment if your system does not support time functions - */ -#define MBEDTLS_HAVE_TIME - /** * \def MBEDTLS_HAVE_TIME_DATE * @@ -124,117 +109,6 @@ */ #define MBEDTLS_HAVE_TIME_DATE -/** - * \def MBEDTLS_PLATFORM_MEMORY - * - * Enable the memory allocation layer. - * - * By default mbed TLS uses the system-provided calloc() and free(). - * This allows different allocators (self-implemented or provided) to be - * provided to the platform abstraction layer. - * - * Enabling MBEDTLS_PLATFORM_MEMORY without the - * MBEDTLS_PLATFORM_{FREE,CALLOC}_MACROs will provide - * "mbedtls_platform_set_calloc_free()" allowing you to set an alternative calloc() and - * free() function pointer at runtime. - * - * Enabling MBEDTLS_PLATFORM_MEMORY and specifying - * MBEDTLS_PLATFORM_{CALLOC,FREE}_MACROs will allow you to specify the - * alternate function at compile time. - * - * Requires: MBEDTLS_PLATFORM_C - * - * Enable this layer to allow use of alternative memory allocators. - */ -#if 0 -#define MBEDTLS_PLATFORM_MEMORY -#endif - -/** - * \def MBEDTLS_PLATFORM_NO_STD_FUNCTIONS - * - * Do not assign standard functions in the platform layer (e.g. calloc() to - * MBEDTLS_PLATFORM_STD_CALLOC and printf() to MBEDTLS_PLATFORM_STD_PRINTF) - * - * This makes sure there are no linking errors on platforms that do not support - * these functions. You will HAVE to provide alternatives, either at runtime - * via the platform_set_xxx() functions or at compile time by setting - * the MBEDTLS_PLATFORM_STD_XXX defines, or enabling a - * MBEDTLS_PLATFORM_XXX_MACRO. - * - * Requires: MBEDTLS_PLATFORM_C - * - * Uncomment to prevent default assignment of standard functions in the - * platform layer. - */ -#if 0 -#define MBEDTLS_PLATFORM_NO_STD_FUNCTIONS -#endif - -/** - * \def MBEDTLS_PLATFORM_EXIT_ALT - * - * MBEDTLS_PLATFORM_XXX_ALT: Uncomment a macro to let mbed TLS support the - * function in the platform abstraction layer. - * - * Example: In case you uncomment MBEDTLS_PLATFORM_PRINTF_ALT, mbed TLS will - * provide a function "mbedtls_platform_set_printf()" that allows you to set an - * alternative printf function pointer. - * - * All these define require MBEDTLS_PLATFORM_C to be defined! - * - * \note MBEDTLS_PLATFORM_SNPRINTF_ALT is required on Windows; - * it will be enabled automatically by check_config.h - * - * \warning MBEDTLS_PLATFORM_XXX_ALT cannot be defined at the same time as - * MBEDTLS_PLATFORM_XXX_MACRO! - * - * Requires: MBEDTLS_PLATFORM_TIME_ALT requires MBEDTLS_HAVE_TIME - * - * Uncomment a macro to enable alternate implementation of specific base - * platform function - */ -#if 0 -#define MBEDTLS_PLATFORM_EXIT_ALT -#define MBEDTLS_PLATFORM_TIME_ALT -#define MBEDTLS_PLATFORM_FPRINTF_ALT -#define MBEDTLS_PLATFORM_PRINTF_ALT -#define MBEDTLS_PLATFORM_SNPRINTF_ALT -#define MBEDTLS_PLATFORM_NV_SEED_ALT -#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT -#endif - -/** - * \def MBEDTLS_DEPRECATED_WARNING - * - * Mark deprecated functions so that they generate a warning if used. - * Functions deprecated in one version will usually be removed in the next - * version. You can enable this to help you prepare the transition to a new - * major version by making sure your code is not using these functions. - * - * This only works with GCC and Clang. With other compilers, you may want to - * use MBEDTLS_DEPRECATED_REMOVED - * - * Uncomment to get warnings on using deprecated functions. - */ -#if 0 -#define MBEDTLS_DEPRECATED_WARNING -#endif - -/** - * \def MBEDTLS_DEPRECATED_REMOVED - * - * Remove deprecated functions so that they generate an error if used. - * Functions deprecated in one version will usually be removed in the next - * version. You can enable this to help you prepare the transition to a new - * major version by making sure your code is not using these functions. - * - * Uncomment to get errors on using deprecated functions. - */ -#if 0 -#define MBEDTLS_DEPRECATED_REMOVED -#endif - /* \} name SECTION: System support */ /** @@ -245,21 +119,6 @@ * \{ */ -/** - * \def MBEDTLS_TIMING_ALT - * - * Uncomment to provide your own alternate implementation for mbedtls_timing_hardclock(), - * mbedtls_timing_get_timer(), mbedtls_set_alarm(), mbedtls_set/get_delay() - * - * Only works if you have MBEDTLS_TIMING_C enabled. - * - * You will need to provide a header "timing_alt.h" and an implementation at - * compile time. - */ -#if 0 -#define MBEDTLS_TIMING_ALT -#endif - /** * \def MBEDTLS_AES_ALT * @@ -412,25 +271,6 @@ #define MBEDTLS_ECP_NORMALIZE_MXZ_ALT #endif -/** - * \def MBEDTLS_TEST_NULL_ENTROPY - * - * Enables testing and use of mbed TLS without any configured entropy sources. - * This permits use of the library on platforms before an entropy source has - * been integrated (see for example the MBEDTLS_ENTROPY_HARDWARE_ALT or the - * MBEDTLS_ENTROPY_NV_SEED switches). - * - * WARNING! This switch MUST be disabled in production builds, and is suitable - * only for development. - * Enabling the switch negates any security provided by the library. - * - * Requires MBEDTLS_ENTROPY_C, MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES - * - */ -#if 0 -#define MBEDTLS_TEST_NULL_ENTROPY -#endif - /** * \def MBEDTLS_ENTROPY_HARDWARE_ALT * @@ -446,17 +286,6 @@ #define MBEDTLS_ENTROPY_HARDWARE_ALT #endif -/** - * \def MBEDTLS_AES_ROM_TABLES - * - * Store the AES tables in ROM. - * - * Uncomment this macro to store the AES tables in ROM. - */ -#if 0 -#define MBEDTLS_AES_ROM_TABLES -#endif - /** * \def MBEDTLS_CAMELLIA_SMALL_MEMORY * @@ -858,27 +687,6 @@ */ #define MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED -/** - * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED - * - * Enable the ECJPAKE based ciphersuite modes in SSL / TLS. - * - * \warning This is currently experimental. EC J-PAKE support is based on the - * Thread v1.0.0 specification; incompatible changes to the specification - * might still happen. For this reason, this is disabled by default. - * - * Requires: MBEDTLS_ECJPAKE_C - * MBEDTLS_SHA256_C - * MBEDTLS_ECP_DP_SECP256R1_ENABLED - * - * This enables the following ciphersuites (if other requisites are - * enabled as well): - * MBEDTLS_TLS_ECJPAKE_WITH_AES_128_CCM_8 - */ -#if 0 -#define MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED -#endif - /** * \def MBEDTLS_PK_PARSE_EC_EXTENDED * @@ -893,23 +701,6 @@ */ #define MBEDTLS_PK_PARSE_EC_EXTENDED -/** - * \def MBEDTLS_ERROR_STRERROR_DUMMY - * - * Enable a dummy error function to make use of mbedtls_strerror() in - * third party libraries easier when MBEDTLS_ERROR_C is disabled - * (no effect when MBEDTLS_ERROR_C is enabled). - * - * You can safely disable this if MBEDTLS_ERROR_C is enabled, or if you're - * not using mbedtls_strerror() or error_strerror() in your application. - * - * Disable if you run into name conflicts and want to really remove the - * mbedtls_strerror() - */ -#if 0 -#define MBEDTLS_ERROR_STRERROR_DUMMY -#endif - /** * \def MBEDTLS_GENPRIME * @@ -926,34 +717,6 @@ */ #define MBEDTLS_FS_IO -/** - * \def MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES - * - * Do not add default entropy sources. These are the platform specific, - * mbedtls_timing_hardclock and HAVEGE based poll functions. - * - * This is useful to have more control over the added entropy sources in an - * application. - * - * Uncomment this macro to prevent loading of default entropy functions. - */ -#if 0 -#define MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES -#endif - -/** - * \def MBEDTLS_NO_PLATFORM_ENTROPY - * - * Do not use built-in platform entropy functions. - * This is useful if your platform does not support - * standards like the /dev/urandom or Windows CryptoAPI. - * - * Uncomment this macro to disable the built-in platform entropy functions. - */ -#if 0 -#define MBEDTLS_NO_PLATFORM_ENTROPY -#endif - /** * \def MBEDTLS_ENTROPY_FORCE_SHA256 * @@ -972,65 +735,6 @@ #define MBEDTLS_ENTROPY_FORCE_SHA256 #endif -/** - * \def MBEDTLS_ENTROPY_NV_SEED - * - * Enable the non-volatile (NV) seed file-based entropy source. - * (Also enables the NV seed read/write functions in the platform layer) - * - * This is crucial (if not required) on systems that do not have a - * cryptographic entropy source (in hardware or kernel) available. - * - * Requires: MBEDTLS_ENTROPY_C, MBEDTLS_PLATFORM_C - * - * \note The read/write functions that are used by the entropy source are - * determined in the platform layer, and can be modified at runtime and/or - * compile-time depending on the flags (MBEDTLS_PLATFORM_NV_SEED_*) used. - * - * \note If you use the default implementation functions that read a seedfile - * with regular fopen(), please make sure you make a seedfile with the - * proper name (defined in MBEDTLS_PLATFORM_STD_NV_SEED_FILE) and at - * least MBEDTLS_ENTROPY_BLOCK_SIZE bytes in size that can be read from - * and written to or you will get an entropy source error! The default - * implementation will only use the first MBEDTLS_ENTROPY_BLOCK_SIZE - * bytes from the file. - * - * \note The entropy collector will write to the seed file before entropy is - * given to an external source, to update it. - */ -#if 0 -#define MBEDTLS_ENTROPY_NV_SEED -#endif - -/** - * \def MBEDTLS_MEMORY_DEBUG - * - * Enable debugging of buffer allocator memory issues. Automatically prints - * (to stderr) all (fatal) messages on memory allocation issues. Enables - * function for 'debug output' of allocated memory. - * - * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * - * Uncomment this macro to let the buffer allocator print out error messages. - */ -#if 0 -#define MBEDTLS_MEMORY_DEBUG -#endif - -/** - * \def MBEDTLS_MEMORY_BACKTRACE - * - * Include backtrace information with each allocated block. - * - * Requires: MBEDTLS_MEMORY_BUFFER_ALLOC_C - * GLIBC-compatible backtrace() an backtrace_symbols() support - * - * Uncomment this macro to include backtrace information - */ -#if 0 -#define MBEDTLS_MEMORY_BACKTRACE -#endif - /** * \def MBEDTLS_PK_RSA_ALT_SUPPORT * @@ -1062,27 +766,6 @@ */ #define MBEDTLS_PKCS1_V21 -/** - * \def MBEDTLS_RSA_NO_CRT - * - * Do not use the Chinese Remainder Theorem for the RSA private operation. - * - * Uncomment this macro to disable the use of CRT in RSA. - * - */ -#if 0 -#define MBEDTLS_RSA_NO_CRT -#endif - -/** - * \def MBEDTLS_SELF_TEST - * - * Enable the checkup functions (*_self_test). - */ -#if 0 -#define MBEDTLS_SELF_TEST -#endif - /** * \def MBEDTLS_SHA256_SMALLER * @@ -1462,21 +1145,6 @@ #define MBEDTLS_THREADING_PTHREAD #endif -/** - * \def MBEDTLS_VERSION_FEATURES - * - * Allow run-time checking of compile-time enabled features. Thus allowing users - * to check at run-time if the library is for instance compiled with threading - * support via mbedtls_version_check_feature(). - * - * Requires: MBEDTLS_VERSION_C - * - * Comment this to disable run-time checking and save ROM space - */ -#if 0 -#define MBEDTLS_VERSION_FEATURES -#endif - /** * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 * @@ -1540,29 +1208,6 @@ */ #define MBEDTLS_X509_RSASSA_PSS_SUPPORT -/** - * \def MBEDTLS_ZLIB_SUPPORT - * - * If set, the SSL/TLS module uses ZLIB to support compression and - * decompression of packet data. - * - * \warning TLS-level compression MAY REDUCE SECURITY! See for example the - * CRIME attack. Before enabling this option, you should examine with care if - * CRIME or similar exploits may be a applicable to your use case. - * - * \note Currently compression can't be used with DTLS. - * - * Used in: library/ssl_tls.c - * library/ssl_cli.c - * library/ssl_srv.c - * - * This feature requires zlib library and headers to be present. - * - * Uncomment to enable use of ZLIB - */ -#if 0 -#define MBEDTLS_ZLIB_SUPPORT -#endif /* \} name SECTION: mbed TLS feature support */ /** @@ -1842,21 +1487,6 @@ */ #define MBEDTLS_CIPHER_C -/** - * \def MBEDTLS_CMAC_C - * - * Enable the CMAC (Cipher-based Message Authentication Code) mode for block - * ciphers. - * - * Module: library/cmac.c - * - * Requires: MBEDTLS_AES_C or MBEDTLS_DES_C - * - */ -#if 0 -#define MBEDTLS_CMAC_C -#endif - /** * \def MBEDTLS_CTR_DRBG_C * @@ -1871,20 +1501,6 @@ */ #define MBEDTLS_CTR_DRBG_C -/** - * \def MBEDTLS_DEBUG_C - * - * Enable the debug functions. - * - * Module: library/debug.c - * Caller: library/ssl_cli.c - * library/ssl_srv.c - * library/ssl_tls.c - * - * This module provides debugging functions. - */ -#define MBEDTLS_DEBUG_C - /** * \def MBEDTLS_DES_C * @@ -1956,27 +1572,6 @@ */ #define MBEDTLS_ECDSA_C -/** - * \def MBEDTLS_ECJPAKE_C - * - * Enable the elliptic curve J-PAKE library. - * - * \warning This is currently experimental. EC J-PAKE support is based on the - * Thread v1.0.0 specification; incompatible changes to the specification - * might still happen. For this reason, this is disabled by default. - * - * Module: library/ecjpake.c - * Caller: - * - * This module is used by the following key exchanges: - * ECJPAKE - * - * Requires: MBEDTLS_ECP_C, MBEDTLS_MD_C - */ -#if 0 -#define MBEDTLS_ECJPAKE_C -#endif - /** * \def MBEDTLS_ECP_C * @@ -2005,18 +1600,6 @@ */ #define MBEDTLS_ENTROPY_C -/** - * \def MBEDTLS_ERROR_C - * - * Enable error code to error string conversion. - * - * Module: library/error.c - * Caller: - * - * This module enables mbedtls_strerror(). - */ -#define MBEDTLS_ERROR_C - /** * \def MBEDTLS_GCM_C * @@ -2031,31 +1614,6 @@ */ #define MBEDTLS_GCM_C -/** - * \def MBEDTLS_HAVEGE_C - * - * Enable the HAVEGE random generator. - * - * Warning: the HAVEGE random generator is not suitable for virtualized - * environments - * - * Warning: the HAVEGE random generator is dependent on timing and specific - * processor traits. It is therefore not advised to use HAVEGE as - * your applications primary random generator or primary entropy pool - * input. As a secondary input to your entropy pool, it IS able add - * the (limited) extra entropy it provides. - * - * Module: library/havege.c - * Caller: - * - * Requires: MBEDTLS_TIMING_C - * - * Uncomment to enable the HAVEGE random generator. - */ -#if 0 -#define MBEDTLS_HAVEGE_C -#endif - /** * \def MBEDTLS_HMAC_DRBG_C * @@ -2082,34 +1640,6 @@ */ #define MBEDTLS_MD_C -/** - * \def MBEDTLS_MD2_C - * - * Enable the MD2 hash algorithm. - * - * Module: library/md2.c - * Caller: - * - * Uncomment to enable support for (rare) MD2-signed X.509 certs. - */ -#if 0 -#define MBEDTLS_MD2_C -#endif - -/** - * \def MBEDTLS_MD4_C - * - * Enable the MD4 hash algorithm. - * - * Module: library/md4.c - * Caller: - * - * Uncomment to enable support for (rare) MD4-signed X.509 certs. - */ -#if 0 -#define MBEDTLS_MD4_C -#endif - /** * \def MBEDTLS_MD5_C * @@ -2125,24 +1655,6 @@ */ #define MBEDTLS_MD5_C -/** - * \def MBEDTLS_MEMORY_BUFFER_ALLOC_C - * - * Enable the buffer allocator implementation that makes use of a (stack) - * based buffer to 'allocate' dynamic memory. (replaces calloc() and free() - * calls) - * - * Module: library/memory_buffer_alloc.c - * - * Requires: MBEDTLS_PLATFORM_C - * MBEDTLS_PLATFORM_MEMORY (to use it within mbed TLS) - * - * Enable this module to enable the buffer memory allocator. - */ -#if 0 -#define MBEDTLS_MEMORY_BUFFER_ALLOC_C -#endif - /** * \def MBEDTLS_NET_C * @@ -2291,23 +1803,6 @@ */ #define MBEDTLS_PKCS5_C -/** - * \def MBEDTLS_PKCS11_C - * - * Enable wrapper for PKCS#11 smartcard support. - * - * Module: library/pkcs11.c - * Caller: library/pk.c - * - * Requires: MBEDTLS_PK_C - * - * This module enables SSL/TLS PKCS #11 smartcard support. - * Requires the presence of the PKCS#11 helper library (libpkcs11-helper) - */ -#if 0 -#define MBEDTLS_PKCS11_C -#endif - /** * \def MBEDTLS_PKCS12_C * @@ -2324,26 +1819,6 @@ */ #define MBEDTLS_PKCS12_C -/** - * \def MBEDTLS_PLATFORM_C - * - * Enable the platform abstraction layer that allows you to re-assign - * functions like calloc(), free(), snprintf(), printf(), fprintf(), exit(). - * - * Enabling MBEDTLS_PLATFORM_C enables to use of MBEDTLS_PLATFORM_XXX_ALT - * or MBEDTLS_PLATFORM_XXX_MACRO directives, allowing the functions mentioned - * above to be specified at runtime or compile time respectively. - * - * \note This abstraction layer must be enabled on Windows (including MSYS2) - * as other module rely on it for a fixed snprintf implementation. - * - * Module: library/platform.c - * Caller: Most other .c files - * - * This module enables abstraction of common (libc) functions. - */ -#define MBEDTLS_PLATFORM_C - /** * \def MBEDTLS_RIPEMD160_C * @@ -2722,43 +2197,11 @@ #define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Default minimum number of bytes required for the hardware entropy source mbedtls_hardware_poll() before entropy is released */ #endif -/* Memory buffer allocator options */ -#if 0 -#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ -#endif - /* Platform options */ #if 0 -#define MBEDTLS_PLATFORM_STD_MEM_HDR /**< Header to include if MBEDTLS_PLATFORM_NO_STD_FUNCTIONS is defined. Don't define if no header is needed. */ -#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use, can be undefined */ #define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ #define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use, can be undefined */ #define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use, can be undefined */ -/* Note: your snprintf must correclty zero-terminate the buffer! */ -#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_EXIT_SUCCESS 0 /**< Default exit value to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_EXIT_FAILURE 1 /**< Default exit value to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */ -#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" /**< Seed file to read/write with default implementation */ -#endif - -/* To Use Function Macros MBEDTLS_PLATFORM_C must be enabled */ -/* MBEDTLS_PLATFORM_XXX_MACRO and MBEDTLS_PLATFORM_XXX_ALT cannot both be defined */ -#if 0 -#define MBEDTLS_PLATFORM_CALLOC_MACRO calloc /**< Default allocator macro to use, can be undefined */ -#define MBEDTLS_PLATFORM_FREE_MACRO free /**< Default free macro to use, can be undefined */ -#define MBEDTLS_PLATFORM_EXIT_MACRO exit /**< Default exit macro to use, can be undefined */ -#define MBEDTLS_PLATFORM_TIME_MACRO time /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ -#define MBEDTLS_PLATFORM_TIME_TYPE_MACRO time_t /**< Default time macro to use, can be undefined. MBEDTLS_HAVE_TIME must be enabled */ -#define MBEDTLS_PLATFORM_FPRINTF_MACRO fprintf /**< Default fprintf macro to use, can be undefined */ -#define MBEDTLS_PLATFORM_PRINTF_MACRO printf /**< Default printf macro to use, can be undefined */ -/* Note: your snprintf must correclty zero-terminate the buffer! */ -#define MBEDTLS_PLATFORM_SNPRINTF_MACRO snprintf /**< Default snprintf macro to use, can be undefined */ -#define MBEDTLS_PLATFORM_NV_SEED_READ_MACRO mbedtls_platform_std_nv_seed_read /**< Default nv_seed_read function to use, can be undefined */ -#define MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO mbedtls_platform_std_nv_seed_write /**< Default nv_seed_write function to use, can be undefined */ #endif /* SSL Cache options */ diff --git a/deps/mbedtls/mbedtls/debug.h b/deps/mbedtls/mbedtls/debug.h index 2957996407..34ba236416 100644 --- a/deps/mbedtls/mbedtls/debug.h +++ b/deps/mbedtls/mbedtls/debug.h @@ -35,37 +35,6 @@ #include "ecp.h" #endif -#if defined(MBEDTLS_DEBUG_C) - -#define MBEDTLS_DEBUG_STRIP_PARENS( ... ) __VA_ARGS__ - -#define MBEDTLS_SSL_DEBUG_MSG( level, args ) \ - mbedtls_debug_print_msg( ssl, level, __FILE__, __LINE__, \ - MBEDTLS_DEBUG_STRIP_PARENS args ) - -#define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) \ - mbedtls_debug_print_ret( ssl, level, __FILE__, __LINE__, text, ret ) - -#define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) \ - mbedtls_debug_print_buf( ssl, level, __FILE__, __LINE__, text, buf, len ) - -#if defined(MBEDTLS_BIGNUM_C) -#define MBEDTLS_SSL_DEBUG_MPI( level, text, X ) \ - mbedtls_debug_print_mpi( ssl, level, __FILE__, __LINE__, text, X ) -#endif - -#if defined(MBEDTLS_ECP_C) -#define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) \ - mbedtls_debug_print_ecp( ssl, level, __FILE__, __LINE__, text, X ) -#endif - -#if defined(MBEDTLS_X509_CRT_PARSE_C) -#define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) \ - mbedtls_debug_print_crt( ssl, level, __FILE__, __LINE__, text, crt ) -#endif - -#else /* MBEDTLS_DEBUG_C */ - #define MBEDTLS_SSL_DEBUG_MSG( level, args ) do { } while( 0 ) #define MBEDTLS_SSL_DEBUG_RET( level, text, ret ) do { } while( 0 ) #define MBEDTLS_SSL_DEBUG_BUF( level, text, buf, len ) do { } while( 0 ) @@ -73,8 +42,6 @@ #define MBEDTLS_SSL_DEBUG_ECP( level, text, X ) do { } while( 0 ) #define MBEDTLS_SSL_DEBUG_CRT( level, text, crt ) do { } while( 0 ) -#endif /* MBEDTLS_DEBUG_C */ - #ifdef __cplusplus extern "C" { #endif diff --git a/deps/mbedtls/mbedtls/ecdsa.h b/deps/mbedtls/mbedtls/ecdsa.h index a277715b3d..9c60da9343 100644 --- a/deps/mbedtls/mbedtls/ecdsa.h +++ b/deps/mbedtls/mbedtls/ecdsa.h @@ -162,48 +162,6 @@ int mbedtls_ecdsa_write_signature( mbedtls_ecdsa_context *ctx, mbedtls_md_type_t int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -#if defined(MBEDTLS_DEPRECATED_WARNING) -#define MBEDTLS_DEPRECATED __attribute__((deprecated)) -#else -#define MBEDTLS_DEPRECATED -#endif -/** - * \brief Compute ECDSA signature and write it to buffer, - * serialized as defined in RFC 4492 page 20. - * Deterministic version, RFC 6979. - * (Not thread-safe to use same context in multiple threads) - * - * \deprecated Superseded by mbedtls_ecdsa_write_signature() in 2.0.0 - * - * \param ctx ECDSA context - * \param hash Message hash - * \param hlen Length of hash - * \param sig Buffer that will hold the signature - * \param slen Length of the signature written - * \param md_alg MD algorithm used to hash the message - * - * \note The "sig" buffer must be at least as large as twice the - * size of the curve used, plus 9 (eg. 73 bytes if a 256-bit - * curve is used). MBEDTLS_ECDSA_MAX_LEN is always safe. - * - * \note If the bitlength of the message hash is larger than the - * bitlength of the group order, then the hash is truncated as - * prescribed by SEC1 4.1.3 step 5. - * - * \return 0 if successful, - * or a MBEDTLS_ERR_ECP_XXX, MBEDTLS_ERR_MPI_XXX or - * MBEDTLS_ERR_ASN1_XXX error code - */ -int mbedtls_ecdsa_write_signature_det( mbedtls_ecdsa_context *ctx, - const unsigned char *hash, size_t hlen, - unsigned char *sig, size_t *slen, - mbedtls_md_type_t md_alg ) MBEDTLS_DEPRECATED; -#undef MBEDTLS_DEPRECATED -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ - /** * \brief Read and verify an ECDSA signature * diff --git a/deps/mbedtls/mbedtls/ecjpake.h b/deps/mbedtls/mbedtls/ecjpake.h deleted file mode 100644 index 161a5b213f..0000000000 --- a/deps/mbedtls/mbedtls/ecjpake.h +++ /dev/null @@ -1,238 +0,0 @@ -/** - * \file ecjpake.h - * - * \brief Elliptic curve J-PAKE - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ECJPAKE_H -#define MBEDTLS_ECJPAKE_H - -/* - * J-PAKE is a password-authenticated key exchange that allows deriving a - * strong shared secret from a (potentially low entropy) pre-shared - * passphrase, with forward secrecy and mutual authentication. - * https://en.wikipedia.org/wiki/Password_Authenticated_Key_Exchange_by_Juggling - * - * This file implements the Elliptic Curve variant of J-PAKE, - * as defined in Chapter 7.4 of the Thread v1.0 Specification, - * available to members of the Thread Group http://threadgroup.org/ - * - * As the J-PAKE algorithm is inherently symmetric, so is our API. - * Each party needs to send its first round message, in any order, to the - * other party, then each sends its second round message, in any order. - * The payloads are serialized in a way suitable for use in TLS, but could - * also be use outside TLS. - */ - -#include "ecp.h" -#include "md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Roles in the EC J-PAKE exchange - */ -typedef enum { - MBEDTLS_ECJPAKE_CLIENT = 0, /**< Client */ - MBEDTLS_ECJPAKE_SERVER, /**< Server */ -} mbedtls_ecjpake_role; - -/** - * EC J-PAKE context structure. - * - * J-PAKE is a symmetric protocol, except for the identifiers used in - * Zero-Knowledge Proofs, and the serialization of the second message - * (KeyExchange) as defined by the Thread spec. - * - * In order to benefit from this symmetry, we choose a different naming - * convetion from the Thread v1.0 spec. Correspondance is indicated in the - * description as a pair C: client name, S: server name - */ -typedef struct -{ - const mbedtls_md_info_t *md_info; /**< Hash to use */ - mbedtls_ecp_group grp; /**< Elliptic curve */ - mbedtls_ecjpake_role role; /**< Are we client or server? */ - int point_format; /**< Format for point export */ - - mbedtls_ecp_point Xm1; /**< My public key 1 C: X1, S: X3 */ - mbedtls_ecp_point Xm2; /**< My public key 2 C: X2, S: X4 */ - mbedtls_ecp_point Xp1; /**< Peer public key 1 C: X3, S: X1 */ - mbedtls_ecp_point Xp2; /**< Peer public key 2 C: X4, S: X2 */ - mbedtls_ecp_point Xp; /**< Peer public key C: Xs, S: Xc */ - - mbedtls_mpi xm1; /**< My private key 1 C: x1, S: x3 */ - mbedtls_mpi xm2; /**< My private key 2 C: x2, S: x4 */ - - mbedtls_mpi s; /**< Pre-shared secret (passphrase) */ -} mbedtls_ecjpake_context; - -/** - * \brief Initialize a context - * (just makes it ready for setup() or free()). - * - * \param ctx context to initialize - */ -void mbedtls_ecjpake_init( mbedtls_ecjpake_context *ctx ); - -/** - * \brief Set up a context for use - * - * \note Currently the only values for hash/curve allowed by the - * standard are MBEDTLS_MD_SHA256/MBEDTLS_ECP_DP_SECP256R1. - * - * \param ctx context to set up - * \param role Our role: client or server - * \param hash hash function to use (MBEDTLS_MD_XXX) - * \param curve elliptic curve identifier (MBEDTLS_ECP_DP_XXX) - * \param secret pre-shared secret (passphrase) - * \param len length of the shared secret - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_setup( mbedtls_ecjpake_context *ctx, - mbedtls_ecjpake_role role, - mbedtls_md_type_t hash, - mbedtls_ecp_group_id curve, - const unsigned char *secret, - size_t len ); - -/** - * \brief Check if a context is ready for use - * - * \param ctx Context to check - * - * \return 0 if the context is ready for use, - * MBEDTLS_ERR_ECP_BAD_INPUT_DATA otherwise - */ -int mbedtls_ecjpake_check( const mbedtls_ecjpake_context *ctx ); - -/** - * \brief Generate and write the first round message - * (TLS: contents of the Client/ServerHello extension, - * excluding extension type and length bytes) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_write_round_one( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Read and process the first round message - * (TLS: contents of the Client/ServerHello extension, - * excluding extension type and length bytes) - * - * \param ctx Context to use - * \param buf Pointer to extension contents - * \param len Extension length - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_read_round_one( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ); - -/** - * \brief Generate and write the second round message - * (TLS: contents of the Client/ServerKeyExchange) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_write_round_two( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Read and process the second round message - * (TLS: contents of the Client/ServerKeyExchange) - * - * \param ctx Context to use - * \param buf Pointer to the message - * \param len Message length - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_read_round_two( mbedtls_ecjpake_context *ctx, - const unsigned char *buf, - size_t len ); - -/** - * \brief Derive the shared secret - * (TLS: Pre-Master Secret) - * - * \param ctx Context to use - * \param buf Buffer to write the contents to - * \param len Buffer size - * \param olen Will be updated with the number of bytes written - * \param f_rng RNG function - * \param p_rng RNG parameter - * - * \return 0 if successfull, - * a negative error code otherwise - */ -int mbedtls_ecjpake_derive_secret( mbedtls_ecjpake_context *ctx, - unsigned char *buf, size_t len, size_t *olen, - int (*f_rng)(void *, unsigned char *, size_t), - void *p_rng ); - -/** - * \brief Free a context's content - * - * \param ctx context to free - */ -void mbedtls_ecjpake_free( mbedtls_ecjpake_context *ctx ); - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_ecjpake_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* ecjpake.h */ diff --git a/deps/mbedtls/mbedtls/ecp.h b/deps/mbedtls/mbedtls/ecp.h index 60941f526d..2cdb42e1cb 100644 --- a/deps/mbedtls/mbedtls/ecp.h +++ b/deps/mbedtls/mbedtls/ecp.h @@ -662,17 +662,6 @@ int mbedtls_ecp_gen_key( mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, */ int mbedtls_ecp_check_pub_priv( const mbedtls_ecp_keypair *pub, const mbedtls_ecp_keypair *prv ); -#if defined(MBEDTLS_SELF_TEST) - -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_ecp_self_test( int verbose ); - -#endif /* MBEDTLS_SELF_TEST */ - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/entropy.h b/deps/mbedtls/mbedtls/entropy.h index 747aca4dfa..75fdbe7bec 100644 --- a/deps/mbedtls/mbedtls/entropy.h +++ b/deps/mbedtls/mbedtls/entropy.h @@ -45,10 +45,6 @@ #include "threading.h" #endif -#if defined(MBEDTLS_HAVEGE_C) -#include "havege.h" -#endif - #define MBEDTLS_ERR_ENTROPY_SOURCE_FAILED -0x003C /**< Critical entropy source failure. */ #define MBEDTLS_ERR_ENTROPY_MAX_SOURCES -0x003E /**< No more sources can be added. */ #define MBEDTLS_ERR_ENTROPY_NO_SOURCES_DEFINED -0x0040 /**< No sources have been added to poll. */ @@ -128,15 +124,9 @@ typedef struct #endif int source_count; mbedtls_entropy_source_state source[MBEDTLS_ENTROPY_MAX_SOURCES]; -#if defined(MBEDTLS_HAVEGE_C) - mbedtls_havege_state havege_data; -#endif #if defined(MBEDTLS_THREADING_C) mbedtls_threading_mutex_t mutex; /*!< mutex */ #endif -#if defined(MBEDTLS_ENTROPY_NV_SEED) - int initial_entropy_run; -#endif } mbedtls_entropy_context; @@ -211,18 +201,6 @@ int mbedtls_entropy_func( void *data, unsigned char *output, size_t len ); int mbedtls_entropy_update_manual( mbedtls_entropy_context *ctx, const unsigned char *data, size_t len ); -#if defined(MBEDTLS_ENTROPY_NV_SEED) -/** - * \brief Trigger an update of the seed file in NV by using the - * current entropy pool. - * - * \param ctx Entropy context - * - * \return 0 if successful - */ -int mbedtls_entropy_update_nv_seed( mbedtls_entropy_context *ctx ); -#endif /* MBEDTLS_ENTROPY_NV_SEED */ - #if defined(MBEDTLS_FS_IO) /** * \brief Write a seed file @@ -251,35 +229,6 @@ int mbedtls_entropy_write_seed_file( mbedtls_entropy_context *ctx, const char *p int mbedtls_entropy_update_seed_file( mbedtls_entropy_context *ctx, const char *path ); #endif /* MBEDTLS_FS_IO */ -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * This module self-test also calls the entropy self-test, - * mbedtls_entropy_source_self_test(); - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_entropy_self_test( int verbose ); - -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) -/** - * \brief Checkup routine - * - * Verifies the integrity of the hardware entropy source - * provided by the function 'mbedtls_hardware_poll()'. - * - * Note this is the only hardware entropy source that is known - * at link time, and other entropy sources configured - * dynamically at runtime by the function - * mbedtls_entropy_add_source() will not be tested. - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_entropy_source_self_test( int verbose ); -#endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ -#endif /* MBEDTLS_SELF_TEST */ - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/entropy_poll.h b/deps/mbedtls/mbedtls/entropy_poll.h index 81258d5f39..2ae092edbf 100644 --- a/deps/mbedtls/mbedtls/entropy_poll.h +++ b/deps/mbedtls/mbedtls/entropy_poll.h @@ -45,31 +45,11 @@ extern "C" { #define MBEDTLS_ENTROPY_MIN_HARDWARE 32 /**< Minimum for the hardware source */ #endif -/** - * \brief Entropy poll callback that provides 0 entropy. - */ -#if defined(MBEDTLS_TEST_NULL_ENTROPY) - int mbedtls_null_entropy_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - -#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY) /** * \brief Platform-specific entropy poll callback */ int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len, size_t *olen ); -#endif - -#if defined(MBEDTLS_HAVEGE_C) -/** - * \brief HAVEGE based entropy poll callback - * - * Requires an HAVEGE state as its data pointer. - */ -int mbedtls_havege_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif #if defined(MBEDTLS_TIMING_C) /** @@ -92,16 +72,6 @@ int mbedtls_hardware_poll( void *data, unsigned char *output, size_t len, size_t *olen ); #endif -#if defined(MBEDTLS_ENTROPY_NV_SEED) -/** - * \brief Entropy poll callback for a non-volatile seed file - * - * \note This must accept NULL as its first argument. - */ -int mbedtls_nv_seed_poll( void *data, - unsigned char *output, size_t len, size_t *olen ); -#endif - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/error.h b/deps/mbedtls/mbedtls/error.h deleted file mode 100644 index 5e549f6b6a..0000000000 --- a/deps/mbedtls/mbedtls/error.h +++ /dev/null @@ -1,107 +0,0 @@ -/** - * \file error.h - * - * \brief Error to string translation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_ERROR_H -#define MBEDTLS_ERROR_H - -#include - -/** - * Error code layout. - * - * Currently we try to keep all error codes within the negative space of 16 - * bits signed integers to support all platforms (-0x0001 - -0x7FFF). In - * addition we'd like to give two layers of information on the error if - * possible. - * - * For that purpose the error codes are segmented in the following manner: - * - * 16 bit error code bit-segmentation - * - * 1 bit - Unused (sign bit) - * 3 bits - High level module ID - * 5 bits - Module-dependent error code - * 7 bits - Low level module errors - * - * For historical reasons, low-level error codes are divided in even and odd, - * even codes were assigned first, and -1 is reserved for other errors. - * - * Low-level module errors (0x0002-0x007E, 0x0003-0x007F) - * - * Module Nr Codes assigned - * MPI 7 0x0002-0x0010 - * GCM 2 0x0012-0x0014 - * BLOWFISH 2 0x0016-0x0018 - * THREADING 3 0x001A-0x001E - * AES 2 0x0020-0x0022 - * CAMELLIA 2 0x0024-0x0026 - * XTEA 1 0x0028-0x0028 - * BASE64 2 0x002A-0x002C - * OID 1 0x002E-0x002E 0x000B-0x000B - * PADLOCK 1 0x0030-0x0030 - * DES 1 0x0032-0x0032 - * CTR_DBRG 4 0x0034-0x003A - * ENTROPY 3 0x003C-0x0040 0x003D-0x003F - * NET 11 0x0042-0x0052 0x0043-0x0045 - * ASN1 7 0x0060-0x006C - * PBKDF2 1 0x007C-0x007C - * HMAC_DRBG 4 0x0003-0x0009 - * CCM 2 0x000D-0x000F - * - * High-level module nr (3 bits - 0x0...-0x7...) - * Name ID Nr of Errors - * PEM 1 9 - * PKCS#12 1 4 (Started from top) - * X509 2 19 - * PKCS5 2 4 (Started from top) - * DHM 3 9 - * PK 3 14 (Started from top) - * RSA 4 9 - * ECP 4 8 (Started from top) - * MD 5 4 - * CIPHER 6 6 - * SSL 6 17 (Started from top) - * SSL 7 31 - * - * Module dependent error code (5 bits 0x.00.-0x.F8.) - */ - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Translate a mbed TLS error code into a string representation, - * Result is truncated if necessary and always includes a terminating - * null byte. - * - * \param errnum error code - * \param buffer buffer to place representation in - * \param buflen length of the buffer - */ -void mbedtls_strerror( int errnum, char *buffer, size_t buflen ); - -#ifdef __cplusplus -} -#endif - -#endif /* error.h */ diff --git a/deps/mbedtls/mbedtls/havege.h b/deps/mbedtls/mbedtls/havege.h deleted file mode 100644 index dac5d31138..0000000000 --- a/deps/mbedtls/mbedtls/havege.h +++ /dev/null @@ -1,74 +0,0 @@ -/** - * \file havege.h - * - * \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_HAVEGE_H -#define MBEDTLS_HAVEGE_H - -#include - -#define MBEDTLS_HAVEGE_COLLECT_SIZE 1024 - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief HAVEGE state structure - */ -typedef struct -{ - int PT1, PT2, offset[2]; - int pool[MBEDTLS_HAVEGE_COLLECT_SIZE]; - int WALK[8192]; -} -mbedtls_havege_state; - -/** - * \brief HAVEGE initialization - * - * \param hs HAVEGE state to be initialized - */ -void mbedtls_havege_init( mbedtls_havege_state *hs ); - -/** - * \brief Clear HAVEGE state - * - * \param hs HAVEGE state to be cleared - */ -void mbedtls_havege_free( mbedtls_havege_state *hs ); - -/** - * \brief HAVEGE rand function - * - * \param p_rng A HAVEGE state - * \param output Buffer to fill - * \param len Length of buffer - * - * \return 0 - */ -int mbedtls_havege_random( void *p_rng, unsigned char *output, size_t len ); - -#ifdef __cplusplus -} -#endif - -#endif /* havege.h */ diff --git a/deps/mbedtls/mbedtls/hmac_drbg.h b/deps/mbedtls/mbedtls/hmac_drbg.h index e010558028..f24df21027 100644 --- a/deps/mbedtls/mbedtls/hmac_drbg.h +++ b/deps/mbedtls/mbedtls/hmac_drbg.h @@ -282,16 +282,6 @@ int mbedtls_hmac_drbg_write_seed_file( mbedtls_hmac_drbg_context *ctx, const cha int mbedtls_hmac_drbg_update_seed_file( mbedtls_hmac_drbg_context *ctx, const char *path ); #endif /* MBEDTLS_FS_IO */ - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if the test failed - */ -int mbedtls_hmac_drbg_self_test( int verbose ); -#endif - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/mbedtls/md.h b/deps/mbedtls/mbedtls/md.h index b691a7f3f4..5b77d6520a 100644 --- a/deps/mbedtls/mbedtls/md.h +++ b/deps/mbedtls/mbedtls/md.h @@ -118,30 +118,6 @@ void mbedtls_md_init( mbedtls_md_context_t *ctx ); */ void mbedtls_md_free( mbedtls_md_context_t *ctx ); -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -#if defined(MBEDTLS_DEPRECATED_WARNING) -#define MBEDTLS_DEPRECATED __attribute__((deprecated)) -#else -#define MBEDTLS_DEPRECATED -#endif -/** - * \brief Select MD to use and allocate internal structures. - * Should be called after mbedtls_md_init() or mbedtls_md_free(). - * Makes it necessary to call mbedtls_md_free() later. - * - * \deprecated Superseded by mbedtls_md_setup() in 2.0.0 - * - * \param ctx Context to set up. - * \param md_info Message digest to use. - * - * \returns \c 0 on success, - * \c MBEDTLS_ERR_MD_BAD_INPUT_DATA on parameter failure, - * \c MBEDTLS_ERR_MD_ALLOC_FAILED memory allocation failure. - */ -int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) MBEDTLS_DEPRECATED; -#undef MBEDTLS_DEPRECATED -#endif /* MBEDTLS_DEPRECATED_REMOVED */ - /** * \brief Select MD to use and allocate internal structures. * Should be called after mbedtls_md_init() or mbedtls_md_free(). diff --git a/deps/mbedtls/mbedtls/md_internal.h b/deps/mbedtls/mbedtls/md_internal.h index e2441bbc49..a09db47352 100644 --- a/deps/mbedtls/mbedtls/md_internal.h +++ b/deps/mbedtls/mbedtls/md_internal.h @@ -83,12 +83,6 @@ struct mbedtls_md_info_t void (*process_func)( void *ctx, const unsigned char *input ); }; -#if defined(MBEDTLS_MD2_C) -extern const mbedtls_md_info_t mbedtls_md2_info; -#endif -#if defined(MBEDTLS_MD4_C) -extern const mbedtls_md_info_t mbedtls_md4_info; -#endif #if defined(MBEDTLS_MD5_C) extern const mbedtls_md_info_t mbedtls_md5_info; #endif diff --git a/deps/mbedtls/mbedtls/memory_buffer_alloc.h b/deps/mbedtls/mbedtls/memory_buffer_alloc.h deleted file mode 100644 index d5df316fdd..0000000000 --- a/deps/mbedtls/mbedtls/memory_buffer_alloc.h +++ /dev/null @@ -1,150 +0,0 @@ -/** - * \file memory_buffer_alloc.h - * - * \brief Buffer-based memory allocator - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H -#define MBEDTLS_MEMORY_BUFFER_ALLOC_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#include - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -#if !defined(MBEDTLS_MEMORY_ALIGN_MULTIPLE) -#define MBEDTLS_MEMORY_ALIGN_MULTIPLE 4 /**< Align on multiples of this value */ -#endif - -/* \} name SECTION: Module settings */ - -#define MBEDTLS_MEMORY_VERIFY_NONE 0 -#define MBEDTLS_MEMORY_VERIFY_ALLOC (1 << 0) -#define MBEDTLS_MEMORY_VERIFY_FREE (1 << 1) -#define MBEDTLS_MEMORY_VERIFY_ALWAYS (MBEDTLS_MEMORY_VERIFY_ALLOC | MBEDTLS_MEMORY_VERIFY_FREE) - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \brief Initialize use of stack-based memory allocator. - * The stack-based allocator does memory management inside the - * presented buffer and does not call calloc() and free(). - * It sets the global mbedtls_calloc() and mbedtls_free() pointers - * to its own functions. - * (Provided mbedtls_calloc() and mbedtls_free() are thread-safe if - * MBEDTLS_THREADING_C is defined) - * - * \note This code is not optimized and provides a straight-forward - * implementation of a stack-based memory allocator. - * - * \param buf buffer to use as heap - * \param len size of the buffer - */ -void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len ); - -/** - * \brief Free the mutex for thread-safety and clear remaining memory - */ -void mbedtls_memory_buffer_alloc_free( void ); - -/** - * \brief Determine when the allocator should automatically verify the state - * of the entire chain of headers / meta-data. - * (Default: MBEDTLS_MEMORY_VERIFY_NONE) - * - * \param verify One of MBEDTLS_MEMORY_VERIFY_NONE, MBEDTLS_MEMORY_VERIFY_ALLOC, - * MBEDTLS_MEMORY_VERIFY_FREE or MBEDTLS_MEMORY_VERIFY_ALWAYS - */ -void mbedtls_memory_buffer_set_verify( int verify ); - -#if defined(MBEDTLS_MEMORY_DEBUG) -/** - * \brief Print out the status of the allocated memory (primarily for use - * after a program should have de-allocated all memory) - * Prints out a list of 'still allocated' blocks and their stack - * trace if MBEDTLS_MEMORY_BACKTRACE is defined. - */ -void mbedtls_memory_buffer_alloc_status( void ); - -/** - * \brief Get the peak heap usage so far - * - * \param max_used Peak number of bytes in use or committed. This - * includes bytes in allocated blocks too small to split - * into smaller blocks but larger than the requested size. - * \param max_blocks Peak number of blocks in use, including free and used - */ -void mbedtls_memory_buffer_alloc_max_get( size_t *max_used, size_t *max_blocks ); - -/** - * \brief Reset peak statistics - */ -void mbedtls_memory_buffer_alloc_max_reset( void ); - -/** - * \brief Get the current heap usage - * - * \param cur_used Current number of bytes in use or committed. This - * includes bytes in allocated blocks too small to split - * into smaller blocks but larger than the requested size. - * \param cur_blocks Current number of blocks in use, including free and used - */ -void mbedtls_memory_buffer_alloc_cur_get( size_t *cur_used, size_t *cur_blocks ); -#endif /* MBEDTLS_MEMORY_DEBUG */ - -/** - * \brief Verifies that all headers in the memory buffer are correct - * and contain sane values. Helps debug buffer-overflow errors. - * - * Prints out first failure if MBEDTLS_MEMORY_DEBUG is defined. - * Prints out full header information if MBEDTLS_MEMORY_DEBUG - * is defined. (Includes stack trace information for each block if - * MBEDTLS_MEMORY_BACKTRACE is defined as well). - * - * \return 0 if verified, 1 otherwise - */ -int mbedtls_memory_buffer_alloc_verify( void ); - -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_memory_buffer_alloc_self_test( int verbose ); -#endif - -#ifdef __cplusplus -} -#endif - -#endif /* memory_buffer_alloc.h */ diff --git a/deps/mbedtls/mbedtls/net.h b/deps/mbedtls/mbedtls/net.h index 774559b3cf..57b1fabac8 100644 --- a/deps/mbedtls/mbedtls/net.h +++ b/deps/mbedtls/mbedtls/net.h @@ -23,9 +23,4 @@ * \deprecated Superseded by mbedtls/net_sockets.h */ -#if !defined(MBEDTLS_DEPRECATED_REMOVED) #include "mbedtls/net_sockets.h" -#if defined(MBEDTLS_DEPRECATED_WARNING) -#warning "Deprecated header file: Superseded by mbedtls/net_sockets.h" -#endif /* MBEDTLS_DEPRECATED_WARNING */ -#endif /* !MBEDTLS_DEPRECATED_REMOVED */ diff --git a/deps/mbedtls/mbedtls/pkcs11.h b/deps/mbedtls/mbedtls/pkcs11.h deleted file mode 100644 index 2e88928137..0000000000 --- a/deps/mbedtls/mbedtls/pkcs11.h +++ /dev/null @@ -1,173 +0,0 @@ -/** - * \file pkcs11.h - * - * \brief Wrapper for PKCS#11 library libpkcs11-helper - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PKCS11_H -#define MBEDTLS_PKCS11_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PKCS11_C) - -#include "x509_crt.h" - -#include - -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * Context for PKCS #11 private keys. - */ -typedef struct { - pkcs11h_certificate_t pkcs11h_cert; - int len; -} mbedtls_pkcs11_context; - -/** - * Initialize a mbedtls_pkcs11_context. - * (Just making memory references valid.) - */ -void mbedtls_pkcs11_init( mbedtls_pkcs11_context *ctx ); - -/** - * Fill in a mbed TLS certificate, based on the given PKCS11 helper certificate. - * - * \param cert X.509 certificate to fill - * \param pkcs11h_cert PKCS #11 helper certificate - * - * \return 0 on success. - */ -int mbedtls_pkcs11_x509_cert_bind( mbedtls_x509_crt *cert, pkcs11h_certificate_t pkcs11h_cert ); - -/** - * Set up a mbedtls_pkcs11_context storing the given certificate. Note that the - * mbedtls_pkcs11_context will take over control of the certificate, freeing it when - * done. - * - * \param priv_key Private key structure to fill. - * \param pkcs11_cert PKCS #11 helper certificate - * - * \return 0 on success - */ -int mbedtls_pkcs11_priv_key_bind( mbedtls_pkcs11_context *priv_key, - pkcs11h_certificate_t pkcs11_cert ); - -/** - * Free the contents of the given private key context. Note that the structure - * itself is not freed. - * - * \param priv_key Private key structure to cleanup - */ -void mbedtls_pkcs11_priv_key_free( mbedtls_pkcs11_context *priv_key ); - -/** - * \brief Do an RSA private key decrypt, then remove the message - * padding - * - * \param ctx PKCS #11 context - * \param mode must be MBEDTLS_RSA_PRIVATE, for compatibility with rsa.c's signature - * \param input buffer holding the encrypted data - * \param output buffer that will hold the plaintext - * \param olen will contain the plaintext length - * \param output_max_len maximum length of the output buffer - * - * \return 0 if successful, or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The output buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used) otherwise - * an error is thrown. - */ -int mbedtls_pkcs11_decrypt( mbedtls_pkcs11_context *ctx, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ); - -/** - * \brief Do a private RSA to sign a message digest - * - * \param ctx PKCS #11 context - * \param mode must be MBEDTLS_RSA_PRIVATE, for compatibility with rsa.c's signature - * \param md_alg a MBEDTLS_MD_XXX (use MBEDTLS_MD_NONE for signing raw data) - * \param hashlen message digest length (for MBEDTLS_MD_NONE only) - * \param hash buffer holding the message digest - * \param sig buffer that will hold the ciphertext - * - * \return 0 if the signing operation was successful, - * or an MBEDTLS_ERR_RSA_XXX error code - * - * \note The "sig" buffer must be as large as the size - * of ctx->N (eg. 128 bytes if RSA-1024 is used). - */ -int mbedtls_pkcs11_sign( mbedtls_pkcs11_context *ctx, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ); - -/** - * SSL/TLS wrappers for PKCS#11 functions - */ -static inline int mbedtls_ssl_pkcs11_decrypt( void *ctx, int mode, size_t *olen, - const unsigned char *input, unsigned char *output, - size_t output_max_len ) -{ - return mbedtls_pkcs11_decrypt( (mbedtls_pkcs11_context *) ctx, mode, olen, input, output, - output_max_len ); -} - -static inline int mbedtls_ssl_pkcs11_sign( void *ctx, - int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, - int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, - const unsigned char *hash, unsigned char *sig ) -{ - ((void) f_rng); - ((void) p_rng); - return mbedtls_pkcs11_sign( (mbedtls_pkcs11_context *) ctx, mode, md_alg, - hashlen, hash, sig ); -} - -static inline size_t mbedtls_ssl_pkcs11_key_len( void *ctx ) -{ - return ( (mbedtls_pkcs11_context *) ctx )->len; -} - -#ifdef __cplusplus -} -#endif - -#endif /* MBEDTLS_PKCS11_C */ - -#endif /* MBEDTLS_PKCS11_H */ diff --git a/deps/mbedtls/mbedtls/platform.h b/deps/mbedtls/mbedtls/platform.h index f5499fefa0..079898f6c3 100644 --- a/deps/mbedtls/mbedtls/platform.h +++ b/deps/mbedtls/mbedtls/platform.h @@ -29,9 +29,7 @@ #include MBEDTLS_CONFIG_FILE #endif -#if defined(MBEDTLS_HAVE_TIME) -#include "platform_time.h" -#endif +#include #ifdef __cplusplus extern "C" { @@ -45,32 +43,15 @@ extern "C" { * \{ */ -#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) #include #include #include -#if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) -#if defined(_WIN32) -#define MBEDTLS_PLATFORM_STD_SNPRINTF mbedtls_platform_win32_snprintf /**< Default snprintf to use */ -#else -#define MBEDTLS_PLATFORM_STD_SNPRINTF snprintf /**< Default snprintf to use */ -#endif -#endif #if !defined(MBEDTLS_PLATFORM_STD_PRINTF) #define MBEDTLS_PLATFORM_STD_PRINTF printf /**< Default printf to use */ #endif #if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) #define MBEDTLS_PLATFORM_STD_FPRINTF fprintf /**< Default fprintf to use */ #endif -#if !defined(MBEDTLS_PLATFORM_STD_CALLOC) -#define MBEDTLS_PLATFORM_STD_CALLOC calloc /**< Default allocator to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_FREE) -#define MBEDTLS_PLATFORM_STD_FREE free /**< Default free to use */ -#endif -#if !defined(MBEDTLS_PLATFORM_STD_EXIT) -#define MBEDTLS_PLATFORM_STD_EXIT exit /**< Default exit to use */ -#endif #if !defined(MBEDTLS_PLATFORM_STD_TIME) #define MBEDTLS_PLATFORM_STD_TIME time /**< Default time to use */ #endif @@ -80,213 +61,17 @@ extern "C" { #if !defined(MBEDTLS_PLATFORM_STD_EXIT_FAILURE) #define MBEDTLS_PLATFORM_STD_EXIT_FAILURE EXIT_FAILURE /**< Default exit value to use */ #endif -#if defined(MBEDTLS_FS_IO) -#if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) -#define MBEDTLS_PLATFORM_STD_NV_SEED_READ mbedtls_platform_std_nv_seed_read -#endif -#if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) -#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE mbedtls_platform_std_nv_seed_write -#endif -#if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_FILE) -#define MBEDTLS_PLATFORM_STD_NV_SEED_FILE "seedfile" -#endif -#endif /* MBEDTLS_FS_IO */ -#else /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ -#if defined(MBEDTLS_PLATFORM_STD_MEM_HDR) -#include MBEDTLS_PLATFORM_STD_MEM_HDR -#endif -#endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ - /* \} name SECTION: Module settings */ -/* - * The function pointers for calloc and free - */ -#if defined(MBEDTLS_PLATFORM_MEMORY) -#if defined(MBEDTLS_PLATFORM_FREE_MACRO) && \ - defined(MBEDTLS_PLATFORM_CALLOC_MACRO) -#define mbedtls_free MBEDTLS_PLATFORM_FREE_MACRO -#define mbedtls_calloc MBEDTLS_PLATFORM_CALLOC_MACRO -#else /* For size_t */ #include -extern void * (*mbedtls_calloc)( size_t n, size_t size ); -extern void (*mbedtls_free)( void *ptr ); - -/** - * \brief Set your own memory implementation function pointers - * - * \param calloc_func the calloc function implementation - * \param free_func the free function implementation - * - * \return 0 if successful - */ -int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ), - void (*free_func)( void * ) ); -#endif /* MBEDTLS_PLATFORM_FREE_MACRO && MBEDTLS_PLATFORM_CALLOC_MACRO */ -#else /* !MBEDTLS_PLATFORM_MEMORY */ -#define mbedtls_free free -#define mbedtls_calloc calloc -#endif /* MBEDTLS_PLATFORM_MEMORY && !MBEDTLS_PLATFORM_{FREE,CALLOC}_MACRO */ - -/* - * The function pointers for fprintf - */ -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -/* We need FILE * */ -#include -extern int (*mbedtls_fprintf)( FILE *stream, const char *format, ... ); - -/** - * \brief Set your own fprintf function pointer - * - * \param fprintf_func the fprintf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *stream, const char *, - ... ) ); -#else -#if defined(MBEDTLS_PLATFORM_FPRINTF_MACRO) -#define mbedtls_fprintf MBEDTLS_PLATFORM_FPRINTF_MACRO -#else -#define mbedtls_fprintf fprintf -#endif /* MBEDTLS_PLATFORM_FPRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ - -/* - * The function pointers for printf - */ -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) -extern int (*mbedtls_printf)( const char *format, ... ); - -/** - * \brief Set your own printf function pointer - * - * \param printf_func the printf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) ); -#else /* !MBEDTLS_PLATFORM_PRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_PRINTF_MACRO) -#define mbedtls_printf MBEDTLS_PLATFORM_PRINTF_MACRO -#else -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_PRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ - -/* - * The function pointers for snprintf - * - * The snprintf implementation should conform to C99: - * - it *must* always correctly zero-terminate the buffer - * (except when n == 0, then it must leave the buffer untouched) - * - however it is acceptable to return -1 instead of the required length when - * the destination buffer is too short. - */ -#if defined(_WIN32) -/* For Windows (inc. MSYS2), we provide our own fixed implementation */ -int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... ); -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -extern int (*mbedtls_snprintf)( char * s, size_t n, const char * format, ... ); - -/** - * \brief Set your own snprintf function pointer - * - * \param snprintf_func the snprintf function implementation - * - * \return 0 - */ -int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, - const char * format, ... ) ); -#else /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_SNPRINTF_MACRO) -#define mbedtls_snprintf MBEDTLS_PLATFORM_SNPRINTF_MACRO -#else -#define mbedtls_snprintf snprintf -#endif /* MBEDTLS_PLATFORM_SNPRINTF_MACRO */ -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ - -/* - * The function pointers for exit - */ -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) -extern void (*mbedtls_exit)( int status ); - -/** - * \brief Set your own exit function pointer - * - * \param exit_func the exit function implementation - * - * \return 0 - */ -int mbedtls_platform_set_exit( void (*exit_func)( int status ) ); -#else -#if defined(MBEDTLS_PLATFORM_EXIT_MACRO) -#define mbedtls_exit MBEDTLS_PLATFORM_EXIT_MACRO -#else -#define mbedtls_exit exit -#endif /* MBEDTLS_PLATFORM_EXIT_MACRO */ -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ /* * The default exit values */ -#if defined(MBEDTLS_PLATFORM_STD_EXIT_SUCCESS) -#define MBEDTLS_EXIT_SUCCESS MBEDTLS_PLATFORM_STD_EXIT_SUCCESS -#else #define MBEDTLS_EXIT_SUCCESS 0 -#endif -#if defined(MBEDTLS_PLATFORM_STD_EXIT_FAILURE) -#define MBEDTLS_EXIT_FAILURE MBEDTLS_PLATFORM_STD_EXIT_FAILURE -#else #define MBEDTLS_EXIT_FAILURE 1 -#endif - -/* - * The function pointers for reading from and writing a seed file to - * Non-Volatile storage (NV) in a platform-independent way - * - * Only enabled when the NV seed entropy source is enabled - */ -#if defined(MBEDTLS_ENTROPY_NV_SEED) -#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO) -/* Internal standard platform definitions */ -int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len ); -int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len ); -#endif - -#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) -extern int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ); -extern int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len ); - -/** - * \brief Set your own seed file writing/reading functions - * - * \param nv_seed_read_func the seed reading function implementation - * \param nv_seed_write_func the seed writing function implementation - * - * \return 0 - */ -int mbedtls_platform_set_nv_seed( - int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ), - int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len ) - ); -#else -#if defined(MBEDTLS_PLATFORM_NV_SEED_READ_MACRO) && \ - defined(MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO) -#define mbedtls_nv_seed_read MBEDTLS_PLATFORM_NV_SEED_READ_MACRO -#define mbedtls_nv_seed_write MBEDTLS_PLATFORM_NV_SEED_WRITE_MACRO -#else -#define mbedtls_nv_seed_read mbedtls_platform_std_nv_seed_read -#define mbedtls_nv_seed_write mbedtls_platform_std_nv_seed_write -#endif -#endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */ -#endif /* MBEDTLS_ENTROPY_NV_SEED */ #if !defined(MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT) diff --git a/deps/mbedtls/mbedtls/platform_time.h b/deps/mbedtls/mbedtls/platform_time.h deleted file mode 100644 index abb3431420..0000000000 --- a/deps/mbedtls/mbedtls/platform_time.h +++ /dev/null @@ -1,81 +0,0 @@ -/** - * \file platform_time.h - * - * \brief mbed TLS Platform time abstraction - * - * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -#ifndef MBEDTLS_PLATFORM_TIME_H -#define MBEDTLS_PLATFORM_TIME_H - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * \name SECTION: Module settings - * - * The configuration options you can set for this module are in this section. - * Either change them in config.h or define them on the compiler command line. - * \{ - */ - -/* - * The time_t datatype - */ -#if defined(MBEDTLS_PLATFORM_TIME_TYPE_MACRO) -typedef MBEDTLS_PLATFORM_TIME_TYPE_MACRO mbedtls_time_t; -#else -/* For time_t */ -#include -typedef time_t mbedtls_time_t; -#endif /* MBEDTLS_PLATFORM_TIME_TYPE_MACRO */ - -/* - * The function pointers for time - */ -#if defined(MBEDTLS_PLATFORM_TIME_ALT) -extern mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* time ); - -/** - * \brief Set your own time function pointer - * - * \param time_func the time function implementation - * - * \return 0 - */ -int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* time ) ); -#else -#if defined(MBEDTLS_PLATFORM_TIME_MACRO) -#define mbedtls_time MBEDTLS_PLATFORM_TIME_MACRO -#else -#define mbedtls_time time -#endif /* MBEDTLS_PLATFORM_TIME_MACRO */ -#endif /* MBEDTLS_PLATFORM_TIME_ALT */ - -#ifdef __cplusplus -} -#endif - -#endif /* platform_time.h */ diff --git a/deps/mbedtls/mbedtls/ssl.h b/deps/mbedtls/mbedtls/ssl.h index 3c6a2ec3e4..cda76afc48 100644 --- a/deps/mbedtls/mbedtls/ssl.h +++ b/deps/mbedtls/mbedtls/ssl.h @@ -47,13 +47,7 @@ #include "ecdh.h" #endif -#if defined(MBEDTLS_ZLIB_SUPPORT) -#include "zlib.h" -#endif - -#if defined(MBEDTLS_HAVE_TIME) -#include "platform_time.h" -#endif +#include /* * SSL Error codes @@ -547,9 +541,7 @@ typedef struct mbedtls_ssl_flight_item mbedtls_ssl_flight_item; */ struct mbedtls_ssl_session { -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t start; /*!< starting time */ -#endif + time_t start; /*!< starting time */ int ciphersuite; /*!< chosen ciphersuite */ int compression; /*!< chosen compression */ size_t id_len; /*!< session id length */ @@ -863,9 +855,6 @@ struct mbedtls_ssl_context size_t out_msglen; /*!< record header: message length */ size_t out_left; /*!< amount of data not yet written */ -#if defined(MBEDTLS_ZLIB_SUPPORT) - unsigned char *compress_buf; /*!< zlib data buffer */ -#endif #if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) signed char split_done; /*!< current record already splitted? */ #endif diff --git a/deps/mbedtls/mbedtls/ssl_cache.h b/deps/mbedtls/mbedtls/ssl_cache.h index 3734bb7274..74b9ddd4b6 100644 --- a/deps/mbedtls/mbedtls/ssl_cache.h +++ b/deps/mbedtls/mbedtls/ssl_cache.h @@ -59,9 +59,7 @@ typedef struct mbedtls_ssl_cache_entry mbedtls_ssl_cache_entry; */ struct mbedtls_ssl_cache_entry { -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t timestamp; /*!< entry timestamp */ -#endif + time_t timestamp; /*!< entry timestamp */ mbedtls_ssl_session session; /*!< entry session */ #if defined(MBEDTLS_X509_CRT_PARSE_C) mbedtls_x509_buf peer_cert; /*!< entry peer_cert */ @@ -107,7 +105,6 @@ int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ); */ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ); -#if defined(MBEDTLS_HAVE_TIME) /** * \brief Set the cache timeout * (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day)) @@ -118,7 +115,6 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ); * \param timeout cache entry timeout in seconds */ void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout ); -#endif /* MBEDTLS_HAVE_TIME */ /** * \brief Set the maximum number of cache entries diff --git a/deps/mbedtls/mbedtls/ssl_cookie.h b/deps/mbedtls/mbedtls/ssl_cookie.h index 037e1c3112..37f08e4c64 100644 --- a/deps/mbedtls/mbedtls/ssl_cookie.h +++ b/deps/mbedtls/mbedtls/ssl_cookie.h @@ -52,9 +52,6 @@ extern "C" { typedef struct { mbedtls_md_context_t hmac_ctx; /*!< context for the HMAC portion */ -#if !defined(MBEDTLS_HAVE_TIME) - unsigned long serial; /*!< serial number for expiration */ -#endif unsigned long timeout; /*!< timeout delay, in seconds if HAVE_TIME, or in number of tickets issued */ diff --git a/deps/mbedtls/mbedtls/ssl_internal.h b/deps/mbedtls/mbedtls/ssl_internal.h index 756360b181..7705bba48a 100644 --- a/deps/mbedtls/mbedtls/ssl_internal.h +++ b/deps/mbedtls/mbedtls/ssl_internal.h @@ -23,6 +23,8 @@ #ifndef MBEDTLS_SSL_INTERNAL_H #define MBEDTLS_SSL_INTERNAL_H +#include + #include "ssl.h" #if defined(MBEDTLS_MD5_C) @@ -45,11 +47,6 @@ #include "ecjpake.h" #endif -#if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ - !defined(inline) && !defined(__cplusplus) -#define inline __inline -#endif - /* Determine minimum supported version */ #define MBEDTLS_SSL_MIN_MAJOR_VERSION MBEDTLS_SSL_MAJOR_VERSION_3 @@ -112,11 +109,7 @@ * and allow for a maximum of 1024 of compression expansion if * enabled. */ -#if defined(MBEDTLS_ZLIB_SUPPORT) -#define MBEDTLS_SSL_COMPRESSION_ADD 1024 -#else #define MBEDTLS_SSL_COMPRESSION_ADD 0 -#endif #if defined(MBEDTLS_ARC4_C) || defined(MBEDTLS_CIPHER_MODE_CBC) /* Ciphersuites using HMAC */ @@ -315,14 +308,6 @@ struct mbedtls_ssl_transform mbedtls_cipher_context_t cipher_ctx_enc; /*!< encryption context */ mbedtls_cipher_context_t cipher_ctx_dec; /*!< decryption context */ - - /* - * Session specific compression layer - */ -#if defined(MBEDTLS_ZLIB_SUPPORT) - z_stream ctx_deflate; /*!< compression context */ - z_stream ctx_inflate; /*!< decompression context */ -#endif }; #if defined(MBEDTLS_X509_CRT_PARSE_C) @@ -365,7 +350,7 @@ void mbedtls_ssl_sig_hash_set_const_hash( mbedtls_ssl_sig_hash_set_t *set, mbedtls_md_type_t md_alg ); /* Setup an empty signature-hash set */ -static inline void mbedtls_ssl_sig_hash_set_init( mbedtls_ssl_sig_hash_set_t *set ) +static INLINE void mbedtls_ssl_sig_hash_set_init( mbedtls_ssl_sig_hash_set_t *set ) { mbedtls_ssl_sig_hash_set_const_hash( set, MBEDTLS_MD_NONE ); } @@ -518,7 +503,7 @@ int mbedtls_ssl_check_sig_hash( const mbedtls_ssl_context *ssl, #endif #if defined(MBEDTLS_X509_CRT_PARSE_C) -static inline mbedtls_pk_context *mbedtls_ssl_own_key( mbedtls_ssl_context *ssl ) +static INLINE mbedtls_pk_context *mbedtls_ssl_own_key( mbedtls_ssl_context *ssl ) { mbedtls_ssl_key_cert *key_cert; @@ -530,7 +515,7 @@ static inline mbedtls_pk_context *mbedtls_ssl_own_key( mbedtls_ssl_context *ssl return( key_cert == NULL ? NULL : key_cert->key ); } -static inline mbedtls_x509_crt *mbedtls_ssl_own_cert( mbedtls_ssl_context *ssl ) +static INLINE mbedtls_x509_crt *mbedtls_ssl_own_cert( mbedtls_ssl_context *ssl ) { mbedtls_ssl_key_cert *key_cert; @@ -562,7 +547,7 @@ void mbedtls_ssl_write_version( int major, int minor, int transport, void mbedtls_ssl_read_version( int *major, int *minor, int transport, const unsigned char ver[2] ); -static inline size_t mbedtls_ssl_hdr_len( const mbedtls_ssl_context *ssl ) +static INLINE size_t mbedtls_ssl_hdr_len( const mbedtls_ssl_context *ssl ) { #if defined(MBEDTLS_SSL_PROTO_DTLS) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) @@ -573,7 +558,7 @@ static inline size_t mbedtls_ssl_hdr_len( const mbedtls_ssl_context *ssl ) return( 5 ); } -static inline size_t mbedtls_ssl_hs_hdr_len( const mbedtls_ssl_context *ssl ) +static INLINE size_t mbedtls_ssl_hs_hdr_len( const mbedtls_ssl_context *ssl ) { #if defined(MBEDTLS_SSL_PROTO_DTLS) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) @@ -597,7 +582,7 @@ void mbedtls_ssl_dtls_replay_update( mbedtls_ssl_context *ssl ); #endif /* constant-time buffer comparison */ -static inline int mbedtls_ssl_safer_memcmp( const void *a, const void *b, size_t n ) +static INLINE int mbedtls_ssl_safer_memcmp( const void *a, const void *b, size_t n ) { size_t i; const unsigned char *A = (const unsigned char *) a; diff --git a/deps/mbedtls/mbedtls/timing.h b/deps/mbedtls/mbedtls/timing.h index e307418523..522c848e8e 100644 --- a/deps/mbedtls/mbedtls/timing.h +++ b/deps/mbedtls/mbedtls/timing.h @@ -29,7 +29,6 @@ #include MBEDTLS_CONFIG_FILE #endif -#if !defined(MBEDTLS_TIMING_ALT) /* Regular implementation */ #include @@ -116,23 +115,10 @@ int mbedtls_timing_get_delay( void *data ); } #endif -#else /* MBEDTLS_TIMING_ALT */ -#include "timing_alt.h" -#endif /* MBEDTLS_TIMING_ALT */ - #ifdef __cplusplus extern "C" { #endif -#if defined(MBEDTLS_SELF_TEST) -/** - * \brief Checkup routine - * - * \return 0 if successful, or 1 if a test failed - */ -int mbedtls_timing_self_test( int verbose ); -#endif - #ifdef __cplusplus } #endif diff --git a/deps/mbedtls/md.c b/deps/mbedtls/md.c index 4584310d81..812019677d 100644 --- a/deps/mbedtls/md.c +++ b/deps/mbedtls/md.c @@ -34,14 +34,7 @@ #include "mbedtls/md.h" #include "mbedtls/md_internal.h" -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - #include #if defined(MBEDTLS_FS_IO) @@ -77,14 +70,6 @@ static const int supported_digests[] = { MBEDTLS_MD_MD5, #endif -#if defined(MBEDTLS_MD4_C) - MBEDTLS_MD_MD4, -#endif - -#if defined(MBEDTLS_MD2_C) - MBEDTLS_MD_MD2, -#endif - MBEDTLS_MD_NONE }; @@ -99,14 +84,6 @@ const mbedtls_md_info_t *mbedtls_md_info_from_string( const char *md_name ) return( NULL ); /* Get the appropriate digest information */ -#if defined(MBEDTLS_MD2_C) - if( !strcmp( "MD2", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_MD2 ); -#endif -#if defined(MBEDTLS_MD4_C) - if( !strcmp( "MD4", md_name ) ) - return mbedtls_md_info_from_type( MBEDTLS_MD_MD4 ); -#endif #if defined(MBEDTLS_MD5_C) if( !strcmp( "MD5", md_name ) ) return mbedtls_md_info_from_type( MBEDTLS_MD_MD5 ); @@ -138,14 +115,6 @@ const mbedtls_md_info_t *mbedtls_md_info_from_type( mbedtls_md_type_t md_type ) { switch( md_type ) { -#if defined(MBEDTLS_MD2_C) - case MBEDTLS_MD_MD2: - return( &mbedtls_md2_info ); -#endif -#if defined(MBEDTLS_MD4_C) - case MBEDTLS_MD_MD4: - return( &mbedtls_md4_info ); -#endif #if defined(MBEDTLS_MD5_C) case MBEDTLS_MD_MD5: return( &mbedtls_md5_info ); @@ -191,7 +160,7 @@ void mbedtls_md_free( mbedtls_md_context_t *ctx ) if( ctx->hmac_ctx != NULL ) { mbedtls_zeroize( ctx->hmac_ctx, 2 * ctx->md_info->block_size ); - mbedtls_free( ctx->hmac_ctx ); + free( ctx->hmac_ctx ); } mbedtls_zeroize( ctx, sizeof( mbedtls_md_context_t ) ); @@ -212,13 +181,6 @@ int mbedtls_md_clone( mbedtls_md_context_t *dst, return( 0 ); } -#if ! defined(MBEDTLS_DEPRECATED_REMOVED) -int mbedtls_md_init_ctx( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info ) -{ - return mbedtls_md_setup( ctx, md_info, 1 ); -} -#endif - int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_info, int hmac ) { if( md_info == NULL || ctx == NULL ) @@ -229,7 +191,7 @@ int mbedtls_md_setup( mbedtls_md_context_t *ctx, const mbedtls_md_info_t *md_inf if( hmac != 0 ) { - ctx->hmac_ctx = mbedtls_calloc( 2, md_info->block_size ); + ctx->hmac_ctx = calloc( 2, md_info->block_size ); if( ctx->hmac_ctx == NULL ) { md_info->ctx_free_func( ctx->md_ctx ); diff --git a/deps/mbedtls/md2.c b/deps/mbedtls/md2.c deleted file mode 100644 index 647fce97b3..0000000000 --- a/deps/mbedtls/md2.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - * RFC 1115/1319 compliant MD2 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The MD2 algorithm was designed by Ron Rivest in 1989. - * - * http://www.ietf.org/rfc/rfc1115.txt - * http://www.ietf.org/rfc/rfc1319.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD2_C) - -#include "mbedtls/md2.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_MD2_ALT) - -#include "arc4_alt.h" - -static const unsigned char PI_SUBST[256] = -{ - 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, - 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, 0x62, 0xA7, 0x05, 0xF3, - 0xC0, 0xC7, 0x73, 0x8C, 0x98, 0x93, 0x2B, 0xD9, 0xBC, 0x4C, - 0x82, 0xCA, 0x1E, 0x9B, 0x57, 0x3C, 0xFD, 0xD4, 0xE0, 0x16, - 0x67, 0x42, 0x6F, 0x18, 0x8A, 0x17, 0xE5, 0x12, 0xBE, 0x4E, - 0xC4, 0xD6, 0xDA, 0x9E, 0xDE, 0x49, 0xA0, 0xFB, 0xF5, 0x8E, - 0xBB, 0x2F, 0xEE, 0x7A, 0xA9, 0x68, 0x79, 0x91, 0x15, 0xB2, - 0x07, 0x3F, 0x94, 0xC2, 0x10, 0x89, 0x0B, 0x22, 0x5F, 0x21, - 0x80, 0x7F, 0x5D, 0x9A, 0x5A, 0x90, 0x32, 0x27, 0x35, 0x3E, - 0xCC, 0xE7, 0xBF, 0xF7, 0x97, 0x03, 0xFF, 0x19, 0x30, 0xB3, - 0x48, 0xA5, 0xB5, 0xD1, 0xD7, 0x5E, 0x92, 0x2A, 0xAC, 0x56, - 0xAA, 0xC6, 0x4F, 0xB8, 0x38, 0xD2, 0x96, 0xA4, 0x7D, 0xB6, - 0x76, 0xFC, 0x6B, 0xE2, 0x9C, 0x74, 0x04, 0xF1, 0x45, 0x9D, - 0x70, 0x59, 0x64, 0x71, 0x87, 0x20, 0x86, 0x5B, 0xCF, 0x65, - 0xE6, 0x2D, 0xA8, 0x02, 0x1B, 0x60, 0x25, 0xAD, 0xAE, 0xB0, - 0xB9, 0xF6, 0x1C, 0x46, 0x61, 0x69, 0x34, 0x40, 0x7E, 0x0F, - 0x55, 0x47, 0xA3, 0x23, 0xDD, 0x51, 0xAF, 0x3A, 0xC3, 0x5C, - 0xF9, 0xCE, 0xBA, 0xC5, 0xEA, 0x26, 0x2C, 0x53, 0x0D, 0x6E, - 0x85, 0x28, 0x84, 0x09, 0xD3, 0xDF, 0xCD, 0xF4, 0x41, 0x81, - 0x4D, 0x52, 0x6A, 0xDC, 0x37, 0xC8, 0x6C, 0xC1, 0xAB, 0xFA, - 0x24, 0xE1, 0x7B, 0x08, 0x0C, 0xBD, 0xB1, 0x4A, 0x78, 0x88, - 0x95, 0x8B, 0xE3, 0x63, 0xE8, 0x6D, 0xE9, 0xCB, 0xD5, 0xFE, - 0x3B, 0x00, 0x1D, 0x39, 0xF2, 0xEF, 0xB7, 0x0E, 0x66, 0x58, - 0xD0, 0xE4, 0xA6, 0x77, 0x72, 0xF8, 0xEB, 0x75, 0x4B, 0x0A, - 0x31, 0x44, 0x50, 0xB4, 0x8F, 0xED, 0x1F, 0x1A, 0xDB, 0x99, - 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14 -}; - -void mbedtls_md2_init( mbedtls_md2_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md2_context ) ); -} - -void mbedtls_md2_free( mbedtls_md2_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_md2_context ) ); -} - -void mbedtls_md2_clone( mbedtls_md2_context *dst, - const mbedtls_md2_context *src ) -{ - *dst = *src; -} - -/* - * MD2 context setup - */ -void mbedtls_md2_starts( mbedtls_md2_context *ctx ) -{ - memset( ctx->cksum, 0, 16 ); - memset( ctx->state, 0, 46 ); - memset( ctx->buffer, 0, 16 ); - ctx->left = 0; -} - -#if !defined(MBEDTLS_MD2_PROCESS_ALT) -void mbedtls_md2_process( mbedtls_md2_context *ctx ) -{ - int i, j; - unsigned char t = 0; - - for( i = 0; i < 16; i++ ) - { - ctx->state[i + 16] = ctx->buffer[i]; - ctx->state[i + 32] = - (unsigned char)( ctx->buffer[i] ^ ctx->state[i]); - } - - for( i = 0; i < 18; i++ ) - { - for( j = 0; j < 48; j++ ) - { - ctx->state[j] = (unsigned char) - ( ctx->state[j] ^ PI_SUBST[t] ); - t = ctx->state[j]; - } - - t = (unsigned char)( t + i ); - } - - t = ctx->cksum[15]; - - for( i = 0; i < 16; i++ ) - { - ctx->cksum[i] = (unsigned char) - ( ctx->cksum[i] ^ PI_SUBST[ctx->buffer[i] ^ t] ); - t = ctx->cksum[i]; - } -} -#endif /* !MBEDTLS_MD2_PROCESS_ALT */ - -/* - * MD2 process buffer - */ -void mbedtls_md2_update( mbedtls_md2_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - - while( ilen > 0 ) - { - if( ilen > 16 - ctx->left ) - fill = 16 - ctx->left; - else - fill = ilen; - - memcpy( ctx->buffer + ctx->left, input, fill ); - - ctx->left += fill; - input += fill; - ilen -= fill; - - if( ctx->left == 16 ) - { - ctx->left = 0; - mbedtls_md2_process( ctx ); - } - } -} - -/* - * MD2 final digest - */ -void mbedtls_md2_finish( mbedtls_md2_context *ctx, unsigned char output[16] ) -{ - size_t i; - unsigned char x; - - x = (unsigned char)( 16 - ctx->left ); - - for( i = ctx->left; i < 16; i++ ) - ctx->buffer[i] = x; - - mbedtls_md2_process( ctx ); - - memcpy( ctx->buffer, ctx->cksum, 16 ); - mbedtls_md2_process( ctx ); - - memcpy( output, ctx->state, 16 ); -} - -#endif /* !MBEDTLS_MD2_ALT */ - -/* - * output = MD2( input buffer ) - */ -void mbedtls_md2( const unsigned char *input, size_t ilen, unsigned char output[16] ) -{ - mbedtls_md2_context ctx; - - mbedtls_md2_init( &ctx ); - mbedtls_md2_starts( &ctx ); - mbedtls_md2_update( &ctx, input, ilen ); - mbedtls_md2_finish( &ctx, output ); - mbedtls_md2_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * RFC 1319 test vectors - */ -static const char md2_test_str[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const unsigned char md2_test_sum[7][16] = -{ - { 0x83, 0x50, 0xE5, 0xA3, 0xE2, 0x4C, 0x15, 0x3D, - 0xF2, 0x27, 0x5C, 0x9F, 0x80, 0x69, 0x27, 0x73 }, - { 0x32, 0xEC, 0x01, 0xEC, 0x4A, 0x6D, 0xAC, 0x72, - 0xC0, 0xAB, 0x96, 0xFB, 0x34, 0xC0, 0xB5, 0xD1 }, - { 0xDA, 0x85, 0x3B, 0x0D, 0x3F, 0x88, 0xD9, 0x9B, - 0x30, 0x28, 0x3A, 0x69, 0xE6, 0xDE, 0xD6, 0xBB }, - { 0xAB, 0x4F, 0x49, 0x6B, 0xFB, 0x2A, 0x53, 0x0B, - 0x21, 0x9F, 0xF3, 0x30, 0x31, 0xFE, 0x06, 0xB0 }, - { 0x4E, 0x8D, 0xDF, 0xF3, 0x65, 0x02, 0x92, 0xAB, - 0x5A, 0x41, 0x08, 0xC3, 0xAA, 0x47, 0x94, 0x0B }, - { 0xDA, 0x33, 0xDE, 0xF2, 0xA4, 0x2D, 0xF1, 0x39, - 0x75, 0x35, 0x28, 0x46, 0xC3, 0x03, 0x38, 0xCD }, - { 0xD5, 0x97, 0x6F, 0x79, 0xD8, 0x3D, 0x3A, 0x0D, - 0xC9, 0x80, 0x6C, 0x3C, 0x66, 0xF3, 0xEF, 0xD8 } -}; - -/* - * Checkup routine - */ -int mbedtls_md2_self_test( int verbose ) -{ - int i; - unsigned char md2sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD2 test #%d: ", i + 1 ); - - mbedtls_md2( (unsigned char *) md2_test_str[i], - strlen( md2_test_str[i] ), md2sum ); - - if( memcmp( md2sum, md2_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MD2_C */ diff --git a/deps/mbedtls/md4.c b/deps/mbedtls/md4.c deleted file mode 100644 index f436191cb1..0000000000 --- a/deps/mbedtls/md4.c +++ /dev/null @@ -1,381 +0,0 @@ -/* - * RFC 1186/1320 compliant MD4 implementation - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ -/* - * The MD4 algorithm was designed by Ron Rivest in 1990. - * - * http://www.ietf.org/rfc/rfc1186.txt - * http://www.ietf.org/rfc/rfc1320.txt - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MD4_C) - -#include "mbedtls/md4.h" - -#include - -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - -#if !defined(MBEDTLS_MD4_ALT) - -#include "arc4_alt.h" - -/* - * 32-bit integer manipulation macros (little endian) - */ -#ifndef GET_UINT32_LE -#define GET_UINT32_LE(n,b,i) \ -{ \ - (n) = ( (uint32_t) (b)[(i) ] ) \ - | ( (uint32_t) (b)[(i) + 1] << 8 ) \ - | ( (uint32_t) (b)[(i) + 2] << 16 ) \ - | ( (uint32_t) (b)[(i) + 3] << 24 ); \ -} -#endif - -#ifndef PUT_UINT32_LE -#define PUT_UINT32_LE(n,b,i) \ -{ \ - (b)[(i) ] = (unsigned char) ( ( (n) ) & 0xFF ); \ - (b)[(i) + 1] = (unsigned char) ( ( (n) >> 8 ) & 0xFF ); \ - (b)[(i) + 2] = (unsigned char) ( ( (n) >> 16 ) & 0xFF ); \ - (b)[(i) + 3] = (unsigned char) ( ( (n) >> 24 ) & 0xFF ); \ -} -#endif - -void mbedtls_md4_init( mbedtls_md4_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_md4_context ) ); -} - -void mbedtls_md4_free( mbedtls_md4_context *ctx ) -{ - if( ctx == NULL ) - return; - - mbedtls_zeroize( ctx, sizeof( mbedtls_md4_context ) ); -} - -void mbedtls_md4_clone( mbedtls_md4_context *dst, - const mbedtls_md4_context *src ) -{ - *dst = *src; -} - -/* - * MD4 context setup - */ -void mbedtls_md4_starts( mbedtls_md4_context *ctx ) -{ - ctx->total[0] = 0; - ctx->total[1] = 0; - - ctx->state[0] = 0x67452301; - ctx->state[1] = 0xEFCDAB89; - ctx->state[2] = 0x98BADCFE; - ctx->state[3] = 0x10325476; -} - -#if !defined(MBEDTLS_MD4_PROCESS_ALT) -void mbedtls_md4_process( mbedtls_md4_context *ctx, const unsigned char data[64] ) -{ - uint32_t X[16], A, B, C, D; - - GET_UINT32_LE( X[ 0], data, 0 ); - GET_UINT32_LE( X[ 1], data, 4 ); - GET_UINT32_LE( X[ 2], data, 8 ); - GET_UINT32_LE( X[ 3], data, 12 ); - GET_UINT32_LE( X[ 4], data, 16 ); - GET_UINT32_LE( X[ 5], data, 20 ); - GET_UINT32_LE( X[ 6], data, 24 ); - GET_UINT32_LE( X[ 7], data, 28 ); - GET_UINT32_LE( X[ 8], data, 32 ); - GET_UINT32_LE( X[ 9], data, 36 ); - GET_UINT32_LE( X[10], data, 40 ); - GET_UINT32_LE( X[11], data, 44 ); - GET_UINT32_LE( X[12], data, 48 ); - GET_UINT32_LE( X[13], data, 52 ); - GET_UINT32_LE( X[14], data, 56 ); - GET_UINT32_LE( X[15], data, 60 ); - -#define S(x,n) ((x << n) | ((x & 0xFFFFFFFF) >> (32 - n))) - - A = ctx->state[0]; - B = ctx->state[1]; - C = ctx->state[2]; - D = ctx->state[3]; - -#define F(x, y, z) ((x & y) | ((~x) & z)) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 1], 7 ); - P( C, D, A, B, X[ 2], 11 ); - P( B, C, D, A, X[ 3], 19 ); - P( A, B, C, D, X[ 4], 3 ); - P( D, A, B, C, X[ 5], 7 ); - P( C, D, A, B, X[ 6], 11 ); - P( B, C, D, A, X[ 7], 19 ); - P( A, B, C, D, X[ 8], 3 ); - P( D, A, B, C, X[ 9], 7 ); - P( C, D, A, B, X[10], 11 ); - P( B, C, D, A, X[11], 19 ); - P( A, B, C, D, X[12], 3 ); - P( D, A, B, C, X[13], 7 ); - P( C, D, A, B, X[14], 11 ); - P( B, C, D, A, X[15], 19 ); - -#undef P -#undef F - -#define F(x,y,z) ((x & y) | (x & z) | (y & z)) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x + 0x5A827999; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 4], 5 ); - P( C, D, A, B, X[ 8], 9 ); - P( B, C, D, A, X[12], 13 ); - P( A, B, C, D, X[ 1], 3 ); - P( D, A, B, C, X[ 5], 5 ); - P( C, D, A, B, X[ 9], 9 ); - P( B, C, D, A, X[13], 13 ); - P( A, B, C, D, X[ 2], 3 ); - P( D, A, B, C, X[ 6], 5 ); - P( C, D, A, B, X[10], 9 ); - P( B, C, D, A, X[14], 13 ); - P( A, B, C, D, X[ 3], 3 ); - P( D, A, B, C, X[ 7], 5 ); - P( C, D, A, B, X[11], 9 ); - P( B, C, D, A, X[15], 13 ); - -#undef P -#undef F - -#define F(x,y,z) (x ^ y ^ z) -#define P(a,b,c,d,x,s) { a += F(b,c,d) + x + 0x6ED9EBA1; a = S(a,s); } - - P( A, B, C, D, X[ 0], 3 ); - P( D, A, B, C, X[ 8], 9 ); - P( C, D, A, B, X[ 4], 11 ); - P( B, C, D, A, X[12], 15 ); - P( A, B, C, D, X[ 2], 3 ); - P( D, A, B, C, X[10], 9 ); - P( C, D, A, B, X[ 6], 11 ); - P( B, C, D, A, X[14], 15 ); - P( A, B, C, D, X[ 1], 3 ); - P( D, A, B, C, X[ 9], 9 ); - P( C, D, A, B, X[ 5], 11 ); - P( B, C, D, A, X[13], 15 ); - P( A, B, C, D, X[ 3], 3 ); - P( D, A, B, C, X[11], 9 ); - P( C, D, A, B, X[ 7], 11 ); - P( B, C, D, A, X[15], 15 ); - -#undef F -#undef P - - ctx->state[0] += A; - ctx->state[1] += B; - ctx->state[2] += C; - ctx->state[3] += D; -} -#endif /* !MBEDTLS_MD4_PROCESS_ALT */ - -/* - * MD4 process buffer - */ -void mbedtls_md4_update( mbedtls_md4_context *ctx, const unsigned char *input, size_t ilen ) -{ - size_t fill; - uint32_t left; - - if( ilen == 0 ) - return; - - left = ctx->total[0] & 0x3F; - fill = 64 - left; - - ctx->total[0] += (uint32_t) ilen; - ctx->total[0] &= 0xFFFFFFFF; - - if( ctx->total[0] < (uint32_t) ilen ) - ctx->total[1]++; - - if( left && ilen >= fill ) - { - memcpy( (void *) (ctx->buffer + left), - (void *) input, fill ); - mbedtls_md4_process( ctx, ctx->buffer ); - input += fill; - ilen -= fill; - left = 0; - } - - while( ilen >= 64 ) - { - mbedtls_md4_process( ctx, input ); - input += 64; - ilen -= 64; - } - - if( ilen > 0 ) - { - memcpy( (void *) (ctx->buffer + left), - (void *) input, ilen ); - } -} - -static const unsigned char md4_padding[64] = -{ - 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* - * MD4 final digest - */ -void mbedtls_md4_finish( mbedtls_md4_context *ctx, unsigned char output[16] ) -{ - uint32_t last, padn; - uint32_t high, low; - unsigned char msglen[8]; - - high = ( ctx->total[0] >> 29 ) - | ( ctx->total[1] << 3 ); - low = ( ctx->total[0] << 3 ); - - PUT_UINT32_LE( low, msglen, 0 ); - PUT_UINT32_LE( high, msglen, 4 ); - - last = ctx->total[0] & 0x3F; - padn = ( last < 56 ) ? ( 56 - last ) : ( 120 - last ); - - mbedtls_md4_update( ctx, (unsigned char *) md4_padding, padn ); - mbedtls_md4_update( ctx, msglen, 8 ); - - PUT_UINT32_LE( ctx->state[0], output, 0 ); - PUT_UINT32_LE( ctx->state[1], output, 4 ); - PUT_UINT32_LE( ctx->state[2], output, 8 ); - PUT_UINT32_LE( ctx->state[3], output, 12 ); -} - -#endif /* !MBEDTLS_MD4_ALT */ - -/* - * output = MD4( input buffer ) - */ -void mbedtls_md4( const unsigned char *input, size_t ilen, unsigned char output[16] ) -{ - mbedtls_md4_context ctx; - - mbedtls_md4_init( &ctx ); - mbedtls_md4_starts( &ctx ); - mbedtls_md4_update( &ctx, input, ilen ); - mbedtls_md4_finish( &ctx, output ); - mbedtls_md4_free( &ctx ); -} - -#if defined(MBEDTLS_SELF_TEST) - -/* - * RFC 1320 test vectors - */ -static const char md4_test_str[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const unsigned char md4_test_sum[7][16] = -{ - { 0x31, 0xD6, 0xCF, 0xE0, 0xD1, 0x6A, 0xE9, 0x31, - 0xB7, 0x3C, 0x59, 0xD7, 0xE0, 0xC0, 0x89, 0xC0 }, - { 0xBD, 0xE5, 0x2C, 0xB3, 0x1D, 0xE3, 0x3E, 0x46, - 0x24, 0x5E, 0x05, 0xFB, 0xDB, 0xD6, 0xFB, 0x24 }, - { 0xA4, 0x48, 0x01, 0x7A, 0xAF, 0x21, 0xD8, 0x52, - 0x5F, 0xC1, 0x0A, 0xE8, 0x7A, 0xA6, 0x72, 0x9D }, - { 0xD9, 0x13, 0x0A, 0x81, 0x64, 0x54, 0x9F, 0xE8, - 0x18, 0x87, 0x48, 0x06, 0xE1, 0xC7, 0x01, 0x4B }, - { 0xD7, 0x9E, 0x1C, 0x30, 0x8A, 0xA5, 0xBB, 0xCD, - 0xEE, 0xA8, 0xED, 0x63, 0xDF, 0x41, 0x2D, 0xA9 }, - { 0x04, 0x3F, 0x85, 0x82, 0xF2, 0x41, 0xDB, 0x35, - 0x1C, 0xE6, 0x27, 0xE1, 0x53, 0xE7, 0xF0, 0xE4 }, - { 0xE3, 0x3B, 0x4D, 0xDC, 0x9C, 0x38, 0xF2, 0x19, - 0x9C, 0x3E, 0x7B, 0x16, 0x4F, 0xCC, 0x05, 0x36 } -}; - -/* - * Checkup routine - */ -int mbedtls_md4_self_test( int verbose ) -{ - int i; - unsigned char md4sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD4 test #%d: ", i + 1 ); - - mbedtls_md4( (unsigned char *) md4_test_str[i], - strlen( md4_test_str[i] ), md4sum ); - - if( memcmp( md4sum, md4_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MD4_C */ diff --git a/deps/mbedtls/md5.c b/deps/mbedtls/md5.c index 258a3af967..ae8c084c30 100644 --- a/deps/mbedtls/md5.c +++ b/deps/mbedtls/md5.c @@ -36,15 +36,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_MD5_ALT) #include "arc4_alt.h" @@ -324,78 +315,4 @@ void mbedtls_md5( const unsigned char *input, size_t ilen, unsigned char output[ mbedtls_md5_free( &ctx ); } -#if defined(MBEDTLS_SELF_TEST) -/* - * RFC 1321 test vectors - */ -static const unsigned char md5_test_buf[7][81] = -{ - { "" }, - { "a" }, - { "abc" }, - { "message digest" }, - { "abcdefghijklmnopqrstuvwxyz" }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789" }, - { "12345678901234567890123456789012345678901234567890123456789012" \ - "345678901234567890" } -}; - -static const int md5_test_buflen[7] = -{ - 0, 1, 3, 14, 26, 62, 80 -}; - -static const unsigned char md5_test_sum[7][16] = -{ - { 0xD4, 0x1D, 0x8C, 0xD9, 0x8F, 0x00, 0xB2, 0x04, - 0xE9, 0x80, 0x09, 0x98, 0xEC, 0xF8, 0x42, 0x7E }, - { 0x0C, 0xC1, 0x75, 0xB9, 0xC0, 0xF1, 0xB6, 0xA8, - 0x31, 0xC3, 0x99, 0xE2, 0x69, 0x77, 0x26, 0x61 }, - { 0x90, 0x01, 0x50, 0x98, 0x3C, 0xD2, 0x4F, 0xB0, - 0xD6, 0x96, 0x3F, 0x7D, 0x28, 0xE1, 0x7F, 0x72 }, - { 0xF9, 0x6B, 0x69, 0x7D, 0x7C, 0xB7, 0x93, 0x8D, - 0x52, 0x5A, 0x2F, 0x31, 0xAA, 0xF1, 0x61, 0xD0 }, - { 0xC3, 0xFC, 0xD3, 0xD7, 0x61, 0x92, 0xE4, 0x00, - 0x7D, 0xFB, 0x49, 0x6C, 0xCA, 0x67, 0xE1, 0x3B }, - { 0xD1, 0x74, 0xAB, 0x98, 0xD2, 0x77, 0xD9, 0xF5, - 0xA5, 0x61, 0x1C, 0x2C, 0x9F, 0x41, 0x9D, 0x9F }, - { 0x57, 0xED, 0xF4, 0xA2, 0x2B, 0xE3, 0xC9, 0x55, - 0xAC, 0x49, 0xDA, 0x2E, 0x21, 0x07, 0xB6, 0x7A } -}; - -/* - * Checkup routine - */ -int mbedtls_md5_self_test( int verbose ) -{ - int i; - unsigned char md5sum[16]; - - for( i = 0; i < 7; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " MD5 test #%d: ", i + 1 ); - - mbedtls_md5( md5_test_buf[i], md5_test_buflen[i], md5sum ); - - if( memcmp( md5sum, md5_test_sum[i], 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_MD5_C */ diff --git a/deps/mbedtls/md_wrap.c b/deps/mbedtls/md_wrap.c index 2cfcae200e..984a35f9f1 100644 --- a/deps/mbedtls/md_wrap.c +++ b/deps/mbedtls/md_wrap.c @@ -33,14 +33,6 @@ #include "mbedtls/md_internal.h" -#if defined(MBEDTLS_MD2_C) -#include "mbedtls/md2.h" -#endif - -#if defined(MBEDTLS_MD4_C) -#include "mbedtls/md4.h" -#endif - #if defined(MBEDTLS_MD5_C) #include "mbedtls/md5.h" #endif @@ -61,139 +53,7 @@ #include "mbedtls/sha512.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#if defined(MBEDTLS_MD2_C) - -static void md2_starts_wrap( void *ctx ) -{ - mbedtls_md2_starts( (mbedtls_md2_context *) ctx ); -} - -static void md2_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_md2_update( (mbedtls_md2_context *) ctx, input, ilen ); -} - -static void md2_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_md2_finish( (mbedtls_md2_context *) ctx, output ); -} - -static void *md2_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md2_context ) ); - - if( ctx != NULL ) - mbedtls_md2_init( (mbedtls_md2_context *) ctx ); - - return( ctx ); -} - -static void md2_ctx_free( void *ctx ) -{ - mbedtls_md2_free( (mbedtls_md2_context *) ctx ); - mbedtls_free( ctx ); -} - -static void md2_clone_wrap( void *dst, const void *src ) -{ - mbedtls_md2_clone( (mbedtls_md2_context *) dst, - (const mbedtls_md2_context *) src ); -} - -static void md2_process_wrap( void *ctx, const unsigned char *data ) -{ - ((void) data); - - mbedtls_md2_process( (mbedtls_md2_context *) ctx ); -} - -const mbedtls_md_info_t mbedtls_md2_info = { - MBEDTLS_MD_MD2, - "MD2", - 16, - 16, - md2_starts_wrap, - md2_update_wrap, - md2_finish_wrap, - mbedtls_md2, - md2_ctx_alloc, - md2_ctx_free, - md2_clone_wrap, - md2_process_wrap, -}; - -#endif /* MBEDTLS_MD2_C */ - -#if defined(MBEDTLS_MD4_C) - -static void md4_starts_wrap( void *ctx ) -{ - mbedtls_md4_starts( (mbedtls_md4_context *) ctx ); -} - -static void md4_update_wrap( void *ctx, const unsigned char *input, - size_t ilen ) -{ - mbedtls_md4_update( (mbedtls_md4_context *) ctx, input, ilen ); -} - -static void md4_finish_wrap( void *ctx, unsigned char *output ) -{ - mbedtls_md4_finish( (mbedtls_md4_context *) ctx, output ); -} - -static void *md4_ctx_alloc( void ) -{ - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md4_context ) ); - - if( ctx != NULL ) - mbedtls_md4_init( (mbedtls_md4_context *) ctx ); - - return( ctx ); -} - -static void md4_ctx_free( void *ctx ) -{ - mbedtls_md4_free( (mbedtls_md4_context *) ctx ); - mbedtls_free( ctx ); -} - -static void md4_clone_wrap( void *dst, const void *src ) -{ - mbedtls_md4_clone( (mbedtls_md4_context *) dst, - (const mbedtls_md4_context *) src ); -} - -static void md4_process_wrap( void *ctx, const unsigned char *data ) -{ - mbedtls_md4_process( (mbedtls_md4_context *) ctx, data ); -} - -const mbedtls_md_info_t mbedtls_md4_info = { - MBEDTLS_MD_MD4, - "MD4", - 16, - 64, - md4_starts_wrap, - md4_update_wrap, - md4_finish_wrap, - mbedtls_md4, - md4_ctx_alloc, - md4_ctx_free, - md4_clone_wrap, - md4_process_wrap, -}; - -#endif /* MBEDTLS_MD4_C */ #if defined(MBEDTLS_MD5_C) @@ -215,7 +75,7 @@ static void md5_finish_wrap( void *ctx, unsigned char *output ) static void *md5_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_md5_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_md5_context ) ); if( ctx != NULL ) mbedtls_md5_init( (mbedtls_md5_context *) ctx ); @@ -226,7 +86,7 @@ static void *md5_ctx_alloc( void ) static void md5_ctx_free( void *ctx ) { mbedtls_md5_free( (mbedtls_md5_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void md5_clone_wrap( void *dst, const void *src ) @@ -277,7 +137,7 @@ static void ripemd160_finish_wrap( void *ctx, unsigned char *output ) static void *ripemd160_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ripemd160_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_ripemd160_context ) ); if( ctx != NULL ) mbedtls_ripemd160_init( (mbedtls_ripemd160_context *) ctx ); @@ -288,7 +148,7 @@ static void *ripemd160_ctx_alloc( void ) static void ripemd160_ctx_free( void *ctx ) { mbedtls_ripemd160_free( (mbedtls_ripemd160_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void ripemd160_clone_wrap( void *dst, const void *src ) @@ -339,7 +199,7 @@ static void sha1_finish_wrap( void *ctx, unsigned char *output ) static void *sha1_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha1_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_sha1_context ) ); if( ctx != NULL ) mbedtls_sha1_init( (mbedtls_sha1_context *) ctx ); @@ -356,7 +216,7 @@ static void sha1_clone_wrap( void *dst, const void *src ) static void sha1_ctx_free( void *ctx ) { mbedtls_sha1_free( (mbedtls_sha1_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void sha1_process_wrap( void *ctx, const unsigned char *data ) @@ -410,7 +270,7 @@ static void sha224_wrap( const unsigned char *input, size_t ilen, static void *sha224_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha256_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_sha256_context ) ); if( ctx != NULL ) mbedtls_sha256_init( (mbedtls_sha256_context *) ctx ); @@ -421,7 +281,7 @@ static void *sha224_ctx_alloc( void ) static void sha224_ctx_free( void *ctx ) { mbedtls_sha256_free( (mbedtls_sha256_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void sha224_clone_wrap( void *dst, const void *src ) @@ -504,7 +364,7 @@ static void sha384_wrap( const unsigned char *input, size_t ilen, static void *sha384_ctx_alloc( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_sha512_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_sha512_context ) ); if( ctx != NULL ) mbedtls_sha512_init( (mbedtls_sha512_context *) ctx ); @@ -515,7 +375,7 @@ static void *sha384_ctx_alloc( void ) static void sha384_ctx_free( void *ctx ) { mbedtls_sha512_free( (mbedtls_sha512_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void sha384_clone_wrap( void *dst, const void *src ) diff --git a/deps/mbedtls/memory_buffer_alloc.c b/deps/mbedtls/memory_buffer_alloc.c deleted file mode 100644 index 6fb45375eb..0000000000 --- a/deps/mbedtls/memory_buffer_alloc.c +++ /dev/null @@ -1,742 +0,0 @@ -/* - * Buffer-based memory allocator - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) -#include "mbedtls/memory_buffer_alloc.h" - -/* No need for the header guard as MBEDTLS_MEMORY_BUFFER_ALLOC_C - is dependent upon MBEDTLS_PLATFORM_C */ -#include "mbedtls/platform.h" - -#include - -#if defined(MBEDTLS_MEMORY_BACKTRACE) -#include -#endif - -#if defined(MBEDTLS_THREADING_C) -#include "mbedtls/threading.h" -#endif - -#include "arc4_alt.h" - -#define MAGIC1 0xFF00AA55 -#define MAGIC2 0xEE119966 -#define MAX_BT 20 - -typedef struct _memory_header memory_header; -struct _memory_header -{ - size_t magic1; - size_t size; - size_t alloc; - memory_header *prev; - memory_header *next; - memory_header *prev_free; - memory_header *next_free; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - char **trace; - size_t trace_count; -#endif - size_t magic2; -}; - -typedef struct -{ - unsigned char *buf; - size_t len; - memory_header *first; - memory_header *first_free; - int verify; -#if defined(MBEDTLS_MEMORY_DEBUG) - size_t alloc_count; - size_t free_count; - size_t total_used; - size_t maximum_used; - size_t header_count; - size_t maximum_header_count; -#endif -#if defined(MBEDTLS_THREADING_C) - mbedtls_threading_mutex_t mutex; -#endif -} -buffer_alloc_ctx; - -static buffer_alloc_ctx heap; - -#if defined(MBEDTLS_MEMORY_DEBUG) -static void debug_header( memory_header *hdr ) -{ -#if defined(MBEDTLS_MEMORY_BACKTRACE) - size_t i; -#endif - - mbedtls_fprintf( stderr, "HDR: PTR(%10zu), PREV(%10zu), NEXT(%10zu), " - "ALLOC(%zu), SIZE(%10zu)\n", - (size_t) hdr, (size_t) hdr->prev, (size_t) hdr->next, - hdr->alloc, hdr->size ); - mbedtls_fprintf( stderr, " FPREV(%10zu), FNEXT(%10zu)\n", - (size_t) hdr->prev_free, (size_t) hdr->next_free ); - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - mbedtls_fprintf( stderr, "TRACE: \n" ); - for( i = 0; i < hdr->trace_count; i++ ) - mbedtls_fprintf( stderr, "%s\n", hdr->trace[i] ); - mbedtls_fprintf( stderr, "\n" ); -#endif -} - -static void debug_chain() -{ - memory_header *cur = heap.first; - - mbedtls_fprintf( stderr, "\nBlock list\n" ); - while( cur != NULL ) - { - debug_header( cur ); - cur = cur->next; - } - - mbedtls_fprintf( stderr, "Free list\n" ); - cur = heap.first_free; - - while( cur != NULL ) - { - debug_header( cur ); - cur = cur->next_free; - } -} -#endif /* MBEDTLS_MEMORY_DEBUG */ - -static int verify_header( memory_header *hdr ) -{ - if( hdr->magic1 != MAGIC1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: MAGIC1 mismatch\n" ); -#endif - return( 1 ); - } - - if( hdr->magic2 != MAGIC2 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: MAGIC2 mismatch\n" ); -#endif - return( 1 ); - } - - if( hdr->alloc > 1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: alloc has illegal value\n" ); -#endif - return( 1 ); - } - - if( hdr->prev != NULL && hdr->prev == hdr->next ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: prev == next\n" ); -#endif - return( 1 ); - } - - if( hdr->prev_free != NULL && hdr->prev_free == hdr->next_free ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: prev_free == next_free\n" ); -#endif - return( 1 ); - } - - return( 0 ); -} - -static int verify_chain() -{ - memory_header *prv = heap.first, *cur = heap.first->next; - - if( verify_header( heap.first ) != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification of first header " - "failed\n" ); -#endif - return( 1 ); - } - - if( heap.first->prev != NULL ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification failed: " - "first->prev != NULL\n" ); -#endif - return( 1 ); - } - - while( cur != NULL ) - { - if( verify_header( cur ) != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification of header " - "failed\n" ); -#endif - return( 1 ); - } - - if( cur->prev != prv ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: verification failed: " - "cur->prev != prv\n" ); -#endif - return( 1 ); - } - - prv = cur; - cur = cur->next; - } - - return( 0 ); -} - -static void *buffer_alloc_calloc( size_t n, size_t size ) -{ - memory_header *new, *cur = heap.first_free; - unsigned char *p; - void *ret; - size_t original_len, len; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - void *trace_buffer[MAX_BT]; - size_t trace_cnt; -#endif - - if( heap.buf == NULL || heap.first == NULL ) - return( NULL ); - - original_len = len = n * size; - - if( n != 0 && len / n != size ) - return( NULL ); - - if( len % MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - len -= len % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - len += MBEDTLS_MEMORY_ALIGN_MULTIPLE; - } - - // Find block that fits - // - while( cur != NULL ) - { - if( cur->size >= len ) - break; - - cur = cur->next_free; - } - - if( cur == NULL ) - return( NULL ); - - if( cur->alloc != 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: block in free_list but allocated " - "data\n" ); -#endif - mbedtls_exit( 1 ); - } - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.alloc_count++; -#endif - - // Found location, split block if > memory_header + 4 room left - // - if( cur->size - len < sizeof(memory_header) + - MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - cur->alloc = 1; - - // Remove from free_list - // - if( cur->prev_free != NULL ) - cur->prev_free->next_free = cur->next_free; - else - heap.first_free = cur->next_free; - - if( cur->next_free != NULL ) - cur->next_free->prev_free = cur->prev_free; - - cur->prev_free = NULL; - cur->next_free = NULL; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.total_used += cur->size; - if( heap.total_used > heap.maximum_used ) - heap.maximum_used = heap.total_used; -#endif -#if defined(MBEDTLS_MEMORY_BACKTRACE) - trace_cnt = backtrace( trace_buffer, MAX_BT ); - cur->trace = backtrace_symbols( trace_buffer, trace_cnt ); - cur->trace_count = trace_cnt; -#endif - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_ALLOC ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); - - ret = (unsigned char *) cur + sizeof( memory_header ); - memset( ret, 0, original_len ); - - return( ret ); - } - - p = ( (unsigned char *) cur ) + sizeof(memory_header) + len; - new = (memory_header *) p; - - new->size = cur->size - len - sizeof(memory_header); - new->alloc = 0; - new->prev = cur; - new->next = cur->next; -#if defined(MBEDTLS_MEMORY_BACKTRACE) - new->trace = NULL; - new->trace_count = 0; -#endif - new->magic1 = MAGIC1; - new->magic2 = MAGIC2; - - if( new->next != NULL ) - new->next->prev = new; - - // Replace cur with new in free_list - // - new->prev_free = cur->prev_free; - new->next_free = cur->next_free; - if( new->prev_free != NULL ) - new->prev_free->next_free = new; - else - heap.first_free = new; - - if( new->next_free != NULL ) - new->next_free->prev_free = new; - - cur->alloc = 1; - cur->size = len; - cur->next = new; - cur->prev_free = NULL; - cur->next_free = NULL; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count++; - if( heap.header_count > heap.maximum_header_count ) - heap.maximum_header_count = heap.header_count; - heap.total_used += cur->size; - if( heap.total_used > heap.maximum_used ) - heap.maximum_used = heap.total_used; -#endif -#if defined(MBEDTLS_MEMORY_BACKTRACE) - trace_cnt = backtrace( trace_buffer, MAX_BT ); - cur->trace = backtrace_symbols( trace_buffer, trace_cnt ); - cur->trace_count = trace_cnt; -#endif - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_ALLOC ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); - - ret = (unsigned char *) cur + sizeof( memory_header ); - memset( ret, 0, original_len ); - - return( ret ); -} - -static void buffer_alloc_free( void *ptr ) -{ - memory_header *hdr, *old = NULL; - unsigned char *p = (unsigned char *) ptr; - - if( ptr == NULL || heap.buf == NULL || heap.first == NULL ) - return; - - if( p < heap.buf || p > heap.buf + heap.len ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: mbedtls_free() outside of managed " - "space\n" ); -#endif - mbedtls_exit( 1 ); - } - - p -= sizeof(memory_header); - hdr = (memory_header *) p; - - if( verify_header( hdr ) != 0 ) - mbedtls_exit( 1 ); - - if( hdr->alloc != 1 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - mbedtls_fprintf( stderr, "FATAL: mbedtls_free() on unallocated " - "data\n" ); -#endif - mbedtls_exit( 1 ); - } - - hdr->alloc = 0; - -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.free_count++; - heap.total_used -= hdr->size; -#endif - -#if defined(MBEDTLS_MEMORY_BACKTRACE) - free( hdr->trace ); - hdr->trace = NULL; - hdr->trace_count = 0; -#endif - - // Regroup with block before - // - if( hdr->prev != NULL && hdr->prev->alloc == 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count--; -#endif - hdr->prev->size += sizeof(memory_header) + hdr->size; - hdr->prev->next = hdr->next; - old = hdr; - hdr = hdr->prev; - - if( hdr->next != NULL ) - hdr->next->prev = hdr; - - memset( old, 0, sizeof(memory_header) ); - } - - // Regroup with block after - // - if( hdr->next != NULL && hdr->next->alloc == 0 ) - { -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.header_count--; -#endif - hdr->size += sizeof(memory_header) + hdr->next->size; - old = hdr->next; - hdr->next = hdr->next->next; - - if( hdr->prev_free != NULL || hdr->next_free != NULL ) - { - if( hdr->prev_free != NULL ) - hdr->prev_free->next_free = hdr->next_free; - else - heap.first_free = hdr->next_free; - - if( hdr->next_free != NULL ) - hdr->next_free->prev_free = hdr->prev_free; - } - - hdr->prev_free = old->prev_free; - hdr->next_free = old->next_free; - - if( hdr->prev_free != NULL ) - hdr->prev_free->next_free = hdr; - else - heap.first_free = hdr; - - if( hdr->next_free != NULL ) - hdr->next_free->prev_free = hdr; - - if( hdr->next != NULL ) - hdr->next->prev = hdr; - - memset( old, 0, sizeof(memory_header) ); - } - - // Prepend to free_list if we have not merged - // (Does not have to stay in same order as prev / next list) - // - if( old == NULL ) - { - hdr->next_free = heap.first_free; - if( heap.first_free != NULL ) - heap.first_free->prev_free = hdr; - heap.first_free = hdr; - } - - if( ( heap.verify & MBEDTLS_MEMORY_VERIFY_FREE ) && verify_chain() != 0 ) - mbedtls_exit( 1 ); -} - -void mbedtls_memory_buffer_set_verify( int verify ) -{ - heap.verify = verify; -} - -int mbedtls_memory_buffer_alloc_verify() -{ - return verify_chain(); -} - -#if defined(MBEDTLS_MEMORY_DEBUG) -void mbedtls_memory_buffer_alloc_status() -{ - mbedtls_fprintf( stderr, - "Current use: %zu blocks / %zu bytes, max: %zu blocks / " - "%zu bytes (total %zu bytes), alloc / free: %zu / %zu\n", - heap.header_count, heap.total_used, - heap.maximum_header_count, heap.maximum_used, - heap.maximum_header_count * sizeof( memory_header ) - + heap.maximum_used, - heap.alloc_count, heap.free_count ); - - if( heap.first->next == NULL ) - mbedtls_fprintf( stderr, "All memory de-allocated in stack buffer\n" ); - else - { - mbedtls_fprintf( stderr, "Memory currently allocated:\n" ); - debug_chain(); - } -} - -void mbedtls_memory_buffer_alloc_max_get( size_t *max_used, size_t *max_blocks ) -{ - *max_used = heap.maximum_used; - *max_blocks = heap.maximum_header_count; -} - -void mbedtls_memory_buffer_alloc_max_reset( void ) -{ - heap.maximum_used = 0; - heap.maximum_header_count = 0; -} - -void mbedtls_memory_buffer_alloc_cur_get( size_t *cur_used, size_t *cur_blocks ) -{ - *cur_used = heap.total_used; - *cur_blocks = heap.header_count; -} -#endif /* MBEDTLS_MEMORY_DEBUG */ - -#if defined(MBEDTLS_THREADING_C) -static void *buffer_alloc_calloc_mutexed( size_t n, size_t size ) -{ - void *buf; - if( mbedtls_mutex_lock( &heap.mutex ) != 0 ) - return( NULL ); - buf = buffer_alloc_calloc( n, size ); - if( mbedtls_mutex_unlock( &heap.mutex ) ) - return( NULL ); - return( buf ); -} - -static void buffer_alloc_free_mutexed( void *ptr ) -{ - /* We have to good option here, but corrupting the heap seems - * worse than loosing memory. */ - if( mbedtls_mutex_lock( &heap.mutex ) ) - return; - buffer_alloc_free( ptr ); - (void) mbedtls_mutex_unlock( &heap.mutex ); -} -#endif /* MBEDTLS_THREADING_C */ - -void mbedtls_memory_buffer_alloc_init( unsigned char *buf, size_t len ) -{ - memset( &heap, 0, sizeof(buffer_alloc_ctx) ); - memset( buf, 0, len ); - -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_init( &heap.mutex ); - mbedtls_platform_set_calloc_free( buffer_alloc_calloc_mutexed, - buffer_alloc_free_mutexed ); -#else - mbedtls_platform_set_calloc_free( buffer_alloc_calloc, buffer_alloc_free ); -#endif - - if( (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE ) - { - /* Adjust len first since buf is used in the computation */ - len -= MBEDTLS_MEMORY_ALIGN_MULTIPLE - - (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - buf += MBEDTLS_MEMORY_ALIGN_MULTIPLE - - (size_t) buf % MBEDTLS_MEMORY_ALIGN_MULTIPLE; - } - - heap.buf = buf; - heap.len = len; - - heap.first = (memory_header *) buf; - heap.first->size = len - sizeof(memory_header); - heap.first->magic1 = MAGIC1; - heap.first->magic2 = MAGIC2; - heap.first_free = heap.first; -} - -void mbedtls_memory_buffer_alloc_free() -{ -#if defined(MBEDTLS_THREADING_C) - mbedtls_mutex_free( &heap.mutex ); -#endif - mbedtls_zeroize( &heap, sizeof(buffer_alloc_ctx) ); -} - -#if defined(MBEDTLS_SELF_TEST) -static int check_pointer( void *p ) -{ - if( p == NULL ) - return( -1 ); - - if( (size_t) p % MBEDTLS_MEMORY_ALIGN_MULTIPLE != 0 ) - return( -1 ); - - return( 0 ); -} - -static int check_all_free( ) -{ - if( -#if defined(MBEDTLS_MEMORY_DEBUG) - heap.total_used != 0 || -#endif - heap.first != heap.first_free || - (void *) heap.first != (void *) heap.buf ) - { - return( -1 ); - } - - return( 0 ); -} - -#define TEST_ASSERT( condition ) \ - if( ! (condition) ) \ - { \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - \ - ret = 1; \ - goto cleanup; \ - } - -int mbedtls_memory_buffer_alloc_self_test( int verbose ) -{ - unsigned char buf[1024]; - unsigned char *p, *q, *r, *end; - int ret = 0; - - if( verbose != 0 ) - mbedtls_printf( " MBA test #1 (basic alloc-free cycle): " ); - - mbedtls_memory_buffer_alloc_init( buf, sizeof( buf ) ); - - p = mbedtls_calloc( 1, 1 ); - q = mbedtls_calloc( 1, 128 ); - r = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && - check_pointer( q ) == 0 && - check_pointer( r ) == 0 ); - - mbedtls_free( r ); - mbedtls_free( q ); - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - /* Memorize end to compare with the next test */ - end = heap.buf + heap.len; - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MBA test #2 (buf not aligned): " ); - - mbedtls_memory_buffer_alloc_init( buf + 1, sizeof( buf ) - 1 ); - - TEST_ASSERT( heap.buf + heap.len == end ); - - p = mbedtls_calloc( 1, 1 ); - q = mbedtls_calloc( 1, 128 ); - r = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && - check_pointer( q ) == 0 && - check_pointer( r ) == 0 ); - - mbedtls_free( r ); - mbedtls_free( q ); - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " MBA test #3 (full): " ); - - mbedtls_memory_buffer_alloc_init( buf, sizeof( buf ) ); - - p = mbedtls_calloc( 1, sizeof( buf ) - sizeof( memory_header ) ); - - TEST_ASSERT( check_pointer( p ) == 0 ); - TEST_ASSERT( mbedtls_calloc( 1, 1 ) == NULL ); - - mbedtls_free( p ); - - p = mbedtls_calloc( 1, sizeof( buf ) - 2 * sizeof( memory_header ) - 16 ); - q = mbedtls_calloc( 1, 16 ); - - TEST_ASSERT( check_pointer( p ) == 0 && check_pointer( q ) == 0 ); - TEST_ASSERT( mbedtls_calloc( 1, 1 ) == NULL ); - - mbedtls_free( q ); - - TEST_ASSERT( mbedtls_calloc( 1, 17 ) == NULL ); - - mbedtls_free( p ); - - TEST_ASSERT( check_all_free( ) == 0 ); - - mbedtls_memory_buffer_alloc_free( ); - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -cleanup: - mbedtls_memory_buffer_alloc_free( ); - - return( ret ); -} -#endif /* MBEDTLS_SELF_TEST */ - -#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ diff --git a/deps/mbedtls/net_sockets.c b/deps/mbedtls/net_sockets.c index f8ae7f6d32..8818f13116 100644 --- a/deps/mbedtls/net_sockets.c +++ b/deps/mbedtls/net_sockets.c @@ -36,16 +36,11 @@ #error "This module only works on Unix and Windows, see MBEDTLS_NET_C in config.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#endif +#include #include "mbedtls/net_sockets.h" -#include - #if (defined(_WIN32) || defined(_WIN32_WCE)) && !defined(EFIX64) && \ !defined(EFI32) @@ -319,9 +314,11 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx, int type_len = (int) sizeof( type ); #endif + client_addr.ss_family = 0; + /* Is this a TCP or UDP socket? */ if( getsockopt( bind_ctx->fd, SOL_SOCKET, SO_TYPE, - (void *) &type, &type_len ) != 0 || + (char *) &type, &type_len ) != 0 || ( type != SOCK_STREAM && type != SOCK_DGRAM ) ) { return( MBEDTLS_ERR_NET_ACCEPT_FAILED ); @@ -363,16 +360,18 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx, * then bind a new socket to accept new connections */ if( type != SOCK_STREAM ) { - struct sockaddr_storage local_addr; int one = 1; + struct sockaddr_storage local_addr; + + local_addr.ss_family = 0; if( connect( bind_ctx->fd, (struct sockaddr *) &client_addr, n ) != 0 ) return( MBEDTLS_ERR_NET_ACCEPT_FAILED ); - client_ctx->fd = bind_ctx->fd; - bind_ctx->fd = -1; /* In case we exit early */ + client_ctx->fd = bind_ctx->fd; + bind_ctx->fd = -1; /* In case we exit early */ - n = sizeof( struct sockaddr_storage ); + n = sizeof( struct sockaddr_storage ); if( getsockname( client_ctx->fd, (struct sockaddr *) &local_addr, &n ) != 0 || ( bind_ctx->fd = (int) socket( local_addr.ss_family, @@ -484,7 +483,7 @@ int mbedtls_net_recv( void *ctx, unsigned char *buf, size_t len ) if( ret < 0 ) { - if( net_would_block( ctx ) != 0 ) + if( net_would_block((const mbedtls_net_context*)ctx ) != 0 ) return( MBEDTLS_ERR_SSL_WANT_READ ); #if ( defined(_WIN32) || defined(_WIN32_WCE) ) && !defined(EFIX64) && \ diff --git a/deps/mbedtls/oid.c b/deps/mbedtls/oid.c index f13826ed74..2b4d733202 100644 --- a/deps/mbedtls/oid.c +++ b/deps/mbedtls/oid.c @@ -35,12 +35,6 @@ #include #include -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_snprintf snprintf -#endif - #if defined(MBEDTLS_X509_USE_C) || defined(MBEDTLS_X509_CREATE_C) #include "mbedtls/x509.h" #endif @@ -315,18 +309,6 @@ typedef struct { static const oid_sig_alg_t oid_sig_alg[] = { #if defined(MBEDTLS_RSA_C) -#if defined(MBEDTLS_MD2_C) - { - { ADD_LEN( MBEDTLS_OID_PKCS1_MD2 ), "md2WithRSAEncryption", "RSA with MD2" }, - MBEDTLS_MD_MD2, MBEDTLS_PK_RSA, - }, -#endif /* MBEDTLS_MD2_C */ -#if defined(MBEDTLS_MD4_C) - { - { ADD_LEN( MBEDTLS_OID_PKCS1_MD4 ), "md4WithRSAEncryption", "RSA with MD4" }, - MBEDTLS_MD_MD4, MBEDTLS_PK_RSA, - }, -#endif /* MBEDTLS_MD4_C */ #if defined(MBEDTLS_MD5_C) { { ADD_LEN( MBEDTLS_OID_PKCS1_MD5 ), "md5WithRSAEncryption", "RSA with MD5" }, @@ -572,18 +554,6 @@ typedef struct { static const oid_md_alg_t oid_md_alg[] = { -#if defined(MBEDTLS_MD2_C) - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD2 ), "id-md2", "MD2" }, - MBEDTLS_MD_MD2, - }, -#endif /* MBEDTLS_MD2_C */ -#if defined(MBEDTLS_MD4_C) - { - { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD4 ), "id-md4", "MD4" }, - MBEDTLS_MD_MD4, - }, -#endif /* MBEDTLS_MD4_C */ #if defined(MBEDTLS_MD5_C) { { ADD_LEN( MBEDTLS_OID_DIGEST_ALG_MD5 ), "id-md5", "MD5" }, @@ -681,7 +651,7 @@ int mbedtls_oid_get_numeric_string( char *buf, size_t size, /* First byte contains first two dots */ if( oid->len > 0 ) { - ret = mbedtls_snprintf( p, n, "%d.%d", oid->p[0] / 40, oid->p[0] % 40 ); + ret = snprintf( p, n, "%d.%d", oid->p[0] / 40, oid->p[0] % 40 ); OID_SAFE_SNPRINTF; } @@ -698,7 +668,7 @@ int mbedtls_oid_get_numeric_string( char *buf, size_t size, if( !( oid->p[i] & 0x80 ) ) { /* Last byte */ - ret = mbedtls_snprintf( p, n, ".%d", value ); + ret = snprintf( p, n, ".%d", value ); OID_SAFE_SNPRINTF; value = 0; } diff --git a/deps/mbedtls/pem.c b/deps/mbedtls/pem.c index 2995d7fd70..70ce7887ac 100644 --- a/deps/mbedtls/pem.c +++ b/deps/mbedtls/pem.c @@ -34,15 +34,8 @@ #include "mbedtls/md5.h" #include "mbedtls/cipher.h" -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #if defined(MBEDTLS_PEM_PARSE_C) #include "arc4_alt.h" @@ -323,12 +316,12 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const if( ret == MBEDTLS_ERR_BASE64_INVALID_CHARACTER ) return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); - if( ( buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL ) + if( ( buf = (unsigned char*)calloc( 1, len ) ) == NULL ) return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); if( ( ret = mbedtls_base64_decode( buf, len, &len, s1, s2 - s1 ) ) != 0 ) { - mbedtls_free( buf ); + free( buf ); return( MBEDTLS_ERR_PEM_INVALID_DATA + ret ); } @@ -338,7 +331,7 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const ( defined(MBEDTLS_DES_C) || defined(MBEDTLS_AES_C) ) if( pwd == NULL ) { - mbedtls_free( buf ); + free( buf ); return( MBEDTLS_ERR_PEM_PASSWORD_REQUIRED ); } @@ -366,11 +359,11 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const */ if( len <= 2 || buf[0] != 0x30 || buf[1] > 0x83 ) { - mbedtls_free( buf ); + free( buf ); return( MBEDTLS_ERR_PEM_PASSWORD_MISMATCH ); } #else - mbedtls_free( buf ); + free( buf ); return( MBEDTLS_ERR_PEM_FEATURE_UNAVAILABLE ); #endif /* MBEDTLS_MD5_C && MBEDTLS_CIPHER_MODE_CBC && ( MBEDTLS_AES_C || MBEDTLS_DES_C ) */ @@ -384,8 +377,8 @@ int mbedtls_pem_read_buffer( mbedtls_pem_context *ctx, const char *header, const void mbedtls_pem_free( mbedtls_pem_context *ctx ) { - mbedtls_free( ctx->buf ); - mbedtls_free( ctx->info ); + free( ctx->buf ); + free( ctx->info ); mbedtls_zeroize( ctx, sizeof( mbedtls_pem_context ) ); } @@ -409,13 +402,13 @@ int mbedtls_pem_write_buffer( const char *header, const char *footer, return( MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL ); } - if( ( encode_buf = (unsigned char*)mbedtls_calloc( 1, use_len ) ) == NULL ) + if( ( encode_buf = (unsigned char*)calloc( 1, use_len ) ) == NULL ) return( MBEDTLS_ERR_PEM_ALLOC_FAILED ); if( ( ret = mbedtls_base64_encode( encode_buf, use_len, &use_len, der_data, der_len ) ) != 0 ) { - mbedtls_free( encode_buf ); + free( encode_buf ); return( ret ); } @@ -439,7 +432,7 @@ int mbedtls_pem_write_buffer( const char *header, const char *footer, *p++ = '\0'; *olen = p - buf; - mbedtls_free( encode_buf ); + free( encode_buf ); return( 0 ); } #endif /* MBEDTLS_PEM_WRITE_C */ diff --git a/deps/mbedtls/pk_wrap.c b/deps/mbedtls/pk_wrap.c index 382bbb46d8..e92bae0ac1 100644 --- a/deps/mbedtls/pk_wrap.c +++ b/deps/mbedtls/pk_wrap.c @@ -42,14 +42,7 @@ #include "mbedtls/ecdsa.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - #include #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) @@ -143,7 +136,7 @@ static int rsa_check_pair_wrap( const void *pub, const void *prv ) static void *rsa_alloc_wrap( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_rsa_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_rsa_context ) ); if( ctx != NULL ) mbedtls_rsa_init( (mbedtls_rsa_context *) ctx, 0, 0 ); @@ -154,7 +147,7 @@ static void *rsa_alloc_wrap( void ) static void rsa_free_wrap( void *ctx ) { mbedtls_rsa_free( (mbedtls_rsa_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void rsa_debug( const void *ctx, mbedtls_pk_debug_item *items ) @@ -222,7 +215,8 @@ static int eckey_verify_wrap( void *ctx, mbedtls_md_type_t md_alg, mbedtls_ecdsa_init( &ecdsa ); - if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 ) + if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, + (const mbedtls_ecp_keypair*)ctx ) ) == 0 ) ret = ecdsa_verify_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len ); mbedtls_ecdsa_free( &ecdsa ); @@ -240,7 +234,8 @@ static int eckey_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, mbedtls_ecdsa_init( &ecdsa ); - if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, ctx ) ) == 0 ) + if( ( ret = mbedtls_ecdsa_from_keypair( &ecdsa, + (const mbedtls_ecp_keypair*)ctx ) ) == 0 ) ret = ecdsa_sign_wrap( &ecdsa, md_alg, hash, hash_len, sig, sig_len, f_rng, p_rng ); @@ -259,10 +254,10 @@ static int eckey_check_pair( const void *pub, const void *prv ) static void *eckey_alloc_wrap( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecp_keypair ) ); + void *ctx = calloc( 1, sizeof( mbedtls_ecp_keypair ) ); if( ctx != NULL ) - mbedtls_ecp_keypair_init( ctx ); + mbedtls_ecp_keypair_init((mbedtls_ecp_keypair*)ctx); return( ctx ); } @@ -270,7 +265,7 @@ static void *eckey_alloc_wrap( void ) static void eckey_free_wrap( void *ctx ) { mbedtls_ecp_keypair_free( (mbedtls_ecp_keypair *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } static void eckey_debug( const void *ctx, mbedtls_pk_debug_item *items ) @@ -358,7 +353,7 @@ static int ecdsa_sign_wrap( void *ctx, mbedtls_md_type_t md_alg, static void *ecdsa_alloc_wrap( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_ecdsa_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_ecdsa_context ) ); if( ctx != NULL ) mbedtls_ecdsa_init( (mbedtls_ecdsa_context *) ctx ); @@ -369,7 +364,7 @@ static void *ecdsa_alloc_wrap( void ) static void ecdsa_free_wrap( void *ctx ) { mbedtls_ecdsa_free( (mbedtls_ecdsa_context *) ctx ); - mbedtls_free( ctx ); + free( ctx ); } const mbedtls_pk_info_t mbedtls_ecdsa_info = { @@ -472,7 +467,7 @@ static int rsa_alt_check_pair( const void *pub, const void *prv ) static void *rsa_alt_alloc_wrap( void ) { - void *ctx = mbedtls_calloc( 1, sizeof( mbedtls_rsa_alt_context ) ); + void *ctx = calloc( 1, sizeof( mbedtls_rsa_alt_context ) ); if( ctx != NULL ) memset( ctx, 0, sizeof( mbedtls_rsa_alt_context ) ); @@ -483,7 +478,7 @@ static void *rsa_alt_alloc_wrap( void ) static void rsa_alt_free_wrap( void *ctx ) { mbedtls_zeroize( ctx, sizeof( mbedtls_rsa_alt_context ) ); - mbedtls_free( ctx ); + free( ctx ); } const mbedtls_pk_info_t mbedtls_rsa_alt_info = { diff --git a/deps/mbedtls/pkcs11.c b/deps/mbedtls/pkcs11.c deleted file mode 100644 index 0ea64252ee..0000000000 --- a/deps/mbedtls/pkcs11.c +++ /dev/null @@ -1,240 +0,0 @@ -/** - * \file pkcs11.c - * - * \brief Wrapper for PKCS#11 library libpkcs11-helper - * - * \author Adriaan de Jong - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#include "mbedtls/pkcs11.h" - -#if defined(MBEDTLS_PKCS11_C) - -#include "mbedtls/md.h" -#include "mbedtls/oid.h" -#include "mbedtls/x509_crt.h" - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - -#include - -void mbedtls_pkcs11_init( mbedtls_pkcs11_context *ctx ) -{ - memset( ctx, 0, sizeof( mbedtls_pkcs11_context ) ); -} - -int mbedtls_pkcs11_x509_cert_bind( mbedtls_x509_crt *cert, pkcs11h_certificate_t pkcs11_cert ) -{ - int ret = 1; - unsigned char *cert_blob = NULL; - size_t cert_blob_size = 0; - - if( cert == NULL ) - { - ret = 2; - goto cleanup; - } - - if( pkcs11h_certificate_getCertificateBlob( pkcs11_cert, NULL, - &cert_blob_size ) != CKR_OK ) - { - ret = 3; - goto cleanup; - } - - cert_blob = mbedtls_calloc( 1, cert_blob_size ); - if( NULL == cert_blob ) - { - ret = 4; - goto cleanup; - } - - if( pkcs11h_certificate_getCertificateBlob( pkcs11_cert, cert_blob, - &cert_blob_size ) != CKR_OK ) - { - ret = 5; - goto cleanup; - } - - if( 0 != mbedtls_x509_crt_parse( cert, cert_blob, cert_blob_size ) ) - { - ret = 6; - goto cleanup; - } - - ret = 0; - -cleanup: - if( NULL != cert_blob ) - mbedtls_free( cert_blob ); - - return( ret ); -} - - -int mbedtls_pkcs11_priv_key_bind( mbedtls_pkcs11_context *priv_key, - pkcs11h_certificate_t pkcs11_cert ) -{ - int ret = 1; - mbedtls_x509_crt cert; - - mbedtls_x509_crt_init( &cert ); - - if( priv_key == NULL ) - goto cleanup; - - if( 0 != mbedtls_pkcs11_x509_cert_bind( &cert, pkcs11_cert ) ) - goto cleanup; - - priv_key->len = mbedtls_pk_get_len( &cert.pk ); - priv_key->pkcs11h_cert = pkcs11_cert; - - ret = 0; - -cleanup: - mbedtls_x509_crt_free( &cert ); - - return( ret ); -} - -void mbedtls_pkcs11_priv_key_free( mbedtls_pkcs11_context *priv_key ) -{ - if( NULL != priv_key ) - pkcs11h_certificate_freeCertificate( priv_key->pkcs11h_cert ); -} - -int mbedtls_pkcs11_decrypt( mbedtls_pkcs11_context *ctx, - int mode, size_t *olen, - const unsigned char *input, - unsigned char *output, - size_t output_max_len ) -{ - size_t input_len, output_len; - - if( NULL == ctx ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( MBEDTLS_RSA_PRIVATE != mode ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - output_len = input_len = ctx->len; - - if( input_len < 16 || input_len > output_max_len ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - /* Determine size of output buffer */ - if( pkcs11h_certificate_decryptAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, input, - input_len, NULL, &output_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - if( output_len > output_max_len ) - return( MBEDTLS_ERR_RSA_OUTPUT_TOO_LARGE ); - - if( pkcs11h_certificate_decryptAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, input, - input_len, output, &output_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - *olen = output_len; - return( 0 ); -} - -int mbedtls_pkcs11_sign( mbedtls_pkcs11_context *ctx, - int mode, - mbedtls_md_type_t md_alg, - unsigned int hashlen, - const unsigned char *hash, - unsigned char *sig ) -{ - size_t sig_len = 0, asn_len = 0, oid_size = 0; - unsigned char *p = sig; - const char *oid; - - if( NULL == ctx ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( MBEDTLS_RSA_PRIVATE != mode ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( md_alg != MBEDTLS_MD_NONE ) - { - const mbedtls_md_info_t *md_info = mbedtls_md_info_from_type( md_alg ); - if( md_info == NULL ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - if( mbedtls_oid_get_oid_by_md( md_alg, &oid, &oid_size ) != 0 ) - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - - hashlen = mbedtls_md_get_size( md_info ); - asn_len = 10 + oid_size; - } - - sig_len = ctx->len; - if( hashlen > sig_len || asn_len > sig_len || - hashlen + asn_len > sig_len ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - if( md_alg != MBEDTLS_MD_NONE ) - { - /* - * DigestInfo ::= SEQUENCE { - * digestAlgorithm DigestAlgorithmIdentifier, - * digest Digest } - * - * DigestAlgorithmIdentifier ::= AlgorithmIdentifier - * - * Digest ::= OCTET STRING - */ - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x08 + oid_size + hashlen ); - *p++ = MBEDTLS_ASN1_SEQUENCE | MBEDTLS_ASN1_CONSTRUCTED; - *p++ = (unsigned char) ( 0x04 + oid_size ); - *p++ = MBEDTLS_ASN1_OID; - *p++ = oid_size & 0xFF; - memcpy( p, oid, oid_size ); - p += oid_size; - *p++ = MBEDTLS_ASN1_NULL; - *p++ = 0x00; - *p++ = MBEDTLS_ASN1_OCTET_STRING; - *p++ = hashlen; - } - - memcpy( p, hash, hashlen ); - - if( pkcs11h_certificate_signAny( ctx->pkcs11h_cert, CKM_RSA_PKCS, sig, - asn_len + hashlen, sig, &sig_len ) != CKR_OK ) - { - return( MBEDTLS_ERR_RSA_BAD_INPUT_DATA ); - } - - return( 0 ); -} - -#endif /* defined(MBEDTLS_PKCS11_C) */ diff --git a/deps/mbedtls/pkcs5.c b/deps/mbedtls/pkcs5.c index 2d3aea40b0..c4f6df4f08 100644 --- a/deps/mbedtls/pkcs5.c +++ b/deps/mbedtls/pkcs5.c @@ -42,14 +42,8 @@ #include "mbedtls/cipher.h" #include "mbedtls/oid.h" -#include - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_printf printf -#endif +#include static int pkcs5_parse_pbkdf2_params( const mbedtls_asn1_buf *params, mbedtls_asn1_buf *salt, int *iterations, @@ -281,122 +275,4 @@ int mbedtls_pkcs5_pbkdf2_hmac( mbedtls_md_context_t *ctx, const unsigned char *p return( 0 ); } -#if defined(MBEDTLS_SELF_TEST) - -#if !defined(MBEDTLS_SHA1_C) -int mbedtls_pkcs5_self_test( int verbose ) -{ - if( verbose != 0 ) - mbedtls_printf( " PBKDF2 (SHA1): skipped\n\n" ); - - return( 0 ); -} -#else - -#define MAX_TESTS 6 - -static const size_t plen[MAX_TESTS] = - { 8, 8, 8, 24, 9 }; - -static const unsigned char password[MAX_TESTS][32] = -{ - "password", - "password", - "password", - "passwordPASSWORDpassword", - "pass\0word", -}; - -static const size_t slen[MAX_TESTS] = - { 4, 4, 4, 36, 5 }; - -static const unsigned char salt[MAX_TESTS][40] = -{ - "salt", - "salt", - "salt", - "saltSALTsaltSALTsaltSALTsaltSALTsalt", - "sa\0lt", -}; - -static const uint32_t it_cnt[MAX_TESTS] = - { 1, 2, 4096, 4096, 4096 }; - -static const uint32_t key_len[MAX_TESTS] = - { 20, 20, 20, 25, 16 }; - -static const unsigned char result_key[MAX_TESTS][32] = -{ - { 0x0c, 0x60, 0xc8, 0x0f, 0x96, 0x1f, 0x0e, 0x71, - 0xf3, 0xa9, 0xb5, 0x24, 0xaf, 0x60, 0x12, 0x06, - 0x2f, 0xe0, 0x37, 0xa6 }, - { 0xea, 0x6c, 0x01, 0x4d, 0xc7, 0x2d, 0x6f, 0x8c, - 0xcd, 0x1e, 0xd9, 0x2a, 0xce, 0x1d, 0x41, 0xf0, - 0xd8, 0xde, 0x89, 0x57 }, - { 0x4b, 0x00, 0x79, 0x01, 0xb7, 0x65, 0x48, 0x9a, - 0xbe, 0xad, 0x49, 0xd9, 0x26, 0xf7, 0x21, 0xd0, - 0x65, 0xa4, 0x29, 0xc1 }, - { 0x3d, 0x2e, 0xec, 0x4f, 0xe4, 0x1c, 0x84, 0x9b, - 0x80, 0xc8, 0xd8, 0x36, 0x62, 0xc0, 0xe4, 0x4a, - 0x8b, 0x29, 0x1a, 0x96, 0x4c, 0xf2, 0xf0, 0x70, - 0x38 }, - { 0x56, 0xfa, 0x6a, 0xa7, 0x55, 0x48, 0x09, 0x9d, - 0xcc, 0x37, 0xd7, 0xf0, 0x34, 0x25, 0xe0, 0xc3 }, -}; - -int mbedtls_pkcs5_self_test( int verbose ) -{ - mbedtls_md_context_t sha1_ctx; - const mbedtls_md_info_t *info_sha1; - int ret, i; - unsigned char key[64]; - - mbedtls_md_init( &sha1_ctx ); - - info_sha1 = mbedtls_md_info_from_type( MBEDTLS_MD_SHA1 ); - if( info_sha1 == NULL ) - { - ret = 1; - goto exit; - } - - if( ( ret = mbedtls_md_setup( &sha1_ctx, info_sha1, 1 ) ) != 0 ) - { - ret = 1; - goto exit; - } - - for( i = 0; i < MAX_TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " PBKDF2 (SHA1) #%d: ", i ); - - ret = mbedtls_pkcs5_pbkdf2_hmac( &sha1_ctx, password[i], plen[i], salt[i], - slen[i], it_cnt[i], key_len[i], key ); - if( ret != 0 || - memcmp( result_key[i], key, key_len[i] ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_md_free( &sha1_ctx ); - - return( ret ); -} -#endif /* MBEDTLS_SHA1_C */ - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_PKCS5_C */ diff --git a/deps/mbedtls/pkparse.c b/deps/mbedtls/pkparse.c index 99d5c45ea1..dae2e1efdf 100644 --- a/deps/mbedtls/pkparse.c +++ b/deps/mbedtls/pkparse.c @@ -52,13 +52,7 @@ #include "mbedtls/pkcs12.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #if defined(MBEDTLS_FS_IO) #include "arc4_alt.h" @@ -89,7 +83,7 @@ int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n ) *n = (size_t) size; if( *n + 1 == 0 || - ( *buf = mbedtls_calloc( 1, *n + 1 ) ) == NULL ) + ( *buf = (unsigned char*)calloc( 1, *n + 1 ) ) == NULL ) { fclose( f ); return( MBEDTLS_ERR_PK_ALLOC_FAILED ); @@ -98,7 +92,7 @@ int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n ) if( fread( *buf, 1, *n, f ) != *n ) { fclose( f ); - mbedtls_free( *buf ); + free( *buf ); return( MBEDTLS_ERR_PK_FILE_IO_ERROR ); } @@ -132,7 +126,7 @@ int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx, (const unsigned char *) pwd, strlen( pwd ) ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } @@ -152,7 +146,7 @@ int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path ) ret = mbedtls_pk_parse_public_key( ctx, buf, n ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } diff --git a/deps/mbedtls/pkwrite.c b/deps/mbedtls/pkwrite.c index 83b798c119..efbc323176 100644 --- a/deps/mbedtls/pkwrite.c +++ b/deps/mbedtls/pkwrite.c @@ -46,13 +46,7 @@ #include "mbedtls/pem.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #if defined(MBEDTLS_RSA_C) /* diff --git a/deps/mbedtls/platform.c b/deps/mbedtls/platform.c deleted file mode 100644 index af3b2f15ec..0000000000 --- a/deps/mbedtls/platform.c +++ /dev/null @@ -1,327 +0,0 @@ -/* - * Platform abstraction layer - * - * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_PLATFORM_C) - -#include "mbedtls/platform.h" - -#if defined(MBEDTLS_PLATFORM_MEMORY) -#if !defined(MBEDTLS_PLATFORM_STD_CALLOC) -static void *platform_calloc_uninit( size_t n, size_t size ) -{ - ((void) n); - ((void) size); - return( NULL ); -} - -#define MBEDTLS_PLATFORM_STD_CALLOC platform_calloc_uninit -#endif /* !MBEDTLS_PLATFORM_STD_CALLOC */ - -#if !defined(MBEDTLS_PLATFORM_STD_FREE) -static void platform_free_uninit( void *ptr ) -{ - ((void) ptr); -} - -#define MBEDTLS_PLATFORM_STD_FREE platform_free_uninit -#endif /* !MBEDTLS_PLATFORM_STD_FREE */ - -void * (*mbedtls_calloc)( size_t, size_t ) = MBEDTLS_PLATFORM_STD_CALLOC; -void (*mbedtls_free)( void * ) = MBEDTLS_PLATFORM_STD_FREE; - -int mbedtls_platform_set_calloc_free( void * (*calloc_func)( size_t, size_t ), - void (*free_func)( void * ) ) -{ - mbedtls_calloc = calloc_func; - mbedtls_free = free_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_MEMORY */ - -#if defined(_WIN32) -#include -int mbedtls_platform_win32_snprintf( char *s, size_t n, const char *fmt, ... ) -{ - int ret; - va_list argp; - - /* Avoid calling the invalid parameter handler by checking ourselves */ - if( s == NULL || n == 0 || fmt == NULL ) - return( -1 ); - - va_start( argp, fmt ); -#if defined(_TRUNCATE) - ret = _vsnprintf_s( s, n, _TRUNCATE, fmt, argp ); -#else - ret = _vsnprintf( s, n, fmt, argp ); - if( ret < 0 || (size_t) ret == n ) - { - s[n-1] = '\0'; - ret = -1; - } -#endif - va_end( argp ); - - return( ret ); -} -#endif - -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_SNPRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_snprintf_uninit( char * s, size_t n, - const char * format, ... ) -{ - ((void) s); - ((void) n); - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_SNPRINTF platform_snprintf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_SNPRINTF */ - -int (*mbedtls_snprintf)( char * s, size_t n, - const char * format, - ... ) = MBEDTLS_PLATFORM_STD_SNPRINTF; - -int mbedtls_platform_set_snprintf( int (*snprintf_func)( char * s, size_t n, - const char * format, - ... ) ) -{ - mbedtls_snprintf = snprintf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_PRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_printf_uninit( const char *format, ... ) -{ - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_PRINTF platform_printf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_PRINTF */ - -int (*mbedtls_printf)( const char *, ... ) = MBEDTLS_PLATFORM_STD_PRINTF; - -int mbedtls_platform_set_printf( int (*printf_func)( const char *, ... ) ) -{ - mbedtls_printf = printf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_FPRINTF) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_fprintf_uninit( FILE *stream, const char *format, ... ) -{ - ((void) stream); - ((void) format); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_FPRINTF platform_fprintf_uninit -#endif /* !MBEDTLS_PLATFORM_STD_FPRINTF */ - -int (*mbedtls_fprintf)( FILE *, const char *, ... ) = - MBEDTLS_PLATFORM_STD_FPRINTF; - -int mbedtls_platform_set_fprintf( int (*fprintf_func)( FILE *, const char *, ... ) ) -{ - mbedtls_fprintf = fprintf_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ - -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_EXIT) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static void platform_exit_uninit( int status ) -{ - ((void) status); -} - -#define MBEDTLS_PLATFORM_STD_EXIT platform_exit_uninit -#endif /* !MBEDTLS_PLATFORM_STD_EXIT */ - -void (*mbedtls_exit)( int status ) = MBEDTLS_PLATFORM_STD_EXIT; - -int mbedtls_platform_set_exit( void (*exit_func)( int status ) ) -{ - mbedtls_exit = exit_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ - -#if defined(MBEDTLS_HAVE_TIME) - -#if defined(MBEDTLS_PLATFORM_TIME_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_TIME) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static mbedtls_time_t platform_time_uninit( mbedtls_time_t* timer ) -{ - ((void) timer); - return( 0 ); -} - -#define MBEDTLS_PLATFORM_STD_TIME platform_time_uninit -#endif /* !MBEDTLS_PLATFORM_STD_TIME */ - -mbedtls_time_t (*mbedtls_time)( mbedtls_time_t* timer ) = MBEDTLS_PLATFORM_STD_TIME; - -int mbedtls_platform_set_time( mbedtls_time_t (*time_func)( mbedtls_time_t* timer ) ) -{ - mbedtls_time = time_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_TIME_ALT */ - -#endif /* MBEDTLS_HAVE_TIME */ - -#if defined(MBEDTLS_ENTROPY_NV_SEED) -#if !defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) && defined(MBEDTLS_FS_IO) -/* Default implementations for the platform independent seed functions use - * standard libc file functions to read from and write to a pre-defined filename - */ -int mbedtls_platform_std_nv_seed_read( unsigned char *buf, size_t buf_len ) -{ - FILE *file; - size_t n; - - if( ( file = fopen( MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "rb" ) ) == NULL ) - return -1; - - if( ( n = fread( buf, 1, buf_len, file ) ) != buf_len ) - { - fclose( file ); - return -1; - } - - fclose( file ); - return( (int)n ); -} - -int mbedtls_platform_std_nv_seed_write( unsigned char *buf, size_t buf_len ) -{ - FILE *file; - size_t n; - - if( ( file = fopen( MBEDTLS_PLATFORM_STD_NV_SEED_FILE, "w" ) ) == NULL ) - return -1; - - if( ( n = fwrite( buf, 1, buf_len, file ) ) != buf_len ) - { - fclose( file ); - return -1; - } - - fclose( file ); - return( (int)n ); -} -#endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ - -#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) -#if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_READ) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_nv_seed_read_uninit( unsigned char *buf, size_t buf_len ) -{ - ((void) buf); - ((void) buf_len); - return( -1 ); -} - -#define MBEDTLS_PLATFORM_STD_NV_SEED_READ platform_nv_seed_read_uninit -#endif /* !MBEDTLS_PLATFORM_STD_NV_SEED_READ */ - -#if !defined(MBEDTLS_PLATFORM_STD_NV_SEED_WRITE) -/* - * Make dummy function to prevent NULL pointer dereferences - */ -static int platform_nv_seed_write_uninit( unsigned char *buf, size_t buf_len ) -{ - ((void) buf); - ((void) buf_len); - return( -1 ); -} - -#define MBEDTLS_PLATFORM_STD_NV_SEED_WRITE platform_nv_seed_write_uninit -#endif /* !MBEDTLS_PLATFORM_STD_NV_SEED_WRITE */ - -int (*mbedtls_nv_seed_read)( unsigned char *buf, size_t buf_len ) = - MBEDTLS_PLATFORM_STD_NV_SEED_READ; -int (*mbedtls_nv_seed_write)( unsigned char *buf, size_t buf_len ) = - MBEDTLS_PLATFORM_STD_NV_SEED_WRITE; - -int mbedtls_platform_set_nv_seed( - int (*nv_seed_read_func)( unsigned char *buf, size_t buf_len ), - int (*nv_seed_write_func)( unsigned char *buf, size_t buf_len ) ) -{ - mbedtls_nv_seed_read = nv_seed_read_func; - mbedtls_nv_seed_write = nv_seed_write_func; - return( 0 ); -} -#endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */ -#endif /* MBEDTLS_ENTROPY_NV_SEED */ - -#if !defined(MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT) -/* - * Placeholder platform setup that does nothing by default - */ -int mbedtls_platform_setup( mbedtls_platform_context *ctx ) -{ - (void)ctx; - - return( 0 ); -} - -/* - * Placeholder platform teardown that does nothing by default - */ -void mbedtls_platform_teardown( mbedtls_platform_context *ctx ) -{ - (void)ctx; -} -#endif /* MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT */ - -#endif /* MBEDTLS_PLATFORM_C */ diff --git a/deps/mbedtls/ripemd160.c b/deps/mbedtls/ripemd160.c index 20080d4fba..1c6a441617 100644 --- a/deps/mbedtls/ripemd160.c +++ b/deps/mbedtls/ripemd160.c @@ -37,15 +37,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - /* * 32-bit integer manipulation macros (little endian) */ @@ -392,83 +383,4 @@ void mbedtls_ripemd160( const unsigned char *input, size_t ilen, mbedtls_ripemd160_free( &ctx ); } -#if defined(MBEDTLS_SELF_TEST) -/* - * Test vectors from the RIPEMD-160 paper and - * http://homes.esat.kuleuven.be/~bosselae/mbedtls_ripemd160.html#HMAC - */ -#define TESTS 8 -#define KEYS 2 -static const char *ripemd160_test_input[TESTS] = -{ - "", - "a", - "abc", - "message digest", - "abcdefghijklmnopqrstuvwxyz", - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "1234567890123456789012345678901234567890" - "1234567890123456789012345678901234567890", -}; - -static const unsigned char ripemd160_test_md[TESTS][20] = -{ - { 0x9c, 0x11, 0x85, 0xa5, 0xc5, 0xe9, 0xfc, 0x54, 0x61, 0x28, - 0x08, 0x97, 0x7e, 0xe8, 0xf5, 0x48, 0xb2, 0x25, 0x8d, 0x31 }, - { 0x0b, 0xdc, 0x9d, 0x2d, 0x25, 0x6b, 0x3e, 0xe9, 0xda, 0xae, - 0x34, 0x7b, 0xe6, 0xf4, 0xdc, 0x83, 0x5a, 0x46, 0x7f, 0xfe }, - { 0x8e, 0xb2, 0x08, 0xf7, 0xe0, 0x5d, 0x98, 0x7a, 0x9b, 0x04, - 0x4a, 0x8e, 0x98, 0xc6, 0xb0, 0x87, 0xf1, 0x5a, 0x0b, 0xfc }, - { 0x5d, 0x06, 0x89, 0xef, 0x49, 0xd2, 0xfa, 0xe5, 0x72, 0xb8, - 0x81, 0xb1, 0x23, 0xa8, 0x5f, 0xfa, 0x21, 0x59, 0x5f, 0x36 }, - { 0xf7, 0x1c, 0x27, 0x10, 0x9c, 0x69, 0x2c, 0x1b, 0x56, 0xbb, - 0xdc, 0xeb, 0x5b, 0x9d, 0x28, 0x65, 0xb3, 0x70, 0x8d, 0xbc }, - { 0x12, 0xa0, 0x53, 0x38, 0x4a, 0x9c, 0x0c, 0x88, 0xe4, 0x05, - 0xa0, 0x6c, 0x27, 0xdc, 0xf4, 0x9a, 0xda, 0x62, 0xeb, 0x2b }, - { 0xb0, 0xe2, 0x0b, 0x6e, 0x31, 0x16, 0x64, 0x02, 0x86, 0xed, - 0x3a, 0x87, 0xa5, 0x71, 0x30, 0x79, 0xb2, 0x1f, 0x51, 0x89 }, - { 0x9b, 0x75, 0x2e, 0x45, 0x57, 0x3d, 0x4b, 0x39, 0xf4, 0xdb, - 0xd3, 0x32, 0x3c, 0xab, 0x82, 0xbf, 0x63, 0x32, 0x6b, 0xfb }, -}; - -/* - * Checkup routine - */ -int mbedtls_ripemd160_self_test( int verbose ) -{ - int i; - unsigned char output[20]; - - memset( output, 0, sizeof output ); - - for( i = 0; i < TESTS; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " RIPEMD-160 test #%d: ", i + 1 ); - - mbedtls_ripemd160( (const unsigned char *) ripemd160_test_input[i], - strlen( ripemd160_test_input[i] ), - output ); - - if( memcmp( output, ripemd160_test_md[i], 20 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_RIPEMD160_C */ diff --git a/deps/mbedtls/rsa.c b/deps/mbedtls/rsa.c index 030a6326db..fb19f441ce 100644 --- a/deps/mbedtls/rsa.c +++ b/deps/mbedtls/rsa.c @@ -53,18 +53,8 @@ #include "mbedtls/md.h" #endif -#if defined(MBEDTLS_PKCS1_V15) && !defined(__OpenBSD__) -#include -#endif - -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #include "arc4_alt.h" @@ -397,14 +387,9 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, size_t olen; mbedtls_mpi T, T1, T2; mbedtls_mpi P1, Q1, R; -#if defined(MBEDTLS_RSA_NO_CRT) - mbedtls_mpi D_blind; - mbedtls_mpi *D = &ctx->D; -#else mbedtls_mpi DP_blind, DQ_blind; mbedtls_mpi *DP = &ctx->DP; mbedtls_mpi *DQ = &ctx->DQ; -#endif /* Make sure we have private key info, prevent possible misuse */ if( ctx->P.p == NULL || ctx->Q.p == NULL || ctx->D.p == NULL ) @@ -416,12 +401,8 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, if( f_rng != NULL ) { -#if defined(MBEDTLS_RSA_NO_CRT) - mbedtls_mpi_init( &D_blind ); -#else mbedtls_mpi_init( &DP_blind ); mbedtls_mpi_init( &DQ_blind ); -#endif } @@ -453,18 +434,6 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); -#if defined(MBEDTLS_RSA_NO_CRT) - /* - * D_blind = ( P - 1 ) * ( Q - 1 ) * R + D - */ - MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &R, RSA_EXPONENT_BLINDING, - f_rng, p_rng ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &D_blind, &P1, &Q1 ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &D_blind, &D_blind, &R ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &D_blind, &D_blind, &ctx->D ) ); - - D = &D_blind; -#else /* * DP_blind = ( P - 1 ) * R + DP */ @@ -486,12 +455,8 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, &ctx->DQ ) ); DQ = &DQ_blind; -#endif /* MBEDTLS_RSA_NO_CRT */ } -#if defined(MBEDTLS_RSA_NO_CRT) - MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &T, &T, D, &ctx->N, &ctx->RN ) ); -#else /* * Faster decryption using the CRT * @@ -513,7 +478,6 @@ int mbedtls_rsa_private( mbedtls_rsa_context *ctx, */ MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T1, &T, &ctx->Q ) ); MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &T, &T2, &T1 ) ); -#endif /* MBEDTLS_RSA_NO_CRT */ if( f_rng != NULL ) { @@ -539,12 +503,8 @@ cleanup: if( f_rng != NULL ) { -#if defined(MBEDTLS_RSA_NO_CRT) - mbedtls_mpi_free( &D_blind ); -#else mbedtls_mpi_free( &DP_blind ); mbedtls_mpi_free( &DQ_blind ); -#endif } if( ret != 0 ) @@ -1232,14 +1192,14 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx, * In order to prevent Lenstra's attack, make the signature in a * temporary buffer and check it before returning it. */ - sig_try = mbedtls_calloc( 1, ctx->len ); - if( sig_try == NULL ) + sig_try = (unsigned char*)calloc( 1, ctx->len ); + if (!sig_try) return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); - verif = mbedtls_calloc( 1, ctx->len ); - if( verif == NULL ) + verif = (unsigned char*)calloc( 1, ctx->len ); + if (!verif) { - mbedtls_free( sig_try ); + free( sig_try ); return( MBEDTLS_ERR_MPI_ALLOC_FAILED ); } @@ -1260,8 +1220,8 @@ int mbedtls_rsa_rsassa_pkcs1_v15_sign( mbedtls_rsa_context *ctx, memcpy( sig, sig_try, ctx->len ); cleanup: - mbedtls_free( sig_try ); - mbedtls_free( verif ); + free( sig_try ); + free( verif ); return( ret ); } @@ -1664,206 +1624,4 @@ void mbedtls_rsa_free( mbedtls_rsa_context *ctx ) #endif } -#if defined(MBEDTLS_SELF_TEST) - -#include "mbedtls/sha1.h" - -/* - * Example RSA-1024 keypair, for test purposes - */ -#define KEY_LEN 128 - -#define RSA_N "9292758453063D803DD603D5E777D788" \ - "8ED1D5BF35786190FA2F23EBC0848AEA" \ - "DDA92CA6C3D80B32C4D109BE0F36D6AE" \ - "7130B9CED7ACDF54CFC7555AC14EEBAB" \ - "93A89813FBF3C4F8066D2D800F7C38A8" \ - "1AE31942917403FF4946B0A83D3D3E05" \ - "EE57C6F5F5606FB5D4BC6CD34EE0801A" \ - "5E94BB77B07507233A0BC7BAC8F90F79" - -#define RSA_E "10001" - -#define RSA_D "24BF6185468786FDD303083D25E64EFC" \ - "66CA472BC44D253102F8B4A9D3BFA750" \ - "91386C0077937FE33FA3252D28855837" \ - "AE1B484A8A9A45F7EE8C0C634F99E8CD" \ - "DF79C5CE07EE72C7F123142198164234" \ - "CABB724CF78B8173B9F880FC86322407" \ - "AF1FEDFDDE2BEB674CA15F3E81A1521E" \ - "071513A1E85B5DFA031F21ECAE91A34D" - -#define RSA_P "C36D0EB7FCD285223CFB5AABA5BDA3D8" \ - "2C01CAD19EA484A87EA4377637E75500" \ - "FCB2005C5C7DD6EC4AC023CDA285D796" \ - "C3D9E75E1EFC42488BB4F1D13AC30A57" - -#define RSA_Q "C000DF51A7C77AE8D7C7370C1FF55B69" \ - "E211C2B9E5DB1ED0BF61D0D9899620F4" \ - "910E4168387E3C30AA1E00C339A79508" \ - "8452DD96A9A5EA5D9DCA68DA636032AF" - -#define RSA_DP "C1ACF567564274FB07A0BBAD5D26E298" \ - "3C94D22288ACD763FD8E5600ED4A702D" \ - "F84198A5F06C2E72236AE490C93F07F8" \ - "3CC559CD27BC2D1CA488811730BB5725" - -#define RSA_DQ "4959CBF6F8FEF750AEE6977C155579C7" \ - "D8AAEA56749EA28623272E4F7D0592AF" \ - "7C1F1313CAC9471B5C523BFE592F517B" \ - "407A1BD76C164B93DA2D32A383E58357" - -#define RSA_QP "9AE7FBC99546432DF71896FC239EADAE" \ - "F38D18D2B2F0E2DD275AA977E2BF4411" \ - "F5A3B2A5D33605AEBBCCBA7FEB9F2D2F" \ - "A74206CEC169D74BF5A8C50D6F48EA08" - -#define PT_LEN 24 -#define RSA_PT "\xAA\xBB\xCC\x03\x02\x01\x00\xFF\xFF\xFF\xFF\xFF" \ - "\x11\x22\x33\x0A\x0B\x0C\xCC\xDD\xDD\xDD\xDD\xDD" - -#if defined(MBEDTLS_PKCS1_V15) -static int myrand( void *rng_state, unsigned char *output, size_t len ) -{ -#if !defined(__OpenBSD__) - size_t i; - - if( rng_state != NULL ) - rng_state = NULL; - - for( i = 0; i < len; ++i ) - output[i] = rand(); -#else - if( rng_state != NULL ) - rng_state = NULL; - - arc4random_buf( output, len ); -#endif /* !OpenBSD */ - - return( 0 ); -} -#endif /* MBEDTLS_PKCS1_V15 */ - -/* - * Checkup routine - */ -int mbedtls_rsa_self_test( int verbose ) -{ - int ret = 0; -#if defined(MBEDTLS_PKCS1_V15) - size_t len; - mbedtls_rsa_context rsa; - unsigned char rsa_plaintext[PT_LEN]; - unsigned char rsa_decrypted[PT_LEN]; - unsigned char rsa_ciphertext[KEY_LEN]; -#if defined(MBEDTLS_SHA1_C) - unsigned char sha1sum[20]; -#endif - - mbedtls_rsa_init( &rsa, MBEDTLS_RSA_PKCS_V15, 0 ); - - rsa.len = KEY_LEN; - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.N , 16, RSA_N ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.E , 16, RSA_E ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.D , 16, RSA_D ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.P , 16, RSA_P ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.Q , 16, RSA_Q ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.DP, 16, RSA_DP ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.DQ, 16, RSA_DQ ) ); - MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &rsa.QP, 16, RSA_QP ) ); - - if( verbose != 0 ) - mbedtls_printf( " RSA key validation: " ); - - if( mbedtls_rsa_check_pubkey( &rsa ) != 0 || - mbedtls_rsa_check_privkey( &rsa ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 encryption : " ); - - memcpy( rsa_plaintext, RSA_PT, PT_LEN ); - - if( mbedtls_rsa_pkcs1_encrypt( &rsa, myrand, NULL, MBEDTLS_RSA_PUBLIC, PT_LEN, - rsa_plaintext, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 decryption : " ); - - if( mbedtls_rsa_pkcs1_decrypt( &rsa, myrand, NULL, MBEDTLS_RSA_PRIVATE, &len, - rsa_ciphertext, rsa_decrypted, - sizeof(rsa_decrypted) ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( memcmp( rsa_decrypted, rsa_plaintext, len ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -#if defined(MBEDTLS_SHA1_C) - if( verbose != 0 ) - mbedtls_printf( " PKCS#1 data sign : " ); - - mbedtls_sha1( rsa_plaintext, PT_LEN, sha1sum ); - - if( mbedtls_rsa_pkcs1_sign( &rsa, myrand, NULL, MBEDTLS_RSA_PRIVATE, MBEDTLS_MD_SHA1, 0, - sha1sum, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n PKCS#1 sig. verify: " ); - - if( mbedtls_rsa_pkcs1_verify( &rsa, NULL, NULL, MBEDTLS_RSA_PUBLIC, MBEDTLS_MD_SHA1, 0, - sha1sum, rsa_ciphertext ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); -#endif /* MBEDTLS_SHA1_C */ - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -cleanup: - mbedtls_rsa_free( &rsa ); -#else /* MBEDTLS_PKCS1_V15 */ - ((void) verbose); -#endif /* MBEDTLS_PKCS1_V15 */ - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_RSA_C */ diff --git a/deps/mbedtls/sha1.c b/deps/mbedtls/sha1.c index 86d4e6ebb1..cc0e018bf1 100644 --- a/deps/mbedtls/sha1.c +++ b/deps/mbedtls/sha1.c @@ -36,15 +36,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_SHA1_ALT) #include "arc4_alt.h" @@ -357,89 +348,4 @@ void mbedtls_sha1( const unsigned char *input, size_t ilen, unsigned char output mbedtls_sha1_free( &ctx ); } -#if defined(MBEDTLS_SELF_TEST) -/* - * FIPS-180-1 test vectors - */ -static const unsigned char sha1_test_buf[3][57] = -{ - { "abc" }, - { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }, - { "" } -}; - -static const int sha1_test_buflen[3] = -{ - 3, 56, 1000 -}; - -static const unsigned char sha1_test_sum[3][20] = -{ - { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, - 0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C, 0x9C, 0xD0, 0xD8, 0x9D }, - { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E, 0xBA, 0xAE, - 0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 }, - { 0x34, 0xAA, 0x97, 0x3C, 0xD4, 0xC4, 0xDA, 0xA4, 0xF6, 0x1E, - 0xEB, 0x2B, 0xDB, 0xAD, 0x27, 0x31, 0x65, 0x34, 0x01, 0x6F } -}; - -/* - * Checkup routine - */ -int mbedtls_sha1_self_test( int verbose ) -{ - int i, j, buflen, ret = 0; - unsigned char buf[1024]; - unsigned char sha1sum[20]; - mbedtls_sha1_context ctx; - - mbedtls_sha1_init( &ctx ); - - /* - * SHA-1 - */ - for( i = 0; i < 3; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " SHA-1 test #%d: ", i + 1 ); - - mbedtls_sha1_starts( &ctx ); - - if( i == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha1_update( &ctx, buf, buflen ); - } - else - mbedtls_sha1_update( &ctx, sha1_test_buf[i], - sha1_test_buflen[i] ); - - mbedtls_sha1_finish( &ctx, sha1sum ); - - if( memcmp( sha1sum, sha1_test_sum[i], 20 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha1_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_SHA1_C */ diff --git a/deps/mbedtls/sha256.c b/deps/mbedtls/sha256.c index 5f97fdf880..d8ee4d3a32 100644 --- a/deps/mbedtls/sha256.c +++ b/deps/mbedtls/sha256.c @@ -36,18 +36,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_SHA256_ALT) #include "arc4_alt.h" @@ -336,124 +324,4 @@ void mbedtls_sha256( const unsigned char *input, size_t ilen, mbedtls_sha256_free( &ctx ); } -#if defined(MBEDTLS_SELF_TEST) -/* - * FIPS-180-2 test vectors - */ -static const unsigned char sha256_test_buf[3][57] = -{ - { "abc" }, - { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" }, - { "" } -}; - -static const int sha256_test_buflen[3] = -{ - 3, 56, 1000 -}; - -static const unsigned char sha256_test_sum[6][32] = -{ - /* - * SHA-224 test vectors - */ - { 0x23, 0x09, 0x7D, 0x22, 0x34, 0x05, 0xD8, 0x22, - 0x86, 0x42, 0xA4, 0x77, 0xBD, 0xA2, 0x55, 0xB3, - 0x2A, 0xAD, 0xBC, 0xE4, 0xBD, 0xA0, 0xB3, 0xF7, - 0xE3, 0x6C, 0x9D, 0xA7 }, - { 0x75, 0x38, 0x8B, 0x16, 0x51, 0x27, 0x76, 0xCC, - 0x5D, 0xBA, 0x5D, 0xA1, 0xFD, 0x89, 0x01, 0x50, - 0xB0, 0xC6, 0x45, 0x5C, 0xB4, 0xF5, 0x8B, 0x19, - 0x52, 0x52, 0x25, 0x25 }, - { 0x20, 0x79, 0x46, 0x55, 0x98, 0x0C, 0x91, 0xD8, - 0xBB, 0xB4, 0xC1, 0xEA, 0x97, 0x61, 0x8A, 0x4B, - 0xF0, 0x3F, 0x42, 0x58, 0x19, 0x48, 0xB2, 0xEE, - 0x4E, 0xE7, 0xAD, 0x67 }, - - /* - * SHA-256 test vectors - */ - { 0xBA, 0x78, 0x16, 0xBF, 0x8F, 0x01, 0xCF, 0xEA, - 0x41, 0x41, 0x40, 0xDE, 0x5D, 0xAE, 0x22, 0x23, - 0xB0, 0x03, 0x61, 0xA3, 0x96, 0x17, 0x7A, 0x9C, - 0xB4, 0x10, 0xFF, 0x61, 0xF2, 0x00, 0x15, 0xAD }, - { 0x24, 0x8D, 0x6A, 0x61, 0xD2, 0x06, 0x38, 0xB8, - 0xE5, 0xC0, 0x26, 0x93, 0x0C, 0x3E, 0x60, 0x39, - 0xA3, 0x3C, 0xE4, 0x59, 0x64, 0xFF, 0x21, 0x67, - 0xF6, 0xEC, 0xED, 0xD4, 0x19, 0xDB, 0x06, 0xC1 }, - { 0xCD, 0xC7, 0x6E, 0x5C, 0x99, 0x14, 0xFB, 0x92, - 0x81, 0xA1, 0xC7, 0xE2, 0x84, 0xD7, 0x3E, 0x67, - 0xF1, 0x80, 0x9A, 0x48, 0xA4, 0x97, 0x20, 0x0E, - 0x04, 0x6D, 0x39, 0xCC, 0xC7, 0x11, 0x2C, 0xD0 } -}; - -/* - * Checkup routine - */ -int mbedtls_sha256_self_test( int verbose ) -{ - int i, j, k, buflen, ret = 0; - unsigned char *buf; - unsigned char sha256sum[32]; - mbedtls_sha256_context ctx; - - buf = mbedtls_calloc( 1024, sizeof(unsigned char) ); - if( NULL == buf ) - { - if( verbose != 0 ) - mbedtls_printf( "Buffer allocation failed\n" ); - - return( 1 ); - } - - mbedtls_sha256_init( &ctx ); - - for( i = 0; i < 6; i++ ) - { - j = i % 3; - k = i < 3; - - if( verbose != 0 ) - mbedtls_printf( " SHA-%d test #%d: ", 256 - k * 32, j + 1 ); - - mbedtls_sha256_starts( &ctx, k ); - - if( j == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha256_update( &ctx, buf, buflen ); - } - else - mbedtls_sha256_update( &ctx, sha256_test_buf[j], - sha256_test_buflen[j] ); - - mbedtls_sha256_finish( &ctx, sha256sum ); - - if( memcmp( sha256sum, sha256_test_sum[i], 32 - k * 4 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha256_free( &ctx ); - mbedtls_free( buf ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_SHA256_C */ diff --git a/deps/mbedtls/sha512.c b/deps/mbedtls/sha512.c index 0b91393ba3..db0348b8a5 100644 --- a/deps/mbedtls/sha512.c +++ b/deps/mbedtls/sha512.c @@ -42,18 +42,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#include -#define mbedtls_printf printf -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_SHA512_ALT) #include "arc4_alt.h" @@ -371,144 +359,4 @@ void mbedtls_sha512( const unsigned char *input, size_t ilen, mbedtls_sha512_free( &ctx ); } -#if defined(MBEDTLS_SELF_TEST) - -/* - * FIPS-180-2 test vectors - */ -static const unsigned char sha512_test_buf[3][113] = -{ - { "abc" }, - { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" - "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu" }, - { "" } -}; - -static const int sha512_test_buflen[3] = -{ - 3, 112, 1000 -}; - -static const unsigned char sha512_test_sum[6][64] = -{ - /* - * SHA-384 test vectors - */ - { 0xCB, 0x00, 0x75, 0x3F, 0x45, 0xA3, 0x5E, 0x8B, - 0xB5, 0xA0, 0x3D, 0x69, 0x9A, 0xC6, 0x50, 0x07, - 0x27, 0x2C, 0x32, 0xAB, 0x0E, 0xDE, 0xD1, 0x63, - 0x1A, 0x8B, 0x60, 0x5A, 0x43, 0xFF, 0x5B, 0xED, - 0x80, 0x86, 0x07, 0x2B, 0xA1, 0xE7, 0xCC, 0x23, - 0x58, 0xBA, 0xEC, 0xA1, 0x34, 0xC8, 0x25, 0xA7 }, - { 0x09, 0x33, 0x0C, 0x33, 0xF7, 0x11, 0x47, 0xE8, - 0x3D, 0x19, 0x2F, 0xC7, 0x82, 0xCD, 0x1B, 0x47, - 0x53, 0x11, 0x1B, 0x17, 0x3B, 0x3B, 0x05, 0xD2, - 0x2F, 0xA0, 0x80, 0x86, 0xE3, 0xB0, 0xF7, 0x12, - 0xFC, 0xC7, 0xC7, 0x1A, 0x55, 0x7E, 0x2D, 0xB9, - 0x66, 0xC3, 0xE9, 0xFA, 0x91, 0x74, 0x60, 0x39 }, - { 0x9D, 0x0E, 0x18, 0x09, 0x71, 0x64, 0x74, 0xCB, - 0x08, 0x6E, 0x83, 0x4E, 0x31, 0x0A, 0x4A, 0x1C, - 0xED, 0x14, 0x9E, 0x9C, 0x00, 0xF2, 0x48, 0x52, - 0x79, 0x72, 0xCE, 0xC5, 0x70, 0x4C, 0x2A, 0x5B, - 0x07, 0xB8, 0xB3, 0xDC, 0x38, 0xEC, 0xC4, 0xEB, - 0xAE, 0x97, 0xDD, 0xD8, 0x7F, 0x3D, 0x89, 0x85 }, - - /* - * SHA-512 test vectors - */ - { 0xDD, 0xAF, 0x35, 0xA1, 0x93, 0x61, 0x7A, 0xBA, - 0xCC, 0x41, 0x73, 0x49, 0xAE, 0x20, 0x41, 0x31, - 0x12, 0xE6, 0xFA, 0x4E, 0x89, 0xA9, 0x7E, 0xA2, - 0x0A, 0x9E, 0xEE, 0xE6, 0x4B, 0x55, 0xD3, 0x9A, - 0x21, 0x92, 0x99, 0x2A, 0x27, 0x4F, 0xC1, 0xA8, - 0x36, 0xBA, 0x3C, 0x23, 0xA3, 0xFE, 0xEB, 0xBD, - 0x45, 0x4D, 0x44, 0x23, 0x64, 0x3C, 0xE8, 0x0E, - 0x2A, 0x9A, 0xC9, 0x4F, 0xA5, 0x4C, 0xA4, 0x9F }, - { 0x8E, 0x95, 0x9B, 0x75, 0xDA, 0xE3, 0x13, 0xDA, - 0x8C, 0xF4, 0xF7, 0x28, 0x14, 0xFC, 0x14, 0x3F, - 0x8F, 0x77, 0x79, 0xC6, 0xEB, 0x9F, 0x7F, 0xA1, - 0x72, 0x99, 0xAE, 0xAD, 0xB6, 0x88, 0x90, 0x18, - 0x50, 0x1D, 0x28, 0x9E, 0x49, 0x00, 0xF7, 0xE4, - 0x33, 0x1B, 0x99, 0xDE, 0xC4, 0xB5, 0x43, 0x3A, - 0xC7, 0xD3, 0x29, 0xEE, 0xB6, 0xDD, 0x26, 0x54, - 0x5E, 0x96, 0xE5, 0x5B, 0x87, 0x4B, 0xE9, 0x09 }, - { 0xE7, 0x18, 0x48, 0x3D, 0x0C, 0xE7, 0x69, 0x64, - 0x4E, 0x2E, 0x42, 0xC7, 0xBC, 0x15, 0xB4, 0x63, - 0x8E, 0x1F, 0x98, 0xB1, 0x3B, 0x20, 0x44, 0x28, - 0x56, 0x32, 0xA8, 0x03, 0xAF, 0xA9, 0x73, 0xEB, - 0xDE, 0x0F, 0xF2, 0x44, 0x87, 0x7E, 0xA6, 0x0A, - 0x4C, 0xB0, 0x43, 0x2C, 0xE5, 0x77, 0xC3, 0x1B, - 0xEB, 0x00, 0x9C, 0x5C, 0x2C, 0x49, 0xAA, 0x2E, - 0x4E, 0xAD, 0xB2, 0x17, 0xAD, 0x8C, 0xC0, 0x9B } -}; - -/* - * Checkup routine - */ -int mbedtls_sha512_self_test( int verbose ) -{ - int i, j, k, buflen, ret = 0; - unsigned char *buf; - unsigned char sha512sum[64]; - mbedtls_sha512_context ctx; - - buf = mbedtls_calloc( 1024, sizeof(unsigned char) ); - if( NULL == buf ) - { - if( verbose != 0 ) - mbedtls_printf( "Buffer allocation failed\n" ); - - return( 1 ); - } - - mbedtls_sha512_init( &ctx ); - - for( i = 0; i < 6; i++ ) - { - j = i % 3; - k = i < 3; - - if( verbose != 0 ) - mbedtls_printf( " SHA-%d test #%d: ", 512 - k * 128, j + 1 ); - - mbedtls_sha512_starts( &ctx, k ); - - if( j == 2 ) - { - memset( buf, 'a', buflen = 1000 ); - - for( j = 0; j < 1000; j++ ) - mbedtls_sha512_update( &ctx, buf, buflen ); - } - else - mbedtls_sha512_update( &ctx, sha512_test_buf[j], - sha512_test_buflen[j] ); - - mbedtls_sha512_finish( &ctx, sha512sum ); - - if( memcmp( sha512sum, sha512_test_sum[i], 64 - k * 16 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_sha512_free( &ctx ); - mbedtls_free( buf ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_SHA512_C */ diff --git a/deps/mbedtls/ssl_cache.c b/deps/mbedtls/ssl_cache.c index 9b62de2dcc..bbfeb81911 100644 --- a/deps/mbedtls/ssl_cache.c +++ b/deps/mbedtls/ssl_cache.c @@ -31,18 +31,11 @@ #if defined(MBEDTLS_SSL_CACHE_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #include "mbedtls/ssl_cache.h" -#include - void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ) { memset( cache, 0, sizeof( mbedtls_ssl_cache_context ) ); @@ -57,10 +50,8 @@ void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache ) int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ) { - int ret = 1; -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t t = mbedtls_time( NULL ); -#endif + int ret = 1; + time_t t = time( NULL ); mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data; mbedtls_ssl_cache_entry *cur, *entry; @@ -77,11 +68,9 @@ int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ) entry = cur; cur = cur->next; -#if defined(MBEDTLS_HAVE_TIME) if( cache->timeout != 0 && (int) ( t - entry->timestamp ) > cache->timeout ) continue; -#endif if( session->ciphersuite != entry->session.ciphersuite || session->compression != entry->session.compression || @@ -102,7 +91,7 @@ int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ) */ if( entry->peer_cert.p != NULL ) { - if( ( session->peer_cert = mbedtls_calloc( 1, + if( ( session->peer_cert = (mbedtls_x509_crt*)calloc( 1, sizeof(mbedtls_x509_crt) ) ) == NULL ) { ret = 1; @@ -113,7 +102,7 @@ int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session ) if( mbedtls_x509_crt_parse( session->peer_cert, entry->peer_cert.p, entry->peer_cert.len ) != 0 ) { - mbedtls_free( session->peer_cert ); + free( session->peer_cert ); session->peer_cert = NULL; ret = 1; goto exit; @@ -136,11 +125,9 @@ exit: int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) { - int ret = 1; -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t t = time( NULL ), oldest = 0; - mbedtls_ssl_cache_entry *old = NULL; -#endif + int ret = 1; + time_t t = time( NULL ), oldest = 0; + mbedtls_ssl_cache_entry *old = NULL; mbedtls_ssl_cache_context *cache = (mbedtls_ssl_cache_context *) data; mbedtls_ssl_cache_entry *cur, *prv; int count = 0; @@ -157,25 +144,21 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) { count++; -#if defined(MBEDTLS_HAVE_TIME) if( cache->timeout != 0 && (int) ( t - cur->timestamp ) > cache->timeout ) { cur->timestamp = t; break; /* expired, reuse this slot, update timestamp */ } -#endif if( memcmp( session->id, cur->session.id, cur->session.id_len ) == 0 ) break; /* client reconnected, keep timestamp for session id */ -#if defined(MBEDTLS_HAVE_TIME) if( oldest == 0 || cur->timestamp < oldest ) { oldest = cur->timestamp; old = cur; } -#endif prv = cur; cur = cur->next; @@ -183,7 +166,6 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) if( cur == NULL ) { -#if defined(MBEDTLS_HAVE_TIME) /* * Reuse oldest entry if max_entries reached */ @@ -197,32 +179,15 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) cur = old; } -#else /* MBEDTLS_HAVE_TIME */ - /* - * Reuse first entry in chain if max_entries reached, - * but move to last place - */ - if( count >= cache->max_entries ) - { - if( cache->chain == NULL ) - { - ret = 1; - goto exit; - } - - cur = cache->chain; - cache->chain = cur->next; - cur->next = NULL; - prv->next = cur; - } -#endif /* MBEDTLS_HAVE_TIME */ else { /* * max_entries not reached, create new entry */ - cur = mbedtls_calloc( 1, sizeof(mbedtls_ssl_cache_entry) ); - if( cur == NULL ) + cur = (mbedtls_ssl_cache_entry*) + calloc( 1, sizeof(mbedtls_ssl_cache_entry) ); + + if (!cur) { ret = 1; goto exit; @@ -234,9 +199,7 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) prv->next = cur; } -#if defined(MBEDTLS_HAVE_TIME) cur->timestamp = t; -#endif } memcpy( &cur->session, session, sizeof( mbedtls_ssl_session ) ); @@ -247,7 +210,7 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) */ if( cur->peer_cert.p != NULL ) { - mbedtls_free( cur->peer_cert.p ); + free( cur->peer_cert.p ); memset( &cur->peer_cert, 0, sizeof(mbedtls_x509_buf) ); } @@ -256,7 +219,8 @@ int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session ) */ if( session->peer_cert != NULL ) { - cur->peer_cert.p = mbedtls_calloc( 1, session->peer_cert->raw.len ); + cur->peer_cert.p = (unsigned char*) + calloc( 1, session->peer_cert->raw.len ); if( cur->peer_cert.p == NULL ) { ret = 1; @@ -282,14 +246,13 @@ exit: return( ret ); } -#if defined(MBEDTLS_HAVE_TIME) void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout ) { - if( timeout < 0 ) timeout = 0; + if( timeout < 0 ) + timeout = 0; cache->timeout = timeout; } -#endif /* MBEDTLS_HAVE_TIME */ void mbedtls_ssl_cache_set_max_entries( mbedtls_ssl_cache_context *cache, int max ) { @@ -312,10 +275,10 @@ void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache ) mbedtls_ssl_session_free( &prv->session ); #if defined(MBEDTLS_X509_CRT_PARSE_C) - mbedtls_free( prv->peer_cert.p ); + free( prv->peer_cert.p ); #endif /* MBEDTLS_X509_CRT_PARSE_C */ - mbedtls_free( prv ); + free( prv ); } #if defined(MBEDTLS_THREADING_C) diff --git a/deps/mbedtls/ssl_ciphersuites.c b/deps/mbedtls/ssl_ciphersuites.c index ed3f20c9fd..a7be9db63b 100644 --- a/deps/mbedtls/ssl_ciphersuites.c +++ b/deps/mbedtls/ssl_ciphersuites.c @@ -29,17 +29,12 @@ #if defined(MBEDTLS_SSL_TLS_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#endif +#include #include "mbedtls/ssl_ciphersuites.h" #include "mbedtls/ssl.h" -#include - /* * Ordered from most preferred to least preferred in terms of security. * diff --git a/deps/mbedtls/ssl_cli.c b/deps/mbedtls/ssl_cli.c index fcd37bd9bc..ca4d462987 100644 --- a/deps/mbedtls/ssl_cli.c +++ b/deps/mbedtls/ssl_cli.c @@ -27,25 +27,15 @@ #if defined(MBEDTLS_SSL_CLI_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else +#include #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #include "mbedtls/debug.h" #include "mbedtls/ssl.h" #include "mbedtls/ssl_internal.h" -#include - -#include - -#if defined(MBEDTLS_HAVE_TIME) -#include "mbedtls/platform_time.h" -#endif +#include #if defined(MBEDTLS_SSL_SESSION_TICKETS) #include "arc4_alt.h" @@ -390,7 +380,7 @@ static void ssl_write_ecjpake_kkpp_ext( mbedtls_ssl_context *ssl, return; } - ssl->handshake->ecjpake_cache = mbedtls_calloc( 1, kkpp_len ); + ssl->handshake->ecjpake_cache = calloc( 1, kkpp_len ); if( ssl->handshake->ecjpake_cache == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "allocation failed" ) ); @@ -667,9 +657,7 @@ static int ssl_generate_random( mbedtls_ssl_context *ssl ) { int ret; unsigned char *p = ssl->handshake->randbytes; -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t t; -#endif + time_t t; /* * When responding to a verify request, MUST reuse random (RFC 6347 4.2.1) @@ -677,25 +665,16 @@ static int ssl_generate_random( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_PROTO_DTLS) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM && ssl->handshake->verify_cookie != NULL ) - { return( 0 ); - } #endif -#if defined(MBEDTLS_HAVE_TIME) - t = mbedtls_time( NULL ); + t = time( NULL ); *p++ = (unsigned char)( t >> 24 ); *p++ = (unsigned char)( t >> 16 ); *p++ = (unsigned char)( t >> 8 ); *p++ = (unsigned char)( t ); MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, current time: %lu", t ) ); -#else - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 ) - return( ret ); - - p += 4; -#endif /* MBEDTLS_HAVE_TIME */ if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 28 ) ) != 0 ) return( ret ); @@ -916,11 +895,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello, got %d ciphersuites", n ) ); -#if defined(MBEDTLS_ZLIB_SUPPORT) - offer_compress = 1; -#else offer_compress = 0; -#endif /* * We don't support compression with DTLS right now: is many records come @@ -953,8 +928,7 @@ static int ssl_write_client_hello( mbedtls_ssl_context *ssl ) *p++ = MBEDTLS_SSL_COMPRESS_NULL; } - // First write extensions, then the total length - // + /* First write extensions, then the total length */ #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) ssl_write_hostname_ext( ssl, p + 2 + ext_len, &olen ); ext_len += olen; @@ -1207,7 +1181,7 @@ static int ssl_parse_ecjpake_kkpp( mbedtls_ssl_context *ssl, } /* If we got here, we no longer need our cached extension */ - mbedtls_free( ssl->handshake->ecjpake_cache ); + free( ssl->handshake->ecjpake_cache ); ssl->handshake->ecjpake_cache = NULL; ssl->handshake->ecjpake_cache_len = 0; @@ -1343,9 +1317,9 @@ static int ssl_parse_hello_verify_request( mbedtls_ssl_context *ssl ) return( MBEDTLS_ERR_SSL_BAD_HS_SERVER_HELLO ); } - mbedtls_free( ssl->handshake->verify_cookie ); + free( ssl->handshake->verify_cookie ); - ssl->handshake->verify_cookie = mbedtls_calloc( 1, cookie_len ); + ssl->handshake->verify_cookie = (unsigned char*)calloc( 1, cookie_len ); if( ssl->handshake->verify_cookie == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", cookie_len ) ); @@ -1374,17 +1348,11 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) size_t ext_len; unsigned char *buf, *ext; unsigned char comp; -#if defined(MBEDTLS_ZLIB_SUPPORT) - int accept_comp; -#endif #if defined(MBEDTLS_SSL_RENEGOTIATION) int renegotiation_info_seen = 0; #endif int handshake_failure = 0; const mbedtls_ssl_ciphersuite_t *suite_info; -#if defined(MBEDTLS_DEBUG_C) - uint32_t t; -#endif MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> parse server hello" ) ); @@ -1437,7 +1405,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) else { /* We made it through the verification process */ - mbedtls_free( ssl->handshake->verify_cookie ); + free( ssl->handshake->verify_cookie ); ssl->handshake->verify_cookie = NULL; ssl->handshake->verify_cookie_len = 0; } @@ -1487,14 +1455,6 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) return( MBEDTLS_ERR_SSL_BAD_HS_PROTOCOL_VERSION ); } -#if defined(MBEDTLS_DEBUG_C) - t = ( (uint32_t) buf[2] << 24 ) - | ( (uint32_t) buf[3] << 16 ) - | ( (uint32_t) buf[4] << 8 ) - | ( (uint32_t) buf[5] ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", t ) ); -#endif - memcpy( ssl->handshake->randbytes + 32, buf + 2, 32 ); n = buf[34]; @@ -1543,20 +1503,7 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) */ comp = buf[37 + n]; -#if defined(MBEDTLS_ZLIB_SUPPORT) - /* See comments in ssl_write_client_hello() */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) - accept_comp = 0; - else -#endif - accept_comp = 1; - - if( comp != MBEDTLS_SSL_COMPRESS_NULL && - ( comp != MBEDTLS_SSL_COMPRESS_DEFLATE || accept_comp == 0 ) ) -#else /* MBEDTLS_ZLIB_SUPPORT */ if( comp != MBEDTLS_SSL_COMPRESS_NULL ) -#endif/* MBEDTLS_ZLIB_SUPPORT */ { MBEDTLS_SSL_DEBUG_MSG( 1, ( "server hello, bad compression: %d", comp ) ); mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, @@ -1589,19 +1536,17 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) #if defined(MBEDTLS_SSL_RENEGOTIATION) ssl->renego_status != MBEDTLS_SSL_INITIAL_HANDSHAKE || #endif - ssl->session_negotiate->ciphersuite != i || + ssl->session_negotiate->ciphersuite != i || ssl->session_negotiate->compression != comp || - ssl->session_negotiate->id_len != n || + ssl->session_negotiate->id_len != n || memcmp( ssl->session_negotiate->id, buf + 35, n ) != 0 ) { ssl->state++; - ssl->handshake->resume = 0; -#if defined(MBEDTLS_HAVE_TIME) - ssl->session_negotiate->start = mbedtls_time( NULL ); -#endif + ssl->handshake->resume = 0; + ssl->session_negotiate->start = time( NULL ); ssl->session_negotiate->ciphersuite = i; ssl->session_negotiate->compression = comp; - ssl->session_negotiate->id_len = n; + ssl->session_negotiate->id_len = n; memcpy( ssl->session_negotiate->id, buf + 35, n ); } else @@ -1658,9 +1603,6 @@ static int ssl_parse_server_hello( mbedtls_ssl_context *ssl ) } if( comp != MBEDTLS_SSL_COMPRESS_NULL -#if defined(MBEDTLS_ZLIB_SUPPORT) - && comp != MBEDTLS_SSL_COMPRESS_DEFLATE -#endif ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "bad server hello message" ) ); @@ -2659,16 +2601,6 @@ static int ssl_parse_certificate_request( mbedtls_ssl_context *ssl ) { size_t sig_alg_len = ( ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 1 + n] << 8 ) | ( buf[mbedtls_ssl_hs_hdr_len( ssl ) + 2 + n] ) ); -#if defined(MBEDTLS_DEBUG_C) - unsigned char* sig_alg = buf + mbedtls_ssl_hs_hdr_len( ssl ) + 3 + n; - size_t i; - - for( i = 0; i < sig_alg_len; i += 2 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Supported Signature Algorithm found: %d" - ",%d", sig_alg[i], sig_alg[i + 1] ) ); - } -#endif n += 2 + sig_alg_len; @@ -3260,11 +3192,11 @@ static int ssl_parse_new_session_ticket( mbedtls_ssl_context *ssl ) mbedtls_zeroize( ssl->session_negotiate->ticket, ssl->session_negotiate->ticket_len ); - mbedtls_free( ssl->session_negotiate->ticket ); + free( ssl->session_negotiate->ticket ); ssl->session_negotiate->ticket = NULL; ssl->session_negotiate->ticket_len = 0; - if( ( ticket = mbedtls_calloc( 1, ticket_len ) ) == NULL ) + if( ( ticket = (unsigned char*)calloc( 1, ticket_len ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "ticket alloc failed" ) ); mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, diff --git a/deps/mbedtls/ssl_cookie.c b/deps/mbedtls/ssl_cookie.c index f2c112e74d..6b715c14c5 100644 --- a/deps/mbedtls/ssl_cookie.c +++ b/deps/mbedtls/ssl_cookie.c @@ -31,13 +31,6 @@ #if defined(MBEDTLS_SSL_COOKIE_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif - #include "mbedtls/ssl_cookie.h" #include "mbedtls/ssl_internal.h" @@ -75,9 +68,6 @@ void mbedtls_ssl_cookie_init( mbedtls_ssl_cookie_ctx *ctx ) { mbedtls_md_init( &ctx->hmac_ctx ); -#if !defined(MBEDTLS_HAVE_TIME) - ctx->serial = 0; -#endif ctx->timeout = MBEDTLS_SSL_COOKIE_TIMEOUT; #if defined(MBEDTLS_THREADING_C) @@ -155,12 +145,12 @@ static int ssl_cookie_hmac( mbedtls_md_context_t *hmac_ctx, * Generate cookie for DTLS ClientHello verification */ int mbedtls_ssl_cookie_write( void *p_ctx, - unsigned char **p, unsigned char *end, - const unsigned char *cli_id, size_t cli_id_len ) + unsigned char **p, unsigned char *end, + const unsigned char *cli_id, size_t cli_id_len ) { int ret; - mbedtls_ssl_cookie_ctx *ctx = (mbedtls_ssl_cookie_ctx *) p_ctx; unsigned long t; + mbedtls_ssl_cookie_ctx *ctx = (mbedtls_ssl_cookie_ctx *) p_ctx; if( ctx == NULL || cli_id == NULL ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); @@ -168,11 +158,7 @@ int mbedtls_ssl_cookie_write( void *p_ctx, if( (size_t)( end - *p ) < COOKIE_LEN ) return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); -#if defined(MBEDTLS_HAVE_TIME) - t = (unsigned long) mbedtls_time( NULL ); -#else - t = ctx->serial++; -#endif + t = (unsigned long)time( NULL ); (*p)[0] = (unsigned char)( t >> 24 ); (*p)[1] = (unsigned char)( t >> 16 ); @@ -235,14 +221,11 @@ int mbedtls_ssl_cookie_check( void *p_ctx, if( ret != 0 ) return( ret ); - if( mbedtls_ssl_safer_memcmp( cookie + 4, ref_hmac, sizeof( ref_hmac ) ) != 0 ) + if( mbedtls_ssl_safer_memcmp( + cookie + 4, ref_hmac, sizeof( ref_hmac ) ) != 0 ) return( -1 ); -#if defined(MBEDTLS_HAVE_TIME) - cur_time = (unsigned long) mbedtls_time( NULL ); -#else - cur_time = ctx->serial; -#endif + cur_time = (unsigned long)time( NULL ); cookie_time = ( (unsigned long) cookie[0] << 24 ) | ( (unsigned long) cookie[1] << 16 ) | diff --git a/deps/mbedtls/ssl_srv.c b/deps/mbedtls/ssl_srv.c index 15cafd43e2..ba4957b0d0 100644 --- a/deps/mbedtls/ssl_srv.c +++ b/deps/mbedtls/ssl_srv.c @@ -27,27 +27,18 @@ #if defined(MBEDTLS_SSL_SRV_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif +#include #include "mbedtls/debug.h" #include "mbedtls/ssl.h" #include "mbedtls/ssl_internal.h" -#include - #if defined(MBEDTLS_ECP_C) #include "mbedtls/ecp.h" #endif -#if defined(MBEDTLS_HAVE_TIME) -#include "mbedtls/platform_time.h" -#endif +#include #if defined(MBEDTLS_SSL_SESSION_TICKETS) #include "arc4_alt.h" @@ -61,9 +52,9 @@ int mbedtls_ssl_set_client_transport_id( mbedtls_ssl_context *ssl, if( ssl->conf->endpoint != MBEDTLS_SSL_IS_SERVER ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - mbedtls_free( ssl->cli_id ); + free( ssl->cli_id ); - if( ( ssl->cli_id = mbedtls_calloc( 1, ilen ) ) == NULL ) + if( ( ssl->cli_id = (unsigned char*)calloc( 1, ilen ) ) == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); memcpy( ssl->cli_id, info, ilen ); @@ -267,7 +258,8 @@ static int ssl_parse_supported_elliptic_curves( mbedtls_ssl_context *ssl, if( our_size > MBEDTLS_ECP_DP_MAX ) our_size = MBEDTLS_ECP_DP_MAX; - if( ( curves = mbedtls_calloc( our_size, sizeof( *curves ) ) ) == NULL ) + if( ( curves = (const mbedtls_ecp_curve_info**) + calloc( our_size, sizeof( *curves ) ) ) == NULL ) { mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, MBEDTLS_SSL_ALERT_MSG_INTERNAL_ERROR ); @@ -1546,16 +1538,6 @@ read_record_header: buf + comp_offset + 1, comp_len ); ssl->session_negotiate->compression = MBEDTLS_SSL_COMPRESS_NULL; -#if defined(MBEDTLS_ZLIB_SUPPORT) - for( i = 0; i < comp_len; ++i ) - { - if( buf[comp_offset + 1 + i] == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - ssl->session_negotiate->compression = MBEDTLS_SSL_COMPRESS_DEFLATE; - break; - } - } -#endif /* See comments in ssl_write_client_hello() */ #if defined(MBEDTLS_SSL_PROTO_DTLS) @@ -1932,28 +1914,6 @@ have_ciphersuite: mbedtls_ssl_recv_flight_completed( ssl ); #endif - /* Debugging-only output for testsuite */ -#if defined(MBEDTLS_DEBUG_C) && \ - defined(MBEDTLS_SSL_PROTO_TLS1_2) && \ - defined(MBEDTLS_KEY_EXCHANGE__WITH_CERT__ENABLED) - if( ssl->minor_ver == MBEDTLS_SSL_MINOR_VERSION_3 ) - { - mbedtls_pk_type_t sig_alg = mbedtls_ssl_get_ciphersuite_sig_alg( ciphersuite_info ); - if( sig_alg != MBEDTLS_PK_NONE ) - { - mbedtls_md_type_t md_alg = mbedtls_ssl_sig_hash_set_find( &ssl->handshake->hash_algs, - sig_alg ); - MBEDTLS_SSL_DEBUG_MSG( 3, ( "client hello v3, signature_algorithm ext: %d", - mbedtls_ssl_hash_from_md_alg( md_alg ) ) ); - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "no hash algorithm for signature algorithm " - "%d - should not happen", sig_alg ) ); - } - } -#endif - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse client hello" ) ); return( 0 ); @@ -2322,10 +2282,8 @@ static int ssl_write_hello_verify_request( mbedtls_ssl_context *ssl ) static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) { -#if defined(MBEDTLS_HAVE_TIME) - mbedtls_time_t t; -#endif int ret; + time_t t; size_t olen, ext_len = 0, n; unsigned char *buf, *p; @@ -2365,20 +2323,13 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, chosen version: [%d:%d]", buf[4], buf[5] ) ); -#if defined(MBEDTLS_HAVE_TIME) - t = mbedtls_time( NULL ); + t = time( NULL ); *p++ = (unsigned char)( t >> 24 ); *p++ = (unsigned char)( t >> 16 ); *p++ = (unsigned char)( t >> 8 ); *p++ = (unsigned char)( t ); MBEDTLS_SSL_DEBUG_MSG( 3, ( "server hello, current time: %lu", t ) ); -#else - if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 4 ) ) != 0 ) - return( ret ); - - p += 4; -#endif /* MBEDTLS_HAVE_TIME */ if( ( ret = ssl->conf->f_rng( ssl->conf->p_rng, p, 28 ) ) != 0 ) return( ret ); @@ -2414,9 +2365,7 @@ static int ssl_write_server_hello( mbedtls_ssl_context *ssl ) */ ssl->state++; -#if defined(MBEDTLS_HAVE_TIME) - ssl->session_negotiate->start = mbedtls_time( NULL ); -#endif + ssl->session_negotiate->start = time( NULL ); #if defined(MBEDTLS_SSL_SESSION_TICKETS) if( ssl->handshake->new_session_ticket != 0 ) diff --git a/deps/mbedtls/ssl_ticket.c b/deps/mbedtls/ssl_ticket.c index 5c77c1c359..9c4b74287c 100644 --- a/deps/mbedtls/ssl_ticket.c +++ b/deps/mbedtls/ssl_ticket.c @@ -27,13 +27,7 @@ #if defined(MBEDTLS_SSL_TICKET_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #include "mbedtls/ssl_ticket.h" @@ -65,9 +59,7 @@ static int ssl_ticket_gen_key( mbedtls_ssl_ticket_context *ctx, unsigned char buf[MAX_KEY_BYTES]; mbedtls_ssl_ticket_key *key = ctx->keys + index; -#if defined(MBEDTLS_HAVE_TIME) - key->generation_time = (uint32_t) mbedtls_time( NULL ); -#endif + key->generation_time = (uint32_t)time( NULL ); if( ( ret = ctx->f_rng( ctx->p_rng, key->name, sizeof( key->name ) ) ) != 0 ) return( ret ); @@ -90,27 +82,20 @@ static int ssl_ticket_gen_key( mbedtls_ssl_ticket_context *ctx, */ static int ssl_ticket_update_keys( mbedtls_ssl_ticket_context *ctx ) { -#if !defined(MBEDTLS_HAVE_TIME) - ((void) ctx); -#else if( ctx->ticket_lifetime != 0 ) { - uint32_t current_time = (uint32_t) mbedtls_time( NULL ); - uint32_t key_time = ctx->keys[ctx->active].generation_time; + uint32_t current_time = (uint32_t)time( NULL ); + uint32_t key_time = ctx->keys[ctx->active].generation_time; if( current_time > key_time && current_time - key_time < ctx->ticket_lifetime ) - { return( 0 ); - } ctx->active = 1 - ctx->active; return( ssl_ticket_gen_key( ctx, ctx->active ) ); } - else -#endif /* MBEDTLS_HAVE_TIME */ - return( 0 ); + return( 0 ); } /* @@ -240,7 +225,7 @@ static int ssl_load_session( mbedtls_ssl_session *session, if( p + cert_len > end ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - session->peer_cert = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ); + session->peer_cert = (mbedtls_x509_crt*)calloc( 1, sizeof( mbedtls_x509_crt ) ); if( session->peer_cert == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -251,7 +236,7 @@ static int ssl_load_session( mbedtls_ssl_session *session, p, cert_len ) ) != 0 ) { mbedtls_x509_crt_free( session->peer_cert ); - mbedtls_free( session->peer_cert ); + free( session->peer_cert ); session->peer_cert = NULL; return( ret ); } @@ -287,14 +272,14 @@ int mbedtls_ssl_ticket_write( void *p_ticket, uint32_t *ticket_lifetime ) { int ret; - mbedtls_ssl_ticket_context *ctx = p_ticket; - mbedtls_ssl_ticket_key *key; - unsigned char *key_name = start; - unsigned char *iv = start + 4; - unsigned char *state_len_bytes = iv + 12; - unsigned char *state = state_len_bytes + 2; unsigned char *tag; size_t clear_len, ciph_len; + mbedtls_ssl_ticket_key *key = NULL; + mbedtls_ssl_ticket_context *ctx = (mbedtls_ssl_ticket_context*)p_ticket; + unsigned char *key_name = start; + unsigned char *iv = start + 4; + unsigned char *state_len_bytes = iv + 12; + unsigned char *state = state_len_bytes + 2; *tlen = 0; @@ -383,14 +368,14 @@ int mbedtls_ssl_ticket_parse( void *p_ticket, size_t len ) { int ret; - mbedtls_ssl_ticket_context *ctx = p_ticket; - mbedtls_ssl_ticket_key *key; - unsigned char *key_name = buf; - unsigned char *iv = buf + 4; - unsigned char *enc_len_p = iv + 12; - unsigned char *ticket = enc_len_p + 2; unsigned char *tag; size_t enc_len, clear_len; + mbedtls_ssl_ticket_key *key = NULL; + mbedtls_ssl_ticket_context *ctx = (mbedtls_ssl_ticket_context*)p_ticket; + unsigned char *key_name = buf; + unsigned char *iv = buf + 4; + unsigned char *enc_len_p = iv + 12; + unsigned char *ticket = enc_len_p + 2; if( ctx == NULL || ctx->f_rng == NULL ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); @@ -445,10 +430,9 @@ int mbedtls_ssl_ticket_parse( void *p_ticket, if( ( ret = ssl_load_session( session, ticket, clear_len ) ) != 0 ) goto cleanup; -#if defined(MBEDTLS_HAVE_TIME) { /* Check for expiration */ - mbedtls_time_t current_time = mbedtls_time( NULL ); + time_t current_time = time( NULL ); if( current_time < session->start || (uint32_t)( current_time - session->start ) > ctx->ticket_lifetime ) @@ -457,7 +441,6 @@ int mbedtls_ssl_ticket_parse( void *p_ticket, goto cleanup; } } -#endif cleanup: #if defined(MBEDTLS_THREADING_C) diff --git a/deps/mbedtls/ssl_tls.c b/deps/mbedtls/ssl_tls.c index 6c136351c9..8a29d97414 100644 --- a/deps/mbedtls/ssl_tls.c +++ b/deps/mbedtls/ssl_tls.c @@ -35,13 +35,7 @@ #if defined(MBEDTLS_SSL_TLS_C) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_calloc calloc -#define mbedtls_free free -#endif #include "mbedtls/debug.h" #include "mbedtls/ssl.h" @@ -56,7 +50,7 @@ #include "arc4_alt.h" /* Length of the "epoch" field in the record header */ -static inline size_t ssl_ep_len( const mbedtls_ssl_context *ssl ) +static INLINE size_t ssl_ep_len( const mbedtls_ssl_context *ssl ) { #if defined(MBEDTLS_SSL_PROTO_DTLS) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) @@ -163,7 +157,7 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session { int ret; - dst->peer_cert = (mbedtls_x509_crt*)mbedtls_calloc( 1, sizeof(mbedtls_x509_crt) ); + dst->peer_cert = (mbedtls_x509_crt*)calloc( 1, sizeof(mbedtls_x509_crt) ); if( dst->peer_cert == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -172,7 +166,7 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session if( ( ret = mbedtls_x509_crt_parse_der( dst->peer_cert, src->peer_cert->raw.p, src->peer_cert->raw.len ) ) != 0 ) { - mbedtls_free( dst->peer_cert ); + free( dst->peer_cert ); dst->peer_cert = NULL; return( ret ); } @@ -182,7 +176,7 @@ static int ssl_session_copy( mbedtls_ssl_session *dst, const mbedtls_ssl_session #if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) if( src->ticket != NULL ) { - dst->ticket = (unsigned char*)mbedtls_calloc( 1, src->ticket_len ); + dst->ticket = (unsigned char*)calloc( 1, src->ticket_len ); if( dst->ticket == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -919,38 +913,6 @@ int mbedtls_ssl_derive_keys( mbedtls_ssl_context *ssl ) mbedtls_zeroize( keyblk, sizeof( keyblk ) ); -#if defined(MBEDTLS_ZLIB_SUPPORT) - // Initialize compression - // - if( session->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ssl->compress_buf == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Allocating compression buffer" ) ); - ssl->compress_buf = mbedtls_calloc( 1, MBEDTLS_SSL_BUFFER_LEN ); - if( ssl->compress_buf == NULL ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", - MBEDTLS_SSL_BUFFER_LEN ) ); - return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); - } - } - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Initializing zlib states" ) ); - - memset( &transform->ctx_deflate, 0, sizeof( transform->ctx_deflate ) ); - memset( &transform->ctx_inflate, 0, sizeof( transform->ctx_inflate ) ); - - if( deflateInit( &transform->ctx_deflate, - Z_DEFAULT_COMPRESSION ) != Z_OK || - inflateInit( &transform->ctx_inflate ) != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "Failed to initialize compression" ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - } -#endif /* MBEDTLS_ZLIB_SUPPORT */ - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= derive keys" ) ); return( 0 ); @@ -2054,103 +2016,6 @@ static int ssl_decrypt_buf( mbedtls_ssl_context *ssl ) #undef MAC_PLAINTEXT #undef MAC_CIPHERTEXT -#if defined(MBEDTLS_ZLIB_SUPPORT) -/* - * Compression/decompression functions - */ -static int ssl_compress_buf( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *msg_post = ssl->out_msg; - size_t len_pre = ssl->out_msglen; - unsigned char *msg_pre = ssl->compress_buf; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> compress buf" ) ); - - if( len_pre == 0 ) - return( 0 ); - - memcpy( msg_pre, ssl->out_msg, len_pre ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before compression: msglen = %d, ", - ssl->out_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "before compression: output payload", - ssl->out_msg, ssl->out_msglen ); - - ssl->transform_out->ctx_deflate.next_in = msg_pre; - ssl->transform_out->ctx_deflate.avail_in = len_pre; - ssl->transform_out->ctx_deflate.next_out = msg_post; - ssl->transform_out->ctx_deflate.avail_out = MBEDTLS_SSL_BUFFER_LEN; - - ret = deflate( &ssl->transform_out->ctx_deflate, Z_SYNC_FLUSH ); - if( ret != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "failed to perform compression (%d)", ret ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - - ssl->out_msglen = MBEDTLS_SSL_BUFFER_LEN - - ssl->transform_out->ctx_deflate.avail_out; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "after compression: msglen = %d, ", - ssl->out_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "after compression: output payload", - ssl->out_msg, ssl->out_msglen ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= compress buf" ) ); - - return( 0 ); -} - -static int ssl_decompress_buf( mbedtls_ssl_context *ssl ) -{ - int ret; - unsigned char *msg_post = ssl->in_msg; - size_t len_pre = ssl->in_msglen; - unsigned char *msg_pre = ssl->compress_buf; - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "=> decompress buf" ) ); - - if( len_pre == 0 ) - return( 0 ); - - memcpy( msg_pre, ssl->in_msg, len_pre ); - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "before decompression: msglen = %d, ", - ssl->in_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "before decompression: input payload", - ssl->in_msg, ssl->in_msglen ); - - ssl->transform_in->ctx_inflate.next_in = msg_pre; - ssl->transform_in->ctx_inflate.avail_in = len_pre; - ssl->transform_in->ctx_inflate.next_out = msg_post; - ssl->transform_in->ctx_inflate.avail_out = MBEDTLS_SSL_MAX_CONTENT_LEN; - - ret = inflate( &ssl->transform_in->ctx_inflate, Z_SYNC_FLUSH ); - if( ret != Z_OK ) - { - MBEDTLS_SSL_DEBUG_MSG( 1, ( "failed to perform decompression (%d)", ret ) ); - return( MBEDTLS_ERR_SSL_COMPRESSION_FAILED ); - } - - ssl->in_msglen = MBEDTLS_SSL_MAX_CONTENT_LEN - - ssl->transform_in->ctx_inflate.avail_out; - - MBEDTLS_SSL_DEBUG_MSG( 3, ( "after decompression: msglen = %d, ", - ssl->in_msglen ) ); - - MBEDTLS_SSL_DEBUG_BUF( 4, "after decompression: input payload", - ssl->in_msg, ssl->in_msglen ); - - MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= decompress buf" ) ); - - return( 0 ); -} -#endif /* MBEDTLS_ZLIB_SUPPORT */ - #if defined(MBEDTLS_SSL_SRV_C) && defined(MBEDTLS_SSL_RENEGOTIATION) static int ssl_write_hello_request( mbedtls_ssl_context *ssl ); @@ -2472,17 +2337,17 @@ static int ssl_flight_append( mbedtls_ssl_context *ssl ) /* Allocate space for current message */ if( ( msg = (mbedtls_ssl_flight_item*) - mbedtls_calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL ) + calloc( 1, sizeof( mbedtls_ssl_flight_item ) ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", sizeof( mbedtls_ssl_flight_item ) ) ); return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); } - if( ( msg->p = (unsigned char*)mbedtls_calloc( 1, ssl->out_msglen ) ) == NULL ) + if( ( msg->p = (unsigned char*)calloc( 1, ssl->out_msglen ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc %d bytes failed", ssl->out_msglen ) ); - mbedtls_free( msg ); + free( msg ); return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); } @@ -2518,8 +2383,8 @@ static void ssl_flight_free( mbedtls_ssl_flight_item *flight ) { next = cur->next; - mbedtls_free( cur->p ); - mbedtls_free( cur ); + free( cur->p ); + free( cur ); cur = next; } @@ -2776,20 +2641,6 @@ int mbedtls_ssl_write_record( mbedtls_ssl_context *ssl ) } #endif -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->transform_out != NULL && - ssl->session_out->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ( ret = ssl_compress_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_compress_buf", ret ); - return( ret ); - } - - len = ssl->out_msglen; - } -#endif /*MBEDTLS_ZLIB_SUPPORT */ - #if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) if( mbedtls_ssl_hw_record_write != NULL ) { @@ -2951,7 +2802,7 @@ static int ssl_reassemble_dtls_handshake( mbedtls_ssl_context *ssl ) /* The bitmask needs one bit per byte of message excluding header */ alloc_len = 12 + msg_len + msg_len / 8 + ( msg_len % 8 != 0 ); - ssl->handshake->hs_msg = (unsigned char*)mbedtls_calloc( 1, alloc_len ); + ssl->handshake->hs_msg = (unsigned char*)calloc( 1, alloc_len ); if( ssl->handshake->hs_msg == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc failed (%d bytes)", alloc_len ) ); @@ -3058,7 +2909,7 @@ static int ssl_reassemble_dtls_handshake( mbedtls_ssl_context *ssl ) memcpy( ssl->in_msg, ssl->handshake->hs_msg, ssl->in_hslen ); - mbedtls_free( ssl->handshake->hs_msg ); + free( ssl->handshake->hs_msg ); ssl->handshake->hs_msg = NULL; MBEDTLS_SSL_DEBUG_BUF( 3, "reassembled handshake message", @@ -3189,7 +3040,7 @@ static void ssl_dtls_replay_reset( mbedtls_ssl_context *ssl ) ssl->in_window = 0; } -static inline uint64_t ssl_load_six_bytes( unsigned char *buf ) +static INLINE uint64_t ssl_load_six_bytes( unsigned char *buf ) { return( ( (uint64_t) buf[0] << 40 ) | ( (uint64_t) buf[1] << 32 ) | @@ -3681,18 +3532,6 @@ static int ssl_prepare_record_content( mbedtls_ssl_context *ssl ) } } -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->transform_in != NULL && - ssl->session_in->compression == MBEDTLS_SSL_COMPRESS_DEFLATE ) - { - if( ( ret = ssl_decompress_buf( ssl ) ) != 0 ) - { - MBEDTLS_SSL_DEBUG_RET( 1, "ssl_decompress_buf", ret ); - return( ret ); - } - } -#endif /* MBEDTLS_ZLIB_SUPPORT */ - #if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) if( ssl->conf->transport == MBEDTLS_SSL_TRANSPORT_DATAGRAM ) { @@ -4451,10 +4290,10 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ) if( ssl->session_negotiate->peer_cert != NULL ) { mbedtls_x509_crt_free( ssl->session_negotiate->peer_cert ); - mbedtls_free( ssl->session_negotiate->peer_cert ); + free( ssl->session_negotiate->peer_cert ); } - if( ( ssl->session_negotiate->peer_cert = (mbedtls_x509_crt*)mbedtls_calloc( 1, + if( ( ssl->session_negotiate->peer_cert = (mbedtls_x509_crt*)calloc( 1, sizeof( mbedtls_x509_crt ) ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", @@ -4665,18 +4504,6 @@ int mbedtls_ssl_parse_certificate( mbedtls_ssl_context *ssl ) mbedtls_ssl_send_alert_message( ssl, MBEDTLS_SSL_ALERT_LEVEL_FATAL, alert ); } - -#if defined(MBEDTLS_DEBUG_C) - if( ssl->session_negotiate->verify_result != 0 ) - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "! Certificate verification flags %x", - ssl->session_negotiate->verify_result ) ); - } - else - { - MBEDTLS_SSL_DEBUG_MSG( 3, ( "Certificate verification flags clear" ) ); - } -#endif /* MBEDTLS_DEBUG_C */ } MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= parse certificate" ) ); @@ -5145,7 +4972,7 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ) * Free our handshake params */ mbedtls_ssl_handshake_free( ssl->handshake ); - mbedtls_free( ssl->handshake ); + free( ssl->handshake ); ssl->handshake = NULL; /* @@ -5154,7 +4981,7 @@ static void ssl_handshake_wrapup_free_hs_transform( mbedtls_ssl_context *ssl ) if( ssl->transform ) { mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); + free( ssl->transform ); } ssl->transform = ssl->transform_negotiate; ssl->transform_negotiate = NULL; @@ -5188,7 +5015,7 @@ void mbedtls_ssl_handshake_wrapup( mbedtls_ssl_context *ssl ) #endif mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); + free( ssl->session ); } ssl->session = ssl->session_negotiate; ssl->session_negotiate = NULL; @@ -5462,13 +5289,6 @@ static void ssl_handshake_params_init( mbedtls_ssl_handshake_params *handshake ) #if defined(MBEDTLS_ECDH_C) mbedtls_ecdh_init( &handshake->ecdh_ctx ); #endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - mbedtls_ecjpake_init( &handshake->ecjpake_ctx ); -#if defined(MBEDTLS_SSL_CLI_C) - handshake->ecjpake_cache = NULL; - handshake->ecjpake_cache_len = 0; -#endif -#endif #if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) handshake->sni_authmode = MBEDTLS_SSL_VERIFY_UNSET; @@ -5507,17 +5327,17 @@ static int ssl_handshake_init( mbedtls_ssl_context *ssl ) */ if( ssl->transform_negotiate == NULL ) { - ssl->transform_negotiate = (mbedtls_ssl_transform*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_transform) ); + ssl->transform_negotiate = (mbedtls_ssl_transform*)calloc( 1, sizeof(mbedtls_ssl_transform) ); } if( ssl->session_negotiate == NULL ) { - ssl->session_negotiate = (mbedtls_ssl_session*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_session) ); + ssl->session_negotiate = (mbedtls_ssl_session*)calloc( 1, sizeof(mbedtls_ssl_session) ); } if( ssl->handshake == NULL ) { - ssl->handshake = (mbedtls_ssl_handshake_params*)mbedtls_calloc( 1, sizeof(mbedtls_ssl_handshake_params) ); + ssl->handshake = (mbedtls_ssl_handshake_params*)calloc( 1, sizeof(mbedtls_ssl_handshake_params) ); } /* All pointers should exist and can be directly freed without issue */ @@ -5527,9 +5347,9 @@ static int ssl_handshake_init( mbedtls_ssl_context *ssl ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc() of ssl sub-contexts failed" ) ); - mbedtls_free( ssl->handshake ); - mbedtls_free( ssl->transform_negotiate ); - mbedtls_free( ssl->session_negotiate ); + free( ssl->handshake ); + free( ssl->transform_negotiate ); + free( ssl->session_negotiate ); ssl->handshake = NULL; ssl->transform_negotiate = NULL; @@ -5611,11 +5431,11 @@ int mbedtls_ssl_setup( mbedtls_ssl_context *ssl, /* * Prepare base structures */ - if( ( ssl-> in_buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL || - ( ssl->out_buf = (unsigned char*)mbedtls_calloc( 1, len ) ) == NULL ) + if( ( ssl-> in_buf = (unsigned char*)calloc( 1, len ) ) == NULL || + ( ssl->out_buf = (unsigned char*)calloc( 1, len ) ) == NULL ) { MBEDTLS_SSL_DEBUG_MSG( 1, ( "alloc(%d bytes) failed", len ) ); - mbedtls_free( ssl->in_buf ); + free( ssl->in_buf ); ssl->in_buf = NULL; return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); } @@ -5734,14 +5554,14 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial ) if( ssl->transform ) { mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); + free( ssl->transform ); ssl->transform = NULL; } if( ssl->session ) { mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); + free( ssl->session ); ssl->session = NULL; } @@ -5752,7 +5572,7 @@ static int ssl_session_reset_int( mbedtls_ssl_context *ssl, int partial ) #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) if( partial == 0 ) { - mbedtls_free( ssl->cli_id ); + free( ssl->cli_id ); ssl->cli_id = NULL; ssl->cli_id_len = 0; } @@ -5938,7 +5758,7 @@ static int ssl_append_key_cert( mbedtls_ssl_key_cert **head, mbedtls_pk_context *key ) { mbedtls_ssl_key_cert *keycert = (mbedtls_ssl_key_cert*) - mbedtls_calloc( 1, sizeof( mbedtls_ssl_key_cert ) ); + calloc( 1, sizeof( mbedtls_ssl_key_cert ) ); if( keycert == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -6002,32 +5822,6 @@ void mbedtls_ssl_set_hs_authmode( mbedtls_ssl_context *ssl, } #endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) -/* - * Set EC J-PAKE password for current handshake - */ -int mbedtls_ssl_set_hs_ecjpake_password( mbedtls_ssl_context *ssl, - const unsigned char *pw, - size_t pw_len ) -{ - mbedtls_ecjpake_role role; - - if( ssl->handshake == NULL || ssl->conf == NULL ) - return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - - if( ssl->conf->endpoint == MBEDTLS_SSL_IS_SERVER ) - role = MBEDTLS_ECJPAKE_SERVER; - else - role = MBEDTLS_ECJPAKE_CLIENT; - - return( mbedtls_ecjpake_setup( &ssl->handshake->ecjpake_ctx, - role, - MBEDTLS_MD_SHA256, - MBEDTLS_ECP_DP_SECP256R1, - pw, pw_len ) ); -} -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ - #if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, const unsigned char *psk, size_t psk_len, @@ -6048,17 +5842,17 @@ int mbedtls_ssl_conf_psk( mbedtls_ssl_config *conf, if( conf->psk != NULL || conf->psk_identity != NULL ) { - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); + free( conf->psk ); + free( conf->psk_identity ); conf->psk = NULL; conf->psk_identity = NULL; } - if( ( conf->psk = (unsigned char*)mbedtls_calloc( 1, psk_len ) ) == NULL || - ( conf->psk_identity = (unsigned char*)mbedtls_calloc( 1, psk_identity_len ) ) == NULL ) + if( ( conf->psk = (unsigned char*)calloc( 1, psk_len ) ) == NULL || + ( conf->psk_identity = (unsigned char*)calloc( 1, psk_identity_len ) ) == NULL ) { - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); + free( conf->psk ); + free( conf->psk_identity ); conf->psk = NULL; conf->psk_identity = NULL; return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -6083,10 +5877,10 @@ int mbedtls_ssl_set_hs_psk( mbedtls_ssl_context *ssl, return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); if( ssl->handshake->psk != NULL ) - mbedtls_free( ssl->handshake->psk ); + free( ssl->handshake->psk ); if( ( ssl->handshake->psk = (unsigned char*) - mbedtls_calloc( 1, psk_len ) ) == NULL ) + calloc( 1, psk_len ) ) == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); ssl->handshake->psk_len = psk_len; @@ -6186,7 +5980,7 @@ int mbedtls_ssl_set_hostname( mbedtls_ssl_context *ssl, const char *hostname ) if( hostname_len > MBEDTLS_SSL_MAX_HOST_NAME_LEN ) return( MBEDTLS_ERR_SSL_BAD_INPUT_DATA ); - ssl->hostname = (char*)mbedtls_calloc( 1, hostname_len + 1 ); + ssl->hostname = (char*)calloc( 1, hostname_len + 1 ); if( ssl->hostname == NULL ) return( MBEDTLS_ERR_SSL_ALLOC_FAILED ); @@ -6443,11 +6237,6 @@ int mbedtls_ssl_get_record_expansion( const mbedtls_ssl_context *ssl ) size_t transform_expansion; const mbedtls_ssl_transform *transform = ssl->transform_out; -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->session_out->compression != MBEDTLS_SSL_COMPRESS_NULL ) - return( MBEDTLS_ERR_SSL_FEATURE_UNAVAILABLE ); -#endif - if( transform == NULL ) return( (int) mbedtls_ssl_hdr_len( ssl ) ); @@ -7207,11 +6996,6 @@ void mbedtls_ssl_transform_free( mbedtls_ssl_transform *transform ) if( transform == NULL ) return; -#if defined(MBEDTLS_ZLIB_SUPPORT) - deflateEnd( &transform->ctx_deflate ); - inflateEnd( &transform->ctx_inflate ); -#endif - mbedtls_cipher_free( &transform->cipher_ctx_enc ); mbedtls_cipher_free( &transform->cipher_ctx_dec ); @@ -7229,7 +7013,7 @@ static void ssl_key_cert_free( mbedtls_ssl_key_cert *key_cert ) while( cur != NULL ) { next = cur->next; - mbedtls_free( cur ); + free( cur ); cur = next; } } @@ -7260,26 +7044,17 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake ) #if defined(MBEDTLS_ECDH_C) mbedtls_ecdh_free( &handshake->ecdh_ctx ); #endif -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - mbedtls_ecjpake_free( &handshake->ecjpake_ctx ); -#if defined(MBEDTLS_SSL_CLI_C) - mbedtls_free( handshake->ecjpake_cache ); - handshake->ecjpake_cache = NULL; - handshake->ecjpake_cache_len = 0; -#endif -#endif -#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) || \ - defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) +#if defined(MBEDTLS_ECDH_C) || defined(MBEDTLS_ECDSA_C) /* explicit void pointer cast for buggy MS compiler */ - mbedtls_free( (void *) handshake->curves ); + free( (void *) handshake->curves ); #endif #if defined(MBEDTLS_KEY_EXCHANGE__SOME__PSK_ENABLED) if( handshake->psk != NULL ) { mbedtls_zeroize( handshake->psk, handshake->psk_len ); - mbedtls_free( handshake->psk ); + free( handshake->psk ); } #endif @@ -7296,15 +7071,15 @@ void mbedtls_ssl_handshake_free( mbedtls_ssl_handshake_params *handshake ) while( cur != NULL ) { next = cur->next; - mbedtls_free( cur ); + free( cur ); cur = next; } } #endif /* MBEDTLS_X509_CRT_PARSE_C && MBEDTLS_SSL_SERVER_NAME_INDICATION */ #if defined(MBEDTLS_SSL_PROTO_DTLS) - mbedtls_free( handshake->verify_cookie ); - mbedtls_free( handshake->hs_msg ); + free( handshake->verify_cookie ); + free( handshake->hs_msg ); ssl_flight_free( handshake->flight ); #endif @@ -7320,12 +7095,12 @@ void mbedtls_ssl_session_free( mbedtls_ssl_session *session ) if( session->peer_cert != NULL ) { mbedtls_x509_crt_free( session->peer_cert ); - mbedtls_free( session->peer_cert ); + free( session->peer_cert ); } #endif #if defined(MBEDTLS_SSL_SESSION_TICKETS) && defined(MBEDTLS_SSL_CLI_C) - mbedtls_free( session->ticket ); + free( session->ticket ); #endif mbedtls_zeroize( session, sizeof( mbedtls_ssl_session ) ); @@ -7344,27 +7119,19 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) if( ssl->out_buf != NULL ) { mbedtls_zeroize( ssl->out_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->out_buf ); + free( ssl->out_buf ); } if( ssl->in_buf != NULL ) { mbedtls_zeroize( ssl->in_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->in_buf ); + free( ssl->in_buf ); } -#if defined(MBEDTLS_ZLIB_SUPPORT) - if( ssl->compress_buf != NULL ) - { - mbedtls_zeroize( ssl->compress_buf, MBEDTLS_SSL_BUFFER_LEN ); - mbedtls_free( ssl->compress_buf ); - } -#endif - if( ssl->transform ) { mbedtls_ssl_transform_free( ssl->transform ); - mbedtls_free( ssl->transform ); + free( ssl->transform ); } if( ssl->handshake ) @@ -7373,22 +7140,22 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) mbedtls_ssl_transform_free( ssl->transform_negotiate ); mbedtls_ssl_session_free( ssl->session_negotiate ); - mbedtls_free( ssl->handshake ); - mbedtls_free( ssl->transform_negotiate ); - mbedtls_free( ssl->session_negotiate ); + free( ssl->handshake ); + free( ssl->transform_negotiate ); + free( ssl->session_negotiate ); } if( ssl->session ) { mbedtls_ssl_session_free( ssl->session ); - mbedtls_free( ssl->session ); + free( ssl->session ); } #if defined(MBEDTLS_X509_CRT_PARSE_C) if( ssl->hostname != NULL ) { mbedtls_zeroize( ssl->hostname, strlen( ssl->hostname ) ); - mbedtls_free( ssl->hostname ); + free( ssl->hostname ); } #endif @@ -7401,7 +7168,7 @@ void mbedtls_ssl_free( mbedtls_ssl_context *ssl ) #endif #if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) && defined(MBEDTLS_SSL_SRV_C) - mbedtls_free( ssl->cli_id ); + free( ssl->cli_id ); #endif MBEDTLS_SSL_DEBUG_MSG( 2, ( "<= free" ) ); @@ -7625,8 +7392,8 @@ void mbedtls_ssl_config_free( mbedtls_ssl_config *conf ) { mbedtls_zeroize( conf->psk, conf->psk_len ); mbedtls_zeroize( conf->psk_identity, conf->psk_identity_len ); - mbedtls_free( conf->psk ); - mbedtls_free( conf->psk_identity ); + free( conf->psk ); + free( conf->psk_identity ); conf->psk_len = 0; conf->psk_identity_len = 0; } diff --git a/deps/mbedtls/timing.c b/deps/mbedtls/timing.c index f620d09ee4..2ca0f75ecc 100644 --- a/deps/mbedtls/timing.c +++ b/deps/mbedtls/timing.c @@ -25,19 +25,10 @@ #include MBEDTLS_CONFIG_FILE #endif -#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif - #if defined(MBEDTLS_TIMING_C) #include "mbedtls/timing.h" -#if !defined(MBEDTLS_TIMING_ALT) - #if !defined(unix) && !defined(__unix__) && !defined(__unix) && \ !defined(__APPLE__) && !defined(_WIN32) && !defined(__HAIKU__) #error "This module only works on Unix and Windows, see MBEDTLS_TIMING_C in config.h" @@ -355,171 +346,4 @@ int mbedtls_timing_get_delay( void *data ) return( 0 ); } -#endif /* !MBEDTLS_TIMING_ALT */ - -#if defined(MBEDTLS_SELF_TEST) - -/* - * Busy-waits for the given number of milliseconds. - * Used for testing mbedtls_timing_hardclock. - */ -static void busy_msleep( unsigned long msec ) -{ - struct mbedtls_timing_hr_time hires; - unsigned long i = 0; /* for busy-waiting */ - volatile unsigned long j; /* to prevent optimisation */ - - (void) mbedtls_timing_get_timer( &hires, 1 ); - - while( mbedtls_timing_get_timer( &hires, 0 ) < msec ) - i++; - - j = i; - (void) j; -} - -#define FAIL do \ -{ \ - if( verbose != 0 ) \ - mbedtls_printf( "failed\n" ); \ - \ - return( 1 ); \ -} while( 0 ) - -/* - * Checkup routine - * - * Warning: this is work in progress, some tests may not be reliable enough - * yet! False positives may happen. - */ -int mbedtls_timing_self_test( int verbose ) -{ - unsigned long cycles, ratio; - unsigned long millisecs, secs; - int hardfail; - struct mbedtls_timing_hr_time hires; - uint32_t a, b; - mbedtls_timing_delay_context ctx; - - if( verbose != 0 ) - mbedtls_printf( " TIMING tests note: will take some time!\n" ); - - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #1 (set_alarm / get_timer): " ); - - for( secs = 1; secs <= 3; secs++ ) - { - (void) mbedtls_timing_get_timer( &hires, 1 ); - - mbedtls_set_alarm( (int) secs ); - while( !mbedtls_timing_alarmed ) - ; - - millisecs = mbedtls_timing_get_timer( &hires, 0 ); - - /* For some reason on Windows it looks like alarm has an extra delay - * (maybe related to creating a new thread). Allow some room here. */ - if( millisecs < 800 * secs || millisecs > 1200 * secs + 300 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( 1 ); - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #2 (set/get_delay ): " ); - - for( a = 200; a <= 400; a += 200 ) - { - for( b = 200; b <= 400; b += 200 ) - { - mbedtls_timing_set_delay( &ctx, a, a + b ); - - busy_msleep( a - a / 8 ); - if( mbedtls_timing_get_delay( &ctx ) != 0 ) - FAIL; - - busy_msleep( a / 4 ); - if( mbedtls_timing_get_delay( &ctx ) != 1 ) - FAIL; - - busy_msleep( b - a / 8 - b / 8 ); - if( mbedtls_timing_get_delay( &ctx ) != 1 ) - FAIL; - - busy_msleep( b / 4 ); - if( mbedtls_timing_get_delay( &ctx ) != 2 ) - FAIL; - } - } - - mbedtls_timing_set_delay( &ctx, 0, 0 ); - busy_msleep( 200 ); - if( mbedtls_timing_get_delay( &ctx ) != -1 ) - FAIL; - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - - if( verbose != 0 ) - mbedtls_printf( " TIMING test #3 (hardclock / get_timer): " ); - - /* - * Allow one failure for possible counter wrapping. - * On a 4Ghz 32-bit machine the cycle counter wraps about once per second; - * since the whole test is about 10ms, it shouldn't happen twice in a row. - */ - hardfail = 0; - -hard_test: - if( hardfail > 1 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed (ignored)\n" ); - - goto hard_test_done; - } - - /* Get a reference ratio cycles/ms */ - millisecs = 1; - cycles = mbedtls_timing_hardclock(); - busy_msleep( millisecs ); - cycles = mbedtls_timing_hardclock() - cycles; - ratio = cycles / millisecs; - - /* Check that the ratio is mostly constant */ - for( millisecs = 2; millisecs <= 4; millisecs++ ) - { - cycles = mbedtls_timing_hardclock(); - busy_msleep( millisecs ); - cycles = mbedtls_timing_hardclock() - cycles; - - /* Allow variation up to 20% */ - if( cycles / millisecs < ratio - ratio / 5 || - cycles / millisecs > ratio + ratio / 5 ) - { - hardfail++; - goto hard_test; - } - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - -hard_test_done: - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - - return( 0 ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_TIMING_C */ diff --git a/deps/mbedtls/version.c b/deps/mbedtls/version.c deleted file mode 100644 index 6ca80d4695..0000000000 --- a/deps/mbedtls/version.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Version information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_VERSION_C) - -#include "mbedtls/version.h" -#include - -unsigned int mbedtls_version_get_number() -{ - return( MBEDTLS_VERSION_NUMBER ); -} - -void mbedtls_version_get_string( char *string ) -{ - memcpy( string, MBEDTLS_VERSION_STRING, - sizeof( MBEDTLS_VERSION_STRING ) ); -} - -void mbedtls_version_get_string_full( char *string ) -{ - memcpy( string, MBEDTLS_VERSION_STRING_FULL, - sizeof( MBEDTLS_VERSION_STRING_FULL ) ); -} - -#endif /* MBEDTLS_VERSION_C */ diff --git a/deps/mbedtls/version_features.c b/deps/mbedtls/version_features.c deleted file mode 100644 index 5cbe8aca37..0000000000 --- a/deps/mbedtls/version_features.c +++ /dev/null @@ -1,683 +0,0 @@ -/* - * Version feature information - * - * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * This file is part of mbed TLS (https://tls.mbed.org) - */ - -#if !defined(MBEDTLS_CONFIG_FILE) -#include "mbedtls/config.h" -#else -#include MBEDTLS_CONFIG_FILE -#endif - -#if defined(MBEDTLS_VERSION_C) - -#include "mbedtls/version.h" - -#include - -static const char *features[] = { -#if defined(MBEDTLS_VERSION_FEATURES) -#if defined(MBEDTLS_HAVE_ASM) - "MBEDTLS_HAVE_ASM", -#endif /* MBEDTLS_HAVE_ASM */ -#if defined(MBEDTLS_NO_UDBL_DIVISION) - "MBEDTLS_NO_UDBL_DIVISION", -#endif /* MBEDTLS_NO_UDBL_DIVISION */ -#if defined(MBEDTLS_HAVE_SSE2) - "MBEDTLS_HAVE_SSE2", -#endif /* MBEDTLS_HAVE_SSE2 */ -#if defined(MBEDTLS_HAVE_TIME) - "MBEDTLS_HAVE_TIME", -#endif /* MBEDTLS_HAVE_TIME */ -#if defined(MBEDTLS_HAVE_TIME_DATE) - "MBEDTLS_HAVE_TIME_DATE", -#endif /* MBEDTLS_HAVE_TIME_DATE */ -#if defined(MBEDTLS_PLATFORM_MEMORY) - "MBEDTLS_PLATFORM_MEMORY", -#endif /* MBEDTLS_PLATFORM_MEMORY */ -#if defined(MBEDTLS_PLATFORM_NO_STD_FUNCTIONS) - "MBEDTLS_PLATFORM_NO_STD_FUNCTIONS", -#endif /* MBEDTLS_PLATFORM_NO_STD_FUNCTIONS */ -#if defined(MBEDTLS_PLATFORM_EXIT_ALT) - "MBEDTLS_PLATFORM_EXIT_ALT", -#endif /* MBEDTLS_PLATFORM_EXIT_ALT */ -#if defined(MBEDTLS_PLATFORM_TIME_ALT) - "MBEDTLS_PLATFORM_TIME_ALT", -#endif /* MBEDTLS_PLATFORM_TIME_ALT */ -#if defined(MBEDTLS_PLATFORM_FPRINTF_ALT) - "MBEDTLS_PLATFORM_FPRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_FPRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_PRINTF_ALT) - "MBEDTLS_PLATFORM_PRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_PRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_SNPRINTF_ALT) - "MBEDTLS_PLATFORM_SNPRINTF_ALT", -#endif /* MBEDTLS_PLATFORM_SNPRINTF_ALT */ -#if defined(MBEDTLS_PLATFORM_NV_SEED_ALT) - "MBEDTLS_PLATFORM_NV_SEED_ALT", -#endif /* MBEDTLS_PLATFORM_NV_SEED_ALT */ -#if defined(MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT) - "MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT", -#endif /* MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT */ -#if defined(MBEDTLS_DEPRECATED_WARNING) - "MBEDTLS_DEPRECATED_WARNING", -#endif /* MBEDTLS_DEPRECATED_WARNING */ -#if defined(MBEDTLS_DEPRECATED_REMOVED) - "MBEDTLS_DEPRECATED_REMOVED", -#endif /* MBEDTLS_DEPRECATED_REMOVED */ -#if defined(MBEDTLS_TIMING_ALT) - "MBEDTLS_TIMING_ALT", -#endif /* MBEDTLS_TIMING_ALT */ -#if defined(MBEDTLS_AES_ALT) - "MBEDTLS_AES_ALT", -#endif /* MBEDTLS_AES_ALT */ -#if defined(MBEDTLS_ARC4_ALT) - "MBEDTLS_ARC4_ALT", -#endif /* MBEDTLS_ARC4_ALT */ -#if defined(MBEDTLS_BLOWFISH_ALT) - "MBEDTLS_BLOWFISH_ALT", -#endif /* MBEDTLS_BLOWFISH_ALT */ -#if defined(MBEDTLS_CAMELLIA_ALT) - "MBEDTLS_CAMELLIA_ALT", -#endif /* MBEDTLS_CAMELLIA_ALT */ -#if defined(MBEDTLS_DES_ALT) - "MBEDTLS_DES_ALT", -#endif /* MBEDTLS_DES_ALT */ -#if defined(MBEDTLS_XTEA_ALT) - "MBEDTLS_XTEA_ALT", -#endif /* MBEDTLS_XTEA_ALT */ -#if defined(MBEDTLS_MD2_ALT) - "MBEDTLS_MD2_ALT", -#endif /* MBEDTLS_MD2_ALT */ -#if defined(MBEDTLS_MD4_ALT) - "MBEDTLS_MD4_ALT", -#endif /* MBEDTLS_MD4_ALT */ -#if defined(MBEDTLS_MD5_ALT) - "MBEDTLS_MD5_ALT", -#endif /* MBEDTLS_MD5_ALT */ -#if defined(MBEDTLS_RIPEMD160_ALT) - "MBEDTLS_RIPEMD160_ALT", -#endif /* MBEDTLS_RIPEMD160_ALT */ -#if defined(MBEDTLS_SHA1_ALT) - "MBEDTLS_SHA1_ALT", -#endif /* MBEDTLS_SHA1_ALT */ -#if defined(MBEDTLS_SHA256_ALT) - "MBEDTLS_SHA256_ALT", -#endif /* MBEDTLS_SHA256_ALT */ -#if defined(MBEDTLS_SHA512_ALT) - "MBEDTLS_SHA512_ALT", -#endif /* MBEDTLS_SHA512_ALT */ -#if defined(MBEDTLS_ECP_ALT) - "MBEDTLS_ECP_ALT", -#endif /* MBEDTLS_ECP_ALT */ -#if defined(MBEDTLS_MD2_PROCESS_ALT) - "MBEDTLS_MD2_PROCESS_ALT", -#endif /* MBEDTLS_MD2_PROCESS_ALT */ -#if defined(MBEDTLS_MD4_PROCESS_ALT) - "MBEDTLS_MD4_PROCESS_ALT", -#endif /* MBEDTLS_MD4_PROCESS_ALT */ -#if defined(MBEDTLS_MD5_PROCESS_ALT) - "MBEDTLS_MD5_PROCESS_ALT", -#endif /* MBEDTLS_MD5_PROCESS_ALT */ -#if defined(MBEDTLS_RIPEMD160_PROCESS_ALT) - "MBEDTLS_RIPEMD160_PROCESS_ALT", -#endif /* MBEDTLS_RIPEMD160_PROCESS_ALT */ -#if defined(MBEDTLS_SHA1_PROCESS_ALT) - "MBEDTLS_SHA1_PROCESS_ALT", -#endif /* MBEDTLS_SHA1_PROCESS_ALT */ -#if defined(MBEDTLS_SHA256_PROCESS_ALT) - "MBEDTLS_SHA256_PROCESS_ALT", -#endif /* MBEDTLS_SHA256_PROCESS_ALT */ -#if defined(MBEDTLS_SHA512_PROCESS_ALT) - "MBEDTLS_SHA512_PROCESS_ALT", -#endif /* MBEDTLS_SHA512_PROCESS_ALT */ -#if defined(MBEDTLS_DES_SETKEY_ALT) - "MBEDTLS_DES_SETKEY_ALT", -#endif /* MBEDTLS_DES_SETKEY_ALT */ -#if defined(MBEDTLS_DES_CRYPT_ECB_ALT) - "MBEDTLS_DES_CRYPT_ECB_ALT", -#endif /* MBEDTLS_DES_CRYPT_ECB_ALT */ -#if defined(MBEDTLS_DES3_CRYPT_ECB_ALT) - "MBEDTLS_DES3_CRYPT_ECB_ALT", -#endif /* MBEDTLS_DES3_CRYPT_ECB_ALT */ -#if defined(MBEDTLS_AES_SETKEY_ENC_ALT) - "MBEDTLS_AES_SETKEY_ENC_ALT", -#endif /* MBEDTLS_AES_SETKEY_ENC_ALT */ -#if defined(MBEDTLS_AES_SETKEY_DEC_ALT) - "MBEDTLS_AES_SETKEY_DEC_ALT", -#endif /* MBEDTLS_AES_SETKEY_DEC_ALT */ -#if defined(MBEDTLS_AES_ENCRYPT_ALT) - "MBEDTLS_AES_ENCRYPT_ALT", -#endif /* MBEDTLS_AES_ENCRYPT_ALT */ -#if defined(MBEDTLS_AES_DECRYPT_ALT) - "MBEDTLS_AES_DECRYPT_ALT", -#endif /* MBEDTLS_AES_DECRYPT_ALT */ -#if defined(MBEDTLS_ECP_INTERNAL_ALT) - "MBEDTLS_ECP_INTERNAL_ALT", -#endif /* MBEDTLS_ECP_INTERNAL_ALT */ -#if defined(MBEDTLS_ECP_RANDOMIZE_JAC_ALT) - "MBEDTLS_ECP_RANDOMIZE_JAC_ALT", -#endif /* MBEDTLS_ECP_RANDOMIZE_JAC_ALT */ -#if defined(MBEDTLS_ECP_ADD_MIXED_ALT) - "MBEDTLS_ECP_ADD_MIXED_ALT", -#endif /* MBEDTLS_ECP_ADD_MIXED_ALT */ -#if defined(MBEDTLS_ECP_DOUBLE_JAC_ALT) - "MBEDTLS_ECP_DOUBLE_JAC_ALT", -#endif /* MBEDTLS_ECP_DOUBLE_JAC_ALT */ -#if defined(MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT) - "MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT", -#endif /* MBEDTLS_ECP_NORMALIZE_JAC_MANY_ALT */ -#if defined(MBEDTLS_ECP_NORMALIZE_JAC_ALT) - "MBEDTLS_ECP_NORMALIZE_JAC_ALT", -#endif /* MBEDTLS_ECP_NORMALIZE_JAC_ALT */ -#if defined(MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT) - "MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT", -#endif /* MBEDTLS_ECP_DOUBLE_ADD_MXZ_ALT */ -#if defined(MBEDTLS_ECP_RANDOMIZE_MXZ_ALT) - "MBEDTLS_ECP_RANDOMIZE_MXZ_ALT", -#endif /* MBEDTLS_ECP_RANDOMIZE_MXZ_ALT */ -#if defined(MBEDTLS_ECP_NORMALIZE_MXZ_ALT) - "MBEDTLS_ECP_NORMALIZE_MXZ_ALT", -#endif /* MBEDTLS_ECP_NORMALIZE_MXZ_ALT */ -#if defined(MBEDTLS_TEST_NULL_ENTROPY) - "MBEDTLS_TEST_NULL_ENTROPY", -#endif /* MBEDTLS_TEST_NULL_ENTROPY */ -#if defined(MBEDTLS_ENTROPY_HARDWARE_ALT) - "MBEDTLS_ENTROPY_HARDWARE_ALT", -#endif /* MBEDTLS_ENTROPY_HARDWARE_ALT */ -#if defined(MBEDTLS_AES_ROM_TABLES) - "MBEDTLS_AES_ROM_TABLES", -#endif /* MBEDTLS_AES_ROM_TABLES */ -#if defined(MBEDTLS_CAMELLIA_SMALL_MEMORY) - "MBEDTLS_CAMELLIA_SMALL_MEMORY", -#endif /* MBEDTLS_CAMELLIA_SMALL_MEMORY */ -#if defined(MBEDTLS_CIPHER_MODE_CBC) - "MBEDTLS_CIPHER_MODE_CBC", -#endif /* MBEDTLS_CIPHER_MODE_CBC */ -#if defined(MBEDTLS_CIPHER_MODE_CFB) - "MBEDTLS_CIPHER_MODE_CFB", -#endif /* MBEDTLS_CIPHER_MODE_CFB */ -#if defined(MBEDTLS_CIPHER_MODE_CTR) - "MBEDTLS_CIPHER_MODE_CTR", -#endif /* MBEDTLS_CIPHER_MODE_CTR */ -#if defined(MBEDTLS_CIPHER_NULL_CIPHER) - "MBEDTLS_CIPHER_NULL_CIPHER", -#endif /* MBEDTLS_CIPHER_NULL_CIPHER */ -#if defined(MBEDTLS_CIPHER_PADDING_PKCS7) - "MBEDTLS_CIPHER_PADDING_PKCS7", -#endif /* MBEDTLS_CIPHER_PADDING_PKCS7 */ -#if defined(MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS) - "MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS", -#endif /* MBEDTLS_CIPHER_PADDING_ONE_AND_ZEROS */ -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN) - "MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN", -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS_AND_LEN */ -#if defined(MBEDTLS_CIPHER_PADDING_ZEROS) - "MBEDTLS_CIPHER_PADDING_ZEROS", -#endif /* MBEDTLS_CIPHER_PADDING_ZEROS */ -#if defined(MBEDTLS_ENABLE_WEAK_CIPHERSUITES) - "MBEDTLS_ENABLE_WEAK_CIPHERSUITES", -#endif /* MBEDTLS_ENABLE_WEAK_CIPHERSUITES */ -#if defined(MBEDTLS_REMOVE_ARC4_CIPHERSUITES) - "MBEDTLS_REMOVE_ARC4_CIPHERSUITES", -#endif /* MBEDTLS_REMOVE_ARC4_CIPHERSUITES */ -#if defined(MBEDTLS_ECP_DP_SECP192R1_ENABLED) - "MBEDTLS_ECP_DP_SECP192R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP192R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP224R1_ENABLED) - "MBEDTLS_ECP_DP_SECP224R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP224R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP256R1_ENABLED) - "MBEDTLS_ECP_DP_SECP256R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP256R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP384R1_ENABLED) - "MBEDTLS_ECP_DP_SECP384R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP384R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP521R1_ENABLED) - "MBEDTLS_ECP_DP_SECP521R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP521R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP192K1_ENABLED) - "MBEDTLS_ECP_DP_SECP192K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP192K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP224K1_ENABLED) - "MBEDTLS_ECP_DP_SECP224K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP224K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_SECP256K1_ENABLED) - "MBEDTLS_ECP_DP_SECP256K1_ENABLED", -#endif /* MBEDTLS_ECP_DP_SECP256K1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP256R1_ENABLED) - "MBEDTLS_ECP_DP_BP256R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP256R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP384R1_ENABLED) - "MBEDTLS_ECP_DP_BP384R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP384R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_BP512R1_ENABLED) - "MBEDTLS_ECP_DP_BP512R1_ENABLED", -#endif /* MBEDTLS_ECP_DP_BP512R1_ENABLED */ -#if defined(MBEDTLS_ECP_DP_CURVE25519_ENABLED) - "MBEDTLS_ECP_DP_CURVE25519_ENABLED", -#endif /* MBEDTLS_ECP_DP_CURVE25519_ENABLED */ -#if defined(MBEDTLS_ECP_NIST_OPTIM) - "MBEDTLS_ECP_NIST_OPTIM", -#endif /* MBEDTLS_ECP_NIST_OPTIM */ -#if defined(MBEDTLS_ECDSA_DETERMINISTIC) - "MBEDTLS_ECDSA_DETERMINISTIC", -#endif /* MBEDTLS_ECDSA_DETERMINISTIC */ -#if defined(MBEDTLS_KEY_EXCHANGE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED) - "MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_DHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED */ -#if defined(MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED) - "MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED", -#endif /* MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED */ -#if defined(MBEDTLS_PK_PARSE_EC_EXTENDED) - "MBEDTLS_PK_PARSE_EC_EXTENDED", -#endif /* MBEDTLS_PK_PARSE_EC_EXTENDED */ -#if defined(MBEDTLS_ERROR_STRERROR_DUMMY) - "MBEDTLS_ERROR_STRERROR_DUMMY", -#endif /* MBEDTLS_ERROR_STRERROR_DUMMY */ -#if defined(MBEDTLS_GENPRIME) - "MBEDTLS_GENPRIME", -#endif /* MBEDTLS_GENPRIME */ -#if defined(MBEDTLS_FS_IO) - "MBEDTLS_FS_IO", -#endif /* MBEDTLS_FS_IO */ -#if defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) - "MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES", -#endif /* MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES */ -#if defined(MBEDTLS_NO_PLATFORM_ENTROPY) - "MBEDTLS_NO_PLATFORM_ENTROPY", -#endif /* MBEDTLS_NO_PLATFORM_ENTROPY */ -#if defined(MBEDTLS_ENTROPY_FORCE_SHA256) - "MBEDTLS_ENTROPY_FORCE_SHA256", -#endif /* MBEDTLS_ENTROPY_FORCE_SHA256 */ -#if defined(MBEDTLS_ENTROPY_NV_SEED) - "MBEDTLS_ENTROPY_NV_SEED", -#endif /* MBEDTLS_ENTROPY_NV_SEED */ -#if defined(MBEDTLS_MEMORY_DEBUG) - "MBEDTLS_MEMORY_DEBUG", -#endif /* MBEDTLS_MEMORY_DEBUG */ -#if defined(MBEDTLS_MEMORY_BACKTRACE) - "MBEDTLS_MEMORY_BACKTRACE", -#endif /* MBEDTLS_MEMORY_BACKTRACE */ -#if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) - "MBEDTLS_PK_RSA_ALT_SUPPORT", -#endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ -#if defined(MBEDTLS_PKCS1_V15) - "MBEDTLS_PKCS1_V15", -#endif /* MBEDTLS_PKCS1_V15 */ -#if defined(MBEDTLS_PKCS1_V21) - "MBEDTLS_PKCS1_V21", -#endif /* MBEDTLS_PKCS1_V21 */ -#if defined(MBEDTLS_RSA_NO_CRT) - "MBEDTLS_RSA_NO_CRT", -#endif /* MBEDTLS_RSA_NO_CRT */ -#if defined(MBEDTLS_SELF_TEST) - "MBEDTLS_SELF_TEST", -#endif /* MBEDTLS_SELF_TEST */ -#if defined(MBEDTLS_SHA256_SMALLER) - "MBEDTLS_SHA256_SMALLER", -#endif /* MBEDTLS_SHA256_SMALLER */ -#if defined(MBEDTLS_SSL_ALL_ALERT_MESSAGES) - "MBEDTLS_SSL_ALL_ALERT_MESSAGES", -#endif /* MBEDTLS_SSL_ALL_ALERT_MESSAGES */ -#if defined(MBEDTLS_SSL_DEBUG_ALL) - "MBEDTLS_SSL_DEBUG_ALL", -#endif /* MBEDTLS_SSL_DEBUG_ALL */ -#if defined(MBEDTLS_SSL_ENCRYPT_THEN_MAC) - "MBEDTLS_SSL_ENCRYPT_THEN_MAC", -#endif /* MBEDTLS_SSL_ENCRYPT_THEN_MAC */ -#if defined(MBEDTLS_SSL_EXTENDED_MASTER_SECRET) - "MBEDTLS_SSL_EXTENDED_MASTER_SECRET", -#endif /* MBEDTLS_SSL_EXTENDED_MASTER_SECRET */ -#if defined(MBEDTLS_SSL_FALLBACK_SCSV) - "MBEDTLS_SSL_FALLBACK_SCSV", -#endif /* MBEDTLS_SSL_FALLBACK_SCSV */ -#if defined(MBEDTLS_SSL_HW_RECORD_ACCEL) - "MBEDTLS_SSL_HW_RECORD_ACCEL", -#endif /* MBEDTLS_SSL_HW_RECORD_ACCEL */ -#if defined(MBEDTLS_SSL_CBC_RECORD_SPLITTING) - "MBEDTLS_SSL_CBC_RECORD_SPLITTING", -#endif /* MBEDTLS_SSL_CBC_RECORD_SPLITTING */ -#if defined(MBEDTLS_SSL_RENEGOTIATION) - "MBEDTLS_SSL_RENEGOTIATION", -#endif /* MBEDTLS_SSL_RENEGOTIATION */ -#if defined(MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO) - "MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO", -#endif /* MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO */ -#if defined(MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE) - "MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE", -#endif /* MBEDTLS_SSL_SRV_RESPECT_CLIENT_PREFERENCE */ -#if defined(MBEDTLS_SSL_MAX_FRAGMENT_LENGTH) - "MBEDTLS_SSL_MAX_FRAGMENT_LENGTH", -#endif /* MBEDTLS_SSL_MAX_FRAGMENT_LENGTH */ -#if defined(MBEDTLS_SSL_PROTO_SSL3) - "MBEDTLS_SSL_PROTO_SSL3", -#endif /* MBEDTLS_SSL_PROTO_SSL3 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1) - "MBEDTLS_SSL_PROTO_TLS1", -#endif /* MBEDTLS_SSL_PROTO_TLS1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_1) - "MBEDTLS_SSL_PROTO_TLS1_1", -#endif /* MBEDTLS_SSL_PROTO_TLS1_1 */ -#if defined(MBEDTLS_SSL_PROTO_TLS1_2) - "MBEDTLS_SSL_PROTO_TLS1_2", -#endif /* MBEDTLS_SSL_PROTO_TLS1_2 */ -#if defined(MBEDTLS_SSL_PROTO_DTLS) - "MBEDTLS_SSL_PROTO_DTLS", -#endif /* MBEDTLS_SSL_PROTO_DTLS */ -#if defined(MBEDTLS_SSL_ALPN) - "MBEDTLS_SSL_ALPN", -#endif /* MBEDTLS_SSL_ALPN */ -#if defined(MBEDTLS_SSL_DTLS_ANTI_REPLAY) - "MBEDTLS_SSL_DTLS_ANTI_REPLAY", -#endif /* MBEDTLS_SSL_DTLS_ANTI_REPLAY */ -#if defined(MBEDTLS_SSL_DTLS_HELLO_VERIFY) - "MBEDTLS_SSL_DTLS_HELLO_VERIFY", -#endif /* MBEDTLS_SSL_DTLS_HELLO_VERIFY */ -#if defined(MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE) - "MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE", -#endif /* MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE */ -#if defined(MBEDTLS_SSL_DTLS_BADMAC_LIMIT) - "MBEDTLS_SSL_DTLS_BADMAC_LIMIT", -#endif /* MBEDTLS_SSL_DTLS_BADMAC_LIMIT */ -#if defined(MBEDTLS_SSL_SESSION_TICKETS) - "MBEDTLS_SSL_SESSION_TICKETS", -#endif /* MBEDTLS_SSL_SESSION_TICKETS */ -#if defined(MBEDTLS_SSL_EXPORT_KEYS) - "MBEDTLS_SSL_EXPORT_KEYS", -#endif /* MBEDTLS_SSL_EXPORT_KEYS */ -#if defined(MBEDTLS_SSL_SERVER_NAME_INDICATION) - "MBEDTLS_SSL_SERVER_NAME_INDICATION", -#endif /* MBEDTLS_SSL_SERVER_NAME_INDICATION */ -#if defined(MBEDTLS_SSL_TRUNCATED_HMAC) - "MBEDTLS_SSL_TRUNCATED_HMAC", -#endif /* MBEDTLS_SSL_TRUNCATED_HMAC */ -#if defined(MBEDTLS_THREADING_ALT) - "MBEDTLS_THREADING_ALT", -#endif /* MBEDTLS_THREADING_ALT */ -#if defined(MBEDTLS_THREADING_PTHREAD) - "MBEDTLS_THREADING_PTHREAD", -#endif /* MBEDTLS_THREADING_PTHREAD */ -#if defined(MBEDTLS_VERSION_FEATURES) - "MBEDTLS_VERSION_FEATURES", -#endif /* MBEDTLS_VERSION_FEATURES */ -#if defined(MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3) - "MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3", -#endif /* MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3 */ -#if defined(MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION) - "MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION", -#endif /* MBEDTLS_X509_ALLOW_UNSUPPORTED_CRITICAL_EXTENSION */ -#if defined(MBEDTLS_X509_CHECK_KEY_USAGE) - "MBEDTLS_X509_CHECK_KEY_USAGE", -#endif /* MBEDTLS_X509_CHECK_KEY_USAGE */ -#if defined(MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE) - "MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE", -#endif /* MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE */ -#if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - "MBEDTLS_X509_RSASSA_PSS_SUPPORT", -#endif /* MBEDTLS_X509_RSASSA_PSS_SUPPORT */ -#if defined(MBEDTLS_ZLIB_SUPPORT) - "MBEDTLS_ZLIB_SUPPORT", -#endif /* MBEDTLS_ZLIB_SUPPORT */ -#if defined(MBEDTLS_AESNI_C) - "MBEDTLS_AESNI_C", -#endif /* MBEDTLS_AESNI_C */ -#if defined(MBEDTLS_AES_C) - "MBEDTLS_AES_C", -#endif /* MBEDTLS_AES_C */ -#if defined(MBEDTLS_ARC4_C) - "MBEDTLS_ARC4_C", -#endif /* MBEDTLS_ARC4_C */ -#if defined(MBEDTLS_ASN1_PARSE_C) - "MBEDTLS_ASN1_PARSE_C", -#endif /* MBEDTLS_ASN1_PARSE_C */ -#if defined(MBEDTLS_ASN1_WRITE_C) - "MBEDTLS_ASN1_WRITE_C", -#endif /* MBEDTLS_ASN1_WRITE_C */ -#if defined(MBEDTLS_BASE64_C) - "MBEDTLS_BASE64_C", -#endif /* MBEDTLS_BASE64_C */ -#if defined(MBEDTLS_BIGNUM_C) - "MBEDTLS_BIGNUM_C", -#endif /* MBEDTLS_BIGNUM_C */ -#if defined(MBEDTLS_BLOWFISH_C) - "MBEDTLS_BLOWFISH_C", -#endif /* MBEDTLS_BLOWFISH_C */ -#if defined(MBEDTLS_CAMELLIA_C) - "MBEDTLS_CAMELLIA_C", -#endif /* MBEDTLS_CAMELLIA_C */ -#if defined(MBEDTLS_CCM_C) - "MBEDTLS_CCM_C", -#endif /* MBEDTLS_CCM_C */ -#if defined(MBEDTLS_CERTS_C) - "MBEDTLS_CERTS_C", -#endif /* MBEDTLS_CERTS_C */ -#if defined(MBEDTLS_CIPHER_C) - "MBEDTLS_CIPHER_C", -#endif /* MBEDTLS_CIPHER_C */ -#if defined(MBEDTLS_CMAC_C) - "MBEDTLS_CMAC_C", -#endif /* MBEDTLS_CMAC_C */ -#if defined(MBEDTLS_CTR_DRBG_C) - "MBEDTLS_CTR_DRBG_C", -#endif /* MBEDTLS_CTR_DRBG_C */ -#if defined(MBEDTLS_DEBUG_C) - "MBEDTLS_DEBUG_C", -#endif /* MBEDTLS_DEBUG_C */ -#if defined(MBEDTLS_DES_C) - "MBEDTLS_DES_C", -#endif /* MBEDTLS_DES_C */ -#if defined(MBEDTLS_DHM_C) - "MBEDTLS_DHM_C", -#endif /* MBEDTLS_DHM_C */ -#if defined(MBEDTLS_ECDH_C) - "MBEDTLS_ECDH_C", -#endif /* MBEDTLS_ECDH_C */ -#if defined(MBEDTLS_ECDSA_C) - "MBEDTLS_ECDSA_C", -#endif /* MBEDTLS_ECDSA_C */ -#if defined(MBEDTLS_ECJPAKE_C) - "MBEDTLS_ECJPAKE_C", -#endif /* MBEDTLS_ECJPAKE_C */ -#if defined(MBEDTLS_ECP_C) - "MBEDTLS_ECP_C", -#endif /* MBEDTLS_ECP_C */ -#if defined(MBEDTLS_ENTROPY_C) - "MBEDTLS_ENTROPY_C", -#endif /* MBEDTLS_ENTROPY_C */ -#if defined(MBEDTLS_ERROR_C) - "MBEDTLS_ERROR_C", -#endif /* MBEDTLS_ERROR_C */ -#if defined(MBEDTLS_GCM_C) - "MBEDTLS_GCM_C", -#endif /* MBEDTLS_GCM_C */ -#if defined(MBEDTLS_HAVEGE_C) - "MBEDTLS_HAVEGE_C", -#endif /* MBEDTLS_HAVEGE_C */ -#if defined(MBEDTLS_HMAC_DRBG_C) - "MBEDTLS_HMAC_DRBG_C", -#endif /* MBEDTLS_HMAC_DRBG_C */ -#if defined(MBEDTLS_MD_C) - "MBEDTLS_MD_C", -#endif /* MBEDTLS_MD_C */ -#if defined(MBEDTLS_MD2_C) - "MBEDTLS_MD2_C", -#endif /* MBEDTLS_MD2_C */ -#if defined(MBEDTLS_MD4_C) - "MBEDTLS_MD4_C", -#endif /* MBEDTLS_MD4_C */ -#if defined(MBEDTLS_MD5_C) - "MBEDTLS_MD5_C", -#endif /* MBEDTLS_MD5_C */ -#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) - "MBEDTLS_MEMORY_BUFFER_ALLOC_C", -#endif /* MBEDTLS_MEMORY_BUFFER_ALLOC_C */ -#if defined(MBEDTLS_NET_C) - "MBEDTLS_NET_C", -#endif /* MBEDTLS_NET_C */ -#if defined(MBEDTLS_OID_C) - "MBEDTLS_OID_C", -#endif /* MBEDTLS_OID_C */ -#if defined(MBEDTLS_PADLOCK_C) - "MBEDTLS_PADLOCK_C", -#endif /* MBEDTLS_PADLOCK_C */ -#if defined(MBEDTLS_PEM_PARSE_C) - "MBEDTLS_PEM_PARSE_C", -#endif /* MBEDTLS_PEM_PARSE_C */ -#if defined(MBEDTLS_PEM_WRITE_C) - "MBEDTLS_PEM_WRITE_C", -#endif /* MBEDTLS_PEM_WRITE_C */ -#if defined(MBEDTLS_PK_C) - "MBEDTLS_PK_C", -#endif /* MBEDTLS_PK_C */ -#if defined(MBEDTLS_PK_PARSE_C) - "MBEDTLS_PK_PARSE_C", -#endif /* MBEDTLS_PK_PARSE_C */ -#if defined(MBEDTLS_PK_WRITE_C) - "MBEDTLS_PK_WRITE_C", -#endif /* MBEDTLS_PK_WRITE_C */ -#if defined(MBEDTLS_PKCS5_C) - "MBEDTLS_PKCS5_C", -#endif /* MBEDTLS_PKCS5_C */ -#if defined(MBEDTLS_PKCS11_C) - "MBEDTLS_PKCS11_C", -#endif /* MBEDTLS_PKCS11_C */ -#if defined(MBEDTLS_PKCS12_C) - "MBEDTLS_PKCS12_C", -#endif /* MBEDTLS_PKCS12_C */ -#if defined(MBEDTLS_PLATFORM_C) - "MBEDTLS_PLATFORM_C", -#endif /* MBEDTLS_PLATFORM_C */ -#if defined(MBEDTLS_RIPEMD160_C) - "MBEDTLS_RIPEMD160_C", -#endif /* MBEDTLS_RIPEMD160_C */ -#if defined(MBEDTLS_RSA_C) - "MBEDTLS_RSA_C", -#endif /* MBEDTLS_RSA_C */ -#if defined(MBEDTLS_SHA1_C) - "MBEDTLS_SHA1_C", -#endif /* MBEDTLS_SHA1_C */ -#if defined(MBEDTLS_SHA256_C) - "MBEDTLS_SHA256_C", -#endif /* MBEDTLS_SHA256_C */ -#if defined(MBEDTLS_SHA512_C) - "MBEDTLS_SHA512_C", -#endif /* MBEDTLS_SHA512_C */ -#if defined(MBEDTLS_SSL_CACHE_C) - "MBEDTLS_SSL_CACHE_C", -#endif /* MBEDTLS_SSL_CACHE_C */ -#if defined(MBEDTLS_SSL_COOKIE_C) - "MBEDTLS_SSL_COOKIE_C", -#endif /* MBEDTLS_SSL_COOKIE_C */ -#if defined(MBEDTLS_SSL_TICKET_C) - "MBEDTLS_SSL_TICKET_C", -#endif /* MBEDTLS_SSL_TICKET_C */ -#if defined(MBEDTLS_SSL_CLI_C) - "MBEDTLS_SSL_CLI_C", -#endif /* MBEDTLS_SSL_CLI_C */ -#if defined(MBEDTLS_SSL_SRV_C) - "MBEDTLS_SSL_SRV_C", -#endif /* MBEDTLS_SSL_SRV_C */ -#if defined(MBEDTLS_SSL_TLS_C) - "MBEDTLS_SSL_TLS_C", -#endif /* MBEDTLS_SSL_TLS_C */ -#if defined(MBEDTLS_THREADING_C) - "MBEDTLS_THREADING_C", -#endif /* MBEDTLS_THREADING_C */ -#if defined(MBEDTLS_TIMING_C) - "MBEDTLS_TIMING_C", -#endif /* MBEDTLS_TIMING_C */ -#if defined(MBEDTLS_VERSION_C) - "MBEDTLS_VERSION_C", -#endif /* MBEDTLS_VERSION_C */ -#if defined(MBEDTLS_X509_USE_C) - "MBEDTLS_X509_USE_C", -#endif /* MBEDTLS_X509_USE_C */ -#if defined(MBEDTLS_X509_CRT_PARSE_C) - "MBEDTLS_X509_CRT_PARSE_C", -#endif /* MBEDTLS_X509_CRT_PARSE_C */ -#if defined(MBEDTLS_X509_CRL_PARSE_C) - "MBEDTLS_X509_CRL_PARSE_C", -#endif /* MBEDTLS_X509_CRL_PARSE_C */ -#if defined(MBEDTLS_X509_CSR_PARSE_C) - "MBEDTLS_X509_CSR_PARSE_C", -#endif /* MBEDTLS_X509_CSR_PARSE_C */ -#if defined(MBEDTLS_X509_CREATE_C) - "MBEDTLS_X509_CREATE_C", -#endif /* MBEDTLS_X509_CREATE_C */ -#if defined(MBEDTLS_X509_CRT_WRITE_C) - "MBEDTLS_X509_CRT_WRITE_C", -#endif /* MBEDTLS_X509_CRT_WRITE_C */ -#if defined(MBEDTLS_X509_CSR_WRITE_C) - "MBEDTLS_X509_CSR_WRITE_C", -#endif /* MBEDTLS_X509_CSR_WRITE_C */ -#if defined(MBEDTLS_XTEA_C) - "MBEDTLS_XTEA_C", -#endif /* MBEDTLS_XTEA_C */ -#endif /* MBEDTLS_VERSION_FEATURES */ - NULL -}; - -int mbedtls_version_check_feature( const char *feature ) -{ - const char **idx = features; - - if( *idx == NULL ) - return( -2 ); - - if( feature == NULL ) - return( -1 ); - - while( *idx != NULL ) - { - if( !strcmp( *idx, feature ) ) - return( 0 ); - idx++; - } - return( -1 ); -} - -#endif /* MBEDTLS_VERSION_C */ diff --git a/deps/mbedtls/x509.c b/deps/mbedtls/x509.c index 88e32b067e..255f046402 100644 --- a/deps/mbedtls/x509.c +++ b/deps/mbedtls/x509.c @@ -48,21 +48,10 @@ #include "mbedtls/pem.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_printf printf -#define mbedtls_snprintf snprintf -#endif - -#if defined(MBEDTLS_HAVE_TIME) -#include "mbedtls/platform_time.h" -#endif +#include #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #include @@ -457,7 +446,8 @@ int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end, /* Mark this item as being no the only one in a set */ cur->next_merged = 1; - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_name ) ); + cur->next = (mbedtls_asn1_named_data*) + calloc( 1, sizeof( mbedtls_x509_name ) ); if( cur->next == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); @@ -471,7 +461,8 @@ int mbedtls_x509_get_name( unsigned char **p, const unsigned char *end, if( *p == end ) return( 0 ); - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_name ) ); + cur->next = (mbedtls_asn1_named_data*) + calloc( 1, sizeof( mbedtls_x509_name ) ); if( cur->next == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); @@ -664,10 +655,10 @@ int mbedtls_x509_get_sig_alg( const mbedtls_x509_buf *sig_oid, const mbedtls_x50 #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) if( *pk_alg == MBEDTLS_PK_RSASSA_PSS ) { - mbedtls_pk_rsassa_pss_options *pss_opts; - - pss_opts = mbedtls_calloc( 1, sizeof( mbedtls_pk_rsassa_pss_options ) ); - if( pss_opts == NULL ) + mbedtls_pk_rsassa_pss_options *pss_opts = + (mbedtls_pk_rsassa_pss_options *) + calloc( 1, sizeof( mbedtls_pk_rsassa_pss_options ) ); + if (!pss_opts) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); ret = mbedtls_x509_get_rsassa_pss_params( sig_params, @@ -676,7 +667,7 @@ int mbedtls_x509_get_sig_alg( const mbedtls_x509_buf *sig_oid, const mbedtls_x50 &pss_opts->expected_salt_len ); if( ret != 0 ) { - mbedtls_free( pss_opts ); + free( pss_opts ); return( ret ); } @@ -764,16 +755,16 @@ int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn ) if( name != dn ) { - ret = mbedtls_snprintf( p, n, merge ? " + " : ", " ); + ret = snprintf( p, n, merge ? " + " : ", " ); MBEDTLS_X509_SAFE_SNPRINTF; } ret = mbedtls_oid_get_attr_short_name( &name->oid, &short_name ); if( ret == 0 ) - ret = mbedtls_snprintf( p, n, "%s=", short_name ); + ret = snprintf( p, n, "%s=", short_name ); else - ret = mbedtls_snprintf( p, n, "\?\?=" ); + ret = snprintf( p, n, "\?\?=" ); MBEDTLS_X509_SAFE_SNPRINTF; for( i = 0; i < name->val.len; i++ ) @@ -787,7 +778,7 @@ int mbedtls_x509_dn_gets( char *buf, size_t size, const mbedtls_x509_name *dn ) else s[i] = c; } s[i] = '\0'; - ret = mbedtls_snprintf( p, n, "%s", s ); + ret = snprintf( p, n, "%s", s ); MBEDTLS_X509_SAFE_SNPRINTF; merge = name->next_merged; @@ -818,14 +809,14 @@ int mbedtls_x509_serial_gets( char *buf, size_t size, const mbedtls_x509_buf *se if( i == 0 && nr > 1 && serial->p[i] == 0x0 ) continue; - ret = mbedtls_snprintf( p, n, "%02X%s", + ret = snprintf( p, n, "%02X%s", serial->p[i], ( i < nr - 1 ) ? ":" : "" ); MBEDTLS_X509_SAFE_SNPRINTF; } if( nr != serial->len ) { - ret = mbedtls_snprintf( p, n, "...." ); + ret = snprintf( p, n, "...." ); MBEDTLS_X509_SAFE_SNPRINTF; } @@ -846,9 +837,9 @@ int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *s ret = mbedtls_oid_get_sig_alg_desc( sig_oid, &desc ); if( ret != 0 ) - ret = mbedtls_snprintf( p, n, "???" ); + ret = snprintf( p, n, "???" ); else - ret = mbedtls_snprintf( p, n, "%s", desc ); + ret = snprintf( p, n, "%s", desc ); MBEDTLS_X509_SAFE_SNPRINTF; #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) @@ -862,7 +853,7 @@ int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *s md_info = mbedtls_md_info_from_type( md_alg ); mgf_md_info = mbedtls_md_info_from_type( pss_opts->mgf1_hash_id ); - ret = mbedtls_snprintf( p, n, " (%s, MGF1-%s, 0x%02X)", + ret = snprintf( p, n, " (%s, MGF1-%s, 0x%02X)", md_info ? mbedtls_md_get_name( md_info ) : "???", mgf_md_info ? mbedtls_md_get_name( mgf_md_info ) : "???", pss_opts->expected_salt_len ); @@ -882,11 +873,9 @@ int mbedtls_x509_sig_alg_gets( char *buf, size_t size, const mbedtls_x509_buf *s */ int mbedtls_x509_key_size_helper( char *buf, size_t buf_size, const char *name ) { - char *p = buf; + char *p = buf; size_t n = buf_size; - int ret; - - ret = mbedtls_snprintf( p, n, "%s key size", name ); + int ret = snprintf( p, n, "%s key size", name ); MBEDTLS_X509_SAFE_SNPRINTF; return( 0 ); @@ -917,7 +906,7 @@ static int x509_get_current_time( mbedtls_x509_time *now ) static int x509_get_current_time( mbedtls_x509_time *now ) { struct tm *lt; - mbedtls_time_t tt; + time_t tt; int ret = 0; #if defined(MBEDTLS_THREADING_C) @@ -925,7 +914,7 @@ static int x509_get_current_time( mbedtls_x509_time *now ) return( MBEDTLS_ERR_THREADING_MUTEX_ERROR ); #endif - tt = mbedtls_time( NULL ); + tt = time( NULL ); lt = gmtime( &tt ); if( lt == NULL ) @@ -1025,74 +1014,4 @@ int mbedtls_x509_time_is_future( const mbedtls_x509_time *from ) } #endif /* MBEDTLS_HAVE_TIME_DATE */ -#if defined(MBEDTLS_SELF_TEST) - -#include "mbedtls/x509_crt.h" -#include "mbedtls/certs.h" - -/* - * Checkup routine - */ -int mbedtls_x509_self_test( int verbose ) -{ -#if defined(MBEDTLS_CERTS_C) && defined(MBEDTLS_SHA256_C) - int ret; - uint32_t flags; - mbedtls_x509_crt cacert; - mbedtls_x509_crt clicert; - - if( verbose != 0 ) - mbedtls_printf( " X.509 certificate load: " ); - - mbedtls_x509_crt_init( &clicert ); - - ret = mbedtls_x509_crt_parse( &clicert, (const unsigned char *) mbedtls_test_cli_crt, - mbedtls_test_cli_crt_len ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - mbedtls_x509_crt_init( &cacert ); - - ret = mbedtls_x509_crt_parse( &cacert, (const unsigned char *) mbedtls_test_ca_crt, - mbedtls_test_ca_crt_len ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n X.509 signature verify: "); - - ret = mbedtls_x509_crt_verify( &clicert, &cacert, NULL, NULL, &flags, NULL, NULL ); - if( ret != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - return( ret ); - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n\n"); - - mbedtls_x509_crt_free( &cacert ); - mbedtls_x509_crt_free( &clicert ); - - return( 0 ); -#else - ((void) verbose); - return( 0 ); -#endif /* MBEDTLS_CERTS_C && MBEDTLS_SHA1_C */ -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_X509_USE_C */ diff --git a/deps/mbedtls/x509_crl.c b/deps/mbedtls/x509_crl.c index 83e1c2b2d4..0eae7b2b20 100644 --- a/deps/mbedtls/x509_crl.c +++ b/deps/mbedtls/x509_crl.c @@ -46,15 +46,8 @@ #include "mbedtls/pem.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32) #include @@ -234,7 +227,7 @@ static int x509_get_entries( unsigned char **p, if( *p < end ) { - cur_entry->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl_entry ) ); + cur_entry->next = (mbedtls_x509_crl_entry*)calloc( 1, sizeof( mbedtls_x509_crl_entry ) ); if( cur_entry->next == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); @@ -276,7 +269,7 @@ int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain, if( crl->version != 0 && crl->next == NULL ) { - crl->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crl ) ); + crl->next = (mbedtls_x509_crl*)calloc( 1, sizeof( mbedtls_x509_crl ) ); if( crl->next == NULL ) { @@ -291,7 +284,7 @@ int mbedtls_x509_crl_parse_der( mbedtls_x509_crl *chain, /* * Copy raw DER-encoded CRL */ - if( ( p = mbedtls_calloc( 1, buflen ) ) == NULL ) + if( ( p = (unsigned char*)calloc( 1, buflen ) ) == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); memcpy( p, buf, buflen ); @@ -561,7 +554,7 @@ int mbedtls_x509_crl_parse_file( mbedtls_x509_crl *chain, const char *path ) ret = mbedtls_x509_crl_parse( chain, buf, n ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } @@ -588,23 +581,23 @@ int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, p = buf; n = size; - ret = mbedtls_snprintf( p, n, "%sCRL version : %d", + ret = snprintf( p, n, "%sCRL version : %d", prefix, crl->version ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); + ret = snprintf( p, n, "\n%sissuer name : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_dn_gets( p, n, &crl->issuer ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%sthis update : " \ + ret = snprintf( p, n, "\n%sthis update : " \ "%04d-%02d-%02d %02d:%02d:%02d", prefix, crl->this_update.year, crl->this_update.mon, crl->this_update.day, crl->this_update.hour, crl->this_update.min, crl->this_update.sec ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%snext update : " \ + ret = snprintf( p, n, "\n%snext update : " \ "%04d-%02d-%02d %02d:%02d:%02d", prefix, crl->next_update.year, crl->next_update.mon, crl->next_update.day, crl->next_update.hour, @@ -613,20 +606,20 @@ int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, entry = &crl->entry; - ret = mbedtls_snprintf( p, n, "\n%sRevoked certificates:", + ret = snprintf( p, n, "\n%sRevoked certificates:", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; while( entry != NULL && entry->raw.len != 0 ) { - ret = mbedtls_snprintf( p, n, "\n%sserial number: ", + ret = snprintf( p, n, "\n%sserial number: ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_serial_gets( p, n, &entry->serial ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, " revocation date: " \ + ret = snprintf( p, n, " revocation date: " \ "%04d-%02d-%02d %02d:%02d:%02d", entry->revocation_date.year, entry->revocation_date.mon, entry->revocation_date.day, entry->revocation_date.hour, @@ -636,14 +629,14 @@ int mbedtls_x509_crl_info( char *buf, size_t size, const char *prefix, entry = entry->next; } - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); + ret = snprintf( p, n, "\n%ssigned using : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_sig_alg_gets( p, n, &crl->sig_oid, crl->sig_pk, crl->sig_md, crl->sig_opts ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n" ); + ret = snprintf( p, n, "\n" ); MBEDTLS_X509_SAFE_SNPRINTF; return( (int) ( size - n ) ); @@ -675,7 +668,7 @@ void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) do { #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( crl_cur->sig_opts ); + free( crl_cur->sig_opts ); #endif name_cur = crl_cur->issuer.next; @@ -684,7 +677,7 @@ void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) name_prv = name_cur; name_cur = name_cur->next; mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); + free( name_prv ); } entry_cur = crl_cur->entry.next; @@ -693,13 +686,13 @@ void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) entry_prv = entry_cur; entry_cur = entry_cur->next; mbedtls_zeroize( entry_prv, sizeof( mbedtls_x509_crl_entry ) ); - mbedtls_free( entry_prv ); + free( entry_prv ); } if( crl_cur->raw.p != NULL ) { mbedtls_zeroize( crl_cur->raw.p, crl_cur->raw.len ); - mbedtls_free( crl_cur->raw.p ); + free( crl_cur->raw.p ); } crl_cur = crl_cur->next; @@ -714,7 +707,7 @@ void mbedtls_x509_crl_free( mbedtls_x509_crl *crl ) mbedtls_zeroize( crl_prv, sizeof( mbedtls_x509_crl ) ); if( crl_prv != crl ) - mbedtls_free( crl_prv ); + free( crl_prv ); } while( crl_cur != NULL ); } diff --git a/deps/mbedtls/x509_crt.c b/deps/mbedtls/x509_crt.c index 8a49031ace..5fa3a8e1ab 100644 --- a/deps/mbedtls/x509_crt.c +++ b/deps/mbedtls/x509_crt.c @@ -42,19 +42,13 @@ #include #include +#include #if defined(MBEDTLS_PEM_PARSE_C) #include "mbedtls/pem.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif #if defined(MBEDTLS_THREADING_C) #include "mbedtls/threading.h" @@ -486,7 +480,8 @@ static int x509_get_subject_alt_name( unsigned char **p, if( cur->next != NULL ) return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS ); - cur->next = mbedtls_calloc( 1, sizeof( mbedtls_asn1_sequence ) ); + cur->next = (mbedtls_asn1_sequence*) + calloc( 1, sizeof( mbedtls_asn1_sequence ) ); if( cur->next == NULL ) return( MBEDTLS_ERR_X509_INVALID_EXTENSIONS + @@ -704,7 +699,7 @@ static int x509_crt_parse_der_core( mbedtls_x509_crt *crt, const unsigned char * /* Create and populate a new buffer for the raw field */ crt->raw.len = crt_end - buf; - crt->raw.p = p = mbedtls_calloc( 1, crt->raw.len ); + crt->raw.p = p = (unsigned char*)calloc( 1, crt->raw.len ); if( p == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); @@ -936,9 +931,9 @@ int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain, const unsigned char *bu /* * Add new certificate on the end of the chain if needed. */ - if( crt->version != 0 && crt->next == NULL ) + if( crt->version != 0 && !crt->next) { - crt->next = mbedtls_calloc( 1, sizeof( mbedtls_x509_crt ) ); + crt->next = (mbedtls_x509_crt*)calloc( 1, sizeof( mbedtls_x509_crt ) ); if( crt->next == NULL ) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); @@ -954,7 +949,7 @@ int mbedtls_x509_crt_parse_der( mbedtls_x509_crt *chain, const unsigned char *bu prev->next = NULL; if( crt != chain ) - mbedtls_free( crt ); + free( crt ); return( ret ); } @@ -1093,7 +1088,7 @@ int mbedtls_x509_crt_parse_file( mbedtls_x509_crt *chain, const char *path ) ret = mbedtls_x509_crt_parse( chain, buf, n ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } @@ -1182,7 +1177,7 @@ cleanup: while( ( entry = readdir( dir ) ) != NULL ) { - snp_ret = mbedtls_snprintf( entry_name, sizeof entry_name, + snp_ret = snprintf( entry_name, sizeof entry_name, "%s/%s", path, entry->d_name ); if( snp_ret < 0 || (size_t)snp_ret >= sizeof entry_name ) @@ -1261,7 +1256,7 @@ static int x509_info_subject_alt_name( char **buf, size_t *size, #define PRINT_ITEM(i) \ { \ - ret = mbedtls_snprintf( p, n, "%s" i, sep ); \ + ret = snprintf( p, n, "%s" i, sep ); \ MBEDTLS_X509_SAFE_SNPRINTF; \ sep = ", "; \ } @@ -1336,7 +1331,7 @@ static int x509_info_ext_key_usage( char **buf, size_t *size, if( mbedtls_oid_get_extended_key_usage( &cur->buf, &desc ) != 0 ) desc = "???"; - ret = mbedtls_snprintf( p, n, "%s%s", sep, desc ); + ret = snprintf( p, n, "%s%s", sep, desc ); MBEDTLS_X509_SAFE_SNPRINTF; sep = ", "; @@ -1370,47 +1365,47 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, if( NULL == crt ) { - ret = mbedtls_snprintf( p, n, "\nCertificate is uninitialised!\n" ); + ret = snprintf( p, n, "\nCertificate is uninitialised!\n" ); MBEDTLS_X509_SAFE_SNPRINTF; return( (int) ( size - n ) ); } - ret = mbedtls_snprintf( p, n, "%scert. version : %d\n", + ret = snprintf( p, n, "%scert. version : %d\n", prefix, crt->version ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "%sserial number : ", + ret = snprintf( p, n, "%sserial number : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_serial_gets( p, n, &crt->serial ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%sissuer name : ", prefix ); + ret = snprintf( p, n, "\n%sissuer name : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_dn_gets( p, n, &crt->issuer ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%ssubject name : ", prefix ); + ret = snprintf( p, n, "\n%ssubject name : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_dn_gets( p, n, &crt->subject ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%sissued on : " \ + ret = snprintf( p, n, "\n%sissued on : " \ "%04d-%02d-%02d %02d:%02d:%02d", prefix, crt->valid_from.year, crt->valid_from.mon, crt->valid_from.day, crt->valid_from.hour, crt->valid_from.min, crt->valid_from.sec ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%sexpires on : " \ + ret = snprintf( p, n, "\n%sexpires on : " \ "%04d-%02d-%02d %02d:%02d:%02d", prefix, crt->valid_to.year, crt->valid_to.mon, crt->valid_to.day, crt->valid_to.hour, crt->valid_to.min, crt->valid_to.sec ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); + ret = snprintf( p, n, "\n%ssigned using : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_sig_alg_gets( p, n, &crt->sig_oid, crt->sig_pk, @@ -1420,11 +1415,9 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, /* Key size */ if( ( ret = mbedtls_x509_key_size_helper( key_size_str, BEFORE_COLON, mbedtls_pk_get_name( &crt->pk ) ) ) != 0 ) - { return( ret ); - } - ret = mbedtls_snprintf( p, n, "\n%s%-" BC "s: %d bits", prefix, key_size_str, + ret = snprintf( p, n, "\n%s%-" BC "s: %d bits", prefix, key_size_str, (int) mbedtls_pk_get_bitlen( &crt->pk ) ); MBEDTLS_X509_SAFE_SNPRINTF; @@ -1434,20 +1427,20 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, if( crt->ext_types & MBEDTLS_X509_EXT_BASIC_CONSTRAINTS ) { - ret = mbedtls_snprintf( p, n, "\n%sbasic constraints : CA=%s", prefix, + ret = snprintf( p, n, "\n%sbasic constraints : CA=%s", prefix, crt->ca_istrue ? "true" : "false" ); MBEDTLS_X509_SAFE_SNPRINTF; if( crt->max_pathlen > 0 ) { - ret = mbedtls_snprintf( p, n, ", max_pathlen=%d", crt->max_pathlen - 1 ); + ret = snprintf( p, n, ", max_pathlen=%d", crt->max_pathlen - 1 ); MBEDTLS_X509_SAFE_SNPRINTF; } } if( crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME ) { - ret = mbedtls_snprintf( p, n, "\n%ssubject alt name : ", prefix ); + ret = snprintf( p, n, "\n%ssubject alt name : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; if( ( ret = x509_info_subject_alt_name( &p, &n, @@ -1457,7 +1450,7 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, if( crt->ext_types & MBEDTLS_X509_EXT_NS_CERT_TYPE ) { - ret = mbedtls_snprintf( p, n, "\n%scert. type : ", prefix ); + ret = snprintf( p, n, "\n%scert. type : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; if( ( ret = x509_info_cert_type( &p, &n, crt->ns_cert_type ) ) != 0 ) @@ -1466,7 +1459,7 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, if( crt->ext_types & MBEDTLS_X509_EXT_KEY_USAGE ) { - ret = mbedtls_snprintf( p, n, "\n%skey usage : ", prefix ); + ret = snprintf( p, n, "\n%skey usage : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; if( ( ret = x509_info_key_usage( &p, &n, crt->key_usage ) ) != 0 ) @@ -1475,7 +1468,7 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, if( crt->ext_types & MBEDTLS_X509_EXT_EXTENDED_KEY_USAGE ) { - ret = mbedtls_snprintf( p, n, "\n%sext key usage : ", prefix ); + ret = snprintf( p, n, "\n%sext key usage : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; if( ( ret = x509_info_ext_key_usage( &p, &n, @@ -1483,7 +1476,7 @@ int mbedtls_x509_crt_info( char *buf, size_t size, const char *prefix, return( ret ); } - ret = mbedtls_snprintf( p, n, "\n" ); + ret = snprintf( p, n, "\n" ); MBEDTLS_X509_SAFE_SNPRINTF; return( (int) ( size - n ) ); @@ -1531,14 +1524,14 @@ int mbedtls_x509_crt_verify_info( char *buf, size_t size, const char *prefix, if( ( flags & cur->code ) == 0 ) continue; - ret = mbedtls_snprintf( p, n, "%s%s\n", prefix, cur->string ); + ret = snprintf( p, n, "%s%s\n", prefix, cur->string ); MBEDTLS_X509_SAFE_SNPRINTF; flags ^= cur->code; } if( flags != 0 ) { - ret = mbedtls_snprintf( p, n, "%sUnknown reason " + ret = snprintf( p, n, "%sUnknown reason " "(this should not happen)\n", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; } @@ -1727,7 +1720,7 @@ static int x509_memcasecmp( const void *s1, const void *s2, size_t len ) { size_t i; unsigned char diff; - const unsigned char *n1 = s1, *n2 = s2; + const unsigned char *n1 = (const unsigned char*)s1, *n2 = (const unsigned char*)s2; for( i = 0; i < len; i++ ) { @@ -2342,7 +2335,7 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) mbedtls_pk_free( &cert_cur->pk ); #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( cert_cur->sig_opts ); + free( cert_cur->sig_opts ); #endif name_cur = cert_cur->issuer.next; @@ -2351,7 +2344,7 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) name_prv = name_cur; name_cur = name_cur->next; mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); + free( name_prv ); } name_cur = cert_cur->subject.next; @@ -2360,7 +2353,7 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) name_prv = name_cur; name_cur = name_cur->next; mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); + free( name_prv ); } seq_cur = cert_cur->ext_key_usage.next; @@ -2369,7 +2362,7 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) seq_prv = seq_cur; seq_cur = seq_cur->next; mbedtls_zeroize( seq_prv, sizeof( mbedtls_x509_sequence ) ); - mbedtls_free( seq_prv ); + free( seq_prv ); } seq_cur = cert_cur->subject_alt_names.next; @@ -2378,13 +2371,13 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) seq_prv = seq_cur; seq_cur = seq_cur->next; mbedtls_zeroize( seq_prv, sizeof( mbedtls_x509_sequence ) ); - mbedtls_free( seq_prv ); + free( seq_prv ); } if( cert_cur->raw.p != NULL ) { mbedtls_zeroize( cert_cur->raw.p, cert_cur->raw.len ); - mbedtls_free( cert_cur->raw.p ); + free( cert_cur->raw.p ); } cert_cur = cert_cur->next; @@ -2399,7 +2392,7 @@ void mbedtls_x509_crt_free( mbedtls_x509_crt *crt ) mbedtls_zeroize( cert_prv, sizeof( mbedtls_x509_crt ) ); if( cert_prv != crt ) - mbedtls_free( cert_prv ); + free( cert_prv ); } while( cert_cur != NULL ); } diff --git a/deps/mbedtls/x509_csr.c b/deps/mbedtls/x509_csr.c index a67b672462..c82b1c89a2 100644 --- a/deps/mbedtls/x509_csr.c +++ b/deps/mbedtls/x509_csr.c @@ -46,15 +46,8 @@ #include "mbedtls/pem.h" #endif -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else #include #include -#define mbedtls_free free -#define mbedtls_calloc calloc -#define mbedtls_snprintf snprintf -#endif #if defined(MBEDTLS_FS_IO) || defined(EFIX64) || defined(EFI32) #include @@ -109,9 +102,9 @@ int mbedtls_x509_csr_parse_der( mbedtls_x509_csr *csr, /* * first copy the raw DER data */ - p = mbedtls_calloc( 1, len = buflen ); + p = (unsigned char*)calloc( 1, len = buflen ); - if( p == NULL ) + if (!p) return( MBEDTLS_ERR_X509_ALLOC_FAILED ); memcpy( p, buf, buflen ); @@ -323,7 +316,7 @@ int mbedtls_x509_csr_parse_file( mbedtls_x509_csr *csr, const char *path ) ret = mbedtls_x509_csr_parse( csr, buf, n ); mbedtls_zeroize( buf, n ); - mbedtls_free( buf ); + free( buf ); return( ret ); } @@ -338,24 +331,19 @@ int mbedtls_x509_csr_parse_file( mbedtls_x509_csr *csr, const char *path ) int mbedtls_x509_csr_info( char *buf, size_t size, const char *prefix, const mbedtls_x509_csr *csr ) { - int ret; - size_t n; - char *p; char key_size_str[BEFORE_COLON]; - - p = buf; - n = size; - - ret = mbedtls_snprintf( p, n, "%sCSR version : %d", + char *p = buf; + size_t n = size; + int ret = snprintf( p, n, "%sCSR version : %d", prefix, csr->version ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%ssubject name : ", prefix ); + ret = snprintf( p, n, "\n%ssubject name : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_dn_gets( p, n, &csr->subject ); MBEDTLS_X509_SAFE_SNPRINTF; - ret = mbedtls_snprintf( p, n, "\n%ssigned using : ", prefix ); + ret = snprintf( p, n, "\n%ssigned using : ", prefix ); MBEDTLS_X509_SAFE_SNPRINTF; ret = mbedtls_x509_sig_alg_gets( p, n, &csr->sig_oid, csr->sig_pk, csr->sig_md, @@ -368,7 +356,7 @@ int mbedtls_x509_csr_info( char *buf, size_t size, const char *prefix, return( ret ); } - ret = mbedtls_snprintf( p, n, "\n%s%-" BC "s: %d bits\n", prefix, key_size_str, + ret = snprintf( p, n, "\n%s%-" BC "s: %d bits\n", prefix, key_size_str, (int) mbedtls_pk_get_bitlen( &csr->pk ) ); MBEDTLS_X509_SAFE_SNPRINTF; @@ -397,7 +385,7 @@ void mbedtls_x509_csr_free( mbedtls_x509_csr *csr ) mbedtls_pk_free( &csr->pk ); #if defined(MBEDTLS_X509_RSASSA_PSS_SUPPORT) - mbedtls_free( csr->sig_opts ); + free( csr->sig_opts ); #endif name_cur = csr->subject.next; @@ -406,13 +394,13 @@ void mbedtls_x509_csr_free( mbedtls_x509_csr *csr ) name_prv = name_cur; name_cur = name_cur->next; mbedtls_zeroize( name_prv, sizeof( mbedtls_x509_name ) ); - mbedtls_free( name_prv ); + free( name_prv ); } if( csr->raw.p != NULL ) { mbedtls_zeroize( csr->raw.p, csr->raw.len ); - mbedtls_free( csr->raw.p ); + free( csr->raw.p ); } mbedtls_zeroize( csr, sizeof( mbedtls_x509_csr ) ); diff --git a/deps/mbedtls/xtea.c b/deps/mbedtls/xtea.c index fb2d6dce23..8e64dfef3b 100644 --- a/deps/mbedtls/xtea.c +++ b/deps/mbedtls/xtea.c @@ -31,15 +31,6 @@ #include -#if defined(MBEDTLS_SELF_TEST) -#if defined(MBEDTLS_PLATFORM_C) -#include "mbedtls/platform.h" -#else -#include -#define mbedtls_printf printf -#endif /* MBEDTLS_PLATFORM_C */ -#endif /* MBEDTLS_SELF_TEST */ - #if !defined(MBEDTLS_XTEA_ALT) #include "arc4_alt.h" @@ -189,90 +180,4 @@ int mbedtls_xtea_crypt_cbc( mbedtls_xtea_context *ctx, int mode, size_t length, #endif /* MBEDTLS_CIPHER_MODE_CBC */ #endif /* !MBEDTLS_XTEA_ALT */ -#if defined(MBEDTLS_SELF_TEST) - -/* - * XTEA tests vectors (non-official) - */ - -static const unsigned char xtea_test_key[6][16] = -{ - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, - 0x0c, 0x0d, 0x0e, 0x0f }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 }, - { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00 } -}; - -static const unsigned char xtea_test_pt[6][8] = -{ - { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0x5a, 0x5b, 0x6e, 0x27, 0x89, 0x48, 0xd7, 0x7f }, - { 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0x70, 0xe1, 0x22, 0x5d, 0x6e, 0x4e, 0x76, 0x55 } -}; - -static const unsigned char xtea_test_ct[6][8] = -{ - { 0x49, 0x7d, 0xf3, 0xd0, 0x72, 0x61, 0x2c, 0xb5 }, - { 0xe7, 0x8f, 0x2d, 0x13, 0x74, 0x43, 0x41, 0xd8 }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 }, - { 0xa0, 0x39, 0x05, 0x89, 0xf8, 0xb8, 0xef, 0xa5 }, - { 0xed, 0x23, 0x37, 0x5a, 0x82, 0x1a, 0x8c, 0x2d }, - { 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41, 0x41 } -}; - -/* - * Checkup routine - */ -int mbedtls_xtea_self_test( int verbose ) -{ - int i, ret = 0; - unsigned char buf[8]; - mbedtls_xtea_context ctx; - - mbedtls_xtea_init( &ctx ); - for( i = 0; i < 6; i++ ) - { - if( verbose != 0 ) - mbedtls_printf( " XTEA test #%d: ", i + 1 ); - - memcpy( buf, xtea_test_pt[i], 8 ); - - mbedtls_xtea_setup( &ctx, xtea_test_key[i] ); - mbedtls_xtea_crypt_ecb( &ctx, MBEDTLS_XTEA_ENCRYPT, buf, buf ); - - if( memcmp( buf, xtea_test_ct[i], 8 ) != 0 ) - { - if( verbose != 0 ) - mbedtls_printf( "failed\n" ); - - ret = 1; - goto exit; - } - - if( verbose != 0 ) - mbedtls_printf( "passed\n" ); - } - - if( verbose != 0 ) - mbedtls_printf( "\n" ); - -exit: - mbedtls_xtea_free( &ctx ); - - return( ret ); -} - -#endif /* MBEDTLS_SELF_TEST */ - #endif /* MBEDTLS_XTEA_C */ diff --git a/deps/rcheevos/src/rcheevos/compat.c b/deps/rcheevos/src/rcheevos/compat.c index 6d6402503f..53eeb3292d 100644 --- a/deps/rcheevos/src/rcheevos/compat.c +++ b/deps/rcheevos/src/rcheevos/compat.c @@ -22,6 +22,24 @@ int rc_strncasecmp(const char* left, const char* right, size_t length) return 0; } +int rc_strcasecmp(const char* left, const char* right) +{ + while (*left || *right) + { + if (*left != *right) + { + const int diff = tolower(*left) - tolower(*right); + if (diff != 0) + return diff; + } + + ++left; + ++right; + } + + return 0; +} + char* rc_strdup(const char* str) { const size_t length = strlen(str); diff --git a/deps/rcheevos/src/rcheevos/compat.h b/deps/rcheevos/src/rcheevos/compat.h index 3bc648ab0f..62c362f47e 100644 --- a/deps/rcheevos/src/rcheevos/compat.h +++ b/deps/rcheevos/src/rcheevos/compat.h @@ -41,6 +41,11 @@ extern "C" { #define strncasecmp rc_strncasecmp #endif +#ifndef strcasecmp + extern int rc_strcasecmp(const char* left, const char* right); + #define strcasecmp rc_strcasecmp +#endif + #ifndef strdup extern char* rc_strdup(const char* str); #define strdup rc_strdup diff --git a/deps/rcheevos/src/rcheevos/condition.c b/deps/rcheevos/src/rcheevos/condition.c index 1afb8bbbd2..29046aae99 100644 --- a/deps/rcheevos/src/rcheevos/condition.c +++ b/deps/rcheevos/src/rcheevos/condition.c @@ -213,9 +213,20 @@ int rc_evaluate_condition_value(rc_condition_t* self, rc_eval_state_t* eval_stat case RC_OPERATOR_DIV: if (self->operand2.type == RC_OPERAND_FP) - value = (int)((double)value / self->operand2.value.dbl); + { + if (self->operand2.value.dbl == 0.0) + value = 0; + else + value = (int)((double)value / self->operand2.value.dbl); + } else - value /= rc_evaluate_operand(&self->operand2, eval_state); + { + unsigned value2 = rc_evaluate_operand(&self->operand2, eval_state); + if (value2 == 0) + value = 0; + else + value /= value2; + } break; case RC_OPERATOR_AND: diff --git a/deps/rcheevos/src/rcheevos/condset.c b/deps/rcheevos/src/rcheevos/condset.c index 9e142a61d3..345b1c142f 100644 --- a/deps/rcheevos/src/rcheevos/condset.c +++ b/deps/rcheevos/src/rcheevos/condset.c @@ -114,6 +114,7 @@ static int rc_test_condset_internal(rc_condset_t* self, int processing_pause, rc rc_condition_t* condition; int set_valid, cond_valid, and_next, or_next; unsigned measured_value = 0; + unsigned total_hits = 0; int can_measure = 1, measured_from_hits = 0; eval_state->primed = 1; @@ -207,12 +208,14 @@ static int rc_test_condset_internal(rc_condset_t* self, int processing_pause, rc break; } + /* STEP 4: calculate total hits */ + total_hits = condition->current_hits; + if (eval_state->add_hits) { if (condition->required_hits != 0) { /* if the condition has a target hit count, we have to recalculate cond_valid including the AddHits counter */ - measured_from_hits = 1; - measured_value = condition->current_hits + eval_state->add_hits; - cond_valid = (measured_value >= condition->required_hits); + total_hits = condition->current_hits + eval_state->add_hits; + cond_valid = (total_hits >= condition->required_hits); } else { /* no target hit count. we can't tell if the add_hits value is from this frame or not, so ignore it. @@ -221,13 +224,8 @@ static int rc_test_condset_internal(rc_condset_t* self, int processing_pause, rc eval_state->add_hits = 0; } - else if (condition->required_hits != 0) { - /* if there's a hit target, capture the current hits for recording Measured value later */ - measured_from_hits = 1; - measured_value = condition->current_hits; - } - /* STEP 4: handle special flags */ + /* STEP 5: handle special flags */ switch (condition->type) { case RC_CONDITION_PAUSE_IF: /* as soon as we find a PauseIf that evaluates to true, stop processing the rest of the group */ @@ -256,6 +254,14 @@ static int rc_test_condset_internal(rc_condset_t* self, int processing_pause, rc } continue; + case RC_CONDITION_MEASURED: + if (condition->required_hits != 0) { + /* if there's a hit target, capture the current hits for recording Measured value later */ + measured_from_hits = 1; + measured_value = total_hits; + } + break; + case RC_CONDITION_MEASURED_IF: if (!cond_valid) can_measure = 0; diff --git a/deps/rcheevos/src/rcheevos/consoleinfo.c b/deps/rcheevos/src/rcheevos/consoleinfo.c index 7507791b44..063e3a8209 100644 --- a/deps/rcheevos/src/rcheevos/consoleinfo.c +++ b/deps/rcheevos/src/rcheevos/consoleinfo.c @@ -113,7 +113,7 @@ const char* rc_console_name(int console_id) return "PC-9800"; case RC_CONSOLE_PCFX: - return "PCFX"; + return "PC-FX"; case RC_CONSOLE_PC_ENGINE: return "PCEngine"; @@ -394,6 +394,15 @@ static const rc_memory_region_t _rc_memory_regions_pcengine[] = { }; static const rc_memory_regions_t rc_memory_regions_pcengine = { _rc_memory_regions_pcengine, 4 }; +/* ===== PC-FX ===== */ +/* http://daifukkat.su/pcfx/data/memmap.html */ +static const rc_memory_region_t _rc_memory_regions_pcfx[] = { + { 0x000000U, 0x1FFFFFU, 0x00000000U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, + { 0x200000U, 0x207FFFU, 0xE0000000U, RC_MEMORY_TYPE_SAVE_RAM, "Internal Backup Memory" }, + { 0x208000U, 0x20FFFFU, 0xE8000000U, RC_MEMORY_TYPE_SAVE_RAM, "External Backup Memory" }, +}; +static const rc_memory_regions_t rc_memory_regions_pcfx = { _rc_memory_regions_pcfx, 3 }; + /* ===== PlayStation ===== */ /* http://www.raphnet.net/electronique/psx_adaptor/Playstation.txt */ static const rc_memory_region_t _rc_memory_regions_playstation[] = { @@ -421,7 +430,7 @@ static const rc_memory_regions_t rc_memory_regions_segacd = { _rc_memory_regions /* https://segaretro.org/Sega_Saturn_hardware_notes_(2004-04-27) */ static const rc_memory_region_t _rc_memory_regions_saturn[] = { { 0x000000U, 0x0FFFFFU, 0x00200000U, RC_MEMORY_TYPE_SYSTEM_RAM, "Work RAM Low" }, - { 0x100000U, 0x1FFFFFU, 0x06000000U, RC_MEMORY_TYPE_SAVE_RAM, "Work RAM High" } + { 0x100000U, 0x1FFFFFU, 0x06000000U, RC_MEMORY_TYPE_SYSTEM_RAM, "Work RAM High" } }; static const rc_memory_regions_t rc_memory_regions_saturn = { _rc_memory_regions_saturn, 2 }; @@ -455,15 +464,6 @@ static const rc_memory_region_t _rc_memory_regions_snes[] = { }; static const rc_memory_regions_t rc_memory_regions_snes = { _rc_memory_regions_snes, 2 }; -/* ===== WonderSwan ===== */ -/* http://daifukkat.su/docs/wsman/#ovr_memmap */ -static const rc_memory_region_t _rc_memory_regions_wonderswan[] = { - /* RAM ends at 0x3FFF for WonderSwan, WonderSwan color uses all 64KB */ - { 0x000000U, 0x00FFFFU, 0x000000U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, - { 0x010000U, 0x01FFFFU, 0x000000U, RC_MEMORY_TYPE_SAVE_RAM, "Cartridge RAM" } -}; -static const rc_memory_regions_t rc_memory_regions_wonderswan = { _rc_memory_regions_wonderswan, 2 }; - /* ===== Vectrex ===== */ /* https://roadsidethoughts.com/vectrex/vectrex-memory-map.htm */ static const rc_memory_region_t _rc_memory_regions_vectrex[] = { @@ -478,6 +478,23 @@ static const rc_memory_region_t _rc_memory_regions_virtualboy[] = { }; static const rc_memory_regions_t rc_memory_regions_virtualboy = { _rc_memory_regions_virtualboy, 2 }; +/* ===== WonderSwan ===== */ +/* http://daifukkat.su/docs/wsman/#ovr_memmap */ +static const rc_memory_region_t _rc_memory_regions_wonderswan[] = { + /* RAM ends at 0x3FFF for WonderSwan, WonderSwan color uses all 64KB */ + { 0x000000U, 0x00FFFFU, 0x000000U, RC_MEMORY_TYPE_SYSTEM_RAM, "System RAM" }, + /* Only 64KB of SRAM is accessible via the addressing scheme, but the cartridge + * may have up to 512KB of SRAM. http://daifukkat.su/docs/wsman/#cart_meta + * Since beetle_wswan exposes it as a contiguous block, assume its contiguous + * even though the documentation says $20000-$FFFFF is ROM data. If this causes + * a conflict in the future, we can revisit. A new region with a virtual address + * could be added to pick up the additional SRAM data. As long as it immediately + * follows the 64KB at $10000, all existing achievements should be unaffected. + */ + { 0x010000U, 0x08FFFFU, 0x010000U, RC_MEMORY_TYPE_SAVE_RAM, "Cartridge RAM" } +}; +static const rc_memory_regions_t rc_memory_regions_wonderswan = { _rc_memory_regions_wonderswan, 2 }; + /* ===== default ===== */ static const rc_memory_regions_t rc_memory_regions_none = { 0, 0 }; @@ -554,6 +571,9 @@ const rc_memory_regions_t* rc_console_memory_regions(int console_id) case RC_CONSOLE_PC_ENGINE: return &rc_memory_regions_pcengine; + case RC_CONSOLE_PCFX: + return &rc_memory_regions_pcfx; + case RC_CONSOLE_PLAYSTATION: return &rc_memory_regions_playstation; @@ -575,15 +595,15 @@ const rc_memory_regions_t* rc_console_memory_regions(int console_id) case RC_CONSOLE_SUPER_NINTENDO: return &rc_memory_regions_snes; - case RC_CONSOLE_WONDERSWAN: - return &rc_memory_regions_wonderswan; - case RC_CONSOLE_VECTREX: return &rc_memory_regions_vectrex; case RC_CONSOLE_VIRTUAL_BOY: return &rc_memory_regions_virtualboy; + case RC_CONSOLE_WONDERSWAN: + return &rc_memory_regions_wonderswan; + default: return &rc_memory_regions_none; } diff --git a/deps/rcheevos/src/rhash/hash.c b/deps/rcheevos/src/rhash/hash.c index e461e1320e..0a10ee4a8e 100644 --- a/deps/rcheevos/src/rhash/hash.c +++ b/deps/rcheevos/src/rhash/hash.c @@ -399,7 +399,7 @@ static int rc_hash_3do(char hash[33], const char* path) { if (buffer[offset + 0x03] == 0x02) /* file */ { - if (strcasecmp((char*)&buffer[offset + 0x20], "LaunchMe") == 0) + if (strcasecmp((const char*)&buffer[offset + 0x20], "LaunchMe") == 0) { /* the block size is at offset 0x0C (assume 0x0C is always 0) */ block_size = buffer[offset + 0x0D] * 65536 + buffer[offset + 0x0E] * 256 + buffer[offset + 0x0F]; @@ -710,7 +710,7 @@ static int rc_hash_pce_cd(char hash[33], const char* path) rc_cd_read_sector(track_handle, 1, buffer, 128); /* normal PC Engine CD will have a header block in sector 1 */ - if (strncmp("PC Engine CD-ROM SYSTEM", (const char*)&buffer[32], 23) == 0) + if (memcmp("PC Engine CD-ROM SYSTEM", &buffer[32], 23) == 0) { /* the title of the disc is the last 22 bytes of the header */ md5_init(&md5); @@ -727,7 +727,7 @@ static int rc_hash_pce_cd(char hash[33], const char* path) /* the first three bytes specify the sector of the program data, and the fourth byte * is the number of sectors. */ - sector = buffer[0] * 65536 + buffer[1] * 256 + buffer[2]; + sector = (buffer[0] << 16) + (buffer[1] << 8) + buffer[2]; num_sectors = buffer[3]; if (verbose_message_callback) @@ -776,6 +776,78 @@ static int rc_hash_pce_cd(char hash[33], const char* path) return rc_hash_finalize(&md5, hash); } +static int rc_hash_pcfx_cd(char hash[33], const char* path) +{ + uint8_t buffer[2048]; + void* track_handle; + md5_state_t md5; + int sector, num_sectors; + + track_handle = rc_cd_open_track(path, 0); + if (!track_handle) + return rc_hash_error("Could not open track"); + + /* PC-FX boot header fills the first two sectors of the disc + * https://bitbucket.org/trap15/pcfxtools/src/master/pcfx-cdlink.c + */ + + /* PC-FX CD will have a header marker in sector 0 */ + rc_cd_read_sector(track_handle, 0, buffer, 32); + if (memcmp("PC-FX:Hu_CD-ROM", &buffer[0], 15) == 0) + { + /* the important stuff is the first 128 bytes of the second sector (title being the first 32) */ + rc_cd_read_sector(track_handle, 1, buffer, 128); + + md5_init(&md5); + md5_append(&md5, buffer, 128); + + if (verbose_message_callback) + { + char message[128]; + buffer[128] = '\0'; + snprintf(message, sizeof(message), "Found PC-FX CD, title=%.32s", &buffer[0]); + verbose_message_callback(message); + } + + /* the program sector is in bytes 33-36 (assume byte 36 is 0) */ + sector = (buffer[34] << 16) + (buffer[33] << 8) + buffer[32]; + + /* the number of sectors the program occupies is in bytes 37-40 (assume byte 40 is 0) */ + num_sectors = (buffer[38] << 16) + (buffer[37] << 8) + buffer[36]; + + if (verbose_message_callback) + { + char message[128]; + snprintf(message, sizeof(message), "Hashing %d sectors starting at sector %d", num_sectors, sector); + verbose_message_callback(message); + } + + while (num_sectors > 0) + { + rc_cd_read_sector(track_handle, sector, buffer, sizeof(buffer)); + md5_append(&md5, buffer, sizeof(buffer)); + + ++sector; + --num_sectors; + } + } + else + { + rc_cd_read_sector(track_handle, 1, buffer, 128); + rc_cd_close_track(track_handle); + + /* some PC-FX CDs still identify as PCE CDs */ + if (memcmp("PC Engine CD-ROM SYSTEM", &buffer[32], 23) == 0) + return rc_hash_pce_cd(hash, path); + + return rc_hash_error("Not a PC-FX CD"); + } + + rc_cd_close_track(track_handle); + + return rc_hash_finalize(&md5, hash); +} + static int rc_hash_psx(char hash[33], const char* path) { uint8_t buffer[2048]; @@ -1297,6 +1369,12 @@ int rc_hash_generate_from_file(char hash[33], int console_id, const char* path) return rc_hash_whole_file(hash, console_id, path); + case RC_CONSOLE_PCFX: + if (rc_path_compare_extension(path, "m3u")) + return rc_hash_generate_from_playlist(hash, console_id, path); + + return rc_hash_pcfx_cd(hash, path); + case RC_CONSOLE_PLAYSTATION: if (rc_path_compare_extension(path, "m3u")) return rc_hash_generate_from_playlist(hash, console_id, path); @@ -1452,8 +1530,9 @@ void rc_hash_initialize_iterator(struct rc_hash_iterator* iterator, const char* iterator->consoles[0] = RC_CONSOLE_PLAYSTATION; iterator->consoles[1] = RC_CONSOLE_PC_ENGINE; iterator->consoles[2] = RC_CONSOLE_3DO; + iterator->consoles[3] = RC_CONSOLE_PCFX; /* SEGA CD hash doesn't have any logic to ensure it's being used against a SEGA CD, so it should always be last */ - iterator->consoles[3] = RC_CONSOLE_SEGA_CD; + iterator->consoles[4] = RC_CONSOLE_SEGA_CD; need_path = 1; } else if (rc_path_compare_extension(ext, "col")) diff --git a/deps/vitaGL/.github/FUNDING.yml b/deps/vitaGL/.github/FUNDING.yml new file mode 100644 index 0000000000..dbd470e946 --- /dev/null +++ b/deps/vitaGL/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: Rinnegatamante diff --git a/deps/vitaGL/Makefile b/deps/vitaGL/Makefile index e4b82ce5fa..e508bbc4b3 100644 --- a/deps/vitaGL/Makefile +++ b/deps/vitaGL/Makefile @@ -7,20 +7,25 @@ SOURCES += source/hacks endif CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) +ASMFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.S)) CGFILES := $(foreach dir,$(SHADERS), $(wildcard $(dir)/*.cg)) HEADERS := $(CGFILES:.cg=.h) -OBJS := $(CFILES:.c=.o) +OBJS := $(CFILES:.c=.o) $(ASMFILES:.S=.o) PREFIX = arm-vita-eabi CC = $(PREFIX)-gcc AR = $(PREFIX)-gcc-ar -CFLAGS = -g -Wl,-q -O2 -ffast-math -mtune=cortex-a9 -mfpu=neon -flto -ftree-vectorize -DSTB_DXT_IMPLEMENTATION +CFLAGS = -g -Wl,-q -O2 -ffast-math -mtune=cortex-a9 -mfpu=neon -ftree-vectorize -DSTB_DXT_IMPLEMENTATION ASFLAGS = $(CFLAGS) ifeq ($(NO_DEBUG),1) CFLAGS += -DSKIP_ERROR_HANDLING endif +ifeq ($(HAVE_SHARK),1) +CFLAGS += -DHAVE_SHARK +endif + all: $(TARGET).a $(TARGET).a: $(OBJS) @@ -47,6 +52,7 @@ clean: @make -C samples/sample5 clean @make -C samples/sample6 clean @make -C samples/sample7 clean + @make -C samples/sample8 clean install: $(TARGET).a @mkdir -p $(VITASDK)/$(PREFIX)/lib/ @@ -69,3 +75,5 @@ samples: $(TARGET).a cp "samples/sample6/vitaGL-Sample006.vpk" . @make -C samples/sample7 cp "samples/sample7/vitaGL-Sample007.vpk" . + @make -C samples/sample8 + cp "samples/sample8/vitaGL-Sample008.vpk" . diff --git a/deps/vitaGL/README.md b/deps/vitaGL/README.md index 5accb88b97..a4b3d9597f 100644 --- a/deps/vitaGL/README.md +++ b/deps/vitaGL/README.md @@ -20,7 +20,7 @@ Here you can find a list of projects using vitaGL: Direct OpenGL Usage:
[vitaQuake](https://vitadb.rinnegatamante.it/#/info/10) - Port of Quake I and mission packs
[vitaQuakeII](https://vitadb.rinnegatamante.it/#/info/278) -Port of Quake II and mission packs
-[vitaQuakeIII](https://vitadb.rinnegatamante.it/#/info/375) - Port of ioquake3 (Quake III: Arena, Quake III: Team Arena, OpenArena)
+[vitaQuakeIII](https://vitadb.rinnegatamante.it/#/info/375) - Port of ioquake3 (Quake III: Arena, Quake III: Team Arena, OpenArena, Urban Terror)
[vitaRTCW](https://vitadb.rinnegatamante.it/#/info/459) - Port of iortcw (Return to Castle Wolfenstein)
[vitaHexenII](https://vitadb.rinnegatamante.it/#/info/196) - Port of Hexen II
[vitaXash3D](https://vitadb.rinnegatamante.it/#/info/365) - Port of Xash3D (Half Life, Counter Strike 1.6)
diff --git a/deps/vitaGL/samples/sample2/Makefile b/deps/vitaGL/samples/sample2/Makefile index bdbdbd8e39..9a385a0fda 100644 --- a/deps/vitaGL/samples/sample2/Makefile +++ b/deps/vitaGL/samples/sample2/Makefile @@ -4,7 +4,7 @@ SOURCES := . INCLUDES := include -LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon +LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon -lSceAppMgr_stub CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) diff --git a/deps/vitaGL/samples/sample4/Makefile b/deps/vitaGL/samples/sample4/Makefile index 5a2d34a73b..16fdc27ac7 100644 --- a/deps/vitaGL/samples/sample4/Makefile +++ b/deps/vitaGL/samples/sample4/Makefile @@ -4,7 +4,7 @@ SOURCES := . INCLUDES := include -LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon +LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon -lSceAppMgr_stub CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) diff --git a/deps/vitaGL/samples/sample5/Makefile b/deps/vitaGL/samples/sample5/Makefile index 32f94c96c5..964bd24cce 100644 --- a/deps/vitaGL/samples/sample5/Makefile +++ b/deps/vitaGL/samples/sample5/Makefile @@ -4,7 +4,7 @@ SOURCES := . INCLUDES := include -LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon +LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lSceAppMgr_stub -lmathneon CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) diff --git a/deps/vitaGL/samples/sample5/main.c b/deps/vitaGL/samples/sample5/main.c index 5d8f35edc3..6b4389c403 100644 --- a/deps/vitaGL/samples/sample5/main.c +++ b/deps/vitaGL/samples/sample5/main.c @@ -21,13 +21,6 @@ uint16_t indices[] = { 20,21,22,21,22,23 // Bottom }; -void init_perspective(float fov, float aspect, float near, float far){ - float half_height = near * tanf(((fov * M_PI) / 180.0f) * 0.5f); - float half_width = half_height * aspect; - - glFrustum(-half_width, half_width, -half_height, half_height, near, far); -} - int main(){ // Initializing graphics device @@ -53,7 +46,7 @@ int main(){ glClearColor (0.0f, 0.0f, 0.0f, 0.0f); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - init_perspective(90.0f, 960.f/544.0f, 0.01f, 100.0f); + gluPerspective(90.0f, 960.f/544.0f, 0.01f, 100.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0f, 0.0f, -3.0f); // Centering the cube diff --git a/deps/vitaGL/samples/sample6/Makefile b/deps/vitaGL/samples/sample6/Makefile index bc0a5fe656..eaf8e9f488 100644 --- a/deps/vitaGL/samples/sample6/Makefile +++ b/deps/vitaGL/samples/sample6/Makefile @@ -4,7 +4,7 @@ SOURCES := . INCLUDES := include -LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon +LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lmathneon -lSceAppMgr_stub CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) diff --git a/deps/vitaGL/samples/sample6/main.c b/deps/vitaGL/samples/sample6/main.c index 464c0be430..817eeecf05 100644 --- a/deps/vitaGL/samples/sample6/main.c +++ b/deps/vitaGL/samples/sample6/main.c @@ -25,13 +25,6 @@ uint16_t indices[] = { 20,21,22,21,22,23 // Bottom }; -void init_perspective(float fov, float aspect, float near, float far){ - float half_height = near * tanf(((fov * M_PI) / 180.0f) * 0.5f); - float half_width = half_height * aspect; - - glFrustum(-half_width, half_width, -half_height, half_height, near, far); -} - int main(){ // Initializing graphics device @@ -67,7 +60,7 @@ int main(){ glClearColor (0.0f, 0.0f, 0.0f, 0.0f); glMatrixMode(GL_PROJECTION); glLoadIdentity(); - init_perspective(90.0f, 960.f/544.0f, 0.01f, 100.0f); + gluPerspective(90.0f, 960.f/544.0f, 0.01f, 100.0f); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); glTranslatef(0.0f, 0.0f, -3.0f); // Centering the cube diff --git a/deps/vitaGL/samples/sample8/Makefile b/deps/vitaGL/samples/sample8/Makefile new file mode 100644 index 0000000000..68a1481bd6 --- /dev/null +++ b/deps/vitaGL/samples/sample8/Makefile @@ -0,0 +1,37 @@ +SAMPLE_NUM := 008 +TARGET := vitaGL-Sample$(SAMPLE_NUM) +SOURCES := . + +INCLUDES := include + +LIBS = -lvitaGL -lc -lSceCommonDialog_stub -lm -lSceGxm_stub -lSceDisplay_stub -lSceAppMgr_stub -lmathneon + +CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) +CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) +BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin)) +OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) + +PREFIX = arm-vita-eabi +CC = $(PREFIX)-gcc +CXX = $(PREFIX)-g++ +CFLAGS = -g -Wl,-q -O2 -ftree-vectorize +CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11 -fpermissive +ASFLAGS = $(CFLAGS) + +all: $(TARGET).vpk + +$(TARGET).vpk: eboot.bin + vita-mksfoex -s TITLE_ID=VITAGL$(SAMPLE_NUM) "$(TARGET)" param.sfo + vita-pack-vpk -s param.sfo -b eboot.bin $@ + +eboot.bin: $(TARGET).velf + vita-make-fself -at 0x0E -m 0x10000 $< eboot.bin + +%.velf: %.elf + vita-elf-create $< $@ + +$(TARGET).elf: $(OBJS) + $(CC) $(CFLAGS) $^ $(LIBS) -o $@ + +clean: + @rm -rf *.velf *.elf *.vpk $(OBJS) param.sfo eboot.bin diff --git a/deps/vitaGL/samples/sample8/main.c b/deps/vitaGL/samples/sample8/main.c new file mode 100644 index 0000000000..9a7feee685 --- /dev/null +++ b/deps/vitaGL/samples/sample8/main.c @@ -0,0 +1,76 @@ +// Drawing a rotating cube + +#include +#include + +float colors[] = {1.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0}; // Colors for a face + +float vertices_front[] = {-0.5f, -0.5f, -0.5f, 0.5f, -0.5f, -0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f, -0.5f}; // Front Face +float vertices_back[] = {-0.5f, -0.5f, 0.5f, 0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f}; // Back Face +float vertices_left[] = {-0.5f, -0.5f, -0.5f, -0.5f, 0.5f, -0.5f, -0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f}; // Left Face +float vertices_right[] = {0.5f, -0.5f, -0.5f, 0.5f, 0.5f, -0.5f, 0.5f, -0.5f, 0.5f, 0.5f, 0.5f, 0.5f}; // Right Face +float vertices_top[] = {-0.5f, -0.5f, -0.5f, 0.5f, -0.5f, -0.5f, -0.5f, -0.5f, 0.5f, 0.5f, -0.5f, 0.5f}; // Top Face +float vertices_bottom[] = {-0.5f, 0.5f, -0.5f, 0.5f, 0.5f, -0.5f, -0.5f, 0.5f, 0.5f, 0.5f, 0.5f, 0.5f}; // Bottom Face + +uint16_t indices[] = { + 0, 1, 2, 1, 2, 3, // Front + 4, 5, 6, 5, 6, 7, // Back + 8, 9,10, 9,10,11, // Left + 12,13,14,13,14,15, // Right + 16,17,18,17,18,19, // Top + 20,21,22,21,22,23 // Bottom +}; + +int main(){ + + // Initializing graphics device + vglSetParamBufferSize(2 * 1024 * 1024); + vglInitWithCustomSizes(0x1000, 960, 544, 16 * 1024 * 1024, 0, 0, SCE_GXM_MULTISAMPLE_4X); + vglWaitVblankStart(GL_TRUE); + + // Creating colors array + float color_array[12*6]; + int i; + for (i=0;i<12*6;i++){ + color_array[i] = colors[i % 12]; + } + + // Creating vertices array + float vertex_array[12*6]; + memcpy(&vertex_array[12*0], &vertices_front[0], sizeof(float) * 12); + memcpy(&vertex_array[12*1], &vertices_back[0], sizeof(float) * 12); + memcpy(&vertex_array[12*2], &vertices_left[0], sizeof(float) * 12); + memcpy(&vertex_array[12*3], &vertices_right[0], sizeof(float) * 12); + memcpy(&vertex_array[12*4], &vertices_top[0], sizeof(float) * 12); + memcpy(&vertex_array[12*5], &vertices_bottom[0], sizeof(float) * 12); + + glClearColor (0.0f, 0.0f, 0.0f, 0.0f); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + gluPerspective(90.0f, 960.f/544.0f, 0.01f, 100.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + glTranslatef(0.0f, 0.0f, -3.0f); // Centering the cube + + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LESS); + + for (;;){ + vglStartRendering(); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + + glEnableClientState(GL_VERTEX_ARRAY); + glEnableClientState(GL_COLOR_ARRAY); + glVertexPointer(3, GL_FLOAT, 0, vertex_array); + glColorPointer(3, GL_FLOAT, 0, color_array); + glRotatef(1.0f, 0.0f, 0.0f, 1.0f); + glRotatef(0.5f, 0.0f, 1.0f, 0.0f); + glDrawElements(GL_TRIANGLES, 6*6, GL_UNSIGNED_SHORT, indices); + glDisableClientState(GL_VERTEX_ARRAY); + glDisableClientState(GL_COLOR_ARRAY); + vglStopRendering(); + } + + vglEnd(); + +} \ No newline at end of file diff --git a/deps/vitaGL/source/custom_shaders.c b/deps/vitaGL/source/custom_shaders.c index f199a70c20..e3cd811435 100644 --- a/deps/vitaGL/source/custom_shaders.c +++ b/deps/vitaGL/source/custom_shaders.c @@ -23,12 +23,14 @@ #include "shared.h" -#define MAX_CUSTOM_SHADERS 32 // Maximum number of linkable custom shaders -#define MAX_SHADER_PARAMS 16 // Maximum number of parameters per custom shader +#define MAX_CUSTOM_SHADERS 64 // Maximum number of linkable custom shaders +#define MAX_SHADER_PARAMS 8 // Maximum number of parameters per custom shader // Internal stuffs void *frag_uniforms = NULL; void *vert_uniforms = NULL; +uint8_t use_shark = 1; // Flag to check if vitaShaRK should be initialized at vitaGL boot +uint8_t is_shark_online = 0; // Current vitaShaRK status GLuint cur_program = 0; // Current in use custom program (0 = No custom program) @@ -45,6 +47,7 @@ typedef struct shader { GLboolean valid; SceGxmShaderPatcherId id; const SceGxmProgram *prog; + uint32_t size; } shader; // Program struct holding vertex/fragment shader info @@ -52,8 +55,8 @@ typedef struct program { shader *vshader; shader *fshader; GLboolean valid; - SceGxmVertexAttribute attr[16]; - SceGxmVertexStream stream[16]; + SceGxmVertexAttribute attr[MAX_SHADER_PARAMS]; + SceGxmVertexStream stream[MAX_SHADER_PARAMS]; SceGxmVertexProgram *vprog; SceGxmFragmentProgram *fprog; GLuint attr_num; @@ -102,8 +105,8 @@ void reloadCustomShader(void) { } void _vglDrawObjects_CustomShadersIMPL(GLenum mode, GLsizei count, GLboolean implicit_wvp) { - program *p = &progs[cur_program - 1]; if (implicit_wvp) { + program *p = &progs[cur_program - 1]; if (mvp_modified) { matrix4x4_multiply(mvp_matrix, projection_matrix, modelview_matrix); mvp_modified = GL_FALSE; @@ -121,6 +124,10 @@ void _vglDrawObjects_CustomShadersIMPL(GLenum mode, GLsizei count, GLboolean imp * - IMPLEMENTATION STARTS HERE - * ------------------------------ */ + +void vglEnableRuntimeShaderCompiler(GLboolean usage) { + use_shark = usage; +} GLuint glCreateShader(GLenum shaderType) { // Looking for a free shader slot @@ -146,6 +153,7 @@ GLuint glCreateShader(GLenum shaderType) { break; default: vgl_error = GL_INVALID_ENUM; + return 0; break; } shaders[res - 1].valid = GL_TRUE; @@ -153,17 +161,74 @@ GLuint glCreateShader(GLenum shaderType) { return res; } +void glGetShaderiv(GLuint handle, GLenum pname, GLint *params) { + // Grabbing passed shader + shader *s = &shaders[handle - 1]; + + switch (pname) { + case GL_SHADER_TYPE: + *params = s->type; + break; + case GL_COMPILE_STATUS: + *params = s->prog ? GL_TRUE : GL_FALSE; + break; + default: + SET_GL_ERROR(GL_INVALID_ENUM) + break; + } +} + +void glShaderSource(GLuint handle, GLsizei count, const GLchar * const *string, const GLint *length) { +#ifndef SKIP_ERROR_HANDLING + if (count < 0) { + SET_GL_ERROR(GL_INVALID_VALUE) + } +#endif + if (!is_shark_online) { + SET_GL_ERROR(GL_INVALID_OPERATION) + } + + // Grabbing passed shader + shader *s = &shaders[handle - 1]; + + // Temporarily setting prog to point to the shader source + s->prog = (SceGxmProgram *)string; + s->size = *length; +} + void glShaderBinary(GLsizei count, const GLuint *handles, GLenum binaryFormat, const void *binary, GLsizei length) { // Grabbing passed shader shader *s = &shaders[handles[0] - 1]; // Allocating compiled shader on RAM and registering it into sceGxmShaderPatcher s->prog = (SceGxmProgram *)malloc(length); - memcpy((void *)s->prog, binary, length); + memcpy_neon((void *)s->prog, binary, length); sceGxmShaderPatcherRegisterProgram(gxm_shader_patcher, s->prog, &s->id); s->prog = sceGxmShaderPatcherGetProgramFromId(s->id); } +void glCompileShader(GLuint handle) { + // If vitaShaRK is not enabled, we just error out + if (!is_shark_online) { + SET_GL_ERROR(GL_INVALID_OPERATION) + } +#ifdef HAVE_SHARK + // Grabbing passed shader + shader *s = &shaders[handle - 1]; + + // Compiling shader source + s->prog = shark_compile_shader((const char*)s->prog, &s->size, s->type == GL_FRAGMENT_SHADER ? SHARK_FRAGMENT_SHADER : SHARK_VERTEX_SHADER); + if (s->prog) { + SceGxmProgram *res = (SceGxmProgram *)malloc(s->size); + memcpy_neon((void *)res, (void *)s->prog, s->size); + s->prog = res; + sceGxmShaderPatcherRegisterProgram(gxm_shader_patcher, s->prog, &s->id); + s->prog = sceGxmShaderPatcherGetProgramFromId(s->id); + } + shark_clear_output(); +#endif +} + void glDeleteShader(GLuint shad) { // Grabbing passed shader shader *s = &shaders[shad - 1]; @@ -193,8 +258,9 @@ void glAttachShader(GLuint prog, GLuint shad) { default: break; } - } else - vgl_error = GL_INVALID_VALUE; + } else { + SET_GL_ERROR(GL_INVALID_VALUE) + } } GLuint glCreateProgram(void) { @@ -335,6 +401,43 @@ void glUniform2fv(GLint location, GLsizei count, const GLfloat *value) { } } +void glUniform3fv(GLint location, GLsizei count, const GLfloat *value) { + // Grabbing passed uniform + uniform *u = (uniform *)location; + if (u->ptr == NULL) + return; + + // Setting passed value to desired uniform + if (u->isVertex) { + if (vert_uniforms == NULL) + sceGxmReserveVertexDefaultUniformBuffer(gxm_context, &vert_uniforms); + sceGxmSetUniformDataF(vert_uniforms, u->ptr, 0, 3 * count, value); + } else { + if (frag_uniforms == NULL) + sceGxmReserveFragmentDefaultUniformBuffer(gxm_context, &frag_uniforms); + sceGxmSetUniformDataF(frag_uniforms, u->ptr, 0, 3 * count, value); + } +} + +void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) { + // Grabbing passed uniform + uniform *u = (uniform *)location; + if (u->ptr == NULL) + return; + + // Setting passed value to desired uniform + float v[4] = {v0, v1, v2, v3}; + if (u->isVertex) { + if (vert_uniforms == NULL) + sceGxmReserveVertexDefaultUniformBuffer(gxm_context, &vert_uniforms); + sceGxmSetUniformDataF(vert_uniforms, u->ptr, 0, 4, v); + } else { + if (frag_uniforms == NULL) + sceGxmReserveFragmentDefaultUniformBuffer(gxm_context, &frag_uniforms); + sceGxmSetUniformDataF(frag_uniforms, u->ptr, 0, 4, v); + } +} + void glUniform4fv(GLint location, GLsizei count, const GLfloat *value) { // Grabbing passed uniform uniform *u = (uniform *)location; @@ -402,7 +505,7 @@ void vglBindPackedAttribLocation(GLuint prog, GLuint index, const GLchar *name, bpe = sizeof(uint8_t); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -425,8 +528,7 @@ void vglVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean nor #ifndef SKIP_ERROR_HANDLING // Error handling if (stride < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -440,7 +542,7 @@ void vglVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean nor bpe = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -449,13 +551,13 @@ void vglVertexAttribPointer(GLuint index, GLint size, GLenum type, GLboolean nor // Copying passed data to vitaGL mempool if (stride == 0) - memcpy(ptr, pointer, count * bpe * size); // Faster if stride == 0 + memcpy_neon(ptr, pointer, count * bpe * size); // Faster if stride == 0 else { int i; uint8_t *dst = (uint8_t *)ptr; uint8_t *src = (uint8_t *)pointer; for (i = 0; i < count; i++) { - memcpy(dst, src, bpe * size); + memcpy_neon(dst, src, bpe * size); dst += (bpe * size); src += stride; } diff --git a/deps/vitaGL/source/framebuffers.c b/deps/vitaGL/source/framebuffers.c index bf6258b60e..3e67e28df1 100644 --- a/deps/vitaGL/source/framebuffers.c +++ b/deps/vitaGL/source/framebuffers.c @@ -66,8 +66,7 @@ void glGenFramebuffers(GLsizei n, GLuint *ids) { int i = 0, j = 0; #ifndef SKIP_ERROR_HANDLING if (n < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif for (i = 0; i < BUFFERS_NUM; i++) { @@ -85,8 +84,7 @@ void glGenFramebuffers(GLsizei n, GLuint *ids) { void glDeleteFramebuffers(GLsizei n, GLuint *framebuffers) { #ifndef SKIP_ERROR_HANDLING if (n < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif while (n > 0) { @@ -117,7 +115,7 @@ void glBindFramebuffer(GLenum target, GLuint fb) { active_write_fb = active_read_fb = (framebuffer *)fb; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -134,7 +132,7 @@ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint tex_id, GLint fb = active_read_fb; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -178,7 +176,7 @@ void glFramebufferTexture(GLenum target, GLenum attachment, GLuint tex_id, GLint sceGxmCreateRenderTarget(&renderTargetParams, &fb->target); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } diff --git a/deps/vitaGL/source/get_info.c b/deps/vitaGL/source/get_info.c index 314d0aa5aa..36bb0f8db5 100644 --- a/deps/vitaGL/source/get_info.c +++ b/deps/vitaGL/source/get_info.c @@ -80,7 +80,7 @@ void glGetBooleanv(GLenum pname, GLboolean *params) { *params = GL_FALSE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -98,7 +98,7 @@ void glGetFloatv(GLenum pname, GLfloat *data) { // Since we use column-major matrices internally, wee need to transpose it before returning it to the application for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { - data[i*4+j] = modelview_matrix[j][i]; + data[i * 4 + j] = modelview_matrix[j][i]; } } break; @@ -106,7 +106,7 @@ void glGetFloatv(GLenum pname, GLfloat *data) { // Since we use column-major matrices internally, wee need to transpose it before returning it to the application for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { - data[i*4+j] = projection_matrix[j][i]; + data[i * 4 + j] = projection_matrix[j][i]; } } break; @@ -122,8 +122,14 @@ void glGetFloatv(GLenum pname, GLfloat *data) { case GL_MAX_TEXTURE_STACK_DEPTH: // Max texture stack depth *data = GENERIC_STACK_DEPTH; break; + case GL_DEPTH_BITS: + *data = 32; + break; + case GL_STENCIL_BITS: + *data = 8; + break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -155,8 +161,14 @@ void glGetIntegerv(GLenum pname, GLint *data) { data[2] = gl_viewport.w; data[3] = gl_viewport.h; break; + case GL_DEPTH_BITS: + data[0] = 32; + break; + case GL_STENCIL_BITS: + data[0] = 8; + break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } diff --git a/deps/vitaGL/source/gxm.c b/deps/vitaGL/source/gxm.c index 66b58f371d..53bd49b4c6 100644 --- a/deps/vitaGL/source/gxm.c +++ b/deps/vitaGL/source/gxm.c @@ -23,6 +23,8 @@ #include "shared.h" +static uint32_t gxm_param_buf_size = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; // Param buffer size for sceGxm + static void *vdm_ring_buffer_addr; // VDM ring buffer memblock starting address static void *vertex_ring_buffer_addr; // vertex ring buffer memblock starting address static void *fragment_ring_buffer_addr; // fragment ring buffer memblock starting address @@ -44,6 +46,9 @@ static void *gxm_depth_surface_addr; // Depth surface memblock starting address static void *gxm_stencil_surface_addr; // Stencil surface memblock starting address static SceGxmDepthStencilSurface gxm_depth_stencil_surface; // Depth/Stencil surfaces setup for sceGxm +static SceUID shared_fb; // In-use hared framebuffer identifier +static SceSharedFbInfo shared_fb_info; // In-use shared framebuffer info struct + SceGxmContext *gxm_context; // sceGxm context instance GLenum vgl_error = GL_NO_ERROR; // Error returned by glGetError SceGxmShaderPatcher *gxm_shader_patcher; // sceGxmShaderPatcher shader patcher instance @@ -58,6 +63,9 @@ int DISPLAY_STRIDE; // Display stride in pixels float DISPLAY_WIDTH_FLOAT; // Display width in pixels (float) float DISPLAY_HEIGHT_FLOAT; // Display height in pixels (float) +uint8_t system_app_mode = 0; // Flag for system app mode usage +static uint8_t gxm_initialized = 0; // Current sceGxm state + // sceDisplay callback data struct display_queue_callback_data { void *addr; @@ -95,17 +103,40 @@ static void display_queue_callback(const void *callbackData) { } void initGxm(void) { + if (gxm_initialized) + return; + + // Initializing runtime shader compiler + if (use_shark) { +#ifdef HAVE_SHARK + if (shark_init(NULL) >= 0) + is_shark_online = 1; + else +#endif + is_shark_online = 0; + } + + // Checking if the running application is a system one + SceAppMgrBudgetInfo info; + info.size = sizeof(SceAppMgrBudgetInfo); + if (!sceAppMgrGetBudgetInfo(&info)) + system_app_mode = 1; + // Initializing sceGxm init parameters SceGxmInitializeParams gxm_init_params; memset(&gxm_init_params, 0, sizeof(SceGxmInitializeParams)); - gxm_init_params.flags = 0; + gxm_init_params.flags = system_app_mode ? 0x0A : 0; gxm_init_params.displayQueueMaxPendingCount = DISPLAY_BUFFER_COUNT - 1; gxm_init_params.displayQueueCallback = display_queue_callback; gxm_init_params.displayQueueCallbackDataSize = sizeof(struct display_queue_callback_data); - gxm_init_params.parameterBufferSize = SCE_GXM_DEFAULT_PARAMETER_BUFFER_SIZE; + gxm_init_params.parameterBufferSize = gxm_param_buf_size; // Initializing sceGxm - sceGxmInitialize(&gxm_init_params); + if (system_app_mode) + sceGxmVshInitialize(&gxm_init_params); + else + sceGxmInitialize(&gxm_init_params); + gxm_initialized = 1; } void initGxmContext(void) { @@ -153,6 +184,17 @@ void termGxmContext(void) { // Destroying sceGxm context sceGxmDestroyContext(gxm_context); + + if (system_app_mode) { + sceSharedFbBegin(shared_fb, &shared_fb_info); + sceGxmUnmapMemory(shared_fb_info.fb_base); + sceSharedFbEnd(shared_fb); + sceSharedFbClose(shared_fb); + } +#ifdef HAVE_SHARK + // Shutting down runtime shader compiler + if (is_shark_online) shark_end(); +#endif } void createDisplayRenderTarget(void) { @@ -177,16 +219,34 @@ void destroyDisplayRenderTarget(void) { } void initDisplayColorSurfaces(void) { + // Getting access to the shared framebuffer on system app mode + while (system_app_mode) { + shared_fb = sceSharedFbOpen(1); + memset(&shared_fb_info, 0, sizeof(SceSharedFbInfo)); + sceSharedFbGetInfo(shared_fb, &shared_fb_info); + if (shared_fb_info.index == 1) + sceSharedFbClose(shared_fb); + else { + sceGxmMapMemory(shared_fb_info.fb_base, shared_fb_info.fb_size, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE); + gxm_color_surfaces_addr[0] = shared_fb_info.fb_base; + gxm_color_surfaces_addr[1] = shared_fb_info.fb_base2; + memset(&shared_fb_info, 0, sizeof(SceSharedFbInfo)); + break; + } + } + vglMemType type = VGL_MEM_VRAM; int i; for (i = 0; i < DISPLAY_BUFFER_COUNT; i++) { // Allocating color surface memblock - gxm_color_surfaces_addr[i] = gpu_alloc_mapped( - ALIGN(4 * DISPLAY_STRIDE * DISPLAY_HEIGHT, 1 * 1024 * 1024), - &type); + if (!system_app_mode) { + gxm_color_surfaces_addr[i] = gpu_alloc_mapped( + ALIGN(4 * DISPLAY_STRIDE * DISPLAY_HEIGHT, 1 * 1024 * 1024), + &type); + memset(gxm_color_surfaces_addr[i], 0, DISPLAY_STRIDE * DISPLAY_HEIGHT); + } // Initializing allocated color surface - memset(gxm_color_surfaces_addr[i], 0, DISPLAY_STRIDE * DISPLAY_HEIGHT); sceGxmColorSurfaceInit(&gxm_color_surfaces[i], SCE_GXM_COLOR_FORMAT_A8B8G8R8, SCE_GXM_COLOR_SURFACE_LINEAR, @@ -206,7 +266,8 @@ void termDisplayColorSurfaces(void) { // Deallocating display's color surfaces and destroying sync objects int i; for (i = 0; i < DISPLAY_BUFFER_COUNT; i++) { - vgl_mem_free(gxm_color_surfaces_addr[i], VGL_MEM_VRAM); + if (!system_app_mode) + vgl_mem_free(gxm_color_surfaces_addr[i], VGL_MEM_VRAM); sceGxmSyncObjectDestroy(gxm_sync_objects[i]); } } @@ -317,9 +378,18 @@ void waitRenderingDone(void) { * ------------------------------ */ +void vglSetParamBufferSize(uint32_t size) { + gxm_param_buf_size = size; +} + void vglStartRendering(void) { // Starting drawing scene if (active_write_fb == NULL) { // Default framebuffer is used + if (system_app_mode) { + sceSharedFbBegin(shared_fb, &shared_fb_info); + shared_fb_info.vsync = vblank; + gxm_back_buffer_index = (shared_fb_info.index + 1) % 2; + } sceGxmBeginScene(gxm_context, gxm_scene_flags, gxm_render_target, NULL, NULL, gxm_sync_objects[gxm_back_buffer_index], @@ -338,7 +408,7 @@ void vglStartRendering(void) { // Setting back current viewport if enabled cause sceGxm will reset it at sceGxmEndScene call sceGxmSetViewport(gxm_context, x_port, x_scale, y_port, y_scale, z_port, z_scale); - + if (scissor_test_state) sceGxmSetRegionClip(gxm_context, SCE_GXM_REGION_CLIP_OUTSIDE, region.x, region.y, region.x + region.w - 1, region.y + region.h - 1); else @@ -348,18 +418,23 @@ void vglStartRendering(void) { void vglStopRenderingInit(void) { // Ending drawing scene sceGxmEndScene(gxm_context, NULL, NULL); + if (system_app_mode && vblank) + sceDisplayWaitVblankStart(); } void vglStopRenderingTerm(void) { if (active_write_fb == NULL) { // Default framebuffer is used - // Properly requesting a display update - struct display_queue_callback_data queue_cb_data; - queue_cb_data.addr = gxm_color_surfaces_addr[gxm_back_buffer_index]; - sceGxmDisplayQueueAddEntry(gxm_sync_objects[gxm_front_buffer_index], - gxm_sync_objects[gxm_back_buffer_index], &queue_cb_data); - gxm_front_buffer_index = gxm_back_buffer_index; - gxm_back_buffer_index = (gxm_back_buffer_index + 1) % DISPLAY_BUFFER_COUNT; + if (system_app_mode) + sceSharedFbEnd(shared_fb); + else { + struct display_queue_callback_data queue_cb_data; + queue_cb_data.addr = gxm_color_surfaces_addr[gxm_back_buffer_index]; + sceGxmDisplayQueueAddEntry(gxm_sync_objects[gxm_front_buffer_index], + gxm_sync_objects[gxm_back_buffer_index], &queue_cb_data); + gxm_front_buffer_index = gxm_back_buffer_index; + gxm_back_buffer_index = (gxm_back_buffer_index + 1) % DISPLAY_BUFFER_COUNT; + } } // Resetting vitaGL mempool diff --git a/deps/vitaGL/source/hacks/memcpy_neon.S b/deps/vitaGL/source/hacks/memcpy_neon.S new file mode 100644 index 0000000000..2f1d33ebb7 --- /dev/null +++ b/deps/vitaGL/source/hacks/memcpy_neon.S @@ -0,0 +1,140 @@ +/* + * NEON code contributed by Siarhei Siamashka . + * Origin: http://sourceware.org/ml/libc-ports/2009-07/msg00003.html + * + * The GNU C Library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public License. + * + * Tweaked for Android by Jim Huang + */ + +.arm +.fpu neon + +@ void* memcpy_n(void *destination, const void *source, size_t num) +.global memcpy_neon +.type memcpy_neon, %function +/* + * ENABLE_UNALIGNED_MEM_ACCESSES macro can be defined to permit the use + * of unaligned load/store memory accesses supported since ARMv6. This + * will further improve performance, but can purely theoretically cause + * problems if somebody decides to set SCTLR.A bit in the OS kernel + * (to trap each unaligned memory access) or somehow mess with strongly + * ordered/device memory. + */ +#define ENABLE_UNALIGNED_MEM_ACCESSES 1 + +#define NEON_MAX_PREFETCH_DISTANCE 320 + +.align 4 +memcpy_neon: + .fnstart + mov ip, r0 + cmp r2, #16 + blt 4f @ Have less than 16 bytes to copy + + @ First ensure 16 byte alignment for the destination buffer + tst r0, #0xF + beq 2f + tst r0, #1 + ldrneb r3, [r1], #1 + strneb r3, [ip], #1 + subne r2, r2, #1 + tst ip, #2 +#ifdef ENABLE_UNALIGNED_MEM_ACCESSES + ldrneh r3, [r1], #2 + strneh r3, [ip], #2 +#else + ldrneb r3, [r1], #1 + strneb r3, [ip], #1 + ldrneb r3, [r1], #1 + strneb r3, [ip], #1 +#endif + subne r2, r2, #2 + + tst ip, #4 + beq 1f + vld4.8 {d0[0], d1[0], d2[0], d3[0]}, [r1]! + vst4.8 {d0[0], d1[0], d2[0], d3[0]}, [ip, :32]! + sub r2, r2, #4 +1: + tst ip, #8 + beq 2f + vld1.8 {d0}, [r1]! + vst1.8 {d0}, [ip, :64]! + sub r2, r2, #8 +2: + subs r2, r2, #32 + blt 3f + mov r3, #32 + + @ Main copy loop, 32 bytes are processed per iteration. + @ ARM instructions are used for doing fine-grained prefetch, + @ increasing prefetch distance progressively up to + @ NEON_MAX_PREFETCH_DISTANCE at runtime +1: + vld1.8 {d0-d3}, [r1]! + cmp r3, #(NEON_MAX_PREFETCH_DISTANCE - 32) + pld [r1, r3] + addle r3, r3, #32 + vst1.8 {d0-d3}, [ip, :128]! + sub r2, r2, #32 + cmp r2, r3 + bge 1b + cmp r2, #0 + blt 3f +1: @ Copy the remaining part of the buffer (already prefetched) + vld1.8 {d0-d3}, [r1]! + subs r2, r2, #32 + vst1.8 {d0-d3}, [ip, :128]! + bge 1b +3: @ Copy up to 31 remaining bytes + tst r2, #16 + beq 4f + vld1.8 {d0, d1}, [r1]! + vst1.8 {d0, d1}, [ip, :128]! +4: + @ Use ARM instructions exclusively for the final trailing part + @ not fully fitting into full 16 byte aligned block in order + @ to avoid "ARM store after NEON store" hazard. Also NEON + @ pipeline will be (mostly) flushed by the time when the + @ control returns to the caller, making the use of NEON mostly + @ transparent (and avoiding hazards in the caller code) + +#ifdef ENABLE_UNALIGNED_MEM_ACCESSES + movs r3, r2, lsl #29 + ldrcs r3, [r1], #4 + strcs r3, [ip], #4 + ldrcs r3, [r1], #4 + strcs r3, [ip], #4 + ldrmi r3, [r1], #4 + strmi r3, [ip], #4 + movs r2, r2, lsl #31 + ldrcsh r3, [r1], #2 + strcsh r3, [ip], #2 + ldrmib r3, [r1], #1 + strmib r3, [ip], #1 +#else + movs r3, r2, lsl #29 + bcc 1f + .rept 8 + ldrcsb r3, [r1], #1 + strcsb r3, [ip], #1 + .endr +1: + bpl 1f + .rept 4 + ldrmib r3, [r1], #1 + strmib r3, [ip], #1 + .endr +1: + movs r2, r2, lsl #31 + ldrcsb r3, [r1], #1 + strcsb r3, [ip], #1 + ldrcsb r3, [r1], #1 + strcsb r3, [ip], #1 + ldrmib r3, [r1], #1 + strmib r3, [ip], #1 +#endif + bx lr + .fnend diff --git a/deps/vitaGL/source/legacy.c b/deps/vitaGL/source/legacy.c index 1b14001e1c..1b7340c402 100644 --- a/deps/vitaGL/source/legacy.c +++ b/deps/vitaGL/source/legacy.c @@ -87,8 +87,7 @@ void glVertex3f(GLfloat x, GLfloat y, GLfloat z) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -107,7 +106,7 @@ void glVertex3f(GLfloat x, GLfloat y, GLfloat z) { last_vert->v.x = x; last_vert->v.y = y; last_vert->v.z = z; - memcpy(&last_clr->v, ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&last_clr->v, ¤t_color.r, sizeof(vector4f)); last_clr->next = last_vert->next = NULL; // Increasing vertex counter @@ -118,8 +117,7 @@ void glVertex3fv(const GLfloat *v) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -135,8 +133,8 @@ void glVertex3fv(const GLfloat *v) { } // Properly populating the new element - memcpy(&last_vert->v, v, sizeof(vector3f)); - memcpy(&last_clr->v, ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&last_vert->v, v, sizeof(vector3f)); + memcpy_neon(&last_clr->v, ¤t_color.r, sizeof(vector4f)); last_clr->next = last_vert->next = NULL; // Increasing vertex counter @@ -157,7 +155,7 @@ void glColor3f(GLfloat red, GLfloat green, GLfloat blue) { void glColor3fv(const GLfloat *v) { // Setting current color value - memcpy(¤t_color.r, v, sizeof(vector3f)); + memcpy_neon(¤t_color.r, v, sizeof(vector3f)); current_color.a = 1.0f; } @@ -187,7 +185,7 @@ void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) { void glColor4fv(const GLfloat *v) { // Setting current color value - memcpy(¤t_color.r, v, sizeof(vector4f)); + memcpy_neon(¤t_color.r, v, sizeof(vector4f)); } void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) { @@ -209,8 +207,7 @@ void glTexCoord2fv(GLfloat *f) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -232,8 +229,7 @@ void glTexCoord2f(GLfloat s, GLfloat t) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -255,8 +251,7 @@ void glTexCoord2i(GLint s, GLint t) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -278,8 +273,7 @@ void glArrayElement(GLint i) { #ifndef SKIP_ERROR_HANDLING // Error handling if (i < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -309,7 +303,7 @@ void glArrayElement(GLint i) { last_clr->next = NULL; // Populating new vertex element - memcpy(&last_vert->v, ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&last_vert->v, ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); // Checking if current texture unit has GL_COLOR_ARRAY enabled if (tex_unit->color_array_state) { @@ -322,11 +316,11 @@ void glArrayElement(GLint i) { // Populating new color element last_clr->v.a = 1.0f; - memcpy(&last_clr->v, ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); + memcpy_neon(&last_clr->v, ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); } else { // Populating new color element with current color - memcpy(&last_clr->v, ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&last_clr->v, ¤t_color.r, sizeof(vector4f)); } // Checking if current texture unit has GL_TEXTURE_COORD_ARRAY enabled @@ -347,7 +341,7 @@ void glArrayElement(GLint i) { } // Populating new texcoord element - memcpy(&last_uv->v, ptr_tex, tex_unit->vertex_array.size * 2); + memcpy_neon(&last_uv->v, ptr_tex, tex_unit->vertex_array.size * 2); last_uv->next = NULL; } } @@ -357,8 +351,7 @@ void glBegin(GLenum mode) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -394,7 +387,7 @@ void glBegin(GLenum mode) { np = 4; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -410,7 +403,7 @@ void glEnd(void) { // Error handling if (phase != MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; + SET_GL_ERROR(GL_INVALID_OPERATION) return; } #endif @@ -498,8 +491,8 @@ void glEnd(void) { memset(vertices, 0, (vertex_count * sizeof(vector3f))); indices = (uint16_t *)gpu_pool_memalign(idx_count * sizeof(uint16_t), sizeof(uint16_t)); for (i = 0; i < vertex_count; i++) { - memcpy(&vertices[n], &object->v, sizeof(vector3f)); - memcpy(&uv_map[n], &object_uv->v, sizeof(vector2f)); + memcpy_neon(&vertices[n], &object->v, sizeof(vector3f)); + memcpy_neon(&uv_map[n], &object_uv->v, sizeof(vector2f)); indices[n] = n; object = object->next; object_uv = object_uv->next; @@ -522,8 +515,8 @@ void glEnd(void) { indices[i * 6 + 5] = i * 4 + 3; } for (j = 0; j < vertex_count; j++) { - memcpy(&vertices[j], &object->v, sizeof(vector3f)); - memcpy(&uv_map[j], &object_uv->v, sizeof(vector2f)); + memcpy_neon(&vertices[j], &object->v, sizeof(vector3f)); + memcpy_neon(&uv_map[j], &object_uv->v, sizeof(vector2f)); object = object->next; object_uv = object_uv->next; } @@ -554,8 +547,8 @@ void glEnd(void) { memset(vertices, 0, (vertex_count * sizeof(vector3f))); indices = (uint16_t *)gpu_pool_memalign(idx_count * sizeof(uint16_t), sizeof(uint16_t)); for (i = 0; i < vertex_count; i++) { - memcpy(&vertices[n], &object->v, sizeof(vector3f)); - memcpy(&colors[n], &object_clr->v, sizeof(vector4f)); + memcpy_neon(&vertices[n], &object->v, sizeof(vector3f)); + memcpy_neon(&colors[n], &object_clr->v, sizeof(vector4f)); indices[n] = n; object = object->next; object_clr = object_clr->next; @@ -579,8 +572,8 @@ void glEnd(void) { indices[i * 6 + 5] = i * 4 + 3; } for (j = 0; j < vertex_count; j++) { - memcpy(&vertices[j], &object->v, sizeof(vector3f)); - memcpy(&colors[j], &object_clr->v, sizeof(vector4f)); + memcpy_neon(&vertices[j], &object->v, sizeof(vector3f)); + memcpy_neon(&colors[j], &object_clr->v, sizeof(vector4f)); object = object->next; object_clr = object_clr->next; } diff --git a/deps/vitaGL/source/matrices.c b/deps/vitaGL/source/matrices.c index 26c40226fa..50a65e536f 100644 --- a/deps/vitaGL/source/matrices.c +++ b/deps/vitaGL/source/matrices.c @@ -46,7 +46,7 @@ void glMatrixMode(GLenum mode) { matrix = &projection_matrix; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -55,11 +55,9 @@ void glOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdou #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } else if ((left == right) || (bottom == top) || (nearVal == farVal)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -72,11 +70,9 @@ void glFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLd #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } else if ((left == right) || (bottom == top) || (nearVal < 0) || (farVal < 0)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -102,7 +98,7 @@ void glMultMatrixf(const GLfloat *m) { tmp[i][j] = m[j * 4 + i]; } } - + // Multiplicating passed matrix with in use one matrix4x4_multiply(res, *matrix, tmp); @@ -139,8 +135,7 @@ void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -162,8 +157,7 @@ void glPushMatrix(void) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -171,7 +165,7 @@ void glPushMatrix(void) { #ifndef SKIP_ERROR_HANDLING // Error handling if (modelview_stack_counter >= MODELVIEW_STACK_DEPTH) { - vgl_error = GL_STACK_OVERFLOW; + SET_GL_ERROR(GL_STACK_OVERFLOW) } else #endif // Copying current matrix into the matrix stack and increasing stack counter @@ -181,7 +175,7 @@ void glPushMatrix(void) { #ifndef SKIP_ERROR_HANDLING // Error handling if (projection_stack_counter >= GENERIC_STACK_DEPTH) { - vgl_error = GL_STACK_OVERFLOW; + SET_GL_ERROR(GL_STACK_OVERFLOW) } else #endif // Copying current matrix into the matrix stack and increasing stack counter @@ -193,17 +187,16 @@ void glPopMatrix(void) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif if (matrix == &modelview_matrix) { #ifndef SKIP_ERROR_HANDLING // Error handling - if (modelview_stack_counter == 0) - vgl_error = GL_STACK_UNDERFLOW; - else + if (modelview_stack_counter == 0) { + SET_GL_ERROR(GL_STACK_UNDERFLOW) + } else #endif // Copying last matrix on stack into current matrix and decreasing stack counter matrix4x4_copy(*matrix, modelview_matrix_stack[--modelview_stack_counter]); @@ -211,12 +204,25 @@ void glPopMatrix(void) { } else if (matrix == &projection_matrix) { #ifndef SKIP_ERROR_HANDLING // Error handling - if (projection_stack_counter == 0) - vgl_error = GL_STACK_UNDERFLOW; - else + if (projection_stack_counter == 0) { + SET_GL_ERROR(GL_STACK_UNDERFLOW) + } else #endif // Copying last matrix on stack into current matrix and decreasing stack counter matrix4x4_copy(*matrix, projection_matrix_stack[--projection_stack_counter]); } mvp_modified = GL_TRUE; } + +void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar) { +#ifndef SKIP_ERROR_HANDLING + // Error handling + if (phase == MODEL_CREATION) { + SET_GL_ERROR(GL_INVALID_OPERATION) + } +#endif + + // Initializing frustum matrix with requested parameters + matrix4x4_init_perspective(*matrix, fovy, aspect, zNear, zFar); + mvp_modified = GL_TRUE; +} diff --git a/deps/vitaGL/source/misc.c b/deps/vitaGL/source/misc.c index 69116f437e..b5e71277c2 100644 --- a/deps/vitaGL/source/misc.c +++ b/deps/vitaGL/source/misc.c @@ -119,7 +119,7 @@ void glPolygonMode(GLenum face, GLenum mode) { new_mode = SCE_GXM_POLYGON_MODE_TRIANGLE_FILL; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (face) { @@ -140,7 +140,7 @@ void glPolygonMode(GLenum face, GLenum mode) { sceGxmSetBackPolygonMode(gxm_context, new_mode); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) return; } update_polygon_offset(); @@ -167,8 +167,7 @@ void glFrontFace(GLenum mode) { void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) { #ifndef SKIP_ERROR_HANDLING if ((width < 0) || (height < 0)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif x_scale = width >> 1; @@ -197,8 +196,7 @@ void glDepthRangef(GLfloat nearVal, GLfloat farVal) { void glEnable(GLenum cap) { #ifndef SKIP_ERROR_HANDLING if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif switch (cap) { @@ -250,7 +248,7 @@ void glEnable(GLenum cap) { clip_plane0 = GL_TRUE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -258,8 +256,7 @@ void glEnable(GLenum cap) { void glDisable(GLenum cap) { #ifndef SKIP_ERROR_HANDLING if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif switch (cap) { @@ -311,7 +308,7 @@ void glDisable(GLenum cap) { clip_plane0 = GL_FALSE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -411,7 +408,7 @@ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -429,12 +426,12 @@ void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -443,8 +440,7 @@ void glLineWidth(GLfloat width) { #ifndef SKIP_ERROR_HANDLING // Error handling if (width <= 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -457,8 +453,7 @@ void glPointSize(GLfloat size) { #ifndef SKIP_ERROR_HANDLING // Error handling if (size <= 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -483,7 +478,7 @@ void glFogf(GLenum pname, GLfloat param) { fog_far = param; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -504,10 +499,10 @@ void glFogfv(GLenum pname, const GLfloat *params) { fog_far = params[0]; break; case GL_FOG_COLOR: - memcpy(&fog_color.r, params, sizeof(vector4f)); + memcpy_neon(&fog_color.r, params, sizeof(vector4f)); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -528,7 +523,7 @@ void glFogi(GLenum pname, const GLint param) { fog_far = param; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -545,10 +540,10 @@ void glClipPlane(GLenum plane, const GLdouble *equation) { matrix4x4_transpose(inverted_transposed, inverted); vector4f temp; vector4f_matrix4x4_mult(&temp, inverted_transposed, &clip_plane0_eq); - memcpy(&clip_plane0_eq.x, &temp.x, sizeof(vector4f)); + memcpy_neon(&clip_plane0_eq.x, &temp.x, sizeof(vector4f)); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } diff --git a/deps/vitaGL/source/shaders.h b/deps/vitaGL/source/shaders.h index 24a9db1c13..705ec6f04d 100644 --- a/deps/vitaGL/source/shaders.h +++ b/deps/vitaGL/source/shaders.h @@ -25,81 +25,81 @@ #define _SHADERS_H_ // Disable color buffer shader -SceGxmShaderPatcherId disable_color_buffer_fragment_id; -const SceGxmProgramParameter *disable_color_buffer_position; -SceGxmFragmentProgram *disable_color_buffer_fragment_program_patched; -const SceGxmProgramParameter *clear_depth; +extern SceGxmShaderPatcherId disable_color_buffer_fragment_id; +extern const SceGxmProgramParameter *disable_color_buffer_position; +extern SceGxmFragmentProgram *disable_color_buffer_fragment_program_patched; +extern const SceGxmProgramParameter *clear_depth; // Clear shader -SceGxmShaderPatcherId clear_vertex_id; -SceGxmShaderPatcherId clear_fragment_id; -const SceGxmProgramParameter *clear_position; -const SceGxmProgramParameter *clear_color; -SceGxmVertexProgram *clear_vertex_program_patched; -SceGxmFragmentProgram *clear_fragment_program_patched; +extern SceGxmShaderPatcherId clear_vertex_id; +extern SceGxmShaderPatcherId clear_fragment_id; +extern const SceGxmProgramParameter *clear_position; +extern const SceGxmProgramParameter *clear_color; +extern SceGxmVertexProgram *clear_vertex_program_patched; +extern SceGxmFragmentProgram *clear_fragment_program_patched; // Color (RGBA/RGB) shader -SceGxmShaderPatcherId rgba_vertex_id; -SceGxmShaderPatcherId rgb_vertex_id; -SceGxmShaderPatcherId rgba_fragment_id; -const SceGxmProgramParameter *rgba_position; -const SceGxmProgramParameter *rgba_color; -const SceGxmProgramParameter *rgba_wvp; -const SceGxmProgramParameter *rgb_position; -const SceGxmProgramParameter *rgb_color; -const SceGxmProgramParameter *rgb_wvp; -SceGxmVertexProgram *rgba_vertex_program_patched; -SceGxmVertexProgram *rgba_u8n_vertex_program_patched; -SceGxmVertexProgram *rgb_vertex_program_patched; -SceGxmVertexProgram *rgb_u8n_vertex_program_patched; -SceGxmFragmentProgram *rgba_fragment_program_patched; -const SceGxmProgram *rgba_fragment_program; +extern SceGxmShaderPatcherId rgba_vertex_id; +extern SceGxmShaderPatcherId rgb_vertex_id; +extern SceGxmShaderPatcherId rgba_fragment_id; +extern const SceGxmProgramParameter *rgba_position; +extern const SceGxmProgramParameter *rgba_color; +extern const SceGxmProgramParameter *rgba_wvp; +extern const SceGxmProgramParameter *rgb_position; +extern const SceGxmProgramParameter *rgb_color; +extern const SceGxmProgramParameter *rgb_wvp; +extern SceGxmVertexProgram *rgba_vertex_program_patched; +extern SceGxmVertexProgram *rgba_u8n_vertex_program_patched; +extern SceGxmVertexProgram *rgb_vertex_program_patched; +extern SceGxmVertexProgram *rgb_u8n_vertex_program_patched; +extern SceGxmFragmentProgram *rgba_fragment_program_patched; +extern const SceGxmProgram *rgba_fragment_program; // Texture2D shader -SceGxmShaderPatcherId texture2d_vertex_id; -SceGxmShaderPatcherId texture2d_fragment_id; -const SceGxmProgramParameter *texture2d_position; -const SceGxmProgramParameter *texture2d_texcoord; -const SceGxmProgramParameter *texture2d_wvp; -const SceGxmProgramParameter *texture2d_alpha_cut; -const SceGxmProgramParameter *texture2d_alpha_op; -const SceGxmProgramParameter *texture2d_tint_color; -const SceGxmProgramParameter *texture2d_tex_env; -const SceGxmProgramParameter *texture2d_clip_plane0; -const SceGxmProgramParameter *texture2d_clip_plane0_eq; -const SceGxmProgramParameter *texture2d_mv; -const SceGxmProgramParameter *texture2d_fog_mode; -const SceGxmProgramParameter *texture2d_fog_near; -const SceGxmProgramParameter *texture2d_fog_far; -const SceGxmProgramParameter *texture2d_fog_density; -const SceGxmProgramParameter *texture2d_fog_color; -const SceGxmProgramParameter *texture2d_tex_env_color; -SceGxmVertexProgram *texture2d_vertex_program_patched; -SceGxmFragmentProgram *texture2d_fragment_program_patched; -const SceGxmProgram *texture2d_fragment_program; +extern SceGxmShaderPatcherId texture2d_vertex_id; +extern SceGxmShaderPatcherId texture2d_fragment_id; +extern const SceGxmProgramParameter *texture2d_position; +extern const SceGxmProgramParameter *texture2d_texcoord; +extern const SceGxmProgramParameter *texture2d_wvp; +extern const SceGxmProgramParameter *texture2d_alpha_cut; +extern const SceGxmProgramParameter *texture2d_alpha_op; +extern const SceGxmProgramParameter *texture2d_tint_color; +extern const SceGxmProgramParameter *texture2d_tex_env; +extern const SceGxmProgramParameter *texture2d_clip_plane0; +extern const SceGxmProgramParameter *texture2d_clip_plane0_eq; +extern const SceGxmProgramParameter *texture2d_mv; +extern const SceGxmProgramParameter *texture2d_fog_mode; +extern const SceGxmProgramParameter *texture2d_fog_near; +extern const SceGxmProgramParameter *texture2d_fog_far; +extern const SceGxmProgramParameter *texture2d_fog_density; +extern const SceGxmProgramParameter *texture2d_fog_color; +extern const SceGxmProgramParameter *texture2d_tex_env_color; +extern SceGxmVertexProgram *texture2d_vertex_program_patched; +extern SceGxmFragmentProgram *texture2d_fragment_program_patched; +extern const SceGxmProgram *texture2d_fragment_program; // Texture2D+RGBA shader -SceGxmShaderPatcherId texture2d_rgba_vertex_id; -SceGxmShaderPatcherId texture2d_rgba_fragment_id; -const SceGxmProgramParameter *texture2d_rgba_position; -const SceGxmProgramParameter *texture2d_rgba_texcoord; -const SceGxmProgramParameter *texture2d_rgba_wvp; -const SceGxmProgramParameter *texture2d_rgba_alpha_cut; -const SceGxmProgramParameter *texture2d_rgba_alpha_op; -const SceGxmProgramParameter *texture2d_rgba_color; -const SceGxmProgramParameter *texture2d_rgba_tex_env; -const SceGxmProgramParameter *texture2d_rgba_clip_plane0; -const SceGxmProgramParameter *texture2d_rgba_clip_plane0_eq; -const SceGxmProgramParameter *texture2d_rgba_mv; -const SceGxmProgramParameter *texture2d_rgba_fog_mode; -const SceGxmProgramParameter *texture2d_rgba_fog_near; -const SceGxmProgramParameter *texture2d_rgba_fog_far; -const SceGxmProgramParameter *texture2d_rgba_fog_density; -const SceGxmProgramParameter *texture2d_rgba_fog_color; -const SceGxmProgramParameter *texture2d_rgba_tex_env_color; -SceGxmVertexProgram *texture2d_rgba_vertex_program_patched; -SceGxmVertexProgram *texture2d_rgba_u8n_vertex_program_patched; -SceGxmFragmentProgram *texture2d_rgba_fragment_program_patched; -const SceGxmProgram *texture2d_rgba_fragment_program; +extern SceGxmShaderPatcherId texture2d_rgba_vertex_id; +extern SceGxmShaderPatcherId texture2d_rgba_fragment_id; +extern const SceGxmProgramParameter *texture2d_rgba_position; +extern const SceGxmProgramParameter *texture2d_rgba_texcoord; +extern const SceGxmProgramParameter *texture2d_rgba_wvp; +extern const SceGxmProgramParameter *texture2d_rgba_alpha_cut; +extern const SceGxmProgramParameter *texture2d_rgba_alpha_op; +extern const SceGxmProgramParameter *texture2d_rgba_color; +extern const SceGxmProgramParameter *texture2d_rgba_tex_env; +extern const SceGxmProgramParameter *texture2d_rgba_clip_plane0; +extern const SceGxmProgramParameter *texture2d_rgba_clip_plane0_eq; +extern const SceGxmProgramParameter *texture2d_rgba_mv; +extern const SceGxmProgramParameter *texture2d_rgba_fog_mode; +extern const SceGxmProgramParameter *texture2d_rgba_fog_near; +extern const SceGxmProgramParameter *texture2d_rgba_fog_far; +extern const SceGxmProgramParameter *texture2d_rgba_fog_density; +extern const SceGxmProgramParameter *texture2d_rgba_fog_color; +extern const SceGxmProgramParameter *texture2d_rgba_tex_env_color; +extern SceGxmVertexProgram *texture2d_rgba_vertex_program_patched; +extern SceGxmVertexProgram *texture2d_rgba_u8n_vertex_program_patched; +extern SceGxmFragmentProgram *texture2d_rgba_fragment_program_patched; +extern const SceGxmProgram *texture2d_rgba_fragment_program; #endif diff --git a/deps/vitaGL/source/shared.h b/deps/vitaGL/source/shared.h index 6be0eb7723..021434883e 100644 --- a/deps/vitaGL/source/shared.h +++ b/deps/vitaGL/source/shared.h @@ -56,6 +56,8 @@ extern float DISPLAY_HEIGHT_FLOAT; // Display height in pixels (float) #include "state.h" #include "texture_callbacks.h" +#define SET_GL_ERROR(x) vgl_error = x; return; + // Texture environment mode typedef enum texEnvMode { MODULATE = 0, @@ -107,6 +109,9 @@ void LOG(const char *format, ...); #define max(a, b) ((a) > (b) ? (a) : (b)) #endif +extern uint8_t use_shark; // Flag to check if vitaShaRK should be initialized at vitaGL boot +extern uint8_t is_shark_online; // Current vitaShaRK status + // sceGxm viewport setup (NOTE: origin is on center screen) extern float x_port; extern float y_port; @@ -126,10 +131,11 @@ extern float fullscreen_z_scale; extern SceGxmContext *gxm_context; // sceGxm context instance extern GLenum vgl_error; // Error returned by glGetError extern SceGxmShaderPatcher *gxm_shader_patcher; // sceGxmShaderPatcher shader patcher instance +extern uint8_t system_app_mode; // Flag for system app mode usage -matrix4x4 mvp_matrix; // ModelViewProjection Matrix -matrix4x4 projection_matrix; // Projection Matrix -matrix4x4 modelview_matrix; // ModelView Matrix +extern matrix4x4 mvp_matrix; // ModelViewProjection Matrix +extern matrix4x4 projection_matrix; // Projection Matrix +extern matrix4x4 modelview_matrix; // ModelView Matrix extern GLboolean mvp_modified; // Check if ModelViewProjection matrix needs to be recreated extern GLuint cur_program; // Current in use custom program (0 = No custom program) diff --git a/deps/vitaGL/source/state.h b/deps/vitaGL/source/state.h index fea6184987..3b9f21c0e5 100644 --- a/deps/vitaGL/source/state.h +++ b/deps/vitaGL/source/state.h @@ -96,6 +96,7 @@ typedef struct texture_unit { SceGxmTextureFilter mag_filter; SceGxmTextureAddrMode u_mode; SceGxmTextureAddrMode v_mode; + uint32_t lod_bias; } texture_unit; // Framebuffer struct diff --git a/deps/vitaGL/source/tests.c b/deps/vitaGL/source/tests.c index cce5dd5800..8e0251412a 100644 --- a/deps/vitaGL/source/tests.c +++ b/deps/vitaGL/source/tests.c @@ -246,21 +246,21 @@ void update_scissor_test() { // Setting current vertex program to clear screen one and fragment program to scissor test one sceGxmSetVertexProgram(gxm_context, clear_vertex_program_patched); sceGxmSetFragmentProgram(gxm_context, scissor_test_fragment_program); - + // Invalidating viewport invalidate_viewport(); - + // Invalidating internal tile based region clip sceGxmSetRegionClip(gxm_context, SCE_GXM_REGION_CLIP_OUTSIDE, 0, 0, DISPLAY_WIDTH - 1, DISPLAY_HEIGHT - 1); - + if (scissor_test_state) { // Calculating scissor test region vertices vector4f_convert_to_local_space(scissor_test_vertices, region.x, region.y, region.w, region.h); - + void *vertex_buffer; sceGxmReserveVertexDefaultUniformBuffer(gxm_context, &vertex_buffer); sceGxmSetUniformDataF(vertex_buffer, clear_position, 0, 4, &clear_vertices->x); - + // Cleaning stencil surface mask update bit on the whole screen sceGxmSetFrontStencilFunc(gxm_context, SCE_GXM_STENCIL_FUNC_NEVER, @@ -290,7 +290,7 @@ void update_scissor_test() { SCE_GXM_STENCIL_OP_KEEP, SCE_GXM_STENCIL_OP_KEEP, 0, 0); - + void *vertex_buffer; sceGxmReserveVertexDefaultUniformBuffer(gxm_context, &vertex_buffer); if (scissor_test_state) @@ -298,14 +298,14 @@ void update_scissor_test() { else sceGxmSetUniformDataF(vertex_buffer, clear_position, 0, 4, &clear_vertices->x); sceGxmDraw(gxm_context, SCE_GXM_PRIMITIVE_TRIANGLE_FAN, SCE_GXM_INDEX_FORMAT_U16, depth_clear_indices, 4); - + // Restoring viewport validate_viewport(); - + // Reducing GPU workload by performing tile granularity clipping if (scissor_test_state) sceGxmSetRegionClip(gxm_context, SCE_GXM_REGION_CLIP_OUTSIDE, region.x, region.y, region.x + region.w - 1, region.y + region.h - 1); - + // Restoring original stencil test settings change_stencil_settings(); } @@ -327,8 +327,7 @@ void glScissor(GLint x, GLint y, GLsizei width, GLsizei height) { #ifndef SKIP_ERROR_HANDLING // Error handling if ((width < 0) || (height < 0)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -385,8 +384,7 @@ void glDepthMask(GLboolean flag) { #ifndef SKIP_ERROR_HANDLING // Error handling if (phase == MODEL_CREATION) { - vgl_error = GL_INVALID_OPERATION; - return; + SET_GL_ERROR(GL_INVALID_OPERATION) } #endif @@ -407,36 +405,36 @@ void glStencilOpSeparate(GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass switch (face) { case GL_FRONT: if (!change_stencil_config(&stencil_fail_front, sfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_fail_front, dpfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_pass_front, dppass)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; case GL_BACK: if (!change_stencil_config(&stencil_fail_back, sfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_fail_back, dpfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_pass_front, dppass)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; case GL_FRONT_AND_BACK: if (!change_stencil_config(&stencil_fail_front, sfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&stencil_fail_back, sfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_fail_front, dpfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_fail_back, dpfail)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_pass_front, dppass)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) if (!change_stencil_config(&depth_pass_back, dppass)) - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } change_stencil_settings(); @@ -450,27 +448,31 @@ void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask) { // Properly updating stencil test function settings switch (face) { case GL_FRONT: - if (!change_stencil_func_config(&stencil_func_front, func)) - vgl_error = GL_INVALID_ENUM; + if (!change_stencil_func_config(&stencil_func_front, func)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } stencil_mask_front = mask; stencil_ref_front = ref; break; case GL_BACK: - if (!change_stencil_func_config(&stencil_func_back, func)) - vgl_error = GL_INVALID_ENUM; + if (!change_stencil_func_config(&stencil_func_back, func)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } stencil_mask_back = mask; stencil_ref_back = ref; break; case GL_FRONT_AND_BACK: - if (!change_stencil_func_config(&stencil_func_front, func)) - vgl_error = GL_INVALID_ENUM; - if (!change_stencil_func_config(&stencil_func_back, func)) - vgl_error = GL_INVALID_ENUM; + if (!change_stencil_func_config(&stencil_func_front, func)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } + if (!change_stencil_func_config(&stencil_func_back, func)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } stencil_mask_front = stencil_mask_back = mask; stencil_ref_front = stencil_ref_back = ref; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } change_stencil_settings(); @@ -493,7 +495,7 @@ void glStencilMaskSeparate(GLenum face, GLuint mask) { stencil_mask_front_write = stencil_mask_back_write = mask; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) return; } change_stencil_settings(); diff --git a/deps/vitaGL/source/texture_callbacks.c b/deps/vitaGL/source/texture_callbacks.c index 08039147e4..48f42cbafd 100644 --- a/deps/vitaGL/source/texture_callbacks.c +++ b/deps/vitaGL/source/texture_callbacks.c @@ -24,12 +24,15 @@ #include #include +#include "vitaGL.h" #include "texture_callbacks.h" +#define convert_u16_to_u32_cspace(color, lshift, rshift, mask) ((((color << lshift) >> rshift) & mask) * 0xFF) / mask + // Read callback for 32bpp unsigned RGBA format uint32_t readRGBA(void *data) { uint32_t res; - memcpy(&res, data, 4); + memcpy_neon(&res, data, 4); return res; } @@ -37,48 +40,71 @@ uint32_t readRGBA(void *data) { uint32_t readRGBA5551(void *data) { uint16_t clr; uint32_t r, g, b, a; - memcpy(&clr, data, 2); - r = (((clr >> 11) & 0x1F) * 0xFF) / 0x1F; - g = ((((clr << 5) >> 11) & 0x1F) * 0xFF) / 0x1F; - b = ((((clr << 10) >> 11) & 0x1F) * 0xFF) / 0x1F; - a = (((clr << 15) >> 15) & 0x1) == 1 ? 0xFF : 0x00; + memcpy_neon(&clr, data, 2); + r = convert_u16_to_u32_cspace(clr, 0, 11, 0x1F); + g = convert_u16_to_u32_cspace(clr, 5, 11, 0x1F); + b = convert_u16_to_u32_cspace(clr, 10, 11, 0x1F); + a = convert_u16_to_u32_cspace(clr, 15, 15, 0x01); return ((a << 24) | (b << 16) | (g << 8) | r); } +// Read callback for 16bpp unsigned RGBA4444 format +uint32_t readRGBA4444(void *data) { + uint16_t clr; + uint32_t r, g, b, a; + memcpy_neon(&clr, data, 2); + r = convert_u16_to_u32_cspace(clr, 0, 12, 0x0F); + g = convert_u16_to_u32_cspace(clr, 4, 12, 0x0F); + b = convert_u16_to_u32_cspace(clr, 8, 12, 0x0F); + a = convert_u16_to_u32_cspace(clr, 12, 12, 0x0F); + return ((a << 24) | (b << 16) | (g << 8) | r); +} + +// Read callback for 16bpp unsigned RGB565 format +uint32_t readRGB565(void *data) { + uint16_t clr; + uint32_t r, g, b; + memcpy_neon(&clr, data, 2); + r = convert_u16_to_u32_cspace(clr, 0, 11, 0x1F); + g = convert_u16_to_u32_cspace(clr, 5, 11, 0x3F); + b = convert_u16_to_u32_cspace(clr, 11, 11, 0x1F); + return ((0xFF << 24) | (b << 16) | (g << 8) | r); +} + // Read callback for 24bpp unsigned RGB format uint32_t readRGB(void *data) { uint32_t res = 0xFFFFFFFF; - memcpy(&res, data, 3); + memcpy_neon(&res, data, 3); return res; } // Read callback for 16bpp unsigned RG format uint32_t readRG(void *data) { uint32_t res = 0xFFFFFFFF; - memcpy(&res, data, 2); + memcpy_neon(&res, data, 2); return res; } // Read callback for 8bpp unsigned R format uint32_t readR(void *data) { uint32_t res = 0xFFFFFFFF; - memcpy(&res, data, 1); + memcpy_neon(&res, data, 1); return res; } // Write callback for 32bpp unsigned RGBA format void writeRGBA(void *data, uint32_t color) { - memcpy(data, &color, 4); + memcpy_neon(data, &color, 4); } // Write callback for 24bpp unsigned RGB format void writeRGB(void *data, uint32_t color) { - memcpy(data, &color, 3); + memcpy_neon(data, &color, 3); } // Write callback for 16bpp unsigned RG format void writeRG(void *data, uint32_t color) { - memcpy(data, &color, 2); + memcpy_neon(data, &color, 2); } // Write callback for 16bpp unsigned RA format @@ -91,5 +117,5 @@ void writeRA(void *data, uint32_t color) { // Write callback for 8bpp unsigned R format void writeR(void *data, uint32_t color) { - memcpy(data, &color, 1); + memcpy_neon(data, &color, 1); } \ No newline at end of file diff --git a/deps/vitaGL/source/texture_callbacks.h b/deps/vitaGL/source/texture_callbacks.h index e9177ac78c..dd038b5bc2 100644 --- a/deps/vitaGL/source/texture_callbacks.h +++ b/deps/vitaGL/source/texture_callbacks.h @@ -28,8 +28,10 @@ uint32_t readR(void *data); uint32_t readRG(void *data); uint32_t readRGB(void *data); +uint32_t readRGB565(void *data); uint32_t readRGBA(void *data); uint32_t readRGBA5551(void *data); +uint32_t readRGBA4444(void *data); // Write callbacks void writeR(void *data, uint32_t color); diff --git a/deps/vitaGL/source/textures.c b/deps/vitaGL/source/textures.c index 8d7295926c..2a74bc6231 100644 --- a/deps/vitaGL/source/textures.c +++ b/deps/vitaGL/source/textures.c @@ -37,8 +37,7 @@ void glGenTextures(GLsizei n, GLuint *res) { #ifndef SKIP_ERROR_HANDLING // Error handling if (n < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -67,7 +66,7 @@ void glBindTexture(GLenum target, GLuint texture) { tex_unit->tex_id = texture; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -76,8 +75,7 @@ void glDeleteTextures(GLsizei n, const GLuint *gl_textures) { #ifndef SKIP_ERROR_HANDLING // Error handling if (n < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif @@ -138,7 +136,7 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt data_bpp = 1; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -150,7 +148,7 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt data_bpp = 2; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -158,11 +156,17 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt switch (type) { case GL_UNSIGNED_BYTE: data_bpp = 3; - if (internalFormat == GL_RGB) fast_store = GL_TRUE; - else read_cb = readRGB; + if (internalFormat == GL_RGB) + fast_store = GL_TRUE; + else + read_cb = readRGB; + break; + case GL_UNSIGNED_SHORT_5_6_5: + data_bpp = 2; + read_cb = readRGB565; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -170,15 +174,21 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt switch (type) { case GL_UNSIGNED_BYTE: data_bpp = 4; - if (internalFormat == GL_RGBA) fast_store = GL_TRUE; - else read_cb = readRGBA; + if (internalFormat == GL_RGBA) + fast_store = GL_TRUE; + else + read_cb = readRGBA; break; case GL_UNSIGNED_SHORT_5_5_5_1: data_bpp = 2; read_cb = readRGBA5551; break; + case GL_UNSIGNED_SHORT_4_4_4_4: + data_bpp = 2; + read_cb = readRGBA4444; + break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -225,22 +235,23 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt tex_format = SCE_GXM_TEXTURE_FORMAT_P8_ABGR; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } // Checking if texture is too big for sceGxm if (width > GXM_TEX_MAX_SIZE || height > GXM_TEX_MAX_SIZE) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } // Allocating texture/mipmaps depending on user call tex->type = internalFormat; tex->write_cb = write_cb; if (level == 0) - if (tex->write_cb) gpu_alloc_texture(width, height, tex_format, data, tex, data_bpp, read_cb, write_cb, fast_store); - else gpu_alloc_compressed_texture(width, height, tex_format, data, tex, data_bpp, read_cb); + if (tex->write_cb) + gpu_alloc_texture(width, height, tex_format, data, tex, data_bpp, read_cb, write_cb, fast_store); + else + gpu_alloc_compressed_texture(width, height, tex_format, data, tex, data_bpp, read_cb); else { gpu_alloc_mipmaps(level, tex); sceGxmTextureSetMipFilter(&tex->gxm_tex, SCE_GXM_TEXTURE_MIP_FILTER_ENABLED); @@ -251,6 +262,7 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt sceGxmTextureSetVAddrMode(&tex->gxm_tex, tex_unit->v_mode); sceGxmTextureSetMinFilter(&tex->gxm_tex, tex_unit->min_filter); sceGxmTextureSetMagFilter(&tex->gxm_tex, tex_unit->mag_filter); + sceGxmTextureSetLodBias(&tex->gxm_tex, tex_unit->lod_bias); // Setting palette if the format requests one if (tex->valid && tex->palette_UID) @@ -258,7 +270,7 @@ void glTexImage2D(GLenum target, GLint level, GLint internalFormat, GLsizei widt break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -281,13 +293,11 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G int i, j; if (xoffset + width > orig_w) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } else if (yoffset + height > orig_h) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } - + // Support for legacy GL1.0 format switch (format) { case 1: @@ -303,7 +313,7 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G format = GL_RGBA; break; } - + /* * Callbacks are actually used to just perform down/up-sampling * between U8 texture formats. Reads are expected to give as result @@ -323,8 +333,7 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G data_bpp = 1; break; default: - vgl_error = GL_INVALID_ENUM; - return; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -335,8 +344,7 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G data_bpp = 2; break; default: - vgl_error = GL_INVALID_ENUM; - return; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -346,9 +354,12 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G data_bpp = 3; read_cb = readRGB; break; + case GL_UNSIGNED_SHORT_5_6_5: + data_bpp = 2; + read_cb = readRGB565; + break; default: - vgl_error = GL_INVALID_ENUM; - return; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -362,9 +373,12 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G data_bpp = 2; read_cb = readRGBA5551; break; + case GL_UNSIGNED_SHORT_4_4_4_4: + data_bpp = 2; + read_cb = readRGBA4444; + break; default: - vgl_error = GL_INVALID_ENUM; - return; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; @@ -410,7 +424,7 @@ void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, G break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -431,12 +445,12 @@ void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum fo bpp = 4; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -470,7 +484,7 @@ void glTexParameteri(GLenum target, GLenum pname, GLint param) { case GL_LINEAR_MIPMAP_LINEAR: // TODO: Implement this break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } sceGxmTextureSetMinFilter(&tex->gxm_tex, tex_unit->min_filter); @@ -492,7 +506,7 @@ void glTexParameteri(GLenum target, GLenum pname, GLint param) { case GL_LINEAR_MIPMAP_LINEAR: // TODO: Implement this break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } sceGxmTextureSetMagFilter(&tex->gxm_tex, tex_unit->mag_filter); @@ -512,7 +526,7 @@ void glTexParameteri(GLenum target, GLenum pname, GLint param) { tex_unit->u_mode = SCE_GXM_TEXTURE_ADDR_MIRROR_CLAMP; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } sceGxmTextureSetUAddrMode(&tex->gxm_tex, tex_unit->u_mode); @@ -532,18 +546,22 @@ void glTexParameteri(GLenum target, GLenum pname, GLint param) { tex_unit->u_mode = SCE_GXM_TEXTURE_ADDR_MIRROR_CLAMP; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } sceGxmTextureSetVAddrMode(&tex->gxm_tex, tex_unit->v_mode); break; + case GL_TEXTURE_LOD_BIAS: // Distant LOD bias + tex_unit->lod_bias = (uint32_t)(param + GL_MAX_TEXTURE_LOD_BIAS); + sceGxmTextureSetLodBias(&tex->gxm_tex, tex_unit->lod_bias); + break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -593,13 +611,17 @@ void glTexParameterf(GLenum target, GLenum pname, GLfloat param) { tex_unit->u_mode = SCE_GXM_TEXTURE_ADDR_MIRROR_CLAMP; // Mirror Clamp sceGxmTextureSetVAddrMode(&tex->gxm_tex, tex_unit->v_mode); break; + case GL_TEXTURE_LOD_BIAS: // Distant LOD bias + tex_unit->lod_bias = (uint32_t)(param + GL_MAX_TEXTURE_LOD_BIAS); + sceGxmTextureSetLodBias(&tex->gxm_tex, tex_unit->lod_bias); + break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -607,9 +629,9 @@ void glTexParameterf(GLenum target, GLenum pname, GLfloat param) { void glActiveTexture(GLenum texture) { // Changing current in use server texture unit #ifndef SKIP_ERROR_HANDLING - if ((texture < GL_TEXTURE0) && (texture > GL_TEXTURE31)) - vgl_error = GL_INVALID_ENUM; - else + if ((texture < GL_TEXTURE0) && (texture > GL_TEXTURE31)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } else #endif server_texture_unit = texture - GL_TEXTURE0; } @@ -641,7 +663,7 @@ void glGenerateMipmap(GLenum target) { break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -667,12 +689,13 @@ void glTexEnvf(GLenum target, GLenum pname, GLfloat param) { tex_unit->env_mode = ADD; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) + break; } } @@ -682,15 +705,16 @@ void glTexEnvfv(GLenum target, GLenum pname, GLfloat *param) { case GL_TEXTURE_ENV: switch (pname) { case GL_TEXTURE_ENV_COLOR: - memcpy(&texenv_color.r, param, sizeof(GLfloat) * 4); + memcpy_neon(&texenv_color.r, param, sizeof(GLfloat) * 4); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) + break; } } @@ -722,12 +746,12 @@ void glTexEnvi(GLenum target, GLenum pname, GLint param) { } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } diff --git a/deps/vitaGL/source/utils/gpu_utils.c b/deps/vitaGL/source/utils/gpu_utils.c index cdda870475..6097b1deb3 100644 --- a/deps/vitaGL/source/utils/gpu_utils.c +++ b/deps/vitaGL/source/utils/gpu_utils.c @@ -25,8 +25,8 @@ #include "stb_dxt.h" #ifndef MIN -#define MIN(a,b) (((a)<(b))?(a):(b)) -#define MAX(a,b) (((a)<(b))?(b):(a)) +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#define MAX(a, b) (((a) < (b)) ? (b) : (a)) #endif // VRAM usage setting @@ -45,29 +45,27 @@ static unsigned int pool_size = 0; vglMemType frag_usse_type; vglMemType vert_usse_type; -uint64_t morton_1(uint64_t x) -{ - x = x & 0x5555555555555555; - x = (x | (x >> 1)) & 0x3333333333333333; - x = (x | (x >> 2)) & 0x0F0F0F0F0F0F0F0F; - x = (x | (x >> 4)) & 0x00FF00FF00FF00FF; - x = (x | (x >> 8)) & 0x0000FFFF0000FFFF; - x = (x | (x >> 16)) & 0xFFFFFFFFFFFFFFFF; - return x; +uint64_t morton_1(uint64_t x) { + x = x & 0x5555555555555555; + x = (x | (x >> 1)) & 0x3333333333333333; + x = (x | (x >> 2)) & 0x0F0F0F0F0F0F0F0F; + x = (x | (x >> 4)) & 0x00FF00FF00FF00FF; + x = (x | (x >> 8)) & 0x0000FFFF0000FFFF; + x = (x | (x >> 16)) & 0xFFFFFFFFFFFFFFFF; + return x; } -void d2xy_morton(uint64_t d, uint64_t *x, uint64_t *y) -{ - *x = morton_1(d); - *y = morton_1(d >> 1); +void d2xy_morton(uint64_t d, uint64_t *x, uint64_t *y) { + *x = morton_1(d); + *y = morton_1(d >> 1); } void extract_block(const uint8_t *src, int width, uint8_t *block) { int j; for (j = 0; j < 4; j++) { - memcpy(&block[j * 4 * 4], src, 16); + memcpy_neon(&block[j * 4 * 4], src, 16); src += width * 4; - } + } } void dxt_compress(uint8_t *dst, uint8_t *src, int w, int h, int isdxt5) { @@ -77,8 +75,10 @@ void dxt_compress(uint8_t *dst, uint8_t *src, int w, int h, int isdxt5) { uint64_t d, offs_x, offs_y; for (d = 0; d < num_blocks; d++) { d2xy_morton(d, &offs_x, &offs_y); - if (offs_x * 4 >= h) continue; - if (offs_y * 4 >= w) continue; + if (offs_x * 4 >= h) + continue; + if (offs_y * 4 >= w) + continue; extract_block(src + offs_y * 16 + offs_x * w * 16, w, block); stb_compress_dxt_block(dst, block, isdxt5, STB_DXT_HIGHQUAL); dst += isdxt5 ? 16 : 8; @@ -239,7 +239,7 @@ palette *gpu_alloc_palette(const void *data, uint32_t w, uint32_t bpe) { if (data == NULL) memset(texture_palette, 0, 256 * sizeof(uint32_t)); else if (bpe == 4) - memcpy(texture_palette, data, w * sizeof(uint32_t)); + memcpy_neon(texture_palette, data, w * sizeof(uint32_t)); res->data = texture_palette; // Returning palette @@ -274,11 +274,11 @@ void gpu_alloc_texture(uint32_t w, uint32_t h, SceGxmTextureFormat format, const int i, j; uint8_t *src = (uint8_t *)data; uint8_t *dst; - if (fast_store) { // Internal Format and Data Format are the same, we can just use memcpy for better performance + if (fast_store) { // Internal Format and Data Format are the same, we can just use memcpy_neon for better performance uint32_t line_size = w * bpp; for (i = 0; i < h; i++) { dst = ((uint8_t *)texture_data) + (ALIGN(w, 8) * bpp) * i; - memcpy(dst, src, line_size); + memcpy_neon(dst, src, line_size); src += line_size; } } else { // Different internal and data formats, we need to go with slower callbacks system @@ -310,20 +310,21 @@ void gpu_alloc_compressed_texture(uint32_t w, uint32_t h, SceGxmTextureFormat fo // If there's already a texture in passed texture object we first dealloc it if (tex->valid) gpu_free_texture(tex); - + // Getting texture format alignment uint8_t alignment = tex_format_to_alignment(format); - + // Calculating swizzled compressed texture size on memory tex->mtype = use_vram ? VGL_MEM_VRAM : VGL_MEM_RAM; int tex_size = w * h; - if (alignment == 8) tex_size /= 2; - + if (alignment == 8) + tex_size /= 2; + // Allocating texture data buffer void *texture_data = gpu_alloc_mapped(tex_size, &tex->mtype); - + // NOTE: Supports only GL_RGBA source format for now - + // Initializing texture data buffer if (texture_data != NULL) { // Initializing texture data buffer @@ -338,11 +339,10 @@ void gpu_alloc_compressed_texture(uint32_t w, uint32_t h, SceGxmTextureFormat fo writeRGBA(dst++, src); src += src_bpp; }*/ - + // Performing swizzling and DXT compression - dxt_compress(texture_data, (void*)data, w, h, alignment == 16); - - + dxt_compress(texture_data, (void *)data, w, h, alignment == 16); + //swizzle(texture_data, tmp2, w, h, alignment << 3); //free(tmp); //free(tmp2); @@ -418,7 +418,7 @@ void gpu_alloc_mipmaps(int level, texture *tex) { has_temp_buffer = GL_FALSE; temp = sceGxmTextureGetData(&tex->gxm_tex); } else { - memcpy(temp, sceGxmTextureGetData(&tex->gxm_tex), stride * orig_h * bpp); + memcpy_neon(temp, sceGxmTextureGetData(&tex->gxm_tex), stride * orig_h * bpp); gpu_free_texture(tex); } @@ -427,7 +427,7 @@ void gpu_alloc_mipmaps(int level, texture *tex) { void *texture_data = gpu_alloc_mapped(size, &tex->mtype); // Moving back old texture data from heap to texture memblock - memcpy(texture_data, temp, stride * orig_h * bpp); + memcpy_neon(texture_data, temp, stride * orig_h * bpp); if (has_temp_buffer) free(temp); else diff --git a/deps/vitaGL/source/utils/math_utils.c b/deps/vitaGL/source/utils/math_utils.c index 3b2ab113c8..ef9390781e 100644 --- a/deps/vitaGL/source/utils/math_utils.c +++ b/deps/vitaGL/source/utils/math_utils.c @@ -36,7 +36,7 @@ void matrix4x4_identity(matrix4x4 m) { } void matrix4x4_copy(matrix4x4 dst, const matrix4x4 src) { - memcpy(dst, src, sizeof(matrix4x4)); + memcpy_neon(dst, src, sizeof(matrix4x4)); } void matrix4x4_multiply(matrix4x4 dst, const matrix4x4 src1, const matrix4x4 src2) { diff --git a/deps/vitaGL/source/utils/mem_utils.c b/deps/vitaGL/source/utils/mem_utils.c index 0a46a312eb..3d23d96871 100644 --- a/deps/vitaGL/source/utils/mem_utils.c +++ b/deps/vitaGL/source/utils/mem_utils.c @@ -272,25 +272,31 @@ int vgl_mem_init(size_t size_ram, size_t size_cdram, size_t size_phycont) { if (mempool_addr[0] != NULL) vgl_mem_term(); - mempool_size[0] = ALIGN(size_cdram, 256 * 1024); - mempool_size[1] = ALIGN(size_ram, 4 * 1024); - mempool_size[2] = ALIGN(size_phycont, 256 * 1024); - mempool_id[0] = sceKernelAllocMemBlock("cdram_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, mempool_size[0], NULL); - mempool_id[1] = sceKernelAllocMemBlock("ram_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_RW, mempool_size[1], NULL); - mempool_id[2] = sceKernelAllocMemBlock("phycont_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW, mempool_size[2], NULL); + mempool_size[VGL_MEM_VRAM - 1] = ALIGN(size_cdram, 256 * 1024); + mempool_size[VGL_MEM_RAM - 1] = ALIGN(size_ram, 4 * 1024); + mempool_size[VGL_MEM_SLOW - 1] = ALIGN(size_phycont, 256 * 1024); + if (size_cdram) + mempool_id[VGL_MEM_VRAM - 1] = sceKernelAllocMemBlock("cdram_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_CDRAM_RW, mempool_size[VGL_MEM_VRAM - 1], NULL); + mempool_id[VGL_MEM_RAM - 1] = sceKernelAllocMemBlock("ram_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_RW, mempool_size[VGL_MEM_RAM - 1], NULL); + if (size_phycont) + mempool_id[VGL_MEM_SLOW - 1] = sceKernelAllocMemBlock("phycont_mempool", SCE_KERNEL_MEMBLOCK_TYPE_USER_MAIN_PHYCONT_RW, mempool_size[VGL_MEM_SLOW - 1], NULL); for (int i = 0; i < VGL_MEM_TYPE_COUNT - 2; i++) { - sceKernelGetMemBlockBase(mempool_id[i], &mempool_addr[i]); - sceGxmMapMemory(mempool_addr[i], mempool_size[i], SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE); + if (mempool_size[i]) { + sceKernelGetMemBlockBase(mempool_id[i], &mempool_addr[i]); + sceGxmMapMemory(mempool_addr[i], mempool_size[i], SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE); + } } // Initialize heap heap_init(); // Add memblocks to heap - heap_extend(VGL_MEM_VRAM, mempool_addr[0], mempool_size[0]); + if (size_cdram) + heap_extend(VGL_MEM_VRAM, mempool_addr[0], mempool_size[0]); heap_extend(VGL_MEM_RAM, mempool_addr[1], mempool_size[1]); - heap_extend(VGL_MEM_SLOW, mempool_addr[2], mempool_size[2]); + if (size_phycont) + heap_extend(VGL_MEM_SLOW, mempool_addr[2], mempool_size[2]); return 1; } diff --git a/deps/vitaGL/source/utils/stb_dxt.h b/deps/vitaGL/source/utils/stb_dxt.h index 9f7a4295a8..7441bede63 100644 --- a/deps/vitaGL/source/utils/stb_dxt.h +++ b/deps/vitaGL/source/utils/stb_dxt.h @@ -684,7 +684,7 @@ void stb_compress_dxt_block(unsigned char *dest, const unsigned char *src, int a dest += 8; // make a new copy of the data in which alpha is opaque, // because code uses a fast test for color constancy - memcpy(data, src, 4*16); + memcpy_neon(data, src, 4*16); for (i=0; i < 16; ++i) data[i][3] = 255; src = &data[0][0]; diff --git a/deps/vitaGL/source/vitaGL.c b/deps/vitaGL/source/vitaGL.c index 925cd12948..47bb02d623 100644 --- a/deps/vitaGL/source/vitaGL.c +++ b/deps/vitaGL/source/vitaGL.c @@ -36,6 +36,84 @@ #include "shaders/texture2d_rgba_v.h" #include "shaders/texture2d_v.h" +// Disable color buffer shader +SceGxmShaderPatcherId disable_color_buffer_fragment_id; +const SceGxmProgramParameter *disable_color_buffer_position; +SceGxmFragmentProgram *disable_color_buffer_fragment_program_patched; +const SceGxmProgramParameter *clear_depth; + +// Clear shader +SceGxmShaderPatcherId clear_vertex_id; +SceGxmShaderPatcherId clear_fragment_id; +const SceGxmProgramParameter *clear_position; +const SceGxmProgramParameter *clear_color; +SceGxmVertexProgram *clear_vertex_program_patched; +SceGxmFragmentProgram *clear_fragment_program_patched; + +// Color (RGBA/RGB) shader +SceGxmShaderPatcherId rgba_vertex_id; +SceGxmShaderPatcherId rgb_vertex_id; +SceGxmShaderPatcherId rgba_fragment_id; +const SceGxmProgramParameter *rgba_position; +const SceGxmProgramParameter *rgba_color; +const SceGxmProgramParameter *rgba_wvp; +const SceGxmProgramParameter *rgb_position; +const SceGxmProgramParameter *rgb_color; +const SceGxmProgramParameter *rgb_wvp; +SceGxmVertexProgram *rgba_vertex_program_patched; +SceGxmVertexProgram *rgba_u8n_vertex_program_patched; +SceGxmVertexProgram *rgb_vertex_program_patched; +SceGxmVertexProgram *rgb_u8n_vertex_program_patched; +SceGxmFragmentProgram *rgba_fragment_program_patched; +const SceGxmProgram *rgba_fragment_program; + +// Texture2D shader +SceGxmShaderPatcherId texture2d_vertex_id; +SceGxmShaderPatcherId texture2d_fragment_id; +const SceGxmProgramParameter *texture2d_position; +const SceGxmProgramParameter *texture2d_texcoord; +const SceGxmProgramParameter *texture2d_wvp; +const SceGxmProgramParameter *texture2d_alpha_cut; +const SceGxmProgramParameter *texture2d_alpha_op; +const SceGxmProgramParameter *texture2d_tint_color; +const SceGxmProgramParameter *texture2d_tex_env; +const SceGxmProgramParameter *texture2d_clip_plane0; +const SceGxmProgramParameter *texture2d_clip_plane0_eq; +const SceGxmProgramParameter *texture2d_mv; +const SceGxmProgramParameter *texture2d_fog_mode; +const SceGxmProgramParameter *texture2d_fog_near; +const SceGxmProgramParameter *texture2d_fog_far; +const SceGxmProgramParameter *texture2d_fog_density; +const SceGxmProgramParameter *texture2d_fog_color; +const SceGxmProgramParameter *texture2d_tex_env_color; +SceGxmVertexProgram *texture2d_vertex_program_patched; +SceGxmFragmentProgram *texture2d_fragment_program_patched; +const SceGxmProgram *texture2d_fragment_program; + +// Texture2D+RGBA shader +SceGxmShaderPatcherId texture2d_rgba_vertex_id; +SceGxmShaderPatcherId texture2d_rgba_fragment_id; +const SceGxmProgramParameter *texture2d_rgba_position; +const SceGxmProgramParameter *texture2d_rgba_texcoord; +const SceGxmProgramParameter *texture2d_rgba_wvp; +const SceGxmProgramParameter *texture2d_rgba_alpha_cut; +const SceGxmProgramParameter *texture2d_rgba_alpha_op; +const SceGxmProgramParameter *texture2d_rgba_color; +const SceGxmProgramParameter *texture2d_rgba_tex_env; +const SceGxmProgramParameter *texture2d_rgba_clip_plane0; +const SceGxmProgramParameter *texture2d_rgba_clip_plane0_eq; +const SceGxmProgramParameter *texture2d_rgba_mv; +const SceGxmProgramParameter *texture2d_rgba_fog_mode; +const SceGxmProgramParameter *texture2d_rgba_fog_near; +const SceGxmProgramParameter *texture2d_rgba_fog_far; +const SceGxmProgramParameter *texture2d_rgba_fog_density; +const SceGxmProgramParameter *texture2d_rgba_fog_color; +const SceGxmProgramParameter *texture2d_rgba_tex_env_color; +SceGxmVertexProgram *texture2d_rgba_vertex_program_patched; +SceGxmVertexProgram *texture2d_rgba_u8n_vertex_program_patched; +SceGxmFragmentProgram *texture2d_rgba_fragment_program_patched; +const SceGxmProgram *texture2d_rgba_fragment_program; + typedef struct gpubuffer { void *ptr; } gpubuffer; @@ -203,7 +281,7 @@ void vglUseVramForUSSE(GLboolean usage) { use_vram_for_usse = usage; } -void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_threshold, SceGxmMultisampleMode msaa) { +void vglInitWithCustomSizes(uint32_t gpu_pool_size, int width, int height, int ram_pool_size, int cdram_pool_size, int phycont_pool_size, SceGxmMultisampleMode msaa) { // Setting our display size msaa_mode = msaa; DISPLAY_WIDTH = width; @@ -231,13 +309,8 @@ void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_thre // Initializing sceGxm initGxm(); - // Getting max allocatable CDRAM and RAM memory - SceKernelFreeMemorySizeInfo info; - info.size = sizeof(SceKernelFreeMemorySizeInfo); - sceKernelGetFreeMemorySize(&info); - // Initializing memory heap for CDRAM and RAM memory - vgl_mem_init(info.size_user > ram_threshold ? info.size_user - ram_threshold : info.size_user, info.size_cdram - 256 * 1024, info.size_phycont - 1 * 1024 * 1024); // leave some just in case + vgl_mem_init(ram_pool_size, cdram_pool_size, phycont_pool_size); // Initializing sceGxm context initGxmContext(); @@ -608,11 +681,12 @@ void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_thre } texture_units[i].env_mode = MODULATE; texture_units[i].tex_id = 0; - texture_units[i].enabled = 0; + texture_units[i].enabled = GL_FALSE; texture_units[i].min_filter = SCE_GXM_TEXTURE_FILTER_LINEAR; texture_units[i].mag_filter = SCE_GXM_TEXTURE_FILTER_LINEAR; texture_units[i].u_mode = SCE_GXM_TEXTURE_ADDR_REPEAT; texture_units[i].v_mode = SCE_GXM_TEXTURE_ADDR_REPEAT; + texture_units[i].lod_bias = GL_MAX_TEXTURE_LOD_BIAS; // sceGxm range is 0 - (GL_MAX_TEXTURE_LOD_BIAS*2 + 1) } // Init custom shaders @@ -635,6 +709,24 @@ void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_thre sceGxmMapMemory(addr, _newlib_heap_size, SCE_GXM_MEMORY_ATTRIB_READ | SCE_GXM_MEMORY_ATTRIB_WRITE); } +void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_threshold, SceGxmMultisampleMode msaa) { + // Initializing sceGxm + initGxm(); + + // Getting max allocatable CDRAM and RAM memory + if (system_app_mode) { + SceAppMgrBudgetInfo info; + info.size = sizeof(SceAppMgrBudgetInfo); + sceAppMgrGetBudgetInfo(&info); + vglInitWithCustomSizes(gpu_pool_size, width, height, info.free_user_rw > ram_threshold ? info.free_user_rw - ram_threshold : info.free_user_rw, 0, 0, msaa); + } else { + SceKernelFreeMemorySizeInfo info; + info.size = sizeof(SceKernelFreeMemorySizeInfo); + sceKernelGetFreeMemorySize(&info); + vglInitWithCustomSizes(gpu_pool_size, width, height, info.size_user > ram_threshold ? info.size_user - ram_threshold : info.size_user, info.size_cdram - 256 * 1024, info.size_phycont - 1 * 1024 * 1024, msaa); + } +} + void vglInit(uint32_t gpu_pool_size) { vglInitExtended(gpu_pool_size, DISPLAY_WIDTH_DEF, DISPLAY_HEIGHT_DEF, 0x1000000, SCE_GXM_MULTISAMPLE_NONE); } @@ -699,8 +791,7 @@ void glGenBuffers(GLsizei n, GLuint *res) { int i = 0, j = 0; #ifndef SKIP_ERROR_HANDLING if (n < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif for (i = 0; i < BUFFERS_NUM; i++) { @@ -716,8 +807,7 @@ void glGenBuffers(GLsizei n, GLuint *res) { void glBindBuffer(GLenum target, GLuint buffer) { #ifndef SKIP_ERROR_HANDLING if ((buffer != 0x0000) && ((buffer >= BUFFERS_ADDR + BUFFERS_NUM) || (buffer < BUFFERS_ADDR))) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif switch (target) { @@ -728,7 +818,7 @@ void glBindBuffer(GLenum target, GLuint buffer) { index_array_unit = buffer - BUFFERS_ADDR; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -736,7 +826,7 @@ void glBindBuffer(GLenum target, GLuint buffer) { void glDeleteBuffers(GLsizei n, const GLuint *gl_buffers) { #ifndef SKIP_ERROR_HANDLING if (n < 0) { - vgl_error = GL_INVALID_VALUE; + SET_GL_ERROR(GL_INVALID_VALUE) return; } #endif @@ -756,8 +846,7 @@ void glDeleteBuffers(GLsizei n, const GLuint *gl_buffers) { void glBufferData(GLenum target, GLsizei size, const GLvoid *data, GLenum usage) { #ifndef SKIP_ERROR_HANDLING if (size < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif int idx = 0; @@ -769,12 +858,12 @@ void glBufferData(GLenum target, GLsizei size, const GLvoid *data, GLenum usage) idx = index_array_unit; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } vglMemType type = VGL_MEM_VRAM; gpu_buffers[idx].ptr = gpu_alloc_mapped(size, &type); - memcpy(gpu_buffers[idx].ptr, data, size); + memcpy_neon(gpu_buffers[idx].ptr, data, size); } void glBlendFunc(GLenum sfactor, GLenum dfactor) { @@ -813,7 +902,7 @@ void glBlendFunc(GLenum sfactor, GLenum dfactor) { blend_sfactor_rgb = blend_sfactor_a = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (dfactor) { @@ -851,7 +940,7 @@ void glBlendFunc(GLenum sfactor, GLenum dfactor) { blend_dfactor_rgb = blend_dfactor_a = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (blend_state) @@ -894,7 +983,7 @@ void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum d blend_sfactor_rgb = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (dstRGB) { @@ -932,7 +1021,7 @@ void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum d blend_dfactor_rgb = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (srcAlpha) { @@ -970,7 +1059,7 @@ void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum d blend_sfactor_a = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (dstAlpha) { @@ -1008,7 +1097,7 @@ void glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum d blend_dfactor_a = SCE_GXM_BLEND_FACTOR_SRC_ALPHA_SATURATE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (blend_state) @@ -1033,7 +1122,7 @@ void glBlendEquation(GLenum mode) { blend_func_rgb = blend_func_a = SCE_GXM_BLEND_FUNC_MAX; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (blend_state) @@ -1058,7 +1147,7 @@ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { blend_func_rgb = SCE_GXM_BLEND_FUNC_MAX; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } switch (modeAlpha) { @@ -1078,7 +1167,7 @@ void glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha) { blend_func_a = SCE_GXM_BLEND_FUNC_MAX; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (blend_state) @@ -1104,8 +1193,7 @@ void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 2) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1117,7 +1205,7 @@ void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *poin tex_unit->vertex_array.size = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -1129,8 +1217,7 @@ void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *poin void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 3) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1142,7 +1229,7 @@ void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *point tex_unit->color_array.size = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -1154,8 +1241,7 @@ void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *point void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 2) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1167,7 +1253,7 @@ void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *po tex_unit->texture_array.size = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } @@ -1209,7 +1295,7 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { skip_draw = GL_TRUE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (!skip_draw) { @@ -1319,20 +1405,20 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { uint8_t vec_set = 0, tex_set = 0, clr_set = 0; if (tex_unit->vertex_array.stride == 0) { ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * (tex_unit->vertex_array.num * tex_unit->vertex_array.size)); - memcpy(&vertices[0], ptr, count * sizeof(vector3f)); + memcpy_neon(&vertices[0], ptr, count * sizeof(vector3f)); vec_set = 1; } else ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * tex_unit->vertex_array.stride); if (tex_unit->texture_array.stride == 0) { ptr_tex = ((uint8_t *)tex_unit->texture_array.pointer) + (first * (tex_unit->texture_array.num * tex_unit->texture_array.size)); - memcpy(&uv_map[0], ptr_tex, count * sizeof(vector2f)); + memcpy_neon(&uv_map[0], ptr_tex, count * sizeof(vector2f)); tex_set = 1; } else ptr_tex = ((uint8_t *)tex_unit->texture_array.pointer) + (first * tex_unit->texture_array.stride); if (tex_unit->color_array_state) { if (tex_unit->color_array.stride == 0) { ptr_clr = ((uint8_t *)tex_unit->color_array.pointer) + (first * sizeof(vector4f)); - memcpy(&colors[0], ptr_clr, count * sizeof(vector4f)); + memcpy_neon(&colors[0], ptr_clr, count * sizeof(vector4f)); clr_set = 1; } else ptr_clr = ((uint8_t *)tex_unit->color_array.pointer) + (first * tex_unit->color_array.stride); @@ -1340,15 +1426,15 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); for (n = 0; n < count; n++) { if (!vec_set) { - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); ptr += tex_unit->vertex_array.stride; } if (!tex_set) { - memcpy(&uv_map[n], ptr_tex, tex_unit->texture_array.size * tex_unit->texture_array.num); + memcpy_neon(&uv_map[n], ptr_tex, tex_unit->texture_array.size * tex_unit->texture_array.num); ptr_tex += tex_unit->texture_array.stride; } if (tex_unit->color_array_state && (!clr_set)) { - memcpy(&colors[n], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); + memcpy_neon(&colors[n], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); ptr_clr += tex_unit->color_array.stride; } indices[n] = n; @@ -1390,24 +1476,24 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { uint8_t vec_set = 0, clr_set = 0; if (tex_unit->vertex_array.stride == 0) { ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * ((tex_unit->vertex_array.num * tex_unit->vertex_array.size))); - memcpy(&vertices[n], ptr, count * sizeof(vector3f)); + memcpy_neon(&vertices[n], ptr, count * sizeof(vector3f)); vec_set = 1; } else ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * (tex_unit->vertex_array.stride)); if (tex_unit->color_array.stride == 0) { ptr_clr = ((uint8_t *)tex_unit->color_array.pointer) + (first * ((tex_unit->color_array.num * tex_unit->color_array.size))); - memcpy(&colors[n], ptr_clr, count * tex_unit->color_array.num * tex_unit->color_array.size); + memcpy_neon(&colors[n], ptr_clr, count * tex_unit->color_array.num * tex_unit->color_array.size); clr_set = 1; } else ptr_clr = ((uint8_t *)tex_unit->color_array.pointer) + (first * tex_unit->color_array.size); indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); for (n = 0; n < count; n++) { if (!vec_set) { - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); ptr += tex_unit->vertex_array.stride; } if (!clr_set) { - memcpy(&colors[n * tex_unit->color_array.num * tex_unit->color_array.size], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); + memcpy_neon(&colors[n * tex_unit->color_array.num * tex_unit->color_array.size], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); ptr_clr += tex_unit->color_array.stride; } indices[n] = n; @@ -1430,7 +1516,7 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { colors = (vector4f *)gpu_pool_memalign(count * sizeof(vector4f), sizeof(vector4f)); indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); for (n = 0; n < count; n++) { - memcpy(&colors[n], ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&colors[n], ¤t_color.r, sizeof(vector4f)); indices[n] = n; } } else { @@ -1441,17 +1527,17 @@ void glDrawArrays(GLenum mode, GLint first, GLsizei count) { uint8_t vec_set = 0; if (tex_unit->vertex_array.stride == 0) { ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * ((tex_unit->vertex_array.num * tex_unit->vertex_array.size))); - memcpy(&vertices[n], ptr, count * sizeof(vector3f)); + memcpy_neon(&vertices[n], ptr, count * sizeof(vector3f)); vec_set = 1; } else ptr = ((uint8_t *)tex_unit->vertex_array.pointer) + (first * (tex_unit->vertex_array.stride)); indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); for (n = 0; n < count; n++) { if (!vec_set) { - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); ptr += tex_unit->vertex_array.stride; } - memcpy(&colors[n], ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&colors[n], ¤t_color.r, sizeof(vector4f)); indices[n] = n; } } @@ -1470,12 +1556,13 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in if (tex_unit->vertex_array_state) { GLboolean skip_draw = GL_FALSE; #ifndef SKIP_ERROR_HANDLING - if (type != GL_UNSIGNED_SHORT) - vgl_error = GL_INVALID_ENUM; - else if (phase == MODEL_CREATION) - vgl_error = GL_INVALID_OPERATION; - else if (count < 0) - vgl_error = GL_INVALID_VALUE; + if (type != GL_UNSIGNED_SHORT) { + SET_GL_ERROR(GL_INVALID_ENUM) + } else if (phase == MODEL_CREATION) { + SET_GL_ERROR(GL_INVALID_OPERATION) + } else if (count < 0) { + SET_GL_ERROR(GL_INVALID_VALUE) + } #endif switch (mode) { case GL_POINTS: @@ -1500,7 +1587,7 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in skip_draw = GL_TRUE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (!skip_draw) { @@ -1582,7 +1669,7 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in indices = (uint16_t *)((uint32_t)gpu_buffers[index_array_unit].ptr + (uint32_t)gl_indices); else { indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); - memcpy(indices, gl_indices, sizeof(uint16_t) * count); + memcpy_neon(indices, gl_indices, sizeof(uint16_t) * count); } if (vertex_array_unit >= 0) { vertices = (vector3f *)((uint32_t)gpu_buffers[vertex_array_unit].ptr + (uint32_t)tex_unit->vertex_array.pointer); @@ -1602,11 +1689,11 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in uv_map = (vector2f *)gpu_pool_memalign(vertex_count_int * sizeof(vector2f), sizeof(vector2f)); colors = (vector4f *)gpu_pool_memalign(vertex_count_int * sizeof(vector4f), sizeof(vector4f)); if (tex_unit->vertex_array.stride == 0) - memcpy(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); + memcpy_neon(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); if (tex_unit->texture_array.stride == 0) - memcpy(uv_map, tex_unit->texture_array.pointer, vertex_count_int * (tex_unit->texture_array.size * tex_unit->texture_array.num)); + memcpy_neon(uv_map, tex_unit->texture_array.pointer, vertex_count_int * (tex_unit->texture_array.size * tex_unit->texture_array.num)); if (tex_unit->color_array_state && (tex_unit->color_array.stride == 0)) - memcpy(colors, tex_unit->color_array.pointer, vertex_count_int * (tex_unit->color_array.size * tex_unit->color_array.num)); + memcpy_neon(colors, tex_unit->color_array.pointer, vertex_count_int * (tex_unit->color_array.size * tex_unit->color_array.num)); if ((tex_unit->vertex_array.stride != 0) || (tex_unit->texture_array.stride != 0)) { if (tex_unit->vertex_array.stride != 0) memset(vertices, 0, (vertex_count_int * sizeof(texture2d_vertex))); @@ -1614,9 +1701,9 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in uint8_t *ptr_tex = ((uint8_t *)tex_unit->texture_array.pointer); for (n = 0; n < vertex_count_int; n++) { if (tex_unit->vertex_array.stride != 0) - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); if (tex_unit->texture_array.stride != 0) - memcpy(&uv_map[n], ptr_tex, tex_unit->texture_array.size * tex_unit->texture_array.num); + memcpy_neon(&uv_map[n], ptr_tex, tex_unit->texture_array.size * tex_unit->texture_array.num); ptr += tex_unit->vertex_array.stride; ptr_tex += tex_unit->texture_array.stride; } @@ -1639,7 +1726,7 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in indices = (uint16_t *)((uint32_t)gpu_buffers[index_array_unit].ptr + (uint32_t)gl_indices); else { indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); - memcpy(indices, gl_indices, sizeof(uint16_t) * count); + memcpy_neon(indices, gl_indices, sizeof(uint16_t) * count); } if (vertex_array_unit >= 0) { colors = (uint8_t *)((uint32_t)gpu_buffers[vertex_array_unit].ptr + (uint32_t)tex_unit->color_array.pointer); @@ -1656,9 +1743,9 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in vertices = (vector3f *)gpu_pool_memalign(vertex_count_int * sizeof(vector3f), sizeof(vector3f)); colors = (uint8_t *)gpu_pool_memalign(vertex_count_int * tex_unit->color_array.num * tex_unit->color_array.size, tex_unit->color_array.num * tex_unit->color_array.size); if (tex_unit->vertex_array.stride == 0) - memcpy(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); + memcpy_neon(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); if (tex_unit->color_array.stride == 0) - memcpy(colors, tex_unit->color_array.pointer, vertex_count_int * (tex_unit->color_array.size * tex_unit->color_array.num)); + memcpy_neon(colors, tex_unit->color_array.pointer, vertex_count_int * (tex_unit->color_array.size * tex_unit->color_array.num)); if ((tex_unit->vertex_array.stride != 0) || (tex_unit->color_array.stride != 0)) { if (tex_unit->vertex_array.stride != 0) memset(vertices, 0, (vertex_count_int * sizeof(texture2d_vertex))); @@ -1666,9 +1753,9 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in uint8_t *ptr_clr = ((uint8_t *)tex_unit->color_array.pointer); for (n = 0; n < vertex_count_int; n++) { if (tex_unit->vertex_array.stride != 0) - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); if (tex_unit->color_array.stride != 0) - memcpy(&colors[n * tex_unit->color_array.num * tex_unit->color_array.size], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); + memcpy_neon(&colors[n * tex_unit->color_array.num * tex_unit->color_array.size], ptr_clr, tex_unit->color_array.size * tex_unit->color_array.num); ptr += tex_unit->vertex_array.stride; ptr_clr += tex_unit->color_array.stride; } @@ -1686,7 +1773,7 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in indices = (uint16_t *)((uint32_t)gpu_buffers[index_array_unit].ptr + (uint32_t)gl_indices); else { indices = (uint16_t *)gpu_pool_memalign(count * sizeof(uint16_t), sizeof(uint16_t)); - memcpy(indices, gl_indices, sizeof(uint16_t) * count); + memcpy_neon(indices, gl_indices, sizeof(uint16_t) * count); } int n = 0, j = 0; uint64_t vertex_count_int = 0; @@ -1702,14 +1789,14 @@ void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *gl_in vertices = (vector3f *)gpu_pool_memalign(vertex_count_int * sizeof(vector3f), sizeof(vector3f)); colors = (vector4f *)gpu_pool_memalign(vertex_count_int * tex_unit->color_array.num * tex_unit->color_array.size, tex_unit->color_array.num * tex_unit->color_array.size); if ((!vertex_array_unit) && tex_unit->vertex_array.stride == 0) - memcpy(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); + memcpy_neon(vertices, tex_unit->vertex_array.pointer, vertex_count_int * (tex_unit->vertex_array.size * tex_unit->vertex_array.num)); if ((!vertex_array_unit) && tex_unit->vertex_array.stride != 0) memset(vertices, 0, (vertex_count_int * sizeof(texture2d_vertex))); uint8_t *ptr = ((uint8_t *)tex_unit->vertex_array.pointer); for (n = 0; n < vertex_count_int; n++) { if ((!vertex_array_unit) && tex_unit->vertex_array.stride != 0) - memcpy(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); - memcpy(&colors[n], ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&vertices[n], ptr, tex_unit->vertex_array.size * tex_unit->vertex_array.num); + memcpy_neon(&colors[n], ¤t_color.r, sizeof(vector4f)); if (!vertex_array_unit) ptr += tex_unit->vertex_array.stride; } @@ -1734,7 +1821,7 @@ void glEnableClientState(GLenum array) { tex_unit->texture_array_state = GL_TRUE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } @@ -1752,16 +1839,16 @@ void glDisableClientState(GLenum array) { tex_unit->texture_array_state = GL_FALSE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } } void glClientActiveTexture(GLenum texture) { #ifndef SKIP_ERROR_HANDLING - if ((texture < GL_TEXTURE0) && (texture > GL_TEXTURE31)) - vgl_error = GL_INVALID_ENUM; - else + if ((texture < GL_TEXTURE0) && (texture > GL_TEXTURE31)) { + SET_GL_ERROR(GL_INVALID_ENUM) + } else #endif client_texture_unit = texture - GL_TEXTURE0; } @@ -1771,8 +1858,7 @@ void glClientActiveTexture(GLenum texture) { void vglVertexPointer(GLint size, GLenum type, GLsizei stride, GLuint count, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 2) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1785,18 +1871,18 @@ void vglVertexPointer(GLint size, GLenum type, GLsizei stride, GLuint count, con bpe = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } tex_unit->vertex_object = gpu_pool_memalign(count * bpe * size, bpe * size); if (stride == 0) - memcpy(tex_unit->vertex_object, pointer, count * bpe * size); + memcpy_neon(tex_unit->vertex_object, pointer, count * bpe * size); else { int i; uint8_t *dst = (uint8_t *)tex_unit->vertex_object; uint8_t *src = (uint8_t *)pointer; for (i = 0; i < count; i++) { - memcpy(dst, src, bpe * size); + memcpy_neon(dst, src, bpe * size); dst += (bpe * size); src += stride; } @@ -1806,8 +1892,7 @@ void vglVertexPointer(GLint size, GLenum type, GLsizei stride, GLuint count, con void vglColorPointer(GLint size, GLenum type, GLsizei stride, GLuint count, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 3) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1823,19 +1908,19 @@ void vglColorPointer(GLint size, GLenum type, GLsizei stride, GLuint count, cons bpe = sizeof(uint8_t); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } tex_unit->color_object = gpu_pool_memalign(count * bpe * size, bpe * size); tex_unit->color_object_type = type; if (stride == 0) - memcpy(tex_unit->color_object, pointer, count * bpe * size); + memcpy_neon(tex_unit->color_object, pointer, count * bpe * size); else { int i; uint8_t *dst = (uint8_t *)tex_unit->color_object; uint8_t *src = (uint8_t *)pointer; for (i = 0; i < count; i++) { - memcpy(dst, src, bpe * size); + memcpy_neon(dst, src, bpe * size); dst += (bpe * size); src += stride; } @@ -1845,8 +1930,7 @@ void vglColorPointer(GLint size, GLenum type, GLsizei stride, GLuint count, cons void vglTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLuint count, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if ((stride < 0) || (size < 2) || (size > 4)) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1859,18 +1943,18 @@ void vglTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLuint count, c bpe = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } tex_unit->texture_object = gpu_pool_memalign(count * bpe * size, bpe * size); if (stride == 0) - memcpy(tex_unit->texture_object, pointer, count * bpe * size); + memcpy_neon(tex_unit->texture_object, pointer, count * bpe * size); else { int i; uint8_t *dst = (uint8_t *)tex_unit->texture_object; uint8_t *src = (uint8_t *)pointer; for (i = 0; i < count; i++) { - memcpy(dst, src, bpe * size); + memcpy_neon(dst, src, bpe * size); dst += (bpe * size); src += stride; } @@ -1880,8 +1964,7 @@ void vglTexCoordPointer(GLint size, GLenum type, GLsizei stride, GLuint count, c void vglIndexPointer(GLenum type, GLsizei stride, GLuint count, const GLvoid *pointer) { #ifndef SKIP_ERROR_HANDLING if (stride < 0) { - vgl_error = GL_INVALID_VALUE; - return; + SET_GL_ERROR(GL_INVALID_VALUE) } #endif texture_unit *tex_unit = &texture_units[client_texture_unit]; @@ -1894,18 +1977,18 @@ void vglIndexPointer(GLenum type, GLsizei stride, GLuint count, const GLvoid *po bpe = sizeof(GLshort); break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } tex_unit->index_object = gpu_pool_memalign(count * bpe, bpe); if (stride == 0) - memcpy(tex_unit->index_object, pointer, count * bpe); + memcpy_neon(tex_unit->index_object, pointer, count * bpe); else { int i; uint8_t *dst = (uint8_t *)tex_unit->index_object; uint8_t *src = (uint8_t *)pointer; for (i = 0; i < count; i++) { - memcpy(dst, src, bpe); + memcpy_neon(dst, src, bpe); dst += bpe; src += stride; } @@ -1938,10 +2021,11 @@ void vglDrawObjects(GLenum mode, GLsizei count, GLboolean implicit_wvp) { texture_unit *tex_unit = &texture_units[client_texture_unit]; int texture2d_idx = tex_unit->tex_id; #ifndef SKIP_ERROR_HANDLING - if (phase == MODEL_CREATION) - vgl_error = GL_INVALID_OPERATION; - else if (count < 0) - vgl_error = GL_INVALID_VALUE; + if (phase == MODEL_CREATION) { + SET_GL_ERROR(GL_INVALID_OPERATION) + } else if (count < 0) { + SET_GL_ERROR(GL_INVALID_VALUE) + } #endif GLboolean skip_draw = GL_FALSE; switch (mode) { @@ -1967,7 +2051,7 @@ void vglDrawObjects(GLenum mode, GLsizei count, GLboolean implicit_wvp) { skip_draw = GL_TRUE; break; default: - vgl_error = GL_INVALID_ENUM; + SET_GL_ERROR(GL_INVALID_ENUM) break; } if (!skip_draw) { @@ -2074,7 +2158,7 @@ void vglDrawObjects(GLenum mode, GLsizei count, GLboolean implicit_wvp) { vector4f *colors = (vector4f *)gpu_pool_memalign(count * sizeof(vector4f), sizeof(vector4f)); int n; for (n = 0; n < count; n++) { - memcpy(&colors[n], ¤t_color.r, sizeof(vector4f)); + memcpy_neon(&colors[n], ¤t_color.r, sizeof(vector4f)); } sceGxmSetVertexStream(gxm_context, 0, tex_unit->vertex_object); sceGxmSetVertexStream(gxm_context, 1, colors); diff --git a/deps/vitaGL/source/vitaGL.h b/deps/vitaGL/source/vitaGL.h index fd252b844d..4072661241 100644 --- a/deps/vitaGL/source/vitaGL.h +++ b/deps/vitaGL/source/vitaGL.h @@ -24,20 +24,32 @@ extern "C" { #endif #include +#ifdef HAVE_SHARK +#include +#endif // clang-format off -#define GLfloat float -#define GLint int32_t -#define GLdouble double -#define GLshort int16_t -#define GLuint uint32_t -#define GLsizei int32_t -#define GLenum uint16_t -#define GLubyte uint8_t -#define GLvoid void -#define GLbyte int8_t #define GLboolean uint8_t +#define GLbyte int8_t +#define GLubyte uint8_t #define GLchar char +#define GLshort int16_t +#define GLushort uint16_t +#define GLint int32_t +#define GLuint uint32_t +#define GLfixed int32_t +#define GLint64 int64_t +#define GLuint64 uint64_t +#define GLsizei int32_t +#define GLenum uint32_t +#define GLintptr int32_t +#define GLsizeiptr uint32_t +#define GLsync int32_t +#define GLfloat float +#define GLclampf float +#define GLdouble double +#define GLclampd double +#define GLvoid void #define GL_FALSE 0 #define GL_TRUE 1 @@ -47,6 +59,8 @@ extern "C" { #define GL_ZERO 0 #define GL_ONE 1 +#define GL_NONE 0 + #define GL_POINTS 0x0000 #define GL_LINES 0x0001 #define GL_LINE_LOOP 0x0002 @@ -108,6 +122,8 @@ extern "C" { #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 +#define GL_DEPTH_BITS 0x0D56 +#define GL_STENCIL_BITS 0x0D57 #define GL_TEXTURE_2D 0x0DE1 #define GL_BYTE 0x1400 #define GL_UNSIGNED_BYTE 0x1401 @@ -218,6 +234,7 @@ extern "C" { #define GL_TEXTURE30 0x84DE #define GL_TEXTURE31 0x84DF #define GL_ACTIVE_TEXTURE 0x84E0 +#define GL_TEXTURE_LOD_BIAS 0x8501 #define GL_INCR_WRAP 0x8507 #define GL_MIRROR_CLAMP_EXT 0x8742 #define GL_DECR_WRAP 0x8508 @@ -234,12 +251,15 @@ extern "C" { #define GL_DYNAMIC_COPY 0x88EA #define GL_FRAGMENT_SHADER 0x8B30 #define GL_VERTEX_SHADER 0x8B31 +#define GL_SHADER_TYPE 0x8B4F +#define GL_COMPILE_STATUS 0x8B81 #define GL_READ_FRAMEBUFFER 0x8CA8 #define GL_DRAW_FRAMEBUFFER 0x8CA9 #define GL_COLOR_ATTACHMENT0 0x8CE0 #define GL_FRAMEBUFFER 0x8D40 -#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 32 +#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 32 +#define GL_MAX_TEXTURE_LOD_BIAS 31 // Aliases #define GL_CLAMP GL_CLAMP_TO_EDGE @@ -282,6 +302,7 @@ void glColor4ubv(const GLubyte *v); void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void glColorTable(GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *data); +void glCompileShader(GLuint shader); GLuint glCreateProgram(void); GLuint glCreateShader(GLenum shaderType); void glCullFace(GLenum mode); @@ -316,6 +337,7 @@ void glGetBooleanv(GLenum pname, GLboolean *params); void glGetFloatv(GLenum pname, GLfloat *data); GLenum glGetError(void); void glGetIntegerv(GLenum pname, GLint *data); +void glGetShaderiv(GLuint handle, GLenum pname, GLint *params); const GLubyte *glGetString(GLenum name); GLint glGetUniformLocation(GLuint prog, const GLchar *name); GLboolean glIsEnabled(GLenum cap); @@ -336,6 +358,7 @@ void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z); void glScalef(GLfloat x, GLfloat y, GLfloat z); void glScissor(GLint x, GLint y, GLsizei width, GLsizei height); void glShaderBinary(GLsizei count, const GLuint *handles, GLenum binaryFormat, const void *binary, GLsizei length); // NOTE: Uses GXP shaders +void glShaderSource(GLuint handle, GLsizei count, const GLchar * const *string, const GLint *length); // NOTE: Uses CG shader sources void glStencilFunc(GLenum func, GLint ref, GLuint mask); void glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask); void glStencilMask(GLuint mask); @@ -357,6 +380,8 @@ void glTranslatef(GLfloat x, GLfloat y, GLfloat z); void glUniform1f(GLint location, GLfloat v0); void glUniform1i(GLint location, GLint v0); void glUniform2fv(GLint location, GLsizei count, const GLfloat *value); +void glUniform3fv(GLint location, GLsizei count, const GLfloat *value); +void glUniform4f(GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); void glUniform4fv(GLint location, GLsizei count, const GLfloat *value); void glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); void glUseProgram(GLuint program); @@ -366,6 +391,9 @@ void glVertex3fv(const GLfloat *v); void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); void glViewport(GLint x, GLint y, GLsizei width, GLsizei height); +// glu* +void gluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar); + // VGL_EXT_gpu_objects_array extension void vglColorPointer(GLint size, GLenum type, GLsizei stride, GLuint count, const GLvoid *pointer); void vglColorPointerMapped(GLenum type, const GLvoid *pointer); @@ -394,12 +422,15 @@ typedef enum { // vgl* void *vglAlloc(uint32_t size, vglMemType type); +void vglEnableRuntimeShaderCompiler(GLboolean usage); void vglEnd(void); void vglFree(void *addr); void *vglGetTexDataPointer(GLenum target); void vglInit(uint32_t gpu_pool_size); void vglInitExtended(uint32_t gpu_pool_size, int width, int height, int ram_threshold, SceGxmMultisampleMode msaa); +void vglInitWithCustomSizes(uint32_t gpu_pool_size, int width, int height, int ram_pool_size, int cdram_pool_size, int phycont_pool_size, SceGxmMultisampleMode msaa); size_t vglMemFree(vglMemType type); +void vglSetParamBufferSize(uint32_t size); void vglStartRendering(); void vglStopRendering(); void vglStopRenderingInit(); @@ -410,6 +441,9 @@ void vglUseVramForUSSE(GLboolean usage); void vglUseExtraMem(GLboolean usage); void vglWaitVblankStart(GLboolean enable); +// NEON optimized memcpy +void *memcpy_neon(void *destination, const void *source, size_t num); + #ifdef __cplusplus } #endif diff --git a/deps/vitaShaRK/.gitattributes b/deps/vitaShaRK/.gitattributes new file mode 100644 index 0000000000..dfe0770424 --- /dev/null +++ b/deps/vitaShaRK/.gitattributes @@ -0,0 +1,2 @@ +# Auto detect text files and perform LF normalization +* text=auto diff --git a/deps/vitaShaRK/.github/FUNDING.yml b/deps/vitaShaRK/.github/FUNDING.yml new file mode 100644 index 0000000000..dbd470e946 --- /dev/null +++ b/deps/vitaShaRK/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: Rinnegatamante diff --git a/deps/vitaShaRK/.gitignore b/deps/vitaShaRK/.gitignore new file mode 100644 index 0000000000..4a072bdd8b --- /dev/null +++ b/deps/vitaShaRK/.gitignore @@ -0,0 +1,59 @@ +*.vpk +*.elf +*.velf +*.bin +*.sfo +*.S +*.wo + +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# Vita build stuffs +*.a +*.o diff --git a/deps/vitaShaRK/LICENSE b/deps/vitaShaRK/LICENSE new file mode 100644 index 0000000000..8805d0dfad --- /dev/null +++ b/deps/vitaShaRK/LICENSE @@ -0,0 +1,165 @@ +GNU LESSER GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + + This version of the GNU Lesser General Public License incorporates +the terms and conditions of version 3 of the GNU General Public +License, supplemented by the additional permissions listed below. + + 0. Additional Definitions. + + As used herein, "this License" refers to version 3 of the GNU Lesser +General Public License, and the "GNU GPL" refers to version 3 of the GNU +General Public License. + + "The Library" refers to a covered work governed by this License, +other than an Application or a Combined Work as defined below. + + An "Application" is any work that makes use of an interface provided +by the Library, but which is not otherwise based on the Library. +Defining a subclass of a class defined by the Library is deemed a mode +of using an interface provided by the Library. + + A "Combined Work" is a work produced by combining or linking an +Application with the Library. The particular version of the Library +with which the Combined Work was made is also called the "Linked +Version". + + The "Minimal Corresponding Source" for a Combined Work means the +Corresponding Source for the Combined Work, excluding any source code +for portions of the Combined Work that, considered in isolation, are +based on the Application, and not on the Linked Version. + + The "Corresponding Application Code" for a Combined Work means the +object code and/or source code for the Application, including any data +and utility programs needed for reproducing the Combined Work from the +Application, but excluding the System Libraries of the Combined Work. + + 1. Exception to Section 3 of the GNU GPL. + + You may convey a covered work under sections 3 and 4 of this License +without being bound by section 3 of the GNU GPL. + + 2. Conveying Modified Versions. + + If you modify a copy of the Library, and, in your modifications, a +facility refers to a function or data to be supplied by an Application +that uses the facility (other than as an argument passed when the +facility is invoked), then you may convey a copy of the modified +version: + + a) under this License, provided that you make a good faith effort to + ensure that, in the event an Application does not supply the + function or data, the facility still operates, and performs + whatever part of its purpose remains meaningful, or + + b) under the GNU GPL, with none of the additional permissions of + this License applicable to that copy. + + 3. Object Code Incorporating Material from Library Header Files. + + The object code form of an Application may incorporate material from +a header file that is part of the Library. You may convey such object +code under terms of your choice, provided that, if the incorporated +material is not limited to numerical parameters, data structure +layouts and accessors, or small macros, inline functions and templates +(ten or fewer lines in length), you do both of the following: + + a) Give prominent notice with each copy of the object code that the + Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the object code with a copy of the GNU GPL and this license + document. + + 4. Combined Works. + + You may convey a Combined Work under terms of your choice that, +taken together, effectively do not restrict modification of the +portions of the Library contained in the Combined Work and reverse +engineering for debugging such modifications, if you also do each of +the following: + + a) Give prominent notice with each copy of the Combined Work that + the Library is used in it and that the Library and its use are + covered by this License. + + b) Accompany the Combined Work with a copy of the GNU GPL and this license + document. + + c) For a Combined Work that displays copyright notices during + execution, include the copyright notice for the Library among + these notices, as well as a reference directing the user to the + copies of the GNU GPL and this license document. + + d) Do one of the following: + + 0) Convey the Minimal Corresponding Source under the terms of this + License, and the Corresponding Application Code in a form + suitable for, and under terms that permit, the user to + recombine or relink the Application with a modified version of + the Linked Version to produce a modified Combined Work, in the + manner specified by section 6 of the GNU GPL for conveying + Corresponding Source. + + 1) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (a) uses at run time + a copy of the Library already present on the user's computer + system, and (b) will operate properly with a modified version + of the Library that is interface-compatible with the Linked + Version. + + e) Provide Installation Information, but only if you would otherwise + be required to provide such information under section 6 of the + GNU GPL, and only to the extent that such information is + necessary to install and execute a modified version of the + Combined Work produced by recombining or relinking the + Application with a modified version of the Linked Version. (If + you use option 4d0, the Installation Information must accompany + the Minimal Corresponding Source and Corresponding Application + Code. If you use option 4d1, you must provide the Installation + Information in the manner specified by section 6 of the GNU GPL + for conveying Corresponding Source.) + + 5. Combined Libraries. + + You may place library facilities that are a work based on the +Library side by side in a single library together with other library +facilities that are not Applications and are not covered by this +License, and convey such a combined library under terms of your +choice, if you do both of the following: + + a) Accompany the combined library with a copy of the same work based + on the Library, uncombined with any other library facilities, + conveyed under the terms of this License. + + b) Give prominent notice with the combined library that part of it + is a work based on the Library, and explaining where to find the + accompanying uncombined form of the same work. + + 6. Revised Versions of the GNU Lesser General Public License. + + The Free Software Foundation may publish revised and/or new versions +of the GNU Lesser General Public License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. + + Each version is given a distinguishing version number. If the +Library as you received it specifies that a certain numbered version +of the GNU Lesser General Public License "or any later version" +applies to it, you have the option of following the terms and +conditions either of that published version or of any later version +published by the Free Software Foundation. If the Library as you +received it does not specify a version number of the GNU Lesser +General Public License, you may choose any version of the GNU Lesser +General Public License ever published by the Free Software Foundation. + + If the Library as you received it specifies that a proxy can decide +whether future versions of the GNU Lesser General Public License shall +apply, that proxy's public statement of acceptance of any version is +permanent authorization for you to choose that version for the +Library. diff --git a/deps/vitaShaRK/Makefile b/deps/vitaShaRK/Makefile new file mode 100644 index 0000000000..58ce7401e2 --- /dev/null +++ b/deps/vitaShaRK/Makefile @@ -0,0 +1,37 @@ +TARGET := libvitashark +SOURCES := source +SHADERS := shaders + +CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) +ASMFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.S)) +CGFILES := $(foreach dir,$(SHADERS), $(wildcard $(dir)/*.cg)) +HEADERS := $(CGFILES:.cg=.h) +OBJS := $(CFILES:.c=.o) $(ASMFILES:.S=.o) + +PREFIX = arm-vita-eabi +CC = $(PREFIX)-gcc +AR = $(PREFIX)-gcc-ar +CFLAGS = -g -Wl,-q -O2 -ffast-math -mtune=cortex-a9 -mfpu=neon -ftree-vectorize +ASFLAGS = $(CFLAGS) + +all: $(TARGET).a + +$(TARGET).a: $(OBJS) + $(AR) -rc $@ $^ + +clean: + @rm -rf $(TARGET).a $(TARGET).elf $(OBJS) + @make -C samples/sample1 clean + @make -C samples/sample2 clean + +install: $(TARGET).a + @mkdir -p $(VITASDK)/$(PREFIX)/lib/ + cp $(TARGET).a $(VITASDK)/$(PREFIX)/lib/ + @mkdir -p $(VITASDK)/$(PREFIX)/include/ + cp source/vitashark.h $(VITASDK)/$(PREFIX)/include/ + +samples: $(TARGET).a + @make -C samples/sample1 + cp "samples/sample1/vitaShaRK-Sample001.vpk" . + @make -C samples/sample2 + cp "samples/sample1/vitaShaRK-Sample002.vpk" . diff --git a/deps/vitaShaRK/README.md b/deps/vitaShaRK/README.md new file mode 100644 index 0000000000..53d4cd9d4b --- /dev/null +++ b/deps/vitaShaRK/README.md @@ -0,0 +1,18 @@ +# vitaShaRK +**vita** **Sha**ders **R**untime **K**ompiler is a runtime shader compiler library for PSVITA/PSTV using the SceShaccCg module contained inside the PSM runtime. + +# Build Instructions +In order to build vitaShaRK, you'll first need to build SceShaccCg stubs. This is a full list of commands you can use to install this library and the required stubs: +``` +vita-libs-gen SceShaccCg.yml build +cd build +make install +cd .. +cp shacccg.h $VITASDK/arm-vita-eabi/psp2/shacccg.h +make install +``` + + +# Credits + +**frangarcj** for the original vita2d shader compiler source used as base to build up this library. diff --git a/deps/vitaShaRK/SceShaccCg.yml b/deps/vitaShaRK/SceShaccCg.yml new file mode 100644 index 0000000000..d20eae44a5 --- /dev/null +++ b/deps/vitaShaRK/SceShaccCg.yml @@ -0,0 +1,43 @@ +version: 2 +firmware: 3.60 +modules: + SceShaccCg: + nid: 0xB3B90A35 + libraries: + SceShaccCg: + kernel: false + nid: 0xA05BBEBB + functions: + SceShaccCg_0205DE96: 0x0205DE96 + SceShaccCg_07DDFC78: 0x07DDFC78 + SceShaccCg_0E1285A6: 0x0E1285A6 + SceShaccCg_152971B1: 0x152971B1 + SceShaccCg_17223BEB: 0x17223BEB + SceShaccCg_2654E73A: 0x2654E73A + SceShaccCg_268FAEE9: 0x268FAEE9 + sceShaccCgInitializeCompileOptions: 0x3B58AFA0 + SceShaccCg_4595A388: 0x4595A388 + SceShaccCg_46FA0303: 0x46FA0303 + SceShaccCg_56BFA825: 0x56BFA825 + SceShaccCg_648739F3: 0x648739F3 + sceShaccCgCompileProgram: 0x66814F35 + SceShaccCg_6BB58825: 0x6BB58825 + sceShaccCgSetDefaultAllocator: 0x6F01D573 + SceShaccCg_6FB40CA9: 0x6FB40CA9 + SceShaccCg_7B2CF324: 0x7B2CF324 + SceShaccCg_7BC25091: 0x7BC25091 + SceShaccCg_7F430CCD: 0x7F430CCD + SceShaccCg_95F57A23: 0x95F57A23 + SceShaccCg_A067C481: 0xA067C481 + SceShaccCg_A13A8A1E: 0xA13A8A1E + SceShaccCg_A56B1A5B: 0xA56B1A5B + SceShaccCg_A7930FF6: 0xA7930FF6 + sceShaccCgInitializeCallbackList: 0xA8C2C1C8 + sceShaccCgDestroyCompileOutput: 0xAA82EF0C + SceShaccCg_B4AC9943: 0xB4AC9943 + SceShaccCg_BB703EE1: 0xBB703EE1 + SceShaccCg_D4378DB1: 0xD4378DB1 + SceShaccCg_DAD4AAE4: 0xDAD4AAE4 + SceShaccCg_DF3DDCFD: 0xDF3DDCFD + SceShaccCg_EF8D59D6: 0xEF8D59D6 + SceShaccCg_F4BAB902: 0xF4BAB902 diff --git a/deps/vitaShaRK/SceShaccCg/Makefile b/deps/vitaShaRK/SceShaccCg/Makefile new file mode 100644 index 0000000000..495b32a861 --- /dev/null +++ b/deps/vitaShaRK/SceShaccCg/Makefile @@ -0,0 +1,47 @@ +ifdef VITASDK +PREFIX = $(VITASDK)/bin/ +endif + +ARCH ?= $(PREFIX)arm-vita-eabi +AS = $(ARCH)-as +AR = $(ARCH)-ar +RANLIB = $(ARCH)-ranlib + +TARGETS = libSceShaccCg_stub.a +TARGETS_WEAK = libSceShaccCg_stub_weak.a + +SceShaccCg_OBJS = SceShaccCg_SceShaccCg_SceShaccCg_0205DE96.o SceShaccCg_SceShaccCg_SceShaccCg_07DDFC78.o SceShaccCg_SceShaccCg_SceShaccCg_0E1285A6.o SceShaccCg_SceShaccCg_SceShaccCg_152971B1.o SceShaccCg_SceShaccCg_SceShaccCg_17223BEB.o SceShaccCg_SceShaccCg_SceShaccCg_2654E73A.o SceShaccCg_SceShaccCg_SceShaccCg_268FAEE9.o SceShaccCg_SceShaccCg_sceShaccCgInitializeCompileOptions.o SceShaccCg_SceShaccCg_SceShaccCg_4595A388.o SceShaccCg_SceShaccCg_SceShaccCg_46FA0303.o SceShaccCg_SceShaccCg_SceShaccCg_56BFA825.o SceShaccCg_SceShaccCg_SceShaccCg_648739F3.o SceShaccCg_SceShaccCg_sceShaccCgCompileProgram.o SceShaccCg_SceShaccCg_SceShaccCg_6BB58825.o SceShaccCg_SceShaccCg_sceShaccCgSetDefaultAllocator.o SceShaccCg_SceShaccCg_SceShaccCg_6FB40CA9.o SceShaccCg_SceShaccCg_SceShaccCg_7B2CF324.o SceShaccCg_SceShaccCg_SceShaccCg_7BC25091.o SceShaccCg_SceShaccCg_SceShaccCg_7F430CCD.o SceShaccCg_SceShaccCg_SceShaccCg_95F57A23.o SceShaccCg_SceShaccCg_SceShaccCg_A067C481.o SceShaccCg_SceShaccCg_SceShaccCg_A13A8A1E.o SceShaccCg_SceShaccCg_SceShaccCg_A56B1A5B.o SceShaccCg_SceShaccCg_SceShaccCg_A7930FF6.o SceShaccCg_SceShaccCg_sceShaccCgInitializeCallbackList.o SceShaccCg_SceShaccCg_sceShaccCgDestroyCompileOutput.o SceShaccCg_SceShaccCg_SceShaccCg_B4AC9943.o SceShaccCg_SceShaccCg_SceShaccCg_BB703EE1.o SceShaccCg_SceShaccCg_SceShaccCg_D4378DB1.o SceShaccCg_SceShaccCg_SceShaccCg_DAD4AAE4.o SceShaccCg_SceShaccCg_SceShaccCg_DF3DDCFD.o SceShaccCg_SceShaccCg_SceShaccCg_EF8D59D6.o SceShaccCg_SceShaccCg_SceShaccCg_F4BAB902.o +SceShaccCg_weak_OBJS = SceShaccCg_SceShaccCg_SceShaccCg_0205DE96.wo SceShaccCg_SceShaccCg_SceShaccCg_07DDFC78.wo SceShaccCg_SceShaccCg_SceShaccCg_0E1285A6.wo SceShaccCg_SceShaccCg_SceShaccCg_152971B1.wo SceShaccCg_SceShaccCg_SceShaccCg_17223BEB.wo SceShaccCg_SceShaccCg_SceShaccCg_2654E73A.wo SceShaccCg_SceShaccCg_SceShaccCg_268FAEE9.wo SceShaccCg_SceShaccCg_sceShaccCgInitializeCompileOptions.wo SceShaccCg_SceShaccCg_SceShaccCg_4595A388.wo SceShaccCg_SceShaccCg_SceShaccCg_46FA0303.wo SceShaccCg_SceShaccCg_SceShaccCg_56BFA825.wo SceShaccCg_SceShaccCg_SceShaccCg_648739F3.wo SceShaccCg_SceShaccCg_sceShaccCgCompileProgram.wo SceShaccCg_SceShaccCg_SceShaccCg_6BB58825.wo SceShaccCg_SceShaccCg_sceShaccCgSetDefaultAllocator.wo SceShaccCg_SceShaccCg_SceShaccCg_6FB40CA9.wo SceShaccCg_SceShaccCg_SceShaccCg_7B2CF324.wo SceShaccCg_SceShaccCg_SceShaccCg_7BC25091.wo SceShaccCg_SceShaccCg_SceShaccCg_7F430CCD.wo SceShaccCg_SceShaccCg_SceShaccCg_95F57A23.wo SceShaccCg_SceShaccCg_SceShaccCg_A067C481.wo SceShaccCg_SceShaccCg_SceShaccCg_A13A8A1E.wo SceShaccCg_SceShaccCg_SceShaccCg_A56B1A5B.wo SceShaccCg_SceShaccCg_SceShaccCg_A7930FF6.wo SceShaccCg_SceShaccCg_sceShaccCgInitializeCallbackList.wo SceShaccCg_SceShaccCg_sceShaccCgDestroyCompileOutput.wo SceShaccCg_SceShaccCg_SceShaccCg_B4AC9943.wo SceShaccCg_SceShaccCg_SceShaccCg_BB703EE1.wo SceShaccCg_SceShaccCg_SceShaccCg_D4378DB1.wo SceShaccCg_SceShaccCg_SceShaccCg_DAD4AAE4.wo SceShaccCg_SceShaccCg_SceShaccCg_DF3DDCFD.wo SceShaccCg_SceShaccCg_SceShaccCg_EF8D59D6.wo SceShaccCg_SceShaccCg_SceShaccCg_F4BAB902.wo +SceKernel_OBJS = +ALL_OBJS= + +all: $(TARGETS) $(TARGETS_WEAK) + +define LIBRARY_template + $(1): $$($(1:lib%_stub.a=%)_OBJS) + ALL_OBJS += $$($(1:lib%_stub.a=%)_OBJS) +endef +define LIBRARY_WEAK_template + $(1): $$($(1:lib%_stub_weak.a=%)_weak_OBJS) + ALL_OBJS += $$($(1:lib%_stub_weak.a=%)_weak_OBJS) +endef + +$(foreach library,$(TARGETS),$(eval $(call LIBRARY_template,$(library)))) +$(foreach library,$(TARGETS_WEAK),$(eval $(call LIBRARY_WEAK_template,$(library)))) + +install: $(TARGETS) $(TARGETS_WEAK) + cp $(TARGETS) $(VITASDK)/arm-vita-eabi/lib + cp $(TARGETS_WEAK) $(VITASDK)/arm-vita-eabi/lib + +clean: + rm -f $(TARGETS) $(TARGETS_WEAK) $(ALL_OBJS) + +$(TARGETS) $(TARGETS_WEAK): + $(AR) cru $@ $? + $(RANLIB) $@ + +%.o: %.S + $(AS) --defsym GEN_WEAK_EXPORTS=0 $< -o $@ + +%.wo: %.S + $(AS) --defsym GEN_WEAK_EXPORTS=1 $< -o $@ diff --git a/deps/vitaShaRK/include/shacccg.h b/deps/vitaShaRK/include/shacccg.h new file mode 100644 index 0000000000..aa9f6f06eb --- /dev/null +++ b/deps/vitaShaRK/include/shacccg.h @@ -0,0 +1,185 @@ +#ifndef _PSP2_SHACCCG_H +#define _PSP2_SHACCCG_H + +#ifdef __cplusplus +extern "C" { +#endif // def __cplusplus + +typedef struct SceShaccCgCompileOptions SceShaccCgCompileOptions; +typedef struct SceShaccCgSourceFile SceShaccCgSourceFile; +typedef struct SceShaccCgSourceLocation SceShaccCgSourceLocation; +typedef void const *SceShaccCgParameter; + +typedef SceShaccCgSourceFile* (*SceShaccCgCallbackOpenFile)( + const char *fileName, + const SceShaccCgSourceLocation *includedFrom, + const SceShaccCgCompileOptions *compileOptions, + const char **errorString); + +typedef void (*SceShaccCgCallbackReleaseFile)( + const SceShaccCgSourceFile *file, + const SceShaccCgCompileOptions *compileOptions); + +typedef const char* (*SceShaccCgCallbackLocateFile)( + const char *fileName, + const SceShaccCgSourceLocation *includedFrom, + uint32_t searchPathCount, + const char *const*searchPaths, + const SceShaccCgCompileOptions *compileOptions, + const char **errorString); + +typedef const char* (*SceShaccCgCallbackAbsolutePath)( + const char *fileName, + const SceShaccCgSourceLocation *includedFrom, + const SceShaccCgCompileOptions *compileOptions); + +typedef void (*SceShaccCgCallbackReleaseFileName)( + const char *fileName, + const SceShaccCgCompileOptions *compileOptions); + +typedef int32_t (*SceShaccCgCallbackFileDate)( + const SceShaccCgSourceFile *file, + const SceShaccCgSourceLocation *includedFrom, + const SceShaccCgCompileOptions *compileOptions, + int64_t *timeLastStatusChange, + int64_t *timeLastModified); + +typedef enum SceShaccCgDiagnosticLevel { + SCE_SHACCCG_DIAGNOSTIC_LEVEL_INFO, + SCE_SHACCCG_DIAGNOSTIC_LEVEL_WARNING, + SCE_SHACCCG_DIAGNOSTIC_LEVEL_ERROR +} SceShaccCgDiagnosticLevel; + +typedef enum SceShaccCgTargetProfile { + SCE_SHACCCG_PROFILE_VP, + SCE_SHACCCG_PROFILE_FP +} SceShaccCgTargetProfile; + +typedef enum SceShaccCgCallbackDefaults { + SCE_SHACCCG_SYSTEM_FILES, + SCE_SHACCCG_TRIVIAL +} SceShaccCgCallbackDefaults; + +typedef enum SceShaccCgLocale { + SCE_SHACCCG_ENGLISH, + SCE_SHACCCG_JAPANESE +} SceShaccCgLocale; + +typedef struct SceShaccCgSourceFile { + const char *fileName; + const char *text; + uint32_t size; +} SceShaccCgSourceFile; + +typedef struct SceShaccCgSourceLocation { + const SceShaccCgSourceFile *file; + uint32_t lineNumber; + uint32_t columnNumber; +} SceShaccCgSourceLocation; + +typedef struct SceShaccCgCallbackList { + SceShaccCgCallbackOpenFile openFile; + SceShaccCgCallbackReleaseFile releaseFile; + SceShaccCgCallbackLocateFile locateFile; + SceShaccCgCallbackAbsolutePath absolutePath; + SceShaccCgCallbackReleaseFileName releaseFileName; + SceShaccCgCallbackFileDate fileDate; +} SceShaccCgCallbackList; + +typedef struct SceShaccCgCompileOptions { + const char *mainSourceFile; + SceShaccCgTargetProfile targetProfile; + const char *entryFunctionName; + uint32_t searchPathCount; + const char* const *searchPaths; + uint32_t macroDefinitionCount; + const char* const *macroDefinitions; + uint32_t includeFileCount; + const char* const *includeFiles; + uint32_t suppressedWarningsCount; + const uint32_t *suppressedWarnings; + SceShaccCgLocale locale; + int32_t useFx; + int32_t noStdlib; + int32_t optimizationLevel; + int32_t useFastmath; + int32_t useFastprecision; + int32_t useFastint; + int32_t warningsAsErrors; + int32_t performanceWarnings; + int32_t warningLevel; + int32_t pedantic; + int32_t pedanticError; + int field_5C; + int field_60; + int field_64; +} SceShaccCgCompileOptions; + +typedef struct SceShaccCgDiagnosticMessage { + SceShaccCgDiagnosticLevel level; + uint32_t code; + const SceShaccCgSourceLocation *location; + const char *message; +} SceShaccCgDiagnosticMessage; + +typedef struct SceShaccCgCompileOutput { + const uint8_t *programData; + uint32_t programSize; + int32_t diagnosticCount; + const SceShaccCgDiagnosticMessage *diagnostics; +} SceShaccCgCompileOutput; + + +int SceShaccCg_0205DE96(int); +int SceShaccCg_07DDFC78(int); +int SceShaccCg_0E1285A6(int); +int SceShaccCg_152971B1(int); +int SceShaccCg_17223BEB(int); +int SceShaccCg_2654E73A(int); +int SceShaccCg_268FAEE9(int); + +int sceShaccCgInitializeCompileOptions( + SceShaccCgCompileOptions *options); + +int SceShaccCg_4595A388(int); +int SceShaccCg_46FA0303(int); +int SceShaccCg_56BFA825(int); +int SceShaccCg_648739F3(int); + +SceShaccCgCompileOutput const *sceShaccCgCompileProgram( + const SceShaccCgCompileOptions *options, + const SceShaccCgCallbackList *callbacks, + int unk); + +int SceShaccCg_6BB58825(int); +int sceShaccCgSetDefaultAllocator(void *(*malloc_cb)(unsigned int), void (*free_cb)(void *)); +int SceShaccCg_6FB40CA9(int); +int SceShaccCg_7B2CF324(int); +int SceShaccCg_7BC25091(int); +int SceShaccCg_7F430CCD(int); +int SceShaccCg_95F57A23(int); +int SceShaccCg_A067C481(int); +int SceShaccCg_A13A8A1E(int); +int SceShaccCg_A56B1A5B(int); +int SceShaccCg_A7930FF6(int); + +void sceShaccCgInitializeCallbackList( + SceShaccCgCallbackList *callbacks, + SceShaccCgCallbackDefaults defaults); + +void sceShaccCgDestroyCompileOutput( + SceShaccCgCompileOutput const *output); + +int SceShaccCg_B4AC9943(int); +int SceShaccCg_BB703EE1(int); +int SceShaccCg_D4378DB1(int); +int SceShaccCg_DAD4AAE4(int); +int SceShaccCg_DF3DDCFD(int); +int SceShaccCg_EF8D59D6(int); +int SceShaccCg_F4BAB902(int); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* _PSP2_SHACCCG_H */ diff --git a/deps/vitaShaRK/samples/sample1/Makefile b/deps/vitaShaRK/samples/sample1/Makefile new file mode 100644 index 0000000000..0202cf37cc --- /dev/null +++ b/deps/vitaShaRK/samples/sample1/Makefile @@ -0,0 +1,37 @@ +SAMPLE_NUM := 001 +TARGET := vitaShaRK-Sample$(SAMPLE_NUM) +SOURCES := . + +INCLUDES := include + +LIBS = -lvitashark -lSceLibKernel_stub -lSceShaccCg_stub + +CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) +CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) +BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin)) +OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) + +PREFIX = arm-vita-eabi +CC = $(PREFIX)-gcc +CXX = $(PREFIX)-g++ +CFLAGS = -g -Wl,-q -O2 -ftree-vectorize +CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11 -fpermissive +ASFLAGS = $(CFLAGS) + +all: $(TARGET).vpk + +$(TARGET).vpk: eboot.bin + vita-mksfoex -s TITLE_ID=VSHARK$(SAMPLE_NUM) "$(TARGET)" param.sfo + vita-pack-vpk -s param.sfo -b eboot.bin $@ + +eboot.bin: $(TARGET).velf + vita-make-fself -s $< eboot.bin + +%.velf: %.elf + vita-elf-create $< $@ + +$(TARGET).elf: $(OBJS) + $(CC) $(CFLAGS) $^ $(LIBS) -o $@ + +clean: + @rm -rf *.velf *.elf *.vpk $(OBJS) param.sfo eboot.bin diff --git a/deps/vitaShaRK/samples/sample1/main.c b/deps/vitaShaRK/samples/sample1/main.c new file mode 100644 index 0000000000..1e312c51a7 --- /dev/null +++ b/deps/vitaShaRK/samples/sample1/main.c @@ -0,0 +1,59 @@ +// Simple compiler with no logging + +#include +#include +#include + +const char fragment_shader[] = + "float4 main(uniform float4 u_clear_color) : COLOR\n" + "{\n" + " return u_clear_color;\n" + "}" + ; + +const char vertex_shader[] = + "void main(\n" + "float3 aPosition,\n" + "float3 aColor,\n" + "uniform float4x4 wvp,\n" + "float4 out vPosition: POSITION,\n" + "float4 out vColor: COLOR)\n" + "{\n" + " vPosition = mul(float4(aPosition, 1.f), wvp);\n" + " vColor = float4(aColor, 1.f);\n" + "}" + ; + +void saveGXP(SceGxmProgram *p, uint32_t size, const char *fname) { + FILE *f = fopen(fname, "wb"); + fwrite(p, 1, size, f); + fclose(f); +} + +int main() { + // Initializing vitaShaRK + if (shark_init(NULL) < 0) // NOTE: libshacccg.suprx will need to be placed in ur0:data + return -1; + + // Compiling fragment shader + uint32_t size = sizeof(fragment_shader) - 1; + SceGxmProgram *p = shark_compile_shader(fragment_shader, &size, SHARK_FRAGMENT_SHADER); + + // Saving compiled GXP file on SD + if (p) saveGXP(p, size, "ux0:data/clear_f.gxp"); + + shark_clear_output(); + + // Compiling vertex shader + size = sizeof(vertex_shader) - 1; + p = shark_compile_shader(vertex_shader, &size, SHARK_VERTEX_SHADER); + + // Saving compiled GXP file on SD + if (p) saveGXP(p, size, "ux0:data/rgb_v.gxp"); + + shark_clear_output(); + + shark_end(); + + return 0; +} diff --git a/deps/vitaShaRK/samples/sample2/Makefile b/deps/vitaShaRK/samples/sample2/Makefile new file mode 100644 index 0000000000..e41643545a --- /dev/null +++ b/deps/vitaShaRK/samples/sample2/Makefile @@ -0,0 +1,37 @@ +SAMPLE_NUM := 002 +TARGET := vitaShaRK-Sample$(SAMPLE_NUM) +SOURCES := . + +INCLUDES := include + +LIBS = -lvitashark -lSceLibKernel_stub -lSceShaccCg_stub + +CFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)) +CPPFILES := $(foreach dir,$(SOURCES), $(wildcard $(dir)/*.cpp)) +BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin)) +OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o) + +PREFIX = arm-vita-eabi +CC = $(PREFIX)-gcc +CXX = $(PREFIX)-g++ +CFLAGS = -g -Wl,-q -O2 -ftree-vectorize +CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11 -fpermissive +ASFLAGS = $(CFLAGS) + +all: $(TARGET).vpk + +$(TARGET).vpk: eboot.bin + vita-mksfoex -s TITLE_ID=VSHARK$(SAMPLE_NUM) "$(TARGET)" param.sfo + vita-pack-vpk -s param.sfo -b eboot.bin $@ + +eboot.bin: $(TARGET).velf + vita-make-fself -s $< eboot.bin + +%.velf: %.elf + vita-elf-create $< $@ + +$(TARGET).elf: $(OBJS) + $(CC) $(CFLAGS) $^ $(LIBS) -o $@ + +clean: + @rm -rf *.velf *.elf *.vpk $(OBJS) param.sfo eboot.bin diff --git a/deps/vitaShaRK/samples/sample2/main.c b/deps/vitaShaRK/samples/sample2/main.c new file mode 100644 index 0000000000..0d585e0201 --- /dev/null +++ b/deps/vitaShaRK/samples/sample2/main.c @@ -0,0 +1,85 @@ +// Simple compiler with file logging + +#include +#include +#include + +const char fragment_shader[] = + "float4 main(uniform float4 u_clear_color) : COLOR\n" + "{\n" + " return u_clear_color;\n" + "}" + ; + +const char vertex_shader[] = + "void main(\n" + "float3 aPosition,\n" + "float3 aColor,\n" + "uniform float4x4 wvp,\n" + "float4 out vPosition: POSITION,\n" + "float4 out vColor: COLOR)\n" + "{\n" + " vPosition = mul(float4(aPosition, 1.f), wvp);\n" + " vColor = float4(aColor, 1.f);\n" + "}" + ; + +char curr_compilation[256]; + +void log_cb(const char *msg, shark_log_level msg_level, int line) { + FILE *f = fopen("ux0:/data/shark.log", "a+"); + switch (msg_level) { + case SHARK_LOG_INFO: + fprintf(f, "%s) INFO: %s at line %d\n", curr_compilation, msg, line); + break; + case SHARK_LOG_WARNING: + fprintf(f, "%s) WARNING: %s at line %d\n", curr_compilation, msg, line); + break; + case SHARK_LOG_ERROR: + fprintf(f, "%s) ERROR: %s at line %d\n", curr_compilation, msg, line); + break; + default: + break; + } + fclose(f); +} + +void saveGXP(SceGxmProgram *p, uint32_t size, const char *fname) { + FILE *f = fopen(fname, "wb"); + fwrite(p, 1, size, f); + fclose(f); +} + +int main() { + // Initializing vitaShaRK + if (shark_init(NULL) < 0) // NOTE: libshacccg.suprx will need to be placed in ur0:data + return -1; + + // Setting up logger + shark_install_log_cb(log_cb); + shark_set_warnings_level(SHARK_WARN_MAX); + + // Compiling fragment shader + sprintf(curr_compilation, "clear_f.gxp"); + uint32_t size = sizeof(fragment_shader) - 1; + SceGxmProgram *p = shark_compile_shader(fragment_shader, &size, SHARK_FRAGMENT_SHADER); + + // Saving compiled GXP file on SD + if (p) saveGXP(p, size, "ux0:data/clear_f.gxp"); + + shark_clear_output(); + + // Compiling vertex shader + sprintf(curr_compilation, "rgb_v.gxp"); + size = sizeof(vertex_shader) - 1; + p = shark_compile_shader(vertex_shader, &size, SHARK_VERTEX_SHADER); + + // Saving compiled GXP file on SD + if (p) saveGXP(p, size, "ux0:data/rgb_v.gxp"); + + shark_clear_output(); + + shark_end(); + + return 0; +} diff --git a/deps/vitaShaRK/source/vitashark.c b/deps/vitaShaRK/source/vitashark.c new file mode 100644 index 0000000000..96a6c719aa --- /dev/null +++ b/deps/vitaShaRK/source/vitashark.c @@ -0,0 +1,124 @@ +/* + * This file is part of vitaGL + * Copyright 2017, 2018, 2019, 2020 Rinnegatamante + * Copyright 2020 Asakura Reiko + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, version 3 of the License, or (at your + * option) any later version. + * + * This program 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 this program. If not, see . + */ + +#include "vitashark.h" +#include +#include "shacccg.h" + +// Default path for SceShaccCg module location +#define DEFAULT_SHACCCG_PATH "ur0:/data/libshacccg.suprx" + +static void (*shark_log_cb)(const char *msg, shark_log_level msg_level, int line) = NULL; +static shark_warn_level shark_warnings_level = SHARK_WARN_SILENT; + +static SceUID shark_module_id = 0; +static uint8_t shark_initialized = 0; +static SceShaccCgCompileOutput *shark_output = NULL; +static SceShaccCgSourceFile shark_input; + +// Dummy Open File callback +static SceShaccCgSourceFile *shark_open_file_cb(const char *fileName, + const SceShaccCgSourceLocation *includedFrom, + const SceShaccCgCompileOptions *compileOptions, + const char **errorString) +{ + return &shark_input; +} + +int shark_init(const char *path) { + // Initializing sceShaccCg module + if (!shark_initialized) { + shark_module_id = sceKernelLoadStartModule(path ? path : DEFAULT_SHACCCG_PATH, 0, NULL, 0, NULL, NULL); + if (shark_module_id < 0) return -1; + sceShaccCgSetDefaultAllocator(malloc, free); + shark_initialized = 1; + } + return 0; +} + +void shark_end() { + if (!shark_initialized) return; + + // Terminating sceShaccCg module + sceKernelStopUnloadModule(shark_module_id, 0, NULL, 0, NULL, NULL); + shark_initialized = 0; +} + +void shark_install_log_cb(void (*cb)(const char *msg, shark_log_level msg_level, int line)) { + shark_log_cb = cb; +} + +void shark_set_warnings_level(shark_warn_level level) { + // Changing current warnings level + shark_warnings_level = level; +} + +void shark_clear_output() { + // Clearing sceShaccCg output + if (shark_output) { + sceShaccCgDestroyCompileOutput(shark_output); + shark_output = NULL; + } +} + +SceGxmProgram *shark_compile_shader_extended(const char *src, uint32_t *size, shark_type type, shark_opt opt, int32_t use_fastmath, int32_t use_fastprecision, int32_t use_fastint) { + if (!shark_initialized) return NULL; + + // Forcing usage for memory source for the shader to compile + shark_input.fileName = ""; + shark_input.text = src; + shark_input.size = *size; + + // Properly configuring SceShaccCg with requqested settings + SceShaccCgCompileOptions options = {0}; + options.mainSourceFile = shark_input.fileName; + options.targetProfile = type; + options.entryFunctionName = "main"; + options.macroDefinitions = NULL; + options.useFx = 1; + options.warningLevel = shark_warnings_level; + options.optimizationLevel = opt; + options.useFastmath = use_fastmath; + options.useFastint = use_fastint; + options.useFastprecision = use_fastprecision; + options.pedantic = shark_warnings_level > SHARK_WARN_MEDIUM ? SHARK_ENABLE : SHARK_DISABLE; + options.performanceWarnings = shark_warnings_level > SHARK_WARN_SILENT ? SHARK_ENABLE : SHARK_DISABLE; + + // Executing shader compilation + SceShaccCgCallbackList callbacks = {0}; + sceShaccCgInitializeCallbackList(&callbacks, SCE_SHACCCG_TRIVIAL); + callbacks.openFile = shark_open_file_cb; + const SceShaccCgCompileOutput *shark_output = sceShaccCgCompileProgram(&options, &callbacks, 0); + + // Executing logging + if (shark_log_cb) { + for (int i = 0; i < shark_output->diagnosticCount; ++i) { + const SceShaccCgDiagnosticMessage *log = &shark_output->diagnostics[i]; + shark_log_cb(log->message, log->level, log->location->lineNumber); + } + } + + // Returning output + if (shark_output->programData) *size = shark_output->programSize; + return (SceGxmProgram *)shark_output->programData; +} + +SceGxmProgram *shark_compile_shader(const char *src, uint32_t *size, shark_type type) { + return shark_compile_shader_extended(src, size, type, SHARK_OPT_DEFAULT, SHARK_DISABLE, SHARK_DISABLE, SHARK_DISABLE); +} diff --git a/deps/vitaShaRK/source/vitashark.h b/deps/vitaShaRK/source/vitashark.h new file mode 100644 index 0000000000..61d1966084 --- /dev/null +++ b/deps/vitaShaRK/source/vitashark.h @@ -0,0 +1,75 @@ +/* + * This file is part of vitaShaRK + * Copyright 2017, 2018, 2019, 2020 Rinnegatamante + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published + * by the Free Software Foundation, version 3 of the License, or (at your + * option) any later version. + * + * This program 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 this program. If not, see . + */ + +#ifndef _VITASHARK_H_ +#define _VITASHARK_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +typedef enum shark_opt { + SHARK_OPT_SLOW, //!< Equivalent to O0 + SHARK_OPT_SAFE, //!< Equivalent to O1 + SHARK_OPT_DEFAULT, //!< Equivalent to O2 + SHARK_OPT_FAST, //!< Equivalent to O3 + SHARK_OPT_UNSAFE //!< Equivalent to Ofast +} shark_opt; + +typedef enum shark_type { + SHARK_VERTEX_SHADER, + SHARK_FRAGMENT_SHADER +} shark_type; + +typedef enum shark_log_level { + SHARK_LOG_INFO, + SHARK_LOG_WARNING, + SHARK_LOG_ERROR +} shark_log_level; + +typedef enum shark_warn_level { + SHARK_WARN_SILENT, + SHARK_WARN_LOW, + SHARK_WARN_MEDIUM, + SHARK_WARN_HIGH, + SHARK_WARN_MAX +} shark_warn_level; + +#define SHARK_DISABLE 0 +#define SHARK_ENABLE 1 + +// Init/term routines +int shark_init(const char *path); //!< Initializes runtime shader compiler +void shark_end(); //!< Terminates runtime shader compiler and frees used memory + +// Compiling routines +SceGxmProgram *shark_compile_shader_extended(const char *src, uint32_t *size, shark_type type, shark_opt opt, int32_t use_fastmath, int32_t use_fastprecision, int32_t use_fastint); //!< Compiles a shader with extended settings +SceGxmProgram *shark_compile_shader(const char *src, uint32_t *size, shark_type type); //!< Compiles a shader +void shark_clear_output(); //!< Clears output of a compilation attempt + +// Logging routines +void shark_install_log_cb(void (*cb)(const char *msg, shark_log_level msg_level, int line)); //!< Installs a log function for info, warnings and errors +void shark_set_warnings_level(shark_warn_level level); //!< Sets warnings level for logging + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/disk_control_interface.c b/disk_control_interface.c index 2c1d93d5dc..d9b708d2f6 100644 --- a/disk_control_interface.c +++ b/disk_control_interface.c @@ -665,7 +665,9 @@ error: * if functionality is supported by core * NOTE: Must be called immediately after * loading content */ -bool disk_control_verify_initial_index(disk_control_interface_t *disk_control) +bool disk_control_verify_initial_index( + disk_control_interface_t *disk_control, + bool verbosity) { bool success = false; unsigned image_index = 0; @@ -723,6 +725,8 @@ bool disk_control_verify_initial_index(disk_control_interface_t *disk_control) image_index + 1, image_path); + /* Ignore 'verbosity' setting - errors should + * always be displayed */ runloop_msg_queue_push( msg_hash_to_str(MSG_FAILED_TO_SET_INITIAL_DISK), 0, 60, @@ -765,11 +769,12 @@ bool disk_control_verify_initial_index(disk_control_interface_t *disk_control) * it is likely other notifications will be * generated before setting the disk index, and * we do not want to 'overwrite' them */ - runloop_msg_queue_push( - msg, - 0, msg_duration, - false, NULL, - MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); + if (verbosity) + runloop_msg_queue_push( + msg, + 0, msg_duration, + false, NULL, + MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO); } return success; @@ -777,7 +782,8 @@ bool disk_control_verify_initial_index(disk_control_interface_t *disk_control) /* Saves current disk index to file, if supported * by current core */ -bool disk_control_save_image_index(disk_control_interface_t *disk_control) +bool disk_control_save_image_index( + disk_control_interface_t *disk_control) { if (!disk_control) return false; diff --git a/disk_control_interface.h b/disk_control_interface.h index 1991b47300..695dad8fa8 100644 --- a/disk_control_interface.h +++ b/disk_control_interface.h @@ -167,11 +167,14 @@ bool disk_control_set_initial_index( * if functionality is supported by core * NOTE: Must be called immediately after * loading content */ -bool disk_control_verify_initial_index(disk_control_interface_t *disk_control); +bool disk_control_verify_initial_index( + disk_control_interface_t *disk_control, + bool verbosity); /* Saves current disk index to file, if supported * by current core */ -bool disk_control_save_image_index(disk_control_interface_t *disk_control); +bool disk_control_save_image_index( + disk_control_interface_t *disk_control); RETRO_END_DECLS diff --git a/disk_index_file.c b/disk_index_file.c index b65e8e75bc..dcd827f079 100644 --- a/disk_index_file.c +++ b/disk_index_file.c @@ -313,7 +313,7 @@ bool disk_index_file_init( { /* Use content directory */ strlcpy(disk_index_file_dir, content_path, sizeof(disk_index_file_dir)); - path_basedir(disk_index_file_dir); + path_basedir_size(disk_index_file_dir, STRLEN_CONST(disk_index_file_dir)); } /* > Create directory, if required */ diff --git a/dist-scripts/dist-cores.sh b/dist-scripts/dist-cores.sh index 974df83229..5746fd7b3b 100755 --- a/dist-scripts/dist-cores.sh +++ b/dist-scripts/dist-cores.sh @@ -20,8 +20,9 @@ cd dist-scripts elif [ $PLATFORM = "ps2" ] ; then platform=ps2 -SALAMANDER=NO +SALAMANDER=yes EXT=a +OPTS=release mkdir -p ../pkg/${platform}/cores/ @@ -151,6 +152,9 @@ fi # Compile Salamander core if [ $SALAMANDER = "yes" ]; then make -C ../ -f Makefile.${platform}.salamander $OPTS || exit 1 + if [ $PLATFORM = "ps2" ] ; then + mv -f ../raboot.elf ../pkg/${platform}/raboot.elf + fi if [ $PLATFORM = "psp1" ] ; then mv -f ../EBOOT.PBP ../pkg/${platform}/EBOOT.PBP fi @@ -249,15 +253,13 @@ for f in `ls -v *_${platform}.${EXT}`; do make -C ../ -f Makefile.${platform} $OPTS APP_TITLE="$name" LIBRETRO=$name $whole_archive $big_stack -j3 || exit 1 elif [ $PLATFORM = "ps2" ]; then # TODO PS2 should be able to compile in parallel - make -C ../ -f Makefile.${platform} $OPTS $whole_archive $big_stack || exit 1 + make -C ../ -f Makefile.${platform} $OPTS || exit 1 else make -C ../ -f Makefile.${platform} $OPTS $whole_archive $big_stack -j3 || exit 1 fi # Do manual executable step - if [ $PLATFORM = "ps2" ] ; then - make -C ../ -f Makefile.${platform} package -j3 - elif [ $PLATFORM = "dex-ps3" ] ; then + if [ $PLATFORM = "dex-ps3" ] ; then $MAKE_FSELF_NPDRM -c ../retroarch_${platform}.elf ../CORE.SELF elif [ $PLATFORM = "cex-ps3" ] ; then $SCETOOL_PATH $SCETOOL_FLAGS_CORE ../retroarch_${platform}.elf ../CORE.SELF @@ -287,7 +289,7 @@ for f in `ls -v *_${platform}.${EXT}`; do fi fi elif [ $PLATFORM = "ps2" ] ; then - mv -f ../retroarchps2-release.elf ../pkg/${platform}/cores/retroarchps2_${name}.elf + mv -f ../retroarchps2.elf ../pkg/${platform}/cores/${name}_libretro_${platform}.elf elif [ $PLATFORM = "psp1" ] ; then mv -f ../EBOOT.PBP ../pkg/${platform}/cores/${name}_libretro.PBP elif [ $PLATFORM = "vita" ] ; then @@ -330,6 +332,7 @@ for f in `ls -v *_${platform}.${EXT}`; do rm -f ../retroarch_${platform}.elf ../retroarch_${platform}.self ../CORE.SELF elif [ $PLATFORM = "ps2" ] ; then rm -f ../retroarchps2.elf + rm -f ../retroarchps2-debug.elf elif [ $PLATFORM = "psp1" ] ; then rm -f ../retroarchpsp.elf elif [ $PLATFORM = "vita" ] ; then diff --git a/driver.h b/driver.h index dd116ab142..18abf3078e 100644 --- a/driver.h +++ b/driver.h @@ -35,6 +35,7 @@ enum DRIVER_LOCATION, DRIVER_MENU, DRIVERS_VIDEO_INPUT, + DRIVER_BLUETOOTH, DRIVER_WIFI, DRIVER_LED, DRIVER_MIDI @@ -49,6 +50,7 @@ enum DRIVER_LOCATION_MASK = 1 << DRIVER_LOCATION, DRIVER_MENU_MASK = 1 << DRIVER_MENU, DRIVERS_VIDEO_INPUT_MASK = 1 << DRIVERS_VIDEO_INPUT, + DRIVER_BLUETOOTH_MASK = 1 << DRIVER_BLUETOOTH, DRIVER_WIFI_MASK = 1 << DRIVER_WIFI, DRIVER_LED_MASK = 1 << DRIVER_LED, DRIVER_MIDI_MASK = 1 << DRIVER_MIDI diff --git a/frontend/drivers/platform_emscripten.c b/frontend/drivers/platform_emscripten.c index 1890205207..f9f2dad817 100644 --- a/frontend/drivers/platform_emscripten.c +++ b/frontend/drivers/platform_emscripten.c @@ -46,48 +46,8 @@ #include "../../tasks/tasks_internal.h" #include "../../file_path_special.h" -void RWebAudioRecalibrateTime(void); void dummyErrnoCodes(void); - -static unsigned emscripten_frame_count = 0; - -static void emscripten_mainloop(void) -{ - int ret; - video_frame_info_t video_info; - - RWebAudioRecalibrateTime(); - - emscripten_frame_count++; - - video_driver_build_info(&video_info); - - /* Disable BFI during fast forward, slow-motion, - * and pause to prevent flicker. */ - if ( - video_info.black_frame_insertion - && !video_info.input_driver_nonblock_state - && !video_info.runloop_is_slowmotion - && !video_info.runloop_is_paused) - { - if ((emscripten_frame_count & 1) == 0) - { - glClear(GL_COLOR_BUFFER_BIT); - video_info.cb_swap_buffers(video_info.context_data); - return; - } - } - - ret = runloop_iterate(); - - task_queue_check(); - - if (ret != -1) - return; - - main_exit(NULL); - emscripten_force_exit(0); -} +void emscripten_mainloop(void); void cmd_savefiles(void) { diff --git a/frontend/drivers/platform_ps2.c b/frontend/drivers/platform_ps2.c index a59d289946..2096bcaf43 100644 --- a/frontend/drivers/platform_ps2.c +++ b/frontend/drivers/platform_ps2.c @@ -13,50 +13,46 @@ */ #include - -#include "../frontend_driver.h" - -#include +#include +#include #include +#include + #include #include #include #include -#include -#include -#include #include #include +#include + +#include +#include + +#include "../frontend_driver.h" +#include "../../defaults.h" +#include "../../file_path_special.h" +#include "../../verbosity.h" +#include -static char eboot_path[512]; -static char user_path[512]; static enum frontend_fork ps2_fork_mode = FRONTEND_FORK_NONE; +static int bootDeviceID; +char cwd[FILENAME_MAX]; static void create_path_names(void) { - char cwd[FILENAME_MAX]; - int bootDeviceID; + char user_path[FILENAME_MAX]; -#if defined(BUILD_FOR_PCSX2) - strlcpy(cwd, rootDevicePath(BOOT_DEVICE_MC0), sizeof(cwd)); -#else - getcwd(cwd, sizeof(cwd)); - bootDeviceID=getBootDeviceID(cwd); - strlcpy(cwd, rootDevicePath(bootDeviceID), sizeof(cwd)); -#endif - strcat(cwd, "RETROARCH"); + strlcpy(user_path, rootDevicePath(bootDeviceID), rootDevicePath(bootDeviceID)); + strcat(user_path, "RETROARCH"); + + // Content in the same folder + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], cwd, + "cores", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE])); + fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_INFO], cwd, + "info", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_INFO])); - strlcpy(eboot_path, cwd, sizeof(eboot_path)); - strlcpy(g_defaults.dirs[DEFAULT_DIR_PORT], eboot_path, sizeof(g_defaults.dirs[DEFAULT_DIR_PORT])); - strlcpy(user_path, eboot_path, sizeof(user_path)); - - fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE], g_defaults.dirs[DEFAULT_DIR_PORT], - "CORES", 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_CHEATS], user_path, "CHEATS", sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS])); fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG], user_path, @@ -95,6 +91,20 @@ static void poweroffCallback(void *arg) poweroffShutdown(); } +static void reset_IOP() +{ + SifInitRpc(0); +#if !defined(DEBUG) || defined(BUILD_FOR_PCSX2) + /* Comment this line if you don't wanna debug the output */ + while(!SifIopReset(NULL, 0)){}; +#endif + + while(!SifIopSync()){}; + SifInitRpc(0); + sbv_patch_enable_lmb(); + sbv_patch_disable_prefix_check(); +} + static void frontend_ps2_get_environment_settings(int *argc, char *argv[], void *args, void *params_data) { @@ -103,7 +113,7 @@ static void frontend_ps2_get_environment_settings(int *argc, char *argv[], #ifndef IS_SALAMANDER if (!string_is_empty(argv[1])) { - static char path[PATH_MAX_LENGTH] = {0}; + static char path[FILENAME_MAX] = {0}; struct rarch_main_wrap *args = (struct rarch_main_wrap*)params_data; @@ -122,7 +132,6 @@ static void frontend_ps2_get_environment_settings(int *argc, char *argv[], 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]); } @@ -139,18 +148,7 @@ static void frontend_ps2_get_environment_settings(int *argc, char *argv[], static void frontend_ps2_init(void *data) { - char cwd[FILENAME_MAX]; - int bootDeviceID; - - SifInitRpc(0); -#if !defined(DEBUG) || defined(BUILD_FOR_PCSX2) - /* Comment this line if you don't wanna debug the output */ - while(!SifIopReset(NULL, 0)){}; -#endif - - while(!SifIopSync()){}; - SifInitRpc(0); - sbv_patch_enable_lmb(); + reset_IOP(); /* I/O Files */ SifExecModuleBuffer(&iomanX_irx, size_iomanX_irx, 0, NULL, NULL); @@ -161,21 +159,22 @@ static void frontend_ps2_init(void *data) SifExecModuleBuffer(&mcman_irx, size_mcman_irx, 0, NULL, NULL); SifExecModuleBuffer(&mcserv_irx, size_mcserv_irx, 0, NULL, NULL); - /* Controllers */ - SifExecModuleBuffer(&freemtap_irx, size_freemtap_irx, 0, NULL, NULL); - SifExecModuleBuffer(&freepad_irx, size_freepad_irx, 0, NULL, NULL); - /* USB */ SifExecModuleBuffer(&usbd_irx, size_usbd_irx, 0, NULL, NULL); SifExecModuleBuffer(&usbhdfsd_irx, size_usbhdfsd_irx, 0, NULL, NULL); + /* CDFS */ + SifExecModuleBuffer(&cdfs_irx, size_cdfs_irx, 0, NULL, NULL); + +#ifndef IS_SALAMANDER + /* Controllers */ + SifExecModuleBuffer(&freemtap_irx, size_freemtap_irx, 0, NULL, NULL); + SifExecModuleBuffer(&freepad_irx, size_freepad_irx, 0, NULL, NULL); + /* Audio */ SifExecModuleBuffer(&freesd_irx, size_freesd_irx, 0, NULL, NULL); SifExecModuleBuffer(&audsrv_irx, size_audsrv_irx, 0, NULL, NULL); - /* CDVD */ - SifExecModuleBuffer(&cdfs_irx, size_cdfs_irx, 0, NULL, NULL); - /* Initializes audsrv library */ if (audsrv_init()) { RARCH_ERR("audsrv library not initalizated\n"); @@ -192,48 +191,52 @@ static void frontend_ps2_init(void *data) if (mtapPortOpen(0) != 1) { RARCH_ERR("mtapPortOpen library not initalizated\n"); } +#endif + +#if defined(BUILD_FOR_PCSX2) + bootDeviceID = BOOT_DEVICE_MC0; + strlcpy(cwd, rootDevicePath(bootDeviceID), sizeof(rootDevicePath(bootDeviceID))); +#else + getcwd(cwd, sizeof(cwd)); + bootDeviceID = getBootDeviceID(cwd); +#if !defined(IS_SALAMANDER) && !defined(DEBUG) + // If it is not salamander we need to go one level up for set the CWD. + path_parent_dir(cwd); +#endif +#endif #if defined(HAVE_FILE_LOGGER) - retro_main_log_file_init("retroarch.log", false); + char fileLog[FILENAME_MAX]; + strlcpy(fileLog, rootDevicePath(bootDeviceID), sizeof(fileLog)); + strcat(fileLog, "retroarch.log"); + retro_main_log_file_init(fileLog, false); verbosity_enable(); #endif + + waitUntilDeviceIsReady(bootDeviceID); } static void frontend_ps2_deinit(void *data) { - (void)data; #if defined(HAVE_FILE_LOGGER) verbosity_disable(); - command_event(CMD_EVENT_LOG_FILE_DEINIT, NULL); + retro_main_log_file_deinit(); #endif - padEnd(); - audsrv_quit(); - Exit(0); } static void frontend_ps2_exec(const char *path, bool should_load_game) { -#if defined(IS_SALAMANDER) - char argp[512] = {0}; - SceSize args = 0; - - strlcpy(argp, eboot_path, sizeof(argp)); - args = strlen(argp) + 1; - + int args = 0; + static char *argv[1]; + RARCH_LOG("Attempt to load executable: [%s].\n", path); #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; + args++; + argv[0] = path_get(RARCH_PATH_CONTENT); } #endif - - RARCH_LOG("Attempt to load executable: [%s].\n", path); -#if 0 - exitspawn_kernel(path, args, argp); /* I don't know what this is doing */ -#endif -#endif + LoadELFFromFile(path, args, argv); } #ifndef IS_SALAMANDER @@ -353,7 +356,7 @@ frontend_ctx_driver_t frontend_ctx_ps2 = { frontend_ps2_exitspawn, /* exitspawn */ NULL, /* process_args */ frontend_ps2_exec, /* exec */ - #ifdef IS_SALAMANDER +#ifdef IS_SALAMANDER NULL, /* set_fork */ #else frontend_ps2_set_fork, /* set_fork */ diff --git a/frontend/drivers/platform_unix.c b/frontend/drivers/platform_unix.c index 988f8cbe38..341fce4e87 100644 --- a/frontend/drivers/platform_unix.c +++ b/frontend/drivers/platform_unix.c @@ -190,6 +190,33 @@ error: /* forward declaration */ bool android_run_events(void *data); +void android_dpi_get_density(char *s, size_t len) +{ + static bool inited_once = false; + static bool inited2_once = false; + static char string[PROP_VALUE_MAX] = {0}; + static char string2[PROP_VALUE_MAX] = {0}; + if (!inited_once) + { + system_property_get("getprop", "ro.sf.lcd_density", string); + inited_once = true; + } + + if (!string_is_empty(string)) + { + strlcpy(s, string, len); + return; + } + + if (!inited2_once) + { + system_property_get("wm", "density", string2); + inited2_once = true; + } + + strlcpy(s, string2, len); +} + void android_app_write_cmd(struct android_app *android_app, int8_t cmd) { if (!android_app) diff --git a/frontend/drivers/platform_unix.h b/frontend/drivers/platform_unix.h index 8a0485e6bc..13d6007b1c 100644 --- a/frontend/drivers/platform_unix.h +++ b/frontend/drivers/platform_unix.h @@ -346,6 +346,8 @@ extern JNIEnv *jni_thread_getenv(void); void android_app_write_cmd(struct android_app *android_app, int8_t cmd); +void android_dpi_get_density(char *s, size_t len); + extern struct android_app *g_android; #endif diff --git a/frontend/drivers/platform_wiiu.c b/frontend/drivers/platform_wiiu.c index efa677e130..dde19827bd 100644 --- a/frontend/drivers/platform_wiiu.c +++ b/frontend/drivers/platform_wiiu.c @@ -606,28 +606,32 @@ void net_print_exp(const char *str) sendto(wiiu_log_socket, str, strlen(str), 0, (struct sockaddr *)&broadcast, sizeof(broadcast)); } -/* RFC 791 specifies that any IP host must be able to receive a datagram of 576 bytes. - * Since we're generally never logging more than a line or two's worth of data (~100 bytes) +/* RFC 791 specifies that any IP host must be able + * to receive a datagram of 576 bytes. + * Since we're generally never logging more than a + * line or two's worth of data (~100 bytes) * this is a reasonable size for our use. */ #define DGRAM_SIZE 576 -static ssize_t wiiu_log_write(struct _reent *r, void *fd, const char *ptr, size_t len) +static ssize_t wiiu_log_write(struct _reent *r, + void *fd, const char *ptr, size_t len) { + int remaining; if (wiiu_log_socket < 0) return len; - while(wiiu_log_lock) + while (wiiu_log_lock) OSSleepTicks(((248625000 / 4)) / 1000); wiiu_log_lock = 1; - int sent; - int remaining = len; + remaining = len; - while(remaining > 0) + while (remaining > 0) { int block = remaining < DGRAM_SIZE ? remaining : DGRAM_SIZE; - sent = sendto(wiiu_log_socket, ptr, block, 0, (struct sockaddr *)&broadcast, sizeof(broadcast)); + int sent = sendto(wiiu_log_socket, ptr, block, 0, + (struct sockaddr *)&broadcast, sizeof(broadcast)); if (sent < 0) break; diff --git a/frontend/drivers/platform_win32.c b/frontend/drivers/platform_win32.c index f40c7cec40..a233f5f996 100644 --- a/frontend/drivers/platform_win32.c +++ b/frontend/drivers/platform_win32.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #ifdef HAVE_CONFIG_H @@ -176,6 +177,16 @@ enum retro_language win32_get_retro_lang_from_langid(unsigned short langid) return RETRO_LANGUAGE_ENGLISH; } #endif +#else +unsigned short win32_get_langid_from_retro_lang(enum retro_language lang) +{ + return 0x409; /* fallback to US English */ +} + +enum retro_language win32_get_retro_lang_from_langid(unsigned short langid) +{ + return RETRO_LANGUAGE_ENGLISH; +} #endif static void gfx_dwm_shutdown(void) @@ -613,7 +624,7 @@ static void frontend_win32_environment_get(int *argc, char *argv[], ":\\logs", sizeof(g_defaults.dirs[DEFAULT_DIR_LOGS])); } -static uint64_t frontend_win32_get_mem_total(void) +static uint64_t frontend_win32_get_total_mem(void) { /* OSes below 2000 don't have the Ex version, * and non-Ex cannot work with >4GB RAM */ @@ -630,7 +641,7 @@ static uint64_t frontend_win32_get_mem_total(void) #endif } -static uint64_t frontend_win32_get_mem_used(void) +static uint64_t frontend_win32_get_free_mem(void) { /* OSes below 2000 don't have the Ex version, * and non-Ex cannot work with >4GB RAM */ @@ -638,12 +649,12 @@ static uint64_t frontend_win32_get_mem_used(void) MEMORYSTATUSEX mem_info; mem_info.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&mem_info); - return ((frontend_win32_get_mem_total() - mem_info.ullAvailPhys)); + return mem_info.ullAvailPhys; #else MEMORYSTATUS mem_info; mem_info.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus(&mem_info); - return ((frontend_win32_get_mem_total() - mem_info.dwAvailPhys)); + return mem_info.dwAvailPhys; #endif } @@ -1034,16 +1045,14 @@ static bool accessibility_speak_windows(int speed, #ifdef HAVE_NVDA else if (USE_NVDA) { - long res; - const size_t cSize = strlen(speak_text)+1; - wchar_t *wc; - res = nvdaController_testIfRunning_func(); - wc = malloc(sizeof(wchar_t) * cSize); - mbstowcs(wc, speak_text, cSize); + wchar_t *wc = utf8_to_utf16_string_alloc(speak_text); + long res = nvdaController_testIfRunning_func(); - if (res != 0) + if (!wc || res != 0) { RARCH_LOG("Error communicating with NVDA\n"); + if (wc) + free(wc); return false; } @@ -1053,6 +1062,7 @@ static bool accessibility_speak_windows(int speed, nvdaController_brailleMessage_func(wc); else nvdaController_speakText_func(wc); + free(wc); } #endif #ifdef HAVE_SAPI @@ -1076,12 +1086,16 @@ static bool accessibility_speak_windows(int speed, if (SUCCEEDED(hr)) { - wchar_t wtext[1200]; + wchar_t *wc = utf8_to_utf16_string_alloc(speak_text); + snprintf(cmd, sizeof(cmd), "%s", speeds[speed], langid, speak_text); - mbstowcs(wtext, speak_text, sizeof(wtext)); - hr = ISpVoice_Speak(pVoice, wtext, SPF_ASYNC /*SVSFlagsAsync*/, NULL); + if (!wc) + return false; + + hr = ISpVoice_Speak(pVoice, wc, SPF_ASYNC /*SVSFlagsAsync*/, NULL); + free(wc); } } #endif @@ -1114,8 +1128,8 @@ frontend_ctx_driver_t frontend_ctx_win32 = { frontend_win32_get_architecture, frontend_win32_get_powerstate, frontend_win32_parse_drive_list, - frontend_win32_get_mem_total, - frontend_win32_get_mem_used, + frontend_win32_get_total_mem, + frontend_win32_get_free_mem, NULL, /* install_signal_handler */ NULL, /* get_sighandler_state */ NULL, /* set_sighandler_state */ diff --git a/frontend/drivers/platform_win32.h b/frontend/drivers/platform_win32.h index de8de6c321..8843d7ce63 100644 --- a/frontend/drivers/platform_win32.h +++ b/frontend/drivers/platform_win32.h @@ -19,12 +19,8 @@ #ifndef _PLATFORM_WIN32_H #define _PLATFORM_WIN32_H -#if defined(HAVE_LANGEXTRA) && !defined(_XBOX) -#if (defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500) || !defined(_MSC_VER) unsigned short win32_get_langid_from_retro_lang(enum retro_language lang); enum retro_language win32_get_retro_lang_from_langid(unsigned short langid); -#endif -#endif #endif diff --git a/frontend/frontend_driver.c b/frontend/frontend_driver.c index 9577718e52..619316ffe5 100644 --- a/frontend/frontend_driver.c +++ b/frontend/frontend_driver.c @@ -134,11 +134,6 @@ static frontend_ctx_driver_t *frontend_ctx_drivers[] = { NULL }; -#ifndef IS_SALAMANDER -/* TODO/FIXME - static public global variable */ -static frontend_ctx_driver_t *current_frontend_ctx; -#endif - /** * frontend_ctx_find_driver: * @ident : Identifier name of driver to find. @@ -280,294 +275,3 @@ bool frontend_driver_get_salamander_basename(char *s, size_t len) #endif } - -#ifndef IS_SALAMANDER -frontend_ctx_driver_t *frontend_get_ptr(void) -{ - return current_frontend_ctx; -} - -int frontend_driver_parse_drive_list(void *data, bool load_content) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - - if (!frontend || !frontend->parse_drive_list) - return -1; - return frontend->parse_drive_list(data, load_content); -} - -void frontend_driver_content_loaded(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - - if (!frontend || !frontend->content_loaded) - return; - frontend->content_loaded(); -} - -bool frontend_driver_has_fork(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - - if (!frontend || !frontend->set_fork) - return false; - return true; -} - -bool frontend_driver_set_fork(enum frontend_fork fork_mode) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - - if (!frontend_driver_has_fork()) - return false; - return frontend->set_fork(fork_mode); -} - -void frontend_driver_process_args(int *argc, char *argv[]) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - - if (!frontend || !frontend->process_args) - return; - frontend->process_args(argc, argv); -} - -bool frontend_driver_is_inited(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend) - return false; - return true; -} - -void frontend_driver_init_first(void *args) -{ - current_frontend_ctx = (frontend_ctx_driver_t*)frontend_ctx_init_first(); - - if (current_frontend_ctx && current_frontend_ctx->init) - current_frontend_ctx->init(args); -} - -void frontend_driver_free(void) -{ - current_frontend_ctx = NULL; -} - -environment_get_t frontend_driver_environment_get_ptr(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend) - return NULL; - return frontend->environment_get; -} - -bool frontend_driver_has_get_video_driver_func(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_video_driver) - return false; - return true; -} - -const struct video_driver *frontend_driver_get_video_driver(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_video_driver) - return NULL; - return frontend->get_video_driver(); -} - -void frontend_driver_exitspawn(char *s, size_t len, char *args) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->exitspawn) - return; - frontend->exitspawn(s, len, args); -} - -void frontend_driver_deinit(void *args) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->deinit) - return; - frontend->deinit(args); -} - -void frontend_driver_shutdown(bool a) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->shutdown) - return; - frontend->shutdown(a); -} - -enum frontend_architecture frontend_driver_get_cpu_architecture(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_architecture) - return FRONTEND_ARCH_NONE; - return frontend->get_architecture(); -} - -const void *frontend_driver_get_cpu_architecture_str( - char *architecture, size_t size) -{ - const frontend_ctx_driver_t - *frontend = frontend_get_ptr(); - enum frontend_architecture arch = frontend_driver_get_cpu_architecture(); - - switch (arch) - { - case FRONTEND_ARCH_X86: - strlcpy(architecture, "x86", size); - break; - case FRONTEND_ARCH_X86_64: - strlcpy(architecture, "x64", size); - break; - case FRONTEND_ARCH_PPC: - strlcpy(architecture, "PPC", size); - break; - case FRONTEND_ARCH_ARM: - strlcpy(architecture, "ARM", size); - break; - case FRONTEND_ARCH_ARMV7: - strlcpy(architecture, "ARMv7", size); - break; - case FRONTEND_ARCH_ARMV8: - strlcpy(architecture, "ARMv8", size); - break; - case FRONTEND_ARCH_MIPS: - strlcpy(architecture, "MIPS", size); - break; - case FRONTEND_ARCH_TILE: - strlcpy(architecture, "Tilera", size); - break; - case FRONTEND_ARCH_NONE: - default: - strlcpy(architecture, "N/A", size); - break; - } - - return frontend; -} - -uint64_t frontend_driver_get_total_memory(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_total_mem) - return 0; - return frontend->get_total_mem(); -} - -uint64_t frontend_driver_get_free_memory(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_free_mem) - return 0; - return frontend->get_free_mem(); -} - -void frontend_driver_install_signal_handler(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->install_signal_handler) - return; - frontend->install_signal_handler(); -} - -int frontend_driver_get_signal_handler_state(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_signal_handler_state) - return -1; - return frontend->get_signal_handler_state(); -} - -void frontend_driver_set_signal_handler_state(int value) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->set_signal_handler_state) - return; - frontend->set_signal_handler_state(value); -} - -void frontend_driver_attach_console(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->attach_console) - return; - frontend->attach_console(); -} - -void frontend_driver_detach_console(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->detach_console) - return; - frontend->detach_console(); -} - -void frontend_driver_destroy_signal_handler_state(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->destroy_signal_handler_state) - return; - frontend->destroy_signal_handler_state(); -} - -bool frontend_driver_can_watch_for_changes(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->watch_path_for_changes) - return false; - return true; -} - -void frontend_driver_watch_path_for_changes(struct string_list *list, int flags, path_change_data_t **change_data) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->watch_path_for_changes) - return; - frontend->watch_path_for_changes(list, flags, change_data); -} - -bool frontend_driver_check_for_path_changes(path_change_data_t *change_data) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->check_for_path_changes) - return false; - return frontend->check_for_path_changes(change_data); -} - -void frontend_driver_set_sustained_performance_mode(bool on) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->set_sustained_performance_mode) - return; - frontend->set_sustained_performance_mode(on); -} - -const char* frontend_driver_get_cpu_model_name(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_cpu_model_name) - return NULL; - return frontend->get_cpu_model_name(); -} - -enum retro_language frontend_driver_get_user_language(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->get_user_language) - return RETRO_LANGUAGE_ENGLISH; - return frontend->get_user_language(); -} - -bool frontend_driver_is_narrator_running(void) -{ - frontend_ctx_driver_t *frontend = frontend_get_ptr(); - if (!frontend || !frontend->is_narrator_running) - return false; - return frontend->is_narrator_running(); -} -#endif diff --git a/gfx/common/d3d_common.c b/gfx/common/d3d_common.c index 1522fe8853..8b0b292852 100644 --- a/gfx/common/d3d_common.c +++ b/gfx/common/d3d_common.c @@ -156,6 +156,7 @@ void d3d_input_driver(const char* input_name, const char* joypad_name, *input_data = xinput; #else #if _WIN32_WINNT >= 0x0501 +#ifdef HAVE_WINRAWINPUT /* winraw only available since XP */ if (string_is_equal(input_name, "raw")) { @@ -167,6 +168,7 @@ void d3d_input_driver(const char* input_name, const char* joypad_name, } } #endif +#endif #ifdef HAVE_DINPUT *input_data = input_dinput.init(joypad_name); diff --git a/gfx/common/d3dcompiler_common.c b/gfx/common/d3dcompiler_common.c index 9cf9e3aa96..a408ac7b4f 100644 --- a/gfx/common/d3dcompiler_common.c +++ b/gfx/common/d3dcompiler_common.c @@ -27,6 +27,7 @@ #if defined(HAVE_DYNAMIC) && !defined(__WINRT__) #include +/* TODO/FIXME - static globals */ static dylib_t d3dcompiler_dll; static const char* d3dcompiler_dll_list[] = { "D3DCompiler_47.dll", "D3DCompiler_46.dll", "D3DCompiler_45.dll", "D3DCompiler_44.dll", diff --git a/gfx/common/dbus_common.c b/gfx/common/dbus_common.c index 68c4838187..abbce177c7 100644 --- a/gfx/common/dbus_common.c +++ b/gfx/common/dbus_common.c @@ -19,6 +19,7 @@ #ifdef HAVE_DBUS #include +/* TODO/FIXME - static globals */ static DBusConnection* dbus_connection = NULL; static unsigned int dbus_screensaver_cookie = 0; #endif diff --git a/gfx/common/drm_common.c b/gfx/common/drm_common.c index a1bede5eac..15af377eb2 100644 --- a/gfx/common/drm_common.c +++ b/gfx/common/drm_common.c @@ -21,6 +21,7 @@ #include "drm_common.h" +/* TODO/FIXME - globals */ struct pollfd g_drm_fds; uint32_t g_connector_id = 0; diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index 791f1b86e2..cf20ada661 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -33,6 +33,7 @@ #include "../../verbosity.h" #include "../../frontend/frontend_driver.h" +/* TODO/FIXME - globals */ bool g_egl_inited = false; unsigned g_egl_major = 0; diff --git a/gfx/common/gdi_common.h b/gfx/common/gdi_common.h index 4ed7cd8e86..3b234abcc2 100644 --- a/gfx/common/gdi_common.h +++ b/gfx/common/gdi_common.h @@ -34,8 +34,6 @@ typedef struct gdi unsigned video_height; unsigned screen_width; unsigned screen_height; - void *ctx_data; - const gfx_ctx_driver_t *ctx_driver; unsigned menu_width; unsigned menu_height; @@ -50,6 +48,9 @@ typedef struct gdi bool lte_win98; unsigned short *temp_buf; unsigned char *menu_frame; + + bool menu_enable; + bool menu_full_screen; } gdi_t; typedef struct gdi_texture diff --git a/gfx/common/metal_common.m b/gfx/common/metal_common.m index 9846c944b5..0b94dd2b77 100644 --- a/gfx/common/metal_common.m +++ b/gfx/common/metal_common.m @@ -23,18 +23,20 @@ #include #import -#include "../../managers/state_manager.h" #import "metal_common.h" -#import "../../ui/drivers/cocoa/cocoa_common.h" -//#import "Context.h" #include "metal/Context.h" +#include "../../ui/drivers/cocoa/cocoa_common.h" + +#ifdef HAVE_REWIND +#include "../../managers/state_manager.h" +#endif #ifdef HAVE_MENU -#import "../../menu/menu_driver.h" +#include "../../menu/menu_driver.h" #endif #ifdef HAVE_GFX_WIDGETS -#import "../gfx_widgets.h" +#include "../gfx_widgets.h" #endif #define STRUCT_ASSIGN(x, y) \ @@ -1002,7 +1004,17 @@ typedef struct MTLALIGN(16) if (_shader->pass[i].frame_count_mod) _engine.pass[i].frame_count %= _shader->pass[i].frame_count_mod; - _engine.pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1; +#ifdef HAVE_REWIND + if (state_manager_frame_is_reversed()) + { + _engine.pass[i].frame_direction = -1; + } + else +#else + { + _engine.pass[i].frame_direction = 1; + } +#endif for (unsigned j = 0; j < SLANG_CBUFFER_MAX; j++) { diff --git a/gfx/common/network_common.h b/gfx/common/network_common.h index 80a1825603..4de779287d 100644 --- a/gfx/common/network_common.h +++ b/gfx/common/network_common.h @@ -24,8 +24,6 @@ typedef struct network unsigned video_height; unsigned screen_width; unsigned screen_height; - void *ctx_data; - const gfx_ctx_driver_t *ctx_driver; char address[256]; uint16_t port; int fd; diff --git a/gfx/common/sixel_common.h b/gfx/common/sixel_common.h index 0ec5b5519b..1c7dd6195e 100644 --- a/gfx/common/sixel_common.h +++ b/gfx/common/sixel_common.h @@ -29,8 +29,6 @@ typedef struct sixel unsigned video_height; unsigned screen_width; unsigned screen_height; - void *ctx_data; - const gfx_ctx_driver_t *ctx_driver; } sixel_t; #endif diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 9ea17d0db2..0097dc3e77 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -46,6 +46,7 @@ #define VULKAN_EMULATE_MAILBOX #endif +/* TODO/FIXME - static globals */ static dylib_t vulkan_library; static VkInstance cached_instance_vk; static VkDevice cached_device_vk; @@ -207,12 +208,17 @@ VkResult vulkan_emulated_mailbox_acquire_next_image_blocking( static void vulkan_emulated_mailbox_loop(void *userdata) { VkFence fence; - VkFenceCreateInfo info = { VK_STRUCTURE_TYPE_FENCE_CREATE_INFO }; - struct vulkan_emulated_mailbox *mailbox = (struct vulkan_emulated_mailbox*)userdata; + VkFenceCreateInfo info; + struct vulkan_emulated_mailbox *mailbox = + (struct vulkan_emulated_mailbox*)userdata; if (!mailbox) return; + info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; + info.pNext = NULL; + info.flags = 0; + vkCreateFence(mailbox->device, &info, NULL, &fence); for (;;) @@ -230,16 +236,20 @@ static void vulkan_emulated_mailbox_loop(void *userdata) mailbox->request_acquire = false; slock_unlock(mailbox->lock); - mailbox->result = vkAcquireNextImageKHR(mailbox->device, mailbox->swapchain, UINT64_MAX, + mailbox->result = vkAcquireNextImageKHR( + mailbox->device, mailbox->swapchain, UINT64_MAX, VK_NULL_HANDLE, fence, &mailbox->index); - /* VK_SUBOPTIMAL_KHR can be returned on Android 10 when prerotate is not dealt with. - * This is not an error we need to care about, and we'll treat it as SUCCESS. */ + /* VK_SUBOPTIMAL_KHR can be returned on Android 10 + * when prerotate is not dealt with. + * This is not an error we need to care about, + * and we'll treat it as SUCCESS. */ if (mailbox->result == VK_SUBOPTIMAL_KHR) mailbox->result = VK_SUCCESS; if (mailbox->result == VK_SUCCESS) - vkWaitForFences(mailbox->device, 1, &fence, true, UINT64_MAX); + vkWaitForFences(mailbox->device, 1, + &fence, true, UINT64_MAX); vkResetFences(mailbox->device, 1, &fence); if (mailbox->result == VK_SUCCESS) @@ -314,31 +324,6 @@ uint32_t vulkan_find_memory_type_fallback( device_reqs, host_reqs_second, 0); } -void vulkan_transfer_image_ownership(VkCommandBuffer cmd, - VkImage image, VkImageLayout layout, - VkPipelineStageFlags src_stages, - VkPipelineStageFlags dst_stages, - uint32_t src_queue_family, - uint32_t dst_queue_family) -{ - VkImageMemoryBarrier barrier = - { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER }; - - barrier.srcAccessMask = 0; - barrier.dstAccessMask = 0; - barrier.oldLayout = layout; - barrier.newLayout = layout; - barrier.srcQueueFamilyIndex = src_queue_family; - barrier.dstQueueFamilyIndex = dst_queue_family; - barrier.image = image; - barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - barrier.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS; - barrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - vkCmdPipelineBarrier(cmd, src_stages, dst_stages, - false, 0, NULL, 0, NULL, 1, &barrier); -} - void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd, struct vk_texture *dynamic, struct vk_texture *staging) @@ -348,7 +333,9 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd, retro_assert(dynamic->type == VULKAN_TEXTURE_DYNAMIC); retro_assert(staging->type == VULKAN_TEXTURE_STAGING); - vulkan_sync_texture_to_gpu(vk, staging); + if ( staging->need_manual_cache_management && + staging->memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_GPU(vk->context->device, staging->memory); /* We don't have to sync against previous TRANSFER, * since we observed the completion by fences. @@ -359,25 +346,32 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd, * We would also need to optionally maintain extra textures due to * changes in resolution, so this seems like the sanest and * simplest solution. */ - vulkan_image_layout_transition(vk, cmd, dynamic->image, + VULKAN_IMAGE_LAYOUT_TRANSITION(cmd, dynamic->image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); - memset(®ion, 0, sizeof(region)); - region.imageExtent.width = dynamic->width; - region.imageExtent.height = dynamic->height; - region.imageExtent.depth = 1; - region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - region.imageSubresource.layerCount = 1; + region.bufferOffset = 0; + region.bufferRowLength = 0; + region.bufferImageHeight = 0; + region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + region.imageSubresource.mipLevel = 0; + region.imageSubresource.baseArrayLayer = 0; + region.imageSubresource.layerCount = 1; + region.imageOffset.x = 0; + region.imageOffset.y = 0; + region.imageOffset.z = 0; + region.imageExtent.width = dynamic->width; + region.imageExtent.height = dynamic->height; + region.imageExtent.depth = 1; vkCmdCopyBufferToImage(cmd, staging->buffer, dynamic->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); - vulkan_image_layout_transition(vk, cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION(cmd, dynamic->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, @@ -392,6 +386,7 @@ void vulkan_copy_staging_to_dynamic(vk_t *vk, VkCommandBuffer cmd, #ifdef VULKAN_DEBUG_TEXTURE_ALLOC static VkImage vk_images[4 * 1024]; static unsigned vk_count; +static unsigned track_seq; void vulkan_log_textures(void) { @@ -404,7 +399,6 @@ void vulkan_log_textures(void) vk_count = 0; } -static unsigned track_seq; static void vulkan_track_alloc(VkImage image) { vk_images[vk_count++] = image; @@ -430,30 +424,6 @@ static void vulkan_track_dealloc(VkImage image) } #endif -void vulkan_sync_texture_to_gpu(vk_t *vk, const struct vk_texture *tex) -{ - VkMappedMemoryRange range = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE }; - if (!tex || !tex->need_manual_cache_management || tex->memory == VK_NULL_HANDLE) - return; - - range.memory = tex->memory; - range.offset = 0; - range.size = VK_WHOLE_SIZE; - vkFlushMappedMemoryRanges(vk->context->device, 1, &range); -} - -void vulkan_sync_texture_to_cpu(vk_t *vk, const struct vk_texture *tex) -{ - VkMappedMemoryRange range = { VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE }; - if (!tex || !tex->need_manual_cache_management || tex->memory == VK_NULL_HANDLE) - return; - - range.memory = tex->memory; - range.offset = 0; - range.size = VK_WHOLE_SIZE; - vkInvalidateMappedMemoryRanges(vk->context->device, 1, &range); -} - static unsigned vulkan_num_miplevels(unsigned width, unsigned height) { unsigned size = MAX(width, height); @@ -747,7 +717,9 @@ struct vk_texture vulkan_create_texture(vk_t *vk, for (y = 0; y < tex.height; y++, dst += tex.stride, src += stride) memcpy(dst, src, width * bpp); - vulkan_sync_texture_to_gpu(vk, &tex); + if ( tex.need_manual_cache_management && + tex.memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_GPU(vk->context->device, tex.memory); vkUnmapMemory(device, tex.memory); } else if (initial && type == VULKAN_TEXTURE_STATIC) @@ -771,7 +743,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk, * and transfers from the images without having to * mess around with lots of extra transitions at per-level granularity. */ - vulkan_image_layout_transition(vk, + VULKAN_IMAGE_LAYOUT_TRANSITION( staging, tex.image, VK_IMAGE_LAYOUT_UNDEFINED, @@ -819,7 +791,8 @@ struct vk_texture vulkan_create_texture(vk_t *vk, /* Only injects execution and memory barriers, * not actual transition. */ - vulkan_image_layout_transition(vk, staging, tex.image, + VULKAN_IMAGE_LAYOUT_TRANSITION( + staging, tex.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -834,7 +807,8 @@ struct vk_texture vulkan_create_texture(vk_t *vk, } /* Complete our texture. */ - vulkan_image_layout_transition(vk, staging, tex.image, + VULKAN_IMAGE_LAYOUT_TRANSITION( + staging, tex.image, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -844,7 +818,8 @@ struct vk_texture vulkan_create_texture(vk_t *vk, } else { - vulkan_image_layout_transition(vk, staging, tex.image, + VULKAN_IMAGE_LAYOUT_TRANSITION( + staging, tex.image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, VK_ACCESS_TRANSFER_WRITE_BIT, @@ -899,7 +874,24 @@ void vulkan_destroy_texture( if (tex->image) vulkan_track_dealloc(tex->image); #endif - memset(tex, 0, sizeof(*tex)); + tex->type = VULKAN_TEXTURE_STREAMED; + tex->default_smooth = false; + tex->need_manual_cache_management = false; + tex->mipmap = false; + tex->memory_type = 0; + tex->width = 0; + tex->height = 0; + tex->offset = 0; + tex->stride = 0; + tex->size = 0; + tex->mapped = NULL; + tex->image = VK_NULL_HANDLE; + tex->view = VK_NULL_HANDLE; + tex->memory = VK_NULL_HANDLE; + tex->buffer = VK_NULL_HANDLE; + tex->format = VK_FORMAT_UNDEFINED; + tex->memory_size = 0; + tex->layout = VK_IMAGE_LAYOUT_UNDEFINED; } static void vulkan_write_quad_descriptors( @@ -911,18 +903,23 @@ static void vulkan_write_quad_descriptors( const struct vk_texture *texture, VkSampler sampler) { + VkWriteDescriptorSet write; VkDescriptorBufferInfo buffer_info; - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; buffer_info.buffer = buffer; buffer_info.offset = offset; buffer_info.range = range; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.pNext = NULL; write.dstSet = set; write.dstBinding = 0; + write.dstArrayElement = 0; write.descriptorCount = 1; write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + write.pImageInfo = NULL; write.pBufferInfo = &buffer_info; + write.pTexelBufferView = NULL; vkUpdateDescriptorSets(device, 1, &write, 0, NULL); if (texture) @@ -960,7 +957,7 @@ void vulkan_transition_texture(vk_t *vk, VkCommandBuffer cmd, struct vk_texture switch (texture->type) { case VULKAN_TEXTURE_STREAMED: - vulkan_image_layout_transition(vk, cmd, texture->image, + VULKAN_IMAGE_LAYOUT_TRANSITION(cmd, texture->image, texture->layout, VK_IMAGE_LAYOUT_GENERAL, VK_ACCESS_HOST_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_HOST_BIT, @@ -1015,10 +1012,11 @@ void vulkan_draw_triangles(vk_t *vk, const struct vk_draw_triangles *call) /* Upload descriptors */ { + unsigned i; VkDescriptorSet set; - /* Upload UBO */ struct vk_buffer_range range; + if (!vulkan_buffer_chain_alloc(vk->context, &vk->chain->ubo, call->uniform_size, &range)) return; @@ -1038,13 +1036,15 @@ void vulkan_draw_triangles(vk_t *vk, const struct vk_draw_triangles *call) call->texture, call->sampler); - vkCmdBindDescriptorSets(vk->cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, + vkCmdBindDescriptorSets(vk->cmd, + VK_PIPELINE_BIND_POINT_GRAPHICS, vk->pipelines.layout, 0, 1, &set, 0, NULL); - vk->tracker.view = VK_NULL_HANDLE; + vk->tracker.view = VK_NULL_HANDLE; vk->tracker.sampler = VK_NULL_HANDLE; - memset(&vk->tracker.mvp, 0, sizeof(vk->tracker.mvp)); + for (i = 0; i < 16; i++) + vk->tracker.mvp.data[i] = 0.0f; } /* VBO is already uploaded. */ @@ -1139,83 +1139,29 @@ void vulkan_draw_quad(vk_t *vk, const struct vk_draw_quad *quad) vkCmdDraw(vk->cmd, 6, 1, 0, 0); } -void vulkan_image_layout_transition( - vk_t *vk, - VkCommandBuffer cmd, VkImage image, - VkImageLayout old_layout, - VkImageLayout new_layout, - VkAccessFlags srcAccess, - VkAccessFlags dstAccess, - VkPipelineStageFlags srcStages, - VkPipelineStageFlags dstStages) -{ - VkImageMemoryBarrier barrier = - { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER }; - - barrier.srcAccessMask = srcAccess; - barrier.dstAccessMask = dstAccess; - barrier.oldLayout = old_layout; - barrier.newLayout = new_layout; - barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barrier.image = image; - barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - barrier.subresourceRange.levelCount = VK_REMAINING_MIP_LEVELS; - barrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - vkCmdPipelineBarrier(cmd, - srcStages, - dstStages, - 0, - 0, NULL, - 0, NULL, - 1, &barrier); -} - -void vulkan_image_layout_transition_levels( - VkCommandBuffer cmd, VkImage image, uint32_t levels, - VkImageLayout old_layout, VkImageLayout new_layout, - VkAccessFlags src_access, VkAccessFlags dst_access, - VkPipelineStageFlags src_stages, VkPipelineStageFlags dst_stages) -{ - VkImageMemoryBarrier barrier = { VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER }; - - barrier.srcAccessMask = src_access; - barrier.dstAccessMask = dst_access; - barrier.oldLayout = old_layout; - barrier.newLayout = new_layout; - barrier.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED; - barrier.image = image; - barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - barrier.subresourceRange.levelCount = levels; - barrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS; - - vkCmdPipelineBarrier(cmd, - src_stages, - dst_stages, - false, - 0, NULL, - 0, NULL, - 1, &barrier); -} - struct vk_buffer vulkan_create_buffer( const struct vulkan_context *context, size_t size, VkBufferUsageFlags usage) { struct vk_buffer buffer; VkMemoryRequirements mem_reqs; - VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO }; - VkBufferCreateInfo info = { VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO }; + VkBufferCreateInfo info; + VkMemoryAllocateInfo alloc; + info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO; + info.pNext = NULL; + info.flags = 0; info.size = size; info.usage = usage; info.sharingMode = VK_SHARING_MODE_EXCLUSIVE; + info.queueFamilyIndexCount = 0; + info.pQueueFamilyIndices = NULL; vkCreateBuffer(context->device, &info, NULL, &buffer.buffer); vkGetBufferMemoryRequirements(context->device, buffer.buffer, &mem_reqs); + alloc.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO; + alloc.pNext = NULL; alloc.allocationSize = mem_reqs.size; alloc.memoryTypeIndex = vulkan_find_memory_type( &context->memory_properties, @@ -1225,7 +1171,7 @@ struct vk_buffer vulkan_create_buffer( vkAllocateMemory(context->device, &alloc, NULL, &buffer.memory); vkBindBufferMemory(context->device, buffer.buffer, buffer.memory, 0); - buffer.size = size; + buffer.size = size; vkMapMemory(context->device, buffer.memory, 0, buffer.size, 0, &buffer.mapped); @@ -1249,24 +1195,30 @@ static struct vk_descriptor_pool *vulkan_alloc_descriptor_pool( const struct vk_descriptor_manager *manager) { unsigned i; - VkDescriptorPoolCreateInfo pool_info = { - VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO }; - VkDescriptorSetAllocateInfo alloc_info = { - VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO }; - + VkDescriptorPoolCreateInfo pool_info; + VkDescriptorSetAllocateInfo alloc_info; struct vk_descriptor_pool *pool = - (struct vk_descriptor_pool*)calloc(1, sizeof(*pool)); + (struct vk_descriptor_pool*)malloc(sizeof(*pool)); if (!pool) return NULL; + pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO; + pool_info.pNext = NULL; + pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; pool_info.maxSets = VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS; pool_info.poolSizeCount = manager->num_sizes; pool_info.pPoolSizes = manager->sizes; - pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT; + + pool->pool = VK_NULL_HANDLE; + for (i = 0; i < VULKAN_DESCRIPTOR_MANAGER_BLOCK_SETS; i++) + pool->sets[i] = VK_NULL_HANDLE; + pool->next = NULL; vkCreateDescriptorPool(device, &pool_info, NULL, &pool->pool); /* Just allocate all descriptor sets up front. */ + alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; + alloc_info.pNext = NULL; alloc_info.descriptorPool = pool->pool; alloc_info.descriptorSetCount = 1; alloc_info.pSetLayouts = &manager->set_layout; @@ -1304,12 +1256,22 @@ struct vk_descriptor_manager vulkan_create_descriptor_manager( unsigned num_sizes, VkDescriptorSetLayout set_layout) { + unsigned i; struct vk_descriptor_manager manager; - memset(&manager, 0, sizeof(manager)); + retro_assert(num_sizes <= VULKAN_MAX_DESCRIPTOR_POOL_SIZES); + + manager.current = NULL; + manager.count = 0; + + for (i = 0; i < VULKAN_MAX_DESCRIPTOR_POOL_SIZES; i++) + { + manager.sizes[i].type = VK_DESCRIPTOR_TYPE_SAMPLER; + manager.sizes[i].descriptorCount = 0; + } memcpy(manager.sizes, sizes, num_sizes * sizeof(*sizes)); - manager.num_sizes = num_sizes; manager.set_layout = set_layout; + manager.num_sizes = num_sizes; manager.head = vulkan_alloc_descriptor_pool(device, &manager); retro_assert(manager.head); @@ -1366,12 +1328,13 @@ static struct vk_buffer_node *vulkan_buffer_chain_alloc_node( size_t size, VkBufferUsageFlags usage) { struct vk_buffer_node *node = (struct vk_buffer_node*) - calloc(1, sizeof(*node)); + malloc(sizeof(*node)); if (!node) return NULL; node->buffer = vulkan_create_buffer( context, size, usage); + node->next = NULL; return node; } @@ -2559,7 +2522,7 @@ static void vulkan_destroy_swapchain(gfx_ctx_vulkan_data_t *vk) vkDeviceWaitIdle(vk->context.device); vkDestroySwapchainKHR(vk->context.device, vk->swapchain, NULL); memset(vk->context.swapchain_images, 0, sizeof(vk->context.swapchain_images)); - vk->swapchain = VK_NULL_HANDLE; + vk->swapchain = VK_NULL_HANDLE; vk->context.has_acquired_swapchain = false; } @@ -2597,7 +2560,7 @@ static void vulkan_destroy_swapchain(gfx_ctx_vulkan_data_t *vk) void vulkan_present(gfx_ctx_vulkan_data_t *vk, unsigned index) { - VkPresentInfoKHR present = { VK_STRUCTURE_TYPE_PRESENT_INFO_KHR }; + VkPresentInfoKHR present; VkResult result = VK_SUCCESS; VkResult err = VK_SUCCESS; @@ -2612,12 +2575,14 @@ void vulkan_present(gfx_ctx_vulkan_data_t *vk, unsigned index) return; } + present.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR; + present.pNext = NULL; + present.waitSemaphoreCount = 1; + present.pWaitSemaphores = &vk->context.swapchain_semaphores[index]; present.swapchainCount = 1; present.pSwapchains = &vk->swapchain; present.pImageIndices = &index; present.pResults = &result; - present.waitSemaphoreCount = 1; - present.pWaitSemaphores = &vk->context.swapchain_semaphores[index]; /* Better hope QueuePresent doesn't block D: */ #ifdef HAVE_THREADS @@ -2736,14 +2701,20 @@ static void vulkan_acquire_clear_fences(gfx_ctx_vulkan_data_t *vk) static VkSemaphore vulkan_get_wsi_acquire_semaphore(struct vulkan_context *ctx) { + VkSemaphore sem; + if (ctx->num_recycled_acquire_semaphores == 0) { - VkSemaphoreCreateInfo sem_info = { VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO }; + VkSemaphoreCreateInfo sem_info; + + sem_info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; + sem_info.pNext = NULL; + sem_info.flags = 0; vkCreateSemaphore(ctx->device, &sem_info, NULL, &ctx->swapchain_recycled_semaphores[ctx->num_recycled_acquire_semaphores++]); } - VkSemaphore sem = + sem = ctx->swapchain_recycled_semaphores[--ctx->num_recycled_acquire_semaphores]; ctx->swapchain_recycled_semaphores[ctx->num_recycled_acquire_semaphores] = VK_NULL_HANDLE; @@ -2752,16 +2723,21 @@ static VkSemaphore vulkan_get_wsi_acquire_semaphore(struct vulkan_context *ctx) static void vulkan_acquire_wait_fences(gfx_ctx_vulkan_data_t *vk) { - VkFenceCreateInfo fence_info = - { VK_STRUCTURE_TYPE_FENCE_CREATE_INFO }; + unsigned index; + VkFenceCreateInfo fence_info; + VkFence *next_fence = NULL; + + fence_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; + fence_info.pNext = NULL; + fence_info.flags = 0; /* Decouples the frame fence index from swapchain index. */ vk->context.current_frame_index = (vk->context.current_frame_index + 1) % vk->context.num_swapchain_images; - unsigned index = vk->context.current_frame_index; - VkFence *next_fence = &vk->context.swapchain_fences[index]; + index = vk->context.current_frame_index; + next_fence = &vk->context.swapchain_fences[index]; if (*next_fence != VK_NULL_HANDLE) { @@ -2798,14 +2774,20 @@ void vulkan_acquire_next_image(gfx_ctx_vulkan_data_t *vk) { unsigned index; VkResult err; - VkFence fence = VK_NULL_HANDLE; - VkSemaphore semaphore = VK_NULL_HANDLE; - VkFenceCreateInfo fence_info = - { VK_STRUCTURE_TYPE_FENCE_CREATE_INFO }; - VkSemaphoreCreateInfo sem_info = - { VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO }; + VkFenceCreateInfo fence_info; + VkSemaphoreCreateInfo sem_info; + VkFence fence = VK_NULL_HANDLE; + VkSemaphore semaphore = VK_NULL_HANDLE; bool is_retrying = false; + fence_info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO; + fence_info.pNext = NULL; + fence_info.flags = 0; + + sem_info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO; + sem_info.pNext = NULL; + sem_info.flags = 0; + retry: if (vk->swapchain == VK_NULL_HANDLE) { @@ -2821,10 +2803,10 @@ retry: { /* We still don't have a swapchain, so just fake it ... */ vk->context.current_swapchain_index = 0; - vk->context.current_frame_index = 0; + vk->context.current_frame_index = 0; vulkan_acquire_clear_fences(vk); vulkan_acquire_wait_fences(vk); - vk->context.invalid_swapchain = true; + vk->context.invalid_swapchain = true; return; } } @@ -2930,10 +2912,8 @@ retry: index = vk->context.current_swapchain_index; if (vk->context.swapchain_semaphores[index] == VK_NULL_HANDLE) - { vkCreateSemaphore(vk->context.device, &sem_info, NULL, &vk->context.swapchain_semaphores[index]); - } vulkan_acquire_wait_fences(vk); } @@ -2945,6 +2925,7 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, uint32_t format_count; uint32_t present_mode_count; uint32_t desired_swapchain_images; + VkResult res; VkSurfaceCapabilitiesKHR surface_properties; VkSurfaceFormatKHR formats[256]; VkPresentModeKHR present_modes[16]; @@ -2957,7 +2938,6 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, VkPresentModeKHR swapchain_present_mode = VK_PRESENT_MODE_FIFO_KHR; settings_t *settings = config_get_ptr(); VkCompositeAlphaFlagBitsKHR composite = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR; - VkResult res; vkDeviceWaitIdle(vk->context.device); vulkan_acquire_clear_fences(vk); @@ -3264,22 +3244,33 @@ bool vulkan_create_swapchain(gfx_ctx_vulkan_data_t *vk, void vulkan_initialize_render_pass(VkDevice device, VkFormat format, VkRenderPass *render_pass) { - VkRenderPassCreateInfo rp_info = { - VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO }; - VkAttachmentReference color_ref = { 0, - VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL }; - VkAttachmentDescription attachment = {0}; + VkAttachmentReference color_ref; + VkRenderPassCreateInfo rp_info; + VkAttachmentDescription attachment; VkSubpassDescription subpass = {0}; + rp_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO; + rp_info.pNext = NULL; + rp_info.flags = 0; + rp_info.attachmentCount = 1; + rp_info.pAttachments = &attachment; + rp_info.subpassCount = 1; + rp_info.pSubpasses = &subpass; + rp_info.dependencyCount = 0; + rp_info.pDependencies = NULL; + + color_ref.attachment = 0; + color_ref.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; + /* We will always write to the entire framebuffer, * so we don't really need to clear. */ + attachment.flags = 0; attachment.format = format; attachment.samples = VK_SAMPLE_COUNT_1_BIT; attachment.loadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE; attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE; attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE; - attachment.initialLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; attachment.finalLayout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL; @@ -3287,11 +3278,6 @@ void vulkan_initialize_render_pass(VkDevice device, VkFormat format, subpass.colorAttachmentCount = 1; subpass.pColorAttachments = &color_ref; - rp_info.attachmentCount = 1; - rp_info.pAttachments = &attachment; - rp_info.subpassCount = 1; - rp_info.pSubpasses = &subpass; - vkCreateRenderPass(device, &rp_info, NULL, render_pass); } @@ -3303,18 +3289,23 @@ void vulkan_set_uniform_buffer( VkDeviceSize offset, VkDeviceSize range) { + VkWriteDescriptorSet write; VkDescriptorBufferInfo buffer_info; - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; buffer_info.buffer = buffer; buffer_info.offset = offset; buffer_info.range = range; + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; + write.pNext = NULL; write.dstSet = set; write.dstBinding = binding; + write.dstArrayElement = 0; write.descriptorCount = 1; write.descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; + write.pImageInfo = NULL; write.pBufferInfo = &buffer_info; + write.pTexelBufferView = NULL; vkUpdateDescriptorSets(device, 1, &write, 0, NULL); } @@ -3478,27 +3469,35 @@ void vulkan_framebuffer_copy(VkImage image, { VkImageCopy region; - vulkan_image_layout_transition_levels(cmd, image,VK_REMAINING_MIP_LEVELS, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, image,VK_REMAINING_MIP_LEVELS, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT); + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); - memset(®ion, 0, sizeof(region)); - - region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - region.srcSubresource.layerCount = 1; - region.dstSubresource = region.srcSubresource; - region.extent.width = size.width; - region.extent.height = size.height; - region.extent.depth = 1; + region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + region.srcSubresource.mipLevel = 0; + region.srcSubresource.baseArrayLayer = 0; + region.srcSubresource.layerCount = 1; + region.srcOffset.x = 0; + region.srcOffset.y = 0; + region.srcOffset.z = 0; + region.dstSubresource = region.srcSubresource; + region.dstOffset.x = 0; + region.dstOffset.y = 0; + region.dstOffset.z = 0; + region.extent.width = size.width; + region.extent.height = size.height; + region.extent.depth = 1; vkCmdCopyImage(cmd, src_image, src_layout, image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion); - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, image, VK_REMAINING_MIP_LEVELS, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, @@ -3506,7 +3505,9 @@ void vulkan_framebuffer_copy(VkImage image, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); } void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd) @@ -3514,7 +3515,7 @@ void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd) VkClearColorValue color; VkImageSubresourceRange range; - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, image, VK_REMAINING_MIP_LEVELS, VK_IMAGE_LAYOUT_UNDEFINED, @@ -3522,14 +3523,19 @@ void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd) 0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT); + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); - memset(&color, 0, sizeof(color)); - memset(&range, 0, sizeof(range)); - - range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - range.levelCount = 1; - range.layerCount = 1; + color.float32[0] = 0.0f; + color.float32[1] = 0.0f; + color.float32[2] = 0.0f; + color.float32[3] = 0.0f; + range.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + range.baseMipLevel = 0; + range.levelCount = 1; + range.baseArrayLayer = 0; + range.layerCount = 1; vkCmdClearColorImage(cmd, image, @@ -3538,7 +3544,7 @@ void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd) 1, &range); - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, image, VK_REMAINING_MIP_LEVELS, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, @@ -3546,27 +3552,7 @@ void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd) VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); -} - -void vulkan_pass_set_texture( - VkDevice device, - VkDescriptorSet set, VkSampler sampler, - unsigned binding, - VkImageView imageView, VkImageLayout imageLayout) -{ - VkDescriptorImageInfo image_info; - VkWriteDescriptorSet write = { VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET }; - - image_info.sampler = sampler; - image_info.imageView = imageView; - image_info.imageLayout = imageLayout; - - write.dstSet = set; - write.dstBinding = binding; - write.descriptorCount = 1; - write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; - write.pImageInfo = &image_info; - - vkUpdateDescriptorSets(device, 1, &write, 0, NULL); + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); } diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index 475d6afb7a..70362a1dcc 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -261,12 +261,6 @@ struct vk_buffer_chain vulkan_buffer_chain_init( VkDeviceSize alignment, VkBufferUsageFlags usage); -#define VK_BUFFER_CHAIN_DISCARD(chain) \ -{ \ - chain->current = chain->head; \ - chain->offset = 0; \ -} - bool vulkan_buffer_chain_alloc(const struct vulkan_context *context, struct vk_buffer_chain *chain, size_t size, struct vk_buffer_range *range); @@ -450,6 +444,89 @@ typedef struct vk void *filter_chain; } vk_t; +#define VK_BUFFER_CHAIN_DISCARD(chain) \ +{ \ + chain->current = chain->head; \ + chain->offset = 0; \ +} + +#define VULKAN_SYNC_TEXTURE_TO_GPU(device, tex_memory) \ +{ \ + VkMappedMemoryRange range; \ + range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; \ + range.pNext = NULL; \ + range.memory = tex_memory; \ + range.offset = 0; \ + range.size = VK_WHOLE_SIZE; \ + vkFlushMappedMemoryRanges(device, 1, &range); \ +} + +#define VULKAN_SYNC_TEXTURE_TO_CPU(device, tex_memory) \ +{ \ + VkMappedMemoryRange range; \ + range.sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE; \ + range.pNext = NULL; \ + range.memory = tex_memory; \ + range.offset = 0; \ + range.size = VK_WHOLE_SIZE; \ + vkInvalidateMappedMemoryRanges(device, 1, &range); \ +} + +#define VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, img, levels, old_layout, new_layout, src_access, dst_access, src_stages, dst_stages, src_queue_family_idx, dst_queue_family_idx) \ +{ \ + VkImageMemoryBarrier barrier; \ + barrier.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER; \ + barrier.pNext = NULL; \ + barrier.srcAccessMask = src_access; \ + barrier.dstAccessMask = dst_access; \ + barrier.oldLayout = old_layout; \ + barrier.newLayout = new_layout; \ + barrier.srcQueueFamilyIndex = src_queue_family_idx; \ + barrier.dstQueueFamilyIndex = dst_queue_family_idx; \ + barrier.image = img; \ + barrier.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; \ + barrier.subresourceRange.baseMipLevel = 0; \ + barrier.subresourceRange.levelCount = levels; \ + barrier.subresourceRange.baseArrayLayer = 0; \ + barrier.subresourceRange.layerCount = VK_REMAINING_ARRAY_LAYERS; \ + vkCmdPipelineBarrier(cmd, src_stages, dst_stages, 0, 0, NULL, 0, NULL, 1, &barrier); \ +} + +#define VULKAN_TRANSFER_IMAGE_OWNERSHIP(cmd, img, layout, src_stages, dst_stages, src_queue_family, dst_queue_family) VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, img, VK_REMAINING_MIP_LEVELS, layout, layout, 0, 0, src_stages, dst_stages, src_queue_family, dst_queue_family) + +#define VULKAN_IMAGE_LAYOUT_TRANSITION(cmd, img, old_layout, new_layout, src_access, dst_access, src_stages, dst_stages) VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, img, VK_REMAINING_MIP_LEVELS, old_layout, new_layout, src_access, dst_access, src_stages, dst_stages, VK_QUEUE_FAMILY_IGNORED, VK_QUEUE_FAMILY_IGNORED) + +#define VK_DESCRIPTOR_MANAGER_RESTART(manager) \ +{ \ + manager->current = manager->head; \ + manager->count = 0; \ +} + +#define VK_MAP_PERSISTENT_TEXTURE(device, texture) \ +{ \ + vkMapMemory(device, texture->memory, texture->offset, texture->size, 0, &texture->mapped); \ +} + +#define VULKAN_PASS_SET_TEXTURE(device, set, _sampler, binding, image_view, image_layout) \ +{ \ + VkDescriptorImageInfo image_info; \ + VkWriteDescriptorSet write; \ + image_info.sampler = _sampler; \ + image_info.imageView = image_view; \ + image_info.imageLayout = image_layout; \ + write.sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; \ + write.pNext = NULL; \ + write.dstSet = set; \ + write.dstBinding = binding; \ + write.dstArrayElement = 0; \ + write.descriptorCount = 1; \ + write.descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; \ + write.pImageInfo = &image_info; \ + write.pBufferInfo = NULL; \ + write.pTexelBufferView = NULL; \ + vkUpdateDescriptorSets(device, 1, &write, 0, NULL); \ +} + uint32_t vulkan_find_memory_type( const VkPhysicalDeviceMemoryProperties *mem_props, uint32_t device_reqs, uint32_t host_reqs); @@ -466,18 +543,8 @@ struct vk_texture vulkan_create_texture(vk_t *vk, const void *initial, const VkComponentMapping *swizzle, enum vk_texture_type type); -void vulkan_sync_texture_to_gpu(vk_t *vk, const struct vk_texture *tex); -void vulkan_sync_texture_to_cpu(vk_t *vk, const struct vk_texture *tex); - void vulkan_transition_texture(vk_t *vk, VkCommandBuffer cmd, struct vk_texture *texture); -void vulkan_transfer_image_ownership(VkCommandBuffer cmd, - VkImage image, VkImageLayout layout, - VkPipelineStageFlags src_stages, - VkPipelineStageFlags dst_stages, - uint32_t src_queue_family, - uint32_t dst_queue_family); - void vulkan_destroy_texture( VkDevice device, struct vk_texture *tex); @@ -494,18 +561,6 @@ void vulkan_draw_quad(vk_t *vk, const struct vk_draw_quad *quad); */ void vulkan_draw_triangles(vk_t *vk, const struct vk_draw_triangles *call); -void vulkan_image_layout_transition(vk_t *vk, - VkCommandBuffer cmd, VkImage image, - VkImageLayout old_layout, VkImageLayout new_layout, - VkAccessFlags srcAccess, VkAccessFlags dstAccess, - VkPipelineStageFlags srcStages, VkPipelineStageFlags dstStages); - -void vulkan_image_layout_transition_levels( - VkCommandBuffer cmd, VkImage image, uint32_t levels, - VkImageLayout old_layout, VkImageLayout new_layout, - VkAccessFlags src_access, VkAccessFlags dst_access, - VkPipelineStageFlags src_stages, VkPipelineStageFlags dst_stages); - static INLINE unsigned vulkan_format_to_bpp(VkFormat format) { switch (format) @@ -564,17 +619,6 @@ VkDescriptorSet vulkan_descriptor_manager_alloc( VkDevice device, struct vk_descriptor_manager *manager); -#define VK_DESCRIPTOR_MANAGER_RESTART(manager) \ -{ \ - manager->current = manager->head; \ - manager->count = 0; \ -} - -#define VK_MAP_PERSISTENT_TEXTURE(device, texture) \ -{ \ - vkMapMemory(device, texture->memory, texture->offset, texture->size, 0, &texture->mapped); \ -} - struct vk_descriptor_manager vulkan_create_descriptor_manager( VkDevice device, const VkDescriptorPoolSize *sizes, unsigned num_sizes, @@ -630,12 +674,6 @@ void vulkan_framebuffer_clear(VkImage image, VkCommandBuffer cmd); void vulkan_initialize_render_pass(VkDevice device, VkFormat format, VkRenderPass *render_pass); -void vulkan_pass_set_texture( - VkDevice device, - VkDescriptorSet set, VkSampler sampler, - unsigned binding, - VkImageView imageView, VkImageLayout imageLayout); - RETRO_END_DECLS #endif diff --git a/gfx/common/wayland_common.h b/gfx/common/wayland_common.h deleted file mode 100644 index 941da1defa..0000000000 --- a/gfx/common/wayland_common.h +++ /dev/null @@ -1,66 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2017 - Daniel De Matteis - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * ation, either version 3 of the License, or (at your option) any later version. - * - * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; - * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR - * PURPOSE. See the GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along with RetroArch. - * If not, see . - */ - -#ifndef WAYLAND_COMMON_H__ -#define WAYLAND_COMMON_H__ - -#include -#include - -#include -#include -#include - -#include "../../input/input_driver.h" - -#define UDEV_KEY_MAX 0x2ff -#define UDEV_MAX_KEYS (UDEV_KEY_MAX + 7) / 8 - -#define MAX_TOUCHES 16 - -typedef struct -{ - bool active; - int16_t x; - int16_t y; -} wayland_touch_data_t; - -typedef struct input_ctx_wayland_data -{ - /* Wayland uses Linux keysyms. */ - uint8_t key_state[UDEV_MAX_KEYS]; - bool keyboard_focus; - - struct - { - int last_x, last_y; - int x, y; - int delta_x, delta_y; - bool last_valid; - bool focus; - bool left, right, middle; - } mouse; - - struct wl_display *dpy; - int fd; - - const input_device_driver_t *joypad; - bool blocked; - - wayland_touch_data_t touches[MAX_TOUCHES]; - -} input_ctx_wayland_data_t; - -#endif diff --git a/gfx/common/win32_common.c b/gfx/common/win32_common.c index f9c4fb8235..b4d8469c11 100644 --- a/gfx/common/win32_common.c +++ b/gfx/common/win32_common.c @@ -230,39 +230,6 @@ typedef struct DISPLAYCONFIG_PATH_INFO_CUSTOM typedef LONG (WINAPI *QUERYDISPLAYCONFIG)(UINT32, UINT32*, DISPLAYCONFIG_PATH_INFO_CUSTOM*, UINT32*, DISPLAYCONFIG_MODE_INFO_CUSTOM*, UINT32*); typedef LONG (WINAPI *GETDISPLAYCONFIGBUFFERSIZES)(UINT32, UINT32*, UINT32*); -bool g_win32_restore_desktop = false; -static bool taskbar_is_created = false; -bool g_win32_inited = false; - -typedef struct win32_common_state -{ - int pos_x; - int pos_y; - unsigned pos_width; - unsigned pos_height; - unsigned taskbar_message; - bool quit; - unsigned monitor_count; - bool resized; -} win32_common_state_t; - -static win32_common_state_t win32_st = -{ - CW_USEDEFAULT, /* pos_x */ - CW_USEDEFAULT, /* pos_y */ - 0, /* pos_width */ - 0, /* pos_height */ - 0, /* taskbar_message */ - false, /* quit */ - 0, /* monitor_count */ - false /* resized */ -}; - -unsigned g_win32_resize_width = 0; -unsigned g_win32_resize_height = 0; - -ui_window_win32_t main_window; - /* Power Request APIs */ #if !defined(_XBOX) && (_MSC_VER == 1310) @@ -310,9 +277,45 @@ typedef REASON_CONTEXT POWER_REQUEST_CONTEXT, *PPOWER_REQUEST_CONTEXT, *LPPOWER_ #define INT_PTR_COMPAT INT_PTR #endif + +/* TODO/FIXME - globals */ +bool g_win32_restore_desktop = false; +static bool taskbar_is_created = false; +bool g_win32_inited = false; + +unsigned g_win32_resize_width = 0; +unsigned g_win32_resize_height = 0; + +ui_window_win32_t main_window; + static HMONITOR win32_monitor_last; static HMONITOR win32_monitor_all[MAX_MONITORS]; +typedef struct win32_common_state +{ + int pos_x; + int pos_y; + unsigned pos_width; + unsigned pos_height; + unsigned taskbar_message; + bool quit; + unsigned monitor_count; + bool resized; +} win32_common_state_t; + +static win32_common_state_t win32_st = +{ + CW_USEDEFAULT, /* pos_x */ + CW_USEDEFAULT, /* pos_y */ + 0, /* pos_width */ + 0, /* pos_height */ + 0, /* taskbar_message */ + false, /* quit */ + 0, /* monitor_count */ + false /* resized */ +}; + + bool win32_taskbar_is_created(void) { return taskbar_is_created; @@ -915,9 +918,6 @@ static LRESULT CALLBACK wnd_proc_common( uint16_t mod = 0; unsigned keycode = 0; unsigned keysym = (lparam >> 16) & 0xff; -#if _WIN32_WINNT >= 0x0501 /* XP */ - settings_t *settings = config_get_ptr(); -#endif if (GetKeyState(VK_SHIFT) & 0x80) mod |= RETROKMOD_SHIFT; @@ -932,17 +932,20 @@ static LRESULT CALLBACK wnd_proc_common( if ((GetKeyState(VK_LWIN) | GetKeyState(VK_RWIN)) & 0x80) mod |= RETROKMOD_META; -#if _WIN32_WINNT >= 0x0501 /* XP */ - if (settings && - string_is_equal(settings->arrays.input_driver, "raw")) - keysym = (unsigned)wparam; - else -#endif { + input_driver_t *driver = input_get_ptr(); + +#if _WIN32_WINNT >= 0x0501 /* XP */ +#ifdef HAVE_WINRAWINPUT + if (driver == &input_winraw) + keysym = (unsigned)wparam; + else +#endif +#endif #ifdef HAVE_DINPUT - /* extended keys will map to dinput if the high bit is set */ - if (input_get_ptr() == &input_dinput && (lparam >> 24 & 0x1)) - keysym |= 0x80; + /* extended keys will map to dinput if the high bit is set */ + if (driver == &input_dinput && (lparam >> 24 & 0x1)) + keysym |= 0x80; #else /* fix key binding issues on winraw when DirectInput is not available */ #endif @@ -1066,7 +1069,7 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, } #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) LRESULT CALLBACK WndProcWGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) { @@ -1089,6 +1092,7 @@ LRESULT CALLBACK WndProcWGL(HWND hwnd, UINT message, taskbar_is_created = true; #endif #ifdef HAVE_DINPUT + if (input_get_ptr() == &input_dinput) { void* input_data = input_get_data(); if (input_data && dinput_handle_message(input_data, @@ -1129,6 +1133,70 @@ LRESULT CALLBACK WndProcWGL(HWND hwnd, UINT message, } #endif +#ifdef HAVE_VULKAN +LRESULT CALLBACK WndProcVK(HWND hwnd, UINT message, + WPARAM wparam, LPARAM lparam) +{ + LRESULT ret; + bool quit = false; + win32_common_state_t *g_win32 = (win32_common_state_t*)&win32_st; + + switch (message) + { + case WM_MOUSEMOVE: + case WM_POINTERDOWN: + case WM_POINTERUP: + case WM_POINTERUPDATE: + case WM_DEVICECHANGE: + case WM_MOUSEWHEEL: + case WM_MOUSEHWHEEL: + case WM_NCLBUTTONDBLCLK: +#if _WIN32_WINNT >= 0x0500 /* 2K */ + if (g_win32->taskbar_message && message == g_win32->taskbar_message) + taskbar_is_created = true; +#endif +#ifdef HAVE_DINPUT + if (input_get_ptr() == &input_dinput) + { + void* input_data = input_get_data(); + if (input_data && dinput_handle_message(input_data, + message, wparam, lparam)) + return 0; + } +#endif + break; + case WM_DROPFILES: + case WM_SYSCOMMAND: + case WM_CHAR: + case WM_KEYDOWN: + case WM_KEYUP: + case WM_SYSKEYUP: + case WM_SYSKEYDOWN: + case WM_CLOSE: + case WM_DESTROY: + case WM_QUIT: + case WM_MOVE: + case WM_SIZE: + case WM_COMMAND: + ret = wnd_proc_common(&quit, hwnd, message, wparam, lparam); + if (quit) + return ret; +#if _WIN32_WINNT >= 0x0500 /* 2K */ + if (g_win32->taskbar_message && message == g_win32->taskbar_message) + taskbar_is_created = true; +#endif + break; + case WM_CREATE: + create_vk_context(hwnd, &g_win32->quit); + if (DragAcceptFiles_func) + DragAcceptFiles_func(hwnd, true); + return 0; + } + + return DefWindowProc(hwnd, message, wparam, lparam); +} +#endif + #ifdef HAVE_GDI LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam) @@ -1152,6 +1220,7 @@ LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, taskbar_is_created = true; #endif #ifdef HAVE_DINPUT + if (input_get_ptr() == &input_dinput) { void* input_data = input_get_data(); if (input_data && dinput_handle_message(input_data, @@ -1381,7 +1450,8 @@ void win32_show_cursor(void *data, bool state) #endif } -void win32_check_window(bool *quit, bool *resize, +void win32_check_window(void *data, + bool *quit, bool *resize, unsigned *width, unsigned *height) { #if !defined(_XBOX) diff --git a/gfx/common/win32_common.h b/gfx/common/win32_common.h index 4f8b700228..d8b7fc43b8 100644 --- a/gfx/common/win32_common.h +++ b/gfx/common/win32_common.h @@ -60,6 +60,8 @@ int win32_change_display_settings(const char *str, void *devmode_data, void create_graphics_context(HWND hwnd, bool *quit); +void create_vk_context(HWND hwnd, bool *quit); + void create_gdi_context(HWND hwnd, bool *quit); bool win32_get_video_output(DEVMODE *dm, int mode, size_t len); @@ -96,7 +98,8 @@ HWND win32_get_window(void); bool win32_has_focus(void *data); -void win32_check_window(bool *quit, +void win32_check_window(void *data, + bool *quit, bool *resize, unsigned *width, unsigned *height); void win32_set_window(unsigned *width, unsigned *height, @@ -124,11 +127,16 @@ LRESULT CALLBACK WndProcD3D(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #endif -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) LRESULT CALLBACK WndProcWGL(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); #endif +#if defined(HAVE_VULKAN) +LRESULT CALLBACK WndProcVK(HWND hwnd, UINT message, + WPARAM wparam, LPARAM lparam); +#endif + LRESULT CALLBACK WndProcGDI(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam); diff --git a/gfx/common/x11_common.c b/gfx/common/x11_common.c index 5f5b302e6f..93c6e60c9a 100644 --- a/gfx/common/x11_common.c +++ b/gfx/common/x11_common.c @@ -59,6 +59,7 @@ #define V_DBLSCAN 0x20 +/* TODO/FIXME - globals */ static XF86VidModeModeInfo desktop_mode; static bool xdg_screensaver_available = true; bool g_x11_entered = false; @@ -81,11 +82,11 @@ static XIC g_x11_xic; static void x11_hide_mouse(Display *dpy, Window win) { - static char bm_no_data[] = {0, 0, 0, 0, 0, 0, 0, 0}; Cursor no_ptr; Pixmap bm_no; XColor black, dummy; - Colormap colormap = DefaultColormap(dpy, DefaultScreen(dpy)); + static char bm_no_data[] = {0, 0, 0, 0, 0, 0, 0, 0}; + Colormap colormap = DefaultColormap(dpy, DefaultScreen(dpy)); if (!XAllocNamedColor(dpy, colormap, "black", &black, &dummy)) return; diff --git a/gfx/common/xinerama_common.c b/gfx/common/xinerama_common.c index 34879e8275..3db4d765de 100644 --- a/gfx/common/xinerama_common.c +++ b/gfx/common/xinerama_common.c @@ -30,7 +30,8 @@ #include "../../verbosity.h" -static XineramaScreenInfo *xinerama_query_screens(Display *dpy, int *num_screens) +static XineramaScreenInfo *xinerama_query_screens( + Display *dpy, int *num_screens) { int major, minor; diff --git a/gfx/display_servers/dispserv_win32.c b/gfx/display_servers/dispserv_win32.c index 6ba2c662a2..29416312ed 100644 --- a/gfx/display_servers/dispserv_win32.c +++ b/gfx/display_servers/dispserv_win32.c @@ -222,64 +222,70 @@ static bool win32_display_server_set_window_decorations(void *data, bool on) static bool win32_display_server_set_resolution(void *data, unsigned width, unsigned height, int int_hz, float hz, int center, int monitor_index, int xoffset) { - DEVMODE curDevmode; - int iModeNum; - int freq = int_hz; - int depth = 0; - dispserv_win32_t *serv = (dispserv_win32_t*)data; + DEVMODE dm = {0}; + LONG res = 0; + unsigned i = 0; + unsigned curr_bpp = 0; +#if _WIN32_WINNT >= 0x0500 + unsigned curr_orientation = 0; +#endif + dispserv_win32_t *serv = (dispserv_win32_t*)data; if (!serv) return false; - win32_get_video_output(&curDevmode, -1, sizeof(curDevmode)); + win32_get_video_output(&dm, -1, sizeof(dm)); if (serv->orig_width == 0) - serv->orig_width = GetSystemMetrics(SM_CXSCREEN); - serv->orig_refresh = curDevmode.dmDisplayFrequency; + serv->orig_width = GetSystemMetrics(SM_CXSCREEN); if (serv->orig_height == 0) - serv->orig_height = GetSystemMetrics(SM_CYSCREEN); + serv->orig_height = GetSystemMetrics(SM_CYSCREEN); + serv->orig_refresh = dm.dmDisplayFrequency; /* Used to stop super resolution bug */ - if (width == curDevmode.dmPelsWidth) - width = 0; + if (width == dm.dmPelsWidth) + width = 0; if (width == 0) - width = curDevmode.dmPelsWidth; + width = dm.dmPelsWidth; if (height == 0) - height = curDevmode.dmPelsHeight; - if (depth == 0) - depth = curDevmode.dmBitsPerPel; - if (freq == 0) - freq = curDevmode.dmDisplayFrequency; + height = dm.dmPelsHeight; + if (curr_bpp == 0) + curr_bpp = dm.dmBitsPerPel; + if (int_hz == 0) + int_hz = dm.dmDisplayFrequency; +#if _WIN32_WINNT >= 0x0500 + if (curr_orientation == 0) + curr_orientation = dm.dmDisplayOrientation; +#endif - for (iModeNum = 0;; iModeNum++) + for (i = 0; win32_get_video_output(&dm, i, sizeof(dm)); i++) { - LONG res; - DEVMODE devmode; - - if (!win32_get_video_output(&devmode, iModeNum, sizeof(devmode))) - break; - - if (devmode.dmPelsWidth != width) + if (dm.dmPelsWidth != width) continue; - - if (devmode.dmPelsHeight != height) + if (dm.dmPelsHeight != height) continue; - - if (devmode.dmBitsPerPel != depth) + if (dm.dmBitsPerPel != curr_bpp) continue; - - if (devmode.dmDisplayFrequency != freq) + if (dm.dmDisplayFrequency != int_hz) continue; +#if _WIN32_WINNT >= 0x0500 + if (dm.dmDisplayOrientation != curr_orientation) + continue; + if (dm.dmDisplayFixedOutput != DMDFO_DEFAULT) + continue; +#endif - devmode.dmFields |= - DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY; - res = - win32_change_display_settings(NULL, &devmode, CDS_TEST); + dm.dmFields |= DM_PELSWIDTH | DM_PELSHEIGHT | DM_BITSPERPEL | DM_DISPLAYFREQUENCY; +#if _WIN32_WINNT >= 0x0500 + dm.dmFields |= DM_DISPLAYORIENTATION; +#endif + + res = win32_change_display_settings(NULL, &dm, CDS_TEST); switch (res) { case DISP_CHANGE_SUCCESSFUL: - res = win32_change_display_settings(NULL, &devmode, 0); + res = win32_change_display_settings(NULL, &dm, 0); switch (res) { case DISP_CHANGE_SUCCESSFUL: @@ -300,31 +306,42 @@ static bool win32_display_server_set_resolution(void *data, return true; } -void *win32_display_server_get_resolution_list(void *data, - unsigned *len) +static void *win32_display_server_get_resolution_list( + void *data, unsigned *len) { - DEVMODE dm; - unsigned i, count = 0; + DEVMODE dm = {0}; + unsigned i, j, count = 0; unsigned curr_width = 0; unsigned curr_height = 0; unsigned curr_bpp = 0; unsigned curr_refreshrate = 0; +#if _WIN32_WINNT >= 0x0500 + unsigned curr_orientation = 0; +#endif struct video_display_config *conf = NULL; - for (i = 0;; i++) - { - if (!win32_get_video_output(&dm, i, sizeof(dm))) - break; - - count++; - } - - if (win32_get_video_output(&dm, -1, sizeof(dm))) - { + if (win32_get_video_output(&dm, -1, sizeof(dm))) { curr_width = dm.dmPelsWidth; curr_height = dm.dmPelsHeight; curr_bpp = dm.dmBitsPerPel; curr_refreshrate = dm.dmDisplayFrequency; +#if _WIN32_WINNT >= 0x0500 + curr_orientation = dm.dmDisplayOrientation; +#endif + } + + for (i = 0; win32_get_video_output(&dm, i, sizeof(dm)); i++) + { + if (dm.dmBitsPerPel != curr_bpp) + continue; +#if _WIN32_WINNT >= 0x0500 + if (dm.dmDisplayOrientation != curr_orientation) + continue; + if (dm.dmDisplayFixedOutput != DMDFO_DEFAULT) + continue; +#endif + + count++; } *len = count; @@ -333,24 +350,32 @@ void *win32_display_server_get_resolution_list(void *data, if (!conf) return NULL; - for (i = 0;; i++) + for (i = 0, j = 0; win32_get_video_output(&dm, i, sizeof(dm)); i++) { - if (!win32_get_video_output(&dm, i, sizeof(dm))) - break; + if (dm.dmBitsPerPel != curr_bpp) + continue; +#if _WIN32_WINNT >= 0x0500 + if (dm.dmDisplayOrientation != curr_orientation) + continue; + if (dm.dmDisplayFixedOutput != DMDFO_DEFAULT) + continue; +#endif - conf[i].width = dm.dmPelsWidth; - conf[i].height = dm.dmPelsHeight; - conf[i].bpp = dm.dmBitsPerPel; - conf[i].refreshrate = dm.dmDisplayFrequency; - conf[i].idx = i; - conf[i].current = false; + conf[j].width = dm.dmPelsWidth; + conf[j].height = dm.dmPelsHeight; + conf[j].bpp = dm.dmBitsPerPel; + conf[j].refreshrate = dm.dmDisplayFrequency; + conf[j].idx = j; + conf[j].current = false; - if ( (conf[i].width == curr_width) - && (conf[i].height == curr_height) - && (conf[i].refreshrate == curr_refreshrate) - && (conf[i].bpp == curr_bpp) + if ( (conf[j].width == curr_width) + && (conf[j].height == curr_height) + && (conf[j].bpp == curr_bpp) + && (conf[j].refreshrate == curr_refreshrate) ) - conf[i].current = true; + conf[j].current = true; + + j++; } return conf; diff --git a/gfx/display_servers/dispserv_x11.c b/gfx/display_servers/dispserv_x11.c index c37b84fb13..15f94ef8e3 100644 --- a/gfx/display_servers/dispserv_x11.c +++ b/gfx/display_servers/dispserv_x11.c @@ -40,6 +40,7 @@ #include "../video_crt_switch.h" /* needed to set aspect for low res in linux */ #ifdef HAVE_XRANDR +/* TODO/FIXME - static globals */ static char xrandr[1024] = {0}; static char crt_name[16] = {0}; static int crt_name_id = 0; diff --git a/gfx/drivers/ctr_gfx.c b/gfx/drivers/ctr_gfx.c index aa374ce82d..1a77643e94 100644 --- a/gfx/drivers/ctr_gfx.c +++ b/gfx/drivers/ctr_gfx.c @@ -582,7 +582,7 @@ static bool ctr_frame(void* data, const void* frame, #if 0 ctr->vsync_event_pending = true; #endif - while(ctr->vsync_event_pending) + while (ctr->vsync_event_pending) { task_queue_check(); svcSleepThread(0); diff --git a/gfx/drivers/d3d10.c b/gfx/drivers/d3d10.c index e29aa60872..7279135a3e 100644 --- a/gfx/drivers/d3d10.c +++ b/gfx/drivers/d3d10.c @@ -31,7 +31,9 @@ #include "../../verbosity.h" #include "../../configuration.h" #include "../../retroarch.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #include "../font_driver.h" #include "../common/d3d_common.h" @@ -1339,7 +1341,11 @@ static bool d3d10_gfx_frame( else d3d10->pass[i].frame_count = frame_count; +#ifdef HAVE_REWIND d3d10->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1; +#else + d3d10->pass[i].frame_direction = 1; +#endif for (j = 0; j < SLANG_CBUFFER_MAX; j++) { @@ -1546,7 +1552,9 @@ static bool d3d10_gfx_alive(void* data) bool quit; d3d10_video_t* d3d10 = (d3d10_video_t*)data; - win32_check_window(&quit, &d3d10->resize_chain, &d3d10->vp.full_width, &d3d10->vp.full_height); + win32_check_window(NULL, + &quit, &d3d10->resize_chain, &d3d10->vp.full_width, + &d3d10->vp.full_height); if ( d3d10->resize_chain && d3d10->vp.full_width != 0 diff --git a/gfx/drivers/d3d11.c b/gfx/drivers/d3d11.c index afa10d162a..84e1381dd7 100644 --- a/gfx/drivers/d3d11.c +++ b/gfx/drivers/d3d11.c @@ -46,7 +46,9 @@ #include "../../menu/menu_driver.h" #include "../video_shader_parse.h" #include "../drivers_shader/slang_process.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #include "../common/d3d_common.h" #include "../common/d3d11_common.h" @@ -1419,7 +1421,11 @@ static bool d3d11_gfx_frame( else d3d11->pass[i].frame_count = frame_count; +#ifdef HAVE_REWIND d3d11->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1; +#else + d3d11->pass[i].frame_direction = 1; +#endif for (j = 0; j < SLANG_CBUFFER_MAX; j++) { @@ -1620,9 +1626,15 @@ static bool d3d11_gfx_alive(void* data) bool quit; d3d11_video_t* d3d11 = (d3d11_video_t*)data; - win32_check_window(&quit, &d3d11->resize_chain, &d3d11->vp.full_width, &d3d11->vp.full_height); + win32_check_window(NULL, + &quit, + &d3d11->resize_chain, + &d3d11->vp.full_width, + &d3d11->vp.full_height); - if (d3d11->resize_chain && d3d11->vp.full_width != 0 && d3d11->vp.full_height != 0) + if ( d3d11->resize_chain + && d3d11->vp.full_width != 0 + && d3d11->vp.full_height != 0) video_driver_set_size(d3d11->vp.full_width, d3d11->vp.full_height); return !quit; diff --git a/gfx/drivers/d3d12.c b/gfx/drivers/d3d12.c index 1b51818d7b..5a4989ff7b 100644 --- a/gfx/drivers/d3d12.c +++ b/gfx/drivers/d3d12.c @@ -33,7 +33,9 @@ #include "../../verbosity.h" #include "../../configuration.h" #include "../../retroarch.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #ifdef HAVE_MENU #include "../../menu/menu_driver.h" @@ -1316,7 +1318,11 @@ static bool d3d12_gfx_frame( else d3d12->pass[i].frame_count = frame_count; +#ifdef HAVE_REWIND d3d12->pass[i].frame_direction = state_manager_frame_is_reversed() ? -1 : 1; +#else + d3d12->pass[i].frame_direction = 1; +#endif for (j = 0; j < SLANG_CBUFFER_MAX; j++) { @@ -1613,7 +1619,11 @@ static bool d3d12_gfx_alive(void* data) bool quit; d3d12_video_t* d3d12 = (d3d12_video_t*)data; - win32_check_window(&quit, &d3d12->resize_chain, &d3d12->vp.full_width, &d3d12->vp.full_height); + win32_check_window(NULL, + &quit, + &d3d12->resize_chain, + &d3d12->vp.full_width, + &d3d12->vp.full_height); if ( d3d12->resize_chain && d3d12->vp.full_width != 0 diff --git a/gfx/drivers/d3d8.c b/gfx/drivers/d3d8.c index 1e3ca02e73..f384539215 100644 --- a/gfx/drivers/d3d8.c +++ b/gfx/drivers/d3d8.c @@ -1046,9 +1046,7 @@ static bool d3d8_alive(void *data) /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); -#ifndef _XBOX - win32_check_window(&quit, &resize, &temp_width, &temp_height); -#endif + win32_check_window(NULL, &quit, &resize, &temp_width, &temp_height); if (quit) d3d->quitting = quit; diff --git a/gfx/drivers/d3d9.c b/gfx/drivers/d3d9.c index 50117403ac..27da553843 100644 --- a/gfx/drivers/d3d9.c +++ b/gfx/drivers/d3d9.c @@ -1057,9 +1057,7 @@ static bool d3d9_alive(void *data) /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); -#ifndef _XBOX - win32_check_window(&quit, &resize, &temp_width, &temp_height); -#endif + win32_check_window(NULL, &quit, &resize, &temp_width, &temp_height); if (quit) d3d->quitting = quit; diff --git a/gfx/drivers/fpga_gfx.c b/gfx/drivers/fpga_gfx.c index 2e6ebd7c58..123a968a7a 100644 --- a/gfx/drivers/fpga_gfx.c +++ b/gfx/drivers/fpga_gfx.c @@ -103,13 +103,7 @@ static void fpga_gfx_create(fpga_t *fpga) static void *fpga_gfx_init(const video_info_t *video, const input_driver_t **input, void **input_data) { - unsigned full_x, full_y; - gfx_ctx_input_t inp; - gfx_ctx_mode_t mode; const gfx_ctx_driver_t *ctx_driver = NULL; - unsigned win_width = 0, win_height = 0; - unsigned temp_width = 0, temp_height = 0; - settings_t *settings = config_get_ptr(); fpga_t *fpga = (fpga_t*)calloc(1, sizeof(*fpga)); *input = NULL; @@ -128,71 +122,11 @@ static void *fpga_gfx_init(const video_info_t *video, fpga_gfx_create(fpga); - ctx_driver = video_context_driver_init_first(fpga, - settings->arrays.video_context_driver, - GFX_CTX_FPGA_API, 1, 0, false); - if (!ctx_driver) - goto error; - - video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); - - RARCH_LOG("[FPGA]: Found FPGA context: %s\n", ctx_driver->ident); - - video_context_driver_get_video_size(&mode); - - full_x = mode.width; - full_y = mode.height; - mode.width = 0; - mode.height = 0; - - RARCH_LOG("[FPGA]: Detecting screen resolution %ux%u.\n", full_x, full_y); - - win_width = video->width; - win_height = video->height; - - if (video->fullscreen && (win_width == 0) && (win_height == 0)) - { - win_width = full_x; - win_height = full_y; - } - - mode.width = win_width; - mode.height = win_height; - mode.fullscreen = video->fullscreen; - - if (!video_context_driver_set_video_mode(&mode)) - goto error; - - mode.width = 0; - mode.height = 0; - - video_context_driver_get_video_size(&mode); - - temp_width = mode.width; - temp_height = mode.height; - mode.width = 0; - mode.height = 0; - - /* Get real known video size, which might have been altered by context. */ - - if (temp_width != 0 && temp_height != 0) - video_driver_set_size(temp_width, temp_height); - - video_driver_get_size(&temp_width, &temp_height); - - RARCH_LOG("[FPGA]: Using resolution %ux%u\n", temp_width, temp_height); - - inp.input = input; - inp.input_data = input_data; - - video_context_driver_input_driver(&inp); - RARCH_LOG("[FPGA]: Init complete.\n"); return fpga; error: - video_context_driver_destroy(); if (fpga) free(fpga); return NULL; @@ -202,7 +136,6 @@ static bool fpga_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - gfx_ctx_mode_t mode; const void *frame_to_copy = frame; unsigned width = 0; unsigned height = 0; @@ -251,8 +184,6 @@ static bool fpga_gfx_frame(void *data, const void *frame, draw = false; } - video_context_driver_get_video_size(&mode); - if (draw) { if (bits == 16) @@ -317,25 +248,6 @@ static void fpga_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { } static bool fpga_gfx_alive(void *data) { - gfx_ctx_size_t size_data; - unsigned temp_width = 0; - unsigned temp_height = 0; - bool quit = false; - bool resize = false; - - /* Needed because some context drivers don't track their sizes */ - video_driver_get_size(&temp_width, &temp_height); - - size_data.quit = &quit; - size_data.resize = &resize; - size_data.width = &temp_width; - size_data.height = &temp_height; - - video_context_driver_check_window(&size_data); - - if (temp_width != 0 && temp_height != 0) - video_driver_set_size(temp_width, temp_height); - return true; } @@ -369,8 +281,6 @@ static void fpga_gfx_free(void *data) free(fpga->menu_frame); fpga->menu_frame = NULL; - video_context_driver_free(); - free(fpga); fpga->regOp.only_mmap = 0; @@ -449,34 +359,13 @@ static void fpga_set_osd_msg(void *data, } static void fpga_get_video_output_size(void *data, - unsigned *width, unsigned *height) -{ - gfx_ctx_size_t size_data; - size_data.width = width; - size_data.height = height; - video_context_driver_get_video_output_size(&size_data); -} - -static void fpga_get_video_output_prev(void *data) -{ - video_context_driver_get_video_output_prev(); -} - -static void fpga_get_video_output_next(void *data) -{ - video_context_driver_get_video_output_next(); -} + unsigned *width, unsigned *height) { } +static void fpga_get_video_output_prev(void *data) { } +static void fpga_get_video_output_next(void *data) { } static void fpga_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { - gfx_ctx_mode_t mode; - - mode.width = width; - mode.height = height; - mode.fullscreen = fullscreen; - - video_context_driver_set_video_mode(&mode); } static const video_poke_interface_t fpga_poke_interface = { diff --git a/gfx/drivers/gcm_gfx.c b/gfx/drivers/gcm_gfx.c index 6b58243dc9..d53f5d177c 100644 --- a/gfx/drivers/gcm_gfx.c +++ b/gfx/drivers/gcm_gfx.c @@ -261,7 +261,7 @@ waitFinish(gcmContextData *context, u32 sLabelVal) rsxFlushBuffer (context); - while(*(vu32 *) gcmGetLabelAddress (GCM_LABEL_INDEX) != sLabelVal) + while (*(vu32 *) gcmGetLabelAddress (GCM_LABEL_INDEX) != sLabelVal) usleep(30); sLabelVal++; diff --git a/gfx/drivers/gdi_gfx.c b/gfx/drivers/gdi_gfx.c index 2996ade4f4..d7d5e13afb 100644 --- a/gfx/drivers/gdi_gfx.c +++ b/gfx/drivers/gdi_gfx.c @@ -39,6 +39,139 @@ #include "../common/win32_common.h" #endif +static HDC win32_gdi_hdc; +static void *dinput_gdi; + +static void gfx_ctx_gdi_update_title(void) +{ + char title[128]; + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (window && title[0]) + window->set_title(&main_window, title); +} + +static void gfx_ctx_gdi_get_video_size( + unsigned *width, unsigned *height) +{ + HWND window = win32_get_window(); + + if (window) + { + *width = g_win32_resize_width; + *height = g_win32_resize_height; + } + else + { + RECT mon_rect; + MONITORINFOEX current_mon; + unsigned mon_id = 0; + HMONITOR hm_to_use = NULL; + + win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); + mon_rect = current_mon.rcMonitor; + *width = mon_rect.right - mon_rect.left; + *height = mon_rect.bottom - mon_rect.top; + } +} + +static bool gfx_ctx_gdi_init(void) +{ + WNDCLASSEX wndclass = {0}; + + if (g_win32_inited) + return true; + + win32_window_reset(); + win32_monitor_init(); + + wndclass.lpfnWndProc = WndProcGDI; + if (!win32_window_init(&wndclass, true, NULL)) + return false; + return true; +} + +static void gfx_ctx_gdi_destroy(void) +{ + HWND window = win32_get_window(); + + if (window && win32_gdi_hdc) + { + ReleaseDC(window, win32_gdi_hdc); + win32_gdi_hdc = NULL; + } + + if (window) + { + win32_monitor_from_window(); + win32_destroy_window(); + } + + if (g_win32_restore_desktop) + { + win32_monitor_get_info(); + g_win32_restore_desktop = false; + } + + g_win32_inited = false; +} + +static bool gfx_ctx_gdi_set_video_mode( + unsigned width, unsigned height, + bool fullscreen) +{ + if (!win32_set_video_mode(NULL, width, height, fullscreen)) + { + gfx_ctx_gdi_destroy(); + return false; + } + + return true; +} + +static void gfx_ctx_gdi_input_driver( + input_driver_t **input, void **input_data) +{ + settings_t *settings = config_get_ptr(); +#if _WIN32_WINNT >= 0x0501 +#ifdef HAVE_WINRAWINPUT + /* winraw only available since XP */ + if (string_is_equal(settings->arrays.input_driver, "raw")) + { + *input_data = input_winraw.init(settings->arrays.input_driver); + if (*input_data) + { + *input = &input_winraw; + dinput_gdi = NULL; + return; + } + } +#endif +#endif + +#ifdef HAVE_DINPUT + dinput_gdi = input_dinput.init(settings->arrays.input_driver); + *input = dinput_gdi ? &input_dinput : NULL; +#else + dinput_gdi = NULL; + *input = NULL; +#endif + *input_data = dinput_gdi; +} + +void create_gdi_context(HWND hwnd, bool *quit) +{ + win32_gdi_hdc = GetDC(hwnd); + + win32_setup_pixel_format(win32_gdi_hdc, false); + + g_win32_inited = true; +} + static void gdi_gfx_create(gdi_t *gdi) { char os[64] = {0}; @@ -65,11 +198,10 @@ static void *gdi_gfx_init(const video_info_t *video, input_driver_t **input, void **input_data) { unsigned full_x, full_y; - gfx_ctx_input_t inp; - gfx_ctx_mode_t mode; void *ctx_data = NULL; const gfx_ctx_driver_t *ctx_driver = NULL; - unsigned win_width = 0, win_height = 0; + unsigned mode_width = 0, mode_height = 0; + unsigned win_width = 0, win_height = 0; unsigned temp_width = 0, temp_height = 0; settings_t *settings = config_get_ptr(); bool video_font_enable = settings->bools.video_font_enable; @@ -93,28 +225,15 @@ static void *gdi_gfx_init(const video_info_t *video, gdi->video_pitch = video->width * 2; gdi_gfx_create(gdi); - - ctx_driver = video_context_driver_init_first(gdi, - settings->arrays.video_context_driver, - GFX_CTX_GDI_API, 1, 0, false, &ctx_data); - if (!ctx_driver) + if (!gfx_ctx_gdi_init()) goto error; - if (ctx_data) - gdi->ctx_data = ctx_data; + gfx_ctx_gdi_get_video_size(&mode_width, &mode_height); - gdi->ctx_driver = ctx_driver; - - video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); - - RARCH_LOG("[GDI]: Found GDI context: %s\n", ctx_driver->ident); - - video_context_driver_get_video_size(&mode); - - full_x = mode.width; - full_y = mode.height; - mode.width = 0; - mode.height = 0; + full_x = mode_width; + full_y = mode_height; + mode_width = 0; + mode_height = 0; RARCH_LOG("[GDI]: Detecting screen resolution %ux%u.\n", full_x, full_y); @@ -127,22 +246,22 @@ static void *gdi_gfx_init(const video_info_t *video, win_height = full_y; } - mode.width = win_width; - mode.height = win_height; - mode.fullscreen = video->fullscreen; + mode_width = win_width; + mode_height = win_height; - if (!video_context_driver_set_video_mode(&mode)) + if (!gfx_ctx_gdi_set_video_mode(mode_width, + mode_height, video->fullscreen)) goto error; - mode.width = 0; - mode.height = 0; + mode_width = 0; + mode_height = 0; - video_context_driver_get_video_size(&mode); + gfx_ctx_gdi_get_video_size(&mode_width, &mode_height); - temp_width = mode.width; - temp_height = mode.height; - mode.width = 0; - mode.height = 0; + temp_width = mode_width; + temp_height = mode_height; + mode_width = 0; + mode_height = 0; /* Get real known video size, which might have been altered by context. */ @@ -153,10 +272,7 @@ static void *gdi_gfx_init(const video_info_t *video, RARCH_LOG("[GDI]: Using resolution %ux%u\n", temp_width, temp_height); - inp.input = input; - inp.input_data = input_data; - - video_context_driver_input_driver(&inp); + gfx_ctx_gdi_input_driver(input, input_data); if (video_font_enable) font_driver_init_osd(gdi, @@ -170,7 +286,7 @@ static void *gdi_gfx_init(const video_info_t *video, return gdi; error: - video_context_driver_destroy(); + gfx_ctx_gdi_destroy(); if (gdi) free(gdi); return NULL; @@ -180,8 +296,9 @@ static bool gdi_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - BITMAPINFO *info; - gfx_ctx_mode_t mode; + BITMAPINFO info; + unsigned mode_width = 0; + unsigned mode_height = 0; const void *frame_to_copy = frame; unsigned width = 0; unsigned height = 0; @@ -199,7 +316,8 @@ static bool gdi_gfx_frame(void *data, const void *frame, return true; #ifdef HAVE_MENU - menu_driver_frame(menu_is_alive, video_info); + if (gdi->menu_enable) + menu_driver_frame(menu_is_alive, video_info); #endif if ( gdi->video_width != frame_width || @@ -276,20 +394,27 @@ static bool gdi_gfx_frame(void *data, const void *frame, } } - video_context_driver_get_video_size(&mode); + gfx_ctx_gdi_get_video_size(&mode_width, &mode_height); - gdi->screen_width = mode.width; - gdi->screen_height = mode.height; + gdi->screen_width = mode_width; + gdi->screen_height = mode_height; - info = (BITMAPINFO*) - calloc(1, sizeof(*info) + (3 * sizeof(RGBQUAD))); + info.bmiColors[0].rgbBlue = 0; + info.bmiColors[0].rgbGreen = 0; + info.bmiColors[0].rgbRed = 0; + info.bmiColors[0].rgbReserved = 0; - info->bmiHeader.biBitCount = bits; - info->bmiHeader.biWidth = pitch / (bits / 8); - info->bmiHeader.biHeight = -height; - info->bmiHeader.biPlanes = 1; - info->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); - info->bmiHeader.biSizeImage = 0; + info.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); + info.bmiHeader.biWidth = pitch / (bits / 8); + info.bmiHeader.biHeight = -height; + info.bmiHeader.biPlanes = 1; + info.bmiHeader.biBitCount = bits; + info.bmiHeader.biCompression = 0; + info.bmiHeader.biSizeImage = 0; + info.bmiHeader.biXPelsPerMeter= 0; + info.bmiHeader.biYPelsPerMeter= 0; + info.bmiHeader.biClrUsed = 0; + info.bmiHeader.biClrImportant = 0; if (bits == 16) { @@ -309,13 +434,13 @@ static bool gdi_gfx_frame(void *data, const void *frame, } frame_to_copy = gdi->temp_buf; - info->bmiHeader.biCompression = BI_RGB; + info.bmiHeader.biCompression = BI_RGB; } else { - unsigned *masks = (unsigned*)info->bmiColors; + unsigned *masks = (unsigned*)info.bmiColors; - info->bmiHeader.biCompression = BI_BITFIELDS; + info.bmiHeader.biCompression = BI_BITFIELDS; /* default 16-bit format on Windows is XRGB1555 */ if (frame_to_copy == gdi->menu_frame) @@ -335,24 +460,20 @@ static bool gdi_gfx_frame(void *data, const void *frame, } } else - info->bmiHeader.biCompression = BI_RGB; + info.bmiHeader.biCompression = BI_RGB; if (draw) StretchDIBits(gdi->memDC, 0, 0, width, height, 0, 0, width, height, - frame_to_copy, info, DIB_RGB_COLORS, SRCCOPY); + frame_to_copy, &info, DIB_RGB_COLORS, SRCCOPY); SelectObject(gdi->memDC, gdi->bmp_old); - free(info); - if (msg) font_driver_render_msg(gdi, msg, NULL, NULL); InvalidateRect(hwnd, NULL, false); - if (gdi->ctx_driver->update_window_title) - gdi->ctx_driver->update_window_title( - video_info->context_data); + gfx_ctx_gdi_update_title(); return true; } @@ -368,12 +489,11 @@ static bool gdi_gfx_alive(void *data) bool quit = false; bool resize = false; bool ret = false; - gdi_t *gdi = (gdi_t*)data; /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); - gdi->ctx_driver->check_window(gdi->ctx_data, + win32_check_window(NULL, &quit, &resize, &temp_width, &temp_height); ret = !quit; @@ -440,7 +560,7 @@ static void gdi_gfx_free(void *data) } font_driver_free_osd(); - video_context_driver_free(); + gfx_ctx_gdi_destroy(); free(gdi); } @@ -454,6 +574,17 @@ static bool gdi_gfx_set_shader(void *data, return false; } +static void gdi_set_texture_enable( + void *data, bool state, bool full_screen) +{ + gdi_t *gdi = (gdi_t*)data; + if (!gdi) + return; + + gdi->menu_enable = state; + gdi->menu_full_screen = full_screen; +} + static void gdi_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, float alpha) @@ -495,13 +626,7 @@ static void gdi_set_texture_frame(void *data, static void gdi_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { - gfx_ctx_mode_t mode; - - mode.width = width; - mode.height = height; - mode.fullscreen = fullscreen; - - video_context_driver_set_video_mode(&mode); + gfx_ctx_gdi_set_video_mode(width, height, fullscreen); } static uintptr_t gdi_load_texture(void *video_data, void *data, @@ -580,7 +705,7 @@ static const video_poke_interface_t gdi_poke_interface = { NULL, NULL, gdi_set_texture_frame, - NULL, + gdi_set_texture_enable, font_driver_render_msg, NULL, NULL, /* grab_mouse_toggle */ diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 16d37c1b5a..02db144cfe 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2064,6 +2064,7 @@ static bool gl2_shader_init(gl_t *gl, const gfx_ctx_driver_t *ctx_driver, init_data.gl.core_context_enabled = gl->core_context_in_use; init_data.shader_type = type; init_data.shader = NULL; + init_data.shader_data = NULL; init_data.data = gl; init_data.path = shader_path; @@ -2076,13 +2077,14 @@ static bool gl2_shader_init(gl_t *gl, const gfx_ctx_driver_t *ctx_driver, RARCH_ERR("[GL]: Failed to initialize shader, falling back to stock.\n"); - init_data.shader = NULL; - init_data.path = NULL; + init_data.shader = NULL; + init_data.shader_data = NULL; + init_data.path = NULL; - ret = gl_shader_driver_init(&init_data); + ret = gl_shader_driver_init(&init_data); - gl->shader = init_data.shader; - gl->shader_data = init_data.shader_data; + gl->shader = init_data.shader; + gl->shader_data = init_data.shader_data; return ret; } @@ -2666,7 +2668,9 @@ static void gl2_video_layout_layer_begin(const video_layout_render_info_t *info) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } -static void gl2_video_layout_image(const video_layout_render_info_t *info, void *image_handle, void *alpha_handle) +static void gl2_video_layout_image( + const video_layout_render_info_t *info, + void *image_handle, void *alpha_handle) { /* TODO alpha_handle */ int i; @@ -2690,7 +2694,7 @@ static void gl2_video_layout_image(const video_layout_render_info_t *info, void coord[7] = 1.f - (b.y + b.h); i = 0; - while(i < 16) + while (i < 16) { color[i++] = info->color.r; color[i++] = info->color.g; @@ -2698,10 +2702,10 @@ static void gl2_video_layout_image(const video_layout_render_info_t *info, void color[i++] = info->color.a; } - gl->coords.vertex = coord; + gl->coords.vertex = coord; gl->coords.tex_coord = tex_coords; - gl->coords.color = color; - gl->coords.vertices = 4; + gl->coords.color = color; + gl->coords.vertices = 4; gl->shader->set_coords(gl->shader_data, &gl->coords); gl->shader->set_mvp(gl->shader_data, &gl->mvp_no_rot); @@ -2825,7 +2829,6 @@ static bool gl2_frame(void *data, const void *frame, bool runloop_is_paused = video_info->runloop_is_paused; bool hard_sync = video_info->hard_sync; unsigned hard_sync_frames = video_info->hard_sync_frames; - void *context_data = video_info->context_data; struct font_params *osd_params = (struct font_params*) &video_info->osd_stat_params; const char *stat_text = video_info->stat_text; @@ -2861,7 +2864,8 @@ static bool gl2_frame(void *data, const void *frame, if (gl->should_resize) { - video_info->cb_set_resize(context_data, + if (gl->ctx_driver->set_resize) + gl->ctx_driver->set_resize(gl->ctx_data, width, height); gl->should_resize = false; @@ -3068,7 +3072,7 @@ static bool gl2_frame(void *data, const void *frame, } if (gl->ctx_driver->update_window_title) - gl->ctx_driver->update_window_title(context_data); + gl->ctx_driver->update_window_title(gl->ctx_data); /* Reset state which could easily mess up libretro core. */ if (gl->hw_render_fbo_init) @@ -3103,12 +3107,13 @@ static bool gl2_frame(void *data, const void *frame, && !runloop_is_paused) { if (gl->ctx_driver->swap_buffers) - gl->ctx_driver->swap_buffers(context_data); + gl->ctx_driver->swap_buffers(gl->ctx_data); glClear(GL_COLOR_BUFFER_BIT); } #endif - gl->ctx_driver->swap_buffers(context_data); + if (gl->ctx_driver->swap_buffers) + gl->ctx_driver->swap_buffers(gl->ctx_data); /* check if we are fast forwarding or in menu, if we are ignore hard sync */ if ( gl->have_sync @@ -4080,14 +4085,16 @@ static bool gl2_set_shader(void *data, glBindTexture(GL_TEXTURE_2D, gl->texture[gl->tex_index]); } - init_data.shader_type = fallback; - init_data.shader = NULL; - init_data.data = gl; - init_data.path = path; + init_data.shader_type = fallback; + init_data.path = path; + init_data.shader = NULL; + init_data.data = gl; + init_data.shader_data = NULL; + init_data.gl.core_context_enabled = false; if (!gl_shader_driver_init(&init_data)) { - init_data.path = NULL; + init_data.path = NULL; gl_shader_driver_init(&init_data); diff --git a/gfx/drivers/gl1.c b/gfx/drivers/gl1.c index a91e22d2d4..06c4ec9bdb 100644 --- a/gfx/drivers/gl1.c +++ b/gfx/drivers/gl1.c @@ -708,9 +708,6 @@ static bool gl1_gfx_frame(void *data, const void *frame, video_info->xmb_shadows_enable = false; video_info->menu_shader_pipeline = 0; - if (!frame || !frame_width || !frame_height) - return true; - if (gl1->should_resize) { gfx_ctx_mode_t mode; @@ -720,8 +717,9 @@ static bool gl1_gfx_frame(void *data, const void *frame, mode.width = width; mode.height = height; - video_info->cb_set_resize(video_info->context_data, - mode.width, mode.height); + if (gl1->ctx_driver->set_resize) + gl1->ctx_driver->set_resize(gl1->ctx_data, + mode.width, mode.height); gl1_gfx_set_viewport(gl1, video_width, video_height, false, true); @@ -756,7 +754,7 @@ static bool gl1_gfx_frame(void *data, const void *frame, pot_width = get_pot(width); pot_height = get_pot(height); - if ( frame == RETRO_HW_FRAME_BUFFER_VALID || ( + if ( !frame || frame == RETRO_HW_FRAME_BUFFER_VALID || ( frame_width == 4 && frame_height == 4 && (frame_width < width && frame_height < height)) @@ -791,9 +789,6 @@ static bool gl1_gfx_frame(void *data, const void *frame, if (draw) { - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -880,7 +875,7 @@ static bool gl1_gfx_frame(void *data, const void *frame, if (gl1->ctx_driver->update_window_title) gl1->ctx_driver->update_window_title( - video_info->context_data); + gl1->ctx_data); /* Screenshots. */ if (gl1->readback_buffer_screenshot) @@ -898,12 +893,12 @@ static bool gl1_gfx_frame(void *data, const void *frame, && !video_info->runloop_is_slowmotion && !video_info->runloop_is_paused) { - gl1->ctx_driver->swap_buffers(video_info->context_data); + gl1->ctx_driver->swap_buffers(gl1->ctx_data); glClear(GL_COLOR_BUFFER_BIT); } #endif - gl1->ctx_driver->swap_buffers(video_info->context_data); + gl1->ctx_driver->swap_buffers(gl1->ctx_data); /* check if we are fast forwarding or in menu, if we are ignore hard sync */ if (video_info->hard_sync @@ -913,6 +908,9 @@ static bool gl1_gfx_frame(void *data, const void *frame, glClear(GL_COLOR_BUFFER_BIT); glFinish(); } + + glClearColor(0.0f, 0.0f, 0.0f, 1.0f); + glClear(GL_COLOR_BUFFER_BIT); gl1_context_bind_hw_render(gl1, true); diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index 3ba5e36539..e288472aa2 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -33,7 +33,9 @@ #include "../../configuration.h" #include "../../dynamic.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #include "../../retroarch.h" #include "../../verbosity.h" @@ -1845,7 +1847,6 @@ static bool gl_core_frame(void *data, const void *frame, bool statistics_show = video_info->statistics_show; bool msg_bgcolor_enable = video_info->msg_bgcolor_enable; bool black_frame_insertion = video_info->black_frame_insertion; - void *context_data = video_info->context_data; unsigned hard_sync_frames = video_info->hard_sync_frames; bool runloop_is_paused = video_info->runloop_is_paused; bool runloop_is_slowmotion = video_info->runloop_is_slowmotion; @@ -1875,7 +1876,9 @@ static bool gl_core_frame(void *data, const void *frame, if (gl->should_resize) { - video_info->cb_set_resize(context_data, width, height); + if (gl->ctx_driver->set_resize) + gl->ctx_driver->set_resize(gl->ctx_data, + width, height); gl->should_resize = false; } @@ -1907,7 +1910,11 @@ static bool gl_core_frame(void *data, const void *frame, texture.padded_height = streamed->height; } gl_core_filter_chain_set_frame_count(gl->filter_chain, frame_count); +#ifdef HAVE_REWIND gl_core_filter_chain_set_frame_direction(gl->filter_chain, state_manager_frame_is_reversed() ? -1 : 1); +#else + gl_core_filter_chain_set_frame_direction(gl->filter_chain, 1); +#endif gl_core_filter_chain_set_input_texture(gl->filter_chain, &texture); gl_core_filter_chain_build_offscreen_passes(gl->filter_chain, &gl->filter_chain_vp); @@ -1953,7 +1960,7 @@ static bool gl_core_frame(void *data, const void *frame, } if (gl->ctx_driver->update_window_title) - gl->ctx_driver->update_window_title(context_data); + gl->ctx_driver->update_window_title(gl->ctx_data); if (gl->readback_buffer_screenshot) { @@ -1977,11 +1984,11 @@ static bool gl_core_frame(void *data, const void *frame, && !runloop_is_slowmotion && !runloop_is_paused) { - gl->ctx_driver->swap_buffers(context_data); + gl->ctx_driver->swap_buffers(gl->ctx_data); glClear(GL_COLOR_BUFFER_BIT); } - gl->ctx_driver->swap_buffers(context_data); + gl->ctx_driver->swap_buffers(gl->ctx_data); if (video_info->hard_sync && !input_driver_nonblock_state && diff --git a/gfx/drivers/gx2_gfx.c b/gfx/drivers/gx2_gfx.c index 0ce56bc6a1..136a213d4f 100644 --- a/gfx/drivers/gx2_gfx.c +++ b/gfx/drivers/gx2_gfx.c @@ -25,7 +25,10 @@ #include "../../configuration.h" #include "../../verbosity.h" #include "../../retroarch.h" + +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #ifdef HAVE_CONFIG_H #include "../../config.h" @@ -1142,7 +1145,11 @@ static bool wiiu_gfx_frame(void *data, const void *frame, if (wiiu->shader_preset) { unsigned i; +#ifdef HAVE_REWIND int32_t frame_direction = state_manager_frame_is_reversed() ? -1 : 1; +#else + int32_t frame_direction = 1; +#endif for (i = 0; i < wiiu->shader_preset->passes; i++) { diff --git a/gfx/drivers/network_gfx.c b/gfx/drivers/network_gfx.c index 7b6feb6c1c..905f398f8a 100644 --- a/gfx/drivers/network_gfx.c +++ b/gfx/drivers/network_gfx.c @@ -64,17 +64,32 @@ static bool network_rgb32 = false; static bool network_menu_rgb32 = false; static unsigned *network_video_temp_buf = NULL; +static void gfx_ctx_network_input_driver( + const char *joypad_driver, + input_driver_t **input, void **input_data) +{ +#ifdef HAVE_UDEV + *input_data = input_udev.init(joypad_driver); + + if (*input_data) + { + *input = &input_udev; + return; + } +#endif + *input = NULL; + *input_data = NULL; +} + static void *network_gfx_init(const video_info_t *video, input_driver_t **input, void **input_data) { int fd; - gfx_ctx_input_t inp; - void *ctx_data = NULL; - const gfx_ctx_driver_t *ctx_driver = NULL; struct addrinfo *addr = NULL, *next_addr = NULL; settings_t *settings = config_get_ptr(); network_video_t *network = (network_video_t*)calloc(1, sizeof(*network)); bool video_font_enable = settings->bools.video_font_enable; + const char *joypad_driver = settings->arrays.joypad_driver; *input = NULL; *input_data = NULL; @@ -87,25 +102,8 @@ static void *network_gfx_init(const video_info_t *video, else network_video_pitch = video->width * 2; - ctx_driver = video_context_driver_init_first(network, - "network", - GFX_CTX_NETWORK_VIDEO_API, 1, 0, false, &ctx_data); - - if (!ctx_driver) - goto error; - - if (ctx_data) - network->ctx_data = ctx_data; - - network->ctx_driver = ctx_driver; - video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); - - RARCH_LOG("[network]: Found network video context: %s\n", ctx_driver->ident); - - inp.input = input; - inp.input_data = input_data; - - video_context_driver_input_driver(&inp); + gfx_ctx_network_input_driver(joypad_driver, + input, input_data); if (font_enable) font_driver_init_osd(network, @@ -160,7 +158,6 @@ try_connect: return network; error: - video_context_driver_destroy(); if (network) free(network); return NULL; @@ -170,7 +167,6 @@ static bool network_gfx_frame(void *data, const void *frame, unsigned frame_width, unsigned frame_height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { - gfx_ctx_mode_t mode; const void *frame_to_copy = frame; unsigned width = 0; unsigned height = 0; @@ -339,59 +335,36 @@ static void network_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) static bool network_gfx_alive(void *data) { - gfx_ctx_size_t size_data; - unsigned temp_width = 0; - unsigned temp_height = 0; - bool quit = false; - bool resize = false; - network_video_t *network = (network_video_t*)data; + unsigned temp_width = 0; + unsigned temp_height = 0; + bool quit = false; + bool resize = false; + network_video_t *network = (network_video_t*)data; - /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); - network->ctx_driver->check_window(network->ctx_data, - &quit, &resize, &temp_width, &temp_height); - if (temp_width != 0 && temp_height != 0) video_driver_set_size(temp_width, temp_height); return true; } -static bool network_gfx_focus(void *data) -{ - (void)data; - return true; -} - -static bool network_gfx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static bool network_gfx_has_windowed(void *data) -{ - (void)data; - return true; -} +static bool network_gfx_focus(void *data) { return true; } +static bool network_gfx_suppress_screensaver(void *data, bool enable) { return false; } +static bool network_gfx_has_windowed(void *data) { return true; } static void network_gfx_free(void *data) { network_video_t *network = (network_video_t*)data; if (network_menu_frame) - { free(network_menu_frame); - network_menu_frame = NULL; - } if (network_video_temp_buf) - { free(network_video_temp_buf); - network_video_temp_buf = NULL; - } + + network_menu_frame = NULL; + network_video_temp_buf = NULL; font_driver_free_osd(); @@ -403,21 +376,9 @@ static void network_gfx_free(void *data) } static bool network_gfx_set_shader(void *data, - enum rarch_shader_type type, const char *path) -{ - (void)data; - (void)type; - (void)path; - - return false; -} - + enum rarch_shader_type type, const char *path) { return false; } static void network_gfx_set_rotation(void *data, - unsigned rotation) -{ - (void)data; - (void)rotation; -} + unsigned rotation) { } static void network_set_texture_frame(void *data, const void *frame, bool rgb32, unsigned width, unsigned height, @@ -434,7 +395,10 @@ static void network_set_texture_frame(void *data, network_menu_frame = NULL; } - if (!network_menu_frame || network_menu_width != width || network_menu_height != height || network_menu_pitch != pitch) + if ( !network_menu_frame || + network_menu_width != width || + network_menu_height != height || + network_menu_pitch != pitch) if (pitch && height) network_menu_frame = (unsigned char*)malloc(pitch * height); @@ -449,35 +413,12 @@ static void network_set_texture_frame(void *data, } static void network_get_video_output_size(void *data, - unsigned *width, unsigned *height) -{ - gfx_ctx_size_t size_data; - size_data.width = width; - size_data.height = height; - video_context_driver_get_video_output_size(&size_data); -} - -static void network_get_video_output_prev(void *data) -{ - video_context_driver_get_video_output_prev(); -} - -static void network_get_video_output_next(void *data) -{ - video_context_driver_get_video_output_next(); -} + unsigned *width, unsigned *height) { } +static void network_get_video_output_prev(void *data) { } +static void network_get_video_output_next(void *data) { } static void network_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - gfx_ctx_mode_t mode; - - mode.width = width; - mode.height = height; - mode.fullscreen = fullscreen; - - video_context_driver_set_video_mode(&mode); -} + bool fullscreen) { } static const video_poke_interface_t network_poke_interface = { NULL, diff --git a/gfx/drivers/oga_gfx.c b/gfx/drivers/oga_gfx.c index 256817d8af..44955adc52 100644 --- a/gfx/drivers/oga_gfx.c +++ b/gfx/drivers/oga_gfx.c @@ -41,7 +41,6 @@ #include "../../retroarch.h" #include -#include #define likely(x) __builtin_expect(!!(x), 1) #define unlikely(x) __builtin_expect(!!(x), 0) @@ -133,6 +132,9 @@ static void *oga_gfx_init(const video_info_t *video, vid = (oga_video_t*)calloc(1, sizeof(*vid)); vid->menu_frame = NULL; + vid->menu_width = 0; + vid->menu_height = 0; + vid->menu_pitch = 0; vid->display = go2_display_create(); vid->presenter = go2_presenter_create(vid->display, DRM_FORMAT_RGB565, 0xff000000, false); vid->menu_surface = go2_surface_create(vid->display, NATIVE_WIDTH, NATIVE_HEIGHT, DRM_FORMAT_XRGB8888); @@ -188,7 +190,7 @@ static void render_msg(oga_video_t* vid, { const struct font_atlas* atlas = vid->font_driver->get_atlas(vid->font); int msg_width = get_message_width(vid, msg); - int dest_x = MAX(0, width - get_message_width(vid, msg)); + int dest_x = MAX(0, width - msg_width); int dest_stride = go2_surface_stride_get(surface); const char *c = msg; @@ -197,7 +199,7 @@ static void render_msg(oga_video_t* vid, const struct font_glyph* g = vid->font_driver->get_glyph(vid->font, *c); if (!g) continue; - if (dest_x + g->advance_x >= width) + if (dest_x >= width) break; const uint8_t* source = atlas->buffer + g->atlas_offset_y * atlas->width + g->atlas_offset_x; @@ -249,9 +251,20 @@ static bool oga_gfx_frame(void *data, const void *frame, unsigned width, go2_surface_format_get(dst_surface)) / 8; bool menu_is_alive = video_info->menu_is_alive; + if (unlikely(!frame || width == 0 || height == 0)) + return true; + + if (unlikely(video_info->input_driver_nonblock_state) && !vid->threaded) + { + if (frame_count % 4 != 0) + return true; + } + #ifdef HAVE_MENU if (unlikely(menu_is_alive)) { + if (unlikely(vid->menu_width == 0)) + return true; menu_driver_frame(menu_is_alive, video_info); dst_surface = vid->menu_surface; src = (uint8_t*)vid->menu_frame; @@ -262,15 +275,6 @@ static bool oga_gfx_frame(void *data, const void *frame, unsigned width, } #endif - if (unlikely(!frame || width == 0 || height == 0)) - return true; - - if (unlikely(video_info->input_driver_nonblock_state) && !vid->threaded) - { - if (frame_count % 4 != 0) - return true; - } - /* copy buffer to surface */ dst = (uint8_t*)go2_surface_map(dst_surface); yy = height; diff --git a/gfx/drivers/ps2_gfx.c b/gfx/drivers/ps2_gfx.c index 6b7a977b2f..9ac2d02476 100644 --- a/gfx/drivers/ps2_gfx.c +++ b/gfx/drivers/ps2_gfx.c @@ -165,7 +165,6 @@ static void refreshScreen(ps2_video_t *ps2) gsKit_sync_flip(ps2->gsGlobal); gsKit_queue_exec(ps2->gsGlobal); gsKit_TexManager_nextFrame(ps2->gsGlobal); - } static void *ps2_gfx_init(const video_info_t *video, diff --git a/gfx/drivers/sixel_gfx.c b/gfx/drivers/sixel_gfx.c index 10c42b139d..7e9f27f160 100644 --- a/gfx/drivers/sixel_gfx.c +++ b/gfx/drivers/sixel_gfx.c @@ -189,13 +189,14 @@ static void scroll_on_demand(int pixelheight) static void *sixel_gfx_init(const video_info_t *video, input_driver_t **input, void **input_data) { - gfx_ctx_input_t inp; void *ctx_data = NULL; + const char *scale_str = NULL; settings_t *settings = config_get_ptr(); bool video_font_enable = settings->bools.video_font_enable; sixel_t *sixel = (sixel_t*)calloc(1, sizeof(*sixel)); - const gfx_ctx_driver_t *ctx_driver = NULL; - const char *scale_str = NULL; + + if (!sixel) + return NULL; *input = NULL; *input_data = NULL; @@ -219,25 +220,17 @@ static void *sixel_gfx_init(const video_info_t *video, sixel_video_scale = 1.0; } - ctx_driver = video_context_driver_init_first(sixel, - settings->arrays.video_context_driver, - GFX_CTX_SIXEL_API, 1, 0, false, &ctx_data); +#ifdef HAVE_UDEV + *input_data = input_udev.init(settings->arrays.input_driver); - if (!ctx_driver) - goto error; - - if (ctx_data) - sixel->ctx_data = ctx_data; - - sixel->ctx_driver = ctx_driver; - video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver); - - RARCH_LOG("[SIXEL]: Found SIXEL context: %s\n", ctx_driver->ident); - - inp.input = input; - inp.input_data = input_data; - - video_context_driver_input_driver(&inp); + if (*input_data) + *input = &input_udev; + else +#endif + { + *input = NULL; + *input_data = NULL; + } if (video_font_enable) font_driver_init_osd(sixel, @@ -246,15 +239,7 @@ static void *sixel_gfx_init(const video_info_t *video, video->is_threaded, FONT_DRIVER_RENDER_SIXEL); - RARCH_LOG("[SIXEL]: Init complete.\n"); - return sixel; - -error: - video_context_driver_destroy(); - if (sixel) - free(sixel); - return NULL; } static bool sixel_gfx_frame(void *data, const void *frame, @@ -435,7 +420,6 @@ static void sixel_gfx_set_nonblock_state(void *a, bool b, bool c, unsigned d) { static bool sixel_gfx_alive(void *data) { - gfx_ctx_size_t size_data; unsigned temp_width = 0; unsigned temp_height = 0; bool quit = false; @@ -445,9 +429,6 @@ static bool sixel_gfx_alive(void *data) /* Needed because some context drivers don't track their sizes */ video_driver_get_size(&temp_width, &temp_height); - sixel->ctx_driver->check_window(sixel->ctx_data, - &quit, &resize, &temp_width, &temp_height); - if (temp_width != 0 && temp_height != 0) video_driver_set_size(temp_width, temp_height); @@ -544,35 +525,11 @@ static void sixel_set_texture_frame(void *data, } static void sixel_get_video_output_size(void *data, - unsigned *width, unsigned *height) -{ - gfx_ctx_size_t size_data; - size_data.width = width; - size_data.height = height; - video_context_driver_get_video_output_size(&size_data); -} - -static void sixel_get_video_output_prev(void *data) -{ - video_context_driver_get_video_output_prev(); -} - -static void sixel_get_video_output_next(void *data) -{ - video_context_driver_get_video_output_next(); -} - + unsigned *width, unsigned *height) { } +static void sixel_get_video_output_prev(void *data) { } +static void sixel_get_video_output_next(void *data) { } static void sixel_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - gfx_ctx_mode_t mode; - - mode.width = width; - mode.height = height; - mode.fullscreen = fullscreen; - - video_context_driver_set_video_mode(&mode); -} + bool fullscreen) { } static const video_poke_interface_t sixel_poke_interface = { NULL, diff --git a/gfx/drivers/vg.c b/gfx/drivers/vg.c index dd3aa6906d..c4d0e4289b 100644 --- a/gfx/drivers/vg.c +++ b/gfx/drivers/vg.c @@ -456,9 +456,9 @@ static bool vg_frame(void *data, const void *frame, #endif if (vg->ctx_driver->update_window_title) - vg->ctx_driver->update_window_title(video_info->context_data); + vg->ctx_driver->update_window_title(vg->ctx_data); - vg->ctx_driver->swap_buffers(video_info->context_data); + vg->ctx_driver->swap_buffers(vg->ctx_data); return true; } diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index db07f7e311..73459197c4 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -46,7 +46,9 @@ #include "../../driver.h" #include "../../configuration.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #include "../../retroarch.h" #include "../../verbosity.h" @@ -759,8 +761,6 @@ static bool vulkan_init_default_filter_chain(vk_t *vk) { struct vulkan_filter_chain_create_info info; - memset(&info, 0, sizeof(info)); - if (!vk->context) return false; @@ -770,13 +770,14 @@ static bool vulkan_init_default_filter_chain(vk_t *vk) info.pipeline_cache = vk->pipelines.cache; info.queue = vk->context->queue; info.command_pool = vk->swapchain[vk->context->current_frame_index].cmd_pool; + info.num_passes = 0; + info.original_format = vk->tex_fmt; info.max_input_size.width = vk->tex_w; info.max_input_size.height = vk->tex_h; info.swapchain.viewport = vk->vk_vp; info.swapchain.format = vk->context->swapchain_format; info.swapchain.render_pass = vk->render_pass; info.swapchain.num_indices = vk->context->num_swapchain_images; - info.original_format = vk->tex_fmt; vk->filter_chain = vulkan_filter_chain_create_default( &info, @@ -796,21 +797,20 @@ static bool vulkan_init_filter_chain_preset(vk_t *vk, const char *shader_path) { struct vulkan_filter_chain_create_info info; - memset(&info, 0, sizeof(info)); - info.device = vk->context->device; info.gpu = vk->context->gpu; info.memory_properties = &vk->context->memory_properties; info.pipeline_cache = vk->pipelines.cache; info.queue = vk->context->queue; info.command_pool = vk->swapchain[vk->context->current_frame_index].cmd_pool; + info.num_passes = 0; + info.original_format = vk->tex_fmt; info.max_input_size.width = vk->tex_w; info.max_input_size.height = vk->tex_h; info.swapchain.viewport = vk->vk_vp; info.swapchain.format = vk->context->swapchain_format; info.swapchain.render_pass = vk->render_pass; info.swapchain.num_indices = vk->context->num_swapchain_images; - info.original_format = vk->tex_fmt; vk->filter_chain = vulkan_filter_chain_create_from_preset( &info, shader_path, @@ -1239,6 +1239,12 @@ static void *vulkan_init(const video_info_t *video, RARCH_LOG("[Vulkan]: Using resolution %ux%u\n", temp_width, temp_height); + if (!vk->ctx_driver || !vk->ctx_driver->get_context_data) + { + RARCH_ERR("[Vulkan]: Failed to get context data.\n"); + goto error; + } + *(void**)&vk->context = vk->ctx_driver->get_context_data(vk->ctx_data); vk->vsync = video->vsync; @@ -1580,17 +1586,23 @@ static void vulkan_readback(vk_t *vk) VkBufferImageCopy region; struct vk_texture *staging; struct video_viewport vp; - VkMemoryBarrier barrier = { VK_STRUCTURE_TYPE_MEMORY_BARRIER }; + VkMemoryBarrier barrier; vulkan_viewport_info(vk, &vp); - memset(®ion, 0, sizeof(region)); - region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - region.imageSubresource.layerCount = 1; - region.imageOffset.x = vp.x; - region.imageOffset.y = vp.y; - region.imageExtent.width = vp.width; - region.imageExtent.height = vp.height; - region.imageExtent.depth = 1; + + region.bufferOffset = 0; + region.bufferRowLength = 0; + region.bufferImageHeight = 0; + region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + region.imageSubresource.mipLevel = 0; + region.imageSubresource.baseArrayLayer = 0; + region.imageSubresource.layerCount = 1; + region.imageOffset.x = vp.x; + region.imageOffset.y = vp.y; + region.imageOffset.z = 0; + region.imageExtent.width = vp.width; + region.imageExtent.height = vp.height; + region.imageExtent.depth = 1; staging = &vk->readback.staging[vk->context->current_frame_index]; *staging = vulkan_create_texture(vk, @@ -1605,6 +1617,8 @@ static void vulkan_readback(vk_t *vk) 1, ®ion); /* Make the data visible to host. */ + barrier.sType = VK_STRUCTURE_TYPE_MEMORY_BARRIER; + barrier.pNext = NULL; barrier.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; barrier.dstAccessMask = VK_ACCESS_HOST_READ_BIT; vkCmdPipelineBarrier(vk->cmd, @@ -1633,7 +1647,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info, vkResetCommandBuffer(vk->cmd, 0); vkBeginCommandBuffer(vk->cmd, &begin_info); - vulkan_image_layout_transition(vk, vk->cmd, backbuffer->image, + VULKAN_IMAGE_LAYOUT_TRANSITION(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 0, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, @@ -1642,7 +1656,7 @@ static void vulkan_inject_black_frame(vk_t *vk, video_frame_info_t *video_info, vkCmdClearColorImage(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, &clear_color, 1, &range); - vulkan_image_layout_transition(vk, vk->cmd, backbuffer->image, + VULKAN_IMAGE_LAYOUT_TRANSITION(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, VK_ACCESS_TRANSFER_WRITE_BIT, VK_ACCESS_MEMORY_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, @@ -1692,15 +1706,16 @@ static bool vulkan_frame(void *data, const void *frame, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info) { + unsigned i; + VkSubmitInfo submit_info; VkClearValue clear_color; + VkRenderPassBeginInfo rp_info; + VkCommandBufferBeginInfo begin_info; VkSemaphore signal_semaphores[2]; vk_t *vk = (vk_t*)data; - struct vk_per_frame *chain = NULL; - struct vk_image *backbuffer = NULL; bool waits_for_semaphores = false; unsigned width = video_info->width; unsigned height = video_info->height; - void *context_data = video_info->context_data; bool statistics_show = video_info->statistics_show; const char *stat_text = video_info->stat_text; bool black_frame_insertion = video_info->black_frame_insertion; @@ -1713,22 +1728,17 @@ static bool vulkan_frame(void *data, const void *frame, &video_info->osd_stat_params; bool menu_is_alive = video_info->menu_is_alive; - VkCommandBufferBeginInfo begin_info = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; - VkRenderPassBeginInfo rp_info = { - VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO }; - VkSubmitInfo submit_info = { - VK_STRUCTURE_TYPE_SUBMIT_INFO }; unsigned frame_index = vk->context->current_frame_index; unsigned swapchain_index = vk->context->current_swapchain_index; /* Bookkeeping on start of frame. */ - chain = &vk->swapchain[frame_index]; - backbuffer = &vk->backbuffers[swapchain_index]; - vk->chain = chain; - vk->backbuffer = backbuffer; + struct vk_per_frame *chain = &vk->swapchain[frame_index]; + struct vk_image *backbuffer = &vk->backbuffers[swapchain_index]; + + vk->chain = chain; + vk->backbuffer = backbuffer; { struct vk_descriptor_manager *manager = &chain->descriptor_manager; @@ -1745,15 +1755,30 @@ static bool vulkan_frame(void *data, const void *frame, } /* Start recording the command buffer. */ - vk->cmd = chain->cmd; - begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + vk->cmd = chain->cmd; + + begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + begin_info.pNext = NULL; + begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + begin_info.pInheritanceInfo = NULL; + vkResetCommandBuffer(vk->cmd, 0); vkBeginCommandBuffer(vk->cmd, &begin_info); - memset(&vk->tracker, 0, sizeof(vk->tracker)); + vk->tracker.dirty = 0; + vk->tracker.scissor.offset.x = 0; + vk->tracker.scissor.offset.y = 0; + vk->tracker.scissor.extent.width = 0; + vk->tracker.scissor.extent.height = 0; + vk->tracker.use_scissor = false; + vk->tracker.pipeline = VK_NULL_HANDLE; + vk->tracker.view = VK_NULL_HANDLE; + vk->tracker.sampler = VK_NULL_HANDLE; + for (i = 0; i < 16; i++) + vk->tracker.mvp.data[i] = 0.0f; - waits_for_semaphores = vk->hw.enable && frame && + waits_for_semaphores = vk->hw.enable && frame && !vk->hw.num_cmd && vk->hw.valid_semaphore; if (waits_for_semaphores && @@ -1763,7 +1788,7 @@ static bool vulkan_frame(void *data, const void *frame, retro_assert(vk->hw.image); /* Acquire ownership of image from other queue family. */ - vulkan_transfer_image_ownership(vk->cmd, + VULKAN_TRANSFER_IMAGE_OWNERSHIP(vk->cmd, vk->hw.image->create_info.image, vk->hw.image->image_layout, /* Create a dependency chain from semaphore wait. */ @@ -1781,7 +1806,7 @@ static bool vulkan_frame(void *data, const void *frame, const uint8_t *src = (const uint8_t*)frame; unsigned bpp = vk->video.rgb32 ? 4 : 2; - if ( chain->texture.width != frame_width + if ( chain->texture.width != frame_width || chain->texture.height != frame_height) { chain->texture = vulkan_create_texture(vk, &chain->texture, @@ -1795,19 +1820,19 @@ static bool vulkan_frame(void *data, const void *frame, } if (chain->texture.type == VULKAN_TEXTURE_STAGING) - { chain->texture_optimal = vulkan_create_texture( vk, &chain->texture_optimal, - frame_width, frame_height, chain->texture_optimal.format, + frame_width, frame_height, + chain->texture_optimal.format, NULL, NULL, VULKAN_TEXTURE_DYNAMIC); - } } if (frame != chain->texture.mapped) { dst = (uint8_t*)chain->texture.mapped; - if (chain->texture.stride == pitch && pitch == frame_width * bpp) + if ( (chain->texture.stride == pitch ) + && pitch == frame_width * bpp) memcpy(dst, src, frame_width * frame_height * bpp); else for (y = 0; y < frame_height; y++, @@ -1821,16 +1846,28 @@ static bool vulkan_frame(void *data, const void *frame, vulkan_copy_staging_to_dynamic(vk, vk->cmd, &chain->texture_optimal, &chain->texture); } - else - vulkan_sync_texture_to_gpu(vk, &chain->texture); + else if (chain->texture.need_manual_cache_management + && chain->texture.memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_GPU(vk->context->device, + chain->texture.memory); vk->last_valid_index = frame_index; } /* Notify filter chain about the new sync index. */ - vulkan_filter_chain_notify_sync_index((vulkan_filter_chain_t*)vk->filter_chain, frame_index); - vulkan_filter_chain_set_frame_count((vulkan_filter_chain_t*)vk->filter_chain, frame_count); - vulkan_filter_chain_set_frame_direction((vulkan_filter_chain_t*)vk->filter_chain, state_manager_frame_is_reversed() ? -1 : 1); + vulkan_filter_chain_notify_sync_index( + (vulkan_filter_chain_t*)vk->filter_chain, frame_index); + vulkan_filter_chain_set_frame_count( + (vulkan_filter_chain_t*)vk->filter_chain, frame_count); +#ifdef HAVE_REWIND + vulkan_filter_chain_set_frame_direction( + (vulkan_filter_chain_t*)vk->filter_chain, + state_manager_frame_is_reversed() ? -1 : 1); +#else + vulkan_filter_chain_set_frame_direction( + (vulkan_filter_chain_t*)vk->filter_chain, + 1); +#endif /* Render offscreen filter chain passes. */ { @@ -1870,22 +1907,24 @@ static bool vulkan_frame(void *data, const void *frame, else { /* Fall back to the default, black texture. - * This can happen if we restart the video driver while in the menu. */ - input.image = vk->default_texture.image; - input.view = vk->default_texture.view; - input.layout = vk->default_texture.layout; - input.format = vk->default_texture.format; - input.width = vk->default_texture.width; - input.height = vk->default_texture.height; + * This can happen if we restart the video + * driver while in the menu. */ + input.image = vk->default_texture.image; + input.view = vk->default_texture.view; + input.layout = vk->default_texture.layout; + input.format = vk->default_texture.format; + input.width = vk->default_texture.width; + input.height = vk->default_texture.height; } - vk->hw.last_width = input.width; - vk->hw.last_height = input.height; + vk->hw.last_width = input.width; + vk->hw.last_height = input.height; } else { struct vk_texture *tex = &vk->swapchain[vk->last_valid_index].texture; - if (vk->swapchain[vk->last_valid_index].texture_optimal.memory != VK_NULL_HANDLE) + if (vk->swapchain[vk->last_valid_index].texture_optimal.memory + != VK_NULL_HANDLE) tex = &vk->swapchain[vk->last_valid_index].texture_optimal; else vulkan_transition_texture(vk, vk->cmd, tex); @@ -1898,7 +1937,8 @@ static bool vulkan_frame(void *data, const void *frame, input.format = VK_FORMAT_UNDEFINED; /* It's already configured. */ } - vulkan_filter_chain_set_input_texture((vulkan_filter_chain_t*)vk->filter_chain, &input); + vulkan_filter_chain_set_input_texture((vulkan_filter_chain_t*) + vk->filter_chain, &input); } vulkan_set_viewport(vk, width, height, false, true); @@ -1931,22 +1971,27 @@ static bool vulkan_frame(void *data, const void *frame, #endif /* Render to backbuffer. */ - if (backbuffer->image != VK_NULL_HANDLE && vk->context->has_acquired_swapchain) + if ( (backbuffer->image != VK_NULL_HANDLE) + && vk->context->has_acquired_swapchain) { + rp_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + rp_info.pNext = NULL; rp_info.renderPass = vk->render_pass; rp_info.framebuffer = backbuffer->framebuffer; + rp_info.renderArea.offset.x = 0; + rp_info.renderArea.offset.y = 0; rp_info.renderArea.extent.width = vk->context->swapchain_width; rp_info.renderArea.extent.height = vk->context->swapchain_height; rp_info.clearValueCount = 1; rp_info.pClearValues = &clear_color; - clear_color.color.float32[0] = 0.0f; - clear_color.color.float32[1] = 0.0f; - clear_color.color.float32[2] = 0.0f; - clear_color.color.float32[3] = 0.0f; + clear_color.color.float32[0] = 0.0f; + clear_color.color.float32[1] = 0.0f; + clear_color.color.float32[2] = 0.0f; + clear_color.color.float32[3] = 0.0f; /* Prepare backbuffer for rendering. */ - vulkan_image_layout_transition(vk, vk->cmd, backbuffer->image, + VULKAN_IMAGE_LAYOUT_TRANSITION(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, 0, VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT | VK_ACCESS_COLOR_ATTACHMENT_READ_BIT, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, @@ -2040,7 +2085,7 @@ static bool vulkan_frame(void *data, const void *frame, * * If we're reading back, perform the readback before presenting. */ - vulkan_image_layout_transition(vk, + VULKAN_IMAGE_LAYOUT_TRANSITION( vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, @@ -2052,7 +2097,7 @@ static bool vulkan_frame(void *data, const void *frame, vulkan_readback(vk); /* Prepare for presentation after transfers are complete. */ - vulkan_image_layout_transition(vk, vk->cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, @@ -2067,7 +2112,7 @@ static bool vulkan_frame(void *data, const void *frame, vk->context->has_acquired_swapchain) { /* Prepare backbuffer for presentation. */ - vulkan_image_layout_transition(vk, vk->cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION(vk->cmd, backbuffer->image, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, VK_IMAGE_LAYOUT_PRESENT_SRC_KHR, @@ -2084,7 +2129,7 @@ static bool vulkan_frame(void *data, const void *frame, retro_assert(vk->hw.image); /* Release ownership of image back to other queue family. */ - vulkan_transfer_image_ownership(vk->cmd, + VULKAN_TRANSFER_IMAGE_OWNERSHIP(vk->cmd, vk->hw.image->create_info.image, vk->hw.image->image_layout, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, @@ -2095,6 +2140,15 @@ static bool vulkan_frame(void *data, const void *frame, vkEndCommandBuffer(vk->cmd); /* Submit command buffers to GPU. */ + submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submit_info.pNext = NULL; + submit_info.waitSemaphoreCount = 0; + submit_info.pWaitSemaphores = NULL; + submit_info.pWaitDstStageMask = NULL; + submit_info.commandBufferCount = 1; + submit_info.pCommandBuffers = &vk->cmd; + submit_info.signalSemaphoreCount = 0; + submit_info.pSignalSemaphores = NULL; if (vk->hw.num_cmd) { @@ -2106,11 +2160,6 @@ static bool vulkan_frame(void *data, const void *frame, vk->hw.num_cmd = 0; } - else - { - submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &vk->cmd; - } if (waits_for_semaphores) { @@ -2119,7 +2168,7 @@ static bool vulkan_frame(void *data, const void *frame, submit_info.pWaitDstStageMask = vk->hw.wait_dst_stages; /* Consume the semaphores. */ - vk->hw.valid_semaphore = false; + vk->hw.valid_semaphore = false; /* We allocated space for this. */ if (vk->context->has_acquired_swapchain && @@ -2151,9 +2200,8 @@ static bool vulkan_frame(void *data, const void *frame, submit_info.pWaitDstStageMask = &wait_stage; } - submit_info.signalSemaphoreCount = 0; - - if (vk->context->swapchain_semaphores[swapchain_index] != VK_NULL_HANDLE && + if (vk->context->swapchain_semaphores[swapchain_index] + != VK_NULL_HANDLE && vk->context->has_acquired_swapchain) { signal_semaphores[submit_info.signalSemaphoreCount++] = vk->context->swapchain_semaphores[swapchain_index]; @@ -2176,12 +2224,12 @@ static bool vulkan_frame(void *data, const void *frame, slock_unlock(vk->context->queue_lock); #endif - vk->ctx_driver->swap_buffers(context_data); + vk->ctx_driver->swap_buffers(vk->ctx_data); if (!vk->context->swap_interval_emulation_lock) { if (vk->ctx_driver->update_window_title) - vk->ctx_driver->update_window_title(context_data); + vk->ctx_driver->update_window_title(vk->ctx_data); } /* Handle spurious swapchain invalidations as soon as we can, @@ -2192,10 +2240,12 @@ static bool vulkan_frame(void *data, const void *frame, mode.width = width; mode.height = height; - video_info->cb_set_resize(context_data, mode.width, mode.height); + if (vk->ctx_driver->set_resize) + vk->ctx_driver->set_resize(vk->ctx_data, mode.width, mode.height); vk->should_resize = false; } + vulkan_check_swapchain(vk); /* Disable BFI during fast forward, slow-motion, @@ -2207,9 +2257,10 @@ static bool vulkan_frame(void *data, const void *frame, && !input_driver_nonblock_state && !runloop_is_slowmotion && !runloop_is_paused) - vulkan_inject_black_frame(vk, video_info, context_data); + vulkan_inject_black_frame(vk, video_info, vk->ctx_data); - /* Vulkan doesn't directly support swap_interval > 1, so we fake it by duping out more frames. */ + /* Vulkan doesn't directly support swap_interval > 1, + * so we fake it by duping out more frames. */ if ( vk->context->swap_interval > 1 && !vk->context->swap_interval_emulation_lock) { @@ -2324,13 +2375,13 @@ static void vulkan_set_texture_frame(void *data, float alpha) { unsigned y, stride; - uint8_t *ptr = NULL; - uint8_t *dst = NULL; - const uint8_t *src = NULL; - vk_t *vk = (vk_t*)data; - unsigned index = 0; - struct vk_texture *texture = NULL; - struct vk_texture *texture_optimal = NULL; + uint8_t *ptr = NULL; + uint8_t *dst = NULL; + const uint8_t *src = NULL; + vk_t *vk = (vk_t*)data; + unsigned index = 0; + struct vk_texture *texture = NULL; + struct vk_texture *texture_optimal = NULL; const VkComponentMapping br_swizzle = { VK_COMPONENT_SWIZZLE_B, VK_COMPONENT_SWIZZLE_G, @@ -2376,8 +2427,9 @@ static void vulkan_set_texture_frame(void *data, NULL, rgb32 ? NULL : &br_swizzle, VULKAN_TEXTURE_DYNAMIC); } - else - vulkan_sync_texture_to_gpu(vk, texture); + else if (texture->need_manual_cache_management + && texture->memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_GPU(vk->context->device, texture->memory); vkUnmapMemory(vk->context->device, texture->memory); vk->menu.dirty[index] = true; @@ -2577,7 +2629,9 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer, bool is_idle) vkMapMemory(vk->context->device, staging->memory, staging->offset, staging->size, 0, (void**)&src); - vulkan_sync_texture_to_cpu(vk, staging); + if (staging->need_manual_cache_management + && staging->memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_CPU(vk->context->device, staging->memory); ctx->in_stride = staging->stride; ctx->out_stride = -(int)vk->vp.width * 3; @@ -2611,7 +2665,9 @@ static bool vulkan_read_viewport(void *data, uint8_t *buffer, bool is_idle) VK_MAP_PERSISTENT_TEXTURE(vk->context->device, staging); } - vulkan_sync_texture_to_cpu(vk, staging); + if (staging->need_manual_cache_management + && staging->memory != VK_NULL_HANDLE) + VULKAN_SYNC_TEXTURE_TO_CPU(vk->context->device, staging->memory); { unsigned x, y; @@ -2731,6 +2787,7 @@ static void vulkan_render_overlay(vk_t *vk, unsigned width, { struct vk_draw_triangles call; struct vk_buffer_range range; + if (!vulkan_buffer_chain_alloc(vk->context, &vk->chain->vbo, 4 * sizeof(struct vk_vertex), &range)) break; @@ -2738,15 +2795,14 @@ static void vulkan_render_overlay(vk_t *vk, unsigned width, memcpy(range.data, &vk->overlay.vertex[i * 4], 4 * sizeof(struct vk_vertex)); - memset(&call, 0, sizeof(call)); - call.pipeline = vk->display.pipelines[3]; /* Strip with blend */ + call.vertices = 4; + call.uniform_size = sizeof(vk->mvp); + call.uniform = &vk->mvp; + call.vbo = ⦥ call.texture = &vk->overlay.images[i]; + call.pipeline = vk->display.pipelines[3]; /* Strip with blend */ call.sampler = call.texture->mipmap ? vk->samplers.mipmap_linear : vk->samplers.linear; - call.uniform = &vk->mvp; - call.uniform_size = sizeof(vk->mvp); - call.vbo = ⦥ - call.vertices = 4; vulkan_draw_triangles(vk, &call); } diff --git a/gfx/drivers_context/android_ctx.c b/gfx/drivers_context/android_ctx.c index 7198b974e1..e4b4bdd57f 100644 --- a/gfx/drivers_context/android_ctx.c +++ b/gfx/drivers_context/android_ctx.c @@ -33,23 +33,12 @@ #include "../common/gl_common.h" #endif -#ifdef HAVE_VULKAN -#include "../common/vulkan_common.h" -#endif - #include "../../frontend/frontend_driver.h" #include "../../frontend/drivers/platform_unix.h" #include "../../verbosity.h" #include "../../configuration.h" -static enum gfx_ctx_api android_api = GFX_CTX_NONE; - -/* forward declaration */ -int system_property_get(const char *cmd, const char *args, char *value); - #ifdef HAVE_OPENGLES -static bool g_es3 = false; - #ifndef EGL_OPENGL_ES3_BIT_KHR #define EGL_OPENGL_ES3_BIT_KHR 0x0040 #endif @@ -60,44 +49,24 @@ typedef struct #ifdef HAVE_EGL egl_ctx_data_t egl; #endif -#ifdef HAVE_VULKAN - gfx_ctx_vulkan_data_t vk; - unsigned width; - unsigned height; - int swap_interval; -#endif } android_ctx_data_t; +/* TODO/FIXME - static globals */ +static enum gfx_ctx_api android_api = GFX_CTX_NONE; +#ifdef HAVE_OPENGLES +static bool g_es3 = false; +#endif + static void android_gfx_ctx_destroy(void *data) { android_ctx_data_t *and = (android_ctx_data_t*)data; -#ifdef HAVE_VULKAN - struct android_app *android_app = (struct android_app*)g_android; -#endif if (!and) return; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_destroy(&and->egl); + egl_destroy(&and->egl); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_context_destroy(&and->vk, android_app->window); - - if (and->vk.context.queue_lock) - slock_free(and->vk.context.queue_lock); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } free(data); } @@ -123,7 +92,8 @@ static void *android_gfx_ctx_init(void *video_driver) }; #endif struct android_app *android_app = (struct android_app*)g_android; - android_ctx_data_t *and = (android_ctx_data_t*)calloc(1, sizeof(*and)); + android_ctx_data_t *and = (android_ctx_data_t*) + calloc(1, sizeof(*and)); if (!android_app || !and) return false; @@ -133,56 +103,33 @@ static void *android_gfx_ctx_init(void *video_driver) attribs[1] = EGL_OPENGL_ES3_BIT_KHR; #endif - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - RARCH_LOG("Android EGL: GLES version = %d.\n", g_es3 ? 3 : 2); + RARCH_LOG("Android EGL: GLES version = %d.\n", g_es3 ? 3 : 2); - if (!egl_init_context(&and->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, - &major, &minor, &n, attribs, NULL)) - { - egl_report_error(); - goto error; - } - - if (!egl_get_native_visual_id(&and->egl, &format)) - goto error; -#endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (!vulkan_context_init(&and->vk, VULKAN_WSI_ANDROID)) - goto error; -#endif - break; - case GFX_CTX_NONE: - default: - break; + if (!egl_init_context(&and->egl, EGL_NONE, EGL_DEFAULT_DISPLAY, + &major, &minor, &n, attribs, NULL)) + { + egl_report_error(); + goto error; } + if (!egl_get_native_visual_id(&and->egl, &format)) + goto error; +#endif + slock_lock(android_app->mutex); if (!android_app->window) - goto unlock_error; - - switch (android_api) { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - ANativeWindow_setBuffersGeometry(android_app->window, 0, 0, format); - - break; - case GFX_CTX_NONE: - default: - break; + slock_unlock(android_app->mutex); + android_gfx_ctx_destroy(and); + return NULL; } + ANativeWindow_setBuffersGeometry(android_app->window, 0, 0, format); + slock_unlock(android_app->mutex); return and; -unlock_error: - slock_unlock(android_app->mutex); error: android_gfx_ctx_destroy(and); @@ -194,66 +141,23 @@ static void android_gfx_ctx_get_video_size(void *data, { android_ctx_data_t *and = (android_ctx_data_t*)data; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_get_video_size(&and->egl, width, height); + egl_get_video_size(&and->egl, width, height); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - *width = and->width; - *height = and->height; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } } static void android_gfx_ctx_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height) { -#ifdef HAVE_VULKAN - struct android_app *android_app = (struct android_app*)g_android; -#endif - unsigned new_width = 0; unsigned new_height = 0; android_ctx_data_t *and = (android_ctx_data_t*)data; - *quit = false; + *quit = false; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_get_video_size(&and->egl, &new_width, &new_height); + egl_get_video_size(&and->egl, &new_width, &new_height); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (android_app->content_rect.changed) - { - and->vk.need_new_swapchain = true; - android_app->content_rect.changed = false; - } - - /* Swapchains are recreated in set_resize as a - * central place, so use that to trigger swapchain reinit. */ - *resize = and->vk.need_new_swapchain; - new_width = android_app->content_rect.width; - new_height = android_app->content_rect.height; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } if (new_width != *width || new_height != *height) { @@ -267,54 +171,17 @@ static void android_gfx_ctx_check_window(void *data, bool *quit, } static bool android_gfx_ctx_set_resize(void *data, - unsigned width, unsigned height) -{ -#ifdef HAVE_VULKAN - android_ctx_data_t *and = (android_ctx_data_t*)data; - struct android_app *android_app = (struct android_app*)g_android; -#endif - (void)data; - (void)width; - (void)height; - - switch (android_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - and->width = android_app->content_rect.width; - and->height = android_app->content_rect.height; - RARCH_LOG("[Android]: Native window size: %u x %u.\n", and->width, and->height); - if (!vulkan_create_swapchain(&and->vk, and->width, and->height, and->swap_interval)) - { - RARCH_ERR("[Android]: Failed to update swapchain.\n"); - return false; - } - - if (and->vk.created_new_swapchain) - vulkan_acquire_next_image(&and->vk); - and->vk.context.invalid_swapchain = true; - and->vk.need_new_swapchain = false; -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } - - return false; -} + unsigned width, unsigned height) { return false; } static bool android_gfx_ctx_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { -#if defined(HAVE_OPENGLES) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGLES) struct android_app *android_app = (struct android_app*)g_android; - android_ctx_data_t *and = (android_ctx_data_t*)data; -#endif -#if defined(HAVE_OPENGLES) && defined(HAVE_EGL) - EGLint context_attributes[] = { + android_ctx_data_t *and = (android_ctx_data_t*)data; +#if defined(HAVE_EGL) + EGLint context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, g_es3 ? 3 : 2, #if 0 EGL_CONTEXT_FLAGS_KHR, debug ? EGL_CONTEXT_OPENGL_DEBUG_BIT_KHR : 0, @@ -322,10 +189,7 @@ static bool android_gfx_ctx_set_video_mode(void *data, EGL_NONE }; #endif - - (void)width; - (void)height; - (void)fullscreen; +#endif switch (android_api) { @@ -341,19 +205,6 @@ static bool android_gfx_ctx_set_video_mode(void *data, if (!egl_create_surface(&and->egl, android_app->window)) return false; -#endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - and->width = ANativeWindow_getWidth(android_app->window); - and->height = ANativeWindow_getHeight(android_app->window); - RARCH_LOG("[Android]: Native window size: %u x %u.\n", and->width, and->height); - if (!vulkan_surface_create(&and->vk, VULKAN_WSI_ANDROID, NULL, android_app->window, - and->width, and->height, and->swap_interval)) - { - RARCH_ERR("[Android]: Failed to create surface.\n"); - return false; - } #endif break; @@ -384,36 +235,20 @@ static bool android_gfx_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { unsigned version; - android_api = api; - switch (api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_OPENGLES - version = major * 100 + minor; - if (version > 300) - return false; - if (version < 300) - g_es3 = false; - else if (version == 300) - g_es3 = true; + version = major * 100 + minor; + if (version > 300) + return false; + if (version < 300) + g_es3 = false; + else if (version == 300) + g_es3 = true; - if (api == GFX_CTX_OPENGL_ES_API) - return true; + if (api == GFX_CTX_OPENGL_ES_API) + return true; #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - return true; -#else - break; -#endif - case GFX_CTX_NONE: - default: - break; - } return false; } @@ -432,39 +267,7 @@ static bool android_gfx_ctx_has_focus(void *data) return focused; } -static bool android_gfx_ctx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static void dpi_get_density(char *s, size_t len) -{ - static bool inited_once = false; - static bool inited2_once = false; - static char string[PROP_VALUE_MAX] = {0}; - static char string2[PROP_VALUE_MAX] = {0}; - if (!inited_once) - { - system_property_get("getprop", "ro.sf.lcd_density", string); - inited_once = true; - } - - if (!string_is_empty(string)) - { - strlcpy(s, string, len); - return; - } - - if (!inited2_once) - { - system_property_get("wm", "density", string2); - inited2_once = true; - } - - strlcpy(s, string2, len); -} +static bool android_gfx_ctx_suppress_screensaver(void *data, bool enable) { return false; } static bool android_gfx_ctx_get_metrics(void *data, enum display_metric_types type, float *value) @@ -474,7 +277,6 @@ static bool android_gfx_ctx_get_metrics(void *data, switch (type) { case DISPLAY_METRIC_MM_WIDTH: - return false; case DISPLAY_METRIC_MM_HEIGHT: return false; case DISPLAY_METRIC_DPI: @@ -483,7 +285,7 @@ static bool android_gfx_ctx_get_metrics(void *data, char density[PROP_VALUE_MAX]; density[0] = '\0'; - dpi_get_density(density, sizeof(density)); + android_dpi_get_density(density, sizeof(density)); if (string_is_empty(density)) goto dpi_fallback; dpi = atoi(density); @@ -513,130 +315,40 @@ static void android_gfx_ctx_swap_buffers(void *data) { android_ctx_data_t *and = (android_ctx_data_t*)data; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_swap_buffers(&and->egl); + egl_swap_buffers(&and->egl); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_present(&and->vk, and->vk.context.current_swapchain_index); - vulkan_acquire_next_image(&and->vk); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } } static void android_gfx_ctx_set_swap_interval(void *data, int swap_interval) { android_ctx_data_t *and = (android_ctx_data_t*)data; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_set_swap_interval(&and->egl, swap_interval); + egl_set_swap_interval(&and->egl, swap_interval); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (and->swap_interval != swap_interval) - { - RARCH_LOG("[Vulkan]: Setting swap interval: %u.\n", swap_interval); - and->swap_interval = swap_interval; - if (and->vk.swapchain) - and->vk.need_new_swapchain = true; - } -#endif - break; - case GFX_CTX_NONE: - default: - break; - } -} - -static gfx_ctx_proc_t android_gfx_ctx_get_proc_address(const char *symbol) -{ - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - break; -#endif - case GFX_CTX_NONE: - default: - break; - } - - return NULL; } static void android_gfx_ctx_bind_hw_render(void *data, bool enable) { android_ctx_data_t *and = (android_ctx_data_t*)data; - - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_bind_hw_render(&and->egl, enable); + egl_bind_hw_render(&and->egl, enable); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } -#ifdef HAVE_VULKAN -static void *android_gfx_ctx_get_context_data(void *data) -{ - android_ctx_data_t *and = (android_ctx_data_t*)data; - return &and->vk.context; -} -#endif - static uint32_t android_gfx_ctx_get_flags(void *data) { uint32_t flags = 0; - switch (android_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_GLSL - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); #endif - break; - case GFX_CTX_VULKAN_API: -#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } return flags; } -static void android_gfx_ctx_set_flags(void *data, uint32_t flags) -{ - (void)flags; -} +static void android_gfx_ctx_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_android = { android_gfx_ctx_init, @@ -660,7 +372,11 @@ const gfx_ctx_driver_t gfx_ctx_android = { false, /* has_windowed */ android_gfx_ctx_swap_buffers, android_gfx_ctx_input_driver, - android_gfx_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, @@ -668,10 +384,6 @@ const gfx_ctx_driver_t gfx_ctx_android = { android_gfx_ctx_get_flags, android_gfx_ctx_set_flags, android_gfx_ctx_bind_hw_render, -#ifdef HAVE_VULKAN - android_gfx_ctx_get_context_data, -#else NULL, -#endif NULL }; diff --git a/gfx/drivers_context/android_vk_ctx.c b/gfx/drivers_context/android_vk_ctx.c new file mode 100644 index 0000000000..91b66127e2 --- /dev/null +++ b/gfx/drivers_context/android_vk_ctx.c @@ -0,0 +1,331 @@ +/* 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 . + */ +#include + +#include + +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../common/vulkan_common.h" + +#include "../../frontend/frontend_driver.h" +#include "../../frontend/drivers/platform_unix.h" +#include "../../verbosity.h" +#include "../../configuration.h" + +typedef struct +{ + gfx_ctx_vulkan_data_t vk; + unsigned width; + unsigned height; + int swap_interval; +} android_ctx_data_vk_t; + +static void android_gfx_ctx_vk_destroy(void *data) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + struct android_app *android_app = (struct android_app*)g_android; + + if (!and) + return; + + vulkan_context_destroy(&and->vk, android_app->window); + + if (and->vk.context.queue_lock) + slock_free(and->vk.context.queue_lock); + + free(data); +} + +static void *android_gfx_ctx_vk_init(void *video_driver) +{ + struct android_app *android_app = (struct android_app*)g_android; + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)calloc(1, sizeof(*and)); + + if (!android_app || !and) + return false; + + if (!vulkan_context_init(&and->vk, VULKAN_WSI_ANDROID)) + goto error; + + slock_lock(android_app->mutex); + if (!android_app->window) + { + slock_unlock(android_app->mutex); + android_gfx_ctx_vk_destroy(and); + return NULL; + } + + slock_unlock(android_app->mutex); + return and; + +error: + android_gfx_ctx_vk_destroy(and); + + return NULL; +} + +static void android_gfx_ctx_vk_get_video_size(void *data, + unsigned *width, unsigned *height) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + + *width = and->width; + *height = and->height; +} + +static void android_gfx_ctx_vk_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height) +{ + struct android_app *android_app = (struct android_app*)g_android; + + unsigned new_width = 0; + unsigned new_height = 0; + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + + *quit = false; + + if (android_app->content_rect.changed) + { + and->vk.need_new_swapchain = true; + android_app->content_rect.changed = false; + } + + /* Swapchains are recreated in set_resize as a + * central place, so use that to trigger swapchain reinit. */ + *resize = and->vk.need_new_swapchain; + new_width = android_app->content_rect.width; + new_height = android_app->content_rect.height; + + if (new_width != *width || new_height != *height) + { + RARCH_LOG("[Android]: Resizing (%u x %u) -> (%u x %u).\n", + *width, *height, new_width, new_height); + + *width = new_width; + *height = new_height; + *resize = true; + } +} + +static bool android_gfx_ctx_vk_set_resize(void *data, + unsigned width, unsigned height) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + struct android_app *android_app = (struct android_app*)g_android; + + and->width = android_app->content_rect.width; + and->height = android_app->content_rect.height; + RARCH_LOG("[Android]: Native window size: %u x %u.\n", and->width, and->height); + if (!vulkan_create_swapchain(&and->vk, and->width, and->height, and->swap_interval)) + { + RARCH_ERR("[Android]: Failed to update swapchain.\n"); + return false; + } + + if (and->vk.created_new_swapchain) + vulkan_acquire_next_image(&and->vk); + and->vk.context.invalid_swapchain = true; + and->vk.need_new_swapchain = false; + + return true; +} + +static bool android_gfx_ctx_vk_set_video_mode(void *data, + unsigned width, unsigned height, + bool fullscreen) +{ + struct android_app *android_app = (struct android_app*)g_android; + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + + and->width = ANativeWindow_getWidth(android_app->window); + and->height = ANativeWindow_getHeight(android_app->window); + RARCH_LOG("[Android]: Native window size: %u x %u.\n", + and->width, and->height); + if (!vulkan_surface_create(&and->vk, VULKAN_WSI_ANDROID, + NULL, android_app->window, + and->width, and->height, and->swap_interval)) + { + RARCH_ERR("[Android]: Failed to create surface.\n"); + return false; + } + + return true; +} + +static void android_gfx_ctx_vk_input_driver(void *data, + const char *joypad_name, + input_driver_t **input, void **input_data) +{ + void *androidinput = input_android.init(joypad_name); + + *input = androidinput ? &input_android : NULL; + *input_data = androidinput; +} + +static enum gfx_ctx_api android_gfx_ctx_vk_get_api(void *data) +{ + return GFX_CTX_VULKAN_API; +} + +static bool android_gfx_ctx_vk_bind_api(void *data, + enum gfx_ctx_api api, unsigned major, unsigned minor) +{ + if (api == GFX_CTX_VULKAN_API) + return true; + return false; +} + +static bool android_gfx_ctx_vk_has_focus(void *data) +{ + bool focused = false; + struct android_app *android_app = (struct android_app*)g_android; + if (!android_app) + return true; + + slock_lock(android_app->mutex); + focused = !android_app->unfocused; + slock_unlock(android_app->mutex); + + return focused; +} + +static bool android_gfx_ctx_vk_suppress_screensaver(void *data, bool enable) { return false; } + +static bool android_gfx_ctx_vk_get_metrics(void *data, + enum display_metric_types type, float *value) +{ + static int dpi = -1; + + switch (type) + { + case DISPLAY_METRIC_MM_WIDTH: + case DISPLAY_METRIC_MM_HEIGHT: + return false; + case DISPLAY_METRIC_DPI: + if (dpi == -1) + { + char density[PROP_VALUE_MAX]; + density[0] = '\0'; + + android_dpi_get_density(density, sizeof(density)); + if (string_is_empty(density)) + goto dpi_fallback; + dpi = atoi(density); + + if (dpi <= 0) + goto dpi_fallback; + } + *value = (float)dpi; + break; + case DISPLAY_METRIC_NONE: + default: + *value = 0; + return false; + } + + return true; + +dpi_fallback: + /* add a fallback in case the device doesn't report DPI. + * Hopefully fixes issues with the moto G2. */ + dpi = 90; + *value = (float)dpi; + return true; +} + +static void android_gfx_ctx_vk_swap_buffers(void *data) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + + vulkan_present(&and->vk, and->vk.context.current_swapchain_index); + vulkan_acquire_next_image(&and->vk); +} + +static void android_gfx_ctx_vk_set_swap_interval(void *data, int swap_interval) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + + if (and->swap_interval != swap_interval) + { + RARCH_LOG("[Vulkan]: Setting swap interval: %u.\n", swap_interval); + and->swap_interval = swap_interval; + if (and->vk.swapchain) + and->vk.need_new_swapchain = true; + } +} + +static gfx_ctx_proc_t android_gfx_ctx_vk_get_proc_address(const char *symbol) { return NULL; } +static void android_gfx_ctx_vk_bind_hw_render(void *data, bool enable) { } + +static void *android_gfx_ctx_vk_get_context_data(void *data) +{ + android_ctx_data_vk_t *and = (android_ctx_data_vk_t*)data; + return &and->vk.context; +} + +static uint32_t android_gfx_ctx_vk_get_flags(void *data) +{ + uint32_t flags = 0; + +#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); +#endif + + return flags; +} + +static void android_gfx_ctx_vk_set_flags(void *data, uint32_t flags) { } + +const gfx_ctx_driver_t gfx_ctx_vk_android = { + android_gfx_ctx_vk_init, + android_gfx_ctx_vk_destroy, + android_gfx_ctx_vk_get_api, + android_gfx_ctx_vk_bind_api, + android_gfx_ctx_vk_set_swap_interval, + android_gfx_ctx_vk_set_video_mode, + android_gfx_ctx_vk_get_video_size, + NULL, /* get_refresh_rate */ + NULL, /* get_video_output_size */ + NULL, /* get_video_output_prev */ + NULL, /* get_video_output_next */ + android_gfx_ctx_vk_get_metrics, + NULL, + NULL, /* update_title */ + android_gfx_ctx_vk_check_window, + android_gfx_ctx_vk_set_resize, + android_gfx_ctx_vk_has_focus, + android_gfx_ctx_vk_suppress_screensaver, + false, /* has_windowed */ + android_gfx_ctx_vk_swap_buffers, + android_gfx_ctx_vk_input_driver, + android_gfx_ctx_vk_get_proc_address, + NULL, + NULL, + NULL, + "android_vk", + android_gfx_ctx_vk_get_flags, + android_gfx_ctx_vk_set_flags, + android_gfx_ctx_vk_bind_hw_render, + android_gfx_ctx_vk_get_context_data, + NULL +}; diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index a427031117..04eab3409f 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -56,8 +56,6 @@ extern CGLError CGLSetSurface(CGLContextObj gl, CGSConnectionID cid, CGSWindowID } #endif -static enum gfx_ctx_api cgl_api = GFX_CTX_NONE; - typedef struct gfx_ctx_cgl_data { CGLContextObj glCtx; @@ -106,15 +104,7 @@ static void gfx_ctx_cgl_swap_buffers(void *data) static bool gfx_ctx_cgl_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - (void)data; - (void)width; - (void)height; - (void)fullscreen; - - return true; -} + bool fullscreen) { return true; } static void gfx_ctx_cgl_destroy(void *data) { @@ -135,12 +125,7 @@ static void gfx_ctx_cgl_destroy(void *data) static void gfx_ctx_cgl_input_driver(void *data, const char *name, - input_driver_t **input, void **input_data) -{ - (void)data; - (void)input; - (void)input_data; -} + input_driver_t **input, void **input_data) { } static gfx_ctx_proc_t gfx_ctx_cgl_get_proc_address(const char *symbol_name) { @@ -161,53 +146,25 @@ static gfx_ctx_proc_t gfx_ctx_cgl_get_proc_address(const char *symbol_name) return ret; } -static bool gfx_ctx_cgl_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_cgl_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static enum gfx_ctx_api gfx_ctx_cgl_get_api(void *data) -{ - return cgl_api; -} +static bool gfx_ctx_cgl_has_focus(void *data) { return true; } +static bool gfx_ctx_cgl_suppress_screensaver(void *data, bool enable) { return false; } +static enum gfx_ctx_api gfx_ctx_cgl_get_api(void *data) { return GFX_CTX_OPENGL_API; } static bool gfx_ctx_cgl_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - (void)api; - (void)major; - (void)minor; - if (api == GFX_CTX_OPENGL_API) - { - cgl_api = api; return true; - } return false; } -static void gfx_ctx_cgl_show_mouse(void *data, bool state) -{ - (void)data; - (void)state; -} +static void gfx_ctx_cgl_show_mouse(void *data, bool state) { } static void gfx_ctx_cgl_bind_hw_render(void *data, bool enable) { gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)data; - (void)enable; - CGLSetCurrentContext(cgl->glCtx); /* TODO - needs to handle HW render context too */ @@ -342,10 +299,7 @@ static uint32_t gfx_ctx_cgl_get_flags(void *data) return flags; } -static void gfx_ctx_cgl_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_cgl_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_cgl = { gfx_ctx_cgl_init, diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index e1c8db1d78..ad65db7b44 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -66,15 +66,6 @@ #define EGL_PLATFORM_GBM_KHR 0x31D7 #endif -static enum gfx_ctx_api drm_api = GFX_CTX_NONE; - -static struct gbm_bo *g_bo = NULL; -static struct gbm_bo *g_next_bo = NULL; -static struct gbm_surface *g_gbm_surface = NULL; -static struct gbm_device *g_gbm_dev = NULL; - -static bool waiting_for_flip = false; - typedef struct gfx_ctx_drm_data { #ifdef HAVE_EGL @@ -86,6 +77,11 @@ typedef struct gfx_ctx_drm_data unsigned fb_height; bool core_hw_context_enable; + bool waiting_for_flip; + struct gbm_bo *bo; + struct gbm_bo *next_bo; + struct gbm_surface *gbm_surface; + struct gbm_device *gbm_dev; } gfx_ctx_drm_data_t; struct drm_fb @@ -94,6 +90,8 @@ struct drm_fb uint32_t fb_id; }; +static enum gfx_ctx_api drm_api = GFX_CTX_NONE; + static void drm_fb_destroy_callback(struct gbm_bo *bo, void *data) { struct drm_fb *fb = (struct drm_fb*)data; @@ -146,10 +144,6 @@ static void gfx_ctx_drm_swap_interval(void *data, int interval) static void gfx_ctx_drm_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height) { - (void)data; - (void)width; - (void)height; - *resize = false; *quit = (bool)frontend_driver_get_signal_handler_state(); } @@ -157,10 +151,6 @@ static void gfx_ctx_drm_check_window(void *data, bool *quit, static void drm_flip_handler(int fd, unsigned frame, unsigned sec, unsigned usec, void *data) { - (void)fd; - (void)sec; - (void)usec; - #if 0 static unsigned first_page_flip; static unsigned last_page_flip; @@ -182,47 +172,47 @@ static void drm_flip_handler(int fd, unsigned frame, *(bool*)data = false; } -static bool gfx_ctx_drm_wait_flip(bool block) +static bool gfx_ctx_drm_wait_flip(gfx_ctx_drm_data_t *drm, bool block) { int timeout = 0; - if (!waiting_for_flip) + if (!drm->waiting_for_flip) return false; if (block) timeout = -1; - while (waiting_for_flip) + while (drm->waiting_for_flip) { if (!drm_wait_flip(timeout)) break; } - if (waiting_for_flip) + if (drm->waiting_for_flip) return true; /* Page flip has taken place. */ /* This buffer is not on-screen anymore. Release it to GBM. */ - gbm_surface_release_buffer(g_gbm_surface, g_bo); + gbm_surface_release_buffer(drm->gbm_surface, drm->bo); /* This buffer is being shown now. */ - g_bo = g_next_bo; + drm->bo = drm->next_bo; return false; } -static bool gfx_ctx_drm_queue_flip(void) +static bool gfx_ctx_drm_queue_flip(gfx_ctx_drm_data_t *drm) { struct drm_fb *fb = NULL; - g_next_bo = gbm_surface_lock_front_buffer(g_gbm_surface); - fb = (struct drm_fb*)gbm_bo_get_user_data(g_next_bo); + drm->next_bo = gbm_surface_lock_front_buffer(drm->gbm_surface); + fb = (struct drm_fb*)gbm_bo_get_user_data(drm->next_bo); if (!fb) - fb = (struct drm_fb*)drm_fb_get_from_bo(g_next_bo); + fb = (struct drm_fb*)drm_fb_get_from_bo(drm->next_bo); if (drmModePageFlip(g_drm_fd, g_crtc_id, fb->fb_id, - DRM_MODE_PAGE_FLIP_EVENT, &waiting_for_flip) == 0) + DRM_MODE_PAGE_FLIP_EVENT, &drm->waiting_for_flip) == 0) return true; /* Failed to queue page flip. */ @@ -235,35 +225,26 @@ static void gfx_ctx_drm_swap_buffers(void *data) settings_t *settings = config_get_ptr(); unsigned max_swapchain_images = settings->uints.video_max_swapchain_images; - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_swap_buffers(&drm->egl); + egl_swap_buffers(&drm->egl); #endif - break; - default: - break; - } /* I guess we have to wait for flip to have taken * place before another flip can be queued up. * * If true, we are still waiting for a flip * (nonblocking mode, so just drop the frame). */ - if (gfx_ctx_drm_wait_flip(drm->interval)) + if (gfx_ctx_drm_wait_flip(drm, drm->interval)) return; - waiting_for_flip = gfx_ctx_drm_queue_flip(); + drm->waiting_for_flip = gfx_ctx_drm_queue_flip(drm); /* Triple-buffered page flips */ if (max_swapchain_images >= 3 && - gbm_surface_has_free_buffers(g_gbm_surface)) + gbm_surface_has_free_buffers(drm->gbm_surface)) return; - gfx_ctx_drm_wait_flip(true); + gfx_ctx_drm_wait_flip(drm, true); } static void gfx_ctx_drm_get_video_size(void *data, @@ -286,11 +267,11 @@ static void free_drm_resources(gfx_ctx_drm_data_t *drm) /* Restore original CRTC. */ drm_restore_crtc(); - if (g_gbm_surface) - gbm_surface_destroy(g_gbm_surface); + if (drm->gbm_surface) + gbm_surface_destroy(drm->gbm_surface); - if (g_gbm_dev) - gbm_device_destroy(g_gbm_dev); + if (drm->gbm_dev) + gbm_device_destroy(drm->gbm_dev); drm_free(); @@ -303,8 +284,8 @@ static void free_drm_resources(gfx_ctx_drm_data_t *drm) } } - g_gbm_surface = NULL; - g_gbm_dev = NULL; + drm->gbm_surface = NULL; + drm->gbm_dev = NULL; g_drm_fd = -1; } @@ -314,21 +295,11 @@ static void gfx_ctx_drm_destroy_resources(gfx_ctx_drm_data_t *drm) return; /* Make sure we acknowledge all page-flips. */ - gfx_ctx_drm_wait_flip(true); + gfx_ctx_drm_wait_flip(drm, true); - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_destroy(&drm->egl); + egl_destroy(&drm->egl); #endif - break; - case GFX_CTX_NONE: - default: - break; - } free_drm_resources(drm); @@ -339,8 +310,8 @@ static void gfx_ctx_drm_destroy_resources(gfx_ctx_drm_data_t *drm) drm->fb_width = 0; drm->fb_height = 0; - g_bo = NULL; - g_next_bo = NULL; + drm->bo = NULL; + drm->next_bo = NULL; } static void *gfx_ctx_drm_init(void *video_driver) @@ -407,9 +378,9 @@ nextgpu: drmSetMaster(g_drm_fd); - g_gbm_dev = gbm_create_device(fd); + drm->gbm_dev = gbm_create_device(fd); - if (!g_gbm_dev) + if (!drm->gbm_dev) { RARCH_WARN("[KMS]: Couldn't create GBM device.\n"); goto nextgpu; @@ -600,35 +571,35 @@ static bool gfx_ctx_drm_egl_set_video_mode(gfx_ctx_drm_data_t *drm) break; } +#ifdef HAVE_EGL + if (!egl_init_context(&drm->egl, EGL_PLATFORM_GBM_KHR, + (EGLNativeDisplayType)drm->gbm_dev, &major, + &minor, &n, attrib_ptr, gbm_choose_xrgb8888_cb)) + goto error; + + attr = gfx_ctx_drm_egl_fill_attribs(drm, egl_attribs); + egl_attribs_ptr = &egl_attribs[0]; + + if (!egl_create_context(&drm->egl, (attr != egl_attribs_ptr) + ? egl_attribs_ptr : NULL)) + goto error; + + if (!egl_create_surface(&drm->egl, (EGLNativeWindowType)drm->gbm_surface)) + return false; + switch (drm_api) { case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: -#ifdef HAVE_EGL - if (!egl_init_context(&drm->egl, EGL_PLATFORM_GBM_KHR, - (EGLNativeDisplayType)g_gbm_dev, &major, - &minor, &n, attrib_ptr, gbm_choose_xrgb8888_cb)) - goto error; - - attr = gfx_ctx_drm_egl_fill_attribs(drm, egl_attribs); - egl_attribs_ptr = &egl_attribs[0]; - - if (!egl_create_context(&drm->egl, (attr != egl_attribs_ptr) - ? egl_attribs_ptr : NULL)) - goto error; - - if (!egl_create_surface(&drm->egl, (EGLNativeWindowType)g_gbm_surface)) - return false; #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) glClear(GL_COLOR_BUFFER_BIT); -#endif #endif break; case GFX_CTX_NONE: default: break; } +#endif egl_swap_buffers(drm); @@ -707,40 +678,30 @@ static bool gfx_ctx_drm_set_video_mode(void *data, drm->fb_height = g_drm_mode->vdisplay; /* Create GBM surface. */ - g_gbm_surface = gbm_surface_create( - g_gbm_dev, + drm->gbm_surface = gbm_surface_create( + drm->gbm_dev, drm->fb_width, drm->fb_height, GBM_FORMAT_XRGB8888, GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); - if (!g_gbm_surface) + if (!drm->gbm_surface) { RARCH_ERR("[KMS/EGL]: Couldn't create GBM surface.\n"); goto error; } - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - if (!gfx_ctx_drm_egl_set_video_mode(drm)) - goto error; + if (!gfx_ctx_drm_egl_set_video_mode(drm)) + goto error; #endif - break; - case GFX_CTX_NONE: - default: - break; - } - g_bo = gbm_surface_lock_front_buffer(g_gbm_surface); + drm->bo = gbm_surface_lock_front_buffer(drm->gbm_surface); - fb = (struct drm_fb*)gbm_bo_get_user_data(g_bo); + fb = (struct drm_fb*)gbm_bo_get_user_data(drm->bo); if (!fb) - fb = drm_fb_get_from_bo(g_bo); + fb = drm_fb_get_from_bo(drm->bo); ret = drmModeSetCrtc(g_drm_fd, g_crtc_id, fb->fb_id, 0, 0, &g_connector_id, 1, g_drm_mode); @@ -810,28 +771,15 @@ static void gfx_ctx_drm_input_driver(void *data, *input_data = NULL; } -static bool gfx_ctx_drm_has_focus(void *data) -{ - return true; -} +static bool gfx_ctx_drm_has_focus(void *data) { return true; } -static bool gfx_ctx_drm_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool gfx_ctx_drm_suppress_screensaver(void *data, bool enable) { return false; } -static enum gfx_ctx_api gfx_ctx_drm_get_api(void *data) -{ - return drm_api; -} +static enum gfx_ctx_api gfx_ctx_drm_get_api(void *data) { return drm_api; } static bool gfx_ctx_drm_bind_api(void *video_driver, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)video_driver; - drm_api = api; #ifdef HAVE_EGL g_egl_major = major; @@ -874,41 +822,13 @@ static bool gfx_ctx_drm_bind_api(void *video_driver, return false; } -static gfx_ctx_proc_t gfx_ctx_drm_get_proc_address(const char *symbol) -{ - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif - case GFX_CTX_NONE: - default: - break; - } - - return NULL; -} - static void gfx_ctx_drm_bind_hw_render(void *data, bool enable) { gfx_ctx_drm_data_t *drm = (gfx_ctx_drm_data_t*)data; - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_bind_hw_render(&drm->egl, enable); + egl_bind_hw_render(&drm->egl, enable); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } static uint32_t gfx_ctx_drm_get_flags(void *data) @@ -962,7 +882,11 @@ const gfx_ctx_driver_t gfx_ctx_drm = { false, /* has_windowed */ gfx_ctx_drm_swap_buffers, gfx_ctx_drm_input_driver, - gfx_ctx_drm_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/drm_go2_ctx.c b/gfx/drivers_context/drm_go2_ctx.c index 40b060c69d..36d0c78644 100644 --- a/gfx/drivers_context/drm_go2_ctx.c +++ b/gfx/drivers_context/drm_go2_ctx.c @@ -68,8 +68,6 @@ #define EGL_PLATFORM_GBM_KHR 0x31D7 #endif -static enum gfx_ctx_api drm_api = GFX_CTX_NONE; - typedef struct gfx_ctx_go2_drm_data { #ifdef HAVE_EGL @@ -82,11 +80,16 @@ typedef struct gfx_ctx_go2_drm_data unsigned fb_height; unsigned ctx_w; unsigned ctx_h; + unsigned native_width; + unsigned native_height; bool core_hw_context_enable; } gfx_ctx_go2_drm_data_t; -static unsigned native_width = 480; -static unsigned native_height = 320; +/* TODO/FIXME - static global */ +static enum gfx_ctx_api drm_api = GFX_CTX_NONE; + +/* Function callback */ +void (*swap_buffers)(void*); static void gfx_ctx_go2_drm_input_driver(void *data, const char *joypad_name, @@ -107,24 +110,6 @@ static void gfx_ctx_go2_drm_input_driver(void *data, *input_data = NULL; } -static gfx_ctx_proc_t gfx_ctx_go2_drm_get_proc_address(const char *symbol) -{ - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif - case GFX_CTX_NONE: - default: - break; - } - - return NULL; -} - static void *gfx_ctx_go2_drm_init(void *video_driver) { gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*) @@ -133,8 +118,12 @@ static void *gfx_ctx_go2_drm_init(void *video_driver) if (!drm) return NULL; - drm->display = go2_display_create(); - drm->presenter = go2_presenter_create(drm->display, DRM_FORMAT_RGB565, 0xff000000, true); + drm->native_width = 480; + drm->native_height = 320; + + drm->display = go2_display_create(); + drm->presenter = go2_presenter_create(drm->display, + DRM_FORMAT_RGB565, 0xff000000, true); return drm; } @@ -157,10 +146,7 @@ static void gfx_ctx_go2_drm_destroy(void *data) drm->display = NULL; } -static enum gfx_ctx_api gfx_ctx_go2_drm_get_api(void *data) -{ - return drm_api; -} +static enum gfx_ctx_api gfx_ctx_go2_drm_get_api(void *data) { return drm_api; } static bool gfx_ctx_go2_drm_bind_api(void *video_driver, enum gfx_ctx_api api, unsigned major, unsigned minor) @@ -222,8 +208,10 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { - struct retro_system_av_info *av_info = NULL; - gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data; + settings_t *settings = config_get_ptr(); + struct retro_system_av_info *av_info = NULL; + gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data; + bool use_ctx_scaling = settings->bools.video_ctx_scaling; if (!drm) return false; @@ -232,36 +220,34 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data, frontend_driver_install_signal_handler(); - settings_t *settings = config_get_ptr(); - bool use_ctx_scaling = settings->bools.video_ctx_scaling; - if (use_ctx_scaling && !menu_driver_is_alive()) { - drm->fb_width = av_info->geometry.base_width; + drm->fb_width = av_info->geometry.base_width; drm->fb_height = av_info->geometry.base_height; } else { - drm->fb_width = native_width; - drm->fb_height = native_height; + drm->fb_width = drm->native_width; + drm->fb_height = drm->native_height; } if (!drm->context) { go2_context_attributes_t attr; - attr.major = 3; - attr.minor = 2; - attr.red_bits = 8; - attr.green_bits = 8; - attr.blue_bits = 8; - attr.alpha_bits = 8; - attr.depth_bits = 0; + attr.major = 3; + attr.minor = 2; + attr.red_bits = 8; + attr.green_bits = 8; + attr.blue_bits = 8; + attr.alpha_bits = 8; + attr.depth_bits = 0; attr.stencil_bits = 0; - drm->ctx_w = MAX(av_info->geometry.max_width, native_width); - drm->ctx_h = MAX(av_info->geometry.max_height, native_height); + drm->ctx_w = MAX(av_info->geometry.max_width, drm->native_width); + drm->ctx_h = MAX(av_info->geometry.max_height, drm->native_height); - drm->context = go2_context_create(drm->display, drm->ctx_w, drm->ctx_h, &attr); + drm->context = go2_context_create( + drm->display, drm->ctx_w, drm->ctx_h, &attr); } go2_context_make_current(drm->context); @@ -274,56 +260,46 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data, static void gfx_ctx_go2_drm_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height) { - gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data; - struct retro_system_av_info* av_info = video_viewport_get_system_av_info(); + unsigned w; + unsigned h; + gfx_ctx_go2_drm_data_t + *drm = (gfx_ctx_go2_drm_data_t*)data; settings_t *settings = config_get_ptr(); bool use_ctx_scaling = settings->bools.video_ctx_scaling; - unsigned w; - unsigned h; - if (use_ctx_scaling && !menu_driver_is_alive()) { - w = av_info->geometry.base_width; - h = av_info->geometry.base_height; + struct retro_system_av_info* + av_info = video_viewport_get_system_av_info(); + w = av_info->geometry.base_width; + h = av_info->geometry.base_height; } else { - w = native_width; - h = native_height; + w = drm->native_width; + h = drm->native_height; } if (*width != w || *height != h) { - *width = drm->fb_width = w; - *height = drm->fb_height = h; - *resize = false; + *width = drm->fb_width = w; + *height = drm->fb_height = h; + *resize = false; } *quit = (bool)frontend_driver_get_signal_handler_state(); } -static bool gfx_ctx_go2_drm_has_focus(void *data) -{ - return true; -} +static bool gfx_ctx_go2_drm_has_focus(void *data) { return true; } +static bool gfx_ctx_go2_drm_suppress_screensaver(void *data, bool enable) { return false; } -static bool gfx_ctx_go2_drm_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -int ss = 0; - -void (*swap_buffers)(void*); static void gfx_ctx_go2_drm_swap_buffers(void *data) { - gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data; + gfx_ctx_go2_drm_data_t + *drm = (gfx_ctx_go2_drm_data_t*)data; - int out_w = native_width; - int out_h = native_height; + int out_w = drm->native_width; + int out_h = drm->native_height; int out_x = 0; int out_y = 0; @@ -341,27 +317,17 @@ static void gfx_ctx_go2_drm_swap_buffers(void *data) out_x = 0; } - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - go2_context_swap_buffers(drm->context); + go2_context_swap_buffers(drm->context); - go2_surface_t* surface = go2_context_surface_lock(drm->context); - go2_presenter_post(drm->presenter, - surface, - src_x, src_y, src_w, src_h, - out_y, out_x, out_h, out_w, - GO2_ROTATION_DEGREES_270, 2); - go2_context_surface_unlock(drm->context, surface); + go2_surface_t* surface = go2_context_surface_lock(drm->context); + go2_presenter_post(drm->presenter, + surface, + src_x, src_y, src_w, src_h, + out_y, out_x, out_h, out_w, + GO2_ROTATION_DEGREES_270, 2); + go2_context_surface_unlock(drm->context, surface); #endif - break; - default: - printf("unhandled gfx_ctx_go2_drm_swap_buffers\n"); - break; - } } static uint32_t gfx_ctx_go2_drm_get_flags(void *data) @@ -397,19 +363,9 @@ static void gfx_ctx_go2_drm_bind_hw_render(void *data, bool enable) { gfx_ctx_go2_drm_data_t *drm = (gfx_ctx_go2_drm_data_t*)data; - switch (drm_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_bind_hw_render(&drm->egl, enable); + egl_bind_hw_render(&drm->egl, enable); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } const gfx_ctx_driver_t gfx_ctx_go2_drm = { @@ -434,7 +390,11 @@ const gfx_ctx_driver_t gfx_ctx_go2_drm = { false, /* has_windowed */ gfx_ctx_go2_drm_swap_buffers, gfx_ctx_go2_drm_input_driver, - gfx_ctx_go2_drm_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/emscriptenegl_ctx.c b/gfx/drivers_context/emscriptenegl_ctx.c index 85fb7eeeb6..853a065607 100644 --- a/gfx/drivers_context/emscriptenegl_ctx.c +++ b/gfx/drivers_context/emscriptenegl_ctx.c @@ -42,21 +42,14 @@ typedef struct #ifdef HAVE_EGL egl_ctx_data_t egl; #endif + int initial_width; + int initial_height; unsigned fb_width; unsigned fb_height; } emscripten_ctx_data_t; -/* TODO/FIXME - would like to move these to emscripten_ctx_data_t - - * see the TODO/FIXME note down below */ -static int emscripten_initial_width; -static int emscripten_initial_height; - -static enum gfx_ctx_api emscripten_api = GFX_CTX_NONE; - static void gfx_ctx_emscripten_swap_interval(void *data, int interval) { - (void)data; - if (interval == 0) emscripten_set_main_loop_timing(EM_TIMING_SETIMMEDIATE, 0); else @@ -105,8 +98,8 @@ static void gfx_ctx_emscripten_check_window(void *data, bool *quit, if (input_width == 0 || input_height == 0) { - input_width = emscripten_initial_width; - input_height = emscripten_initial_height; + input_width = emscripten->initial_width; + input_height = emscripten->initial_height; emscripten->fb_width = emscripten->fb_height = 0; } @@ -207,9 +200,11 @@ static void *gfx_ctx_emscripten_init(void *video_driver) /* TODO/FIXME - why is this conditional here - shouldn't these always * be grabbed? */ - if (emscripten_initial_width == 0 || emscripten_initial_height == 0) + if ( emscripten->initial_width == 0 || + emscripten->initial_height == 0) emscripten_get_canvas_element_size("#canvas", - &emscripten_initial_width, &emscripten_initial_height); + &emscripten->initial_width, + &emscripten->initial_height); #ifdef HAVE_EGL if (g_egl_inited) @@ -259,29 +254,15 @@ static bool gfx_ctx_emscripten_set_video_mode(void *data, return true; } -static enum gfx_ctx_api gfx_ctx_emscripten_get_api(void *data) -{ - return emscripten_api; -} +static enum gfx_ctx_api gfx_ctx_emscripten_get_api(void *data) { return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_emscripten_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - (void)major; - (void)minor; - - emscripten_api = api; - - switch (api) - { #ifdef HAVE_EGL - case GFX_CTX_OPENGL_ES_API: - return egl_bind_api(EGL_OPENGL_ES_API); + if (api == GFX_CTX_OPENGL_ES_API) + return egl_bind_api(EGL_OPENGL_ES_API); #endif - default: - break; - } return false; } @@ -296,53 +277,19 @@ static void gfx_ctx_emscripten_input_driver(void *data, *input_data = rwebinput; } -static bool gfx_ctx_emscripten_has_focus(void *data) -{ - (void)data; +static bool gfx_ctx_emscripten_has_focus(void *data) { return g_egl_inited; } - return g_egl_inited; -} - -static bool gfx_ctx_emscripten_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - - return false; -} +static bool gfx_ctx_emscripten_suppress_screensaver(void *data, bool enable) { return false; } static float gfx_ctx_emscripten_translate_aspect(void *data, - unsigned width, unsigned height) -{ - (void)data; - - return (float)width / height; -} + unsigned width, unsigned height) { return (float)width / height; } static bool gfx_ctx_emscripten_init_egl_image_buffer(void *data, - const video_info_t *video) -{ - (void)data; - - return false; -} + const video_info_t *video) { return false; } static bool gfx_ctx_emscripten_write_egl_image(void *data, const void *frame, unsigned width, unsigned height, unsigned pitch, - bool rgb32, unsigned index, void **image_handle) -{ - (void)data; - return false; -} - -static gfx_ctx_proc_t gfx_ctx_emscripten_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} + bool rgb32, unsigned index, void **image_handle) { return false; } static void gfx_ctx_emscripten_bind_hw_render(void *data, bool enable) { @@ -360,10 +307,7 @@ static uint32_t gfx_ctx_emscripten_get_flags(void *data) return flags; } -static void gfx_ctx_emscripten_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_emscripten_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_emscripten = { gfx_ctx_emscripten_init, @@ -387,7 +331,11 @@ const gfx_ctx_driver_t gfx_ctx_emscripten = { false, gfx_ctx_emscripten_swap_buffers, gfx_ctx_emscripten_input_driver, - gfx_ctx_emscripten_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif gfx_ctx_emscripten_init_egl_image_buffer, gfx_ctx_emscripten_write_egl_image, NULL, diff --git a/gfx/drivers_context/fpga_ctx.c b/gfx/drivers_context/fpga_ctx.c deleted file mode 100644 index 66b1c030dc..0000000000 --- a/gfx/drivers_context/fpga_ctx.c +++ /dev/null @@ -1,190 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * 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 . - */ - -/* FPGA context. */ - -#include -#include - -#include - -#ifdef HAVE_CONFIG_H -#include "../../config.h" -#endif - -#include "../../configuration.h" -#include "../../dynamic.h" -#include "../../verbosity.h" -#include "../video_driver.h" -#include "../common/fpga_common.h" - -static unsigned g_resize_width = FB_WIDTH; -static unsigned g_resize_height = FB_HEIGHT; - -static void gfx_ctx_fpga_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ -} - -static bool gfx_ctx_fpga_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - return false; -} - -static void gfx_ctx_fpga_update_title(void *data) -{ - char title[128]; - - title[0] = '\0'; - - video_driver_get_window_title(title, sizeof(title)); -} - -static void gfx_ctx_fpga_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - (void)data; - - *width = g_resize_width; - *height = g_resize_height; -} - -static void *gfx_ctx_fpga_init(void *video_driver) -{ - (void)video_driver; - - return (void*)"fpga"; -} - -static void gfx_ctx_fpga_destroy(void *data) -{ - (void)data; -} - -static bool gfx_ctx_fpga_set_video_mode(void *data, - unsigned width, unsigned height, - bool fullscreen) -{ - if (false) - goto error; - - return true; - -error: - gfx_ctx_fpga_destroy(data); - return false; -} - - -static void gfx_ctx_fpga_input_driver(void *data, - const char *joypad_name, - const input_driver_t **input, void **input_data) -{ -} - -static bool gfx_ctx_fpga_has_focus(void *data) -{ - return true; -} - -static bool gfx_ctx_fpga_suppress_screensaver(void *data, bool enable) -{ - return true; -} - -static bool gfx_ctx_fpga_has_windowed(void *data) -{ - (void)data; - - return true; -} - -static bool gfx_ctx_fpga_get_metrics(void *data, - enum display_metric_types type, float *value) -{ - return true; -} - -static bool gfx_ctx_fpga_bind_api(void *data, - enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - - return true; -} - -static void gfx_ctx_fpga_show_mouse(void *data, bool state) -{ - (void)data; -} - -static void gfx_ctx_fpga_swap_interval(void *data, unsigned interval) -{ - (void)data; - (void)interval; -} - -static void gfx_ctx_fpga_set_flags(void *data, uint32_t flags) -{ - (void)data; - (void)flags; -} - -static uint32_t gfx_ctx_fpga_get_flags(void *data) -{ - uint32_t flags = 0; - BIT32_SET(flags, GFX_CTX_FLAGS_NONE); - return flags; -} - -const gfx_ctx_driver_t gfx_ctx_fpga = { - gfx_ctx_fpga_init, - gfx_ctx_fpga_destroy, - gfx_ctx_fpga_bind_api, - gfx_ctx_fpga_swap_interval, - gfx_ctx_fpga_set_video_mode, - gfx_ctx_fpga_get_video_size, - NULL, /* get_video_output_size */ - NULL, /* get_video_output_prev */ - NULL, /* get_video_output_next */ - gfx_ctx_fpga_get_metrics, - NULL, - gfx_ctx_fpga_update_title, - gfx_ctx_fpga_check_window, - gfx_ctx_fpga_set_resize, - gfx_ctx_fpga_has_focus, - gfx_ctx_fpga_suppress_screensaver, - gfx_ctx_fpga_has_windowed, - NULL, /* swap_buffers */ - gfx_ctx_fpga_input_driver, - NULL, - NULL, - NULL, - gfx_ctx_fpga_show_mouse, - "fpga", - gfx_ctx_fpga_get_flags, - gfx_ctx_fpga_set_flags, - NULL, - NULL, - NULL -}; - diff --git a/gfx/drivers_context/gdi_ctx.c b/gfx/drivers_context/gdi_ctx.c deleted file mode 100644 index 0025b38c89..0000000000 --- a/gfx/drivers_context/gdi_ctx.c +++ /dev/null @@ -1,293 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2019 - Brad Parker - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * 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 . - */ - -/* Win32/GDI context. */ - -/* necessary for mingw32 multimon defines: */ -#ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0500 /*_WIN32_WINNT_WIN2K */ -#endif - -#include -#include - -#include -#include - -#include - -#ifdef HAVE_CONFIG_H -#include "../../config.h" -#endif - -#include "../../dynamic.h" -#include "../../configuration.h" -#include "../../retroarch.h" -#include "../../verbosity.h" -#include "../../frontend/frontend_driver.h" - -#include "../common/win32_common.h" - -static HDC win32_gdi_hdc; - -static unsigned win32_gdi_major = 0; -static unsigned win32_gdi_minor = 0; -static int win32_gdi_interval = 0; -static enum gfx_ctx_api win32_gdi_api = GFX_CTX_NONE; - -typedef struct gfx_ctx_gdi_data -{ - void *empty; -} gfx_ctx_gdi_data_t; - -static void *dinput_gdi; - -static void gfx_ctx_gdi_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ - win32_check_window(quit, resize, width, height); -} - -static bool gfx_ctx_gdi_set_resize(void *data, - unsigned width, unsigned height) -{ - return false; -} - -static void gfx_ctx_gdi_update_title(void *data) -{ - const ui_window_t *window = ui_companion_driver_get_window_ptr(); - char title[128]; - - title[0] = '\0'; - - video_driver_get_window_title(title, sizeof(title)); - - if (window && title[0]) - window->set_title(&main_window, title); -} - -static void gfx_ctx_gdi_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - HWND window = win32_get_window(); - - (void)data; - - if (!window) - { - RECT mon_rect; - MONITORINFOEX current_mon; - unsigned mon_id = 0; - HMONITOR hm_to_use = NULL; - - win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); - mon_rect = current_mon.rcMonitor; - *width = mon_rect.right - mon_rect.left; - *height = mon_rect.bottom - mon_rect.top; - } - else - { - *width = g_win32_resize_width; - *height = g_win32_resize_height; - } -} - -static void *gfx_ctx_gdi_init(void *video_driver) -{ - WNDCLASSEX wndclass = {0}; - gfx_ctx_gdi_data_t *gdi = (gfx_ctx_gdi_data_t*)calloc(1, sizeof(*gdi)); - - if (!gdi) - return NULL; - - if (g_win32_inited) - goto error; - - win32_window_reset(); - win32_monitor_init(); - - wndclass.lpfnWndProc = WndProcGDI; - if (!win32_window_init(&wndclass, true, NULL)) - goto error; - - return gdi; - -error: - if (gdi) - free(gdi); - return NULL; -} - -static void gfx_ctx_gdi_destroy(void *data) -{ - gfx_ctx_gdi_data_t *gdi = (gfx_ctx_gdi_data_t*)data; - HWND window = win32_get_window(); - - if (window && win32_gdi_hdc) - { - ReleaseDC(window, win32_gdi_hdc); - win32_gdi_hdc = NULL; - } - - if (window) - { - win32_monitor_from_window(); - win32_destroy_window(); - } - - if (g_win32_restore_desktop) - { - win32_monitor_get_info(); - g_win32_restore_desktop = false; - } - - if (gdi) - free(gdi); - - g_win32_inited = false; - win32_gdi_major = 0; - win32_gdi_minor = 0; -} - -static bool gfx_ctx_gdi_set_video_mode(void *data, - unsigned width, unsigned height, - bool fullscreen) -{ - if (!win32_set_video_mode(NULL, width, height, fullscreen)) - { - RARCH_ERR("[GDI]: win32_set_video_mode failed.\n"); - gfx_ctx_gdi_destroy(data); - return false; - } - - return true; -} - -static void gfx_ctx_gdi_input_driver(void *data, - const char *joypad_name, - input_driver_t **input, void **input_data) -{ -#if _WIN32_WINNT >= 0x0501 - settings_t *settings = config_get_ptr(); - - /* winraw only available since XP */ - if (string_is_equal(settings->arrays.input_driver, "raw")) - { - *input_data = input_winraw.init(joypad_name); - if (*input_data) - { - *input = &input_winraw; - dinput_gdi = NULL; - return; - } - } -#endif - -#ifdef HAVE_DINPUT - dinput_gdi = input_dinput.init(joypad_name); - *input = dinput_gdi ? &input_dinput : NULL; -#else - dinput_gdi = NULL; - *input = NULL; -#endif - *input_data = dinput_gdi; -} - -static enum gfx_ctx_api gfx_ctx_gdi_get_api(void *data) -{ - return win32_gdi_api; -} - -static bool gfx_ctx_gdi_bind_api(void *data, - enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - - win32_gdi_major = major; - win32_gdi_minor = minor; - win32_gdi_api = api; - - return true; -} - -static void gfx_ctx_gdi_swap_interval(void *data, int interval) -{ - (void)data; - (void)interval; -} - -static void gfx_ctx_gdi_set_flags(void *data, uint32_t flags) -{ - (void)data; - (void)flags; -} - -static uint32_t gfx_ctx_gdi_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} - -static void gfx_ctx_gdi_swap_buffers(void *data) -{ - SwapBuffers(win32_gdi_hdc); -} - -void create_gdi_context(HWND hwnd, bool *quit) -{ - win32_gdi_hdc = GetDC(hwnd); - - win32_setup_pixel_format(win32_gdi_hdc, false); - - g_win32_inited = true; -} - -const gfx_ctx_driver_t gfx_ctx_gdi = { - gfx_ctx_gdi_init, - gfx_ctx_gdi_destroy, - gfx_ctx_gdi_get_api, - gfx_ctx_gdi_bind_api, - gfx_ctx_gdi_swap_interval, - gfx_ctx_gdi_set_video_mode, - gfx_ctx_gdi_get_video_size, - NULL, /* get_refresh_rate */ - NULL, /* get_video_output_size */ - NULL, /* get_video_output_prev */ - NULL, /* get_video_output_next */ - win32_get_metrics, - NULL, - gfx_ctx_gdi_update_title, - gfx_ctx_gdi_check_window, - gfx_ctx_gdi_set_resize, - win32_has_focus, - win32_suppress_screensaver, - true, /* has_windowed */ - gfx_ctx_gdi_swap_buffers, - gfx_ctx_gdi_input_driver, - NULL, - NULL, - NULL, - win32_show_cursor, - "gdi", - gfx_ctx_gdi_get_flags, - gfx_ctx_gdi_set_flags, - NULL, - NULL, - NULL -}; diff --git a/gfx/drivers_context/gfx_null_ctx.c b/gfx/drivers_context/gfx_null_ctx.c index 698de8ce0e..c888c8297e 100644 --- a/gfx/drivers_context/gfx_null_ctx.c +++ b/gfx/drivers_context/gfx_null_ctx.c @@ -18,23 +18,8 @@ #include "../../retroarch.h" -static void gfx_ctx_null_swap_interval(void *data, int interval) -{ - (void)data; - (void)interval; -} - -static void gfx_ctx_null_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ - (void)data; - (void)quit; - (void)width; - (void)height; - (void)resize; -} - -static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *height) +static void gfx_ctx_null_get_video_size( + void *data, unsigned *width, unsigned *height) { (void)data; #ifdef VITA @@ -46,90 +31,25 @@ static void gfx_ctx_null_get_video_size(void *data, unsigned *width, unsigned *h #endif } +static void gfx_ctx_null_swap_interval(void *data, int interval) { } +static void gfx_ctx_null_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height) { } static bool gfx_ctx_null_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - (void)data; - (void)width; - (void)height; - (void)fullscreen; - - return true; -} - -static void gfx_ctx_null_destroy(void *data) -{ - (void)data; -} - + bool fullscreen) { return true; } +static void gfx_ctx_null_destroy(void *data) { } static void gfx_ctx_null_input_driver(void *data, const char *name, - input_driver_t **input, void **input_data) -{ - (void)data; - (void)input; - (void)input_data; -} - -static bool gfx_ctx_null_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_null_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static enum gfx_ctx_api gfx_ctx_null_get_api(void *data) -{ - return GFX_CTX_NONE; -} - -static bool gfx_ctx_null_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - (void)api; - (void)major; - (void)minor; - - return true; -} - -static void gfx_ctx_null_show_mouse(void *data, bool state) -{ - (void)data; - (void)state; -} - -static void gfx_ctx_null_bind_hw_render(void *data, bool enable) -{ - (void)data; - (void)enable; -} - -static void *gfx_ctx_null_init(void *video_driver) -{ - (void)video_driver; - - return (void*)"null"; -} - -static uint32_t gfx_ctx_null_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} - -static void gfx_ctx_null_set_flags(void *data, uint32_t flags) -{ - (void)data; -} + input_driver_t **input, void **input_data) { } +static bool gfx_ctx_null_has_focus(void *data) { return true; } +static bool gfx_ctx_null_suppress_screensaver(void *data, bool enable) { return false; } +static enum gfx_ctx_api gfx_ctx_null_get_api(void *data) { return GFX_CTX_NONE; } +static bool gfx_ctx_null_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { return true; } +static void gfx_ctx_null_show_mouse(void *data, bool state) { } +static void gfx_ctx_null_bind_hw_render(void *data, bool enable) { } +static void *gfx_ctx_null_init(void *video_driver) { return (void*)"null"; } +static uint32_t gfx_ctx_null_get_flags(void *data) { return 0; } +static void gfx_ctx_null_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_null = { gfx_ctx_null_init, diff --git a/gfx/drivers_context/khr_display_ctx.c b/gfx/drivers_context/khr_display_ctx.c index 42f377c29a..9b06cfa942 100644 --- a/gfx/drivers_context/khr_display_ctx.c +++ b/gfx/drivers_context/khr_display_ctx.c @@ -33,8 +33,6 @@ typedef struct unsigned height; } khr_display_ctx_data_t; -static enum gfx_ctx_api khr_api = GFX_CTX_NONE; - static void gfx_ctx_khr_display_destroy(void *data) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; @@ -60,7 +58,8 @@ static void gfx_ctx_khr_display_get_video_size(void *data, static void *gfx_ctx_khr_display_init(void *video_driver) { - khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)calloc(1, sizeof(*khr)); + khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*) + calloc(1, sizeof(*khr)); if (!khr) return NULL; @@ -102,8 +101,9 @@ static bool gfx_ctx_khr_display_set_resize(void *data, { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; - khr->width = width; - khr->height = height; + khr->width = width; + khr->height = height; + if (!vulkan_create_swapchain(&khr->vk, khr->width, khr->height, khr->swap_interval)) { @@ -115,8 +115,8 @@ static bool gfx_ctx_khr_display_set_resize(void *data, vulkan_acquire_next_image(&khr->vk); khr->vk.context.invalid_swapchain = true; - khr->vk.need_new_swapchain = false; - return false; + khr->vk.need_new_swapchain = false; + return true; } static bool gfx_ctx_khr_display_set_video_mode(void *data, @@ -130,13 +130,13 @@ static bool gfx_ctx_khr_display_set_video_mode(void *data, if (!fullscreen) { - width = 0; - height = 0; + width = 0; + height = 0; } - info.width = width; - info.height = height; - info.monitor_index = video_monitor_index; + info.width = width; + info.height = height; + info.monitor_index = video_monitor_index; if (!vulkan_surface_create(&khr->vk, VULKAN_WSI_DISPLAY, &info, NULL, 0, 0, khr->swap_interval)) @@ -145,8 +145,8 @@ static bool gfx_ctx_khr_display_set_video_mode(void *data, goto error; } - khr->width = khr->vk.context.swapchain_width; - khr->height = khr->vk.context.swapchain_height; + khr->width = khr->vk.context.swapchain_width; + khr->height = khr->vk.context.swapchain_height; return true; @@ -198,36 +198,21 @@ static void gfx_ctx_khr_display_input_driver(void *data, static enum gfx_ctx_api gfx_ctx_khr_display_get_api(void *data) { - return khr_api; + return GFX_CTX_VULKAN_API; } static bool gfx_ctx_khr_display_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - (void)major; - (void)minor; - - khr_api = api; - if (api == GFX_CTX_VULKAN_API) return true; - return false; } -static bool gfx_ctx_khr_display_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_khr_display_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static void gfx_ctx_khr_display_set_flags(void *data, uint32_t flags) { } +static bool gfx_ctx_khr_display_has_focus(void *data) { return true; } +static bool gfx_ctx_khr_display_suppress_screensaver(void *data, bool enable) { return false; } +static gfx_ctx_proc_t gfx_ctx_khr_display_get_proc_address(const char *symbol) { return NULL; } static void gfx_ctx_khr_display_set_swap_interval(void *data, int swap_interval) @@ -249,11 +234,6 @@ static void gfx_ctx_khr_display_swap_buffers(void *data) vulkan_acquire_next_image(&khr->vk); } -static gfx_ctx_proc_t gfx_ctx_khr_display_get_proc_address(const char *symbol) -{ - return NULL; -} - static uint32_t gfx_ctx_khr_display_get_flags(void *data) { uint32_t flags = 0; @@ -265,11 +245,6 @@ static uint32_t gfx_ctx_khr_display_get_flags(void *data) return flags; } -static void gfx_ctx_khr_display_set_flags(void *data, uint32_t flags) -{ - (void)data; -} - static void *gfx_ctx_khr_display_get_context_data(void *data) { khr_display_ctx_data_t *khr = (khr_display_ctx_data_t*)data; diff --git a/gfx/drivers_context/mali_fbdev_ctx.c b/gfx/drivers_context/mali_fbdev_ctx.c index 034a8445d2..415068da27 100644 --- a/gfx/drivers_context/mali_fbdev_ctx.c +++ b/gfx/drivers_context/mali_fbdev_ctx.c @@ -57,8 +57,6 @@ typedef struct float refresh_rate; } mali_ctx_data_t; -static enum gfx_ctx_api mali_api = GFX_CTX_NONE; - static void gfx_ctx_mali_fbdev_destroy(void *data) { int fd; @@ -213,18 +211,14 @@ static void gfx_ctx_mali_fbdev_input_driver(void *data, static enum gfx_ctx_api gfx_ctx_mali_fbdev_get_api(void *data) { - return mali_api; + return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_mali_fbdev_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - mali_api = api; - if (api == GFX_CTX_OPENGL_ES_API) return true; - return false; } @@ -260,13 +254,6 @@ static void gfx_ctx_mali_fbdev_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t gfx_ctx_mali_fbdev_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static void gfx_ctx_mali_fbdev_bind_hw_render(void *data, bool enable) { mali_ctx_data_t *mali = (mali_ctx_data_t*)data; @@ -319,7 +306,11 @@ const gfx_ctx_driver_t gfx_ctx_mali_fbdev = { false, /* has_windowed */ gfx_ctx_mali_fbdev_swap_buffers, gfx_ctx_mali_fbdev_input_driver, - gfx_ctx_mali_fbdev_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/network_ctx.c b/gfx/drivers_context/network_ctx.c deleted file mode 100644 index c7a4ca7469..0000000000 --- a/gfx/drivers_context/network_ctx.c +++ /dev/null @@ -1,185 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2019 - Brad Parker - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * 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 . - */ - -/* network video context. */ - -#ifdef HAVE_CONFIG_H -#include "../../config.h" -#endif - -#include "../../configuration.h" -#include "../../dynamic.h" -#include "../../retroarch.h" -#include "../../verbosity.h" -#include "../../ui/ui_companion_driver.h" - -#if defined(_WIN32) && !defined(_XBOX) -#include "../common/win32_common.h" -#endif - -static enum gfx_ctx_api network_ctx_api = GFX_CTX_NONE; - -static void gfx_ctx_network_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ -} - -static bool gfx_ctx_network_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - return false; -} - -static void gfx_ctx_network_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - (void)data; -} - -static void *gfx_ctx_network_init(void *video_driver) -{ - (void)video_driver; - - return (void*)"network"; -} - -static void gfx_ctx_network_destroy(void *data) -{ - (void)data; -} - -static bool gfx_ctx_network_set_video_mode(void *data, - unsigned width, unsigned height, - bool fullscreen) -{ - return true; -} - -static void gfx_ctx_network_input_driver(void *data, - const char *joypad_name, - input_driver_t **input, void **input_data) -{ - (void)data; - -#ifdef HAVE_UDEV - *input_data = input_udev.init(joypad_name); - - if (*input_data) - { - *input = &input_udev; - return; - } -#endif - *input = NULL; - *input_data = NULL; -} - -static bool gfx_ctx_network_has_focus(void *data) -{ - return true; -} - -static bool gfx_ctx_network_suppress_screensaver(void *data, bool enable) -{ - return true; -} - -static bool gfx_ctx_network_get_metrics(void *data, - enum display_metric_types type, float *value) -{ - return false; -} - -static enum gfx_ctx_api gfx_ctx_network_get_api(void *data) -{ - return network_ctx_api; -} - -static bool gfx_ctx_network_bind_api(void *data, - enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - - return true; -} - -static void gfx_ctx_network_show_mouse(void *data, bool state) -{ - (void)data; -} - -static void gfx_ctx_network_swap_interval(void *data, int interval) -{ - (void)data; - (void)interval; -} - -static void gfx_ctx_network_set_flags(void *data, uint32_t flags) -{ - (void)data; - (void)flags; -} - -static uint32_t gfx_ctx_network_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} - -static void gfx_ctx_network_swap_buffers(void *data) -{ - (void)data; -} - -const gfx_ctx_driver_t gfx_ctx_network = { - gfx_ctx_network_init, - gfx_ctx_network_destroy, - gfx_ctx_network_get_api, - gfx_ctx_network_bind_api, - gfx_ctx_network_swap_interval, - gfx_ctx_network_set_video_mode, - gfx_ctx_network_get_video_size, - NULL, /* get_refresh_rate */ - NULL, /* get_video_output_size */ - NULL, /* get_video_output_prev */ - NULL, /* get_video_output_next */ - gfx_ctx_network_get_metrics, - NULL, - NULL, /* update_title */ - gfx_ctx_network_check_window, - gfx_ctx_network_set_resize, - gfx_ctx_network_has_focus, - gfx_ctx_network_suppress_screensaver, - true, /* has_windowed */ - gfx_ctx_network_swap_buffers, - gfx_ctx_network_input_driver, - NULL, - NULL, - NULL, - gfx_ctx_network_show_mouse, - "network", - gfx_ctx_network_get_flags, - gfx_ctx_network_set_flags, - NULL, - NULL, - NULL -}; diff --git a/gfx/drivers_context/opendingux_fbdev_ctx.c b/gfx/drivers_context/opendingux_fbdev_ctx.c index cdfb0ee923..fdb9e5257b 100644 --- a/gfx/drivers_context/opendingux_fbdev_ctx.c +++ b/gfx/drivers_context/opendingux_fbdev_ctx.c @@ -42,8 +42,6 @@ typedef struct unsigned width, height; } opendingux_ctx_data_t; -static enum gfx_ctx_api opendingux_api = GFX_CTX_NONE; - static void gfx_ctx_opendingux_destroy(void *data) { opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; @@ -182,33 +180,20 @@ static void gfx_ctx_opendingux_input_driver(void *data, static enum gfx_ctx_api gfx_ctx_opendingux_get_api(void *data) { - return opendingux_api; + return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_opendingux_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - - opendingux_api = api; - if (api == GFX_CTX_OPENGL_ES_API) return true; return false; } -static bool gfx_ctx_opendingux_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_opendingux_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static void gfx_ctx_opendingux_set_flags(void *data, uint32_t flags) { } +static bool gfx_ctx_opendingux_has_focus(void *data) { return true; } +static bool gfx_ctx_opendingux_suppress_screensaver(void *data, bool enable) { return false; } static void gfx_ctx_opendingux_swap_buffers(void *data) { @@ -229,13 +214,6 @@ static void gfx_ctx_opendingux_set_swap_interval( #endif } -#ifdef HAVE_EGL -static gfx_ctx_proc_t gfx_ctx_opendingux_get_proc_address(const char *symbol) -{ - return egl_get_proc_address(symbol); -} -#endif - static void gfx_ctx_opendingux_bind_hw_render(void *data, bool enable) { opendingux_ctx_data_t *viv = (opendingux_ctx_data_t*)data; @@ -254,11 +232,6 @@ static uint32_t gfx_ctx_opendingux_get_flags(void *data) return flags; } -static void gfx_ctx_opendingux_set_flags(void *data, uint32_t flags) -{ - (void)data; -} - const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { gfx_ctx_opendingux_init, gfx_ctx_opendingux_destroy, @@ -282,7 +255,7 @@ const gfx_ctx_driver_t gfx_ctx_opendingux_fbdev = { gfx_ctx_opendingux_swap_buffers, gfx_ctx_opendingux_input_driver, #ifdef HAVE_EGL - gfx_ctx_opendingux_get_proc_address, + egl_get_proc_address, #else NULL, #endif diff --git a/gfx/drivers_context/orbis_ctx.c b/gfx/drivers_context/orbis_ctx.c index a56f96ba5e..0656049cf5 100644 --- a/gfx/drivers_context/orbis_ctx.c +++ b/gfx/drivers_context/orbis_ctx.c @@ -26,31 +26,34 @@ #include "../../frontend/frontend_driver.h" #include "../../configuration.h" +/* TODO/FIXME - static globals */ static enum gfx_ctx_api ctx_orbis_api = GFX_CTX_OPENGL_API; +/* TODO/FIXME - global reference */ extern bool platform_orbis_has_focus; void orbis_ctx_destroy(void *data) { - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; - if (ctx_orbis) - { + if (ctx_orbis) + { #ifdef HAVE_EGL - egl_destroy(&ctx_orbis->egl); + egl_destroy(&ctx_orbis->egl); #endif - ctx_orbis->resize = false; - free(ctx_orbis); - } + ctx_orbis->resize = false; + free(ctx_orbis); + } } static void orbis_ctx_get_video_size(void *data, - unsigned *width, unsigned *height) + unsigned *width, unsigned *height) { - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + orbis_ctx_data_t + *ctx_orbis = (orbis_ctx_data_t *)data; - *width = ATTR_ORBISGL_WIDTH; - *height = ATTR_ORBISGL_HEIGHT; + *width = ATTR_ORBISGL_WIDTH; + *height = ATTR_ORBISGL_HEIGHT; } static void *orbis_ctx_init(void *video_driver) @@ -73,7 +76,8 @@ static void *orbis_ctx_init(void *video_driver) EGL_NONE}; #endif - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)calloc(1, sizeof(*ctx_orbis)); + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *) + calloc(1, sizeof(*ctx_orbis)); if (!ctx_orbis) return NULL; @@ -81,20 +85,25 @@ static void *orbis_ctx_init(void *video_driver) #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; + 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) @@ -128,7 +137,7 @@ static void orbis_ctx_check_window(void *data, bool *quit, if (new_width != *width || new_height != *height) { - *width = new_width; + *width = new_width; *height = new_height; *resize = true; } @@ -141,17 +150,18 @@ static bool orbis_ctx_set_video_mode(void *data, bool fullscreen) { /* Create an EGL rendering context */ - static const EGLint contextAttributeList[] = + static const EGLint + contextAttributeList[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE}; - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; - ctx_orbis->width = ATTR_ORBISGL_WIDTH; - ctx_orbis->height = ATTR_ORBISGL_HEIGHT; + ctx_orbis->width = ATTR_ORBISGL_WIDTH; + ctx_orbis->height = ATTR_ORBISGL_HEIGHT; - ctx_orbis->native_window.width = ctx_orbis->width; + ctx_orbis->native_window.width = ctx_orbis->width; ctx_orbis->native_window.height = ctx_orbis->height; ctx_orbis->refresh_rate = 60; @@ -193,7 +203,6 @@ static enum gfx_ctx_api orbis_ctx_get_api(void *data) static bool orbis_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; ctx_orbis_api = api; #ifdef HAVE_EGL @@ -205,51 +214,33 @@ static bool orbis_ctx_bind_api(void *data, return false; } -static bool orbis_ctx_has_focus(void *data) -{ - (void)data; - return true; -} +static bool orbis_ctx_has_focus(void *data) { return true; } -static bool orbis_ctx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool orbis_ctx_suppress_screensaver(void *data, bool enable) { return false; } static void orbis_ctx_set_swap_interval(void *data, - int swap_interval) + int swap_interval) { - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; - #ifdef HAVE_EGL - egl_set_swap_interval(&ctx_orbis->egl, 0); + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + egl_set_swap_interval(&ctx_orbis->egl, 0); #endif } static void orbis_ctx_swap_buffers(void *data) { - 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); + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + egl_swap_buffers(&ctx_orbis->egl); #endif } static void orbis_ctx_bind_hw_render(void *data, bool enable) { - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; #ifdef HAVE_EGL - egl_bind_hw_render(&ctx_orbis->egl, enable); + egl_bind_hw_render(&ctx_orbis->egl, enable); #endif } @@ -271,16 +262,13 @@ static uint32_t orbis_ctx_get_flags(void *data) return flags; } -static void orbis_ctx_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void orbis_ctx_set_flags(void *data, uint32_t flags) { } static float orbis_ctx_get_refresh_rate(void *data) { - orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; + orbis_ctx_data_t *ctx_orbis = (orbis_ctx_data_t *)data; - return ctx_orbis->refresh_rate; + return ctx_orbis->refresh_rate; } const gfx_ctx_driver_t orbis_ctx = { @@ -305,7 +293,11 @@ const gfx_ctx_driver_t orbis_ctx = { false, /* has_windowed */ orbis_ctx_swap_buffers, orbis_ctx_input_driver, - orbis_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/osmesa_ctx.c b/gfx/drivers_context/osmesa_ctx.c index cfc3daecab..cf32ac2053 100644 --- a/gfx/drivers_context/osmesa_ctx.c +++ b/gfx/drivers_context/osmesa_ctx.c @@ -41,14 +41,14 @@ #define HAVE_OSMESA_CREATE_CONTEXT_EXT 1 #endif +#define OSMESA_DEFAULT_FORMAT OSMESA_RGBA +#define OSMESA_BPP 4 +#define OSMESA_FIFO_PATH "/tmp/osmesa-retroarch.sock" + +/* TODO/FIXME - static globals */ static bool g_osmesa_profile = OSMESA_COMPAT_PROFILE; static int g_osmesa_major = 2; static int g_osmesa_minor = 1; -static const int g_osmesa_format = OSMESA_RGBA; -static const int g_osmesa_bpp = 4; -static const char *g_osmesa_fifo = "/tmp/osmesa-retroarch.sock"; - -static enum gfx_ctx_api osmesa_api = GFX_CTX_NONE; typedef struct gfx_osmesa_ctx_data { @@ -77,11 +77,12 @@ static void osmesa_fifo_open(gfx_ctx_osmesa_data_t *osmesa) saun.sun_family = AF_UNIX; - strlcpy(saun.sun_path, g_osmesa_fifo, sizeof(saun.sun_path)); + strlcpy(saun.sun_path, OSMESA_FIFO_PATH, sizeof(saun.sun_path)); - unlink(g_osmesa_fifo); + unlink(OSMESA_FIFO_PATH); - if (bind(osmesa->socket, &saun, sizeof(saun.sun_family) + sizeof(saun.sun_path)) < 0) + if (bind(osmesa->socket, + &saun, sizeof(saun.sun_family) + sizeof(saun.sun_path)) < 0) { perror("[osmesa] bind()"); close(osmesa->socket); @@ -95,8 +96,10 @@ static void osmesa_fifo_open(gfx_ctx_osmesa_data_t *osmesa) return; } - RARCH_ERR("[osmesa] Frame size is %ix%ix%i\n", osmesa->width, osmesa->height, osmesa->pixsize); - RARCH_ERR("[osmesa] Please connect to unix:%s\n", g_osmesa_fifo); + RARCH_ERR("[osmesa] Frame size is %ix%ix%i\n", + osmesa->width, osmesa->height, osmesa->pixsize); + RARCH_ERR("[osmesa] Please connect to unix:%s\n", + OSMESA_FIFO_PATH); } static void osmesa_fifo_accept(gfx_ctx_osmesa_data_t *osmesa) @@ -146,7 +149,7 @@ static void *osmesa_ctx_init(void *video_driver) { #ifdef HAVE_OSMESA_CREATE_CONTEXT_ATTRIBS const int attribs[] = { - OSMESA_FORMAT, g_osmesa_format, + OSMESA_FORMAT, OSMESA_DEFAULT_FORMAT, OSMESA_DEPTH_BITS, 0, OSMESA_STENCIL_BITS, 0, OSMESA_ACCUM_BITS, 0, @@ -168,7 +171,7 @@ static void *osmesa_ctx_init(void *video_driver) #ifdef HAVE_OSMESA_CREATE_CONTEXT_EXT if (!osmesa->ctx) - osmesa->ctx = OSMesaCreateContextExt(g_osmesa_format, 0, 0, 0, NULL); + osmesa->ctx = OSMesaCreateContextExt(OSMESA_DEFAULT_FORMAT, 0, 0, 0, NULL); #endif if (!osmesa->ctx) @@ -176,13 +179,13 @@ static void *osmesa_ctx_init(void *video_driver) #if defined(HAVE_OSMESA_CREATE_CONTEXT_ATTRIBS) || defined(HAVE_OSMESA_CREATE_CONTEXT_EXT) RARCH_WARN("[osmesa]: Falling back to standard context creation.\n"); #endif - osmesa->ctx = OSMesaCreateContext(g_osmesa_format, NULL); + osmesa->ctx = OSMesaCreateContext(OSMESA_DEFAULT_FORMAT, NULL); } if (!osmesa->ctx) goto error; - osmesa->pixsize = g_osmesa_bpp; + osmesa->pixsize = OSMESA_BPP; return osmesa; @@ -213,7 +216,7 @@ static void osmesa_ctx_destroy(void *data) static enum gfx_ctx_api osmesa_ctx_get_api(void *data) { - return osmesa_api; + return GFX_CTX_OPENGL_API; } static bool osmesa_ctx_bind_api(void *data, @@ -223,19 +226,16 @@ static bool osmesa_ctx_bind_api(void *data, if (api != GFX_CTX_OPENGL_API) return false; - osmesa_api = api; - g_osmesa_profile = OSMESA_COMPAT_PROFILE; + /* Use version 2.1 by default */ + g_osmesa_major = 2; + g_osmesa_minor = 1; + g_osmesa_profile = OSMESA_COMPAT_PROFILE; if (major) { g_osmesa_major = major; g_osmesa_minor = minor; } - else - { - g_osmesa_major = 2; - g_osmesa_minor = 1; - } return true; } @@ -277,27 +277,7 @@ static bool osmesa_ctx_set_video_mode(void *data, osmesa->screen = screen; if (!osmesa->socket) - { -#if 0 - unlink(g_osmesa_fifo); - if (mkfifo(g_osmesa_fifo, 0666) == 0) - { - RARCH_WARN("[osmesa]: Please connect the sink to the fifo...\n"); - RARCH_WARN("[osmesa]: Picture size is %ux%u\n", width, height); - osmesa->socket = open(g_osmesa_fifo, O_WRONLY); - - if (osmesa->socket) - RARCH_WARN("[osmesa]: Initialized fifo at %s\n", g_osmesa_fifo); - } - - if (!osmesa->socket || osmesa->socket < 0) - { - unlink(g_osmesa_fifo); - RARCH_WARN("[osmesa]: Failed to initialize fifo: %s\n", strerror(errno)); - } -#endif osmesa_fifo_open(osmesa); - } return true; } @@ -326,18 +306,9 @@ static void osmesa_ctx_check_window(void *data, bool *quit, *quit = false; } -static bool osmesa_ctx_has_focus(void *data) -{ - (void)data; - return true; -} +static bool osmesa_ctx_has_focus(void *data) { return true; } -static bool osmesa_ctx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool osmesa_ctx_suppress_screensaver(void *data, bool enable) { return false; } static void osmesa_ctx_swap_buffers(void *data) { @@ -363,12 +334,6 @@ static gfx_ctx_proc_t osmesa_ctx_get_proc_address(const char *name) return (gfx_ctx_proc_t)OSMesaGetProcAddress(name); } -static void osmesa_ctx_show_mouse(void *data, bool state) -{ - (void)data; - (void)state; -} - static uint32_t osmesa_ctx_get_flags(void *data) { uint32_t flags = 0; @@ -378,10 +343,8 @@ static uint32_t osmesa_ctx_get_flags(void *data) return flags; } -static void osmesa_ctx_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void osmesa_ctx_show_mouse(void *data, bool state) { } +static void osmesa_ctx_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_osmesa = { diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 88f03dc719..e870e5307f 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -41,6 +41,7 @@ typedef struct gfx_ctx_ps3_data #endif } gfx_ctx_ps3_data_t; +/* TODO/FIXME - static global */ static enum gfx_ctx_api ps3_api = GFX_CTX_NONE; static void gfx_ctx_ps3_get_resolution(unsigned idx, @@ -158,22 +159,11 @@ static void gfx_ctx_ps3_check_window(void *data, bool *quit, *resize = true; } -static bool gfx_ctx_ps3_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_ps3_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool gfx_ctx_ps3_has_focus(void *data) { return true; } +static bool gfx_ctx_ps3_suppress_screensaver(void *data, bool enable) { return false; } static void gfx_ctx_ps3_swap_buffers(void *data) { - (void)data; #ifdef HAVE_PSGL psglSwap(); #endif @@ -203,9 +193,6 @@ static void *gfx_ctx_ps3_init(void *video_driver) gfx_ctx_ps3_data_t *ps3 = (gfx_ctx_ps3_data_t*) calloc(1, sizeof(gfx_ctx_ps3_data_t)); - (void)video_driver; - (void)global; - if (!ps3) return NULL; @@ -271,10 +258,7 @@ static void *gfx_ctx_ps3_init(void *video_driver) static bool gfx_ctx_ps3_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - return true; -} + bool fullscreen) { return true; } static void gfx_ctx_ps3_destroy_resources(gfx_ctx_ps3_data_t *ps3) { @@ -310,18 +294,11 @@ static void gfx_ctx_ps3_input_driver(void *data, *input_data = ps3input; } -static enum gfx_ctx_api gfx_ctx_ps3_get_api(void *data) -{ - return ps3_api; -} +static enum gfx_ctx_api gfx_ctx_ps3_get_api(void *data) { return ps3_api; } static bool gfx_ctx_ps3_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - (void)major; - (void)minor; - ps3_api = api; if ( @@ -400,10 +377,7 @@ static uint32_t gfx_ctx_ps3_get_flags(void *data) return flags; } -static void gfx_ctx_ps3_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_ps3_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_ps3 = { gfx_ctx_ps3_init, diff --git a/gfx/drivers_context/qnx_ctx.c b/gfx/drivers_context/qnx_ctx.c index 9ad55430d3..f4ba0d7cf0 100644 --- a/gfx/drivers_context/qnx_ctx.c +++ b/gfx/drivers_context/qnx_ctx.c @@ -49,9 +49,6 @@ #define WINDOW_BUFFERS 2 -screen_context_t screen_ctx; -screen_window_t screen_win; - typedef struct { #ifdef HAVE_EGL @@ -61,7 +58,10 @@ typedef struct bool resize; } qnx_ctx_data_t; -static enum gfx_ctx_api qnx_api = GFX_CTX_NONE; +/* TODO/FIXME - globals with public scope */ +screen_context_t screen_ctx; +screen_window_t screen_win; + static void gfx_ctx_qnx_destroy(void *data) { @@ -78,6 +78,11 @@ static void *gfx_ctx_qnx_init(void *video_driver) { EGLint n; EGLint major, minor; + int usage, format; +#ifndef HAVE_BB10 + int angle, size[2]; + screen_display_mode_t screen_mode; +#endif EGLint context_attributes[] = { #ifdef HAVE_OPENGLES2 EGL_CONTEXT_CLIENT_VERSION, 2, @@ -150,7 +155,7 @@ static void *gfx_ctx_qnx_init(void *video_driver) } } - int format = SCREEN_FORMAT_RGBX8888; + format = SCREEN_FORMAT_RGBX8888; if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_FORMAT, &format)) { @@ -158,7 +163,6 @@ static void *gfx_ctx_qnx_init(void *video_driver) goto error; } - int usage; #ifdef HAVE_OPENGLES2 usage = SCREEN_USAGE_OPENGL_ES2 | SCREEN_USAGE_ROTATION; #elif HAVE_OPENGLES3 @@ -188,11 +192,8 @@ static void *gfx_ctx_qnx_init(void *video_driver) } #ifndef HAVE_BB10 - int angle, size[2]; - angle = atoi(getenv("ORIENTATION")); - screen_display_mode_t screen_mode; if (screen_get_display_property_pv(qnx->screen_disp, SCREEN_PROPERTY_MODE, (void**)&screen_mode)) { @@ -299,14 +300,7 @@ static void gfx_ctx_qnx_check_window(void *data, bool *quit, static bool gfx_ctx_qnx_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - (void)data; - (void)width; - (void)height; - (void)fullscreen; - return true; -} + bool fullscreen) { return true; } static void gfx_ctx_qnx_input_driver(void *data, const char *joypad_name, @@ -318,36 +312,19 @@ static void gfx_ctx_qnx_input_driver(void *data, *input_data = qnxinput; } -static enum gfx_ctx_api gfx_ctx_qnx_get_api(void *data) -{ - return qnx_api; -} +static enum gfx_ctx_api gfx_ctx_qnx_get_api(void *data) { return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_qnx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - - qnx_api = api; - if (api == GFX_CTX_OPENGL_ES_API) return true; - return false; } -static bool gfx_ctx_qnx_has_focus(void *data) -{ - (void)data; - return true; -} +static bool gfx_ctx_qnx_has_focus(void *data) { return true; } -static bool gfx_ctx_qnx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool gfx_ctx_qnx_suppress_screensaver(void *data, bool enable) { return false; } static int dpi_get_density(qnx_ctx_data_t *qnx) { @@ -430,13 +407,6 @@ static void gfx_ctx_qnx_bind_hw_render(void *data, bool enable) #endif } -static gfx_ctx_proc_t gfx_ctx_qnx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static uint32_t gfx_ctx_qnx_get_flags(void *data) { uint32_t flags = 0; @@ -446,10 +416,7 @@ static uint32_t gfx_ctx_qnx_get_flags(void *data) return flags; } -static void gfx_ctx_qnx_set_flags(void *data, uint32_t flags) -{ - (void)flags; -} +static void gfx_ctx_qnx_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_qnx = { gfx_ctx_qnx_init, @@ -473,7 +440,11 @@ const gfx_ctx_driver_t gfx_ctx_qnx = { false, /* has_windowed */ gfx_ctx_qnx_swap_buffers, gfx_ctx_qnx_input_driver, - gfx_ctx_qnx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 3709172894..7a368f8f8c 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -32,44 +32,45 @@ #include "../common/sdl2_common.h" #endif -static enum gfx_ctx_api sdl_api = GFX_CTX_OPENGL_API; - typedef struct gfx_ctx_sdl_data { - int g_width; - int g_height; - int g_new_width; - int g_new_height; + int width; + int height; + int new_width; + int new_height; - bool g_full; - bool g_resized; + bool full; + bool resized; #ifdef HAVE_SDL2 - SDL_Window *g_win; - SDL_GLContext g_ctx; + SDL_Window *win; + SDL_GLContext ctx; #else - SDL_Surface *g_win; + SDL_Surface *win; #endif } gfx_ctx_sdl_data_t; +/* TODO/FIXME - static global */ +static enum gfx_ctx_api sdl_api = GFX_CTX_OPENGL_API; + static void sdl_ctx_destroy_resources(gfx_ctx_sdl_data_t *sdl) { if (!sdl) return; #ifdef HAVE_SDL2 - if (sdl->g_ctx) - SDL_GL_DeleteContext(sdl->g_ctx); + if (sdl->ctx) + SDL_GL_DeleteContext(sdl->ctx); - if (sdl->g_win) - SDL_DestroyWindow(sdl->g_win); + if (sdl->win) + SDL_DestroyWindow(sdl->win); - sdl->g_ctx = NULL; + sdl->ctx = NULL; #else - if (sdl->g_win) - SDL_FreeSurface(sdl->g_win); + if (sdl->win) + SDL_FreeSurface(sdl->win); #endif - sdl->g_win = NULL; + sdl->win = NULL; SDL_QuitSubSystem(SDL_INIT_VIDEO); } @@ -95,13 +96,13 @@ static void *sdl_ctx_init(void *video_driver) goto error; RARCH_LOG("[SDL_GL] SDL %i.%i.%i gfx context driver initialized.\n", - SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); + SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL); return sdl; error: RARCH_WARN("[SDL_GL]: Failed to initialize SDL gfx context driver: %s\n", - SDL_GetError()); + SDL_GetError()); sdl_ctx_destroy_resources(sdl); @@ -122,10 +123,7 @@ static void sdl_ctx_destroy(void *data) free(sdl); } -static enum gfx_ctx_api sdl_ctx_get_api(void *data) -{ - return sdl_api; -} +static enum gfx_ctx_api sdl_ctx_get_api(void *data) { return sdl_api; } static bool sdl_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, @@ -159,7 +157,6 @@ static bool sdl_ctx_bind_api(void *data, static void sdl_ctx_swap_interval(void *data, int interval) { - (void)data; #ifdef HAVE_SDL2 SDL_GL_SetSwapInterval(interval); #else @@ -171,14 +168,14 @@ static bool sdl_ctx_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { - unsigned fsflag = 0; - gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; - settings_t *settings = config_get_ptr(); - bool windowed_fullscreen= settings->bools.video_windowed_fullscreen; + unsigned fsflag = 0; + gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; + settings_t *settings = config_get_ptr(); + bool windowed_fullscreen = settings->bools.video_windowed_fullscreen; unsigned video_monitor_index = settings->uints.video_monitor_index; - sdl->g_new_width = width; - sdl->g_new_height = height; + sdl->new_width = width; + sdl->new_height = height; #ifdef HAVE_SDL2 @@ -190,18 +187,18 @@ static bool sdl_ctx_set_video_mode(void *data, fsflag = SDL_WINDOW_FULLSCREEN; } - if (sdl->g_win) + if (sdl->win) { - SDL_SetWindowSize(sdl->g_win, width, height); + SDL_SetWindowSize(sdl->win, width, height); if (fullscreen) - SDL_SetWindowFullscreen(sdl->g_win, fsflag); + SDL_SetWindowFullscreen(sdl->win, fsflag); } else { unsigned display = video_monitor_index; - sdl->g_win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), + sdl->win = SDL_CreateWindow("", SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), SDL_WINDOWPOS_UNDEFINED_DISPLAY(display), width, height, SDL_WINDOW_OPENGL | fsflag); } @@ -209,35 +206,35 @@ static bool sdl_ctx_set_video_mode(void *data, if (fullscreen) fsflag = SDL_FULLSCREEN; - sdl->g_win = SDL_SetVideoMode(width, height, 0, SDL_OPENGL | fsflag); + sdl->win = SDL_SetVideoMode(width, height, 0, SDL_OPENGL | fsflag); #endif - if (!sdl->g_win) + if (!sdl->win) goto error; #ifdef HAVE_SDL2 #if defined(_WIN32) - sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_WIN32); + sdl2_set_handles(sdl->win, RARCH_DISPLAY_WIN32); #elif defined(HAVE_X11) - sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_X11); + sdl2_set_handles(sdl->win, RARCH_DISPLAY_X11); #elif defined(HAVE_COCOA) - sdl2_set_handles(sdl->g_win, RARCH_DISPLAY_OSX); + sdl2_set_handles(sdl->win, RARCH_DISPLAY_OSX); #endif - if (sdl->g_ctx) + if (sdl->ctx) video_driver_set_video_cache_context_ack(); else { - sdl->g_ctx = SDL_GL_CreateContext(sdl->g_win); + sdl->ctx = SDL_GL_CreateContext(sdl->win); - if (!sdl->g_ctx) + if (!sdl->ctx) goto error; } #endif - sdl->g_full = fullscreen; - sdl->g_width = width; - sdl->g_height = height; + sdl->full = fullscreen; + sdl->width = width; + sdl->height = height; return true; @@ -255,10 +252,10 @@ static void sdl_ctx_get_video_size(void *data, if (!sdl) return; - *width = sdl->g_width; - *height = sdl->g_height; + *width = sdl->width; + *height = sdl->height; - if (!sdl->g_win) + if (!sdl->win) { #ifdef HAVE_SDL2 SDL_DisplayMode mode = {0}; @@ -293,7 +290,8 @@ static void sdl_ctx_update_title(void *data) if (title[0]) { #ifdef HAVE_SDL2 - SDL_SetWindowTitle((SDL_Window*)video_driver_display_userdata_get(), title); + SDL_SetWindowTitle((SDL_Window*) + video_driver_display_userdata_get(), title); #else SDL_WM_SetCaption(title, NULL); #endif @@ -310,9 +308,11 @@ static void sdl_ctx_check_window(void *data, bool *quit, SDL_PumpEvents(); #ifdef HAVE_SDL2 - while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_QUIT, SDL_WINDOWEVENT) > 0) + while (SDL_PeepEvents(&event, 1, + SDL_GETEVENT, SDL_QUIT, SDL_WINDOWEVENT) > 0) #else - while (SDL_PeepEvents(&event, 1, SDL_GETEVENT, SDL_QUITMASK|SDL_VIDEORESIZEMASK) > 0) + while (SDL_PeepEvents(&event, 1, + SDL_GETEVENT, SDL_QUITMASK|SDL_VIDEORESIZEMASK) > 0) #endif { switch (event.type) @@ -327,15 +327,15 @@ static void sdl_ctx_check_window(void *data, bool *quit, case SDL_WINDOWEVENT: if (event.window.event == SDL_WINDOWEVENT_RESIZED) { - sdl->g_resized = true; - sdl->g_new_width = event.window.data1; - sdl->g_new_height = event.window.data2; + sdl->resized = true; + sdl->new_width = event.window.data1; + sdl->new_height = event.window.data2; } #else case SDL_VIDEORESIZE: - sdl->g_resized = true; - sdl->g_new_width = event.resize.w; - sdl->g_new_height = event.resize.h; + sdl->resized = true; + sdl->new_width = event.resize.w; + sdl->new_height = event.resize.h; #endif break; default: @@ -343,12 +343,12 @@ static void sdl_ctx_check_window(void *data, bool *quit, } } - if (sdl->g_resized) + if (sdl->resized) { - *width = sdl->g_new_width; - *height = sdl->g_new_height; - *resize = true; - sdl->g_resized = false; + *width = sdl->new_width; + *height = sdl->new_height; + *resize = true; + sdl->resized = false; } } @@ -359,26 +359,19 @@ static bool sdl_ctx_has_focus(void *data) #ifdef HAVE_SDL2 gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; flags = (SDL_WINDOW_INPUT_FOCUS | SDL_WINDOW_MOUSE_FOCUS); - return (SDL_GetWindowFlags(sdl->g_win) & flags) == flags; + return (SDL_GetWindowFlags(sdl->win) & flags) == flags; #else flags = (SDL_APPINPUTFOCUS | SDL_APPACTIVE); return (SDL_GetAppState() & flags) == flags; #endif } -static bool sdl_ctx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - static void sdl_ctx_swap_buffers(void *data) { #ifdef HAVE_SDL2 gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)data; if (sdl) - SDL_GL_SwapWindow(sdl->g_win); + SDL_GL_SwapWindow(sdl->win); #else SDL_GL_SwapBuffers(); #endif @@ -397,11 +390,7 @@ static gfx_ctx_proc_t sdl_ctx_get_proc_address(const char *name) return (gfx_ctx_proc_t)SDL_GL_GetProcAddress(name); } -static void sdl_ctx_show_mouse(void *data, bool state) -{ - (void)data; - SDL_ShowCursor(state); -} +static void sdl_ctx_show_mouse(void *data, bool state) { SDL_ShowCursor(state); } static uint32_t sdl_ctx_get_flags(void *data) { @@ -412,10 +401,8 @@ static uint32_t sdl_ctx_get_flags(void *data) return flags; } -static void sdl_ctx_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static bool sdl_ctx_suppress_screensaver(void *data, bool enable) { return false; } +static void sdl_ctx_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_sdl_gl = { diff --git a/gfx/drivers_context/sixel_ctx.c b/gfx/drivers_context/sixel_ctx.c deleted file mode 100644 index 7b6ca0e226..0000000000 --- a/gfx/drivers_context/sixel_ctx.c +++ /dev/null @@ -1,180 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2010-2014 - Hans-Kristian Arntzen - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2019 - Brad Parker - * - * RetroArch is free software: you can redistribute it and/or modify it under the terms - * of the GNU General Public License as published by the Free Software Found- - * 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 . - */ - -/* SIXEL context. */ - -#ifdef HAVE_CONFIG_H -#include "../../config.h" -#endif - -#include "../../configuration.h" -#include "../../dynamic.h" -#include "../../retroarch.h" -#include "../../verbosity.h" -#include "../../ui/ui_companion_driver.h" - -#if defined(_WIN32) && !defined(_XBOX) -#include "../common/win32_common.h" -#endif - -static enum gfx_ctx_api sixel_ctx_api = GFX_CTX_NONE; - -static void gfx_ctx_sixel_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ -} - -static bool gfx_ctx_sixel_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - return false; -} - -static void gfx_ctx_sixel_get_video_size(void *data, - unsigned *width, unsigned *height) -{ - (void)data; -} - -static void *gfx_ctx_sixel_init(void *video_driver) -{ - (void)video_driver; - - return (void*)"sixel"; -} - -static void gfx_ctx_sixel_destroy(void *data) -{ - (void)data; -} - -static bool gfx_ctx_sixel_set_video_mode(void *data, - unsigned width, unsigned height, - bool fullscreen) -{ - return true; -} - -static void gfx_ctx_sixel_input_driver(void *data, - const char *joypad_name, - input_driver_t **input, void **input_data) -{ - (void)data; - -#ifdef HAVE_UDEV - *input_data = input_udev.init(joypad_name); - - if (*input_data) - { - *input = &input_udev; - return; - } -#endif - *input = NULL; - *input_data = NULL; -} - -static bool gfx_ctx_sixel_has_focus(void *data) -{ - return true; -} - -static bool gfx_ctx_sixel_suppress_screensaver(void *data, bool enable) -{ - return true; -} - -static bool gfx_ctx_sixel_get_metrics(void *data, - enum display_metric_types type, float *value) -{ - return false; -} - -static enum gfx_ctx_api gfx_ctx_sixel_get_api(void *data) -{ - return sixel_ctx_api; -} - -static bool gfx_ctx_sixel_bind_api(void *data, - enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - - return true; -} - -static void gfx_ctx_sixel_show_mouse(void *data, bool state) -{ - (void)data; -} - -static void gfx_ctx_sixel_swap_interval(void *data, int interval) -{ - (void)data; - (void)interval; -} - -static void gfx_ctx_sixel_set_flags(void *data, uint32_t flags) -{ - (void)data; - (void)flags; -} - -static uint32_t gfx_ctx_sixel_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} - -const gfx_ctx_driver_t gfx_ctx_sixel = { - gfx_ctx_sixel_init, - gfx_ctx_sixel_destroy, - gfx_ctx_sixel_get_api, - gfx_ctx_sixel_bind_api, - gfx_ctx_sixel_swap_interval, - gfx_ctx_sixel_set_video_mode, - gfx_ctx_sixel_get_video_size, - NULL, /* get_refresh_rate */ - NULL, /* get_video_output_size */ - NULL, /* get_video_output_prev */ - NULL, /* get_video_output_next */ - gfx_ctx_sixel_get_metrics, - NULL, - NULL, /* update_title */ - gfx_ctx_sixel_check_window, - gfx_ctx_sixel_set_resize, - gfx_ctx_sixel_has_focus, - gfx_ctx_sixel_suppress_screensaver, - true, /* has_windowed */ - NULL, /* swap_buffers */ - gfx_ctx_sixel_input_driver, - NULL, - NULL, - NULL, - gfx_ctx_sixel_show_mouse, - "sixel", - gfx_ctx_sixel_get_flags, - gfx_ctx_sixel_set_flags, - NULL, - NULL, - NULL -}; diff --git a/gfx/drivers_context/switch_ctx.c b/gfx/drivers_context/switch_ctx.c index a6cf2dc278..4633c864ac 100644 --- a/gfx/drivers_context/switch_ctx.c +++ b/gfx/drivers_context/switch_ctx.c @@ -27,8 +27,7 @@ #include "../common/switch_common.h" #include "../../frontend/frontend_driver.h" -static enum gfx_ctx_api ctx_nx_api = GFX_CTX_OPENGL_API; - +/* TODO/FIXME - global referenced */ extern bool platform_switch_has_focus; void switch_ctx_destroy(void *data) @@ -197,15 +196,12 @@ static void switch_ctx_input_driver(void *data, static enum gfx_ctx_api switch_ctx_get_api(void *data) { - return ctx_nx_api; + return GFX_CTX_OPENGL_API; } static bool switch_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - ctx_nx_api = api; - if (api == GFX_CTX_OPENGL_API) if (egl_bind_api(EGL_OPENGL_API)) return true; @@ -213,18 +209,8 @@ static bool switch_ctx_bind_api(void *data, return false; } -static bool switch_ctx_has_focus(void *data) -{ - (void)data; - return platform_switch_has_focus; -} - -static bool switch_ctx_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool switch_ctx_has_focus(void *data) { return platform_switch_has_focus; } +static bool switch_ctx_suppress_screensaver(void *data, bool enable) { return false; } static void switch_ctx_set_swap_interval(void *data, int swap_interval) @@ -245,13 +231,6 @@ static void switch_ctx_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t switch_ctx_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#endif -} - static void switch_ctx_bind_hw_render(void *data, bool enable) { switch_ctx_data_t *ctx_nx = (switch_ctx_data_t *)data; @@ -281,10 +260,7 @@ static uint32_t switch_ctx_get_flags(void *data) return flags; } -static void switch_ctx_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void switch_ctx_set_flags(void *data, uint32_t flags) { } static float switch_ctx_get_refresh_rate(void *data) { @@ -365,7 +341,11 @@ const gfx_ctx_driver_t switch_ctx = { false, /* has_windowed */ switch_ctx_swap_buffers, switch_ctx_input_driver, - switch_ctx_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/uwp_egl_ctx.c b/gfx/drivers_context/uwp_egl_ctx.c index 7367311ecc..3d0eb0ad5a 100644 --- a/gfx/drivers_context/uwp_egl_ctx.c +++ b/gfx/drivers_context/uwp_egl_ctx.c @@ -52,19 +52,15 @@ #include "../common/angle_common.h" #endif +/* TODO/FIXME - static globals */ +static egl_ctx_data_t uwp_egl; #ifdef HAVE_DYNAMIC static dylib_t dll_handle = NULL; /* Handle to libGLESv2.dll */ #endif -static void gfx_ctx_uwp_destroy(void *data); - -static egl_ctx_data_t uwp_egl; -static int uwp_interval = 0; -static enum gfx_ctx_api uwp_api = GFX_CTX_OPENGL_ES_API; - typedef struct gfx_ctx_cgl_data { - void *empty; + int interval; } gfx_ctx_uwp_data_t; bool create_gles_context(void* corewindow) @@ -119,31 +115,15 @@ error: static void gfx_ctx_uwp_swap_interval(void *data, int interval) { - (void)data; + gfx_ctx_uwp_data_t *uwp = (gfx_ctx_uwp_data_t*)data; - switch (uwp_api) + if (uwp->interval != interval) { - case GFX_CTX_OPENGL_ES_API: - if (uwp_interval != interval) - { - uwp_interval = interval; - egl_set_swap_interval(&uwp_egl, uwp_interval); - } - break; - - case GFX_CTX_NONE: - default: - break; + uwp->interval = interval; + egl_set_swap_interval(&uwp_egl, uwp->interval); } } -static void gfx_ctx_uwp_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ - win32_check_window(quit, resize, width, height); -} - - static gfx_ctx_proc_t gfx_ctx_uwp_get_proc_address(const char* symbol) { #ifdef HAVE_DYNAMIC @@ -154,36 +134,17 @@ static gfx_ctx_proc_t gfx_ctx_uwp_get_proc_address(const char* symbol) } -static void gfx_ctx_uwp_swap_buffers(void *data) -{ - switch (uwp_api) - { - case GFX_CTX_OPENGL_ES_API: - egl_swap_buffers(&uwp_egl); - break; - case GFX_CTX_NONE: - default: - break; - } -} +static void gfx_ctx_uwp_swap_buffers(void *data) { egl_swap_buffers(&uwp_egl); } static bool gfx_ctx_uwp_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - return false; -} - + unsigned width, unsigned height) { return false; } static void gfx_ctx_uwp_get_video_size(void *data, unsigned *width, unsigned *height) { bool quit; bool resize; - win32_check_window(&quit, &resize, width, height); + win32_check_window(NULL, &quit, &resize, width, height); } static void *gfx_ctx_uwp_init(void *video_driver) @@ -193,7 +154,6 @@ static void *gfx_ctx_uwp_init(void *video_driver) if (!uwp) return NULL; - #ifdef HAVE_DYNAMIC dll_handle = dylib_load("libGLESv2.dll"); #endif @@ -204,39 +164,35 @@ static void *gfx_ctx_uwp_init(void *video_driver) static void gfx_ctx_uwp_destroy(void *data) { gfx_ctx_uwp_data_t *wgl = (gfx_ctx_uwp_data_t*)data; + + if (!wgl) + return; - switch (uwp_api) - { - case GFX_CTX_OPENGL_ES_API: - egl_destroy(&uwp_egl); - break; - - case GFX_CTX_NONE: - default: - break; - } + egl_destroy(&uwp_egl); #ifdef HAVE_DYNAMIC dylib_close(dll_handle); #endif - } static bool gfx_ctx_uwp_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { + gfx_ctx_uwp_data_t *uwp = (gfx_ctx_uwp_data_t*)data; + if (!win32_set_video_mode(NULL, width, height, fullscreen)) { RARCH_ERR("[UWP EGL]: win32_set_video_mode failed.\n"); } - if (!create_gles_context(uwp_get_corewindow())) { + if (!create_gles_context(uwp_get_corewindow())) + { RARCH_ERR("[UWP EGL]: create_gles_context failed.\n"); goto error; } - gfx_ctx_uwp_swap_interval(data, uwp_interval); + gfx_ctx_uwp_swap_interval(data, uwp->interval); return true; error: @@ -255,66 +211,45 @@ static void gfx_ctx_uwp_input_driver(void *data, if (string_is_equal(settings->arrays.input_driver, "xinput")) { void* xinput = input_xinput.init(joypad_name); - *input = xinput ? (input_driver_t*)&input_xinput : NULL; - *input_data = xinput; + *input = xinput ? (input_driver_t*)&input_xinput : NULL; + *input_data = xinput; } else { - void* uwp = input_uwp.init(joypad_name); - *input = uwp ? (input_driver_t*)&input_uwp : NULL; + void* uwp = input_uwp.init(joypad_name); + *input = uwp ? (input_driver_t*)&input_uwp : NULL; *input_data = uwp; } } static enum gfx_ctx_api gfx_ctx_uwp_get_api(void *data) { - return uwp_api; + return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_uwp_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - if (api == GFX_CTX_OPENGL_ES_API) return true; - else - return false; + return false; } static void gfx_ctx_uwp_bind_hw_render(void *data, bool enable) { - switch (uwp_api) - { - case GFX_CTX_OPENGL_ES_API: - egl_bind_hw_render(&uwp_egl, enable); - break; - - case GFX_CTX_NONE: - default: - break; - } + egl_bind_hw_render(&uwp_egl, enable); } static uint32_t gfx_ctx_uwp_get_flags(void *data) { uint32_t flags = 0; - switch (uwp_api) - { - case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); #endif #ifdef HAVE_GLSL - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); #endif - break; - - case GFX_CTX_NONE: - default: - break; - } return flags; } @@ -334,7 +269,7 @@ const gfx_ctx_driver_t gfx_ctx_uwp = { win32_get_metrics, NULL, NULL, /* update title */ - gfx_ctx_uwp_check_window, + win32_check_window, gfx_ctx_uwp_set_resize, win32_has_focus, NULL, /* suppress screensaver */ diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 9eceb5da57..5ea4070472 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -74,11 +74,12 @@ typedef struct EGLContext eglimage_ctx; EGLSurface pbuff_surf; VGImage vgimage[MAX_EGLIMAGE_TEXTURES]; + PFNEGLCREATEIMAGEKHRPROC peglCreateImageKHR; + PFNEGLDESTROYIMAGEKHRPROC peglDestroyImageKHR; } vc_ctx_data_t; +/* TODO/FIXME - static globals */ static enum gfx_ctx_api vc_api = GFX_CTX_NONE; -static PFNEGLCREATEIMAGEKHRPROC peglCreateImageKHR; -static PFNEGLDESTROYIMAGEKHRPROC peglDestroyImageKHR; static INLINE bool gfx_ctx_vc_egl_query_extension(vc_ctx_data_t *vc, const char *ext) { @@ -146,7 +147,102 @@ static void dispmanx_vsync_callback(DISPMANX_UPDATE_HANDLE_T u, void *data) slock_unlock(vc->vsync_condition_mutex); } -static void gfx_ctx_vc_destroy(void *data); +static void gfx_ctx_vc_destroy(void *data) +{ + vc_ctx_data_t *vc = (vc_ctx_data_t*)data; + unsigned i; + + if (!vc) + { + g_egl_inited = false; + return; + } + + if (vc->egl.dpy) + { + for (i = 0; i < MAX_EGLIMAGE_TEXTURES; i++) + { + if (vc->eglBuffer[i] && vc->peglDestroyImageKHR) + { + egl_bind_api(EGL_OPENVG_API); + eglMakeCurrent(vc->egl.dpy, + vc->pbuff_surf, vc->pbuff_surf, vc->eglimage_ctx); + vc->peglDestroyImageKHR(vc->egl.dpy, vc->eglBuffer[i]); + } + + if (vc->vgimage[i]) + { + egl_bind_api(EGL_OPENVG_API); + eglMakeCurrent(vc->egl.dpy, + vc->pbuff_surf, vc->pbuff_surf, vc->eglimage_ctx); + vgDestroyImage(vc->vgimage[i]); + } + } + + if (vc->egl.ctx) + { + gfx_ctx_vc_bind_api(data, vc_api, 0, 0); + eglMakeCurrent(vc->egl.dpy, + EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(vc->egl.dpy, vc->egl.ctx); + } + + if (vc->egl.hw_ctx) + eglDestroyContext(vc->egl.dpy, vc->egl.hw_ctx); + + if (vc->eglimage_ctx) + { + egl_bind_api(EGL_OPENVG_API); + eglMakeCurrent(vc->egl.dpy, + EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + eglDestroyContext(vc->egl.dpy, vc->eglimage_ctx); + } + + if (vc->egl.surf) + { + gfx_ctx_vc_bind_api(data, vc_api, 0, 0); + eglDestroySurface(vc->egl.dpy, vc->egl.surf); + } + + if (vc->pbuff_surf) + { + egl_bind_api(EGL_OPENVG_API); + eglDestroySurface(vc->egl.dpy, vc->pbuff_surf); + } + + egl_bind_api(EGL_OPENVG_API); + eglMakeCurrent(vc->egl.dpy, + EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + gfx_ctx_vc_bind_api(data, vc_api, 0, 0); + eglMakeCurrent(vc->egl.dpy, + EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); + egl_terminate(vc->egl.dpy); + } + + vc->egl.ctx = NULL; + vc->egl.hw_ctx = NULL; + vc->eglimage_ctx = NULL; + vc->egl.surf = NULL; + vc->pbuff_surf = NULL; + vc->egl.dpy = NULL; + vc->egl.config = 0; + g_egl_inited = false; + + for (i = 0; i < MAX_EGLIMAGE_TEXTURES; i++) + { + vc->eglBuffer[i] = NULL; + vc->vgimage[i] = 0; + } + + /* Stop generating vsync callbacks if we are doing so. + * Don't destroy the context while cbs are being generated! */ + if (vc->vsync_callback_set) + vc_dispmanx_vsync_callback(vc->dispman_display, NULL, NULL); + + /* Destroy mutexes and conditions. */ + slock_free(vc->vsync_condition_mutex); + scond_free(vc->vsync_condition); +} static void *gfx_ctx_vc_init(void *video_driver) { @@ -382,103 +478,6 @@ static bool gfx_ctx_vc_bind_api(void *data, return false; } -static void gfx_ctx_vc_destroy(void *data) -{ - vc_ctx_data_t *vc = (vc_ctx_data_t*)data; - unsigned i; - - if (!vc) - { - g_egl_inited = false; - return; - } - - if (vc->egl.dpy) - { - for (i = 0; i < MAX_EGLIMAGE_TEXTURES; i++) - { - if (vc->eglBuffer[i] && peglDestroyImageKHR) - { - egl_bind_api(EGL_OPENVG_API); - eglMakeCurrent(vc->egl.dpy, - vc->pbuff_surf, vc->pbuff_surf, vc->eglimage_ctx); - peglDestroyImageKHR(vc->egl.dpy, vc->eglBuffer[i]); - } - - if (vc->vgimage[i]) - { - egl_bind_api(EGL_OPENVG_API); - eglMakeCurrent(vc->egl.dpy, - vc->pbuff_surf, vc->pbuff_surf, vc->eglimage_ctx); - vgDestroyImage(vc->vgimage[i]); - } - } - - if (vc->egl.ctx) - { - gfx_ctx_vc_bind_api(data, vc_api, 0, 0); - eglMakeCurrent(vc->egl.dpy, - EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(vc->egl.dpy, vc->egl.ctx); - } - - if (vc->egl.hw_ctx) - eglDestroyContext(vc->egl.dpy, vc->egl.hw_ctx); - - if (vc->eglimage_ctx) - { - egl_bind_api(EGL_OPENVG_API); - eglMakeCurrent(vc->egl.dpy, - EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - eglDestroyContext(vc->egl.dpy, vc->eglimage_ctx); - } - - if (vc->egl.surf) - { - gfx_ctx_vc_bind_api(data, vc_api, 0, 0); - eglDestroySurface(vc->egl.dpy, vc->egl.surf); - } - - if (vc->pbuff_surf) - { - egl_bind_api(EGL_OPENVG_API); - eglDestroySurface(vc->egl.dpy, vc->pbuff_surf); - } - - egl_bind_api(EGL_OPENVG_API); - eglMakeCurrent(vc->egl.dpy, - EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - gfx_ctx_vc_bind_api(data, vc_api, 0, 0); - eglMakeCurrent(vc->egl.dpy, - EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); - egl_terminate(vc->egl.dpy); - } - - vc->egl.ctx = NULL; - vc->egl.hw_ctx = NULL; - vc->eglimage_ctx = NULL; - vc->egl.surf = NULL; - vc->pbuff_surf = NULL; - vc->egl.dpy = NULL; - vc->egl.config = 0; - g_egl_inited = false; - - for (i = 0; i < MAX_EGLIMAGE_TEXTURES; i++) - { - vc->eglBuffer[i] = NULL; - vc->vgimage[i] = 0; - } - - /* Stop generating vsync callbacks if we are doing so. - * Don't destroy the context while cbs are being generated! */ - if (vc->vsync_callback_set) - vc_dispmanx_vsync_callback(vc->dispman_display, NULL, NULL); - - /* Destroy mutexes and conditions. */ - slock_free(vc->vsync_condition_mutex); - scond_free(vc->vsync_condition); -} - static void gfx_ctx_vc_input_driver(void *data, const char *name, input_driver_t **input, void **input_data) @@ -487,23 +486,12 @@ static void gfx_ctx_vc_input_driver(void *data, *input_data = NULL; } -static bool gfx_ctx_vc_has_focus(void *data) -{ - (void)data; - return g_egl_inited; -} - -static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static bool gfx_ctx_vc_has_focus(void *data) { return g_egl_inited; } +static bool gfx_ctx_vc_suppress_screensaver(void *data, bool enable) { return false; } static float gfx_ctx_vc_translate_aspect(void *data, unsigned width, unsigned height) { - (void)data; /* Check for SD televisions: they should always be 4:3. */ if ((width == 640 || width == 720) && (height == 480 || height == 576)) return 4.0f / 3.0f; @@ -526,11 +514,11 @@ static bool gfx_ctx_vc_image_buffer_init(void *data, if (vc_api == GFX_CTX_OPENVG_API) return false; - peglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)egl_get_proc_address("eglCreateImageKHR"); - peglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)egl_get_proc_address("eglDestroyImageKHR"); + vc->peglCreateImageKHR = (PFNEGLCREATEIMAGEKHRPROC)egl_get_proc_address("eglCreateImageKHR"); + vc->peglDestroyImageKHR = (PFNEGLDESTROYIMAGEKHRPROC)egl_get_proc_address("eglDestroyImageKHR"); - if ( !peglCreateImageKHR || - !peglDestroyImageKHR || + if ( !vc->peglCreateImageKHR || + !vc->peglDestroyImageKHR || !gfx_ctx_vc_egl_query_extension(vc, "KHR_image") ) return false; @@ -587,8 +575,9 @@ fail: return false; } -static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigned width, - unsigned height, unsigned pitch, bool rgb32, unsigned index, void **image_handle) +static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, + unsigned width, unsigned height, + unsigned pitch, bool rgb32, unsigned index, void **image_handle) { bool ret = false; vc_ctx_data_t *vc = (vc_ctx_data_t*)data; @@ -602,12 +591,12 @@ static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigne if (!vc->eglBuffer[index] || !vc->vgimage[index]) { - vc->vgimage[index] = vgCreateImage( + vc->vgimage[index] = vgCreateImage( rgb32 ? VG_sXRGB_8888 : VG_sRGB_565, vc->res, vc->res, VG_IMAGE_QUALITY_NONANTIALIASED); - vc->eglBuffer[index] = peglCreateImageKHR( + vc->eglBuffer[index] = vc->peglCreateImageKHR( vc->egl.dpy, vc->eglimage_ctx, EGL_VG_PARENT_IMAGE_KHR, @@ -681,15 +670,6 @@ static void gfx_ctx_vc_bind_hw_render(void *data, bool enable) #endif } -static gfx_ctx_proc_t gfx_ctx_vc_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static uint32_t gfx_ctx_vc_get_flags(void *data) { uint32_t flags = 0; @@ -698,10 +678,7 @@ static uint32_t gfx_ctx_vc_get_flags(void *data) return flags; } -static void gfx_ctx_vc_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_vc_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_videocore = { gfx_ctx_vc_init, @@ -725,7 +702,11 @@ const gfx_ctx_driver_t gfx_ctx_videocore = { false, /* has_windowed */ gfx_ctx_vc_swap_buffers, gfx_ctx_vc_input_driver, - gfx_ctx_vc_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif gfx_ctx_vc_image_buffer_init, gfx_ctx_vc_image_buffer_write, NULL, diff --git a/gfx/drivers_context/vita_ctx.c b/gfx/drivers_context/vita_ctx.c index 6cecfeb308..3d95a3c142 100644 --- a/gfx/drivers_context/vita_ctx.c +++ b/gfx/drivers_context/vita_ctx.c @@ -18,15 +18,10 @@ #include "../../retroarch.h" -static void vita_swap_interval(void *data, int interval) -{ - (void)data; - vglWaitVblankStart(interval); -} +static void vita_swap_interval(void *data, int interval) { vglWaitVblankStart(interval); } static void vita_get_video_size(void *data, unsigned *width, unsigned *height) { - (void)data; *width = 960; *height = 544; } @@ -50,95 +45,26 @@ static void vita_check_window(void *data, bool *quit, static void vita_swap_buffers(void *data) { - (void)data; vglStopRendering(); vglStartRendering(); } static bool vita_set_video_mode(void *data, unsigned width, unsigned height, - bool fullscreen) -{ - (void)data; - (void)width; - (void)height; - (void)fullscreen; - - return true; -} - -static void vita_destroy(void *data) -{ - (void)data; -} - + bool fullscreen) { return true; } +static void vita_destroy(void *data) { } static void vita_input_driver(void *data, const char *name, - input_driver_t **input, void **input_data) -{ - (void)data; - (void)input; - (void)input_data; -} - -static bool vita_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool vita_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} - -static enum gfx_ctx_api vita_get_api(void *data) -{ - return GFX_CTX_NONE; -} - -static bool vita_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) -{ - (void)data; - (void)api; - (void)major; - (void)minor; - - return true; -} - -static void vita_show_mouse(void *data, bool state) -{ - (void)data; - (void)state; -} - -static void vita_bind_hw_render(void *data, bool enable) -{ - (void)data; - (void)enable; -} - -static void *vita_init(void *video_driver) -{ - (void)video_driver; - - return (void*)"vita"; -} - -static uint32_t vita_get_flags(void *data) -{ - uint32_t flags = 0; - - return flags; -} - -static void vita_set_flags(void *data, uint32_t flags) -{ - (void)data; -} + input_driver_t **input, void **input_data) { } +static bool vita_has_focus(void *data) { return true; } +static bool vita_suppress_screensaver(void *data, bool enable) { return false; } +static enum gfx_ctx_api vita_get_api(void *data) { return GFX_CTX_OPENGL_ES_API; } +static bool vita_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { return true; } +static void vita_show_mouse(void *data, bool state) { } +static void vita_bind_hw_render(void *data, bool enable) { } +static void *vita_init(void *video_driver) { return (void*)"vita"; } +static uint32_t vita_get_flags(void *data) { return 0; } +static void vita_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t vita_ctx = { vita_init, diff --git a/gfx/drivers_context/vivante_fbdev_ctx.c b/gfx/drivers_context/vivante_fbdev_ctx.c index da89fdcf32..16911fa554 100644 --- a/gfx/drivers_context/vivante_fbdev_ctx.c +++ b/gfx/drivers_context/vivante_fbdev_ctx.c @@ -43,8 +43,6 @@ typedef struct unsigned width, height; } vivante_ctx_data_t; -static enum gfx_ctx_api viv_api = GFX_CTX_NONE; - static void gfx_ctx_vivante_destroy(void *data) { vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; @@ -188,32 +186,20 @@ static void gfx_ctx_vivante_input_driver(void *data, static enum gfx_ctx_api gfx_ctx_vivante_get_api(void *data) { - return viv_api; + return GFX_CTX_OPENGL_ES_API; } static bool gfx_ctx_vivante_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - - viv_api = api; - if (api == GFX_CTX_OPENGL_ES_API) return true; return false; } -static bool gfx_ctx_vivante_has_focus(void *data) -{ - (void)data; - return true; -} - -static bool gfx_ctx_vivante_suppress_screensaver(void *data, bool enable) -{ - (void)data; - (void)enable; - return false; -} +static void gfx_ctx_vivante_set_flags(void *data, uint32_t flags) { } +static bool gfx_ctx_vivante_has_focus(void *data) { return true; } +static bool gfx_ctx_vivante_suppress_screensaver(void *data, bool enable) { return false; } static void gfx_ctx_vivante_set_swap_interval(void *data, int swap_interval) { @@ -233,15 +219,6 @@ static void gfx_ctx_vivante_swap_buffers(void *data) #endif } -static gfx_ctx_proc_t gfx_ctx_vivante_get_proc_address(const char *symbol) -{ -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - return NULL; -#endif -} - static void gfx_ctx_vivante_bind_hw_render(void *data, bool enable) { vivante_ctx_data_t *viv = (vivante_ctx_data_t*)data; @@ -260,11 +237,6 @@ static uint32_t gfx_ctx_vivante_get_flags(void *data) return flags; } -static void gfx_ctx_vivante_set_flags(void *data, uint32_t flags) -{ - (void)data; -} - const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { gfx_ctx_vivante_init, gfx_ctx_vivante_destroy, @@ -287,7 +259,11 @@ const gfx_ctx_driver_t gfx_ctx_vivante_fbdev = { false, /* has_windowed */ gfx_ctx_vivante_swap_buffers, gfx_ctx_vivante_input_driver, - gfx_ctx_vivante_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, NULL, diff --git a/gfx/drivers_context/w_vk_ctx.c b/gfx/drivers_context/w_vk_ctx.c new file mode 100644 index 0000000000..ea0901701a --- /dev/null +++ b/gfx/drivers_context/w_vk_ctx.c @@ -0,0 +1,343 @@ +/* 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 . + */ + +#include + +/* Win32/WGL context. */ + +/* necessary for mingw32 multimon defines: */ +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0500 //_WIN32_WINNT_WIN2K +#endif + +#include +#include + +#include +#include + +#include +#include + +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../../configuration.h" +#include "../../dynamic.h" +#include "../../retroarch.h" +#include "../../verbosity.h" +#include "../../frontend/frontend_driver.h" + +#include "../common/win32_common.h" + +#include "../common/vulkan_common.h" + +typedef struct gfx_ctx_w_vk_data +{ + void *empty; +} gfx_ctx_w_vk_data_t; + +/* TODO/FIXME - static globals */ +static gfx_ctx_vulkan_data_t win32_vk; +static void *dinput_vk_wgl = NULL; +static int win32_vk_interval = 0; + +void create_vk_context(HWND hwnd, bool *quit) +{ + RECT rect; + HINSTANCE instance; + unsigned width = 0; + unsigned height = 0; + + GetClientRect(hwnd, &rect); + + instance = GetModuleHandle(NULL); + width = rect.right - rect.left; + height = rect.bottom - rect.top; + + if (!vulkan_surface_create(&win32_vk, VULKAN_WSI_WIN32, + &instance, &hwnd, + width, height, win32_vk_interval)) + *quit = true; + + g_win32_inited = true; +} + +static void gfx_ctx_w_vk_swap_interval(void *data, int interval) +{ + if (win32_vk_interval != interval) + { + win32_vk_interval = interval; + if (win32_vk.swapchain) + win32_vk.need_new_swapchain = true; + } +} + +static void gfx_ctx_w_vk_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height) +{ + win32_check_window(NULL, quit, resize, width, height); + + if (win32_vk.need_new_swapchain) + *resize = true; +} + +static void gfx_ctx_w_vk_swap_buffers(void *data) +{ + vulkan_present(&win32_vk, win32_vk.context.current_swapchain_index); + vulkan_acquire_next_image(&win32_vk); +} + +static bool gfx_ctx_w_vk_set_resize(void *data, + unsigned width, unsigned height) +{ + if (!vulkan_create_swapchain(&win32_vk, width, height, win32_vk_interval)) + { + RARCH_ERR("[Win32/Vulkan]: Failed to update swapchain.\n"); + return false; + } + + if (win32_vk.created_new_swapchain) + vulkan_acquire_next_image(&win32_vk); + win32_vk.context.invalid_swapchain = true; + win32_vk.need_new_swapchain = false; + + return true; +} + +static void gfx_ctx_w_vk_update_title(void *data) +{ + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (title[0]) + { + const ui_window_t *window = ui_companion_driver_get_window_ptr(); + + if (window) + window->set_title(&main_window, title); + } +} + +static void gfx_ctx_w_vk_get_video_size(void *data, + unsigned *width, unsigned *height) +{ + HWND window = win32_get_window(); + + (void)data; + + if (!window) + { + RECT mon_rect; + MONITORINFOEX current_mon; + unsigned mon_id = 0; + HMONITOR hm_to_use = NULL; + + win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); + mon_rect = current_mon.rcMonitor; + *width = mon_rect.right - mon_rect.left; + *height = mon_rect.bottom - mon_rect.top; + } + else + { + *width = g_win32_resize_width; + *height = g_win32_resize_height; + } +} + +static void gfx_ctx_w_vk_destroy(void *data) +{ + HWND window = win32_get_window(); + gfx_ctx_w_vk_data_t *wgl = (gfx_ctx_w_vk_data_t*)data; + + vulkan_context_destroy(&win32_vk, win32_vk.vk_surface != VK_NULL_HANDLE); + if (win32_vk.context.queue_lock) + slock_free(win32_vk.context.queue_lock); + memset(&win32_vk, 0, sizeof(win32_vk)); + + if (window) + { + win32_monitor_from_window(); + win32_destroy_window(); + } + + if (g_win32_restore_desktop) + { + win32_monitor_get_info(); + g_win32_restore_desktop = false; + } + + if (wgl) + free(wgl); + + g_win32_inited = false; +} + +static void *gfx_ctx_w_vk_init(void *video_driver) +{ + WNDCLASSEX wndclass = {0}; + gfx_ctx_w_vk_data_t *wgl = (gfx_ctx_w_vk_data_t*)calloc(1, sizeof(*wgl)); + + if (!wgl) + return NULL; + + if (g_win32_inited) + gfx_ctx_w_vk_destroy(NULL); + + win32_window_reset(); + win32_monitor_init(); + + wndclass.lpfnWndProc = WndProcVK; + if (!win32_window_init(&wndclass, true, NULL)) + goto error; + + if (!vulkan_context_init(&win32_vk, VULKAN_WSI_WIN32)) + goto error; + + return wgl; + +error: + if (wgl) + free(wgl); + return NULL; +} + +static bool gfx_ctx_w_vk_set_video_mode(void *data, + unsigned width, unsigned height, + bool fullscreen) +{ + win32_vk.fullscreen = fullscreen; + + if (!win32_set_video_mode(NULL, width, height, fullscreen)) + { + RARCH_ERR("[WGL]: win32_set_video_mode failed.\n"); + goto error; + } + + gfx_ctx_w_vk_swap_interval(data, win32_vk_interval); + return true; + +error: + gfx_ctx_w_vk_destroy(data); + return false; +} + +static void gfx_ctx_w_vk_input_driver(void *data, + const char *joypad_name, + input_driver_t **input, void **input_data) +{ + settings_t *settings = config_get_ptr(); + +#if _WIN32_WINNT >= 0x0501 +#ifdef HAVE_WINRAWINPUT + const char *input_driver = settings->arrays.input_driver; + + /* winraw only available since XP */ + if (string_is_equal(input_driver, "raw")) + { + *input_data = input_winraw.init(joypad_name); + if (*input_data) + { + *input = &input_winraw; + dinput_vk_wgl = NULL; + return; + } + } +#endif +#endif + +#ifdef HAVE_DINPUT + dinput_vk_wgl = input_dinput.init(joypad_name); + *input = dinput_vk_wgl ? &input_dinput : NULL; + *input_data = dinput_vk_wgl; +#endif +} + +static enum gfx_ctx_api gfx_ctx_w_vk_get_api(void *data) { return GFX_CTX_VULKAN_API; } + +static bool gfx_ctx_w_vk_bind_api(void *data, + enum gfx_ctx_api api, unsigned major, unsigned minor) +{ + if (api == GFX_CTX_VULKAN_API) + return true; + return false; +} + +static void gfx_ctx_w_vk_bind_hw_render(void *data, bool enable) { } + +static void *gfx_ctx_w_vk_get_context_data(void *data) { return &win32_vk.context; } + +static uint32_t gfx_ctx_w_vk_get_flags(void *data) +{ + uint32_t flags = 0; +#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); +#endif + return flags; +} + +static void gfx_ctx_w_vk_set_flags(void *data, uint32_t flags) { } + +static void gfx_ctx_w_vk_get_video_output_size(void *data, + unsigned *width, unsigned *height) +{ + win32_get_video_output_size(width, height); +} + +static void gfx_ctx_w_vk_get_video_output_prev(void *data) { } + +static void gfx_ctx_w_vk_get_video_output_next(void *data) { } + +const gfx_ctx_driver_t gfx_ctx_w_vk = { + gfx_ctx_w_vk_init, + gfx_ctx_w_vk_destroy, + gfx_ctx_w_vk_get_api, + gfx_ctx_w_vk_bind_api, + gfx_ctx_w_vk_swap_interval, + gfx_ctx_w_vk_set_video_mode, + gfx_ctx_w_vk_get_video_size, + win32_get_refresh_rate, + gfx_ctx_w_vk_get_video_output_size, + gfx_ctx_w_vk_get_video_output_prev, + gfx_ctx_w_vk_get_video_output_next, + win32_get_metrics, + NULL, + gfx_ctx_w_vk_update_title, + gfx_ctx_w_vk_check_window, + gfx_ctx_w_vk_set_resize, + win32_has_focus, + win32_suppress_screensaver, + true, /* has_windowed */ + gfx_ctx_w_vk_swap_buffers, + gfx_ctx_w_vk_input_driver, + NULL, + NULL, + NULL, + win32_show_cursor, + "w_vk", + gfx_ctx_w_vk_get_flags, + gfx_ctx_w_vk_set_flags, + gfx_ctx_w_vk_bind_hw_render, + gfx_ctx_w_vk_get_context_data, + NULL +}; diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index f6368705a3..2b66963820 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -14,7 +14,6 @@ * If not, see . */ -#include #include #include @@ -28,13 +27,6 @@ #ifdef HAVE_EGL #include -#endif - -#ifdef HAVE_VULKAN -#include "../common/vulkan_common.h" -#endif - -#ifdef HAVE_EGL #include "../common/egl_common.h" #endif @@ -42,8 +34,8 @@ #include "../common/gl_common.h" #endif -#include "../common/wayland_common.h" #include "../../frontend/frontend_driver.h" +#include "../../input/common/wayland_common.h" #include "../../input/input_driver.h" #include "../../input/input_keymaps.h" #include "../../verbosity.h" @@ -60,92 +52,6 @@ /* Generated from xdg-decoration-unstable-v1.h */ #include "../common/wayland/xdg-decoration-unstable-v1.h" -#define WL_ARRAY_FOR_EACH(pos, array, type) \ - for (pos = (type)(array)->data; \ - (const char *) pos < ((const char *) (array)->data + (array)->size); \ - (pos)++) - -typedef struct touch_pos -{ - bool active; - int32_t id; - unsigned x; - unsigned y; -} touch_pos_t; - -typedef struct output_info -{ - struct wl_output *output; - uint32_t global_id; - unsigned width; - unsigned height; - unsigned physical_width; - unsigned physical_height; - int refresh_rate; - unsigned scale; - struct wl_list link; /* wl->all_outputs */ -} output_info_t; - - -typedef struct gfx_ctx_wayland_data -{ -#ifdef HAVE_EGL - egl_ctx_data_t egl; - struct wl_egl_window *win; -#endif - bool fullscreen; - bool maximized; - bool resize; - bool configured; - bool activated; - unsigned prev_width; - unsigned prev_height; - unsigned width; - unsigned height; - struct wl_registry *registry; - struct wl_compositor *compositor; - struct wl_surface *surface; - struct zxdg_surface_v6 *zxdg_surface; - struct zxdg_shell_v6 *zxdg_shell; - struct zxdg_toplevel_v6 *zxdg_toplevel; - struct xdg_surface *xdg_surface; - struct xdg_wm_base *xdg_shell; - struct xdg_toplevel *xdg_toplevel; - struct wl_keyboard *wl_keyboard; - struct wl_pointer *wl_pointer; - struct wl_touch *wl_touch; - struct wl_seat *seat; - struct wl_shm *shm; - struct zxdg_decoration_manager_v1 *deco_manager; - struct zxdg_toplevel_decoration_v1 *deco; - struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager; - struct zwp_idle_inhibitor_v1 *idle_inhibitor; - struct wl_list all_outputs; - output_info_t *current_output; - int swap_interval; - bool core_hw_context_enable; - - unsigned last_buffer_scale; - unsigned buffer_scale; - - struct - { - struct wl_cursor *default_cursor; - struct wl_cursor_theme *theme; - struct wl_surface *surface; - uint32_t serial; - bool visible; - } cursor; - - input_ctx_wayland_data_t input; - -#ifdef HAVE_VULKAN - gfx_ctx_vulkan_data_t vk; -#endif - int num_active_touches; - touch_pos_t active_touch_positions[MAX_TOUCHES]; -} gfx_ctx_wayland_data_t; - static enum gfx_ctx_api wl_api = GFX_CTX_NONE; #ifndef EGL_OPENGL_ES3_BIT_KHR @@ -156,508 +62,8 @@ static enum gfx_ctx_api wl_api = GFX_CTX_NONE; #define EGL_PLATFORM_WAYLAND_KHR 0x31D8 #endif -#ifdef HAVE_XKBCOMMON -/* FIXME: Move this into a header? */ -int init_xkb(int fd, size_t size); -int handle_xkb(int code, int value); -void handle_xkb_state_mask(uint32_t depressed, - uint32_t latched, uint32_t locked, uint32_t group); -void free_xkb(void); -#endif - -static void keyboard_handle_keymap(void* data, - struct wl_keyboard* keyboard, - uint32_t format, - int fd, - uint32_t size) -{ - (void)data; - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) - { - close(fd); - return; - } - -#ifdef HAVE_XKBCOMMON - if (init_xkb(fd, size) < 0) - RARCH_ERR("[Wayland]: Failed to init keymap.\n"); -#endif - close(fd); - - RARCH_LOG("[Wayland]: Loaded keymap.\n"); -} - -static void keyboard_handle_enter(void* data, - struct wl_keyboard* keyboard, - uint32_t serial, - struct wl_surface* surface, - struct wl_array* keys) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->input.keyboard_focus = true; -} - -static void keyboard_handle_leave(void *data, - struct wl_keyboard *keyboard, - uint32_t serial, - struct wl_surface *surface) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->input.keyboard_focus = false; -} - -static void keyboard_handle_key(void *data, - struct wl_keyboard *keyboard, - uint32_t serial, - uint32_t time, - uint32_t key, - uint32_t state) -{ - (void)serial; - (void)time; - (void)keyboard; - - int value = 1; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - if (state == WL_KEYBOARD_KEY_STATE_PRESSED) - { - BIT_SET(wl->input.key_state, key); - value = 1; - } - else if (state == WL_KEYBOARD_KEY_STATE_RELEASED) - { - BIT_CLEAR(wl->input.key_state, key); - value = 0; - } - -#ifdef HAVE_XKBCOMMON - if (handle_xkb(key, value) == 0) - return; -#endif - input_keyboard_event(value, - input_keymaps_translate_keysym_to_rk(key), - 0, 0, RETRO_DEVICE_KEYBOARD); -} - -static void keyboard_handle_modifiers(void *data, - struct wl_keyboard *keyboard, - uint32_t serial, - uint32_t modsDepressed, - uint32_t modsLatched, - uint32_t modsLocked, - uint32_t group) -{ - (void)data; - (void)keyboard; - (void)serial; -#ifdef HAVE_XKBCOMMON - handle_xkb_state_mask(modsDepressed, modsLatched, modsLocked, group); -#else - (void)modsDepressed; - (void)modsLatched; - (void)modsLocked; - (void)group; -#endif -} - -void keyboard_handle_repeat_info(void *data, - struct wl_keyboard *wl_keyboard, - int32_t rate, - int32_t delay) -{ - (void)data; - (void)wl_keyboard; - (void)rate; - (void)delay; - /* TODO: Seems like we'll need this to get - * repeat working. We'll have to do it on our own. */ -} - -static const struct wl_keyboard_listener keyboard_listener = { - keyboard_handle_keymap, - keyboard_handle_enter, - keyboard_handle_leave, - keyboard_handle_key, - keyboard_handle_modifiers, - keyboard_handle_repeat_info -}; - -static void gfx_ctx_wl_show_mouse(void *data, bool state); - -static void pointer_handle_enter(void *data, - struct wl_pointer *pointer, - uint32_t serial, - struct wl_surface *surface, - wl_fixed_t sx, - wl_fixed_t sy) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - (void)pointer; - (void)serial; - (void)surface; - - wl->input.mouse.last_x = wl_fixed_to_int(sx * (wl_fixed_t)wl->buffer_scale); - wl->input.mouse.last_y = wl_fixed_to_int(sy * (wl_fixed_t)wl->buffer_scale); - wl->input.mouse.x = wl->input.mouse.last_x; - wl->input.mouse.y = wl->input.mouse.last_y; - wl->input.mouse.focus = true; - wl->cursor.serial = serial; - - gfx_ctx_wl_show_mouse(data, wl->cursor.visible); -} - -static void pointer_handle_leave(void *data, - struct wl_pointer *pointer, - uint32_t serial, - struct wl_surface *surface) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->input.mouse.focus = false; - (void)pointer; - (void)serial; - (void)surface; -} - -static void pointer_handle_motion(void *data, - struct wl_pointer *pointer, - uint32_t time, - wl_fixed_t sx, - wl_fixed_t sy) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - wl->input.mouse.x = wl_fixed_to_int( - (wl_fixed_t)wl->buffer_scale * sx); - wl->input.mouse.y = wl_fixed_to_int( - (wl_fixed_t)wl->buffer_scale * sy); -} - -static void pointer_handle_button(void *data, - struct wl_pointer *wl_pointer, - uint32_t serial, - uint32_t time, - uint32_t button, - uint32_t state) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - if (state == WL_POINTER_BUTTON_STATE_PRESSED) - { - if (button == BTN_LEFT) - { - wl->input.mouse.left = true; - - if (BIT_GET(wl->input.key_state, KEY_LEFTALT)) - { - if (wl->xdg_toplevel) - xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial); - else if (wl->zxdg_toplevel) - zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial); - } - } - else if (button == BTN_RIGHT) - wl->input.mouse.right = true; - else if (button == BTN_MIDDLE) - wl->input.mouse.middle = true; - } - else - { - if (button == BTN_LEFT) - wl->input.mouse.left = false; - else if (button == BTN_RIGHT) - wl->input.mouse.right = false; - else if (button == BTN_MIDDLE) - wl->input.mouse.middle = false; - } -} - -static void pointer_handle_axis(void *data, - struct wl_pointer *wl_pointer, - uint32_t time, - uint32_t axis, - wl_fixed_t value) -{ - (void)data; - (void)wl_pointer; - (void)time; - (void)axis; - (void)value; -} - -static const struct wl_pointer_listener pointer_listener = { - pointer_handle_enter, - pointer_handle_leave, - pointer_handle_motion, - pointer_handle_button, - pointer_handle_axis, -}; - -/* TODO: implement check for resize */ - -static void touch_handle_down(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - int32_t id, - wl_fixed_t x, - wl_fixed_t y) -{ - int i; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - if (wl->num_active_touches < MAX_TOUCHES) - { - for (i = 0; i < MAX_TOUCHES; i++) - { - /* Use next empty slot */ - if (!wl->active_touch_positions[i].active) - { - wl->active_touch_positions[wl->num_active_touches].active = true; - wl->active_touch_positions[wl->num_active_touches].id = id; - wl->active_touch_positions[wl->num_active_touches].x = (unsigned) - wl_fixed_to_int(x); - wl->active_touch_positions[wl->num_active_touches].y = (unsigned) - wl_fixed_to_int(y); - wl->num_active_touches++; - break; - } - } - } -} -static void reorder_touches(gfx_ctx_wayland_data_t *wl) -{ - int i, j; - if (wl->num_active_touches == 0) - return; - - for (i = 0; i < MAX_TOUCHES; i++) - { - if (!wl->active_touch_positions[i].active) - { - for (j=i+1; jactive_touch_positions[j].active) - { - wl->active_touch_positions[i].active = - wl->active_touch_positions[j].active; - wl->active_touch_positions[i].id = - wl->active_touch_positions[j].id; - wl->active_touch_positions[i].x = wl->active_touch_positions[j].x; - wl->active_touch_positions[i].y = wl->active_touch_positions[j].y; - wl->active_touch_positions[j].active = false; - wl->active_touch_positions[j].id = -1; - wl->active_touch_positions[j].x = (unsigned) 0; - wl->active_touch_positions[j].y = (unsigned) 0; - break; - } - - if (j == MAX_TOUCHES) - return; - } - } - } -} - -static void touch_handle_up(void *data, - struct wl_touch *wl_touch, - uint32_t serial, - uint32_t time, - int32_t id) -{ - int i; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - for (i = 0; i < MAX_TOUCHES; i++) - { - if ( wl->active_touch_positions[i].active && - wl->active_touch_positions[i].id == id) - { - wl->active_touch_positions[i].active = false; - wl->active_touch_positions[i].id = -1; - wl->active_touch_positions[i].x = (unsigned)0; - wl->active_touch_positions[i].y = (unsigned)0; - wl->num_active_touches--; - } - } - reorder_touches(wl); -} - -static void touch_handle_motion(void *data, - struct wl_touch *wl_touch, - uint32_t time, - int32_t id, - wl_fixed_t x, - wl_fixed_t y) -{ - int i; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - for (i = 0; i < MAX_TOUCHES; i++) - { - if ( wl->active_touch_positions[i].active && - wl->active_touch_positions[i].id == id) - { - wl->active_touch_positions[i].x = (unsigned) wl_fixed_to_int(x); - wl->active_touch_positions[i].y = (unsigned) wl_fixed_to_int(y); - } - } -} -static void touch_handle_frame(void *data, - struct wl_touch *wl_touch) -{ - /* TODO */ -} -static void touch_handle_cancel(void *data, - struct wl_touch *wl_touch) -{ - /* If i understand the spec correctly we have to reset all touches here - * since they were not ment for us anyway */ - int i; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - for (i = 0; i < MAX_TOUCHES; i++) - { - wl->active_touch_positions[i].active = false; - wl->active_touch_positions[i].id = -1; - wl->active_touch_positions[i].x = (unsigned) 0; - wl->active_touch_positions[i].y = (unsigned) 0; - } - - wl->num_active_touches = 0; -} -static const struct wl_touch_listener touch_listener = { - touch_handle_down, - touch_handle_up, - touch_handle_motion, - touch_handle_frame, - touch_handle_cancel, -}; - -static void seat_handle_capabilities(void *data, - struct wl_seat *seat, unsigned caps) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !wl->wl_keyboard) - { - wl->wl_keyboard = wl_seat_get_keyboard(seat); - wl_keyboard_add_listener(wl->wl_keyboard, &keyboard_listener, wl); - } - else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && wl->wl_keyboard) - { - wl_keyboard_destroy(wl->wl_keyboard); - wl->wl_keyboard = NULL; - } - if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wl->wl_pointer) - { - wl->wl_pointer = wl_seat_get_pointer(seat); - wl_pointer_add_listener(wl->wl_pointer, &pointer_listener, wl); - } - else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wl->wl_pointer) - { - wl_pointer_destroy(wl->wl_pointer); - wl->wl_pointer = NULL; - } - if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !wl->wl_touch) - { - wl->wl_touch = wl_seat_get_touch(seat); - wl_touch_add_listener(wl->wl_touch, &touch_listener, wl); - } - else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && wl->wl_touch) - { - wl_touch_destroy(wl->wl_touch); - wl->wl_touch = NULL; - } - -} - -static void seat_handle_name(void *data, - struct wl_seat *seat, const char *name) -{ - (void)data; - (void)seat; - RARCH_LOG("[Wayland]: Seat name: %s.\n", name); -} - -static const struct wl_seat_listener seat_listener = { - seat_handle_capabilities, - seat_handle_name, -}; - -/* Touch handle functions */ - -bool wayland_context_gettouchpos(void *data, unsigned id, - unsigned* touch_x, unsigned* touch_y) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - if (id >= MAX_TOUCHES) - return false; - *touch_x = wl->active_touch_positions[id].x; - *touch_y = wl->active_touch_positions[id].y; - return wl->active_touch_positions[id].active; -} - -/* Surface callbacks. */ -static bool gfx_ctx_wl_set_resize(void *data, - unsigned width, unsigned height); - -static void wl_surface_enter(void *data, struct wl_surface *wl_surface, - struct wl_output *output) -{ - output_info_t *oi; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - /* TODO: track all outputs the surface is on, pick highest scale */ - - wl_list_for_each(oi, &wl->all_outputs, link) - { - if (oi->output == output) - { - RARCH_LOG("[Wayland]: Entering output #%d, scale %d\n", oi->global_id, oi->scale); - wl->current_output = oi; - wl->last_buffer_scale = wl->buffer_scale; - wl->buffer_scale = oi->scale; - break; - } - }; -} - -static void wl_nop(void *a, struct wl_surface *b, struct wl_output *c) -{ - (void)a; - (void)b; - (void)c; -} - -static const struct wl_surface_listener wl_surface_listener = { - wl_surface_enter, - wl_nop, -}; - -/* Shell surface callbacks. */ -static void xdg_shell_ping(void *data, struct xdg_wm_base *shell, uint32_t serial) -{ - xdg_wm_base_pong(shell, serial); -} - -static const struct xdg_wm_base_listener xdg_shell_listener = { - xdg_shell_ping, -}; - -static void handle_surface_config(void *data, struct xdg_surface *surface, - uint32_t serial) -{ - xdg_surface_ack_configure(surface, serial); -} - -static const struct xdg_surface_listener xdg_surface_listener = { - handle_surface_config, -}; - -static void handle_toplevel_config(void *data, - struct xdg_toplevel *toplevel, +static void handle_toplevel_config_common(void *data, + void *toplevel, int32_t width, int32_t height, struct wl_array *states) { const uint32_t *state; @@ -704,11 +110,19 @@ static void handle_toplevel_config(void *data, wl->configured = false; } -static void handle_toplevel_close(void *data, - struct xdg_toplevel *xdg_toplevel) +/* Shell surface callbacks. */ +static void handle_toplevel_config(void *data, + struct xdg_toplevel *toplevel, + int32_t width, int32_t height, struct wl_array *states) { - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - BIT_SET(wl->input.key_state, KEY_ESC); + handle_toplevel_config_common(data, toplevel, width, height, states); +} + +static void handle_zxdg_toplevel_config( + void *data, struct zxdg_toplevel_v6 *toplevel, + int32_t width, int32_t height, struct wl_array *states) +{ + handle_toplevel_config_common(data, toplevel, width, height, states); } static const struct xdg_toplevel_listener xdg_toplevel_listener = { @@ -716,225 +130,11 @@ static const struct xdg_toplevel_listener xdg_toplevel_listener = { handle_toplevel_close, }; -static void zxdg_shell_ping(void *data, - struct zxdg_shell_v6 *shell, uint32_t serial) -{ - zxdg_shell_v6_pong(shell, serial); -} - -static const struct zxdg_shell_v6_listener zxdg_shell_v6_listener = { - zxdg_shell_ping, -}; - -static void handle_zxdg_surface_config(void *data, - struct zxdg_surface_v6 *surface, - uint32_t serial) -{ - zxdg_surface_v6_ack_configure(surface, serial); -} - -static const struct zxdg_surface_v6_listener zxdg_surface_v6_listener = { - handle_zxdg_surface_config, -}; - -static void handle_zxdg_toplevel_config( - void *data, struct zxdg_toplevel_v6 *toplevel, - int32_t width, int32_t height, struct wl_array *states) -{ - const uint32_t *state; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - wl->fullscreen = false; - wl->maximized = false; - - WL_ARRAY_FOR_EACH(state, states, const uint32_t*) - { - switch (*state) - { - case XDG_TOPLEVEL_STATE_FULLSCREEN: - wl->fullscreen = true; - break; - case XDG_TOPLEVEL_STATE_MAXIMIZED: - wl->maximized = true; - break; - case XDG_TOPLEVEL_STATE_RESIZING: - wl->resize = true; - break; - case XDG_TOPLEVEL_STATE_ACTIVATED: - wl->activated = true; - break; - } - } - - if (width > 0 && height > 0) - { - wl->prev_width = width; - wl->prev_height = height; - wl->width = width; - wl->height = height; - } - -#ifdef HAVE_EGL - if (wl->win) - wl_egl_window_resize(wl->win, width, height, 0, 0); - else - wl->win = wl_egl_window_create(wl->surface, - wl->width * wl->buffer_scale, - wl->height * wl->buffer_scale); -#endif - - wl->configured = false; -} - -static void handle_zxdg_toplevel_close(void *data, - struct zxdg_toplevel_v6 *zxdg_toplevel) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - BIT_SET(wl->input.key_state, KEY_ESC); -} - static const struct zxdg_toplevel_v6_listener zxdg_toplevel_v6_listener = { handle_zxdg_toplevel_config, handle_zxdg_toplevel_close, }; -static void display_handle_geometry(void *data, - struct wl_output *output, - int x, int y, - int physical_width, int physical_height, - int subpixel, - const char *make, - const char *model, - int transform) -{ - (void)data; - (void)output; - (void)x; - (void)y; - (void)subpixel; - (void)make; - (void)model; - (void)transform; - - output_info_t *oi = (output_info_t*)data; - oi->physical_width = physical_width; - oi->physical_height = physical_height; - - RARCH_LOG("[Wayland]: Physical width: %d mm x %d mm.\n", - physical_width, physical_height); -} - -static void display_handle_mode(void *data, - struct wl_output *output, - uint32_t flags, - int width, - int height, - int refresh) -{ - (void)output; - (void)flags; - - output_info_t *oi = (output_info_t*)data; - oi->width = width; - oi->height = height; - oi->refresh_rate = refresh; - - /* Certain older Wayland implementations report in Hz, - * but it should be mHz. */ - RARCH_LOG("[Wayland]: Video mode: %d x %d @ %.4f Hz.\n", - width, height, refresh > 1000 ? refresh / 1000.0 : (double)refresh); -} - -static void display_handle_done(void *data, - struct wl_output *output) -{ - (void)data; - (void)output; -} - -static void display_handle_scale(void *data, - struct wl_output *output, - int32_t factor) -{ - output_info_t *oi = (output_info_t*)data; - - RARCH_LOG("[Wayland]: Display scale factor %d.\n", factor); - oi->scale = factor; -} - -static const struct wl_output_listener output_listener = { - display_handle_geometry, - display_handle_mode, - display_handle_done, - display_handle_scale, -}; - -/* Registry callbacks. */ -static void registry_handle_global(void *data, struct wl_registry *reg, - uint32_t id, const char *interface, uint32_t version) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - (void)version; - - if (string_is_equal(interface, "wl_compositor")) - wl->compositor = (struct wl_compositor*)wl_registry_bind(reg, - id, &wl_compositor_interface, 3); - else if (string_is_equal(interface, "wl_output")) - { - output_info_t *oi = (output_info_t*) - calloc(1, sizeof(output_info_t)); - - oi->global_id = id; - oi->output = (struct wl_output*)wl_registry_bind(reg, - id, &wl_output_interface, 2); - wl_output_add_listener(oi->output, &output_listener, oi); - wl_list_insert(&wl->all_outputs, &oi->link); - wl_display_roundtrip(wl->input.dpy); - } - else if (string_is_equal(interface, "xdg_wm_base")) - wl->xdg_shell = (struct xdg_wm_base*) - wl_registry_bind(reg, id, &xdg_wm_base_interface, 1); - else if (string_is_equal(interface, "zxdg_shell_v6")) - wl->zxdg_shell = (struct zxdg_shell_v6*) - wl_registry_bind(reg, id, &zxdg_shell_v6_interface, 1); - else if (string_is_equal(interface, "wl_shm")) - wl->shm = (struct wl_shm*)wl_registry_bind(reg, id, &wl_shm_interface, 1); - else if (string_is_equal(interface, "wl_seat")) - { - wl->seat = (struct wl_seat*)wl_registry_bind(reg, id, &wl_seat_interface, 2); - wl_seat_add_listener(wl->seat, &seat_listener, wl); - } - else if (string_is_equal(interface, "zwp_idle_inhibit_manager_v1")) - wl->idle_inhibit_manager = (struct zwp_idle_inhibit_manager_v1*)wl_registry_bind( - reg, id, &zwp_idle_inhibit_manager_v1_interface, 1); - else if (string_is_equal(interface, "zxdg_decoration_manager_v1")) - wl->deco_manager = (struct zxdg_decoration_manager_v1*)wl_registry_bind( - reg, id, &zxdg_decoration_manager_v1_interface, 1); -} - -static void registry_handle_global_remove(void *data, - struct wl_registry *registry, uint32_t id) -{ - output_info_t *oi, *tmp; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - wl_list_for_each_safe(oi, tmp, &wl->all_outputs, link) - { - if (oi->global_id == id) - { - wl_list_remove(&oi->link); - free(oi); - break; - } - } -} - -static const struct wl_registry_listener registry_listener = { - registry_handle_global, - registry_handle_global_remove, -}; - static void gfx_ctx_wl_get_video_size(void *data, unsigned *width, unsigned *height) { @@ -949,30 +149,12 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) if (!wl) return; - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_destroy(&wl->egl); + egl_destroy(&wl->egl); - if (wl->win) - wl_egl_window_destroy(wl->win); + if (wl->win) + wl_egl_window_destroy(wl->win); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_context_destroy(&wl->vk, wl->surface); - - if (wl->input.dpy != NULL && wl->input.fd >= 0) - close(wl->input.fd); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } #ifdef HAVE_XKBCOMMON free_xkb(); @@ -1043,32 +225,6 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) } -void flush_wayland_fd(void *data) -{ - struct pollfd fd = {0}; - input_ctx_wayland_data_t *wl = (input_ctx_wayland_data_t*)data; - - wl_display_dispatch_pending(wl->dpy); - wl_display_flush(wl->dpy); - - fd.fd = wl->fd; - fd.events = POLLIN | POLLOUT | POLLERR | POLLHUP; - - if (poll(&fd, 1, 0) > 0) - { - if (fd.revents & (POLLERR | POLLHUP)) - { - close(wl->fd); - frontend_driver_set_signal_handler_state(1); - } - - if (fd.revents & POLLIN) - wl_display_dispatch(wl->dpy); - if (fd.revents & POLLOUT) - wl_display_flush(wl->dpy); - } -} - static void gfx_ctx_wl_check_window(void *data, bool *quit, bool *resize, unsigned *width, unsigned *height) { @@ -1083,21 +239,8 @@ static void gfx_ctx_wl_check_window(void *data, bool *quit, gfx_ctx_wl_get_video_size(data, &new_width, &new_height); - switch (wl_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - /* Swapchains are recreated in set_resize as a - * central place, so use that to trigger swapchain reinit. */ - *resize = wl->vk.need_new_swapchain; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } - - if (new_width != *width * wl->last_buffer_scale || new_height != *height * wl->last_buffer_scale) + if ( new_width != *width * wl->last_buffer_scale || + new_height != *height * wl->last_buffer_scale) { *width = new_width; *height = new_height; @@ -1113,36 +256,9 @@ static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - wl_egl_window_resize(wl->win, width, height, 0, 0); + wl_egl_window_resize(wl->win, width, height, 0, 0); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) - { - wl->vk.context.invalid_swapchain = true; - if (wl->vk.created_new_swapchain) - vulkan_acquire_next_image(&wl->vk); - } - else - { - RARCH_ERR("[Wayland/Vulkan]: Failed to update swapchain.\n"); - return false; - } - - wl->vk.need_new_swapchain = false; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); return true; @@ -1354,37 +470,21 @@ static void *gfx_ctx_wl_init(void *video_driver) wl->input.fd = wl_display_get_fd(wl->input.dpy); - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - if (!egl_init_context(&wl->egl, - EGL_PLATFORM_WAYLAND_KHR, - (EGLNativeDisplayType)wl->input.dpy, - &major, &minor, &n, attrib_ptr, - egl_default_accept_config_cb)) - { - egl_report_error(); - goto error; - } - - if (n == 0 || !egl_has_config(&wl->egl)) - goto error; -#endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (!vulkan_context_init(&wl->vk, VULKAN_WSI_WAYLAND)) - goto error; -#endif - break; - case GFX_CTX_NONE: - default: - break; + if (!egl_init_context(&wl->egl, + EGL_PLATFORM_WAYLAND_KHR, + (EGLNativeDisplayType)wl->input.dpy, + &major, &minor, &n, attrib_ptr, + egl_default_accept_config_cb)) + { + egl_report_error(); + goto error; } + if (n == 0 || !egl_has_config(&wl->egl)) + goto error; +#endif + wl->input.keyboard_focus = true; wl->input.mouse.focus = true; @@ -1497,19 +597,6 @@ static void gfx_ctx_wl_destroy(void *data) gfx_ctx_wl_destroy_resources(wl); - switch (wl_api) - { - case GFX_CTX_VULKAN_API: -#if defined(HAVE_VULKAN) && defined(HAVE_THREADS) - if (wl->vk.context.queue_lock) - slock_free(wl->vk.context.queue_lock); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } - free(wl); } @@ -1517,29 +604,9 @@ static void gfx_ctx_wl_set_swap_interval(void *data, int swap_interval) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_set_swap_interval(&wl->egl, swap_interval); + egl_set_swap_interval(&wl->egl, swap_interval); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (wl->swap_interval != swap_interval) - { - wl->swap_interval = swap_interval; - if (wl->vk.swapchain) - wl->vk.need_new_swapchain = true; - } -#endif - break; - case GFX_CTX_NONE: - default: - break; - } } static bool gfx_ctx_wl_set_video_mode(void *data, @@ -1561,19 +628,9 @@ static bool gfx_ctx_wl_set_video_mode(void *data, wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); wl_surface_add_listener(wl->surface, &wl_surface_listener, wl); - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale); + wl->win = wl_egl_window_create(wl->surface, wl->width * wl->buffer_scale, wl->height * wl->buffer_scale); #endif - break; - case GFX_CTX_NONE: - default: - break; - } if (wl->xdg_shell) { @@ -1628,29 +685,19 @@ static bool gfx_ctx_wl_set_video_mode(void *data, zxdg_shell_v6_add_listener(wl->zxdg_shell, &zxdg_shell_v6_listener, NULL); } - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - - if (!egl_create_context(&wl->egl, (attr != egl_attribs) ? egl_attribs : NULL)) - { - egl_report_error(); - goto error; - } - - if (!egl_create_surface(&wl->egl, (EGLNativeWindowType)wl->win)) - goto error; - egl_set_swap_interval(&wl->egl, wl->egl.interval); -#endif - break; - case GFX_CTX_NONE: - default: - break; + if (!egl_create_context(&wl->egl, (attr != egl_attribs) + ? egl_attribs : NULL)) + { + egl_report_error(); + goto error; } + if (!egl_create_surface(&wl->egl, (EGLNativeWindowType)wl->win)) + goto error; + egl_set_swap_interval(&wl->egl, wl->egl.interval); +#endif + if (fullscreen) { if (wl->xdg_toplevel) @@ -1661,23 +708,6 @@ static bool gfx_ctx_wl_set_video_mode(void *data, flush_wayland_fd(&wl->input); - switch (wl_api) - { - case GFX_CTX_VULKAN_API: - wl_display_roundtrip(wl->input.dpy); - -#ifdef HAVE_VULKAN - if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND, - wl->input.dpy, wl->surface, - wl->width * wl->buffer_scale, wl->height * wl->buffer_scale, wl->swap_interval)) - goto error; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } - if (fullscreen) { wl->cursor.visible = false; @@ -1688,7 +718,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data, return true; -#if defined(HAVE_EGL) || defined(HAVE_VULKAN) +#if defined(HAVE_EGL) error: gfx_ctx_wl_destroy(data); return false; @@ -1796,12 +826,6 @@ static bool gfx_ctx_wl_bind_api(void *video_driver, #endif #endif break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - return true; -#else - break; -#endif case GFX_CTX_NONE: default: break; @@ -1810,77 +834,21 @@ static bool gfx_ctx_wl_bind_api(void *video_driver, return false; } -#ifdef HAVE_VULKAN -static void *gfx_ctx_wl_get_context_data(void *data) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - return &wl->vk.context; -} -#endif - static void gfx_ctx_wl_swap_buffers(void *data) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_swap_buffers(&wl->egl); + egl_swap_buffers(&wl->egl); #endif - break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_present(&wl->vk, wl->vk.context.current_swapchain_index); - vulkan_acquire_next_image(&wl->vk); - flush_wayland_fd(&wl->input); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } -} - -static gfx_ctx_proc_t gfx_ctx_wl_get_proc_address(const char *symbol) -{ - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: -#ifdef HAVE_EGL - return egl_get_proc_address(symbol); -#else - break; -#endif - case GFX_CTX_NONE: - default: - break; - } - - return NULL; } static void gfx_ctx_wl_bind_hw_render(void *data, bool enable) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - - switch (wl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_bind_hw_render(&wl->egl, enable); + egl_bind_hw_render(&wl->egl, enable); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } static uint32_t gfx_ctx_wl_get_flags(void *data) @@ -1891,31 +859,17 @@ static uint32_t gfx_ctx_wl_get_flags(void *data) if (wl->core_hw_context_enable) BIT32_SET(flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT); - switch (wl_api) + if (string_is_equal(video_driver_get_ident(), "glcore")) { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - if (string_is_equal(video_driver_get_ident(), "glcore")) - { #if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); #endif - } - else if (string_is_equal(video_driver_get_ident(), "gl")) - { + } + else if (string_is_equal(video_driver_get_ident(), "gl")) + { #ifdef HAVE_GLSL - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL); #endif - } - break; - case GFX_CTX_VULKAN_API: -#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); -#endif - break; - case GFX_CTX_NONE: - default: - break; } return flags; @@ -1928,26 +882,6 @@ static void gfx_ctx_wl_set_flags(void *data, uint32_t flags) wl->core_hw_context_enable = true; } -static void gfx_ctx_wl_show_mouse(void *data, bool state) -{ - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; - if (!wl->wl_pointer) - return; - - if (state) - { - struct wl_cursor_image *image = wl->cursor.default_cursor->images[0]; - wl_pointer_set_cursor(wl->wl_pointer, wl->cursor.serial, wl->cursor.surface, image->hotspot_x, image->hotspot_y); - wl_surface_attach(wl->cursor.surface, wl_cursor_image_get_buffer(image), 0, 0); - wl_surface_damage(wl->cursor.surface, 0, 0, image->width, image->height); - wl_surface_commit(wl->cursor.surface); - } - else - wl_pointer_set_cursor(wl->wl_pointer, wl->cursor.serial, NULL, 0, 0); - - wl->cursor.visible = state; -} - static float gfx_ctx_wl_get_refresh_rate(void *data) { gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; @@ -1980,7 +914,11 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { true, /* has_windowed */ gfx_ctx_wl_swap_buffers, gfx_ctx_wl_input_driver, - gfx_ctx_wl_get_proc_address, +#ifdef HAVE_EGL + egl_get_proc_address, +#else + NULL, +#endif NULL, NULL, gfx_ctx_wl_show_mouse, @@ -1988,10 +926,6 @@ const gfx_ctx_driver_t gfx_ctx_wayland = { gfx_ctx_wl_get_flags, gfx_ctx_wl_set_flags, gfx_ctx_wl_bind_hw_render, -#ifdef HAVE_VULKAN - gfx_ctx_wl_get_context_data, -#else NULL, -#endif NULL, }; diff --git a/gfx/drivers_context/wayland_vk_ctx.c b/gfx/drivers_context/wayland_vk_ctx.c new file mode 100644 index 0000000000..1b56c44015 --- /dev/null +++ b/gfx/drivers_context/wayland_vk_ctx.c @@ -0,0 +1,680 @@ +/* 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 . + */ + +#include + +#include +#include + +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include "../common/vulkan_common.h" + +#include "../../frontend/frontend_driver.h" +#include "../../input/common/wayland_common.h" +#include "../../input/input_driver.h" +#include "../../input/input_keymaps.h" +#include "../../verbosity.h" + +/* Generated from idle-inhibit-unstable-v1.xml */ +#include "../common/wayland/idle-inhibit-unstable-v1.h" + +/* Generated from xdg-shell-unstable-v6.xml */ +#include "../common/wayland/xdg-shell-unstable-v6.h" + +/* Generated from xdg-shell.xml */ +#include "../common/wayland/xdg-shell.h" + +/* Generated from xdg-decoration-unstable-v1.h */ +#include "../common/wayland/xdg-decoration-unstable-v1.h" + +#ifndef EGL_PLATFORM_WAYLAND_KHR +#define EGL_PLATFORM_WAYLAND_KHR 0x31D8 +#endif + +static void handle_toplevel_config_common(void *data, + void *toplevel, + int32_t width, int32_t height, struct wl_array *states) +{ + const uint32_t *state; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + wl->fullscreen = false; + wl->maximized = false; + + WL_ARRAY_FOR_EACH(state, states, const uint32_t*) + { + switch (*state) + { + case XDG_TOPLEVEL_STATE_FULLSCREEN: + wl->fullscreen = true; + break; + case XDG_TOPLEVEL_STATE_MAXIMIZED: + wl->maximized = true; + break; + case XDG_TOPLEVEL_STATE_RESIZING: + wl->resize = true; + break; + case XDG_TOPLEVEL_STATE_ACTIVATED: + wl->activated = true; + break; + } + } + if (width > 0 && height > 0) + { + wl->prev_width = width; + wl->prev_height = height; + wl->width = width; + wl->height = height; + } + + wl->configured = false; +} + +/* Shell surface callbacks. */ +static void handle_toplevel_config(void *data, + struct xdg_toplevel *toplevel, + int32_t width, int32_t height, struct wl_array *states) +{ + handle_toplevel_config_common(data, toplevel, width, height, states); +} + +static void handle_zxdg_toplevel_config( + void *data, struct zxdg_toplevel_v6 *toplevel, + int32_t width, int32_t height, struct wl_array *states) +{ + handle_toplevel_config_common(data, toplevel, width, height, states); +} + +static const struct xdg_toplevel_listener xdg_toplevel_listener = { + handle_toplevel_config, + handle_toplevel_close, +}; + +static const struct zxdg_toplevel_v6_listener zxdg_toplevel_v6_listener = { + handle_zxdg_toplevel_config, + handle_zxdg_toplevel_close, +}; + +static void gfx_ctx_wl_get_video_size(void *data, + unsigned *width, unsigned *height) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + *width = wl->width * wl->buffer_scale; + *height = wl->height * wl->buffer_scale; +} + +static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) +{ + if (!wl) + return; + + vulkan_context_destroy(&wl->vk, wl->surface); + + if (wl->input.dpy != NULL && wl->input.fd >= 0) + close(wl->input.fd); + +#ifdef HAVE_XKBCOMMON + free_xkb(); +#endif + + if (wl->wl_keyboard) + wl_keyboard_destroy(wl->wl_keyboard); + if (wl->wl_pointer) + wl_pointer_destroy(wl->wl_pointer); + if (wl->wl_touch) + wl_touch_destroy(wl->wl_touch); + + if (wl->cursor.theme) + wl_cursor_theme_destroy(wl->cursor.theme); + if (wl->cursor.surface) + wl_surface_destroy(wl->cursor.surface); + + if (wl->seat) + wl_seat_destroy(wl->seat); + if (wl->xdg_shell) + xdg_wm_base_destroy(wl->xdg_shell); + if (wl->zxdg_shell) + zxdg_shell_v6_destroy(wl->zxdg_shell); + if (wl->compositor) + wl_compositor_destroy(wl->compositor); + if (wl->registry) + wl_registry_destroy(wl->registry); + if (wl->xdg_surface) + xdg_surface_destroy(wl->xdg_surface); + if (wl->zxdg_surface) + zxdg_surface_v6_destroy(wl->zxdg_surface); + if (wl->surface) + wl_surface_destroy(wl->surface); + if (wl->xdg_toplevel) + xdg_toplevel_destroy(wl->xdg_toplevel); + if (wl->zxdg_toplevel) + zxdg_toplevel_v6_destroy(wl->zxdg_toplevel); + if (wl->idle_inhibit_manager) + zwp_idle_inhibit_manager_v1_destroy(wl->idle_inhibit_manager); + if (wl->deco) + zxdg_toplevel_decoration_v1_destroy(wl->deco); + if (wl->deco_manager) + zxdg_decoration_manager_v1_destroy(wl->deco_manager); + if (wl->idle_inhibitor) + zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor); + + if (wl->input.dpy) + { + wl_display_flush(wl->input.dpy); + wl_display_disconnect(wl->input.dpy); + } + + wl->xdg_shell = NULL; + wl->zxdg_shell = NULL; + wl->compositor = NULL; + wl->registry = NULL; + wl->input.dpy = NULL; + wl->xdg_surface = NULL; + wl->surface = NULL; + wl->xdg_toplevel = NULL; + wl->zxdg_toplevel = NULL; + + wl->width = 0; + wl->height = 0; + +} + +static void gfx_ctx_wl_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height) +{ + /* this function works with SCALED sizes, it's used from the renderer */ + unsigned new_width, new_height; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + flush_wayland_fd(&wl->input); + + new_width = *width * wl->last_buffer_scale; + new_height = *height * wl->last_buffer_scale; + + gfx_ctx_wl_get_video_size(data, &new_width, &new_height); + + /* Swapchains are recreated in set_resize as a + * central place, so use that to trigger swapchain reinit. */ + *resize = wl->vk.need_new_swapchain; + + if (new_width != *width * wl->last_buffer_scale || new_height != *height * wl->last_buffer_scale) + { + *width = new_width; + *height = new_height; + *resize = true; + + wl->last_buffer_scale = wl->buffer_scale; + } + + *quit = (bool)frontend_driver_get_signal_handler_state(); +} + +static bool gfx_ctx_wl_set_resize(void *data, unsigned width, unsigned height) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (vulkan_create_swapchain(&wl->vk, width, height, wl->swap_interval)) + { + wl->vk.context.invalid_swapchain = true; + if (wl->vk.created_new_swapchain) + vulkan_acquire_next_image(&wl->vk); + } + else + { + RARCH_ERR("[Wayland/Vulkan]: Failed to update swapchain.\n"); + return false; + } + + wl->vk.need_new_swapchain = false; + + wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); + return true; +} + +static void gfx_ctx_wl_update_title(void *data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + char title[128]; + + title[0] = '\0'; + + video_driver_get_window_title(title, sizeof(title)); + + if (wl && title[0]) + { + if (wl->xdg_toplevel || wl->zxdg_toplevel) + { + if (wl->deco) + { + zxdg_toplevel_decoration_v1_set_mode(wl->deco, + ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE); + } + } + if (wl->xdg_toplevel) + xdg_toplevel_set_title(wl->xdg_toplevel, title); + else if (wl->zxdg_toplevel) + zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, title); + } +} + +static bool gfx_ctx_wl_get_metrics(void *data, + enum display_metric_types type, float *value) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (!wl || !wl->current_output || wl->current_output->physical_width == 0 || wl->current_output->physical_height == 0) + return false; + + switch (type) + { + case DISPLAY_METRIC_MM_WIDTH: + *value = (float)wl->current_output->physical_width; + break; + + case DISPLAY_METRIC_MM_HEIGHT: + *value = (float)wl->current_output->physical_height; + break; + + case DISPLAY_METRIC_DPI: + *value = (float)wl->current_output->width * 25.4f / (float)wl->current_output->physical_width; + break; + + default: + *value = 0.0f; + return false; + } + + return true; +} + +#define DEFAULT_WINDOWED_WIDTH 640 +#define DEFAULT_WINDOWED_HEIGHT 480 + +static void *gfx_ctx_wl_init(void *video_driver) +{ + int i; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*) + calloc(1, sizeof(gfx_ctx_wayland_data_t)); + + if (!wl) + return NULL; + + (void)video_driver; + + wl_list_init(&wl->all_outputs); + + frontend_driver_destroy_signal_handler_state(); + + wl->input.dpy = wl_display_connect(NULL); + wl->last_buffer_scale = 1; + wl->buffer_scale = 1; + + if (!wl->input.dpy) + { + RARCH_ERR("[Wayland]: Failed to connect to Wayland server.\n"); + goto error; + } + + frontend_driver_install_signal_handler(); + + wl->registry = wl_display_get_registry(wl->input.dpy); + wl_registry_add_listener(wl->registry, ®istry_listener, wl); + wl_display_roundtrip(wl->input.dpy); + + if (!wl->compositor) + { + RARCH_ERR("[Wayland]: Failed to create compositor.\n"); + goto error; + } + + if (!wl->shm) + { + RARCH_ERR("[Wayland]: Failed to create shm.\n"); + goto error; + } + + if (!wl->xdg_shell && !!wl->zxdg_shell) + { + RARCH_LOG("[Wayland]: Using zxdg_shell_v6 interface.\n"); + } + + if (!wl->xdg_shell && !wl->zxdg_shell) + { + RARCH_ERR("[Wayland]: Failed to create shell.\n"); + goto error; + } + + if (!wl->idle_inhibit_manager) + { + RARCH_WARN("[Wayland]: Compositor doesn't support zwp_idle_inhibit_manager_v1 protocol!\n"); + } + + if (!wl->deco_manager) + { + RARCH_WARN("[Wayland]: Compositor doesn't support zxdg_decoration_manager_v1 protocol!\n"); + } + + wl->input.fd = wl_display_get_fd(wl->input.dpy); + + if (!vulkan_context_init(&wl->vk, VULKAN_WSI_WAYLAND)) + goto error; + + wl->input.keyboard_focus = true; + wl->input.mouse.focus = true; + + wl->cursor.surface = wl_compositor_create_surface(wl->compositor); + wl->cursor.theme = wl_cursor_theme_load(NULL, 16, wl->shm); + wl->cursor.default_cursor = wl_cursor_theme_get_cursor(wl->cursor.theme, "left_ptr"); + + wl->num_active_touches = 0; + + for (i = 0;i < MAX_TOUCHES;i++) + { + wl->active_touch_positions[i].active = false; + wl->active_touch_positions[i].id = -1; + wl->active_touch_positions[i].x = (unsigned) 0; + wl->active_touch_positions[i].y = (unsigned) 0; + } + + flush_wayland_fd(&wl->input); + + return wl; + +error: + gfx_ctx_wl_destroy_resources(wl); + + if (wl) + free(wl); + + return NULL; +} + +static void gfx_ctx_wl_destroy(void *data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (!wl) + return; + + gfx_ctx_wl_destroy_resources(wl); + +#if defined(HAVE_THREADS) + if (wl->vk.context.queue_lock) + slock_free(wl->vk.context.queue_lock); +#endif + + free(wl); +} + +static void gfx_ctx_wl_set_swap_interval(void *data, int swap_interval) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (wl->swap_interval != swap_interval) + { + wl->swap_interval = swap_interval; + if (wl->vk.swapchain) + wl->vk.need_new_swapchain = true; + } +} + +static bool gfx_ctx_wl_set_video_mode(void *data, + unsigned width, unsigned height, + bool fullscreen) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + wl->width = width ? width : DEFAULT_WINDOWED_WIDTH; + wl->height = height ? height : DEFAULT_WINDOWED_HEIGHT; + + wl->surface = wl_compositor_create_surface(wl->compositor); + + wl_surface_set_buffer_scale(wl->surface, wl->buffer_scale); + wl_surface_add_listener(wl->surface, &wl_surface_listener, wl); + + if (wl->xdg_shell) + { + wl->xdg_surface = xdg_wm_base_get_xdg_surface(wl->xdg_shell, wl->surface); + xdg_surface_add_listener(wl->xdg_surface, &xdg_surface_listener, wl); + + wl->xdg_toplevel = xdg_surface_get_toplevel(wl->xdg_surface); + xdg_toplevel_add_listener(wl->xdg_toplevel, &xdg_toplevel_listener, wl); + + xdg_toplevel_set_app_id(wl->xdg_toplevel, "retroarch"); + xdg_toplevel_set_title(wl->xdg_toplevel, "RetroArch"); + + if (wl->deco_manager) + { + wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration( + wl->deco_manager, wl->xdg_toplevel); + } + + /* Waiting for xdg_toplevel to be configured before starting to draw */ + wl_surface_commit(wl->surface); + wl->configured = true; + + while (wl->configured) + wl_display_dispatch(wl->input.dpy); + + wl_display_roundtrip(wl->input.dpy); + xdg_wm_base_add_listener(wl->xdg_shell, &xdg_shell_listener, NULL); + } + else if (wl->zxdg_shell) + { + wl->zxdg_surface = zxdg_shell_v6_get_xdg_surface(wl->zxdg_shell, wl->surface); + zxdg_surface_v6_add_listener(wl->zxdg_surface, &zxdg_surface_v6_listener, wl); + + wl->zxdg_toplevel = zxdg_surface_v6_get_toplevel(wl->zxdg_surface); + zxdg_toplevel_v6_add_listener(wl->zxdg_toplevel, &zxdg_toplevel_v6_listener, wl); + + zxdg_toplevel_v6_set_app_id(wl->zxdg_toplevel, "retroarch"); + zxdg_toplevel_v6_set_title(wl->zxdg_toplevel, "RetroArch"); + + if (wl->deco_manager) + wl->deco = zxdg_decoration_manager_v1_get_toplevel_decoration( + wl->deco_manager, wl->xdg_toplevel); + + /* Waiting for xdg_toplevel to be configured before starting to draw */ + wl_surface_commit(wl->surface); + wl->configured = true; + + while (wl->configured) + wl_display_dispatch(wl->input.dpy); + + wl_display_roundtrip(wl->input.dpy); + zxdg_shell_v6_add_listener(wl->zxdg_shell, &zxdg_shell_v6_listener, NULL); + } + + if (fullscreen) + { + if (wl->xdg_toplevel) + xdg_toplevel_set_fullscreen(wl->xdg_toplevel, NULL); + else if (wl->zxdg_toplevel) + zxdg_toplevel_v6_set_fullscreen(wl->zxdg_toplevel, NULL); + } + + flush_wayland_fd(&wl->input); + + wl_display_roundtrip(wl->input.dpy); + + if (!vulkan_surface_create(&wl->vk, VULKAN_WSI_WAYLAND, + wl->input.dpy, wl->surface, + wl->width * wl->buffer_scale, wl->height * wl->buffer_scale, wl->swap_interval)) + goto error; + + if (fullscreen) + { + wl->cursor.visible = false; + gfx_ctx_wl_show_mouse(wl, false); + } + else + wl->cursor.visible = true; + + return true; + +error: + gfx_ctx_wl_destroy(data); + return false; +} + +bool input_wl_init(void *data, const char *joypad_name); + +static void gfx_ctx_wl_input_driver(void *data, + const char *joypad_name, + input_driver_t **input, void **input_data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + /* Input is heavily tied to the window stuff + * on Wayland, so just implement the input driver here. */ + if (!input_wl_init(&wl->input, joypad_name)) + { + *input = NULL; + *input_data = NULL; + } + else + { + *input = &input_wayland; + *input_data = &wl->input; + } +} + +static bool gfx_ctx_wl_has_focus(void *data) +{ + (void)data; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + return wl->input.keyboard_focus; +} + +static bool gfx_ctx_wl_suppress_screensaver(void *data, bool state) +{ + (void)data; + + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (!wl->idle_inhibit_manager) + return false; + if (state == (!!wl->idle_inhibitor)) + return true; + if (state) + { + RARCH_LOG("[Wayland]: Enabling idle inhibitor\n"); + struct zwp_idle_inhibit_manager_v1 *mgr = wl->idle_inhibit_manager; + wl->idle_inhibitor = zwp_idle_inhibit_manager_v1_create_inhibitor(mgr, wl->surface); + } + else + { + RARCH_LOG("[Wayland]: Disabling the idle inhibitor\n"); + zwp_idle_inhibitor_v1_destroy(wl->idle_inhibitor); + wl->idle_inhibitor = NULL; + } + return true; +} + +static enum gfx_ctx_api gfx_ctx_wl_get_api(void *data) { return GFX_CTX_VULKAN_API; } + +static bool gfx_ctx_wl_bind_api(void *video_driver, + enum gfx_ctx_api api, unsigned major, unsigned minor) +{ + if (api == GFX_CTX_VULKAN_API) + return true; + return false; +} + +static void *gfx_ctx_wl_get_context_data(void *data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + return &wl->vk.context; +} + +static void gfx_ctx_wl_swap_buffers(void *data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + vulkan_present(&wl->vk, wl->vk.context.current_swapchain_index); + vulkan_acquire_next_image(&wl->vk); + flush_wayland_fd(&wl->input); +} + +static gfx_ctx_proc_t gfx_ctx_wl_get_proc_address(const char *symbol) +{ + return NULL; +} + +static void gfx_ctx_wl_bind_hw_render(void *data, bool enable) { } + +static uint32_t gfx_ctx_wl_get_flags(void *data) +{ + uint32_t flags = 0; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + +#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); +#endif + + return flags; +} + +static void gfx_ctx_wl_set_flags(void *data, uint32_t flags) { } + +static float gfx_ctx_wl_get_refresh_rate(void *data) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (!wl || !wl->current_output) + return false; + + return (float) wl->current_output->refresh_rate / 1000.0f; +} + +const gfx_ctx_driver_t gfx_ctx_vk_wayland = { + gfx_ctx_wl_init, + gfx_ctx_wl_destroy, + gfx_ctx_wl_get_api, + gfx_ctx_wl_bind_api, + gfx_ctx_wl_set_swap_interval, + gfx_ctx_wl_set_video_mode, + gfx_ctx_wl_get_video_size, + gfx_ctx_wl_get_refresh_rate, + NULL, /* get_video_output_size */ + NULL, /* get_video_output_prev */ + NULL, /* get_video_output_next */ + gfx_ctx_wl_get_metrics, + NULL, + gfx_ctx_wl_update_title, + gfx_ctx_wl_check_window, + gfx_ctx_wl_set_resize, + gfx_ctx_wl_has_focus, + gfx_ctx_wl_suppress_screensaver, + true, /* has_windowed */ + gfx_ctx_wl_swap_buffers, + gfx_ctx_wl_input_driver, + gfx_ctx_wl_get_proc_address, + NULL, + NULL, + gfx_ctx_wl_show_mouse, + "wayland", + gfx_ctx_wl_get_flags, + gfx_ctx_wl_set_flags, + gfx_ctx_wl_bind_hw_render, + gfx_ctx_wl_get_context_data, + NULL, +}; diff --git a/gfx/drivers_context/wgl_ctx.c b/gfx/drivers_context/wgl_ctx.c index d501833968..277e340ffd 100644 --- a/gfx/drivers_context/wgl_ctx.c +++ b/gfx/drivers_context/wgl_ctx.c @@ -62,11 +62,7 @@ #include "../common/gl1_common.h" #endif -#ifdef HAVE_VULKAN -#include "../common/vulkan_common.h" -#endif - -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN) +#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) #ifndef WGL_CONTEXT_MAJOR_VERSION_ARB #define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 #endif @@ -92,35 +88,23 @@ #endif #endif -static void gfx_ctx_wgl_destroy(void *data); - -#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) -typedef HGLRC (APIENTRY *wglCreateContextAttribsProc)(HDC, HGLRC, const int*); -static wglCreateContextAttribsProc pcreate_context; -#endif static BOOL (APIENTRY *p_swap_interval)(int); +/* TODO/FIXME - static globals */ static HGLRC win32_hrc; static HGLRC win32_hw_hrc; static HDC win32_hdc; static bool win32_use_hw_ctx = false; static bool win32_core_hw_context_enable = false; static bool wgl_adaptive_vsync = false; - -#ifdef HAVE_VULKAN -static gfx_ctx_vulkan_data_t win32_vk; -#endif #ifdef HAVE_EGL static egl_ctx_data_t win32_egl; #endif - static void *dinput_wgl = NULL; - static unsigned win32_major = 0; static unsigned win32_minor = 0; static int win32_interval = 0; static enum gfx_ctx_api win32_api = GFX_CTX_NONE; - #ifdef HAVE_DYNAMIC static dylib_t dll_handle = NULL; /* Handle to OpenGL32.dll/libGLESv2.dll */ #endif @@ -188,16 +172,17 @@ static bool wgl_has_extension(const char *extension, const char *extensions) static void create_gl_context(HWND hwnd, bool *quit) { struct retro_hw_render_callback *hwr = video_driver_get_hw_context(); - bool debug = hwr->debug_context; bool core_context = (win32_major * 1000 + win32_minor) >= 3001; +#ifdef GL_DEBUG + bool debug = true; +#else + bool debug = hwr->debug_context; +#endif + win32_hdc = GetDC(hwnd); win32_setup_pixel_format(win32_hdc, true); -#ifdef GL_DEBUG - debug = true; -#endif - if (win32_hrc) { RARCH_LOG("[WGL]: Using cached GL context.\n"); @@ -239,8 +224,15 @@ static void create_gl_context(HWND hwnd, bool *quit) if (core_context || debug) { - int attribs[16] = {0}; + unsigned i; + int attribs[16]; int *aptr = attribs; + typedef HGLRC (APIENTRY *wglCreateContextAttribsProc) + (HDC, HGLRC, const int*); + static wglCreateContextAttribsProc pcreate_context; + + for (i = 0; i < 16; i++) + attribs[i] = 0; if (core_context) { @@ -269,23 +261,24 @@ static void create_gl_context(HWND hwnd, bool *quit) *aptr = 0; if (!pcreate_context) - pcreate_context = (wglCreateContextAttribsProc)gfx_ctx_wgl_get_proc_address("wglCreateContextAttribsARB"); + pcreate_context = (wglCreateContextAttribsProc) + gfx_ctx_wgl_get_proc_address("wglCreateContextAttribsARB"); - /* In order to support the core info "required_hw_api" field correctly, we should try to init the highest available - * version GL context possible. This means trying successively lower versions until it works, because GL has - * no facility for determining the highest possible supported version. + /* In order to support the core info "required_hw_api" + * field correctly, we should try to init the highest available + * version GL context possible. This means trying successively + * lower versions until it works, because GL has + * no facility for determining the highest possible + * supported version. */ if (pcreate_context) { int i; int gl_versions[][2] = {{4, 6}, {4, 5}, {4, 4}, {4, 3}, {4, 2}, {4, 1}, {4, 0}, {3, 3}, {3, 2}, {3, 1}, {3, 0}}; - int gl_version_rows = ARRAY_SIZE(gl_versions); - int (*versions)[2]; - int version_rows = 0; - HGLRC context = NULL; - - versions = gl_versions; - version_rows = gl_version_rows; + int gl_version_rows = ARRAY_SIZE(gl_versions); + HGLRC context = NULL; + int version_rows = gl_version_rows; + int (*versions)[2] = gl_versions; /* only try higher versions when core_context is true */ if (!core_context) @@ -329,9 +322,13 @@ static void create_gl_context(HWND hwnd, bool *quit) /* found a suitable version that is high enough, we can stop now */ break; } - else if (versions[i][0] == win32_major && versions[i][1] == win32_minor) + else if ( + versions[i][0] == win32_major && + versions[i][1] == win32_minor) { - /* The requested version was tried and is not supported, go ahead and fail since everything else will be lower than that. */ + /* The requested version was tried and + * is not supported, go ahead and fail + * since everything else will be lower than that. */ break; } } @@ -370,20 +367,18 @@ static void create_gl_context(HWND hwnd, bool *quit) #if defined(HAVE_OPENGLES) && defined(HAVE_EGL) static void create_gles_context(HWND hwnd, bool *quit) { - EGLint n, major, minor; EGLint format; - EGLint attribs[] = { - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_BLUE_SIZE, 8, - EGL_GREEN_SIZE, 8, - EGL_RED_SIZE, 8, - EGL_ALPHA_SIZE, 8, - EGL_DEPTH_SIZE, 16, - EGL_NONE + EGLint attribs[] = { + EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, + EGL_SURFACE_TYPE, EGL_WINDOW_BIT, + EGL_BLUE_SIZE, 8, + EGL_GREEN_SIZE, 8, + EGL_RED_SIZE, 8, + EGL_ALPHA_SIZE, 8, + EGL_DEPTH_SIZE, 16, + EGL_NONE }; - EGLint context_attributes[] = { EGL_CONTEXT_CLIENT_VERSION, 2, EGL_NONE @@ -438,30 +433,6 @@ void create_graphics_context(HWND hwnd, bool *quit) #endif break; - case GFX_CTX_VULKAN_API: - { -#ifdef HAVE_VULKAN - RECT rect; - HINSTANCE instance; - unsigned width = 0; - unsigned height = 0; - - GetClientRect(hwnd, &rect); - - instance = GetModuleHandle(NULL); - width = rect.right - rect.left; - height = rect.bottom - rect.top; - - if (!vulkan_surface_create(&win32_vk, VULKAN_WSI_WIN32, - &instance, &hwnd, - width, height, win32_interval)) - *quit = true; - - g_win32_inited = true; -#endif - } - break; - case GFX_CTX_NONE: default: break; @@ -477,9 +448,7 @@ static void gfx_ctx_wgl_swap_interval(void *data, int interval) case GFX_CTX_OPENGL_API: #if (defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE)) && !defined(HAVE_OPENGLES) win32_interval = interval; - if (!win32_hrc) - return; - if (!p_swap_interval) + if (!win32_hrc || !p_swap_interval) return; RARCH_LOG("[WGL]: wglSwapInterval(%i)\n", win32_interval); @@ -498,17 +467,6 @@ static void gfx_ctx_wgl_swap_interval(void *data, int interval) #endif break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (win32_interval != interval) - { - win32_interval = interval; - if (win32_vk.swapchain) - win32_vk.need_new_swapchain = true; - } -#endif - break; - case GFX_CTX_NONE: default: win32_interval = interval; @@ -516,26 +474,6 @@ static void gfx_ctx_wgl_swap_interval(void *data, int interval) } } -static void gfx_ctx_wgl_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ - win32_check_window(quit, resize, width, height); - - switch (win32_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (win32_vk.need_new_swapchain) - *resize = true; -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } -} - static void gfx_ctx_wgl_swap_buffers(void *data) { (void)data; @@ -545,12 +483,6 @@ static void gfx_ctx_wgl_swap_buffers(void *data) case GFX_CTX_OPENGL_API: SwapBuffers(win32_hdc); break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_present(&win32_vk, win32_vk.context.current_swapchain_index); - vulkan_acquire_next_image(&win32_vk); -#endif - break; case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_EGL) egl_swap_buffers(&win32_egl); @@ -563,36 +495,7 @@ static void gfx_ctx_wgl_swap_buffers(void *data) } static bool gfx_ctx_wgl_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - switch (win32_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (!vulkan_create_swapchain(&win32_vk, width, height, win32_interval)) - { - RARCH_ERR("[Win32/Vulkan]: Failed to update swapchain.\n"); - return false; - } - - if (win32_vk.created_new_swapchain) - vulkan_acquire_next_image(&win32_vk); - win32_vk.context.invalid_swapchain = true; - win32_vk.need_new_swapchain = false; -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } - - return false; -} + unsigned width, unsigned height) { return false; } static void gfx_ctx_wgl_update_title(void *data) { @@ -614,11 +517,14 @@ static void gfx_ctx_wgl_update_title(void *data) static void gfx_ctx_wgl_get_video_size(void *data, unsigned *width, unsigned *height) { - HWND window = win32_get_window(); + HWND window = win32_get_window(); - (void)data; - - if (!window) + if (window) + { + *width = g_win32_resize_width; + *height = g_win32_resize_height; + } + else { RECT mon_rect; MONITORINFOEX current_mon; @@ -626,62 +532,10 @@ static void gfx_ctx_wgl_get_video_size(void *data, HMONITOR hm_to_use = NULL; win32_monitor_info(¤t_mon, &hm_to_use, &mon_id); - mon_rect = current_mon.rcMonitor; - *width = mon_rect.right - mon_rect.left; - *height = mon_rect.bottom - mon_rect.top; + mon_rect = current_mon.rcMonitor; + *width = mon_rect.right - mon_rect.left; + *height = mon_rect.bottom - mon_rect.top; } - else - { - *width = g_win32_resize_width; - *height = g_win32_resize_height; - } -} - -static void *gfx_ctx_wgl_init(void *video_driver) -{ - WNDCLASSEX wndclass = {0}; - gfx_ctx_wgl_data_t *wgl = (gfx_ctx_wgl_data_t*)calloc(1, sizeof(*wgl)); - - if (!wgl) - return NULL; - - if (g_win32_inited) - gfx_ctx_wgl_destroy(NULL); - -#ifdef HAVE_DYNAMIC -#ifdef HAVE_OPENGL - dll_handle = dylib_load("OpenGL32.dll"); -#else - dll_handle = dylib_load("libGLESv2.dll"); -#endif -#endif - - win32_window_reset(); - win32_monitor_init(); - - wndclass.lpfnWndProc = WndProcWGL; - if (!win32_window_init(&wndclass, true, NULL)) - goto error; - - switch (win32_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (!vulkan_context_init(&win32_vk, VULKAN_WSI_WIN32)) - goto error; -#endif - break; - case GFX_CTX_NONE: - default: - break; - } - - return wgl; - -error: - if (wgl) - free(wgl); - return NULL; } static void gfx_ctx_wgl_destroy(void *data) @@ -703,22 +557,13 @@ static void gfx_ctx_wgl_destroy(void *data) if (win32_hw_hrc) wglDeleteContext(win32_hw_hrc); wglDeleteContext(win32_hrc); - win32_hrc = NULL; + win32_hrc = NULL; win32_hw_hrc = NULL; } } #endif break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_context_destroy(&win32_vk, win32_vk.vk_surface != VK_NULL_HANDLE); - if (win32_vk.context.queue_lock) - slock_free(win32_vk.context.queue_lock); - memset(&win32_vk, 0, sizeof(win32_vk)); -#endif - break; - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL egl_destroy(&win32_egl); @@ -763,14 +608,46 @@ static void gfx_ctx_wgl_destroy(void *data) p_swap_interval = NULL; } + +static void *gfx_ctx_wgl_init(void *video_driver) +{ + WNDCLASSEX wndclass = {0}; + gfx_ctx_wgl_data_t *wgl = (gfx_ctx_wgl_data_t*)calloc(1, sizeof(*wgl)); + + if (!wgl) + return NULL; + + if (g_win32_inited) + gfx_ctx_wgl_destroy(NULL); + +#ifdef HAVE_DYNAMIC +#ifdef HAVE_OPENGL + dll_handle = dylib_load("OpenGL32.dll"); +#else + dll_handle = dylib_load("libGLESv2.dll"); +#endif +#endif + + win32_window_reset(); + win32_monitor_init(); + + wndclass.lpfnWndProc = WndProcWGL; + + if (!win32_window_init(&wndclass, true, NULL)) + goto error; + + return wgl; + +error: + if (wgl) + free(wgl); + return NULL; +} + static bool gfx_ctx_wgl_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { -#ifdef HAVE_VULKAN - win32_vk.fullscreen = fullscreen; -#endif - if (!win32_set_video_mode(NULL, width, height, fullscreen)) { RARCH_ERR("[WGL]: win32_set_video_mode failed.\n"); @@ -802,6 +679,7 @@ static void gfx_ctx_wgl_input_driver(void *data, settings_t *settings = config_get_ptr(); #if _WIN32_WINNT >= 0x0501 +#ifdef HAVE_WINRAWINPUT const char *input_driver = settings->arrays.input_driver; /* winraw only available since XP */ @@ -816,6 +694,7 @@ static void gfx_ctx_wgl_input_driver(void *data, } } #endif +#endif #ifdef HAVE_DINPUT dinput_wgl = input_dinput.init(joypad_name); @@ -846,10 +725,6 @@ static bool gfx_ctx_wgl_bind_api(void *data, if (api == GFX_CTX_OPENGL_ES_API) return true; #endif -#if defined(HAVE_VULKAN) - if (api == GFX_CTX_VULKAN_API) - return true; -#endif return false; } @@ -863,7 +738,12 @@ static void gfx_ctx_wgl_bind_hw_render(void *data, bool enable) win32_use_hw_ctx = enable; if (win32_hdc) - wglMakeCurrent(win32_hdc, enable ? win32_hw_hrc : win32_hrc); + { + if (enable) + wglMakeCurrent(win32_hdc, win32_hw_hrc); + else + wglMakeCurrent(win32_hdc, win32_hrc); + } #endif break; @@ -879,14 +759,6 @@ static void gfx_ctx_wgl_bind_hw_render(void *data, bool enable) } } -#ifdef HAVE_VULKAN -static void *gfx_ctx_wgl_get_context_data(void *data) -{ - (void)data; - return &win32_vk.context; -} -#endif - static uint32_t gfx_ctx_wgl_get_flags(void *data) { uint32_t flags = 0; @@ -919,11 +791,6 @@ static uint32_t gfx_ctx_wgl_get_flags(void *data) } break; - case GFX_CTX_VULKAN_API: -#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); -#endif - break; case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) @@ -968,13 +835,8 @@ static void gfx_ctx_wgl_get_video_output_size(void *data, win32_get_video_output_size(width, height); } -static void gfx_ctx_wgl_get_video_output_prev(void *data) -{ -} - -static void gfx_ctx_wgl_get_video_output_next(void *data) -{ -} +static void gfx_ctx_wgl_get_video_output_prev(void *data) { } +static void gfx_ctx_wgl_get_video_output_next(void *data) { } const gfx_ctx_driver_t gfx_ctx_wgl = { gfx_ctx_wgl_init, @@ -991,7 +853,7 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { win32_get_metrics, NULL, gfx_ctx_wgl_update_title, - gfx_ctx_wgl_check_window, + win32_check_window, gfx_ctx_wgl_set_resize, win32_has_focus, win32_suppress_screensaver, @@ -1006,10 +868,6 @@ const gfx_ctx_driver_t gfx_ctx_wgl = { gfx_ctx_wgl_get_flags, gfx_ctx_wgl_set_flags, gfx_ctx_wgl_bind_hw_render, -#ifdef HAVE_VULKAN - gfx_ctx_wgl_get_context_data, -#else NULL, -#endif NULL }; diff --git a/gfx/drivers_context/x_ctx.c b/gfx/drivers_context/x_ctx.c index 30923add44..cf3357ed60 100644 --- a/gfx/drivers_context/x_ctx.c +++ b/gfx/drivers_context/x_ctx.c @@ -37,6 +37,7 @@ #endif #include +#include #include #include "../../configuration.h" @@ -50,10 +51,6 @@ #include "../common/xinerama_common.h" #endif -#ifdef HAVE_VULKAN -#include "../common/vulkan_common.h" -#endif - #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) static int (*g_pglSwapInterval)(int); static int (*g_pglSwapIntervalSGI)(int); @@ -62,34 +59,30 @@ static void (*g_pglSwapIntervalEXT)(Display*, GLXDrawable, int); typedef struct gfx_ctx_x_data { - bool g_use_hw_ctx; - bool g_core_es; - bool g_core_es_core; - bool g_debug; - bool g_should_reset_mode; - bool g_is_double; + bool use_hw_ctx; + bool core_es; + bool core_es_core; + bool debug; + bool should_reset_mode; + bool is_double; bool core_hw_context_enable; bool adaptive_vsync; bool msaa_enable; #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - GLXWindow g_glx_win; - GLXContext g_ctx, g_hw_ctx; - GLXFBConfig g_fbc; + GLXWindow glx_win; + GLXContext ctx, hw_ctx; + GLXFBConfig fbc; unsigned swap_mode; #endif - int g_interval; - -#ifdef HAVE_VULKAN - gfx_ctx_vulkan_data_t vk; -#endif + int interval; } gfx_ctx_x_data_t; +/* TODO/FIXME - static globals */ static unsigned g_major = 0; static unsigned g_minor = 0; static enum gfx_ctx_api x_api = GFX_CTX_NONE; - static gfx_ctx_x_data_t *current_context_data = NULL; typedef struct Hints @@ -160,12 +153,7 @@ static int x_log_error_handler(Display *dpy, XErrorEvent *event) return 0; } -static int x_nul_handler(Display *dpy, XErrorEvent *event) -{ - (void)dpy; - (void)event; - return 0; -} +static int x_nul_handler(Display *dpy, XErrorEvent *event) { return 0; } static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) { @@ -178,39 +166,32 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - if (x->g_ctx) + if (x->ctx) { - glXSwapBuffers(g_x11_dpy, x->g_glx_win); + glXSwapBuffers(g_x11_dpy, x->glx_win); glFinish(); glXMakeContextCurrent(g_x11_dpy, None, None, NULL); if (!video_driver_is_video_cache_context()) { - if (x->g_hw_ctx) - glXDestroyContext(g_x11_dpy, x->g_hw_ctx); - if (x->g_ctx) - glXDestroyContext(g_x11_dpy, x->g_ctx); + if (x->hw_ctx) + glXDestroyContext(g_x11_dpy, x->hw_ctx); + if (x->ctx) + glXDestroyContext(g_x11_dpy, x->ctx); - x->g_ctx = NULL; - x->g_hw_ctx = NULL; + x->ctx = NULL; + x->hw_ctx = NULL; } } if (g_x11_win) { - if (x->g_glx_win) - glXDestroyWindow(g_x11_dpy, x->g_glx_win); - x->g_glx_win = 0; + if (x->glx_win) + glXDestroyWindow(g_x11_dpy, x->glx_win); + x->glx_win = 0; } #endif break; - - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_context_destroy(&x->vk, g_x11_win != 0); -#endif - break; - case GFX_CTX_NONE: default: break; @@ -230,10 +211,10 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) if (g_x11_dpy) { - if (x->g_should_reset_mode) + if (x->should_reset_mode) { x11_exit_fullscreen(g_x11_dpy); - x->g_should_reset_mode = false; + x->should_reset_mode = false; } if (!video_driver_is_video_cache_context()) @@ -250,7 +231,7 @@ static void gfx_ctx_x_destroy_resources(gfx_ctx_x_data_t *x) #endif g_major = 0; g_minor = 0; - x->g_core_es = false; + x->core_es = false; } static void gfx_ctx_x_destroy(void *data) @@ -261,19 +242,6 @@ static void gfx_ctx_x_destroy(void *data) gfx_ctx_x_destroy_resources(x); - switch (x_api) - { - case GFX_CTX_VULKAN_API: -#if defined(HAVE_VULKAN) && defined(HAVE_THREADS) - if (x->vk.context.queue_lock) - slock_free(x->vk.context.queue_lock); -#endif - break; - case GFX_CTX_NONE: - default: - break; - } - free(data); } @@ -281,160 +249,64 @@ static void gfx_ctx_x_swap_interval(void *data, int interval) { gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - switch (x_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - x->g_interval = interval; + x->interval = interval; - if (x->swap_mode) - { - if (g_pglSwapInterval) - { - RARCH_LOG("[GLX]: glXSwapInterval(%i)\n", x->g_interval); - if (g_pglSwapInterval(x->g_interval) != 0) - RARCH_WARN("[GLX]: glXSwapInterval() failed.\n"); - } - else if (g_pglSwapIntervalEXT) - { - RARCH_LOG("[GLX]: glXSwapIntervalEXT(%i)\n", x->g_interval); - g_pglSwapIntervalEXT(g_x11_dpy, x->g_glx_win, x->g_interval); - } - else if (g_pglSwapIntervalSGI) - { - RARCH_LOG("[GLX]: glXSwapIntervalSGI(%i)\n", x->g_interval); - if (g_pglSwapIntervalSGI(x->g_interval) != 0) - RARCH_WARN("[GLX]: glXSwapIntervalSGI() failed.\n"); - } - } - else - { - if (g_pglSwapIntervalEXT) - { - RARCH_LOG("[GLX]: glXSwapIntervalEXT(%i)\n", x->g_interval); - g_pglSwapIntervalEXT(g_x11_dpy, x->g_glx_win, x->g_interval); - } - else if (g_pglSwapInterval) - { - RARCH_LOG("[GLX]: glXSwapInterval(%i)\n", x->g_interval); - if (g_pglSwapInterval(x->g_interval) != 0) - RARCH_WARN("[GLX]: glXSwapInterval() failed.\n"); - } - else if (g_pglSwapIntervalSGI) - { - RARCH_LOG("[GLX]: glXSwapIntervalSGI(%i)\n", x->g_interval); - if (g_pglSwapIntervalSGI(x->g_interval) != 0) - RARCH_WARN("[GLX]: glXSwapIntervalSGI() failed.\n"); - } - } -#endif - break; - - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - if (x->g_interval != interval) - { - x->g_interval = interval; - if (x->vk.swapchain) - x->vk.need_new_swapchain = true; - } -#endif - break; - - case GFX_CTX_NONE: - default: - break; + if (x->swap_mode) + { + if (g_pglSwapInterval) + { + RARCH_LOG("[GLX]: glXSwapInterval(%i)\n", x->interval); + if (g_pglSwapInterval(x->interval) != 0) + RARCH_WARN("[GLX]: glXSwapInterval() failed.\n"); + } + else if (g_pglSwapIntervalEXT) + { + RARCH_LOG("[GLX]: glXSwapIntervalEXT(%i)\n", x->interval); + g_pglSwapIntervalEXT(g_x11_dpy, x->glx_win, x->interval); + } + else if (g_pglSwapIntervalSGI) + { + RARCH_LOG("[GLX]: glXSwapIntervalSGI(%i)\n", x->interval); + if (g_pglSwapIntervalSGI(x->interval) != 0) + RARCH_WARN("[GLX]: glXSwapIntervalSGI() failed.\n"); + } } + else + { + if (g_pglSwapIntervalEXT) + { + RARCH_LOG("[GLX]: glXSwapIntervalEXT(%i)\n", x->interval); + g_pglSwapIntervalEXT(g_x11_dpy, x->glx_win, x->interval); + } + else if (g_pglSwapInterval) + { + RARCH_LOG("[GLX]: glXSwapInterval(%i)\n", x->interval); + if (g_pglSwapInterval(x->interval) != 0) + RARCH_WARN("[GLX]: glXSwapInterval() failed.\n"); + } + else if (g_pglSwapIntervalSGI) + { + RARCH_LOG("[GLX]: glXSwapIntervalSGI(%i)\n", x->interval); + if (g_pglSwapIntervalSGI(x->interval) != 0) + RARCH_WARN("[GLX]: glXSwapIntervalSGI() failed.\n"); + } + } +#endif } static void gfx_ctx_x_swap_buffers(void *data) { gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - switch (x_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - if (x->g_is_double) - glXSwapBuffers(g_x11_dpy, x->g_glx_win); + if (x->is_double) + glXSwapBuffers(g_x11_dpy, x->glx_win); #endif - break; - - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - vulkan_present(&x->vk, x->vk.context.current_swapchain_index); - vulkan_acquire_next_image(&x->vk); -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } -} - -static void gfx_ctx_x_check_window(void *data, bool *quit, - bool *resize, unsigned *width, unsigned *height) -{ - x11_check_window(data, quit, resize, width, height); - - switch (x_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - { - gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - if (x->vk.need_new_swapchain) - *resize = true; - } -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } } static bool gfx_ctx_x_set_resize(void *data, - unsigned width, unsigned height) -{ - (void)data; - (void)width; - (void)height; - - switch (x_api) - { - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - { - gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - - /* FIXME/TODO - threading error here */ - - if (!vulkan_create_swapchain(&x->vk, width, height, x->g_interval)) - { - RARCH_ERR("[X/Vulkan]: Failed to update swapchain.\n"); - x->vk.swapchain = VK_NULL_HANDLE; - return false; - } - - if (x->vk.created_new_swapchain) - vulkan_acquire_next_image(&x->vk); - x->vk.context.invalid_swapchain = true; - x->vk.need_new_swapchain = false; - } -#endif - break; - - case GFX_CTX_NONE: - default: - break; - } - return true; -} + unsigned width, unsigned height) { return true; } static void *gfx_ctx_x_init(void *data) { @@ -491,21 +363,21 @@ static void *gfx_ctx_x_init(void *data) glXGetProcAddress((const GLubyte*)"glXCreateContextAttribsARB"); #ifdef GL_DEBUG - x->g_debug = true; + x->debug = true; #else - x->g_debug = hwr->debug_context; + x->debug = hwr->debug_context; #endif /* Have to use ContextAttribs */ #ifdef HAVE_OPENGLES2 - x->g_core_es = true; - x->g_core_es_core = true; + x->core_es = true; + x->core_es_core = true; #else - x->g_core_es = (g_major * 1000 + g_minor) >= 3001; - x->g_core_es_core = (g_major * 1000 + g_minor) >= 3002; + x->core_es = (g_major * 1000 + g_minor) >= 3001; + x->core_es_core = (g_major * 1000 + g_minor) >= 3002; #endif - if ((x->g_core_es || x->g_debug) && !glx_create_context_attribs) + if ((x->core_es || x->debug) && !glx_create_context_attribs) goto error; fbcs = glXChooseFBConfig(g_x11_dpy, DefaultScreen(g_x11_dpy), @@ -520,18 +392,10 @@ static void *gfx_ctx_x_init(void *data) goto error; } - x->g_fbc = fbcs[0]; + x->fbc = fbcs[0]; XFree(fbcs); #endif break; - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - /* Use XCB WSI since it's the most supported WSI over legacy Xlib. */ - if (!vulkan_context_init(&x->vk, VULKAN_WSI_XCB)) - goto error; -#endif - break; - case GFX_CTX_NONE: default: break; @@ -541,16 +405,16 @@ static void *gfx_ctx_x_init(void *data) { case GFX_CTX_OPENGL_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - if (GLXExtensionSupported(g_x11_dpy, "GLX_EXT_swap_control_tear")) - { + if (GLXExtensionSupported(g_x11_dpy, "GLX_EXT_swap_control_tear")) + { RARCH_LOG("[GLX]: GLX_EXT_swap_control_tear supported.\n"); x->adaptive_vsync = true; - } + } - if (GLXExtensionSupported(g_x11_dpy, "GLX_OML_sync_control") && - GLXExtensionSupported(g_x11_dpy, "GLX_MESA_swap_control") - ) - x->swap_mode = 1; + if (GLXExtensionSupported(g_x11_dpy, "GLX_OML_sync_control") && + GLXExtensionSupported(g_x11_dpy, "GLX_MESA_swap_control") + ) + x->swap_mode = 1; #endif break; default: @@ -605,7 +469,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - vi = glXGetVisualFromFBConfig(g_x11_dpy, x->g_fbc); + vi = glXGetVisualFromFBConfig(g_x11_dpy, x->fbc); if (!vi) goto error; #endif @@ -638,7 +502,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, { if (x11_enter_fullscreen(g_x11_dpy, width, height)) { - x->g_should_reset_mode = true; + x->should_reset_mode = true; true_full = true; } else @@ -729,7 +593,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - x->g_glx_win = glXCreateWindow(g_x11_dpy, x->g_fbc, g_x11_win, 0); + x->glx_win = glXCreateWindow(g_x11_dpy, x->fbc, g_x11_win, 0); #endif break; @@ -783,21 +647,21 @@ static bool gfx_ctx_x_set_video_mode(void *data, case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - if (!x->g_ctx) + if (!x->ctx) { - if (x->g_core_es || x->g_debug) + if (x->core_es || x->debug) { int attribs[16] = {0}; int *aptr = attribs; - if (x->g_core_es) + if (x->core_es) { *aptr++ = GLX_CONTEXT_MAJOR_VERSION_ARB; *aptr++ = g_major; *aptr++ = GLX_CONTEXT_MINOR_VERSION_ARB; *aptr++ = g_minor; - if (x->g_core_es_core) + if (x->core_es_core) { /* Technically, we don't have core/compat until 3.2. * Version 3.1 is either compat or not depending on @@ -812,7 +676,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, } } - if (x->g_debug) + if (x->debug) { *aptr++ = GLX_CONTEXT_FLAGS_ARB; *aptr++ = GLX_CONTEXT_DEBUG_BIT_ARB; @@ -857,28 +721,28 @@ static bool gfx_ctx_x_set_video_mode(void *data, * The following code can hopefully be removed in the future: */ RARCH_LOG("[GLX]: Creating context for requested version %u.%u.\n", g_major, g_minor); - x->g_ctx = glx_create_context_attribs(g_x11_dpy, - x->g_fbc, NULL, True, attribs); + x->ctx = glx_create_context_attribs(g_x11_dpy, + x->fbc, NULL, True, attribs); - if (x->g_ctx) + if (x->ctx) { const char *version; - if (x->g_use_hw_ctx) + if (x->use_hw_ctx) { RARCH_LOG("[GLX]: Creating shared HW context.\n"); - x->g_hw_ctx = glx_create_context_attribs(g_x11_dpy, - x->g_fbc, x->g_ctx, True, attribs); + x->hw_ctx = glx_create_context_attribs(g_x11_dpy, + x->fbc, x->ctx, True, attribs); - if (!x->g_hw_ctx) + if (!x->hw_ctx) RARCH_ERR("[GLX]: Failed to create new shared context.\n"); } glXMakeContextCurrent(g_x11_dpy, - x->g_glx_win, x->g_glx_win, x->g_ctx); + x->glx_win, x->glx_win, x->ctx); version = (const char*)glGetString(GL_VERSION); - if (strstr(version, " Mesa ") || !x->g_core_es) + if (strstr(version, " Mesa ") || !x->core_es) { /* we are done, break switch case */ XSetErrorHandler(old_handler); @@ -886,7 +750,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, } glXMakeContextCurrent(g_x11_dpy, None, None, NULL); - glXDestroyContext(g_x11_dpy, x->g_ctx); + glXDestroyContext(g_x11_dpy, x->ctx); RARCH_LOG("[GLX]: Not running Mesa, trying higher versions...\n"); } @@ -897,14 +761,14 @@ static bool gfx_ctx_x_set_video_mode(void *data, } /* end of Mesa workaround / code to be removed */ - /* only try higher versions when x->g_core_es is true */ - if (!x->g_core_es) + /* only try higher versions when x->core_es is true */ + if (!x->core_es) version_rows = 1; /* try versions from highest down to requested version */ for (i = 0; i < version_rows; i++) { - if (x->g_core_es) + if (x->core_es) { attribs[1] = versions[i][0]; attribs[3] = versions[i][1]; @@ -913,18 +777,18 @@ static bool gfx_ctx_x_set_video_mode(void *data, else RARCH_LOG("[GLX]: Creating context for version %u.%u.\n", g_major, g_minor); - x->g_ctx = glx_create_context_attribs(g_x11_dpy, - x->g_fbc, NULL, True, attribs); + x->ctx = glx_create_context_attribs(g_x11_dpy, + x->fbc, NULL, True, attribs); - if (x->g_ctx) + if (x->ctx) { - if (x->g_use_hw_ctx) + if (x->use_hw_ctx) { RARCH_LOG("[GLX]: Creating shared HW context.\n"); - x->g_hw_ctx = glx_create_context_attribs(g_x11_dpy, - x->g_fbc, x->g_ctx, True, attribs); + x->hw_ctx = glx_create_context_attribs(g_x11_dpy, + x->fbc, x->ctx, True, attribs); - if (!x->g_hw_ctx) + if (!x->hw_ctx) RARCH_ERR("[GLX]: Failed to create new shared context.\n"); } @@ -942,21 +806,21 @@ static bool gfx_ctx_x_set_video_mode(void *data, } else { - x->g_ctx = glXCreateNewContext(g_x11_dpy, x->g_fbc, + x->ctx = glXCreateNewContext(g_x11_dpy, x->fbc, GLX_RGBA_TYPE, 0, True); - if (x->g_use_hw_ctx) + if (x->use_hw_ctx) { RARCH_LOG("[GLX]: Creating shared HW context.\n"); - x->g_hw_ctx = glXCreateNewContext(g_x11_dpy, x->g_fbc, - GLX_RGBA_TYPE, x->g_ctx, True); + x->hw_ctx = glXCreateNewContext(g_x11_dpy, x->fbc, + GLX_RGBA_TYPE, x->ctx, True); - if (!x->g_hw_ctx) + if (!x->hw_ctx) RARCH_ERR("[GLX]: Failed to create new shared context.\n"); } } - if (!x->g_ctx) + if (!x->ctx) { RARCH_ERR("[GLX]: Failed to create new context.\n"); goto error; @@ -969,29 +833,9 @@ static bool gfx_ctx_x_set_video_mode(void *data, } glXMakeContextCurrent(g_x11_dpy, - x->g_glx_win, x->g_glx_win, x->g_ctx); + x->glx_win, x->glx_win, x->ctx); #endif break; - - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - { - bool quit, resize; - unsigned width = 0, height = 0; - x11_check_window(x, &quit, &resize, &width, &height); - - /* FIXME/TODO - threading error here */ - - /* Use XCB surface since it's the most supported WSI. - * We can obtain the XCB connection directly from X11. */ - if (!vulkan_surface_create(&x->vk, VULKAN_WSI_XCB, - g_x11_dpy, &g_x11_win, - width, height, x->g_interval)) - goto error; - } -#endif - break; - case GFX_CTX_NONE: default: break; @@ -1007,9 +851,9 @@ static bool gfx_ctx_x_set_video_mode(void *data, case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) glXGetConfig(g_x11_dpy, vi, GLX_DOUBLEBUFFER, &val); - x->g_is_double = val; + x->is_double = val; - if (x->g_is_double) + if (x->is_double) { const char *swap_func = NULL; @@ -1042,7 +886,7 @@ static bool gfx_ctx_x_set_video_mode(void *data, break; } - gfx_ctx_x_swap_interval(data, x->g_interval); + gfx_ctx_x_swap_interval(data, x->interval); /* This can blow up on some drivers. * It's not fatal, so override errors for this call. */ @@ -1136,8 +980,6 @@ static enum gfx_ctx_api gfx_ctx_x_get_api(void *data) static bool gfx_ctx_x_bind_api(void *data, enum gfx_ctx_api api, unsigned major, unsigned minor) { - (void)data; - g_major = major; g_minor = minor; x_api = api; @@ -1167,12 +1009,6 @@ static bool gfx_ctx_x_bind_api(void *data, enum gfx_ctx_api api, } #else break; -#endif - case GFX_CTX_VULKAN_API: -#ifdef HAVE_VULKAN - return true; -#else - break; #endif case GFX_CTX_NONE: default: @@ -1199,11 +1035,11 @@ static void gfx_ctx_x_bind_hw_render(void *data, bool enable) case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) - x->g_use_hw_ctx = enable; - if (!g_x11_dpy || !x->g_glx_win) + x->use_hw_ctx = enable; + if (!g_x11_dpy || !x->glx_win) return; - glXMakeContextCurrent(g_x11_dpy, x->g_glx_win, - x->g_glx_win, enable ? x->g_hw_ctx : x->g_ctx); + glXMakeContextCurrent(g_x11_dpy, x->glx_win, + x->glx_win, enable ? x->hw_ctx : x->ctx); #endif break; @@ -1213,14 +1049,6 @@ static void gfx_ctx_x_bind_hw_render(void *data, bool enable) } } -#ifdef HAVE_VULKAN -static void *gfx_ctx_x_get_context_data(void *data) -{ - gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data; - return &x->vk.context; -} -#endif - static uint32_t gfx_ctx_x_get_flags(void *data) { uint32_t flags = 0; @@ -1233,7 +1061,7 @@ static uint32_t gfx_ctx_x_get_flags(void *data) if (x->adaptive_vsync) BIT32_SET(flags, GFX_CTX_FLAGS_ADAPTIVE_VSYNC); - if (x->core_hw_context_enable || x->g_core_es) + if (x->core_hw_context_enable || x->core_es) BIT32_SET(flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT); if (x->msaa_enable) @@ -1249,7 +1077,7 @@ static uint32_t gfx_ctx_x_get_flags(void *data) else { #ifdef HAVE_CG - if (!(x->core_hw_context_enable || x->g_core_es)) + if (!(x->core_hw_context_enable || x->core_es)) BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_CG); #endif #ifdef HAVE_GLSL @@ -1257,11 +1085,6 @@ static uint32_t gfx_ctx_x_get_flags(void *data) #endif } break; - case GFX_CTX_VULKAN_API: -#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) - BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); -#endif - break; case GFX_CTX_NONE: default: break; @@ -1305,8 +1128,8 @@ static void gfx_ctx_x_make_current(bool release) glXMakeContextCurrent(g_x11_dpy, None, None, NULL); else glXMakeContextCurrent(g_x11_dpy, - current_context_data->g_glx_win, - current_context_data->g_glx_win, current_context_data->g_ctx); + current_context_data->glx_win, + current_context_data->glx_win, current_context_data->ctx); #endif break; @@ -1331,7 +1154,7 @@ const gfx_ctx_driver_t gfx_ctx_x = { x11_get_metrics, NULL, x11_update_title, - gfx_ctx_x_check_window, + x11_check_window, gfx_ctx_x_set_resize, x11_has_focus, gfx_ctx_x_suppress_screensaver, @@ -1347,10 +1170,6 @@ const gfx_ctx_driver_t gfx_ctx_x = { gfx_ctx_x_set_flags, gfx_ctx_x_bind_hw_render, -#ifdef HAVE_VULKAN - gfx_ctx_x_get_context_data, -#else NULL, -#endif gfx_ctx_x_make_current }; diff --git a/gfx/drivers_context/x_vk_ctx.c b/gfx/drivers_context/x_vk_ctx.c new file mode 100644 index 0000000000..12423c2cc8 --- /dev/null +++ b/gfx/drivers_context/x_vk_ctx.c @@ -0,0 +1,563 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2010-2014 - Hans-Kristian Arntzen + * Copyright (C) 2011-2017 - Daniel De Matteis + * Copyright (C) 2016-2019 - Brad Parker + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * 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 . + */ + +#include +#include +#include + +#ifdef HAVE_CONFIG_H +#include "../../config.h" +#endif + +#include +#include +#include + +#include "../../configuration.h" +#include "../../frontend/frontend_driver.h" +#include "../../input/input_driver.h" +#include "../../verbosity.h" +#include "../common/gl_common.h" +#include "../common/x11_common.h" + +#ifdef HAVE_XINERAMA +#include "../common/xinerama_common.h" +#endif + +#include "../common/vulkan_common.h" + +typedef struct gfx_ctx_x_vk_data +{ + bool should_reset_mode; + + int interval; + + gfx_ctx_vulkan_data_t vk; +} gfx_ctx_x_vk_data_t; + +typedef struct Hints +{ + unsigned long flags; + unsigned long functions; + unsigned long decorations; + long inputMode; + unsigned long status; +} Hints; + +/* We use long because X11 wants 32-bit pixels for 32-bit systems and 64 for 64... */ +/* ARGB*/ +static const unsigned long retroarch_icon_vk_data[] = { + 16, 16, +0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000, +0x00000000,0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xfff2f2f2,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0xfff2f2f2,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xfff2f2f2,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xfff2f2f2,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000, +0x00000000,0x00000000,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0xff333333,0x00000000,0x00000000,0x00000000, +0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000,0x00000000 +}; + +static int x_vk_nul_handler(Display *dpy, XErrorEvent *event) { return 0; } + +static void gfx_ctx_x_vk_destroy_resources(gfx_ctx_x_vk_data_t *x) +{ + x11_input_ctx_destroy(); + + if (g_x11_dpy) + { + vulkan_context_destroy(&x->vk, g_x11_win != 0); + } + + if (g_x11_win && g_x11_dpy) + { +#ifdef HAVE_XINERAMA + /* Save last used monitor for later. */ + xinerama_save_last_used_monitor(DefaultRootWindow(g_x11_dpy)); +#endif + x11_window_destroy(false); + } + + x11_colormap_destroy(); + + if (g_x11_dpy) + { + if (x->should_reset_mode) + { + x11_exit_fullscreen(g_x11_dpy); + x->should_reset_mode = false; + } + + if (!video_driver_is_video_cache_context()) + { + XCloseDisplay(g_x11_dpy); + g_x11_dpy = NULL; + } + } +} + +static void gfx_ctx_x_vk_destroy(void *data) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + if (!x) + return; + + gfx_ctx_x_vk_destroy_resources(x); + +#if defined(HAVE_THREADS) + if (x->vk.context.queue_lock) + slock_free(x->vk.context.queue_lock); +#endif + + free(data); +} + +static void gfx_ctx_x_vk_swap_interval(void *data, int interval) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + + if (x->interval != interval) + { + x->interval = interval; + if (x->vk.swapchain) + x->vk.need_new_swapchain = true; + } +} + +static void gfx_ctx_x_vk_swap_buffers(void *data) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + + vulkan_present(&x->vk, x->vk.context.current_swapchain_index); + vulkan_acquire_next_image(&x->vk); +} + +static void gfx_ctx_x_vk_check_window(void *data, bool *quit, + bool *resize, unsigned *width, unsigned *height) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + x11_check_window(data, quit, resize, width, height); + + if (x->vk.need_new_swapchain) + *resize = true; +} + +static bool gfx_ctx_x_vk_set_resize(void *data, + unsigned width, unsigned height) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + + /* FIXME/TODO - threading error here */ + + if (!vulkan_create_swapchain(&x->vk, width, height, x->interval)) + { + RARCH_ERR("[X/Vulkan]: Failed to update swapchain.\n"); + x->vk.swapchain = VK_NULL_HANDLE; + return false; + } + + if (x->vk.created_new_swapchain) + vulkan_acquire_next_image(&x->vk); + x->vk.context.invalid_swapchain = true; + x->vk.need_new_swapchain = false; + return true; +} + +static void *gfx_ctx_x_vk_init(void *data) +{ + int nelements = 0; + int major = 0; + int minor = 0; + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*) + calloc(1, sizeof(gfx_ctx_x_vk_data_t)); + + if (!x) + return NULL; + + XInitThreads(); + + if (!x11_connect()) + goto error; + + /* Use XCB WSI since it's the most supported WSI over legacy Xlib. */ + if (!vulkan_context_init(&x->vk, VULKAN_WSI_XCB)) + goto error; + + return x; + +error: + if (x) + { + gfx_ctx_x_vk_destroy_resources(x); + free(x); + } + g_x11_screen = 0; + + return NULL; +} + +static bool gfx_ctx_x_vk_set_video_mode(void *data, + unsigned width, unsigned height, + bool fullscreen) +{ + XEvent event; + bool true_full = false; + int val = 0; + int x_off = 0; + int y_off = 0; + XVisualInfo *vi = NULL; + XSetWindowAttributes swa = {0}; + char *wm_name = NULL; + int (*old_handler)(Display*, XErrorEvent*) = NULL; + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + Atom net_wm_icon = XInternAtom(g_x11_dpy, "_NET_WM_ICON", False); + Atom cardinal = XInternAtom(g_x11_dpy, "CARDINAL", False); + settings_t *settings = config_get_ptr(); + unsigned opacity = settings->uints.video_window_opacity + * ((unsigned)-1 / 100.0); + bool disable_composition = settings->bools.video_disable_composition; + bool show_decorations = settings->bools.video_window_show_decorations; + bool windowed_full = settings->bools.video_windowed_fullscreen; + unsigned video_monitor_index = settings->uints.video_monitor_index; + + frontend_driver_install_signal_handler(); + + if (!x) + return false; + + { + XVisualInfo vi_template; + /* For default case, just try to obtain a visual from template. */ + int nvisuals = 0; + + memset(&vi_template, 0, sizeof(vi_template)); + vi_template.screen = DefaultScreen(g_x11_dpy); + vi = XGetVisualInfo(g_x11_dpy, VisualScreenMask, &vi_template, &nvisuals); + if (!vi || nvisuals < 1) + goto error; + } + + swa.colormap = g_x11_cmap = XCreateColormap(g_x11_dpy, + RootWindow(g_x11_dpy, vi->screen), vi->visual, AllocNone); + swa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | + LeaveWindowMask | EnterWindowMask | + ButtonReleaseMask | ButtonPressMask; + swa.override_redirect = False; + + if (fullscreen && !windowed_full) + { + if (x11_enter_fullscreen(g_x11_dpy, width, height)) + { + x->should_reset_mode = true; + true_full = true; + } + else + RARCH_ERR("[GLX]: Entering true fullscreen failed. Will attempt windowed mode.\n"); + } + + wm_name = x11_get_wm_name(g_x11_dpy); + if (wm_name) + { + RARCH_LOG("[GLX]: Window manager is %s.\n", wm_name); + + if (true_full && strcasestr(wm_name, "xfwm")) + { + RARCH_LOG("[GLX]: Using override-redirect workaround.\n"); + swa.override_redirect = True; + } + free(wm_name); + } + if (!x11_has_net_wm_fullscreen(g_x11_dpy) && true_full) + swa.override_redirect = True; + + if (video_monitor_index) + g_x11_screen = video_monitor_index - 1; + +#ifdef HAVE_XINERAMA + if (fullscreen || g_x11_screen != 0) + { + unsigned new_width = width; + unsigned new_height = height; + + if (xinerama_get_coord(g_x11_dpy, g_x11_screen, + &x_off, &y_off, &new_width, &new_height)) + RARCH_LOG("[GLX]: Using Xinerama on screen #%u.\n", g_x11_screen); + else + RARCH_LOG("[GLX]: Xinerama is not active on screen.\n"); + + if (fullscreen) + { + width = new_width; + height = new_height; + } + } +#endif + + RARCH_LOG("[GLX]: X = %d, Y = %d, W = %u, H = %u.\n", + x_off, y_off, width, height); + + g_x11_win = XCreateWindow(g_x11_dpy, RootWindow(g_x11_dpy, vi->screen), + x_off, y_off, width, height, 0, + vi->depth, InputOutput, vi->visual, + CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect, + &swa); + XSetWindowBackground(g_x11_dpy, g_x11_win, 0); + + XChangeProperty(g_x11_dpy, g_x11_win, net_wm_icon, cardinal, 32, PropModeReplace, (const unsigned char*)retroarch_icon_vk_data, sizeof(retroarch_icon_vk_data) / sizeof(*retroarch_icon_vk_data)); + + if (fullscreen && disable_composition) + { + uint32_t value = 1; + Atom net_wm_bypass_compositor = XInternAtom(g_x11_dpy, "_NET_WM_BYPASS_COMPOSITOR", False); + + RARCH_LOG("[GLX]: Requesting compositor bypass.\n"); + XChangeProperty(g_x11_dpy, g_x11_win, net_wm_bypass_compositor, cardinal, 32, PropModeReplace, (const unsigned char*)&value, 1); + } + + if (opacity < (unsigned)-1) + { + Atom net_wm_opacity = XInternAtom(g_x11_dpy, "_NET_WM_WINDOW_OPACITY", False); + XChangeProperty(g_x11_dpy, g_x11_win, net_wm_opacity, cardinal, 32, PropModeReplace, (const unsigned char*)&opacity, 1); + } + + if (!show_decorations) + { + /* We could have just set _NET_WM_WINDOW_TYPE_DOCK instead, + * but that removes the window from any taskbar/panel, + * so we are forced to use the old motif hints method. */ + Hints hints; + Atom property = XInternAtom(g_x11_dpy, "_MOTIF_WM_HINTS", False); + + hints.flags = 2; + hints.decorations = 0; + + XChangeProperty(g_x11_dpy, g_x11_win, property, property, 32, PropModeReplace, (const unsigned char*)&hints, 5); + } + + x11_set_window_attr(g_x11_dpy, g_x11_win); + x11_update_title(NULL); + + if (fullscreen) + x11_show_mouse(g_x11_dpy, g_x11_win, false); + + if (true_full) + { + RARCH_LOG("[GLX]: Using true fullscreen.\n"); + XMapRaised(g_x11_dpy, g_x11_win); + x11_set_net_wm_fullscreen(g_x11_dpy, g_x11_win); + } + else if (fullscreen) + { + /* We attempted true fullscreen, but failed. + * Attempt using windowed fullscreen. */ + + XMapRaised(g_x11_dpy, g_x11_win); + RARCH_LOG("[GLX]: Using windowed fullscreen.\n"); + + /* We have to move the window to the screen we want + * to go fullscreen on first. + * x_off and y_off usually get ignored in XCreateWindow(). + */ + x11_move_window(g_x11_dpy, g_x11_win, x_off, y_off, width, height); + x11_set_net_wm_fullscreen(g_x11_dpy, g_x11_win); + } + else + { + XMapWindow(g_x11_dpy, g_x11_win); + /* If we want to map the window on a different screen, + * we'll have to do it by force. + * Otherwise, we should try to let the window manager sort it out. + * x_off and y_off usually get ignored in XCreateWindow(). */ + if (g_x11_screen) + x11_move_window(g_x11_dpy, g_x11_win, x_off, y_off, width, height); + } + + x11_event_queue_check(&event); + + { + bool quit, resize; + unsigned width = 0, height = 0; + x11_check_window(x, &quit, &resize, &width, &height); + + /* FIXME/TODO - threading error here */ + + /* Use XCB surface since it's the most supported WSI. + * We can obtain the XCB connection directly from X11. */ + if (!vulkan_surface_create(&x->vk, VULKAN_WSI_XCB, + g_x11_dpy, &g_x11_win, + width, height, x->interval)) + goto error; + } + + XSync(g_x11_dpy, False); + + x11_install_quit_atom(); + + gfx_ctx_x_vk_swap_interval(data, x->interval); + + /* This can blow up on some drivers. + * It's not fatal, so override errors for this call. */ + old_handler = XSetErrorHandler(x_vk_nul_handler); + XSetInputFocus(g_x11_dpy, g_x11_win, RevertToNone, CurrentTime); + XSync(g_x11_dpy, False); + XSetErrorHandler(old_handler); + + XFree(vi); + vi = NULL; + + if (!x11_input_ctx_new(true_full)) + goto error; + + return true; + +error: + if (vi) + XFree(vi); + + gfx_ctx_x_vk_destroy_resources(x); + + if (x) + free(x); + g_x11_screen = 0; + + return false; +} + +static void gfx_ctx_x_vk_input_driver(void *data, + const char *joypad_name, + input_driver_t **input, void **input_data) +{ + void *x_input = NULL; +#ifdef HAVE_UDEV + settings_t *settings = config_get_ptr(); + const char *input_driver = settings->arrays.input_driver; + + if (string_is_equal(input_driver, "udev")) + { + *input_data = input_udev.init(joypad_name); + if (*input_data) + { + *input = &input_udev; + return; + } + } +#endif + + x_input = input_x.init(joypad_name); + *input = x_input ? &input_x : NULL; + *input_data = x_input; +} + +static bool gfx_ctx_x_vk_suppress_screensaver(void *data, bool enable) +{ + if (video_driver_display_type_get() != RARCH_DISPLAY_X11) + return false; + + x11_suspend_screensaver(video_driver_window_get(), enable); + + return true; +} + +static enum gfx_ctx_api gfx_ctx_x_vk_get_api(void *data) +{ + return GFX_CTX_VULKAN_API; +} + +static bool gfx_ctx_x_vk_bind_api(void *data, enum gfx_ctx_api api, + unsigned major, unsigned minor) +{ + if (api == GFX_CTX_VULKAN_API) + return true; + + return false; +} + +static void gfx_ctx_x_vk_show_mouse(void *data, bool state) +{ + x11_show_mouse(g_x11_dpy, g_x11_win, state); +} + +static void gfx_ctx_x_vk_bind_hw_render(void *data, bool enable) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + + if (!x) + return; +} + +static void *gfx_ctx_x_vk_get_context_data(void *data) +{ + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + return &x->vk.context; +} + +static uint32_t gfx_ctx_x_vk_get_flags(void *data) +{ + uint32_t flags = 0; + gfx_ctx_x_vk_data_t *x = (gfx_ctx_x_vk_data_t*)data; + +#if defined(HAVE_SLANG) && defined(HAVE_SPIRV_CROSS) + BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG); +#endif + + return flags; +} + +static void gfx_ctx_x_vk_set_flags(void *data, uint32_t flags) { } + +const gfx_ctx_driver_t gfx_ctx_vk_x = { + gfx_ctx_x_vk_init, + gfx_ctx_x_vk_destroy, + gfx_ctx_x_vk_get_api, + gfx_ctx_x_vk_bind_api, + gfx_ctx_x_vk_swap_interval, + gfx_ctx_x_vk_set_video_mode, + x11_get_video_size, + x11_get_refresh_rate, + NULL, /* get_video_output_size */ + NULL, /* get_video_output_prev */ + NULL, /* get_video_output_next */ + x11_get_metrics, + NULL, + x11_update_title, + gfx_ctx_x_vk_check_window, + gfx_ctx_x_vk_set_resize, + x11_has_focus, + gfx_ctx_x_vk_suppress_screensaver, + true, /* has_windowed */ + gfx_ctx_x_vk_swap_buffers, + gfx_ctx_x_vk_input_driver, + NULL, /* get_proc_address */ + NULL, + NULL, + gfx_ctx_x_vk_show_mouse, + "vk_x", + gfx_ctx_x_vk_get_flags, + gfx_ctx_x_vk_set_flags, + + gfx_ctx_x_vk_bind_hw_render, + gfx_ctx_x_vk_get_context_data, + NULL /* make_current */ +}; diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index fc01931b60..fd8f787044 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -54,14 +54,10 @@ typedef struct bool should_reset_mode; } xegl_ctx_data_t; +/* TODO/FIXME - static globals */ static enum gfx_ctx_api xegl_api = GFX_CTX_NONE; -static int xegl_nul_handler(Display *dpy, XErrorEvent *event) -{ - (void)dpy; - (void)event; - return 0; -} +static int xegl_nul_handler(Display *dpy, XErrorEvent *event) { return 0; } static void gfx_ctx_xegl_destroy(void *data) { @@ -468,8 +464,6 @@ static void gfx_ctx_xegl_input_driver(void *data, static bool gfx_ctx_xegl_suppress_screensaver(void *data, bool enable) { - (void)data; - if (video_driver_display_type_get() != RARCH_DISPLAY_X11) return false; @@ -478,10 +472,7 @@ static bool gfx_ctx_xegl_suppress_screensaver(void *data, bool enable) return true; } -static enum gfx_ctx_api gfx_ctx_xegl_get_api(void *data) -{ - return xegl_api; -} +static enum gfx_ctx_api gfx_ctx_xegl_get_api(void *data) { return xegl_api; } static bool gfx_ctx_xegl_bind_api(void *video_driver, enum gfx_ctx_api api, unsigned major, unsigned minor) @@ -517,7 +508,6 @@ static bool gfx_ctx_xegl_bind_api(void *video_driver, static void gfx_ctx_xegl_show_mouse(void *data, bool state) { - (void)data; x11_show_mouse(g_x11_dpy, g_x11_win, state); } @@ -525,55 +515,27 @@ static void gfx_ctx_xegl_swap_buffers(void *data) { xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; - switch (xegl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_swap_buffers(&xegl->egl); + egl_swap_buffers(&xegl->egl); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } static void gfx_ctx_xegl_bind_hw_render(void *data, bool enable) { xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; - switch (xegl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: - case GFX_CTX_OPENVG_API: #ifdef HAVE_EGL - egl_bind_hw_render(&xegl->egl, enable); + egl_bind_hw_render(&xegl->egl, enable); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } static void gfx_ctx_xegl_set_swap_interval(void *data, int swap_interval) { xegl_ctx_data_t *xegl = (xegl_ctx_data_t*)data; - switch (xegl_api) - { - case GFX_CTX_OPENGL_API: - case GFX_CTX_OPENGL_ES_API: #ifdef HAVE_EGL - egl_set_swap_interval(&xegl->egl, swap_interval); + egl_set_swap_interval(&xegl->egl, swap_interval); #endif - break; - case GFX_CTX_NONE: - default: - break; - } } static gfx_ctx_proc_t gfx_ctx_xegl_get_proc_address(const char *symbol) @@ -615,10 +577,7 @@ static uint32_t gfx_ctx_xegl_get_flags(void *data) return flags; } -static void gfx_ctx_xegl_set_flags(void *data, uint32_t flags) -{ - (void)data; -} +static void gfx_ctx_xegl_set_flags(void *data, uint32_t flags) { } const gfx_ctx_driver_t gfx_ctx_x_egl = { diff --git a/gfx/drivers_display/gfx_display_vulkan.c b/gfx/drivers_display/gfx_display_vulkan.c index 47cd1e6aee..76e6caa867 100644 --- a/gfx/drivers_display/gfx_display_vulkan.c +++ b/gfx/drivers_display/gfx_display_vulkan.c @@ -305,22 +305,23 @@ static void gfx_display_vk_clear_color( { VkClearRect rect; VkClearAttachment attachment; - vk_t *vk = (vk_t*)data; + vk_t *vk = (vk_t*)data; if (!vk || !clearcolor) return; - memset(&attachment, 0, sizeof(attachment)); - memset(&rect, 0, sizeof(rect)); - attachment.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + attachment.colorAttachment = 0; attachment.clearValue.color.float32[0] = clearcolor->r; attachment.clearValue.color.float32[1] = clearcolor->g; attachment.clearValue.color.float32[2] = clearcolor->b; attachment.clearValue.color.float32[3] = clearcolor->a; - rect.rect.extent.width = vk->context->swapchain_width; - rect.rect.extent.height = vk->context->swapchain_height; - rect.layerCount = 1; + rect.rect.offset.x = 0; + rect.rect.offset.y = 0; + rect.rect.extent.width = vk->context->swapchain_width; + rect.rect.extent.height = vk->context->swapchain_height; + rect.baseArrayLayer = 0; + rect.layerCount = 1; vkCmdClearAttachments(vk->cmd, 1, &attachment, 1, &rect); } diff --git a/gfx/drivers_font/ctr_font.c b/gfx/drivers_font/ctr_font.c index 94f7d7c24d..b9de6fdbff 100644 --- a/gfx/drivers_font/ctr_font.c +++ b/gfx/drivers_font/ctr_font.c @@ -334,25 +334,18 @@ static void ctr_font_render_message( for (;;) { const char* delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - ctr_font_render_line(ctr, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - width, height, text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - ctr_font_render_line(ctr, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - width, height, text_align); + ctr_font_render_line(ctr, font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + width, height, text_align); + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/d3d10_font.c b/gfx/drivers_font/d3d10_font.c index a3bedcdbb3..10f897b272 100644 --- a/gfx/drivers_font/d3d10_font.c +++ b/gfx/drivers_font/d3d10_font.c @@ -259,27 +259,20 @@ static void d3d10_font_render_message( for (;;) { const char* delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - d3d10_font_render_line(d3d10, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, - width, height, text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - d3d10_font_render_line(d3d10, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, - width, height, text_align); + d3d10_font_render_line(d3d10, + font, msg, msg_len, scale, color, pos_x, + pos_y - (float)lines * line_height, + width, height, text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/d3d11_font.c b/gfx/drivers_font/d3d11_font.c index 1a037523e6..5c1b638f78 100644 --- a/gfx/drivers_font/d3d11_font.c +++ b/gfx/drivers_font/d3d11_font.c @@ -256,27 +256,20 @@ static void d3d11_font_render_message( for (;;) { const char* delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - d3d11_font_render_line(d3d11, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, - width, height, text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - d3d11_font_render_line(d3d11, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, - width, height, text_align); + d3d11_font_render_line(d3d11, + font, msg, msg_len, scale, color, pos_x, + pos_y - (float)lines * line_height, + width, height, text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/d3d12_font.c b/gfx/drivers_font/d3d12_font.c index 7ed6634d05..61a1db54a3 100644 --- a/gfx/drivers_font/d3d12_font.c +++ b/gfx/drivers_font/d3d12_font.c @@ -270,25 +270,19 @@ static void d3d12_font_render_message( for (;;) { const char* delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - d3d12_font_render_line(d3d12, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, width, height, text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - d3d12_font_render_line(d3d12, - font, msg, msg_len, scale, color, pos_x, - pos_y - (float)lines * line_height, width, height, text_align); + d3d12_font_render_line(d3d12, + font, msg, msg_len, scale, color, pos_x, + pos_y - (float)lines * line_height, width, height, text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/gl1_raster_font.c b/gfx/drivers_font/gl1_raster_font.c index 118d42e903..1a8402a0c5 100644 --- a/gfx/drivers_font/gl1_raster_font.c +++ b/gfx/drivers_font/gl1_raster_font.c @@ -28,24 +28,20 @@ /* TODO: Move viewport side effects to the caller: it's a source of bugs. */ -#define gl1_raster_font_emit(c, vx, vy) do { \ - font_vertex[ 2 * (6 * i + c) + 0] = (x + (delta_x + off_x + vx * width) * scale) * inv_win_width; \ - font_vertex[ 2 * (6 * i + c) + 1] = (y + (delta_y - off_y - vy * height) * scale) * inv_win_height; \ - font_tex_coords[ 2 * (6 * i + c) + 0] = (tex_x + vx * width) * inv_tex_size_x; \ - font_tex_coords[ 2 * (6 * i + c) + 1] = (tex_y + vy * height) * inv_tex_size_y; \ - font_color[ 4 * (6 * i + c) + 0] = color[0]; \ - font_color[ 4 * (6 * i + c) + 1] = color[1]; \ - font_color[ 4 * (6 * i + c) + 2] = color[2]; \ - font_color[ 4 * (6 * i + c) + 3] = color[3]; \ +#define GL1_RASTER_FONT_EMIT(c, vx, vy) \ + font_vertex[ 2 * (6 * i + c) + 0] = (x + (delta_x + off_x + vx * width) * scale) * inv_win_width; \ + font_vertex[ 2 * (6 * i + c) + 1] = (y + (delta_y - off_y - vy * height) * scale) * inv_win_height; \ + font_tex_coords[ 2 * (6 * i + c) + 0] = (tex_x + vx * width) * inv_tex_size_x; \ + font_tex_coords[ 2 * (6 * i + c) + 1] = (tex_y + vy * height) * inv_tex_size_y; \ + font_color[ 4 * (6 * i + c) + 0] = color[0]; \ + font_color[ 4 * (6 * i + c) + 1] = color[1]; \ + font_color[ 4 * (6 * i + c) + 2] = color[2]; \ + font_color[ 4 * (6 * i + c) + 3] = color[3]; \ font_lut_tex_coord[ 2 * (6 * i + c) + 0] = gl->coords.lut_tex_coord[0]; \ - font_lut_tex_coord[ 2 * (6 * i + c) + 1] = gl->coords.lut_tex_coord[1]; \ -} while(0) + font_lut_tex_coord[ 2 * (6 * i + c) + 1] = gl->coords.lut_tex_coord[1] #define MAX_MSG_LEN_CHUNK 64 -#ifdef VITA -static float *vertices3 = NULL; -#endif typedef struct { @@ -248,6 +244,10 @@ static int gl1_get_message_width(void *data, const char *msg, static void gl1_raster_font_draw_vertices(gl1_raster_t *font, const video_coords_t *coords) { +#ifdef VITA + static float *vertices3 = NULL; +#endif + if (font->atlas->dirty) { gl1_raster_font_upload_atlas(font); @@ -270,10 +270,13 @@ static void gl1_raster_font_draw_vertices(gl1_raster_t *font, if (vertices3) free(vertices3); vertices3 = (float*)malloc(sizeof(float) * 3 * coords->vertices); - int i; - for (i = 0; i < coords->vertices; i++) { - memcpy(&vertices3[i*3], &coords->vertex[i*2], sizeof(float) * 2); - vertices3[i*3+2] = 0.0f; + { + int i; + for (i = 0; i < coords->vertices; i++) + { + memcpy(&vertices3[i*3], &coords->vertex[i*2], sizeof(float) * 2); + vertices3[i*3+2] = 0.0f; + } } glVertexPointer(3, GL_FLOAT, 0, vertices3); #else @@ -350,13 +353,13 @@ static void gl1_raster_font_render_line( width = glyph->width; height = glyph->height; - gl1_raster_font_emit(0, 0, 1); /* Bottom-left */ - gl1_raster_font_emit(1, 1, 1); /* Bottom-right */ - gl1_raster_font_emit(2, 0, 0); /* Top-left */ + GL1_RASTER_FONT_EMIT(0, 0, 1); /* Bottom-left */ + GL1_RASTER_FONT_EMIT(1, 1, 1); /* Bottom-right */ + GL1_RASTER_FONT_EMIT(2, 0, 0); /* Top-left */ - gl1_raster_font_emit(3, 1, 0); /* Top-right */ - gl1_raster_font_emit(4, 0, 0); /* Top-left */ - gl1_raster_font_emit(5, 1, 1); /* Bottom-right */ + GL1_RASTER_FONT_EMIT(3, 1, 0); /* Top-right */ + GL1_RASTER_FONT_EMIT(4, 0, 0); /* Top-left */ + GL1_RASTER_FONT_EMIT(5, 1, 1); /* Bottom-right */ i++; @@ -498,37 +501,38 @@ static void gl1_raster_font_render_msg( else gl1_raster_font_setup_viewport(width, height, font, full_screen); - if (!string_is_empty(msg) && font->gl - && font->font_data && font->font_driver) + if (font->gl) { - if (drop_x || drop_y) + if (!string_is_empty(msg) + && font->font_data && font->font_driver) { - GLfloat color_dark[4]; + if (drop_x || drop_y) + { + GLfloat color_dark[4]; - color_dark[0] = color[0] * drop_mod; - color_dark[1] = color[1] * drop_mod; - color_dark[2] = color[2] * drop_mod; - color_dark[3] = color[3] * drop_alpha; + color_dark[0] = color[0] * drop_mod; + color_dark[1] = color[1] * drop_mod; + color_dark[2] = color[2] * drop_mod; + color_dark[3] = color[3] * drop_alpha; - if (font->gl) gl1_raster_font_render_message(font, msg, scale, color_dark, x + scale * drop_x / font->gl->vp.width, y + - scale * drop_y / font->gl->vp.height, text_align); - } + scale * drop_y / font->gl->vp.height, text_align); + } - if (font->gl) gl1_raster_font_render_message(font, msg, scale, color, x, y, text_align); - } + } - if (!font->block && font->gl) - { - /* restore viewport */ - glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, font->gl->texture[font->gl->tex_index]); + if (!font->block) + { + /* restore viewport */ + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, font->gl->texture[font->gl->tex_index]); - glDisable(GL_BLEND); - video_driver_set_viewport(width, height, false, true); + glDisable(GL_BLEND); + video_driver_set_viewport(width, height, false, true); + } } } diff --git a/gfx/drivers_font/gl_core_raster_font.c b/gfx/drivers_font/gl_core_raster_font.c index b3094699c9..f9a2156f61 100644 --- a/gfx/drivers_font/gl_core_raster_font.c +++ b/gfx/drivers_font/gl_core_raster_font.c @@ -29,7 +29,7 @@ /* TODO: Move viewport side effects to the caller: it's a source of bugs. */ -#define gl_core_raster_font_emit(c, vx, vy) do { \ +#define GL_CORE_RASTER_FONT_EMIT(c, vx, vy) \ font_vertex[ 2 * (6 * i + c) + 0] = (x + (delta_x + off_x + vx * width) * scale) * inv_win_width; \ font_vertex[ 2 * (6 * i + c) + 1] = (y + (delta_y - off_y - vy * height) * scale) * inv_win_height; \ font_tex_coords[ 2 * (6 * i + c) + 0] = (tex_x + vx * width) * inv_tex_size_x; \ @@ -37,8 +37,7 @@ font_color[ 4 * (6 * i + c) + 0] = color[0]; \ font_color[ 4 * (6 * i + c) + 1] = color[1]; \ font_color[ 4 * (6 * i + c) + 2] = color[2]; \ - font_color[ 4 * (6 * i + c) + 3] = color[3]; \ -} while(0) + font_color[ 4 * (6 * i + c) + 3] = color[3] #define MAX_MSG_LEN_CHUNK 64 @@ -180,11 +179,10 @@ static void gl_core_raster_font_draw_vertices(gl_core_raster_t *font, glActiveTexture(GL_TEXTURE1); glBindTexture(GL_TEXTURE_2D, font->tex); - if (font->gl->pipelines.font_loc.flat_ubo_vertex >= 0) - { + if ( font->gl && + font->gl->pipelines.font_loc.flat_ubo_vertex >= 0) glUniform4fv(font->gl->pipelines.font_loc.flat_ubo_vertex, 4, font->gl->mvp_no_rot.data); - } glEnableVertexAttribArray(0); glEnableVertexAttribArray(1); @@ -261,13 +259,13 @@ static void gl_core_raster_font_render_line( width = glyph->width; height = glyph->height; - gl_core_raster_font_emit(0, 0, 1); /* Bottom-left */ - gl_core_raster_font_emit(1, 1, 1); /* Bottom-right */ - gl_core_raster_font_emit(2, 0, 0); /* Top-left */ + GL_CORE_RASTER_FONT_EMIT(0, 0, 1); /* Bottom-left */ + GL_CORE_RASTER_FONT_EMIT(1, 1, 1); /* Bottom-right */ + GL_CORE_RASTER_FONT_EMIT(2, 0, 0); /* Top-left */ - gl_core_raster_font_emit(3, 1, 0); /* Top-right */ - gl_core_raster_font_emit(4, 0, 0); /* Top-left */ - gl_core_raster_font_emit(5, 1, 1); /* Bottom-right */ + GL_CORE_RASTER_FONT_EMIT(3, 1, 0); /* Top-right */ + GL_CORE_RASTER_FONT_EMIT(4, 0, 0); /* Top-left */ + GL_CORE_RASTER_FONT_EMIT(5, 1, 1); /* Bottom-right */ i++; @@ -336,7 +334,8 @@ static void gl_core_raster_font_setup_viewport(unsigned width, unsigned height, glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendEquation(GL_FUNC_ADD); - glUseProgram(font->gl->pipelines.font); + if (font->gl) + glUseProgram(font->gl->pipelines.font); } static void gl_core_raster_font_render_msg( @@ -408,33 +407,34 @@ static void gl_core_raster_font_render_msg( else gl_core_raster_font_setup_viewport(width, height, font, full_screen); - if (!string_is_empty(msg) && font->gl - && font->font_data && font->font_driver) + if (font->gl) { - if (drop_x || drop_y) + if (!string_is_empty(msg) + && font->font_data && font->font_driver) { - GLfloat color_dark[4]; + if (drop_x || drop_y) + { + GLfloat color_dark[4]; - color_dark[0] = color[0] * drop_mod; - color_dark[1] = color[1] * drop_mod; - color_dark[2] = color[2] * drop_mod; - color_dark[3] = color[3] * drop_alpha; + color_dark[0] = color[0] * drop_mod; + color_dark[1] = color[1] * drop_mod; + color_dark[2] = color[2] * drop_mod; + color_dark[3] = color[3] * drop_alpha; - if (font->gl) gl_core_raster_font_render_message(font, msg, scale, color_dark, x + scale * drop_x / font->gl->vp.width, y + - scale * drop_y / font->gl->vp.height, text_align); - } + scale * drop_y / font->gl->vp.height, text_align); + } - if (font->gl) gl_core_raster_font_render_message(font, msg, scale, color, x, y, text_align); - } + } - if (!font->block && font->gl) - { - glDisable(GL_BLEND); - video_driver_set_viewport(width, height, false, true); + if (!font->block) + { + glDisable(GL_BLEND); + video_driver_set_viewport(width, height, false, true); + } } } diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index 783d6e84b9..84072e5bcf 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -28,7 +28,7 @@ /* TODO: Move viewport side effects to the caller: it's a source of bugs. */ -#define gl_raster_font_emit(c, vx, vy) do { \ +#define GL_RASTER_FONT_EMIT(c, vx, vy) \ font_vertex[ 2 * (6 * i + c) + 0] = (x + (delta_x + off_x + vx * width) * scale) * inv_win_width; \ font_vertex[ 2 * (6 * i + c) + 1] = (y + (delta_y - off_y - vy * height) * scale) * inv_win_height; \ font_tex_coords[ 2 * (6 * i + c) + 0] = (tex_x + vx * width) * inv_tex_size_x; \ @@ -38,8 +38,7 @@ font_color[ 4 * (6 * i + c) + 2] = color[2]; \ font_color[ 4 * (6 * i + c) + 3] = color[3]; \ font_lut_tex_coord[ 2 * (6 * i + c) + 0] = gl->coords.lut_tex_coord[0]; \ - font_lut_tex_coord[ 2 * (6 * i + c) + 1] = gl->coords.lut_tex_coord[1]; \ -} while(0) + font_lut_tex_coord[ 2 * (6 * i + c) + 1] = gl->coords.lut_tex_coord[1] #define MAX_MSG_LEN_CHUNK 64 @@ -91,9 +90,8 @@ static bool gl_raster_font_upload_atlas_components_4(gl_raster_t *font) GLint gl_internal = GL_RGBA; GLenum gl_format = GL_RGBA; size_t ncomponents = 4; - uint8_t *tmp = NULL; - - tmp = (uint8_t*)calloc(font->tex_height, font->tex_width * ncomponents); + uint8_t *tmp = (uint8_t*) + calloc(font->tex_height, font->tex_width * ncomponents); for (i = 0; i < font->atlas->height; ++i) { @@ -110,7 +108,8 @@ static bool gl_raster_font_upload_atlas_components_4(gl_raster_t *font) break; } - glTexImage2D(GL_TEXTURE_2D, 0, gl_internal, font->tex_width, font->tex_height, + glTexImage2D(GL_TEXTURE_2D, 0, gl_internal, + font->tex_width, font->tex_height, 0, gl_format, GL_UNSIGNED_BYTE, tmp); free(tmp); @@ -129,9 +128,9 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font) #if defined(GL_VERSION_3_0) struct retro_hw_render_callback *hwr = video_driver_get_hw_context(); - if (font->gl->core_context_in_use || - (hwr->context_type == RETRO_HW_CONTEXT_OPENGL && - hwr->version_major >= 3)) + if ((font->gl && font->gl->core_context_in_use) || + (hwr->context_type == RETRO_HW_CONTEXT_OPENGL && + hwr->version_major >= 3)) { GLint swizzle[] = { GL_ONE, GL_ONE, GL_ONE, GL_RED }; glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle); @@ -170,7 +169,8 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font) break; } - glTexImage2D(GL_TEXTURE_2D, 0, gl_internal, font->tex_width, font->tex_height, + glTexImage2D(GL_TEXTURE_2D, 0, gl_internal, + font->tex_width, font->tex_height, 0, gl_format, GL_UNSIGNED_BYTE, tmp); free(tmp); @@ -218,7 +218,8 @@ static void *gl_raster_font_init_font(void *data, font->atlas->dirty = false; - glBindTexture(GL_TEXTURE_2D, font->gl->texture[font->gl->tex_index]); + if (font->gl) + glBindTexture(GL_TEXTURE_2D, font->gl->texture[font->gl->tex_index]); return font; @@ -268,9 +269,12 @@ static void gl_raster_font_draw_vertices(gl_raster_t *font, font->atlas->dirty = false; } - font->gl->shader->set_coords(font->gl->shader_data, coords); - font->gl->shader->set_mvp(font->gl->shader_data, - &font->gl->mvp_no_rot); + if (font->gl && font->gl->shader) + { + font->gl->shader->set_coords(font->gl->shader_data, coords); + font->gl->shader->set_mvp(font->gl->shader_data, + &font->gl->mvp_no_rot); + } glDrawArrays(GL_TRIANGLES, 0, coords->vertices); } @@ -330,13 +334,13 @@ static void gl_raster_font_render_line( width = glyph->width; height = glyph->height; - gl_raster_font_emit(0, 0, 1); /* Bottom-left */ - gl_raster_font_emit(1, 1, 1); /* Bottom-right */ - gl_raster_font_emit(2, 0, 0); /* Top-left */ + GL_RASTER_FONT_EMIT(0, 0, 1); /* Bottom-left */ + GL_RASTER_FONT_EMIT(1, 1, 1); /* Bottom-right */ + GL_RASTER_FONT_EMIT(2, 0, 0); /* Top-left */ - gl_raster_font_emit(3, 1, 0); /* Top-right */ - gl_raster_font_emit(4, 0, 0); /* Top-left */ - gl_raster_font_emit(5, 1, 1); /* Bottom-right */ + GL_RASTER_FONT_EMIT(3, 1, 0); /* Top-right */ + GL_RASTER_FONT_EMIT(4, 0, 0); /* Top-left */ + GL_RASTER_FONT_EMIT(5, 1, 1); /* Bottom-right */ i++; @@ -408,7 +412,7 @@ static void gl_raster_font_setup_viewport(unsigned width, unsigned height, glBindTexture(GL_TEXTURE_2D, font->tex); - if (font->gl->shader && font->gl->shader->use) + if (font->gl && font->gl->shader && font->gl->shader->use) font->gl->shader->use(font->gl, font->gl->shader_data, VIDEO_SHADER_STOCK_BLEND, true); } @@ -482,36 +486,38 @@ static void gl_raster_font_render_msg( else gl_raster_font_setup_viewport(width, height, font, full_screen); - if (!string_is_empty(msg) && font->gl - && font->font_data && font->font_driver) + if (font->gl) { - if (drop_x || drop_y) + if ( !string_is_empty(msg) + && font->font_data + && font->font_driver) { - GLfloat color_dark[4]; + if (drop_x || drop_y) + { + GLfloat color_dark[4]; - color_dark[0] = color[0] * drop_mod; - color_dark[1] = color[1] * drop_mod; - color_dark[2] = color[2] * drop_mod; - color_dark[3] = color[3] * drop_alpha; + color_dark[0] = color[0] * drop_mod; + color_dark[1] = color[1] * drop_mod; + color_dark[2] = color[2] * drop_mod; + color_dark[3] = color[3] * drop_alpha; - if (font->gl) gl_raster_font_render_message(font, msg, scale, color_dark, x + scale * drop_x / font->gl->vp.width, y + - scale * drop_y / font->gl->vp.height, text_align); - } + scale * drop_y / font->gl->vp.height, text_align); + } - if (font->gl) gl_raster_font_render_message(font, msg, scale, color, x, y, text_align); - } + } - if (!font->block && font->gl) - { - /* restore viewport */ - glBindTexture(GL_TEXTURE_2D, font->gl->texture[font->gl->tex_index]); - - glDisable(GL_BLEND); - video_driver_set_viewport(width, height, false, true); + if (!font->block) + { + /* restore viewport */ + glBindTexture(GL_TEXTURE_2D, + font->gl->texture[font->gl->tex_index]); + glDisable(GL_BLEND); + video_driver_set_viewport(width, height, false, true); + } } } diff --git a/gfx/drivers_font/metal_raster_font.m b/gfx/drivers_font/metal_raster_font.m index 6f85873981..376f30f093 100644 --- a/gfx/drivers_font/metal_raster_font.m +++ b/gfx/drivers_font/metal_raster_font.m @@ -391,34 +391,24 @@ static INLINE void write_quad6(SpriteVertex *pv, for (;;) { - const char *delim = strchr(msg, '\n'); + const char *delim = strchr(msg, '\n'); + NSUInteger msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - NSUInteger msg_len = delim - msg; - [self _renderLine:msg - length:msg_len - scale:scale - color:color - posX:posX - posY:posY - (float)lines * line_height - aligned:aligned]; - msg += msg_len + 1; - lines++; - } - else - { - NSUInteger msg_len = strlen(msg); - [self _renderLine:msg - length:msg_len - scale:scale - color:color - posX:posX - posY:posY - (float)lines * line_height - aligned:aligned]; + [self _renderLine:msg + length:msg_len + scale:scale + color:color + posX:posX + posY:posY - (float)lines * line_height + aligned:aligned]; + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/sixel_font.c b/gfx/drivers_font/sixel_font.c index 884be5f2bd..8dbdc77926 100644 --- a/gfx/drivers_font/sixel_font.c +++ b/gfx/drivers_font/sixel_font.c @@ -83,7 +83,7 @@ static void sixel_render_msg( { float x, y, scale; unsigned width, height; - unsigned newX, newY; + unsigned new_x, new_y; unsigned align; sixel_raster_t *font = (sixel_raster_t*)data; const struct font_params *params = (const struct font_params*)_params; @@ -114,19 +114,19 @@ static void sixel_render_msg( width = font->sixel->screen_width; height = font->sixel->screen_height; - newY = height - (y * height * scale); + new_y = height - (y * height * scale); switch (align) { case TEXT_ALIGN_RIGHT: - newX = (x * width * scale) - strlen(msg); + new_x = (x * width * scale) - strlen(msg); break; case TEXT_ALIGN_CENTER: - newX = (x * width * scale) - (strlen(msg) / 2); + new_x = (x * width * scale) - (strlen(msg) / 2); break; case TEXT_ALIGN_LEFT: default: - newX = x * width * scale; + new_x = x * width * scale; break; } diff --git a/gfx/drivers_font/switch_font.c b/gfx/drivers_font/switch_font.c index 5759c65f02..d5db2ecc82 100644 --- a/gfx/drivers_font/switch_font.c +++ b/gfx/drivers_font/switch_font.c @@ -197,7 +197,7 @@ static void switch_font_render_message( int lines = 0; float line_height; - if (!msg || !*msg) + if (!msg || !*msg || !sw) return; /* If font line metrics are not supported just draw as usual */ @@ -218,33 +218,20 @@ static void switch_font_render_message( for (;;) { const char *delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - if (msg_len <= AVG_GLPYH_LIMIT) - { - if (sw) - switch_font_render_line(sw, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); - } - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - if (msg_len <= AVG_GLPYH_LIMIT) - { - if (sw) - switch_font_render_line(sw, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); - } + if (msg_len <= AVG_GLPYH_LIMIT) + switch_font_render_line(sw, font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/vita2d_font.c b/gfx/drivers_font/vita2d_font.c index cdd434822d..b1db41edda 100644 --- a/gfx/drivers_font/vita2d_font.c +++ b/gfx/drivers_font/vita2d_font.c @@ -246,13 +246,14 @@ static void vita2d_font_render_message( for (;;) { const char *delim = strchr(msg, '\n'); - unsigned msg_len = (delim) ? (delim - msg) : strlen(msg); + unsigned msg_len = (delim) ? + (unsigned)(delim - msg) : strlen(msg); + /* Draw the line */ vita2d_font_render_line(font, msg, msg_len, scale, color, pos_x, pos_y - (float)lines * line_height, width, height, text_align); - /* Draw the line */ if (!delim) break; diff --git a/gfx/drivers_font/vulkan_raster_font.c b/gfx/drivers_font/vulkan_raster_font.c index 3ba6567a5b..b29ff5dd83 100644 --- a/gfx/drivers_font/vulkan_raster_font.c +++ b/gfx/drivers_font/vulkan_raster_font.c @@ -39,7 +39,42 @@ typedef struct unsigned vertices; } vulkan_raster_t; -static void vulkan_raster_font_free_font(void *data, bool is_threaded); +static INLINE void vulkan_raster_font_update_glyph( + vulkan_raster_t *font, const struct font_glyph *glyph) +{ + if(font->atlas->dirty) + { + unsigned row; + for (row = glyph->atlas_offset_y; row < (glyph->atlas_offset_y + glyph->height); row++) + { + uint8_t *src = font->atlas->buffer + row * font->atlas->width + glyph->atlas_offset_x; + uint8_t *dst = (uint8_t*)font->texture.mapped + row * font->texture.stride + glyph->atlas_offset_x; + memcpy(dst, src, glyph->width); + } + + font->atlas->dirty = false; + font->needs_update = true; + } +} + + +static void vulkan_raster_font_free_font(void *data, bool is_threaded) +{ + vulkan_raster_t *font = (vulkan_raster_t*)data; + if (!font) + return; + + if (font->font_driver && font->font_data) + font->font_driver->free(font->font_data); + + vkQueueWaitIdle(font->vk->context->queue); + vulkan_destroy_texture( + font->vk->context->device, &font->texture); + vulkan_destroy_texture( + font->vk->context->device, &font->texture_optimal); + + free(font); +} static void *vulkan_raster_font_init_font(void *data, const char *font_path, float font_size, @@ -71,7 +106,7 @@ static void *vulkan_raster_font_init_font(void *data, return NULL; } - font->atlas = font->font_driver->get_atlas(font->font_data); + font->atlas = font->font_driver->get_atlas(font->font_data); font->texture = vulkan_create_texture(font->vk, NULL, font->atlas->width, font->atlas->height, VK_FORMAT_R8_UNORM, font->atlas->buffer, NULL /*&swizzle*/, VULKAN_TEXTURE_STAGING); @@ -90,41 +125,6 @@ static void *vulkan_raster_font_init_font(void *data, return font; } -static void vulkan_raster_font_free_font(void *data, bool is_threaded) -{ - vulkan_raster_t *font = (vulkan_raster_t*)data; - if (!font) - return; - - if (font->font_driver && font->font_data) - font->font_driver->free(font->font_data); - - vkQueueWaitIdle(font->vk->context->queue); - vulkan_destroy_texture( - font->vk->context->device, &font->texture); - vulkan_destroy_texture( - font->vk->context->device, &font->texture_optimal); - - free(font); -} - -static INLINE void vulkan_raster_font_update_glyph(vulkan_raster_t *font, const struct font_glyph *glyph) -{ - if(font->atlas->dirty) - { - unsigned row; - for (row = glyph->atlas_offset_y; row < (glyph->atlas_offset_y + glyph->height); row++) - { - uint8_t *src = font->atlas->buffer + row * font->atlas->width + glyph->atlas_offset_x; - uint8_t *dst = (uint8_t*)font->texture.mapped + row * font->texture.stride + glyph->atlas_offset_x; - memcpy(dst, src, glyph->width); - } - - font->atlas->dirty = false; - font->needs_update = true; - } -} - static int vulkan_get_message_width(void *data, const char *msg, unsigned msg_len, float scale) { @@ -244,9 +244,8 @@ static void vulkan_raster_font_render_message( if (!font->font_driver->get_line_metrics || !font->font_driver->get_line_metrics(font->font_data, &line_metrics)) { - if (font->vk) - vulkan_raster_font_render_line(font, msg, strlen(msg), - scale, color, pos_x, pos_y, text_align); + vulkan_raster_font_render_line(font, msg, strlen(msg), + scale, color, pos_x, pos_y, text_align); return; } @@ -255,27 +254,19 @@ static void vulkan_raster_font_render_message( for (;;) { const char *delim = strchr(msg, '\n'); + unsigned msg_len = delim + ? (unsigned)(delim - msg) : (unsigned)strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - if (font->vk) - vulkan_raster_font_render_line(font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - if (font->vk) - vulkan_raster_font_render_line(font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - text_align); + vulkan_raster_font_render_line(font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } @@ -294,16 +285,21 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font) if(font->needs_update) { VkCommandBuffer staging; - VkSubmitInfo submit_info = { VK_STRUCTURE_TYPE_SUBMIT_INFO }; - VkCommandBufferAllocateInfo cmd_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO }; - VkCommandBufferBeginInfo begin_info = { VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; + VkSubmitInfo submit_info; + VkCommandBufferAllocateInfo cmd_info; + VkCommandBufferBeginInfo begin_info; + cmd_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO; + cmd_info.pNext = NULL; cmd_info.commandPool = font->vk->staging_pool; cmd_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; cmd_info.commandBufferCount = 1; vkAllocateCommandBuffers(font->vk->context->device, &cmd_info, &staging); + begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO; + begin_info.pNext = NULL; begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + begin_info.pInheritanceInfo = NULL; vkBeginCommandBuffer(staging, &begin_info); vulkan_copy_staging_to_dynamic(font->vk, staging, @@ -315,8 +311,15 @@ static void vulkan_raster_font_flush(vulkan_raster_t *font) slock_lock(font->vk->context->queue_lock); #endif - submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &staging; + submit_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO; + submit_info.pNext = NULL; + submit_info.waitSemaphoreCount = 0; + submit_info.pWaitSemaphores = NULL; + submit_info.pWaitDstStageMask = NULL; + submit_info.commandBufferCount = 1; + submit_info.pCommandBuffers = &staging; + submit_info.signalSemaphoreCount = 0; + submit_info.pSignalSemaphores = NULL; vkQueueSubmit(font->vk->context->queue, 1, &submit_info, VK_NULL_HANDLE); @@ -453,7 +456,8 @@ static const struct font_glyph *vulkan_raster_font_get_glyph( return glyph; } -static bool vulkan_get_line_metrics(void* data, struct font_line_metrics **metrics) +static bool vulkan_get_line_metrics(void* data, + struct font_line_metrics **metrics) { vulkan_raster_t *font = (vulkan_raster_t*)data; diff --git a/gfx/drivers_font/wiiu_font.c b/gfx/drivers_font/wiiu_font.c index e9c80c0779..b9ba5369bc 100644 --- a/gfx/drivers_font/wiiu_font.c +++ b/gfx/drivers_font/wiiu_font.c @@ -263,25 +263,19 @@ static void wiiu_font_render_message( for (;;) { const char* delim = strchr(msg, '\n'); + unsigned msg_len = delim ? + (unsigned)(delim - msg) : strlen(msg); /* Draw the line */ - if (delim) - { - unsigned msg_len = delim - msg; - wiiu_font_render_line(wiiu, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - width, height, text_align); - msg += msg_len + 1; - lines++; - } - else - { - unsigned msg_len = strlen(msg); - wiiu_font_render_line(wiiu, font, msg, msg_len, - scale, color, pos_x, pos_y - (float)lines * line_height, - width, height, text_align); + wiiu_font_render_line(wiiu, font, msg, msg_len, + scale, color, pos_x, pos_y - (float)lines * line_height, + width, height, text_align); + + if (!delim) break; - } + + msg += msg_len + 1; + lines++; } } diff --git a/gfx/drivers_font/xdk1_xfonts.c b/gfx/drivers_font/xdk1_xfonts.c index 6cde9353d5..c9eaaa73ab 100644 --- a/gfx/drivers_font/xdk1_xfonts.c +++ b/gfx/drivers_font/xdk1_xfonts.c @@ -80,7 +80,7 @@ static void xfonts_render_msg( const struct font_params *params) { float x, y; - wchar_t str[PATH_MAX_LENGTH]; + wchar_t *wc = NULL; xfonts_t *xfonts = (xfonts_t*)data; settings_t *settings = config_get_ptr(); float video_msg_pos_x = settings->floats.video_msg_pos_x; @@ -100,13 +100,19 @@ static void xfonts_render_msg( d3d8_device_get_backbuffer(xfonts->d3d->dev, -1, 0, D3DBACKBUFFER_TYPE_MONO, &xfonts->surf); - mbstowcs(str, msg, sizeof(str) / sizeof(wchar_t)); + wc = utf8_to_utf16_string_alloc(msg); + if (wc) + { #ifdef __cplusplus - xfonts->debug_font->TextOut(xfonts->surf, str, (unsigned)-1, x, y); + xfonts->debug_font->TextOut(xfonts->surf, + wc, (unsigned)-1, x, y); #else - XFONT_TextOut(xfonts->debug_font, xfonts->surf, str, (unsigned)-1, x, y); + XFONT_TextOut(xfonts->debug_font, xfonts->surf, + wc, (unsigned)-1, x, y); #endif + free(wc); + } d3d8_surface_free(xfonts->surf); } diff --git a/gfx/drivers_font_renderer/freetype.c b/gfx/drivers_font_renderer/freetype.c index 189630e731..baf3a2ad1d 100644 --- a/gfx/drivers_font_renderer/freetype.c +++ b/gfx/drivers_font_renderer/freetype.c @@ -97,7 +97,7 @@ static freetype_atlas_slot_t* font_renderer_get_slot(ft_font_renderer_t *handle) else if (handle->uc_map[map_id]) { freetype_atlas_slot_t* ptr = handle->uc_map[map_id]; - while(ptr->next && ptr->next != &handle->atlas_slots[oldest]) + while (ptr->next && ptr->next != &handle->atlas_slots[oldest]) ptr = ptr->next; ptr->next = handle->atlas_slots[oldest].next; } @@ -120,7 +120,7 @@ static const struct font_glyph *font_renderer_ft_get_glyph( map_id = charcode & 0xFF; atlas_slot = handle->uc_map[map_id]; - while(atlas_slot) + while (atlas_slot) { if (atlas_slot->charcode == charcode) { diff --git a/gfx/drivers_font_renderer/stb_unicode.c b/gfx/drivers_font_renderer/stb_unicode.c index 2395e77dae..0e06724e66 100644 --- a/gfx/drivers_font_renderer/stb_unicode.c +++ b/gfx/drivers_font_renderer/stb_unicode.c @@ -87,18 +87,18 @@ static stb_unicode_atlas_slot_t* font_renderer_stb_unicode_get_slot(stb_unicode_ unsigned oldest = 0; for (i = 1; i < STB_UNICODE_ATLAS_SIZE; i++) - if((handle->usage_counter - handle->atlas_slots[i].last_used) > + if ((handle->usage_counter - handle->atlas_slots[i].last_used) > (handle->usage_counter - handle->atlas_slots[oldest].last_used)) oldest = i; /* remove from map */ map_id = handle->atlas_slots[oldest].charcode & 0xFF; - if(handle->uc_map[map_id] == &handle->atlas_slots[oldest]) + if (handle->uc_map[map_id] == &handle->atlas_slots[oldest]) handle->uc_map[map_id] = handle->atlas_slots[oldest].next; else if (handle->uc_map[map_id]) { stb_unicode_atlas_slot_t* ptr = handle->uc_map[map_id]; - while(ptr->next && ptr->next != &handle->atlas_slots[oldest]) + while (ptr->next && ptr->next != &handle->atlas_slots[oldest]) ptr = ptr->next; ptr->next = handle->atlas_slots[oldest].next; } @@ -121,15 +121,15 @@ static const struct font_glyph *font_renderer_stb_unicode_get_glyph( float glyph_advance_x = 0.0f; float glyph_draw_offset_y = 0.0f; - if(!self) + if (!self) return NULL; map_id = charcode & 0xFF; atlas_slot = self->uc_map[map_id]; - while(atlas_slot) + while (atlas_slot) { - if(atlas_slot->charcode == charcode) + if (atlas_slot->charcode == charcode) { atlas_slot->last_used = self->usage_counter++; return &atlas_slot->glyph; @@ -222,7 +222,7 @@ static bool font_renderer_stb_unicode_create_atlas( for (i = 0; i < 256; i++) { - if(isalnum(i)) + if (isalnum(i)) font_renderer_stb_unicode_get_glyph(self, i); } @@ -242,7 +242,7 @@ static void *font_renderer_stb_unicode_init(const char *font_path, float font_si font_size = STBTT_POINT_SIZE(font_size); #ifdef WIIU - if(!*font_path) + if (!*font_path) { uint32_t size = 0; if (!OSGetSharedData(SHARED_FONT_DEFAULT, 0, (void**)&self->font_data, &size)) diff --git a/gfx/drivers_shader/glslang.cpp b/gfx/drivers_shader/glslang.cpp index 9e28003724..03d5cd3798 100644 --- a/gfx/drivers_shader/glslang.cpp +++ b/gfx/drivers_shader/glslang.cpp @@ -172,11 +172,11 @@ SlangProcess::SlangProcess() const char *value_str = strtok(0, delims); int value = (int)strtoul(value_str, nullptr, 0); - if (string_starts_with(token, "Max")) + if (string_starts_with_size(token, "Max", STRLEN_CONST("Max"))) { - if (string_starts_with(token, "MaxCompute")) + if (string_starts_with_size(token, "MaxCompute", STRLEN_CONST("MaxCompute"))) { - if (string_starts_with(token, "MaxComputeWork")) + if (string_starts_with_size(token, "MaxComputeWork", STRLEN_CONST("MaxComputeWork"))) { if (string_is_equal(token, "MaxComputeWorkGroupCountX")) Resources.maxComputeWorkGroupCountX = value; @@ -202,7 +202,7 @@ SlangProcess::SlangProcess() else if (string_is_equal(token, "MaxComputeAtomicCounterBuffers")) Resources.maxComputeAtomicCounterBuffers = value; } - else if (string_starts_with(token, "MaxVertex")) + else if (string_starts_with_size(token, "MaxVertex", STRLEN_CONST("MaxVertex"))) { if (string_is_equal(token, "MaxVertexAttribs")) Resources.maxVertexAttribs = value; @@ -223,9 +223,9 @@ SlangProcess::SlangProcess() else if (string_is_equal(token, "MaxVertexAtomicCounterBuffers")) Resources.maxVertexAtomicCounterBuffers = value; } - else if (string_starts_with(token, "MaxTess")) + else if (string_starts_with_size(token, "MaxTess", STRLEN_CONST("MaxTess"))) { - if (string_starts_with(token, "MaxTessEvaluation")) + if (string_starts_with_size(token, "MaxTessEvaluation", STRLEN_CONST("MaxTessEvaluation"))) { if (string_is_equal(token, "MaxTessEvaluationInputComponents")) Resources.maxTessEvaluationInputComponents = value; @@ -242,7 +242,7 @@ SlangProcess::SlangProcess() else if (string_is_equal(token, "MaxTessEvaluationImageUniforms")) Resources.maxTessEvaluationImageUniforms = value; } - else if (string_starts_with(token, "MaxTessControl")) + else if (string_starts_with_size(token, "MaxTessControl", STRLEN_CONST("MaxTessControl"))) { if (string_is_equal(token, "MaxTessControlInputComponents")) Resources.maxTessControlInputComponents = value; @@ -266,7 +266,7 @@ SlangProcess::SlangProcess() else if (string_is_equal(token, "MaxTessGenLevel")) Resources.maxTessGenLevel = value; } - else if (string_starts_with(token, "MaxFragment")) + else if (string_starts_with_size(token, "MaxFragment", STRLEN_CONST("MaxFragment"))) { if (string_is_equal(token, "MaxFragmentUniformComponents")) Resources.maxFragmentUniformComponents = value; @@ -360,7 +360,7 @@ SlangProcess::SlangProcess() else if (string_is_equal(token, "MaxSamples")) Resources.maxSamples = value; } - else if (string_starts_with(token, "general")) + else if (string_starts_with_size(token, "general", STRLEN_CONST("general"))) { if (string_is_equal(token, "generalUniformIndexing")) Resources.limits.generalUniformIndexing = (value != 0); diff --git a/gfx/drivers_shader/glslang_util.c b/gfx/drivers_shader/glslang_util.c index 94f7c50a5d..0dc505c093 100644 --- a/gfx/drivers_shader/glslang_util.c +++ b/gfx/drivers_shader/glslang_util.c @@ -28,6 +28,45 @@ #include "glslang_util.h" #include "../../verbosity.h" +static const char *glslang_formats[] = { + "UNKNOWN", + + "R8_UNORM", + "R8_UINT", + "R8_SINT", + "R8G8_UNORM", + "R8G8_UINT", + "R8G8_SINT", + "R8G8B8A8_UNORM", + "R8G8B8A8_UINT", + "R8G8B8A8_SINT", + "R8G8B8A8_SRGB", + + "A2B10G10R10_UNORM_PACK32", + "A2B10G10R10_UINT_PACK32", + + "R16_UINT", + "R16_SINT", + "R16_SFLOAT", + "R16G16_UINT", + "R16G16_SINT", + "R16G16_SFLOAT", + "R16G16B16A16_UINT", + "R16G16B16A16_SINT", + "R16G16B16A16_SFLOAT", + + "R32_UINT", + "R32_SINT", + "R32_SFLOAT", + "R32G32_UINT", + "R32G32_SINT", + "R32G32_SFLOAT", + "R32G32B32A32_UINT", + "R32G32B32A32_SINT", + "R32G32B32A32_SFLOAT", +}; + + static void get_include_file( const char *line, char *include_file, size_t len) { @@ -249,44 +288,6 @@ error: return false; } -static const char *glslang_formats[] = { - "UNKNOWN", - - "R8_UNORM", - "R8_UINT", - "R8_SINT", - "R8G8_UNORM", - "R8G8_UINT", - "R8G8_SINT", - "R8G8B8A8_UNORM", - "R8G8B8A8_UINT", - "R8G8B8A8_SINT", - "R8G8B8A8_SRGB", - - "A2B10G10R10_UNORM_PACK32", - "A2B10G10R10_UINT_PACK32", - - "R16_UINT", - "R16_SINT", - "R16_SFLOAT", - "R16G16_UINT", - "R16G16_SINT", - "R16G16_SFLOAT", - "R16G16B16A16_UINT", - "R16G16B16A16_SINT", - "R16G16B16A16_SFLOAT", - - "R32_UINT", - "R32_SINT", - "R32_SFLOAT", - "R32G32_UINT", - "R32G32_SINT", - "R32G32_SFLOAT", - "R32G32B32A32_UINT", - "R32G32B32A32_SINT", - "R32G32B32A32_SFLOAT", -}; - const char *glslang_format_to_string(enum glslang_format fmt) { return glslang_formats[fmt]; diff --git a/gfx/drivers_shader/glslang_util_cxx.cpp b/gfx/drivers_shader/glslang_util_cxx.cpp index 4155119926..de6556fd1c 100644 --- a/gfx/drivers_shader/glslang_util_cxx.cpp +++ b/gfx/drivers_shader/glslang_util_cxx.cpp @@ -16,7 +16,6 @@ #include #include #include -#include #include #include @@ -39,13 +38,9 @@ static std::string build_stage_source( const struct string_list *lines, const char *stage) { - /* Note: since we have to return a std::string anyway, - * there is nothing to be gained from trying to replace - * this ostringstream with a C-based alternative - * (would require a rewrite of deps/glslang/glslang.cpp) */ - std::ostringstream str; - bool active = true; size_t i; + std::string str; + bool active = true; if (!lines) return ""; @@ -54,41 +49,48 @@ static std::string build_stage_source( return ""; /* Version header. */ - str << lines->elems[0].data; - str << '\n'; + str += lines->elems[0].data; + str += '\n'; for (i = 1; i < lines->size; i++) { const char *line = lines->elems[i].data; - /* Identify 'stage' (fragment/vertex) */ - if (!strncmp("#pragma stage ", line, STRLEN_CONST("#pragma stage "))) + if (string_starts_with_size(line, "#pragma", STRLEN_CONST("#pragma"))) { - if (!string_is_empty(stage)) + /* Identify 'stage' (fragment/vertex) */ + if (!strncmp("#pragma stage ", line, STRLEN_CONST("#pragma stage "))) { - char expected[128]; + if (!string_is_empty(stage)) + { + char expected[128]; - expected[0] = '\0'; + expected[0] = '\0'; - strlcpy(expected, "#pragma stage ", sizeof(expected)); - strlcat(expected, stage, sizeof(expected)); + strlcpy(expected, "#pragma stage ", sizeof(expected)); + strlcat(expected, stage, sizeof(expected)); - active = string_is_equal(expected, line); + active = string_is_equal(expected, line); + } } - } - else if ( - !strncmp("#pragma name ", line, STRLEN_CONST("#pragma name ")) || - !strncmp("#pragma format ", line, STRLEN_CONST("#pragma format "))) - { - /* Ignore */ + else if ( + !strncmp("#pragma name ", line, + STRLEN_CONST("#pragma name ")) || + !strncmp("#pragma format ", line, + STRLEN_CONST("#pragma format "))) + { + /* Ignore */ + } + else if (active) + str += line; } else if (active) - str << line; + str += line; - str << '\n'; + str += '\n'; } - return str.str(); + return str; } bool glslang_parse_meta(const struct string_list *lines, glslang_meta *meta) @@ -104,107 +106,110 @@ bool glslang_parse_meta(const struct string_list *lines, glslang_meta *meta) { const char *line = lines->elems[i].data; - /* Check for shader identifier */ - if (!strncmp("#pragma name ", line, - STRLEN_CONST("#pragma name "))) + if (string_starts_with_size(line, "#pragma", STRLEN_CONST("#pragma"))) { - const char *str = NULL; - - if (!meta->name.empty()) + /* Check for shader identifier */ + if (!strncmp("#pragma name ", line, + STRLEN_CONST("#pragma name "))) { - RARCH_ERR("[slang]: Trying to declare multiple names for file.\n"); - return false; - } + const char *str = NULL; - str = line + STRLEN_CONST("#pragma name "); - while (*str == ' ') - str++; - - meta->name = str; - } - /* Check for shader parameters */ - else if (!strncmp("#pragma parameter ", line, - STRLEN_CONST("#pragma parameter "))) - { - float initial, minimum, maximum, step; - int ret = sscanf( - line, "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f", - id, desc, &initial, &minimum, &maximum, &step); - - if (ret == 5) - { - step = 0.1f * (maximum - minimum); - ret = 6; - } - - if (ret == 6) - { - bool parameter_found = false; - size_t parameter_index = 0; - size_t j; - - for (j = 0; j < meta->parameters.size(); j++) + if (!meta->name.empty()) { - /* Note: LHS is a std:string, RHS is a C string. - * (the glslang_meta stuff has to be C++) */ - if (meta->parameters[j].id == id) - { - parameter_found = true; - parameter_index = j; - break; - } + RARCH_ERR("[slang]: Trying to declare multiple names for file.\n"); + return false; } - /* Allow duplicate #pragma parameter, but only - * if they are exactly the same. */ - if (parameter_found) - { - const glslang_parameter *parameter = - &meta->parameters[parameter_index]; + str = line + STRLEN_CONST("#pragma name "); + while (*str == ' ') + str++; - if ( parameter->desc != desc || - parameter->initial != initial || - parameter->minimum != minimum || - parameter->maximum != maximum || - parameter->step != step - ) + meta->name = str; + } + /* Check for shader parameters */ + else if (!strncmp("#pragma parameter ", line, + STRLEN_CONST("#pragma parameter "))) + { + float initial, minimum, maximum, step; + int ret = sscanf( + line, "#pragma parameter %63s \"%63[^\"]\" %f %f %f %f", + id, desc, &initial, &minimum, &maximum, &step); + + if (ret == 5) + { + step = 0.1f * (maximum - minimum); + ret = 6; + } + + if (ret == 6) + { + bool parameter_found = false; + size_t parameter_index = 0; + size_t j; + + for (j = 0; j < meta->parameters.size(); j++) { - RARCH_ERR("[slang]: Duplicate parameters found for \"%s\", but arguments do not match.\n", id); - return false; + /* Note: LHS is a std:string, RHS is a C string. + * (the glslang_meta stuff has to be C++) */ + if (meta->parameters[j].id == id) + { + parameter_found = true; + parameter_index = j; + break; + } } + + /* Allow duplicate #pragma parameter, but only + * if they are exactly the same. */ + if (parameter_found) + { + const glslang_parameter *parameter = + &meta->parameters[parameter_index]; + + if ( parameter->desc != desc || + parameter->initial != initial || + parameter->minimum != minimum || + parameter->maximum != maximum || + parameter->step != step + ) + { + RARCH_ERR("[slang]: Duplicate parameters found for \"%s\", but arguments do not match.\n", id); + return false; + } + } + else + meta->parameters.push_back({ id, desc, initial, minimum, maximum, step }); } else - meta->parameters.push_back({ id, desc, initial, minimum, maximum, step }); + { + RARCH_ERR("[slang]: Invalid #pragma parameter line: \"%s\".\n", + line); + return false; + } } - else + /* Check for framebuffer format */ + else if (!strncmp("#pragma format ", line, + STRLEN_CONST("#pragma format "))) { - RARCH_ERR("[slang]: Invalid #pragma parameter line: \"%s\".\n", - line); - return false; - } - } - /* Check for framebuffer format */ - else if (!strncmp("#pragma format ", line, - STRLEN_CONST("#pragma format "))) - { - const char *str = NULL; + const char *str = NULL; - if (meta->rt_format != SLANG_FORMAT_UNKNOWN) - { - RARCH_ERR("[slang]: Trying to declare format multiple times for file.\n"); - return false; - } + if (meta->rt_format != SLANG_FORMAT_UNKNOWN) + { + RARCH_ERR("[slang]: Trying to declare format multiple times for file.\n"); + return false; + } - str = line + STRLEN_CONST("#pragma format "); - while (*str == ' ') - str++; + str = line + STRLEN_CONST("#pragma format "); + while (*str == ' ') + str++; - meta->rt_format = glslang_find_format(str); + meta->rt_format = glslang_find_format(str); - if (meta->rt_format == SLANG_FORMAT_UNKNOWN) - { - RARCH_ERR("[slang]: Failed to find format \"%s\".\n", str); - return false; + if (meta->rt_format == SLANG_FORMAT_UNKNOWN) + { + RARCH_ERR("[slang]: Failed to find format \"%s\".\n", str); + return false; + } } } } diff --git a/gfx/drivers_shader/shader_gl_cg.c b/gfx/drivers_shader/shader_gl_cg.c index 1b11922366..7a3d4ac131 100644 --- a/gfx/drivers_shader/shader_gl_cg.c +++ b/gfx/drivers_shader/shader_gl_cg.c @@ -49,7 +49,9 @@ #include "../../core.h" #include "../../retroarch.h" #include "../../verbosity.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #define PREV_TEXTURES (GFX_MAX_TEXTURES - 1) @@ -338,16 +340,31 @@ static void gl_cg_set_params(void *dat, void *shader_data) set_param_2f(cg->prg[cg->active_idx].vid_size_f, width, height); set_param_2f(cg->prg[cg->active_idx].tex_size_f, tex_width, tex_height); set_param_2f(cg->prg[cg->active_idx].out_size_f, out_width, out_height); - cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_f, - state_manager_frame_is_reversed() ? -1.0 : 1.0); + +#ifdef HAVE_REWIND + if (state_manager_frame_is_reversed()) + { + cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_f, + -1.0); + cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_v, + -1.0); + } + else +#else + { + cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_f, + 1.0); + cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_v, + 1.0); + } +#endif set_param_2f(cg->prg[cg->active_idx].vid_size_v, width, height); set_param_2f(cg->prg[cg->active_idx].tex_size_v, tex_width, tex_height); set_param_2f(cg->prg[cg->active_idx].out_size_v, out_width, out_height); - cg_gl_set_param_1f(cg->prg[cg->active_idx].frame_dir_v, - state_manager_frame_is_reversed() ? -1.0 : 1.0); - if (cg->prg[cg->active_idx].frame_cnt_f || cg->prg[cg->active_idx].frame_cnt_v) + if ( cg->prg[cg->active_idx].frame_cnt_f || + cg->prg[cg->active_idx].frame_cnt_v) { unsigned modulo = cg->shader->pass[cg->active_idx - 1].frame_count_mod; if (modulo) diff --git a/gfx/drivers_shader/shader_glsl.c b/gfx/drivers_shader/shader_glsl.c index ebc4c6a107..e7440146df 100644 --- a/gfx/drivers_shader/shader_glsl.c +++ b/gfx/drivers_shader/shader_glsl.c @@ -34,7 +34,9 @@ #endif #include "shader_glsl.h" +#ifdef HAVE_REWIND #include "../../managers/state_manager.h" +#endif #include "../../core.h" #include "../../verbosity.h" @@ -1191,7 +1193,14 @@ static void gl_glsl_set_params(void *dat, void *shader_data) } if (uni->frame_direction >= 0) - glUniform1i(uni->frame_direction, state_manager_frame_is_reversed() ? -1 : 1); + { +#ifdef HAVE_REWIND + if (state_manager_frame_is_reversed()) + glUniform1i(uni->frame_direction, -1); + else +#endif + glUniform1i(uni->frame_direction, 1); + } /* Set lookup textures. */ for (i = 0; i < glsl->shader->luts; i++) @@ -1591,6 +1600,11 @@ static struct video_shader *gl_glsl_get_current_shader(void *data) return glsl->shader; } +static void gl_glsl_get_flags(uint32_t *flags) +{ + BIT32_SET(*flags, GFX_CTX_FLAGS_SHADERS_GLSL); +} + void gl_glsl_set_get_proc_address(gfx_ctx_proc_t (*proc)(const char*)) { glsl_get_proc_address = proc; @@ -1604,10 +1618,6 @@ void gl_glsl_set_context_type(bool core_profile, glsl_minor = minor; } -static void gl_glsl_get_flags(uint32_t *flags) -{ - BIT32_SET(*flags, GFX_CTX_FLAGS_SHADERS_GLSL); -} const shader_backend_t gl_glsl_backend = { gl_glsl_init, diff --git a/gfx/drivers_shader/shader_vulkan.cpp b/gfx/drivers_shader/shader_vulkan.cpp index 06ca193670..9dd573b4d7 100644 --- a/gfx/drivers_shader/shader_vulkan.cpp +++ b/gfx/drivers_shader/shader_vulkan.cpp @@ -45,77 +45,6 @@ static const uint32_t opaque_frag[] = #include "../drivers/vulkan_shaders/opaque.frag.inc" ; -template -static bool vk_shader_set_unique_map(unordered_map &m, - const string &name, const P &p) -{ - auto itr = m.find(name); - if (itr != end(m)) - { - RARCH_ERR("[slang]: Alias \"%s\" already exists.\n", - name.c_str()); - return false; - } - - m[name] = p; - return true; -} - -static unsigned num_miplevels(unsigned width, unsigned height) -{ - unsigned size = MAX(width, height); - unsigned levels = 0; - while (size) - { - levels++; - size >>= 1; - } - return levels; -} - -static uint32_t find_memory_type_fallback( - const VkPhysicalDeviceMemoryProperties &mem_props, - uint32_t device_reqs, uint32_t host_reqs) -{ - unsigned i; - for (i = 0; i < VK_MAX_MEMORY_TYPES; i++) - { - if ((device_reqs & (1u << i)) && - (mem_props.memoryTypes[i].propertyFlags & host_reqs) == host_reqs) - return i; - } - - return vulkan_find_memory_type(&mem_props, device_reqs, 0); -} - -static void build_identity_matrix(float *data) -{ - data[ 0] = 1.0f; - data[ 1] = 0.0f; - data[ 2] = 0.0f; - data[ 3] = 0.0f; - data[ 4] = 0.0f; - data[ 5] = 1.0f; - data[ 6] = 0.0f; - data[ 7] = 0.0f; - data[ 8] = 0.0f; - data[ 9] = 0.0f; - data[10] = 1.0f; - data[11] = 0.0f; - data[12] = 0.0f; - data[13] = 0.0f; - data[14] = 0.0f; - data[15] = 1.0f; -} - -static void build_vec4(float *data, unsigned width, unsigned height) -{ - data[0] = float(width); - data[1] = float(height); - data[2] = 1.0f / float(width); - data[3] = 1.0f / float(height); -} - struct Texture { vulkan_filter_chain_texture texture; @@ -502,6 +431,364 @@ struct vulkan_filter_chain void update_history_info(); }; +template +static bool vk_shader_set_unique_map(unordered_map &m, + const string &name, const P &p) +{ + auto itr = m.find(name); + if (itr != end(m)) + { + RARCH_ERR("[slang]: Alias \"%s\" already exists.\n", + name.c_str()); + return false; + } + + m[name] = p; + return true; +} + +static unsigned num_miplevels(unsigned width, unsigned height) +{ + unsigned size = MAX(width, height); + unsigned levels = 0; + while (size) + { + levels++; + size >>= 1; + } + return levels; +} + +static uint32_t find_memory_type_fallback( + const VkPhysicalDeviceMemoryProperties &mem_props, + uint32_t device_reqs, uint32_t host_reqs) +{ + unsigned i; + for (i = 0; i < VK_MAX_MEMORY_TYPES; i++) + { + if ((device_reqs & (1u << i)) && + (mem_props.memoryTypes[i].propertyFlags & host_reqs) == host_reqs) + return i; + } + + return vulkan_find_memory_type(&mem_props, device_reqs, 0); +} + +static void build_identity_matrix(float *data) +{ + data[ 0] = 1.0f; + data[ 1] = 0.0f; + data[ 2] = 0.0f; + data[ 3] = 0.0f; + data[ 4] = 0.0f; + data[ 5] = 1.0f; + data[ 6] = 0.0f; + data[ 7] = 0.0f; + data[ 8] = 0.0f; + data[ 9] = 0.0f; + data[10] = 1.0f; + data[11] = 0.0f; + data[12] = 0.0f; + data[13] = 0.0f; + data[14] = 0.0f; + data[15] = 1.0f; +} + +static void build_vec4(float *data, unsigned width, unsigned height) +{ + data[0] = float(width); + data[1] = float(height); + data[2] = 1.0f / float(width); + data[3] = 1.0f / float(height); +} + +static VkFormat glslang_format_to_vk(glslang_format fmt) +{ +#undef FMT +#define FMT(x) case SLANG_FORMAT_##x: return VK_FORMAT_##x + switch (fmt) + { + FMT(R8_UNORM); + FMT(R8_SINT); + FMT(R8_UINT); + FMT(R8G8_UNORM); + FMT(R8G8_SINT); + FMT(R8G8_UINT); + FMT(R8G8B8A8_UNORM); + FMT(R8G8B8A8_SINT); + FMT(R8G8B8A8_UINT); + FMT(R8G8B8A8_SRGB); + + FMT(A2B10G10R10_UNORM_PACK32); + FMT(A2B10G10R10_UINT_PACK32); + + FMT(R16_UINT); + FMT(R16_SINT); + FMT(R16_SFLOAT); + FMT(R16G16_UINT); + FMT(R16G16_SINT); + FMT(R16G16_SFLOAT); + FMT(R16G16B16A16_UINT); + FMT(R16G16B16A16_SINT); + FMT(R16G16B16A16_SFLOAT); + + FMT(R32_UINT); + FMT(R32_SINT); + FMT(R32_SFLOAT); + FMT(R32G32_UINT); + FMT(R32G32_SINT); + FMT(R32G32_SFLOAT); + FMT(R32G32B32A32_UINT); + FMT(R32G32B32A32_SINT); + FMT(R32G32B32A32_SFLOAT); + + default: + return VK_FORMAT_UNDEFINED; + } +} + +static unique_ptr vulkan_filter_chain_load_lut( + VkCommandBuffer cmd, + const struct vulkan_filter_chain_create_info *info, + vulkan_filter_chain *chain, + const video_shader_lut *shader) +{ + unsigned i; + texture_image image; + unique_ptr buffer; + VkMemoryRequirements mem_reqs; + VkImageCreateInfo image_info = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; + VkImageViewCreateInfo view_info = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO }; + VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO }; + VkImage tex = VK_NULL_HANDLE; + VkDeviceMemory memory = VK_NULL_HANDLE; + VkImageView view = VK_NULL_HANDLE; + VkBufferImageCopy region = {}; + void *ptr = nullptr; + + image.width = 0; + image.height = 0; + image.pixels = NULL; + image.supports_rgba = video_driver_supports_rgba(); + + if (!image_texture_load(&image, shader->path)) + return {}; + + image_info.imageType = VK_IMAGE_TYPE_2D; + image_info.format = VK_FORMAT_B8G8R8A8_UNORM; + image_info.extent.width = image.width; + image_info.extent.height = image.height; + image_info.extent.depth = 1; + image_info.mipLevels = shader->mipmap + ? num_miplevels(image.width, image.height) : 1; + image_info.arrayLayers = 1; + image_info.samples = VK_SAMPLE_COUNT_1_BIT; + image_info.tiling = VK_IMAGE_TILING_OPTIMAL; + image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | + VK_IMAGE_USAGE_TRANSFER_SRC_BIT | + VK_IMAGE_USAGE_TRANSFER_DST_BIT; + image_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; + + vkCreateImage(info->device, &image_info, nullptr, &tex); + vkGetImageMemoryRequirements(info->device, tex, &mem_reqs); + + alloc.allocationSize = mem_reqs.size; + alloc.memoryTypeIndex = vulkan_find_memory_type( + &*info->memory_properties, + mem_reqs.memoryTypeBits, + VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); + + if (vkAllocateMemory(info->device, &alloc, nullptr, &memory) != VK_SUCCESS) + goto error; + + vkBindImageMemory(info->device, tex, memory, 0); + + view_info.image = tex; + view_info.viewType = VK_IMAGE_VIEW_TYPE_2D; + view_info.format = VK_FORMAT_B8G8R8A8_UNORM; + view_info.components.r = VK_COMPONENT_SWIZZLE_R; + view_info.components.g = VK_COMPONENT_SWIZZLE_G; + view_info.components.b = VK_COMPONENT_SWIZZLE_B; + view_info.components.a = VK_COMPONENT_SWIZZLE_A; + view_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + view_info.subresourceRange.levelCount = image_info.mipLevels; + view_info.subresourceRange.layerCount = 1; + vkCreateImageView(info->device, &view_info, nullptr, &view); + + buffer = + unique_ptr(new Buffer(info->device, *info->memory_properties, + image.width * image.height * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT)); + ptr = buffer->map(); + memcpy(ptr, image.pixels, image.width * image.height * sizeof(uint32_t)); + buffer->unmap(); + + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, tex, + VK_REMAINING_MIP_LEVELS, + VK_IMAGE_LAYOUT_UNDEFINED, + shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL + : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, + 0, + VK_ACCESS_TRANSFER_WRITE_BIT, + VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED + ); + + region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + region.imageSubresource.mipLevel = 0; + region.imageSubresource.baseArrayLayer = 0; + region.imageSubresource.layerCount = 1; + region.imageExtent.width = image.width; + region.imageExtent.height = image.height; + region.imageExtent.depth = 1; + + vkCmdCopyBufferToImage(cmd, + buffer->get_buffer(), + tex, + shader->mipmap + ? VK_IMAGE_LAYOUT_GENERAL + : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, + 1, ®ion); + + for (i = 1; i < image_info.mipLevels; i++) + { + VkImageBlit blit_region; + unsigned src_width = MAX(image.width >> (i - 1), 1u); + unsigned src_height = MAX(image.height >> (i - 1), 1u); + unsigned target_width = MAX(image.width >> i, 1u); + unsigned target_height = MAX(image.height >> i, 1u); + + blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; + blit_region.srcSubresource.mipLevel = i - 1; + blit_region.srcSubresource.baseArrayLayer = 0; + blit_region.srcSubresource.layerCount = 1; + blit_region.srcOffsets[0].x = 0; + blit_region.srcOffsets[0].y = 0; + blit_region.srcOffsets[0].z = 0; + blit_region.srcOffsets[1].x = src_width; + blit_region.srcOffsets[1].y = src_height; + blit_region.srcOffsets[1].z = 1; + blit_region.dstSubresource = blit_region.srcSubresource; + blit_region.dstSubresource.mipLevel = i; + blit_region.dstOffsets[0].x = 0; + blit_region.dstOffsets[0].y = 0; + blit_region.dstOffsets[0].z = 0; + blit_region.dstOffsets[1].x = target_width; + blit_region.dstOffsets[1].y = target_height; + blit_region.dstOffsets[1].z = 1; + + /* Only injects execution and memory barriers, + * not actual transition. */ + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS( + cmd, + tex, + VK_REMAINING_MIP_LEVELS, + VK_IMAGE_LAYOUT_GENERAL, + VK_IMAGE_LAYOUT_GENERAL, + VK_ACCESS_TRANSFER_WRITE_BIT, + VK_ACCESS_TRANSFER_READ_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); + + vkCmdBlitImage(cmd, + tex, VK_IMAGE_LAYOUT_GENERAL, + tex, VK_IMAGE_LAYOUT_GENERAL, + 1, &blit_region, VK_FILTER_LINEAR); + } + + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS( + cmd, + tex, + VK_REMAINING_MIP_LEVELS, + shader->mipmap + ? VK_IMAGE_LAYOUT_GENERAL + : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, + VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, + VK_ACCESS_TRANSFER_WRITE_BIT, + VK_ACCESS_SHADER_READ_BIT, + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); + + image_texture_free(&image); + image.pixels = nullptr; + + return unique_ptr(new StaticTexture(shader->id, info->device, + tex, view, memory, move(buffer), image.width, image.height, + shader->filter != RARCH_FILTER_NEAREST, + image_info.mipLevels > 1, + vk_wrap_to_address(shader->wrap))); + +error: + if (image.pixels) + image_texture_free(&image); + if (tex != VK_NULL_HANDLE) + vkDestroyImage(info->device, tex, nullptr); + if (view != VK_NULL_HANDLE) + vkDestroyImageView(info->device, view, nullptr); + if (memory != VK_NULL_HANDLE) + vkFreeMemory(info->device, memory, nullptr); + return {}; +} + +static bool vulkan_filter_chain_load_luts( + const struct vulkan_filter_chain_create_info *info, + vulkan_filter_chain *chain, + video_shader *shader) +{ + unsigned i; + VkCommandBufferBeginInfo begin_info = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; + VkSubmitInfo submit_info = { + VK_STRUCTURE_TYPE_SUBMIT_INFO }; + VkCommandBuffer cmd = VK_NULL_HANDLE; + VkCommandBufferAllocateInfo cmd_info = { + VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO }; + bool recording = false; + + cmd_info.commandPool = info->command_pool; + cmd_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; + cmd_info.commandBufferCount = 1; + + vkAllocateCommandBuffers(info->device, &cmd_info, &cmd); + begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; + vkBeginCommandBuffer(cmd, &begin_info); + recording = true; + + for (i = 0; i < shader->luts; i++) + { + unique_ptr image = + vulkan_filter_chain_load_lut(cmd, info, chain, &shader->lut[i]); + if (!image) + { + RARCH_ERR("[Vulkan]: Failed to load LUT \"%s\".\n", shader->lut[i].path); + goto error; + } + + chain->add_static_texture(move(image)); + } + + vkEndCommandBuffer(cmd); + submit_info.commandBufferCount = 1; + submit_info.pCommandBuffers = &cmd; + vkQueueSubmit(info->queue, 1, &submit_info, VK_NULL_HANDLE); + vkQueueWaitIdle(info->queue); + vkFreeCommandBuffers(info->device, info->command_pool, 1, &cmd); + chain->release_staging_buffers(); + return true; + +error: + if (recording) + vkEndCommandBuffer(cmd); + if (cmd != VK_NULL_HANDLE) + vkFreeCommandBuffers(info->device, info->command_pool, 1, &cmd); + return false; +} + vulkan_filter_chain::vulkan_filter_chain( const vulkan_filter_chain_create_info &info) : device(info.device), @@ -634,6 +921,7 @@ void vulkan_filter_chain::build_offscreen_passes(VkCommandBuffer cmd, const VkViewport &vp) { unsigned i; + Texture source; /* First frame, make sure our history and feedback textures * are in a clean state. */ @@ -654,7 +942,7 @@ void vulkan_filter_chain::build_offscreen_passes(VkCommandBuffer cmd, passes.front()->get_address_mode(), }; - Texture source = original; + source = original; for (i = 0; i < passes.size() - 1; i++) { @@ -684,14 +972,16 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer, /* Transition input texture to something appropriate. */ if (input_texture.layout != VK_IMAGE_LAYOUT_GENERAL) { - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, input_texture.image,VK_REMAINING_MIP_LEVELS, input_texture.layout, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, 0, VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT); + VK_PIPELINE_STAGE_TRANSFER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); src_layout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; } @@ -711,14 +1001,16 @@ void vulkan_filter_chain::update_history(DeferredDisposer &disposer, /* Transition input texture back. */ if (input_texture.layout != VK_IMAGE_LAYOUT_GENERAL) { - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, input_texture.image,VK_REMAINING_MIP_LEVELS, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, input_texture.layout, 0, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); } /* Should ring buffer, but we don't have *that* many passes. */ @@ -1080,235 +1372,6 @@ void vulkan_filter_chain::set_pass_name(unsigned pass, const char *name) passes[pass]->set_name(name); } -static unique_ptr vulkan_filter_chain_load_lut( - VkCommandBuffer cmd, - const struct vulkan_filter_chain_create_info *info, - vulkan_filter_chain *chain, - const video_shader_lut *shader) -{ - unsigned i; - texture_image image; - unique_ptr buffer; - VkMemoryRequirements mem_reqs; - VkImageCreateInfo image_info = { VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO }; - VkImageViewCreateInfo view_info = { VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO }; - VkMemoryAllocateInfo alloc = { VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO }; - VkImage tex = VK_NULL_HANDLE; - VkDeviceMemory memory = VK_NULL_HANDLE; - VkImageView view = VK_NULL_HANDLE; - VkBufferImageCopy region = {}; - void *ptr = nullptr; - - image.width = 0; - image.height = 0; - image.pixels = NULL; - image.supports_rgba = video_driver_supports_rgba(); - - if (!image_texture_load(&image, shader->path)) - return {}; - - image_info.imageType = VK_IMAGE_TYPE_2D; - image_info.format = VK_FORMAT_B8G8R8A8_UNORM; - image_info.extent.width = image.width; - image_info.extent.height = image.height; - image_info.extent.depth = 1; - image_info.mipLevels = shader->mipmap - ? num_miplevels(image.width, image.height) : 1; - image_info.arrayLayers = 1; - image_info.samples = VK_SAMPLE_COUNT_1_BIT; - image_info.tiling = VK_IMAGE_TILING_OPTIMAL; - image_info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | - VK_IMAGE_USAGE_TRANSFER_SRC_BIT | - VK_IMAGE_USAGE_TRANSFER_DST_BIT; - image_info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED; - - vkCreateImage(info->device, &image_info, nullptr, &tex); - vkGetImageMemoryRequirements(info->device, tex, &mem_reqs); - - alloc.allocationSize = mem_reqs.size; - alloc.memoryTypeIndex = vulkan_find_memory_type( - &*info->memory_properties, - mem_reqs.memoryTypeBits, - VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT); - - if (vkAllocateMemory(info->device, &alloc, nullptr, &memory) != VK_SUCCESS) - goto error; - - vkBindImageMemory(info->device, tex, memory, 0); - - view_info.image = tex; - view_info.viewType = VK_IMAGE_VIEW_TYPE_2D; - view_info.format = VK_FORMAT_B8G8R8A8_UNORM; - view_info.components.r = VK_COMPONENT_SWIZZLE_R; - view_info.components.g = VK_COMPONENT_SWIZZLE_G; - view_info.components.b = VK_COMPONENT_SWIZZLE_B; - view_info.components.a = VK_COMPONENT_SWIZZLE_A; - view_info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - view_info.subresourceRange.levelCount = image_info.mipLevels; - view_info.subresourceRange.layerCount = 1; - vkCreateImageView(info->device, &view_info, nullptr, &view); - - buffer = - unique_ptr(new Buffer(info->device, *info->memory_properties, - image.width * image.height * sizeof(uint32_t), VK_BUFFER_USAGE_TRANSFER_SRC_BIT)); - ptr = buffer->map(); - memcpy(ptr, image.pixels, image.width * image.height * sizeof(uint32_t)); - buffer->unmap(); - - vulkan_image_layout_transition_levels(cmd, tex, - VK_REMAINING_MIP_LEVELS, - VK_IMAGE_LAYOUT_UNDEFINED, - shader->mipmap ? VK_IMAGE_LAYOUT_GENERAL - : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - 0, - VK_ACCESS_TRANSFER_WRITE_BIT, - VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT); - - region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - region.imageSubresource.mipLevel = 0; - region.imageSubresource.baseArrayLayer = 0; - region.imageSubresource.layerCount = 1; - region.imageExtent.width = image.width; - region.imageExtent.height = image.height; - region.imageExtent.depth = 1; - - vkCmdCopyBufferToImage(cmd, - buffer->get_buffer(), - tex, - shader->mipmap - ? VK_IMAGE_LAYOUT_GENERAL - : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - 1, ®ion); - - for (i = 1; i < image_info.mipLevels; i++) - { - VkImageBlit blit_region = {}; - unsigned src_width = MAX(image.width >> (i - 1), 1u); - unsigned src_height = MAX(image.height >> (i - 1), 1u); - unsigned target_width = MAX(image.width >> i, 1u); - unsigned target_height = MAX(image.height >> i, 1u); - - blit_region.srcSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT; - blit_region.srcSubresource.mipLevel = i - 1; - blit_region.srcSubresource.baseArrayLayer = 0; - blit_region.srcSubresource.layerCount = 1; - blit_region.dstSubresource = blit_region.srcSubresource; - blit_region.dstSubresource.mipLevel = i; - blit_region.srcOffsets[1].x = src_width; - blit_region.srcOffsets[1].y = src_height; - blit_region.srcOffsets[1].z = 1; - blit_region.dstOffsets[1].x = target_width; - blit_region.dstOffsets[1].y = target_height; - blit_region.dstOffsets[1].z = 1; - - /* Only injects execution and memory barriers, - * not actual transition. */ - vulkan_image_layout_transition_levels( - cmd, - tex, - VK_REMAINING_MIP_LEVELS, - VK_IMAGE_LAYOUT_GENERAL, - VK_IMAGE_LAYOUT_GENERAL, - VK_ACCESS_TRANSFER_WRITE_BIT, - VK_ACCESS_TRANSFER_READ_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT); - - vkCmdBlitImage(cmd, - tex, VK_IMAGE_LAYOUT_GENERAL, - tex, VK_IMAGE_LAYOUT_GENERAL, - 1, &blit_region, VK_FILTER_LINEAR); - } - - vulkan_image_layout_transition_levels( - cmd, - tex, - VK_REMAINING_MIP_LEVELS, - shader->mipmap - ? VK_IMAGE_LAYOUT_GENERAL - : VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, - VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL, - VK_ACCESS_TRANSFER_WRITE_BIT, - VK_ACCESS_SHADER_READ_BIT, - VK_PIPELINE_STAGE_TRANSFER_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); - - image_texture_free(&image); - image.pixels = nullptr; - - return unique_ptr(new StaticTexture(shader->id, info->device, - tex, view, memory, move(buffer), image.width, image.height, - shader->filter != RARCH_FILTER_NEAREST, - image_info.mipLevels > 1, - vk_wrap_to_address(shader->wrap))); - -error: - if (image.pixels) - image_texture_free(&image); - if (tex != VK_NULL_HANDLE) - vkDestroyImage(info->device, tex, nullptr); - if (view != VK_NULL_HANDLE) - vkDestroyImageView(info->device, view, nullptr); - if (memory != VK_NULL_HANDLE) - vkFreeMemory(info->device, memory, nullptr); - return {}; -} - -static bool vulkan_filter_chain_load_luts( - const struct vulkan_filter_chain_create_info *info, - vulkan_filter_chain *chain, - video_shader *shader) -{ - unsigned i; - VkCommandBufferBeginInfo begin_info = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO }; - VkSubmitInfo submit_info = { - VK_STRUCTURE_TYPE_SUBMIT_INFO }; - VkCommandBuffer cmd = VK_NULL_HANDLE; - VkCommandBufferAllocateInfo cmd_info = { - VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO }; - bool recording = false; - - cmd_info.commandPool = info->command_pool; - cmd_info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY; - cmd_info.commandBufferCount = 1; - - vkAllocateCommandBuffers(info->device, &cmd_info, &cmd); - begin_info.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; - vkBeginCommandBuffer(cmd, &begin_info); - recording = true; - - for (i = 0; i < shader->luts; i++) - { - unique_ptr image = - vulkan_filter_chain_load_lut(cmd, info, chain, &shader->lut[i]); - if (!image) - { - RARCH_ERR("[Vulkan]: Failed to load LUT \"%s\".\n", shader->lut[i].path); - goto error; - } - - chain->add_static_texture(move(image)); - } - - vkEndCommandBuffer(cmd); - submit_info.commandBufferCount = 1; - submit_info.pCommandBuffers = &cmd; - vkQueueSubmit(info->queue, 1, &submit_info, VK_NULL_HANDLE); - vkQueueWaitIdle(info->queue); - vkFreeCommandBuffers(info->device, info->command_pool, 1, &cmd); - chain->release_staging_buffers(); - return true; - -error: - if (recording) - vkEndCommandBuffer(cmd); - if (cmd != VK_NULL_HANDLE) - vkFreeCommandBuffers(info->device, info->command_pool, 1, &cmd); - return false; -} - StaticTexture::StaticTexture(string id, VkDevice device, VkImage image, @@ -1965,7 +2028,9 @@ void Pass::set_semantic_texture(VkDescriptorSet set, slang_texture_semantic semantic, const Texture &texture) { if (reflection.semantic_textures[semantic][0].texture) - vulkan_pass_set_texture(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][0].binding, texture.texture.view, texture.texture.layout); + { + VULKAN_PASS_SET_TEXTURE(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][0].binding, texture.texture.view, texture.texture.layout); + } } void Pass::set_semantic_texture_array(VkDescriptorSet set, @@ -1974,7 +2039,9 @@ void Pass::set_semantic_texture_array(VkDescriptorSet set, { if (index < reflection.semantic_textures[semantic].size() && reflection.semantic_textures[semantic][index].texture) - vulkan_pass_set_texture(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][index].binding, texture.texture.view, texture.texture.layout); + { + VULKAN_PASS_SET_TEXTURE(device, set, common->samplers[texture.filter][texture.mip_filter][texture.address], reflection.semantic_textures[semantic][index].binding, texture.texture.view, texture.texture.layout); + } } void Pass::build_semantic_texture_array_vec4(uint8_t *data, slang_texture_semantic semantic, @@ -2197,11 +2264,10 @@ void Pass::build_commands( * the passes that end up on-screen. */ if (!final_pass) { - VkRenderPassBeginInfo rp_info = { - VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO }; + VkRenderPassBeginInfo rp_info; /* Render. */ - vulkan_image_layout_transition_levels(cmd, + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS(cmd, framebuffer->get_image(), 1, VK_IMAGE_LAYOUT_UNDEFINED, VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, @@ -2209,10 +2275,16 @@ void Pass::build_commands( VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, - VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT); + VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); + rp_info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO; + rp_info.pNext = NULL; rp_info.renderPass = framebuffer->get_render_pass(); rp_info.framebuffer = framebuffer->get_framebuffer(); + rp_info.renderArea.offset.x = 0; + rp_info.renderArea.offset.y = 0; rp_info.renderArea.extent.width = current_framebuffer_size.width; rp_info.renderArea.extent.height = current_framebuffer_size.height; rp_info.clearValueCount = 0; @@ -2291,7 +2363,7 @@ void Pass::build_commands( else { /* Barrier to sync with next pass. */ - vulkan_image_layout_transition_levels( + VULKAN_IMAGE_LAYOUT_TRANSITION_LEVELS( cmd, framebuffer->get_image(), VK_REMAINING_MIP_LEVELS, @@ -2300,7 +2372,9 @@ void Pass::build_commands( VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT, VK_ACCESS_SHADER_READ_BIT, VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT, - VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT); + VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, + VK_QUEUE_FAMILY_IGNORED, + VK_QUEUE_FAMILY_IGNORED); } } } @@ -2509,51 +2583,6 @@ vulkan_filter_chain_t *vulkan_filter_chain_create_default( return chain.release(); } -static VkFormat glslang_format_to_vk(glslang_format fmt) -{ -#undef FMT -#define FMT(x) case SLANG_FORMAT_##x: return VK_FORMAT_##x - switch (fmt) - { - FMT(R8_UNORM); - FMT(R8_SINT); - FMT(R8_UINT); - FMT(R8G8_UNORM); - FMT(R8G8_SINT); - FMT(R8G8_UINT); - FMT(R8G8B8A8_UNORM); - FMT(R8G8B8A8_SINT); - FMT(R8G8B8A8_UINT); - FMT(R8G8B8A8_SRGB); - - FMT(A2B10G10R10_UNORM_PACK32); - FMT(A2B10G10R10_UINT_PACK32); - - FMT(R16_UINT); - FMT(R16_SINT); - FMT(R16_SFLOAT); - FMT(R16G16_UINT); - FMT(R16G16_SINT); - FMT(R16G16_SFLOAT); - FMT(R16G16B16A16_UINT); - FMT(R16G16B16A16_SINT); - FMT(R16G16B16A16_SFLOAT); - - FMT(R32_UINT); - FMT(R32_SINT); - FMT(R32_SFLOAT); - FMT(R32G32_UINT); - FMT(R32G32_SINT); - FMT(R32G32_SFLOAT); - FMT(R32G32B32A32_UINT); - FMT(R32G32B32A32_SINT); - FMT(R32G32B32A32_SFLOAT); - - default: - return VK_FORMAT_UNDEFINED; - } -} - vulkan_filter_chain_t *vulkan_filter_chain_create_from_preset( const struct vulkan_filter_chain_create_info *info, const char *path, vulkan_filter_chain_filter filter) diff --git a/gfx/drivers_shader/slang_process.cpp b/gfx/drivers_shader/slang_process.cpp index 77374f0a1e..600fb07eb8 100644 --- a/gfx/drivers_shader/slang_process.cpp +++ b/gfx/drivers_shader/slang_process.cpp @@ -22,6 +22,7 @@ #include #include #include +#include #include "glslang_util.h" #include "slang_reflection.h" @@ -216,13 +217,17 @@ static bool slang_process_reflection( slang_semantic_meta& src = sl_reflection.semantics[semantic]; if (src.push_constant || src.uniform) { - uniform_sem_t uniform = { map->uniforms[semantic], - src.num_components - * (unsigned)sizeof(float) }; + uniform_sem_t uniform; const char *uniform_id = get_semantic_name( sl_reflection, (slang_semantic)semantic, 0).c_str(); - strlcpy(uniform.id, uniform_id, sizeof(uniform.id)); + uniform.data = map->uniforms[semantic]; + uniform.size = src.num_components * (unsigned)sizeof(float); + uniform.offset = 0; + uniform.id[0] = '\0'; + + if (!string_is_empty(uniform_id)) + strlcpy(uniform.id, uniform_id, sizeof(uniform.id)); if (src.push_constant) { @@ -243,11 +248,15 @@ static bool slang_process_reflection( if (src.push_constant || src.uniform) { - uniform_sem_t uniform = { - &shader_info->parameters[i].current, sizeof(float) }; - + uniform_sem_t uniform; const char *uniform_id = get_semantic_name( sl_reflection, SLANG_SEMANTIC_FLOAT_PARAMETER, i).c_str(); + + uniform.data = &shader_info->parameters[i].current; + uniform.size = sizeof(float); + uniform.offset = 0; + uniform.id[0] = '\0'; + strlcpy(uniform.id, uniform_id, sizeof(uniform.id)); if (src.push_constant) @@ -275,9 +284,11 @@ static bool slang_process_reflection( if (src.stage_mask) { - texture_sem_t texture = { - (void*)((uintptr_t)map->textures[semantic].image + index * map->textures[semantic].image_stride) - }; + texture_sem_t texture; + string id = get_semantic_name( + sl_reflection, (slang_texture_semantic)semantic, index); + texture.texture_data = + (void*)((uintptr_t)map->textures[semantic].image + index * map->textures[semantic].image_stride); if (semantic == SLANG_TEXTURE_SEMANTIC_USER) { @@ -291,8 +302,7 @@ static bool slang_process_reflection( } texture.stage_mask = src.stage_mask; texture.binding = src.binding; - string id = get_semantic_name( - sl_reflection, (slang_texture_semantic)semantic, index); + texture.id[0] = '\0'; strlcpy(texture.id, id.c_str(), sizeof(texture.id)); @@ -308,17 +318,19 @@ static bool slang_process_reflection( if (src.push_constant || src.uniform) { - uniform_sem_t uniform = { - (void*)((uintptr_t)map->textures[semantic].size - + index * map->textures[semantic].size_stride), - 4 * sizeof(float) - }; - + uniform_sem_t uniform; const char *uniform_id = get_size_semantic_name( sl_reflection, (slang_texture_semantic)semantic, index).c_str(); + uniform.data = (void*)((uintptr_t) + map->textures[semantic].size + + index * map->textures[semantic].size_stride); + uniform.size = 4 * sizeof(float); + uniform.offset = 0; + uniform.id[0] = '\0'; + strlcpy(uniform.id, uniform_id, sizeof(uniform.id)); if (src.push_constant) @@ -518,8 +530,10 @@ bool slang_process( break; } - vs_resources = vs_compiler->get_shader_resources(); - ps_resources = ps_compiler->get_shader_resources(); + if (vs_compiler) + vs_resources = vs_compiler->get_shader_resources(); + if (ps_compiler) + ps_resources = ps_compiler->get_shader_resources(); if (!vs_resources.uniform_buffers.empty()) vs_compiler->set_decoration( @@ -565,13 +579,14 @@ bool slang_process( const ShaderResources &resources) { for (const Resource& resource : resources.push_constant_buffers) { - // Explicit 1:1 mapping for bindings. + /* Explicit 1:1 mapping for bindings. */ MSLResourceBinding binding = {}; - binding.stage = comp->get_execution_model(); - binding.desc_set = kPushConstDescSet; - binding.binding = kPushConstBinding; - // Use earlier decoration override. - binding.msl_buffer = comp->get_decoration(resource.id, spv::DecorationBinding); + binding.stage = comp->get_execution_model(); + binding.desc_set = kPushConstDescSet; + binding.binding = kPushConstBinding; + /* Use earlier decoration override. */ + binding.msl_buffer = comp->get_decoration( + resource.id, spv::DecorationBinding); comp->add_msl_resource_binding(binding); } }; @@ -580,17 +595,19 @@ bool slang_process( const SmallVector &resources) { for (const Resource& resource : resources) { - // Explicit 1:1 mapping for bindings. + /* Explicit 1:1 mapping for bindings. */ MSLResourceBinding binding = {}; - binding.stage = comp->get_execution_model(); - binding.desc_set = comp->get_decoration(resource.id, spv::DecorationDescriptorSet); + binding.stage = comp->get_execution_model(); + binding.desc_set = comp->get_decoration( + resource.id, spv::DecorationDescriptorSet); - // Use existing decoration override. - uint32_t msl_binding = comp->get_decoration(resource.id, spv::DecorationBinding); - binding.binding = msl_binding; - binding.msl_buffer = msl_binding; - binding.msl_texture = msl_binding; - binding.msl_sampler = msl_binding; + /* Use existing decoration override. */ + uint32_t msl_binding = comp->get_decoration( + resource.id, spv::DecorationBinding); + binding.binding = msl_binding; + binding.msl_buffer = msl_binding; + binding.msl_texture = msl_binding; + binding.msl_sampler = msl_binding; comp->add_msl_resource_binding(binding); } }; diff --git a/gfx/drivers_shader/slang_reflection.cpp b/gfx/drivers_shader/slang_reflection.cpp index c32ab8a789..9d4ca97473 100644 --- a/gfx/drivers_shader/slang_reflection.cpp +++ b/gfx/drivers_shader/slang_reflection.cpp @@ -54,17 +54,6 @@ static const char *semantic_uniform_names[] = { "FrameDirection", }; -slang_reflection::slang_reflection() -{ - unsigned i; - - for (i = 0; i < SLANG_NUM_TEXTURE_SEMANTICS; i++) - semantic_textures[i].resize( - slang_texture_semantic_is_array( - static_cast(i)) - ? 0 : 1); -} - static slang_texture_semantic slang_name_to_texture_semantic( const unordered_map &semantic_map, const string &name, unsigned *index) @@ -354,6 +343,18 @@ static bool add_active_buffer_ranges( return true; } + +slang_reflection::slang_reflection() +{ + unsigned i; + + for (i = 0; i < SLANG_NUM_TEXTURE_SEMANTICS; i++) + semantic_textures[i].resize( + slang_texture_semantic_is_array( + static_cast(i)) + ? 0 : 1); +} + bool slang_reflect( const Compiler &vertex_compiler, const Compiler &fragment_compiler, @@ -599,7 +600,8 @@ bool slang_reflect( } else if (index == SLANG_INVALID_TEXTURE_SEMANTIC) { - RARCH_ERR("[slang]: Non-semantic textures not supported yet.\n"); + RARCH_ERR("[slang]: Non-semantic textures not supported yet, " + "Probably a texture name or pass alias is not found. \n"); return false; } diff --git a/gfx/drivers_shader/slang_reflection.h b/gfx/drivers_shader/slang_reflection.h index d99c737639..a814da743f 100644 --- a/gfx/drivers_shader/slang_reflection.h +++ b/gfx/drivers_shader/slang_reflection.h @@ -92,7 +92,7 @@ enum slang_constant_buffer SLANG_CBUFFER_MAX }; -/* Vulkan minimum limit. */ +/* Vulkan maximum texture bindings inside shader. D3D11 has hard limit of 16 */ #define SLANG_NUM_BINDINGS 16 struct slang_texture_semantic_map diff --git a/gfx/font_driver.c b/gfx/font_driver.c index 532abc5bcf..19a3e1fb52 100644 --- a/gfx/font_driver.c +++ b/gfx/font_driver.c @@ -1200,7 +1200,7 @@ font_data_t *font_driver_init_first( if (ok) { - font_data_t *font = (font_data_t*)calloc(1, sizeof(*font)); + font_data_t *font = (font_data_t*)malloc(sizeof(*font)); font->renderer = (const font_renderer_t*)font_driver; font->renderer_data = font_handle; font->size = font_size; diff --git a/gfx/gfx_display.h b/gfx/gfx_display.h index f5a5403159..933fd02e70 100644 --- a/gfx/gfx_display.h +++ b/gfx/gfx_display.h @@ -26,6 +26,7 @@ #include #include #include +#include #include #include "../retroarch.h" @@ -380,7 +381,8 @@ bool gfx_display_reset_textures_list( bool gfx_display_reset_textures_list_buffer( uintptr_t *item, enum texture_filter_type filter_type, - void* buffer, unsigned buffer_len, enum image_type_enum image_type, + void* buffer, unsigned buffer_len, + enum image_type_enum image_type, unsigned *width, unsigned *height); /* Returns the OSK key at a given position */ diff --git a/gfx/gfx_thumbnail.c b/gfx/gfx_thumbnail.c index c698cb0cff..dd51428a55 100644 --- a/gfx/gfx_thumbnail.c +++ b/gfx/gfx_thumbnail.c @@ -298,7 +298,7 @@ void gfx_thumbnail_request( if (path_is_valid(thumbnail_path)) { gfx_thumbnail_tag_t *thumbnail_tag = - (gfx_thumbnail_tag_t*)calloc(1, sizeof(gfx_thumbnail_tag_t)); + (gfx_thumbnail_tag_t*)malloc(sizeof(gfx_thumbnail_tag_t)); if (!thumbnail_tag) goto end; @@ -398,7 +398,7 @@ void gfx_thumbnail_request_file( return; /* Load thumbnail */ - thumbnail_tag = (gfx_thumbnail_tag_t*)calloc(1, sizeof(gfx_thumbnail_tag_t)); + thumbnail_tag = (gfx_thumbnail_tag_t*)malloc(sizeof(gfx_thumbnail_tag_t)); if (!thumbnail_tag) return; diff --git a/gfx/gfx_thumbnail_path.c b/gfx/gfx_thumbnail_path.c index 4db54e2bd9..ebfa7646aa 100644 --- a/gfx/gfx_thumbnail_path.c +++ b/gfx/gfx_thumbnail_path.c @@ -52,27 +52,6 @@ struct gfx_thumbnail_path_data enum playlist_thumbnail_mode playlist_left_mode; }; -/* Initialisation */ - -/* Creates new thumbnail path data container. - * Returns handle to new gfx_thumbnail_path_data_t object. - * on success, otherwise NULL. - * Note: Returned object must be free()d */ -gfx_thumbnail_path_data_t *gfx_thumbnail_path_init(void) -{ - gfx_thumbnail_path_data_t *path_data = (gfx_thumbnail_path_data_t*) - calloc(1, sizeof(*path_data)); - if (!path_data) - return NULL; - - /* Set these manually, since the default enum - * may not necessarily have a value of zero */ - path_data->playlist_right_mode = PLAYLIST_THUMBNAIL_MODE_DEFAULT; - path_data->playlist_left_mode = PLAYLIST_THUMBNAIL_MODE_DEFAULT; - - return path_data; -} - /* Resets thumbnail path data * (blanks all internal string containers) */ void gfx_thumbnail_path_reset(gfx_thumbnail_path_data_t *path_data) @@ -93,6 +72,25 @@ void gfx_thumbnail_path_reset(gfx_thumbnail_path_data_t *path_data) path_data->playlist_left_mode = PLAYLIST_THUMBNAIL_MODE_DEFAULT; } +/* Initialisation */ + +/* Creates new thumbnail path data container. + * Returns handle to new gfx_thumbnail_path_data_t object. + * on success, otherwise NULL. + * Note: Returned object must be free()d */ +gfx_thumbnail_path_data_t *gfx_thumbnail_path_init(void) +{ + gfx_thumbnail_path_data_t *path_data = (gfx_thumbnail_path_data_t*) + malloc(sizeof(*path_data)); + if (!path_data) + return NULL; + + gfx_thumbnail_path_reset(path_data); + + return path_data; +} + + /* Utility Functions */ /* Fetches the thumbnail subdirectory (Named_Snaps, @@ -217,7 +215,8 @@ static void fill_content_img(gfx_thumbnail_path_data_t *path_data) * No-Intro filename standard: * http://datomatic.no-intro.org/stuff/The%20Official%20No-Intro%20Convention%20(20071030).zip * Replace these characters in the entry name with underscores */ - while((scrub_char_pointer = strpbrk(path_data->content_img, "&*/:`\"<>?\\|"))) + while ((scrub_char_pointer = + strpbrk(path_data->content_img, "&*/:`\"<>?\\|"))) *scrub_char_pointer = '_'; /* Add PNG extension */ diff --git a/gfx/gfx_widgets.c b/gfx/gfx_widgets.c index 7cf538f539..140d9e38a0 100644 --- a/gfx/gfx_widgets.c +++ b/gfx/gfx_widgets.c @@ -44,13 +44,6 @@ #define MSG_QUEUE_FONT_SIZE (BASE_FONT_SIZE * 0.69f) -#ifdef HAVE_MENU -#define ANIMATION_LOAD_CONTENT_DURATION 333 - -#define LOAD_CONTENT_ANIMATION_INITIAL_ICON_SIZE 320 -#define LOAD_CONTENT_ANIMATION_TARGET_ICON_SIZE 240 -#endif - /* TODO/FIXME - global state - perhaps move outside this file */ static float msg_queue_background[16] = COLOR_HEX_TO_FLOAT(0x3A3A3A, 1.0f); @@ -66,10 +59,6 @@ COLOR_HEX_TO_FLOAT(0x397869, 1.0f); static float msg_queue_task_progress_2[16] = COLOR_HEX_TO_FLOAT(0x317198, 1.0f); -#if 0 -static float color_task_progress_bar[16] = -COLOR_HEX_TO_FLOAT(0x22B14C, 1.0f); -#endif static float gfx_widgets_pure_white[16] = { 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, 1.00, @@ -108,10 +97,6 @@ static const char }; /* Forward declarations */ -#ifdef HAVE_MENU -bool menu_driver_get_load_content_animation_data( - uintptr_t *icon, char **playlist_name); -#endif static void gfx_widgets_context_reset( dispgfx_widget_t *p_dispwidget, bool is_threaded, @@ -196,18 +181,22 @@ size_t gfx_widgets_get_msg_queue_size(void *data) /* Widgets list */ const static gfx_widget_t* const widgets[] = { +#ifdef HAVE_SCREENSHOTS &gfx_widget_screenshot, +#endif &gfx_widget_volume, #ifdef HAVE_CHEEVOS &gfx_widget_achievement_popup, #endif &gfx_widget_generic_message, - &gfx_widget_libretro_message + &gfx_widget_libretro_message, + &gfx_widget_progress_message, + &gfx_widget_load_content_animation }; static void msg_widget_msg_transition_animation_done(void *userdata) { - menu_widget_msg_t *msg = (menu_widget_msg_t*)userdata; + disp_widget_msg_t *msg = (disp_widget_msg_t*)userdata; if (msg->msg) free(msg->msg); @@ -230,15 +219,15 @@ void gfx_widgets_msg_queue_push( unsigned prio, bool flush, bool menu_is_alive) { - menu_widget_msg_t *msg_widget = NULL; + disp_widget_msg_t *msg_widget = NULL; dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data; - if (fifo_write_avail(p_dispwidget->msg_queue) > 0) + if (FIFO_WRITE_AVAIL(p_dispwidget->msg_queue) > 0) { /* Get current msg if it exists */ if (task && task->frontend_userdata) { - msg_widget = (menu_widget_msg_t*)task->frontend_userdata; + msg_widget = (disp_widget_msg_t*)task->frontend_userdata; /* msg_widgets can be passed between tasks */ msg_widget->task_ptr = task; } @@ -248,34 +237,47 @@ void gfx_widgets_msg_queue_push( { const char *title = msg; - msg_widget = (menu_widget_msg_t*)calloc(1, sizeof(*msg_widget)); + msg_widget = (disp_widget_msg_t*)malloc(sizeof(*msg_widget)); if (task) title = task->title; + msg_widget->msg = NULL; + msg_widget->msg_new = NULL; + msg_widget->msg_transition_animation = 0.0f; + msg_widget->msg_len = 0; msg_widget->duration = duration; + + msg_widget->text_height = 0; + msg_widget->offset_y = 0; msg_widget->alpha = 1.0f; msg_widget->dying = false; msg_widget->expired = false; + msg_widget->width = 0; msg_widget->expiration_timer = 0; - msg_widget->task_ptr = task; msg_widget->expiration_timer_started = false; - msg_widget->msg_new = NULL; - msg_widget->msg_transition_animation = 0.0f; + msg_widget->task_ptr = task; + msg_widget->task_title_ptr = NULL; + msg_widget->task_count = 0; - msg_widget->text_height = 0; + msg_widget->task_progress = 0; + msg_widget->task_finished = false; + msg_widget->task_error = false; + msg_widget->task_cancelled = false; + msg_widget->task_ident = 0; - if (p_dispwidget->msg_queue_has_icons) - { - msg_widget->unfolded = false; - msg_widget->unfolding = false; - msg_widget->unfold = 0.0f; - } - else + msg_widget->unfolded = false; + msg_widget->unfolding = false; + msg_widget->unfold = 0.0f; + + msg_widget->hourglass_rotation = 0.0f; + msg_widget->hourglass_timer = 0.0f; + + if (!p_dispwidget->msg_queue_has_icons) { msg_widget->unfolded = true; msg_widget->unfolding = false; @@ -284,46 +286,46 @@ void gfx_widgets_msg_queue_push( if (task) { - msg_widget->msg = strdup(title); - msg_widget->msg_new = strdup(title); - msg_widget->msg_len = (unsigned)strlen(title); + msg_widget->msg = strdup(title); + msg_widget->msg_new = strdup(title); + msg_widget->msg_len = (unsigned)strlen(title); - msg_widget->task_error = !string_is_empty(task->error); - msg_widget->task_cancelled = task->cancelled; - msg_widget->task_finished = task->finished; - msg_widget->task_progress = task->progress; - msg_widget->task_ident = task->ident; - msg_widget->task_title_ptr = task->title; - msg_widget->task_count = 1; + msg_widget->task_error = !string_is_empty(task->error); + msg_widget->task_cancelled = task->cancelled; + msg_widget->task_finished = task->finished; + msg_widget->task_progress = task->progress; + msg_widget->task_ident = task->ident; + msg_widget->task_title_ptr = task->title; + msg_widget->task_count = 1; - msg_widget->unfolded = true; + msg_widget->unfolded = true; - msg_widget->width = font_driver_get_message_width( + msg_widget->width = font_driver_get_message_width( p_dispwidget->gfx_widget_fonts.msg_queue.font, title, msg_widget->msg_len, 1) + p_dispwidget->simple_widget_padding / 2; - task->frontend_userdata = msg_widget; + task->frontend_userdata = msg_widget; - msg_widget->hourglass_rotation = 0; + msg_widget->hourglass_rotation = 0; } else { /* Compute rect width, wrap if necessary */ /* Single line text > two lines text > two lines * text with expanded width */ - unsigned title_length = (unsigned)strlen(title); - char *msg = strdup(title); - unsigned width = menu_is_alive + unsigned title_length = (unsigned)strlen(title); + char *msg = strdup(title); + unsigned width = menu_is_alive ? p_dispwidget->msg_queue_default_rect_width_menu_alive : p_dispwidget->msg_queue_default_rect_width; - unsigned text_width = font_driver_get_message_width( + unsigned text_width = font_driver_get_message_width( p_dispwidget->gfx_widget_fonts.msg_queue.font, title, title_length, 1); - msg_widget->text_height = p_dispwidget->gfx_widget_fonts.msg_queue.line_height; + msg_widget->text_height = p_dispwidget->gfx_widget_fonts.msg_queue.line_height; /* Text is too wide, split it into two lines */ if (text_width > width) @@ -340,11 +342,11 @@ void gfx_widgets_msg_queue_push( msg_widget->text_height *= 2; } else - width = text_width; + width = text_width; - msg_widget->msg = msg; - msg_widget->msg_len = (unsigned)strlen(msg); - msg_widget->width = width + + msg_widget->msg = msg; + msg_widget->msg_len = (unsigned)strlen(msg); + msg_widget->width = width + p_dispwidget->simple_widget_padding / 2; } @@ -411,7 +413,7 @@ void gfx_widgets_msg_queue_push( static void gfx_widgets_unfold_end(void *userdata) { - menu_widget_msg_t *unfold = (menu_widget_msg_t*)userdata; + disp_widget_msg_t *unfold = (disp_widget_msg_t*)userdata; dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)dispwidget_get_ptr(); unfold->unfolding = false; @@ -425,7 +427,7 @@ static void gfx_widgets_move_end(void *userdata) if (userdata) { gfx_animation_ctx_entry_t entry; - menu_widget_msg_t *unfold = (menu_widget_msg_t*)userdata; + disp_widget_msg_t *unfold = (disp_widget_msg_t*)userdata; entry.cb = gfx_widgets_unfold_end; entry.duration = MSG_QUEUE_ANIMATION_DURATION; @@ -446,7 +448,7 @@ static void gfx_widgets_move_end(void *userdata) static void gfx_widgets_msg_queue_expired(void *userdata) { - menu_widget_msg_t *msg = (menu_widget_msg_t *)userdata; + disp_widget_msg_t *msg = (disp_widget_msg_t *)userdata; if (msg && !msg->expired) msg->expired = true; @@ -457,13 +459,13 @@ static void gfx_widgets_msg_queue_move(dispgfx_widget_t *p_dispwidget) int i; float y = 0; /* there should always be one and only one unfolded message */ - menu_widget_msg_t *unfold = NULL; + disp_widget_msg_t *unfold = NULL; SLOCK_LOCK(p_dispwidget->current_msgs_lock); for (i = (int)(p_dispwidget->current_msgs_size - 1); i >= 0; i--) { - menu_widget_msg_t* msg = p_dispwidget->current_msgs[i]; + disp_widget_msg_t* msg = p_dispwidget->current_msgs[i]; if (!msg || msg->dying) continue; @@ -497,7 +499,7 @@ static void gfx_widgets_msg_queue_move(dispgfx_widget_t *p_dispwidget) static void gfx_widgets_msg_queue_free( dispgfx_widget_t *p_dispwidget, - menu_widget_msg_t *msg) + disp_widget_msg_t *msg) { uintptr_t tag = (uintptr_t)msg; @@ -534,7 +536,7 @@ static void gfx_widgets_msg_queue_free( static void gfx_widgets_msg_queue_kill_end(void *userdata) { dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)dispwidget_get_ptr(); - menu_widget_msg_t* msg; + disp_widget_msg_t* msg; unsigned i; SLOCK_LOCK(p_dispwidget->current_msgs_lock); @@ -564,7 +566,7 @@ static void gfx_widgets_msg_queue_kill( unsigned idx) { gfx_animation_ctx_entry_t entry; - menu_widget_msg_t *msg = p_dispwidget->current_msgs[idx]; + disp_widget_msg_t *msg = p_dispwidget->current_msgs[idx]; if (!msg) return; @@ -606,7 +608,6 @@ void gfx_widgets_draw_icon( unsigned icon_height, uintptr_t texture, float x, float y, - unsigned width, unsigned height, float rotation, float scale_factor, float *color) { @@ -634,7 +635,7 @@ void gfx_widgets_draw_icon( coords.color = color; draw.x = x; - draw.y = height - y - icon_height; + draw.y = video_height - y - icon_height; draw.width = icon_width; draw.height = icon_height; draw.scale_factor = scale_factor; @@ -658,7 +659,6 @@ static void gfx_widgets_draw_icon_blend( unsigned icon_height, uintptr_t texture, float x, float y, - unsigned width, unsigned height, float rotation, float scale_factor, float *color) { @@ -686,7 +686,7 @@ static void gfx_widgets_draw_icon_blend( coords.color = color; draw.x = x; - draw.y = height - y - icon_height; + draw.y = video_height - y - icon_height; draw.width = icon_width; draw.height = icon_height; draw.scale_factor = scale_factor; @@ -756,7 +756,7 @@ float gfx_widgets_get_thumbnail_scale_factor( } static void gfx_widgets_start_msg_expiration_timer( - menu_widget_msg_t *msg_widget, unsigned duration) + disp_widget_msg_t *msg_widget, unsigned duration) { gfx_timer_ctx_entry_t timer; @@ -774,7 +774,7 @@ static void gfx_widgets_hourglass_tick(void *userdata); static void gfx_widgets_hourglass_end(void *userdata) { gfx_timer_ctx_entry_t timer; - menu_widget_msg_t *msg = (menu_widget_msg_t*)userdata; + disp_widget_msg_t *msg = (disp_widget_msg_t*)userdata; msg->hourglass_rotation = 0.0f; @@ -788,7 +788,7 @@ static void gfx_widgets_hourglass_end(void *userdata) static void gfx_widgets_hourglass_tick(void *userdata) { gfx_animation_ctx_entry_t entry; - menu_widget_msg_t *msg = (menu_widget_msg_t*)userdata; + disp_widget_msg_t *msg = (disp_widget_msg_t*)userdata; uintptr_t tag = (uintptr_t)msg; entry.easing_enum = EASING_OUT_QUAD; @@ -845,17 +845,17 @@ void gfx_widgets_iterate( /* Messages queue */ /* Consume one message if available */ - if ((fifo_read_avail(p_dispwidget->msg_queue) > 0) + if ((FIFO_READ_AVAIL(p_dispwidget->msg_queue) > 0) && !p_dispwidget->widgets_moving && (p_dispwidget->current_msgs_size < ARRAY_SIZE(p_dispwidget->current_msgs))) { - menu_widget_msg_t *msg_widget = NULL; + disp_widget_msg_t *msg_widget = NULL; SLOCK_LOCK(p_dispwidget->current_msgs_lock); if (p_dispwidget->current_msgs_size < ARRAY_SIZE(p_dispwidget->current_msgs)) { - if (fifo_read_avail(p_dispwidget->msg_queue) > 0) + if (FIFO_READ_AVAIL(p_dispwidget->msg_queue) > 0) fifo_read(p_dispwidget->msg_queue, &msg_widget, sizeof(msg_widget)); if (msg_widget) @@ -907,7 +907,7 @@ void gfx_widgets_iterate( /* Start expiration timer of dead tasks */ for (i = 0; i < p_dispwidget->current_msgs_size; i++) { - menu_widget_msg_t *msg_widget = p_dispwidget->current_msgs[i]; + disp_widget_msg_t *msg_widget = p_dispwidget->current_msgs[i]; if (!msg_widget) continue; @@ -960,7 +960,6 @@ static int gfx_widgets_draw_indicator( video_height, width, height, icon, top_right_x_advance - width, y, - video_width, video_height, 0, 1, gfx_widgets_pure_white ); gfx_display_blend_end(userdata); @@ -998,7 +997,7 @@ static int gfx_widgets_draw_indicator( static void gfx_widgets_draw_task_msg( dispgfx_widget_t *p_dispwidget, - menu_widget_msg_t *msg, + disp_widget_msg_t *msg, void *userdata, unsigned video_width, unsigned video_height) @@ -1023,7 +1022,7 @@ static void gfx_widgets_draw_task_msg( draw_msg_new = !string_is_equal(msg->msg_new, msg->msg); task_percentage_offset = p_dispwidget->gfx_widget_fonts.msg_queue.glyph_width * (msg->task_error ? 12 : 5) - + p_dispwidget->simple_widget_padding * 1.25f; /*11 = strlen("Task failed")+1 */ + + p_dispwidget->simple_widget_padding * 1.25f; /*11 = STRLEN_CONST("Task failed") + 1 */ if (msg->task_finished) { @@ -1100,8 +1099,6 @@ static void gfx_widgets_draw_task_msg( : MENU_WIDGETS_ICON_HOURGLASS], p_dispwidget->msg_queue_task_hourglass_x, video_height - msg->offset_y, - video_width, - video_height, msg->task_finished ? 0 : msg->hourglass_rotation, 1, gfx_widgets_pure_white); gfx_display_blend_end(userdata); @@ -1165,7 +1162,7 @@ static void gfx_widgets_draw_task_msg( static void gfx_widgets_draw_regular_msg( dispgfx_widget_t *p_dispwidget, - menu_widget_msg_t *msg, + disp_widget_msg_t *msg, void *userdata, unsigned video_width, unsigned video_height) @@ -1214,7 +1211,6 @@ static void gfx_widgets_draw_regular_msg( p_dispwidget->msg_queue_icon_rect, p_dispwidget->msg_queue_spacing, (int)(video_height - msg->offset_y - p_dispwidget->msg_queue_icon_offset_y), - video_width, video_height, 0, 1, msg_queue_background); gfx_display_blend_end(userdata); @@ -1271,7 +1267,6 @@ static void gfx_widgets_draw_regular_msg( p_dispwidget->msg_queue_icon, p_dispwidget->msg_queue_spacing, video_height - msg->offset_y - p_dispwidget->msg_queue_icon_offset_y, - video_width, video_height, 0, 1, msg_queue_info); gfx_widgets_draw_icon( @@ -1283,7 +1278,6 @@ static void gfx_widgets_draw_regular_msg( p_dispwidget->msg_queue_icon_outline, p_dispwidget->msg_queue_spacing, video_height - msg->offset_y - p_dispwidget->msg_queue_icon_offset_y, - video_width, video_height, 0, 1, gfx_widgets_pure_white); gfx_widgets_draw_icon( @@ -1293,95 +1287,12 @@ static void gfx_widgets_draw_regular_msg( p_dispwidget->msg_queue_internal_icon_size, p_dispwidget->msg_queue_internal_icon_size, icon, p_dispwidget->msg_queue_spacing + p_dispwidget->msg_queue_internal_icon_offset, video_height - msg->offset_y - p_dispwidget->msg_queue_icon_offset_y + p_dispwidget->msg_queue_internal_icon_offset, - video_width, video_height, 0, 1, gfx_widgets_pure_white); gfx_display_blend_end(userdata); } } -#ifdef HAVE_MENU -static void gfx_widgets_draw_backdrop( - void *userdata, - unsigned video_width, - unsigned video_height, - float alpha) -{ - gfx_display_set_alpha(gfx_widgets_backdrop, alpha); - gfx_display_draw_quad(userdata, - video_width, video_height, 0, 0, - video_width, video_height, video_width, video_height, - gfx_widgets_backdrop); -} - -static void gfx_widgets_draw_load_content_animation( - dispgfx_widget_t *p_dispwidget, - void *userdata, - unsigned video_width, - unsigned video_height) -{ - /* TODO: change metrics? */ - int icon_size = (int)p_dispwidget->load_content_animation_icon_size; - uint32_t text_alpha = p_dispwidget->load_content_animation_fade_alpha * 255.0f; - uint32_t text_color = COLOR_TEXT_ALPHA(0xB8B8B800, text_alpha); - unsigned text_offset = -25 * p_dispwidget->last_scale_factor * - p_dispwidget->load_content_animation_fade_alpha; - float *icon_color = p_dispwidget->load_content_animation_icon_color; - - /* Fade out */ - gfx_widgets_draw_backdrop(userdata, - video_width, video_height, - p_dispwidget->load_content_animation_fade_alpha); - - /* Icon */ - gfx_display_set_alpha(icon_color, - p_dispwidget->load_content_animation_icon_alpha); - gfx_display_blend_begin(userdata); - gfx_widgets_draw_icon( - userdata, - video_width, - video_height, - icon_size, - icon_size, - p_dispwidget->load_content_animation_icon, - video_width / 2 - icon_size/2, - video_height / 2 - icon_size/2, - video_width, - video_height, - 0, 1, icon_color - ); - gfx_display_blend_end(userdata); - - /* Text - * TODO/FIXME: Check vertical alignment - where is - * this text actually meant to go...? */ - gfx_widgets_draw_text(&p_dispwidget->gfx_widget_fonts.bold, - p_dispwidget->load_content_animation_content_name, - video_width / 2, - video_height / 2 + (175 + 25) * p_dispwidget->last_scale_factor - + text_offset - + p_dispwidget->gfx_widget_fonts.bold.line_centre_offset, - video_width, - video_height, - text_color, - TEXT_ALIGN_CENTER, - false); - - /* Flush text layer */ - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.regular); - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.bold); - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.msg_queue); - - /* Everything disappears */ - gfx_widgets_draw_backdrop(userdata, - video_width, video_height, - p_dispwidget->load_content_animation_final_fade_alpha); -} -#endif - static void INLINE gfx_widgets_font_bind(gfx_widget_font_data_t *font_data) { font_driver_bind_block(font_data->font, &font_data->raster_block); @@ -1442,8 +1353,6 @@ void gfx_widgets_frame(void *data) p_dispwidget->ai_service_overlay_texture, 0, 0, - video_width, - video_height, 0, 1, gfx_widgets_pure_white @@ -1612,7 +1521,7 @@ void gfx_widgets_frame(void *data) for (i = 0; i < p_dispwidget->current_msgs_size; i++) { - menu_widget_msg_t* msg = p_dispwidget->current_msgs[i]; + disp_widget_msg_t* msg = p_dispwidget->current_msgs[i]; if (!msg) continue; @@ -1632,24 +1541,13 @@ void gfx_widgets_frame(void *data) SLOCK_UNLOCK(p_dispwidget->current_msgs_lock); } -#ifdef HAVE_MENU - /* Load content animation */ - if (p_dispwidget->load_content_animation_running) - gfx_widgets_draw_load_content_animation( - p_dispwidget, - userdata, - video_width, - video_height); - else -#endif - { - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.regular); - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.bold); - gfx_widgets_flush_text(video_width, video_height, - &p_dispwidget->gfx_widget_fonts.msg_queue); - } + /* Ensure all text is flushed */ + gfx_widgets_flush_text(video_width, video_height, + &p_dispwidget->gfx_widget_fonts.regular); + gfx_widgets_flush_text(video_width, video_height, + &p_dispwidget->gfx_widget_fonts.bold); + gfx_widgets_flush_text(video_width, video_height, + &p_dispwidget->gfx_widget_fonts.msg_queue); /* Unbind fonts */ gfx_widgets_font_unbind(&p_dispwidget->gfx_widget_fonts.regular); @@ -1687,7 +1585,7 @@ bool gfx_widgets_init(uintptr_t widgets_active_ptr, } p_dispwidget->msg_queue = - fifo_new(MSG_QUEUE_PENDING_MAX * sizeof(menu_widget_msg_t*)); + fifo_new(MSG_QUEUE_PENDING_MAX * sizeof(disp_widget_msg_t*)); if (!p_dispwidget->msg_queue) goto error; @@ -1862,15 +1760,6 @@ static void gfx_widgets_layout( p_dispwidget->msg_queue_default_rect_width = p_dispwidget->last_video_width - p_dispwidget->msg_queue_regular_text_start - (2 * p_dispwidget->simple_widget_padding); -#ifdef HAVE_MENU - p_dispwidget->load_content_animation_icon_size_initial = - LOAD_CONTENT_ANIMATION_INITIAL_ICON_SIZE * - p_dispwidget->last_scale_factor; - p_dispwidget->load_content_animation_icon_size_target = - LOAD_CONTENT_ANIMATION_TARGET_ICON_SIZE * - p_dispwidget->last_scale_factor; -#endif - p_dispwidget->divider_width_1px = 1; if (p_dispwidget->last_scale_factor > 1.0f) p_dispwidget->divider_width_1px = (unsigned)(p_dispwidget->last_scale_factor + 0.5f); @@ -2062,9 +1951,9 @@ static void gfx_widgets_free(dispgfx_widget_t *p_dispwidget) /* Purge everything from the fifo */ if (p_dispwidget->msg_queue) { - while (fifo_read_avail(p_dispwidget->msg_queue) > 0) + while (FIFO_READ_AVAIL(p_dispwidget->msg_queue) > 0) { - menu_widget_msg_t *msg_widget; + disp_widget_msg_t *msg_widget; fifo_read(p_dispwidget->msg_queue, &msg_widget, sizeof(msg_widget)); @@ -2093,7 +1982,7 @@ static void gfx_widgets_free(dispgfx_widget_t *p_dispwidget) p_dispwidget->current_msgs_size = 0; for (i = 0; i < ARRAY_SIZE(p_dispwidget->current_msgs); i++) { - menu_widget_msg_t *msg = p_dispwidget->current_msgs[i]; + disp_widget_msg_t *msg = p_dispwidget->current_msgs[i]; if (!msg) continue; @@ -2172,132 +2061,3 @@ void gfx_widgets_ai_service_overlay_unload(dispgfx_widget_t *p_dispwidget) } } #endif - -#ifdef HAVE_MENU -static void gfx_widgets_end_load_content_animation(void *userdata) -{ -#if 0 - task_load_content_resume(); /* TODO: Restore that */ -#endif -} - -void gfx_widgets_cleanup_load_content_animation(void) -{ - dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)dispwidget_get_ptr(); - p_dispwidget->load_content_animation_running = false; - if (p_dispwidget->load_content_animation_content_name) - free(p_dispwidget->load_content_animation_content_name); - p_dispwidget->load_content_animation_content_name = NULL; -} -#endif - -void gfx_widgets_start_load_content_animation( - const char *content_name, bool remove_extension) -{ -#ifdef HAVE_MENU - /* TODO: finish the animation based on design, correct all timings */ - int i; - gfx_animation_ctx_entry_t entry; - gfx_timer_ctx_entry_t timer_entry; - dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)dispwidget_get_ptr(); - float icon_color[16] = - COLOR_HEX_TO_FLOAT(0x0473C9, 1.0f); /* TODO: random color */ - unsigned timing = 0; - - /* Prepare data */ - p_dispwidget->load_content_animation_icon = 0; - - /* Abort animation if we don't have an icon */ - if (!menu_driver_get_load_content_animation_data( - &p_dispwidget->load_content_animation_icon, - &p_dispwidget->load_content_animation_playlist_name) || - !p_dispwidget->load_content_animation_icon) - { - gfx_widgets_end_load_content_animation(NULL); - return; - } - - p_dispwidget->load_content_animation_content_name = strdup(content_name); - - if (remove_extension) - path_remove_extension(p_dispwidget->load_content_animation_content_name); - - /* Reset animation state */ - p_dispwidget->load_content_animation_icon_size = p_dispwidget->load_content_animation_icon_size_initial; - p_dispwidget->load_content_animation_icon_alpha = 0.0f; - p_dispwidget->load_content_animation_fade_alpha = 0.0f; - p_dispwidget->load_content_animation_final_fade_alpha = 0.0f; - - memcpy(p_dispwidget->load_content_animation_icon_color, icon_color, sizeof(p_dispwidget->load_content_animation_icon_color)); - - /* Setup the animation */ - entry.cb = NULL; - entry.easing_enum = EASING_OUT_QUAD; - entry.tag = p_dispwidget->gfx_widgets_generic_tag; - entry.userdata = NULL; - - /* Stage one: icon animation */ - /* Position */ - entry.duration = ANIMATION_LOAD_CONTENT_DURATION; - entry.subject = &p_dispwidget->load_content_animation_icon_size; - entry.target_value = p_dispwidget->load_content_animation_icon_size_target; - - gfx_animation_push(&entry); - - /* Alpha */ - entry.subject = &p_dispwidget->load_content_animation_icon_alpha; - entry.target_value = 1.0f; - - gfx_animation_push(&entry); - timing += entry.duration; - - /* Stage two: backdrop + text */ - entry.duration = ANIMATION_LOAD_CONTENT_DURATION*1.5; - entry.subject = &p_dispwidget->load_content_animation_fade_alpha; - entry.target_value = 1.0f; - - gfx_animation_push_delayed(timing, &entry); - timing += entry.duration; - - /* Stage three: wait then color transition */ - timing += ANIMATION_LOAD_CONTENT_DURATION*1.5; - - entry.duration = ANIMATION_LOAD_CONTENT_DURATION*3; - - for (i = 0; i < 16; i++) - { - if (i == 3 || i == 7 || i == 11 || i == 15) - continue; - - entry.subject = &p_dispwidget->load_content_animation_icon_color[i]; - entry.target_value = gfx_widgets_pure_white[i]; - - gfx_animation_push_delayed(timing, &entry); - } - - timing += entry.duration; - - /* Stage four: wait then make everything disappear */ - timing += ANIMATION_LOAD_CONTENT_DURATION*2; - - entry.duration = ANIMATION_LOAD_CONTENT_DURATION*1.5; - entry.subject = - &p_dispwidget->load_content_animation_final_fade_alpha; - entry.target_value = 1.0f; - - gfx_animation_push_delayed(timing, &entry); - timing += entry.duration; - - /* Setup end */ - timer_entry.cb = gfx_widgets_end_load_content_animation; - timer_entry.duration = timing; - timer_entry.userdata = NULL; - - gfx_timer_start( - &p_dispwidget->load_content_animation_end_timer, - &timer_entry); - - /* Draw all the things */ - p_dispwidget->load_content_animation_running = true; -#endif -} diff --git a/gfx/gfx_widgets.h b/gfx/gfx_widgets.h index da1aa35746..e2715d80ea 100644 --- a/gfx/gfx_widgets.h +++ b/gfx/gfx_widgets.h @@ -96,7 +96,7 @@ typedef struct cheevo_popup uintptr_t badge; } cheevo_popup; -typedef struct menu_widget_msg +typedef struct disp_widget_msg { char *msg; char *msg_new; @@ -137,7 +137,7 @@ typedef struct menu_widget_msg float hourglass_rotation; gfx_timer_t hourglass_timer; -} menu_widget_msg_t; +} disp_widget_msg_t; typedef struct dispgfx_widget { @@ -146,25 +146,11 @@ typedef struct dispgfx_widget bool widgets_moving; bool widgets_inited; bool msg_queue_has_icons; -#ifdef HAVE_MENU - bool load_content_animation_running; -#endif #ifdef HAVE_TRANSLATE int ai_service_overlay_state; -#endif -#ifdef HAVE_MENU - float load_content_animation_icon_color[16]; - float load_content_animation_icon_size; - float load_content_animation_icon_alpha; - float load_content_animation_fade_alpha; - float load_content_animation_final_fade_alpha; #endif float last_scale_factor; -#ifdef HAVE_MENU - unsigned load_content_animation_icon_size_initial; - unsigned load_content_animation_icon_size_target; -#endif #ifdef HAVE_TRANSLATE unsigned ai_service_overlay_width; unsigned ai_service_overlay_height; @@ -201,9 +187,6 @@ typedef struct dispgfx_widget uint64_t gfx_widgets_frame_count; -#ifdef HAVE_MENU - uintptr_t load_content_animation_icon; -#endif #ifdef HAVE_TRANSLATE uintptr_t ai_service_overlay_texture; #endif @@ -214,17 +197,10 @@ typedef struct dispgfx_widget MENU_WIDGETS_ICON_LAST]; char gfx_widgets_fps_text[255]; -#ifdef HAVE_MENU - char *load_content_animation_content_name; - char *load_content_animation_playlist_name; -#endif -#ifdef HAVE_MENU - gfx_timer_t load_content_animation_end_timer; -#endif uintptr_t gfx_widgets_generic_tag; gfx_widget_fonts_t gfx_widget_fonts; fifo_buffer_t *msg_queue; - menu_widget_msg_t* current_msgs[MSG_QUEUE_ONSCREEN_MAX]; + disp_widget_msg_t* current_msgs[MSG_QUEUE_ONSCREEN_MAX]; size_t current_msgs_size; #ifdef HAVE_THREADS slock_t* current_msgs_lock; @@ -313,7 +289,6 @@ void gfx_widgets_draw_icon( unsigned icon_height, uintptr_t texture, float x, float y, - unsigned width, unsigned height, float rotation, float scale_factor, float *color); @@ -372,11 +347,6 @@ bool gfx_widgets_ai_service_overlay_load( void gfx_widgets_ai_service_overlay_unload(dispgfx_widget_t *p_dispwidget); #endif -void gfx_widgets_start_load_content_animation( - const char *content_name, bool remove_extension); - -void gfx_widgets_cleanup_load_content_animation(void); - #ifdef HAVE_CHEEVOS void gfx_widgets_push_achievement(const char *title, const char *badge); #endif @@ -389,6 +359,14 @@ void gfx_widget_set_libretro_message( void *data, const char *message, unsigned duration); +/* Warning: not thread safe! */ +void gfx_widget_set_progress_message(void *data, + const char *message, unsigned duration, + unsigned priority, int8_t progress); + +/* Warning: not thread safe! */ +bool gfx_widget_start_load_content_animation(void); + /* All the functions below should be called in * the video driver - once they are all added, set * enable_menu_widgets to true for that driver */ @@ -404,6 +382,8 @@ extern const gfx_widget_t gfx_widget_screenshot; extern const gfx_widget_t gfx_widget_volume; extern const gfx_widget_t gfx_widget_generic_message; extern const gfx_widget_t gfx_widget_libretro_message; +extern const gfx_widget_t gfx_widget_progress_message; +extern const gfx_widget_t gfx_widget_load_content_animation; #ifdef HAVE_CHEEVOS extern const gfx_widget_t gfx_widget_achievement_popup; diff --git a/gfx/video_filter.c b/gfx/video_filter.c index 396a713cd6..1c658f2a37 100644 --- a/gfx/video_filter.c +++ b/gfx/video_filter.c @@ -43,6 +43,27 @@ struct rarch_soft_plug const struct softfilter_implementation *impl; }; +struct rarch_softfilter +{ + config_file_t *conf; + + const struct softfilter_implementation *impl; + void *impl_data; + + struct rarch_soft_plug *plugs; + unsigned num_plugs; + + unsigned max_width, max_height; + enum retro_pixel_format pix_fmt, out_pix_fmt; + + struct softfilter_work_packet *packets; + unsigned threads; + +#ifdef HAVE_THREADS + struct filter_thread_data *thread_data; +#endif +}; + #ifdef HAVE_THREADS #include @@ -84,27 +105,6 @@ static void filter_thread_loop(void *data) } #endif -struct rarch_softfilter -{ - config_file_t *conf; - - const struct softfilter_implementation *impl; - void *impl_data; - - struct rarch_soft_plug *plugs; - unsigned num_plugs; - - unsigned max_width, max_height; - enum retro_pixel_format pix_fmt, out_pix_fmt; - - struct softfilter_work_packet *packets; - unsigned threads; - -#ifdef HAVE_THREADS - struct filter_thread_data *thread_data; -#endif -}; - static const struct softfilter_implementation * softfilter_find_implementation(rarch_softfilter_t *filt, const char *ident) { @@ -237,7 +237,8 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt, } #ifdef HAVE_THREADS - if(filt->threads>1){ + if (filt->threads > 1) + { filt->thread_data = (struct filter_thread_data*) calloc(threads, sizeof(*filt->thread_data)); if (!filt->thread_data) @@ -246,15 +247,15 @@ static bool create_softfilter_graph(rarch_softfilter_t *filt, for (i = 0; i < threads; i++) { filt->thread_data[i].userdata = filt->impl_data; - filt->thread_data[i].done = true; + filt->thread_data[i].done = true; - filt->thread_data[i].lock = slock_new(); + filt->thread_data[i].lock = slock_new(); if (!filt->thread_data[i].lock) return false; - filt->thread_data[i].cond = scond_new(); + filt->thread_data[i].cond = scond_new(); if (!filt->thread_data[i].cond) return false; - filt->thread_data[i].thread = sthread_create( + filt->thread_data[i].thread = sthread_create( filter_thread_loop, &filt->thread_data[i]); if (!filt->thread_data[i].thread) return false; @@ -276,8 +277,9 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt, { softfilter_get_implementation_t cb; const struct softfilter_implementation *impl = NULL; - struct rarch_soft_plug *new_plugs = NULL; - dylib_t lib = dylib_load(list->elems[i].data); + struct rarch_soft_plug *new_plugs = NULL; + dylib_t lib = + dylib_load(list->elems[i].data); if (!lib) continue; @@ -315,8 +317,8 @@ static bool append_softfilter_plugs(rarch_softfilter_t *filt, RARCH_LOG("[SoftFilter]: Found plug: %s (%s).\n", impl->ident, impl->short_ident); - filt->plugs = new_plugs; - filt->plugs[filt->num_plugs].lib = lib; + filt->plugs = new_plugs; + filt->plugs[filt->num_plugs].lib = lib; filt->plugs[filt->num_plugs].impl = impl; filt->num_plugs++; } @@ -395,16 +397,13 @@ rarch_softfilter_t *rarch_softfilter_new(const char *filter_config, unsigned max_width, unsigned max_height) { softfilter_simd_mask_t cpu_features = (softfilter_simd_mask_t)cpu_features_get(); - char basedir[PATH_MAX_LENGTH]; #ifdef HAVE_DYLIB + char basedir[PATH_MAX_LENGTH]; char ext_name[PATH_MAX_LENGTH]; #endif struct string_list *plugs = NULL; - rarch_softfilter_t *filt = NULL; - - (void)basedir; - - filt = (rarch_softfilter_t*)calloc(1, sizeof(*filt)); + rarch_softfilter_t *filt = (rarch_softfilter_t*) + calloc(1, sizeof(*filt)); if (!filt) return NULL; @@ -477,9 +476,12 @@ void rarch_softfilter_free(rarch_softfilter_t *filt) #endif #ifdef HAVE_THREADS - if(filt->threads>1){ + if (filt->threads > 1) + { for (i = 0; i < filt->threads; i++) { + if (!&filt->thread_data[i]) + continue; if (!filt->thread_data[i].thread) continue; slock_lock(filt->thread_data[i].lock); @@ -537,7 +539,8 @@ void rarch_softfilter_process(rarch_softfilter_t *filt, output, output_stride, input, width, height, input_stride); #ifdef HAVE_THREADS - if(filt->threads>1){ + if (filt->threads > 1) + { /* Fire off workers */ for (i = 0; i < filt->threads; i++) { @@ -562,12 +565,10 @@ void rarch_softfilter_process(rarch_softfilter_t *filt, scond_wait(filt->thread_data[i].cond, filt->thread_data[i].lock); slock_unlock(filt->thread_data[i].lock); } - } else { - for (i = 0; i < filt->threads; i++) - filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data); + return; } -#else +#endif + for (i = 0; i < filt->threads; i++) filt->packets[i].work(filt->impl_data, filt->packets[i].thread_data); -#endif } diff --git a/gfx/video_shader_parse.h b/gfx/video_shader_parse.h index 7d55299ac0..ec928c4f3e 100644 --- a/gfx/video_shader_parse.h +++ b/gfx/video_shader_parse.h @@ -26,11 +26,11 @@ RETRO_BEGIN_DECLS #ifndef GFX_MAX_SHADERS -#define GFX_MAX_SHADERS 26 +#define GFX_MAX_SHADERS 64 #endif #ifndef GFX_MAX_TEXTURES -#define GFX_MAX_TEXTURES 8 +#define GFX_MAX_TEXTURES 16 #endif #ifndef GFX_MAX_VARIABLES @@ -38,7 +38,7 @@ RETRO_BEGIN_DECLS #endif #ifndef GFX_MAX_PARAMETERS -#define GFX_MAX_PARAMETERS 128 +#define GFX_MAX_PARAMETERS 256 #endif #ifndef GFX_MAX_FRAME_HISTORY diff --git a/gfx/widgets/gfx_widget_achievement_popup.c b/gfx/widgets/gfx_widget_achievement_popup.c index 968d74c64b..1147d27bea 100644 --- a/gfx/widgets/gfx_widget_achievement_popup.c +++ b/gfx/widgets/gfx_widget_achievement_popup.c @@ -134,7 +134,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata) /* Icon */ if (p_dispwidget->gfx_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT]) { - gfx_display_blend_begin(userdata); + gfx_display_blend_begin(video_info->userdata); gfx_widgets_draw_icon( video_info->userdata, video_width, @@ -144,8 +144,8 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata) p_dispwidget->gfx_widgets_icons_textures[MENU_WIDGETS_ICON_ACHIEVEMENT], 0, state->y, - video_width, video_height, 0, 1, gfx_widgets_get_pure_white()); - gfx_display_blend_end(userdata); + 0, 1, gfx_widgets_get_pure_white()); + gfx_display_blend_end(video_info->userdata); } } /* Badge */ @@ -160,8 +160,6 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata) state->queue[state->queue_read_index].badge, 0, state->y, - video_width, - video_height, 0, 1, gfx_widgets_get_pure_white()); @@ -220,7 +218,7 @@ static void gfx_widget_achievement_popup_frame(void* data, void* userdata) { gfx_widgets_flush_text(video_width, video_height, &p_dispwidget->gfx_widget_fonts.regular); - gfx_display_scissor_end(userdata, + gfx_display_scissor_end(video_info->userdata, video_width, video_height); } } diff --git a/gfx/widgets/gfx_widget_load_content_animation.c b/gfx/widgets/gfx_widget_load_content_animation.c new file mode 100644 index 0000000000..075d663b4d --- /dev/null +++ b/gfx/widgets/gfx_widget_load_content_animation.c @@ -0,0 +1,987 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2015-2018 - Andre Leiradella + * Copyright (C) 2018-2020 - natinusala + * Copyright (C) 2019-2020 - James Leaver + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * 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 . + */ + +#include +#include + +#include "../gfx_widgets.h" +#include "../gfx_animation.h" +#include "../gfx_display.h" +#include "../../retroarch.h" +#include "../../core_info.h" +#include "../../playlist.h" +#include "../../paths.h" + +#ifdef HAVE_MENU +#include "../../menu/menu_driver.h" +#endif + +#define LOAD_CONTENT_ANIMATION_FADE_IN_DURATION 466.0f +#define LOAD_CONTENT_ANIMATION_SLIDE_DURATION 666.0f +#define LOAD_CONTENT_ANIMATION_WAIT_DURATION 1000.0f +#define LOAD_CONTENT_ANIMATION_FADE_OUT_DURATION 433.0f + +/* Widget state */ + +enum gfx_widget_load_content_animation_status +{ + GFX_WIDGET_LOAD_CONTENT_IDLE = 0, + GFX_WIDGET_LOAD_CONTENT_BEGIN, + GFX_WIDGET_LOAD_CONTENT_FADE_IN, + GFX_WIDGET_LOAD_CONTENT_SLIDE, + GFX_WIDGET_LOAD_CONTENT_WAIT, + GFX_WIDGET_LOAD_CONTENT_FADE_OUT +}; + +struct gfx_widget_load_content_animation_state +{ + enum gfx_widget_load_content_animation_status status; + gfx_timer_t timer; + float alpha; + float slide_offset; + + char content_name[512]; + char system_name[512]; + char icon_directory[PATH_MAX_LENGTH]; + char icon_file[PATH_MAX_LENGTH]; + + uintptr_t icon_texture; + bool has_icon; + + unsigned content_name_width; + unsigned system_name_width; + + unsigned bg_width; + unsigned bg_height; + float bg_x; + float bg_y; + + unsigned bg_shadow_height; + float bg_shadow_top_y; + float bg_shadow_bottom_y; + + unsigned margin_shadow_width; + float margin_shadow_left_x; + float margin_shadow_right_x; + + unsigned icon_size; + float icon_x_start; + float icon_x_end; + float icon_y; + + float text_x_start; + float text_x_end; + float content_name_y; + float system_name_y; + + float bg_alpha; + float bg_underlay_alpha; + float bg_shadow_alpha; + + float bg_color[16]; + float bg_underlay_color[16]; + float bg_shadow_top_color[16]; + float bg_shadow_bottom_color[16]; + float margin_shadow_left_color[16]; + float margin_shadow_right_color[16]; + float icon_color[16]; + + unsigned content_name_color; + unsigned system_name_color; +}; + +typedef struct gfx_widget_load_content_animation_state gfx_widget_load_content_animation_state_t; + +static gfx_widget_load_content_animation_state_t p_w_load_content_animation_st = { + + GFX_WIDGET_LOAD_CONTENT_IDLE, /* status */ + 0.0f, /* timer */ + 0.0f, /* alpha */ + 0.0f, /* slide_offset */ + + {'\0'}, /* content_name */ + {'\0'}, /* system_name */ + {'\0'}, /* icon_directory */ + {'\0'}, /* icon_file */ + + 0, /* icon_texture */ + false, /* has_icon */ + + 0, /* content_name_width */ + 0, /* system_name_width */ + + 0, /* bg_width */ + 0, /* bg_height */ + 0.0f, /* bg_x */ + 0.0f, /* bg_y */ + + 0, /* bg_shadow_height */ + 0.0f, /* bg_shadow_top_y */ + 0.0f, /* bg_shadow_bottom_y */ + + 0, /* margin_shadow_width */ + 0.0f, /* margin_shadow_left_x */ + 0.0f, /* margin_shadow_right_x */ + + 0, /* icon_size */ + 0.0f, /* icon_x_start */ + 0.0f, /* icon_x_end */ + 0.0f, /* icon_y */ + + 0.0f, /* text_x_start */ + 0.0f, /* text_x_end */ + 0.0f, /* content_name_y */ + 0.0f, /* system_name_y */ + + 0.95f, /* bg_alpha */ + 0.5f, /* bg_underlay_alpha */ + 0.4f, /* bg_shadow_alpha */ + + COLOR_HEX_TO_FLOAT(0x000000, 1.0f), /* bg_color */ + COLOR_HEX_TO_FLOAT(0x505050, 1.0f), /* bg_underlay_color */ + COLOR_HEX_TO_FLOAT(0x000000, 0.0f), /* bg_shadow_top_color */ + COLOR_HEX_TO_FLOAT(0x000000, 0.0f), /* bg_shadow_bottom_color */ + COLOR_HEX_TO_FLOAT(0x000000, 0.0f), /* margin_shadow_left_color */ + COLOR_HEX_TO_FLOAT(0x000000, 0.0f), /* margin_shadow_right_color */ + COLOR_HEX_TO_FLOAT(0xE0E0E0, 1.0f), /* icon_color */ + + 0xE0E0E0FF, /* content_name_color */ + 0xCFCFCFFF, /* system_name_color */ +}; + +gfx_widget_load_content_animation_state_t *gfx_widget_load_content_animation_get_ptr(void) +{ + return &p_w_load_content_animation_st; +} + +/* Utilities */ + +static void gfx_widget_load_content_animation_reset(void) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + uintptr_t slide_offset_tag = (uintptr_t)&state->slide_offset; + + /* Kill any existing timers/animations */ + gfx_timer_kill(&state->timer); + gfx_animation_kill_by_tag(&alpha_tag); + gfx_animation_kill_by_tag(&slide_offset_tag); + + /* Reset pertinent state parameters */ + state->status = GFX_WIDGET_LOAD_CONTENT_IDLE; + state->alpha = 0.0f; + state->slide_offset = 0.0f; + state->content_name[0] = '\0'; + state->system_name[0] = '\0'; + state->icon_file[0] = '\0'; + state->has_icon = false; + state->content_name_width = 0; + state->system_name_width = 0; + + /* Unload any icon texture */ + if (state->icon_texture) + { + video_driver_texture_unload(&state->icon_texture); + state->icon_texture = 0; + } +} + +static void gfx_widget_load_content_animation_load_icon(void) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + /* In all cases, unload any existing icon texture */ + if (state->icon_texture) + { + video_driver_texture_unload(&state->icon_texture); + state->icon_texture = 0; + } + + /* If widget has a valid icon set, load it */ + if (state->has_icon) + gfx_display_reset_textures_list( + state->icon_file, state->icon_directory, + &state->icon_texture, + TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL); +} + +/* Callbacks */ + +static void gfx_widget_load_content_animation_fade_out_cb(void *userdata) +{ + /* Animation is complete - reset widget */ + gfx_widget_load_content_animation_reset(); +} + +static void gfx_widget_load_content_animation_wait_cb(void *userdata) +{ + gfx_widget_load_content_animation_state_t *state = (gfx_widget_load_content_animation_state_t*)userdata; + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + gfx_animation_ctx_entry_t animation_entry; + + /* Trigger fade out animation */ + state->alpha = 1.0f; + + animation_entry.easing_enum = EASING_OUT_QUAD; + animation_entry.tag = alpha_tag; + animation_entry.duration = LOAD_CONTENT_ANIMATION_FADE_OUT_DURATION; + animation_entry.target_value = 0.0f; + animation_entry.subject = &state->alpha; + animation_entry.cb = gfx_widget_load_content_animation_fade_out_cb; + animation_entry.userdata = NULL; + + gfx_animation_push(&animation_entry); + state->status = GFX_WIDGET_LOAD_CONTENT_FADE_OUT; +} + +static void gfx_widget_load_content_animation_slide_cb(void *userdata) +{ + gfx_widget_load_content_animation_state_t *state = (gfx_widget_load_content_animation_state_t*)userdata; + gfx_timer_ctx_entry_t timer; + + /* Start wait timer */ + timer.duration = LOAD_CONTENT_ANIMATION_WAIT_DURATION; + timer.cb = gfx_widget_load_content_animation_wait_cb; + timer.userdata = state; + + gfx_timer_start(&state->timer, &timer); + state->status = GFX_WIDGET_LOAD_CONTENT_WAIT; +} + +static void gfx_widget_load_content_animation_fade_in_cb(void *userdata) +{ + gfx_widget_load_content_animation_state_t *state = (gfx_widget_load_content_animation_state_t*)userdata; + uintptr_t slide_offset_tag = (uintptr_t)&state->slide_offset; + gfx_animation_ctx_entry_t animation_entry; + + /* Trigger slide animation */ + state->slide_offset = 0.0f; + + animation_entry.easing_enum = EASING_IN_OUT_QUAD; + animation_entry.tag = slide_offset_tag; + animation_entry.duration = LOAD_CONTENT_ANIMATION_SLIDE_DURATION; + animation_entry.target_value = 1.0f; + animation_entry.subject = &state->slide_offset; + animation_entry.cb = gfx_widget_load_content_animation_slide_cb; + animation_entry.userdata = state; + + gfx_animation_push(&animation_entry); + state->status = GFX_WIDGET_LOAD_CONTENT_SLIDE; +} + +/* Widget interface */ + +bool gfx_widget_start_load_content_animation(void) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + const char *content_path = path_get(RARCH_PATH_CONTENT); + const char *core_path = path_get(RARCH_PATH_CORE); + playlist_t *playlist = playlist_get_cached(); + + bool playlist_entry_found = false; + bool has_content = false; + bool has_system = false; + bool has_db_name = false; + + core_info_ctx_find_t core_info_finder; + char icon_path[PATH_MAX_LENGTH]; + + icon_path[0] = '\0'; + + /* To ensure we leave the widget in a well defined + * state, perform a reset before parsing variables */ + gfx_widget_load_content_animation_reset(); + + /* Sanity check - we require both content and + * core path + * > Note that we would prefer to enable the load + * content animation for 'content-less' cores as + * well, but allowing no content would mean we + * trigger a false positive every time the dummy + * core is started (this higher level behaviour is + * deeply ingrained in RetroArch, and too difficult + * to change...) */ + if (string_is_empty(content_path) || + string_is_empty(core_path) || + string_is_equal(core_path, "builtin")) + return false; + + /* Check core validity */ + core_info_finder.inf = NULL; + core_info_finder.path = core_path; + + if (!core_info_find(&core_info_finder)) + return false; + + core_path = core_info_finder.inf->path; + + /* Parse content path + * > If we have a cached playlist, attempt to find + * the entry label for the current content */ + if (playlist) + { + const struct playlist_entry *entry = NULL; +#ifdef HAVE_MENU + menu_handle_t *menu = menu_driver_get_ptr(); + + /* If we have an active menu, playlist entry + * index can be obtained directly */ + if (menu) + { + if (playlist_index_is_valid( + playlist, menu->rpl_entry_selection_ptr, + content_path, core_path)) + playlist_get_index( + playlist, menu->rpl_entry_selection_ptr, + &entry); + } + else +#endif + { + /* No menu - have to search playlist... */ + playlist_get_index_by_path(playlist, content_path, + &entry); + + if (entry && + !string_is_empty(entry->core_path)) + { + const char *entry_core_file = path_basename(entry->core_path); + + /* Check whether core matches... */ + if (string_is_empty(entry_core_file) || + !string_starts_with_size( + entry_core_file, + core_info_finder.inf->core_file_id.str, + core_info_finder.inf->core_file_id.len)) + entry = NULL; + } + } + + /* If playlist entry is valid, extract all + * available information */ + if (entry) + { + playlist_entry_found = true; + + /* Get entry label */ + if (!string_is_empty(entry->label)) + { + strlcpy(state->content_name, entry->label, + sizeof(state->content_name)); + has_content = true; + } + + /* Get entry db_name, */ + if (!string_is_empty(entry->db_name)) + { + strlcpy(state->system_name, entry->db_name, + sizeof(state->system_name)); + path_remove_extension(state->system_name); + + has_system = true; + has_db_name = true; + } + } + + /* If content was found in playlist but the entry + * did not have a db_name, use playlist name itself + * as the system name */ + if (playlist_entry_found && !has_system) + { + const char *playlist_path = playlist_get_conf_path(playlist); + + if (!string_is_empty(playlist_path)) + { + fill_pathname_base_noext(state->system_name, playlist_path, + sizeof(state->system_name)); + + /* Exclude history and favourites playlists */ + if (string_ends_with_size(state->system_name, "_history", + strlen(state->system_name), STRLEN_CONST("_history")) || + string_ends_with_size(state->system_name, "_favorites", + strlen(state->system_name), STRLEN_CONST("_favorites"))) + state->system_name[0] = '\0'; + + /* Check whether a valid system name was found */ + if (!string_is_empty(state->system_name)) + { + has_system = true; + has_db_name = true; + } + } + } + } + + /* If we haven't yet set the content name, + * use content file name as a fallback */ + if (!has_content) + fill_pathname_base_noext(state->content_name, content_path, + sizeof(state->content_name)); + + /* Check whether system name has been set */ + if (!has_system) + { + /* Use core display name, if available */ + if (!string_is_empty(core_info_finder.inf->display_name)) + strlcpy(state->system_name, core_info_finder.inf->display_name, + sizeof(state->system_name)); + /* Otherwise, just use 'RetroArch' as a fallback */ + else + strlcpy(state->system_name, "RetroArch", + sizeof(state->system_name)); + } + + /* > Content name has been determined + * > System name has been determined + * All that remains is the icon */ + + /* Get icon filename + * > Use db_name, if available */ + if (has_db_name) + { + strlcpy(state->icon_file, state->system_name, + sizeof(state->icon_file)); + strlcat(state->icon_file, ".png", + sizeof(state->icon_file)); + + fill_pathname_join(icon_path, + state->icon_directory, state->icon_file, + sizeof(icon_path)); + + state->has_icon = path_is_valid(icon_path); + } + + /* > If db_name is unavailable (or was extracted + * from a playlist with non-standard naming), + * try to extract a valid system from the core + * itself */ + if (!state->has_icon) + { + const char *core_db_name = NULL; + struct string_list *databases_list = + core_info_finder.inf->databases_list; + + /* We can only use the core db_name if the + * core is associated with exactly one database */ + if (databases_list && + (databases_list->size == 1)) + core_db_name = databases_list->elems[0].data; + + if (!string_is_empty(core_db_name) && + !string_is_equal(core_db_name, state->system_name)) + { + state->icon_file[0] = '\0'; + icon_path[0] = '\0'; + + strlcpy(state->icon_file, core_db_name, + sizeof(state->icon_file)); + strlcat(state->icon_file, ".png", + sizeof(state->icon_file)); + + fill_pathname_join(icon_path, + state->icon_directory, state->icon_file, + sizeof(icon_path)); + + state->has_icon = path_is_valid(icon_path); + } + } + + /* > If no system-specific icon is available, + * use default 'retroarch' icon as a fallback */ + if (!state->has_icon) + { + state->icon_file[0] = '\0'; + icon_path[0] = '\0'; + + strlcpy(state->icon_file, "retroarch.png", + sizeof(state->icon_file)); + + fill_pathname_join(icon_path, + state->icon_directory, state->icon_file, + sizeof(icon_path)); + + state->has_icon = path_is_valid(icon_path); + } + + /* All parameters are initialised + * > Signal that animation should begin */ + state->status = GFX_WIDGET_LOAD_CONTENT_BEGIN; + + return true; +} + +/* Widget layout() */ + +static void gfx_widget_load_content_animation_layout( + void *data, + bool is_threaded, const char *dir_assets, char *font_path) +{ + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data; + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget); + unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget); + unsigned widget_padding = gfx_widgets_get_padding(p_dispwidget); + + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + gfx_widget_font_data_t *font_bold = gfx_widgets_get_font_bold(p_dispwidget); + + /* Icon layout */ + state->icon_size = (unsigned)((((float)font_regular->line_height + + (float)font_bold->line_height) * 1.6f) + 0.5f); + state->icon_x_start = (float)(last_video_width - state->icon_size) * 0.5f; + state->icon_y = (float)(last_video_height - state->icon_size) * 0.5f; + /* > Note: cannot determine state->icon_x_end + * until text strings are set */ + + /* Background layout */ + state->bg_width = last_video_width; + state->bg_height = state->icon_size + (widget_padding * 2); + state->bg_x = 0.0f; + state->bg_y = (float)(last_video_height - state->bg_height) * 0.5f; + + /* Background shadow layout */ + state->bg_shadow_height = (unsigned)((float)state->bg_height * 0.3f); + state->bg_shadow_top_y = state->bg_y - (float)state->bg_shadow_height; + state->bg_shadow_bottom_y = state->bg_y + (float)state->bg_height; + + /* Margin shadow layout */ + state->margin_shadow_width = widget_padding; + state->margin_shadow_left_x = 0.0f; + state->margin_shadow_right_x = (float)(last_video_width - widget_padding); + + /* Text layout */ + state->text_x_start = state->icon_x_start + + (float)(state->icon_size + widget_padding); + state->content_name_y = state->icon_y + + ((float)state->icon_size * 0.3f) + + (float)font_bold->line_centre_offset; + state->system_name_y = state->icon_y + + ((float)state->icon_size * 0.7f) + + (float)font_regular->line_centre_offset; + /* > Note: cannot determine state->text_x_end + * until text strings are set */ +} + +/* Widget iterate() */ + +static void gfx_widget_load_content_animation_iterate(void *user_data, + unsigned width, unsigned height, bool fullscreen, + const char *dir_assets, char *font_path, + bool is_threaded) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + if (state->status == GFX_WIDGET_LOAD_CONTENT_BEGIN) + { + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)user_data; + + unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget); + unsigned widget_padding = gfx_widgets_get_padding(p_dispwidget); + + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + gfx_widget_font_data_t *font_bold = gfx_widgets_get_font_bold(p_dispwidget); + + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + + int content_name_width; + int system_name_width; + int text_width; + gfx_animation_ctx_entry_t animation_entry; + + /* Load icon texture */ + gfx_widget_load_content_animation_load_icon(); + + /* Get overall text width */ + content_name_width = font_driver_get_message_width( + font_bold->font, state->content_name, + (unsigned)strlen(state->content_name), 1.0f); + system_name_width = font_driver_get_message_width( + font_regular->font, state->system_name, + (unsigned)strlen(state->system_name), 1.0f); + + state->content_name_width = (content_name_width > 0) ? + (unsigned)content_name_width : 0; + state->system_name_width = (system_name_width > 0) ? + (unsigned)system_name_width : 0; + + text_width = (state->content_name_width > state->system_name_width) ? + (int)state->content_name_width : (int)state->system_name_width; + + /* Now we have the text width, can determine + * final icon/text x draw positions */ + state->icon_x_end = ((int)last_video_width - text_width - + (int)state->icon_size - (3 * (int)widget_padding)) >> 1; + state->icon_x_end = state->icon_x_end < (int)widget_padding ? + widget_padding : state->icon_x_end; + + state->text_x_end = state->icon_x_end + + (float)(state->icon_size + widget_padding); + + /* Trigger fade in animation */ + state->alpha = 0.0f; + + animation_entry.easing_enum = EASING_OUT_QUAD; + animation_entry.tag = alpha_tag; + animation_entry.duration = LOAD_CONTENT_ANIMATION_FADE_IN_DURATION; + animation_entry.target_value = 1.0f; + animation_entry.subject = &state->alpha; + animation_entry.cb = gfx_widget_load_content_animation_fade_in_cb; + animation_entry.userdata = state; + + gfx_animation_push(&animation_entry); + state->status = GFX_WIDGET_LOAD_CONTENT_FADE_IN; + } +} + +/* Widget frame() */ + +static void gfx_widget_load_content_animation_frame(void *data, void *user_data) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + if (state->status != GFX_WIDGET_LOAD_CONTENT_IDLE) + { + video_frame_info_t *video_info = (video_frame_info_t*)data; + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)user_data; + + unsigned video_width = video_info->width; + unsigned video_height = video_info->height; + void *userdata = video_info->userdata; + + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + gfx_widget_font_data_t *font_bold = gfx_widgets_get_font_bold(p_dispwidget); + size_t msg_queue_size = gfx_widgets_get_msg_queue_size(p_dispwidget); + + float bg_alpha; + float icon_alpha; + float text_alpha; + + float icon_x; + float text_x; + +#ifdef HAVE_MENU + /* Draw nothing if menu is currently active */ + if (menu_driver_is_alive()) + return; +#endif + + /* Determine status-dependent opacity/position + * values */ + switch (state->status) + { + case GFX_WIDGET_LOAD_CONTENT_FADE_IN: + bg_alpha = 1.0f; + icon_alpha = state->alpha; + text_alpha = 0.0f; + icon_x = state->icon_x_start; + text_x = state->text_x_start; + break; + case GFX_WIDGET_LOAD_CONTENT_SLIDE: + bg_alpha = 1.0f; + icon_alpha = 1.0f; + /* Use 'slide_offset' as the alpha value + * > Saves having to trigger two animations */ + text_alpha = state->slide_offset; + icon_x = state->icon_x_start + (state->slide_offset * + (state->icon_x_end - state->icon_x_start)); + text_x = state->text_x_start + (state->slide_offset * + (state->text_x_end - state->text_x_start)); + break; + case GFX_WIDGET_LOAD_CONTENT_WAIT: + bg_alpha = 1.0f; + icon_alpha = 1.0f; + text_alpha = 1.0f; + icon_x = state->icon_x_end; + text_x = state->text_x_end; + break; + case GFX_WIDGET_LOAD_CONTENT_FADE_OUT: + bg_alpha = state->alpha; + icon_alpha = state->alpha; + text_alpha = state->alpha; + icon_x = state->icon_x_end; + text_x = state->text_x_end; + break; + case GFX_WIDGET_LOAD_CONTENT_BEGIN: + default: + bg_alpha = 1.0f; + icon_alpha = 0.0f; + text_alpha = 0.0f; + icon_x = state->icon_x_start; + text_x = state->text_x_start; + break; + } + + /* Draw background */ + if (bg_alpha > 0.0f) + { + /* > Set opacity */ + state->bg_shadow_top_color[3] = bg_alpha * state->bg_shadow_alpha; + state->bg_shadow_top_color[7] = bg_alpha * state->bg_shadow_alpha; + state->bg_shadow_bottom_color[11] = bg_alpha * state->bg_shadow_alpha; + state->bg_shadow_bottom_color[15] = bg_alpha * state->bg_shadow_alpha; + + gfx_display_set_alpha(state->bg_color, bg_alpha * state->bg_alpha); + gfx_display_set_alpha(state->bg_underlay_color, + bg_alpha * state->bg_underlay_alpha); + + /* > Background underlay */ + gfx_display_draw_quad( + userdata, + video_width, + video_height, + 0, + 0, + video_width, + video_height, + video_width, + video_height, + state->bg_underlay_color); + + /* > Background shadow */ + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->bg_x, + state->bg_shadow_top_y, + state->bg_width, + state->bg_shadow_height, + video_width, + video_height, + state->bg_shadow_top_color); + + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->bg_x, + state->bg_shadow_bottom_y, + state->bg_width, + state->bg_shadow_height, + video_width, + video_height, + state->bg_shadow_bottom_color); + + /* > Background */ + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->bg_x, + state->bg_y, + state->bg_width, + state->bg_height, + video_width, + video_height, + state->bg_color); + } + + /* Draw icon */ + if (icon_alpha > 0.0f) + { + gfx_display_set_alpha(state->icon_color, icon_alpha); + + if (state->icon_texture) + { + gfx_display_blend_begin(userdata); + + gfx_widgets_draw_icon( + userdata, + video_width, + video_height, + state->icon_size, + state->icon_size, + state->icon_texture, + icon_x, + state->icon_y, + 0.0f, + 1.0f, + state->icon_color); + + gfx_display_blend_end(userdata); + } + /* If there is no icon, draw a placeholder + * (otherwise layout will look terrible...) */ + else + gfx_display_draw_quad( + userdata, + video_width, + video_height, + icon_x, + state->icon_y, + state->icon_size, + state->icon_size, + video_width, + video_height, + state->icon_color); + } + + /* Draw text */ + if (text_alpha > 0.0f) + { + unsigned text_alpha_int = (unsigned)(text_alpha * 255.0f); + + /* > Set opacity */ + state->content_name_color = COLOR_TEXT_ALPHA(state->content_name_color, + text_alpha_int); + state->system_name_color = COLOR_TEXT_ALPHA(state->system_name_color, + text_alpha_int); + + /* > Content name */ + gfx_widgets_draw_text( + font_bold, + state->content_name, + text_x, + state->content_name_y, + video_width, + video_height, + state->content_name_color, + TEXT_ALIGN_LEFT, + true); + + /* > System name */ + gfx_widgets_draw_text( + font_regular, + state->system_name, + text_x, + state->system_name_y, + video_width, + video_height, + state->system_name_color, + TEXT_ALIGN_LEFT, + true); + + /* If the message queue is active, must flush the + * text here to avoid overlaps */ + if (msg_queue_size > 0) + { + gfx_widgets_flush_text(video_width, video_height, font_regular); + gfx_widgets_flush_text(video_width, video_height, font_bold); + } + /* Must also flush text if it overlaps the edge of + * the screen (otherwise it will bleed through the + * 'margin' shadows) */ + else + { + if (state->system_name_width > video_width - + (unsigned)text_x - state->margin_shadow_width) + gfx_widgets_flush_text(video_width, video_height, font_regular); + + if (state->content_name_width > video_width - + (unsigned)text_x - state->margin_shadow_width) + gfx_widgets_flush_text(video_width, video_height, font_bold); + } + } + + /* Draw 'margin' shadows + * > This ensures rendered text is cleanly + * truncated when it exceeds the width of + * the screen */ + if (bg_alpha > 0.0f) + { + /* > Set opacity */ + state->margin_shadow_left_color[3] = bg_alpha; + state->margin_shadow_left_color[11] = bg_alpha; + state->margin_shadow_right_color[7] = bg_alpha; + state->margin_shadow_right_color[15] = bg_alpha; + + /* > Left */ + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->margin_shadow_left_x, + state->bg_y, + state->margin_shadow_width, + state->bg_height, + video_width, + video_height, + state->margin_shadow_left_color); + + /* > Right */ + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->margin_shadow_right_x, + state->bg_y, + state->margin_shadow_width, + state->bg_height, + video_width, + video_height, + state->margin_shadow_right_color); + } + } +} + +/* Widget context_reset() */ + +static void gfx_widget_load_content_animation_context_reset( + bool is_threaded, + unsigned width, unsigned height, bool fullscreen, + const char *dir_assets, char *font_path, + char* menu_png_path, + char* widgets_png_path) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + /* Cache icon directory */ + if (string_is_empty(menu_png_path)) + state->icon_directory[0] = '\0'; + else + strlcpy(state->icon_directory, menu_png_path, + sizeof(state->icon_directory)); + + /* Reload icon texture */ + gfx_widget_load_content_animation_load_icon(); +} + +/* Widget context_destroy() */ + +static void gfx_widget_load_content_animation_context_destroy(void) +{ + gfx_widget_load_content_animation_state_t *state = gfx_widget_load_content_animation_get_ptr(); + + /* Unload any icon texture */ + if (state->icon_texture) + { + video_driver_texture_unload(&state->icon_texture); + state->icon_texture = 0; + } +} + +/* Widget free() */ + +static void gfx_widget_load_content_animation_free(void) +{ + gfx_widget_load_content_animation_reset(); +} + +/* Widget definition */ + +const gfx_widget_t gfx_widget_load_content_animation = { + NULL, /* init */ + gfx_widget_load_content_animation_free, + gfx_widget_load_content_animation_context_reset, + gfx_widget_load_content_animation_context_destroy, + gfx_widget_load_content_animation_layout, + gfx_widget_load_content_animation_iterate, + gfx_widget_load_content_animation_frame +}; diff --git a/gfx/widgets/gfx_widget_progress_message.c b/gfx/widgets/gfx_widget_progress_message.c new file mode 100644 index 0000000000..1616370643 --- /dev/null +++ b/gfx/widgets/gfx_widget_progress_message.c @@ -0,0 +1,342 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2014-2017 - Jean-André Santoni + * Copyright (C) 2015-2018 - Andre Leiradella + * Copyright (C) 2018-2020 - natinusala + * + * 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 . + */ + +#include "../gfx_widgets.h" +#include "../gfx_animation.h" +#include "../gfx_display.h" +#include "../../retroarch.h" + +/* Widget state */ + +struct gfx_widget_progress_message_state +{ + gfx_timer_t timer; + float alpha; + bool active; + + unsigned widget_width; + unsigned widget_height; + float widget_x; + float widget_y; + + unsigned text_width; + float text_x; + float text_y; + + unsigned bar_bg_width; + unsigned bar_bg_height; + float bar_bg_x; + float bar_bg_y; + + unsigned bar_max_width; + unsigned bar_height; + float bar_x; + float bar_y; + + unsigned priority; + int8_t progress; + char message[256]; + + float bar_bg_color[16]; + float bar_color[16]; + float bar_disabled_color[16]; +}; + +typedef struct gfx_widget_progress_message_state gfx_widget_progress_message_state_t; + +static gfx_widget_progress_message_state_t p_w_progress_message_st = { + + 0.0f, /* timer */ + 0.0f, /* alpha */ + false, /* active */ + + 0, /* widget_width */ + 0, /* widget_height */ + 0.0f, /* widget_x */ + 0.0f, /* widget_y */ + + 0, /* text_width */ + 0.0f, /* text_x */ + 0.0f, /* text_y */ + + 0, /* bar_bg_width */ + 0, /* bar_bg_height */ + 0.0f, /* float bar_bg_x */ + 0.0f, /* float bar_bg_y */ + + 0, /* bar_max_width */ + 0, /* bar_height */ + 0.0f, /* bar_x */ + 0.0f, /* bar_y */ + + 0, /* priority */ + -1, /* progress */ + {'\0'}, /* message */ + + COLOR_HEX_TO_FLOAT(0x3A3A3A, 1.0f), /* bar_bg_color */ + COLOR_HEX_TO_FLOAT(0x198AC6, 1.0f), /* bar_color */ + COLOR_HEX_TO_FLOAT(0x000000, 1.0f), /* bar_disabled_color */ +}; + +gfx_widget_progress_message_state_t *gfx_widget_progress_message_get_ptr(void) +{ + return &p_w_progress_message_st; +} + +/* Callbacks */ + +static void gfx_widget_progress_message_fadeout_cb(void *userdata) +{ + gfx_widget_progress_message_state_t *state = (gfx_widget_progress_message_state_t*)userdata; + + /* Deactivate widget */ + state->active = false; +} + +static void gfx_widget_progress_message_fadeout(void *userdata) +{ + gfx_animation_ctx_entry_t animation_entry; + gfx_widget_progress_message_state_t *state = (gfx_widget_progress_message_state_t*)userdata; + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + + /* Trigger fade out animation */ + animation_entry.easing_enum = EASING_OUT_QUAD; + animation_entry.tag = alpha_tag; + animation_entry.duration = MSG_QUEUE_ANIMATION_DURATION; + animation_entry.target_value = 0.0f; + animation_entry.subject = &state->alpha; + animation_entry.cb = gfx_widget_progress_message_fadeout_cb; + animation_entry.userdata = state; + + gfx_animation_push(&animation_entry); +} + +/* Widget interface */ + +void gfx_widget_set_progress_message(void *data, + const char *message, unsigned duration, + unsigned priority, int8_t progress) +{ + gfx_timer_ctx_entry_t timer; + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data; + gfx_widget_progress_message_state_t *state = gfx_widget_progress_message_get_ptr(); + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + + /* Ensure we have a valid message string */ + if (string_is_empty(message)) + return; + + /* If widget is currently active, ignore new + * message if it has a lower priority */ + if (state->active && (state->priority > priority)) + return; + + /* Cache message parameters */ + strlcpy(state->message, message, sizeof(state->message)); + state->priority = priority; + state->progress = progress; + + /* Cache text width */ + state->text_width = font_driver_get_message_width( + font_regular->font, + state->message, + (unsigned)strlen(state->message), + 1.0f); + + /* Kill any existing timer/animation */ + gfx_timer_kill(&state->timer); + gfx_animation_kill_by_tag(&alpha_tag); + + /* Start new message timer */ + timer.duration = duration; + timer.cb = gfx_widget_progress_message_fadeout; + timer.userdata = state; + + gfx_timer_start(&state->timer, &timer); + + /* Set initial widget opacity */ + state->alpha = 1.0f; + + /* Set 'active' flag */ + state->active = true; +} + +/* Widget layout() */ + +static void gfx_widget_progress_message_layout( + void *data, + bool is_threaded, const char *dir_assets, char *font_path) +{ + float bar_padding; + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)data; + gfx_widget_progress_message_state_t *state = gfx_widget_progress_message_get_ptr(); + unsigned last_video_width = gfx_widgets_get_last_video_width(p_dispwidget); + unsigned last_video_height = gfx_widgets_get_last_video_height(p_dispwidget); + unsigned widget_padding = gfx_widgets_get_padding(p_dispwidget); + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + + /* Base widget layout */ + state->widget_width = last_video_width; + state->widget_height = (unsigned)(((float)font_regular->line_height * 3.3f) + 0.5f); + state->widget_x = 0.0f; + state->widget_y = (float)(last_video_height - state->widget_height); + + /* Text layout */ + state->text_x = (float)last_video_width / 2.0f; + state->text_y = (float)(last_video_height - + font_regular->line_height + font_regular->line_centre_offset); + + /* Progress bar layout */ + state->bar_bg_width = last_video_width - (2 * widget_padding); + state->bar_bg_height = (unsigned)(((float)font_regular->line_height * 0.7f) + 0.5f); + state->bar_bg_x = (float)widget_padding; + state->bar_bg_y = (float)last_video_height - + (float)state->widget_height + + (((float)state->widget_height - (font_regular->line_height * 1.5f)) * 0.5f) - + ((float)state->bar_bg_height * 0.5f); + + state->bar_height = (unsigned)(((float)font_regular->line_height * 0.5f) + 0.5f); + bar_padding = (float)(state->bar_bg_height - state->bar_height) * 0.5f; + state->bar_max_width = state->bar_bg_width - (unsigned)((bar_padding * 2.0f) + 0.5f); + state->bar_x = state->bar_bg_x + bar_padding; + state->bar_y = state->bar_bg_y + bar_padding; +} + +/* Widget frame() */ + +static void gfx_widget_progress_message_frame(void *data, void *user_data) +{ + gfx_widget_progress_message_state_t *state = gfx_widget_progress_message_get_ptr(); + + if (state->active) + { + video_frame_info_t *video_info = (video_frame_info_t*)data; + dispgfx_widget_t *p_dispwidget = (dispgfx_widget_t*)user_data; + + unsigned video_width = video_info->width; + unsigned video_height = video_info->height; + void *userdata = video_info->userdata; + + float *backdrop_color = gfx_widgets_get_backdrop_orig(); + unsigned text_color = COLOR_TEXT_ALPHA(0xFFFFFFFF, (unsigned)(state->alpha * 255.0f)); + + gfx_widget_font_data_t *font_regular = gfx_widgets_get_font_regular(p_dispwidget); + size_t msg_queue_size = gfx_widgets_get_msg_queue_size(p_dispwidget); + + unsigned bar_width = state->bar_max_width; + float *bar_color = state->bar_disabled_color; + + /* Draw backdrop */ + gfx_display_set_alpha(backdrop_color, state->alpha * DEFAULT_BACKDROP); + + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->widget_x, + state->widget_y, + state->widget_width, + state->widget_height, + video_width, + video_height, + backdrop_color); + + /* Draw progress bar background */ + gfx_display_set_alpha(state->bar_bg_color, state->alpha); + + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->bar_bg_x, + state->bar_bg_y, + state->bar_bg_width, + state->bar_bg_height, + video_width, + video_height, + state->bar_bg_color); + + /* Draw progress bar */ + if (state->progress >= 0) + { + bar_width = (unsigned)((((float)state->progress / 100.0f) * (float)state->bar_max_width) + 0.5f); + bar_width = (bar_width > state->bar_max_width) ? state->bar_max_width : bar_width; + + bar_color = state->bar_color; + } + + gfx_display_set_alpha(bar_color, state->alpha); + + gfx_display_draw_quad( + userdata, + video_width, + video_height, + state->bar_x, + state->bar_y, + bar_width, + state->bar_height, + video_width, + video_height, + bar_color); + + /* Draw message text */ + gfx_widgets_draw_text( + font_regular, + state->message, + state->text_x, + state->text_y, + video_width, + video_height, + text_color, + TEXT_ALIGN_CENTER, + true); + + /* If the message queue is active, must flush the + * text here to avoid overlaps */ + if (msg_queue_size > 0) + gfx_widgets_flush_text(video_width, video_height, font_regular); + } +} + +/* Widget free() */ + +static void gfx_widget_progress_message_free(void) +{ + gfx_widget_progress_message_state_t *state = gfx_widget_progress_message_get_ptr(); + uintptr_t alpha_tag = (uintptr_t)&state->alpha; + + /* Kill any existing timer / animation */ + gfx_timer_kill(&state->timer); + gfx_animation_kill_by_tag(&alpha_tag); + + /* Deactivate widget */ + state->alpha = 0.0f; + state->active = false; +} + +/* Widget definition */ + +const gfx_widget_t gfx_widget_progress_message = { + NULL, /* init */ + gfx_widget_progress_message_free, + NULL, /* context_reset*/ + NULL, /* context_destroy */ + gfx_widget_progress_message_layout, + NULL, /* iterate */ + gfx_widget_progress_message_frame +}; diff --git a/gfx/widgets/gfx_widget_screenshot.c b/gfx/widgets/gfx_widget_screenshot.c index edb81c5da7..f24103b7fc 100644 --- a/gfx/widgets/gfx_widget_screenshot.c +++ b/gfx/widgets/gfx_widget_screenshot.c @@ -189,7 +189,6 @@ static void gfx_widget_screenshot_frame(void* data, void *user_data) state->thumbnail_height, state->texture, 0, state->y, - video_width, video_height, 0, 1, pure_white ); diff --git a/gfx/widgets/gfx_widget_volume.c b/gfx/widgets/gfx_widget_volume.c index 16d8bfcd60..c853785f19 100644 --- a/gfx/widgets/gfx_widget_volume.c +++ b/gfx/widgets/gfx_widget_volume.c @@ -196,7 +196,6 @@ static void gfx_widget_volume_frame(void* data, void *user_data) icon_size, icon_size, volume_icon, 0, 0, - video_width, video_height, 0, 1, pure_white ); gfx_display_blend_end(userdata); diff --git a/griffin/griffin.c b/griffin/griffin.c index 8f28970817..f69561bb59 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -152,8 +152,10 @@ CONFIG FILE #undef strcasecmp #endif +#ifdef HAVE_CONFIGFILE #include "../libretro-common/file/config_file.c" #include "../libretro-common/file/config_file_userdata.c" +#endif /*============================================================ CONTENT METADATA RECORDS @@ -206,7 +208,9 @@ MD5 /*============================================================ CHEATS ============================================================ */ +#ifdef HAVE_CHEATS #include "../managers/cheat_manager.c" +#endif #include "../libretro-common/hash/rhash.c" /*============================================================ @@ -226,11 +230,8 @@ VIDEO CONTEXT #if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_VULKAN) || defined(HAVE_OPENGLES) #include "../gfx/drivers_context/wgl_ctx.c" #endif - -#if defined(_WIN32) && !defined(_XBOX) && !defined(__WINRT__) -#ifdef HAVE_GDI -#include "../gfx/drivers_context/gdi_ctx.c" -#endif +#if defined(HAVE_VULKAN) +#include "../gfx/drivers_context/w_vk_ctx.c" #endif #include "../gfx/display_servers/dispserv_win32.c" @@ -247,6 +248,9 @@ VIDEO CONTEXT #include "../gfx/drivers_context/ps3_ctx.c" #elif defined(ANDROID) #include "../gfx/drivers_context/android_ctx.c" +#if defined(HAVE_VULKAN) +#include "../gfx/drivers_context/android_vk_ctx.c" +#endif #include "../gfx/display_servers/dispserv_android.c" #elif defined(__QNX__) #include "../gfx/drivers_context/qnx_ctx.c" @@ -266,6 +270,9 @@ VIDEO CONTEXT #ifdef HAVE_WAYLAND #include "../gfx/drivers_context/wayland_ctx.c" +#ifdef HAVE_VULKAN +#include "../gfx/drivers_context/wayland_vk_ctx.c" +#endif #endif #ifdef HAVE_DRM @@ -315,6 +322,10 @@ VIDEO CONTEXT #include "../gfx/drivers_context/x_ctx.c" #endif +#ifdef HAVE_VULKAN +#include "../gfx/drivers_context/x_vk_ctx.c" +#endif + #ifdef HAVE_EGL #include "../gfx/drivers_context/xegl_ctx.c" #endif @@ -369,7 +380,9 @@ VIDEO IMAGE #endif #include "../libretro-common/formats/bmp/rbmp_encode.c" +#ifdef HAVE_RWAV #include "../libretro-common/formats/wav/rwav.c" +#endif /*============================================================ VIDEO DRIVER @@ -632,9 +645,6 @@ INPUT #include "../tasks/task_audio_mixer.c" #endif #include "../input/input_keymaps.c" -#ifdef HAVE_CONFIGFILE -#include "../input/input_remapping.c" -#endif #ifdef HAVE_OVERLAY #include "../led/drivers/led_overlay.c" @@ -646,9 +656,11 @@ INPUT #endif #if defined(_WIN32) && !defined(_XBOX) && _WIN32_WINNT >= 0x0501 && !defined(__WINRT__) +#ifdef HAVE_WINRAWINPUT /* winraw only available since XP */ #include "../input/drivers/winraw_input.c" #endif +#endif #include "../input/input_autodetect_builtin.c" @@ -711,6 +723,7 @@ INPUT #endif #ifdef HAVE_WAYLAND +#include "../input/common/wayland_common.c" #include "../input/drivers/wayland_input.c" #endif @@ -796,7 +809,9 @@ AUDIO RESAMPLER ============================================================ */ #include "../libretro-common/audio/resampler/audio_resampler.c" #include "../libretro-common/audio/resampler/drivers/sinc_resampler.c" +#ifdef HAVE_NEAREST_RESAMPLER #include "../libretro-common/audio/resampler/drivers/nearest_resampler.c" +#endif #ifdef HAVE_CC_RESAMPLER #include "../audio/drivers_resampler/cc_resampler.c" #endif @@ -945,8 +960,8 @@ SCALERS /*============================================================ FILTERS ============================================================ */ - #ifdef HAVE_FILTERS_BUILTIN +#ifdef HAVE_VIDEO_FILTER #include "../gfx/video_filters/2xsai.c" #include "../gfx/video_filters/super2xsai.c" #include "../gfx/video_filters/supereagle.c" @@ -959,7 +974,9 @@ FILTERS #include "../gfx/video_filters/phosphor2x.c" #include "../gfx/video_filters/normal2x.c" #include "../gfx/video_filters/scanline2x.c" +#endif +#ifdef HAVE_DSP_FILTER #include "../libretro-common/audio/dsp_filters/echo.c" #include "../libretro-common/audio/dsp_filters/eq.c" #include "../libretro-common/audio/dsp_filters/chorus.c" @@ -969,13 +986,18 @@ FILTERS #include "../libretro-common/audio/dsp_filters/reverb.c" #include "../libretro-common/audio/dsp_filters/wahwah.c" #endif +#endif /*============================================================ DYNAMIC ============================================================ */ #include "../libretro-common/dynamic/dylib.c" +#ifdef HAVE_VIDEO_FILTER #include "../gfx/video_filter.c" +#endif +#ifdef HAVE_DSP_FILTER #include "../libretro-common/audio/dsp_filter.c" +#endif /*============================================================ CORES @@ -1046,7 +1068,9 @@ CONFIGURATION /*============================================================ STATE MANAGER ============================================================ */ +#ifdef HAVE_REWIND #include "../managers/state_manager.c" +#endif /*============================================================ FRONTEND @@ -1155,6 +1179,16 @@ RETROARCH #include "../intl/msg_hash_us.c" +/*============================================================ +BLUETOOTH +============================================================ */ +#ifdef HAVE_BLUETOOTH +#include "../bluetooth/drivers/bluetoothctl.c" +#ifdef HAVE_DBUS +#include "../bluetooth/drivers/bluez.c" +#endif +#endif + /*============================================================ WIFI ============================================================ */ @@ -1229,6 +1263,7 @@ NETPLAY #include "../tasks/task_http.c" #include "../tasks/task_netplay_lan_scan.c" #include "../tasks/task_netplay_nat_traversal.c" +#include "../tasks/task_bluetooth.c" #include "../tasks/task_wifi.c" #include "../tasks/task_netplay_find_content.c" #include "../tasks/task_pl_thumbnail_download.c" @@ -1239,7 +1274,9 @@ DATA RUNLOOP ============================================================ */ #include "../tasks/task_powerstate.c" #include "../tasks/task_content.c" +#ifdef HAVE_PATCH #include "../tasks/task_patch.c" +#endif #include "../tasks/task_save.c" #include "../tasks/task_image.c" #include "../tasks/task_file_transfer.c" @@ -1260,7 +1297,9 @@ DATA RUNLOOP /*============================================================ SCREENSHOTS ============================================================ */ +#ifdef HAVE_SCREENSHOTS #include "../tasks/task_screenshot.c" +#endif /*============================================================ PLAYLISTS @@ -1272,13 +1311,17 @@ MENU ============================================================ */ #ifdef HAVE_GFX_WIDGETS #include "../gfx/gfx_widgets.c" +#ifdef HAVE_SCREENSHOTS #include "../gfx/widgets/gfx_widget_screenshot.c" +#endif #include "../gfx/widgets/gfx_widget_volume.c" #include "../gfx/widgets/gfx_widget_generic_message.c" #include "../gfx/widgets/gfx_widget_libretro_message.c" +#include "../gfx/widgets/gfx_widget_progress_message.c" #ifdef HAVE_CHEEVOS #include "../gfx/widgets/gfx_widget_achievement_popup.c" #endif +#include "../gfx/widgets/gfx_widget_load_content_animation.c" #endif #ifdef HAVE_MENU @@ -1288,9 +1331,6 @@ MENU #include "../menu/menu_networking.c" #endif -#include "../menu/widgets/menu_filebrowser.c" -#include "../menu/widgets/menu_dialog.c" -#include "../menu/widgets/menu_input_bind_dialog.c" #include "../menu/cbs/menu_cbs_ok.c" #include "../menu/cbs/menu_cbs_cancel.c" #include "../menu/cbs/menu_cbs_select.c" @@ -1518,27 +1558,20 @@ SSL #include "../deps/mbedtls/ccm.c" #include "../deps/mbedtls/cipher.c" #include "../deps/mbedtls/cipher_wrap.c" -#include "../deps/mbedtls/cmac.c" #include "../deps/mbedtls/ctr_drbg.c" #include "../deps/mbedtls/des.c" #include "../deps/mbedtls/dhm.c" #include "../deps/mbedtls/ecdh.c" #include "../deps/mbedtls/ecdsa.c" -#include "../deps/mbedtls/ecjpake.c" #include "../deps/mbedtls/ecp.c" #include "../deps/mbedtls/ecp_curves.c" #include "../deps/mbedtls/entropy.c" #include "../deps/mbedtls/entropy_poll.c" -#include "../deps/mbedtls/error.c" #include "../deps/mbedtls/gcm.c" -#include "../deps/mbedtls/havege.c" #include "../deps/mbedtls/hmac_drbg.c" #include "../deps/mbedtls/md.c" -#include "../deps/mbedtls/md2.c" -#include "../deps/mbedtls/md4.c" #include "../deps/mbedtls/md5.c" #include "../deps/mbedtls/md_wrap.c" -#include "../deps/mbedtls/memory_buffer_alloc.c" #include "../deps/mbedtls/oid.c" #include "../deps/mbedtls/padlock.c" #include "../deps/mbedtls/pem.c" @@ -1548,7 +1581,6 @@ SSL #include "../deps/mbedtls/pkcs5.c" #include "../deps/mbedtls/pkparse.c" #include "../deps/mbedtls/pkwrite.c" -#include "../deps/mbedtls/platform.c" #include "../deps/mbedtls/ripemd160.c" #include "../deps/mbedtls/rsa.c" #include "../deps/mbedtls/sha1.c" @@ -1556,12 +1588,9 @@ SSL #include "../deps/mbedtls/sha512.c" #include "../deps/mbedtls/threading.c" #include "../deps/mbedtls/timing.c" -#include "../deps/mbedtls/version.c" -#include "../deps/mbedtls/version_features.c" #include "../deps/mbedtls/xtea.c" #include "../deps/mbedtls/certs.c" -#include "../deps/mbedtls/pkcs11.c" #include "../deps/mbedtls/x509.c" #include "../deps/mbedtls/x509_create.c" #include "../deps/mbedtls/x509_crl.c" diff --git a/griffin/griffin_glslang.cpp b/griffin/griffin_glslang.cpp index 6cfdc24ede..ddd9d7f5be 100644 --- a/griffin/griffin_glslang.cpp +++ b/griffin/griffin_glslang.cpp @@ -9,13 +9,10 @@ #endif #include "../gfx/drivers_shader/glslang.cpp" -#include "../deps/glslang/glslang/SPIRV/disassemble.cpp" -#include "../deps/glslang/glslang/SPIRV/doc.cpp" #include "../deps/glslang/glslang/SPIRV/GlslangToSpv.cpp" #include "../deps/glslang/glslang/SPIRV/InReadableOrder.cpp" #include "../deps/glslang/glslang/SPIRV/Logger.cpp" #include "../deps/glslang/glslang/SPIRV/SpvBuilder.cpp" -#include "../deps/glslang/glslang/SPIRV/SPVRemapper.cpp" #include "../deps/glslang/glslang/glslang/GenericCodeGen/CodeGen.cpp" #include "../deps/glslang/glslang/glslang/GenericCodeGen/Link.cpp" diff --git a/input/common/hid/device_ds3.c b/input/common/hid/device_ds3.c index cb3b01b736..65b8235676 100644 --- a/input/common/hid/device_ds3.c +++ b/input/common/hid/device_ds3.c @@ -333,13 +333,16 @@ static const char *ds3_get_name(void *data) return "Sony DualShock 3"; } -static bool ds3_button(void *data, uint16_t joykey) +static int16_t ds3_button(void *data, uint16_t joykey) { - ds3_instance_t *pad = (ds3_instance_t *)data; - if(!pad || joykey > 31) - return false; + ds3_instance_t *pad = (ds3_instance_t *)data; - return pad->buttons & (1 << joykey); + if (!pad) + return 0; + if (joykey < 31) + if (pad->buttons & (1 << joykey)) + ret |= (1 << joykey); + return 0; } pad_connection_interface_t ds3_pad_connection = { diff --git a/input/common/hid/device_ds4.c b/input/common/hid/device_ds4.c index af923cee13..42ce345083 100644 --- a/input/common/hid/device_ds4.c +++ b/input/common/hid/device_ds4.c @@ -137,9 +137,9 @@ static const char *ds4_get_name(void *data) return "Sony DualShock 4"; } -static bool ds4_button(void *data, uint16_t joykey) +static int16_t ds4_button(void *data, uint16_t joykey) { - return false; + return 0; } pad_connection_interface_t ds4_pad_connection = { diff --git a/input/common/hid/device_null.c b/input/common/hid/device_null.c index 13ba395ada..947f2720c2 100644 --- a/input/common/hid/device_null.c +++ b/input/common/hid/device_null.c @@ -200,9 +200,9 @@ static const char *hid_null_get_name(void *data) /** * Read the state of a single button. */ -static bool hid_null_button(void *data, uint16_t joykey) +static int16_t hid_null_button(void *data, uint16_t joykey) { - return false; + return 0; } /** diff --git a/input/common/hid/device_wiiu_gca.c b/input/common/hid/device_wiiu_gca.c index 8d6e713434..534af65028 100644 --- a/input/common/hid/device_wiiu_gca.c +++ b/input/common/hid/device_wiiu_gca.c @@ -341,14 +341,15 @@ static const char *wiiu_gca_get_name(void *data) * 0x0008 - Y 0x0080 - up 0x0800 - L */ -static bool wiiu_gca_button(void *data, uint16_t joykey) +static int16_t wiiu_gca_button(void *data, uint16_t joykey) { - gca_pad_t *pad = (gca_pad_t *)data; - - if(!pad || joykey > 31) - return false; - - return pad->buttons & (1 << joykey); + gca_pad_t *pad = (gca_pad_t *)data; + if (!pad) + return 0; + if (joykey < 31) + if (pad->buttons & (1 << joykey)) + ret |= (1 << joykey); + return 0; } pad_connection_interface_t wiiu_gca_pad_connection = { diff --git a/input/common/hid/hid_device_driver.c b/input/common/hid/hid_device_driver.c index ccab2dc569..960740054c 100644 --- a/input/common/hid/hid_device_driver.c +++ b/input/common/hid/hid_device_driver.c @@ -18,25 +18,32 @@ hid_driver_instance_t hid_instance = {0}; -hid_device_t *hid_device_list[] = { - &wiiu_gca_hid_device, - &ds3_hid_device, -/* &ds4_hid_device, */ - NULL /* must be last entry in list */ +hid_device_t *hid_device_list[] = +{ + &wiiu_gca_hid_device, + &ds3_hid_device, +#if 0 + &ds4_hid_device, +#endif + NULL /* must be last entry in list */ }; -hid_device_t *hid_device_driver_lookup(uint16_t vendor_id, uint16_t product_id) { - int i = 0; +hid_device_t *hid_device_driver_lookup( + uint16_t vendor_id, uint16_t product_id) +{ + int i = 0; - for(i = 0; hid_device_list[i] != NULL; i++) { - if(hid_device_list[i]->detect(vendor_id, product_id)) - return hid_device_list[i]; - } + for (i = 0; hid_device_list[i] != NULL; i++) + { + if (hid_device_list[i]->detect(vendor_id, product_id)) + return hid_device_list[i]; + } - return NULL; + return NULL; } -joypad_connection_t *hid_pad_register(void *pad_handle, pad_connection_interface_t *iface) +joypad_connection_t *hid_pad_register( + void *pad_handle, pad_connection_interface_t *iface) { int slot; joypad_connection_t *result; @@ -51,9 +58,9 @@ joypad_connection_t *hid_pad_register(void *pad_handle, pad_connection_interface return NULL; } - result = &(hid_instance.pad_list[slot]); - result->iface = iface; - result->data = iface->init(pad_handle, slot, hid_instance.os_driver); + result = &(hid_instance.pad_list[slot]); + result->iface = iface; + result->data = iface->init(pad_handle, slot, hid_instance.os_driver); result->connected = true; input_pad_connect(slot, hid_instance.pad_driver); @@ -65,12 +72,13 @@ void hid_pad_deregister(joypad_connection_t *pad) if(!pad) return; - if(pad->data) { + if(pad->data) + { pad->iface->deinit(pad->data); pad->data = NULL; } - pad->iface = NULL; + pad->iface = NULL; pad->connected = false; } @@ -97,7 +105,8 @@ static bool init_pad_list(hid_driver_instance_t *instance, unsigned slots) * * @argument instance the hid_driver_instance_t struct to fill in * @argument hid_driver the HID driver to initialize - * @argument pad_driver the gamepad driver to handle HID pads detected by the HID driver. + * @argument pad_driver the gamepad driver to handle HID pads + * detected by the HID driver. * * @returns true if init is successful, false otherwise. */ diff --git a/input/common/input_hid_common.c b/input/common/input_hid_common.c index ae6956af31..50c6886c92 100644 --- a/input/common/input_hid_common.c +++ b/input/common/input_hid_common.c @@ -18,7 +18,7 @@ enum gamepad_pad_axes { - AXIS_LEFT_ANALOG_X, + AXIS_LEFT_ANALOG_X = 0, AXIS_LEFT_ANALOG_Y, AXIS_RIGHT_ANALOG_X, AXIS_RIGHT_ANALOG_Y, diff --git a/input/common/input_x11_common.c b/input/common/input_x11_common.c index b4c7a21b9d..cd3bbcddaf 100644 --- a/input/common/input_x11_common.c +++ b/input/common/input_x11_common.c @@ -18,6 +18,7 @@ #include "input_x11_common.h" +/* TODO/FIXME - static globals */ static bool x11_mouse_wu; static bool x11_mouse_wd; static bool x11_mouse_hwu; diff --git a/input/common/linux_common.c b/input/common/linux_common.c index 9754fa7005..3dfc3de00a 100644 --- a/input/common/linux_common.c +++ b/input/common/linux_common.c @@ -25,6 +25,7 @@ #include "linux_common.h" +/* TODO/FIXME - static globals */ static struct termios oldTerm, newTerm; static long oldKbmd = 0xffff; static bool linux_stdin_claimed = false; diff --git a/input/common/wayland_common.c b/input/common/wayland_common.c new file mode 100644 index 0000000000..53af827314 --- /dev/null +++ b/input/common/wayland_common.c @@ -0,0 +1,714 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2020 - 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 . + */ + +#include +#include + +#include +#include + +#include + +#include "wayland_common.h" + +#include "../input_keymaps.h" +#include "../../frontend/frontend_driver.h" + +static void keyboard_handle_keymap(void* data, + struct wl_keyboard* keyboard, + uint32_t format, + int fd, + uint32_t size) +{ + (void)data; + if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) + { + close(fd); + return; + } + +#ifdef HAVE_XKBCOMMON + if (init_xkb(fd, size) < 0) + RARCH_ERR("[Wayland]: Failed to init keymap.\n"); +#endif + close(fd); + + RARCH_LOG("[Wayland]: Loaded keymap.\n"); +} + +static void keyboard_handle_enter(void* data, + struct wl_keyboard* keyboard, + uint32_t serial, + struct wl_surface* surface, + struct wl_array* keys) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + wl->input.keyboard_focus = true; +} + +static void keyboard_handle_leave(void *data, + struct wl_keyboard *keyboard, + uint32_t serial, + struct wl_surface *surface) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + wl->input.keyboard_focus = false; +} + +static void keyboard_handle_key(void *data, + struct wl_keyboard *keyboard, + uint32_t serial, + uint32_t time, + uint32_t key, + uint32_t state) +{ + (void)serial; + (void)time; + (void)keyboard; + + int value = 1; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (state == WL_KEYBOARD_KEY_STATE_PRESSED) + { + BIT_SET(wl->input.key_state, key); + value = 1; + } + else if (state == WL_KEYBOARD_KEY_STATE_RELEASED) + { + BIT_CLEAR(wl->input.key_state, key); + value = 0; + } + +#ifdef HAVE_XKBCOMMON + if (handle_xkb(key, value) == 0) + return; +#endif + input_keyboard_event(value, + input_keymaps_translate_keysym_to_rk(key), + 0, 0, RETRO_DEVICE_KEYBOARD); +} + +static void keyboard_handle_modifiers(void *data, + struct wl_keyboard *keyboard, + uint32_t serial, + uint32_t modsDepressed, + uint32_t modsLatched, + uint32_t modsLocked, + uint32_t group) +{ + (void)data; + (void)keyboard; + (void)serial; +#ifdef HAVE_XKBCOMMON + handle_xkb_state_mask(modsDepressed, modsLatched, modsLocked, group); +#else + (void)modsDepressed; + (void)modsLatched; + (void)modsLocked; + (void)group; +#endif +} + +void keyboard_handle_repeat_info(void *data, + struct wl_keyboard *wl_keyboard, + int32_t rate, + int32_t delay) +{ + (void)data; + (void)wl_keyboard; + (void)rate; + (void)delay; + /* TODO: Seems like we'll need this to get + * repeat working. We'll have to do it on our own. */ +} + +void gfx_ctx_wl_show_mouse(void *data, bool state) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + if (!wl->wl_pointer) + return; + + if (state) + { + struct wl_cursor_image *image = wl->cursor.default_cursor->images[0]; + wl_pointer_set_cursor(wl->wl_pointer, wl->cursor.serial, wl->cursor.surface, image->hotspot_x, image->hotspot_y); + wl_surface_attach(wl->cursor.surface, wl_cursor_image_get_buffer(image), 0, 0); + wl_surface_damage(wl->cursor.surface, 0, 0, image->width, image->height); + wl_surface_commit(wl->cursor.surface); + } + else + wl_pointer_set_cursor(wl->wl_pointer, wl->cursor.serial, NULL, 0, 0); + + wl->cursor.visible = state; +} + +static void pointer_handle_enter(void *data, + struct wl_pointer *pointer, + uint32_t serial, + struct wl_surface *surface, + wl_fixed_t sx, + wl_fixed_t sy) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + (void)pointer; + (void)serial; + (void)surface; + + wl->input.mouse.last_x = wl_fixed_to_int(sx * (wl_fixed_t)wl->buffer_scale); + wl->input.mouse.last_y = wl_fixed_to_int(sy * (wl_fixed_t)wl->buffer_scale); + wl->input.mouse.x = wl->input.mouse.last_x; + wl->input.mouse.y = wl->input.mouse.last_y; + wl->input.mouse.focus = true; + wl->cursor.serial = serial; + + gfx_ctx_wl_show_mouse(data, wl->cursor.visible); +} + +static void pointer_handle_leave(void *data, + struct wl_pointer *pointer, + uint32_t serial, + struct wl_surface *surface) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + wl->input.mouse.focus = false; + (void)pointer; + (void)serial; + (void)surface; +} + +static void pointer_handle_motion(void *data, + struct wl_pointer *pointer, + uint32_t time, + wl_fixed_t sx, + wl_fixed_t sy) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + wl->input.mouse.x = wl_fixed_to_int( + (wl_fixed_t)wl->buffer_scale * sx); + wl->input.mouse.y = wl_fixed_to_int( + (wl_fixed_t)wl->buffer_scale * sy); +} + +static void pointer_handle_button(void *data, + struct wl_pointer *wl_pointer, + uint32_t serial, + uint32_t time, + uint32_t button, + uint32_t state) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (state == WL_POINTER_BUTTON_STATE_PRESSED) + { + if (button == BTN_LEFT) + { + wl->input.mouse.left = true; + + if (BIT_GET(wl->input.key_state, KEY_LEFTALT)) + { + if (wl->xdg_toplevel) + xdg_toplevel_move(wl->xdg_toplevel, wl->seat, serial); + else if (wl->zxdg_toplevel) + zxdg_toplevel_v6_move(wl->zxdg_toplevel, wl->seat, serial); + } + } + else if (button == BTN_RIGHT) + wl->input.mouse.right = true; + else if (button == BTN_MIDDLE) + wl->input.mouse.middle = true; + } + else + { + if (button == BTN_LEFT) + wl->input.mouse.left = false; + else if (button == BTN_RIGHT) + wl->input.mouse.right = false; + else if (button == BTN_MIDDLE) + wl->input.mouse.middle = false; + } +} + +static void pointer_handle_axis(void *data, + struct wl_pointer *wl_pointer, + uint32_t time, + uint32_t axis, + wl_fixed_t value) +{ + (void)data; + (void)wl_pointer; + (void)time; + (void)axis; + (void)value; +} + +/* TODO: implement check for resize */ + +static void touch_handle_down(void *data, + struct wl_touch *wl_touch, + uint32_t serial, + uint32_t time, + struct wl_surface *surface, + int32_t id, + wl_fixed_t x, + wl_fixed_t y) +{ + int i; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (wl->num_active_touches < MAX_TOUCHES) + { + for (i = 0; i < MAX_TOUCHES; i++) + { + /* Use next empty slot */ + if (!wl->active_touch_positions[i].active) + { + wl->active_touch_positions[wl->num_active_touches].active = true; + wl->active_touch_positions[wl->num_active_touches].id = id; + wl->active_touch_positions[wl->num_active_touches].x = (unsigned) + wl_fixed_to_int(x); + wl->active_touch_positions[wl->num_active_touches].y = (unsigned) + wl_fixed_to_int(y); + wl->num_active_touches++; + break; + } + } + } +} + +static void reorder_touches(gfx_ctx_wayland_data_t *wl) +{ + int i, j; + if (wl->num_active_touches == 0) + return; + + for (i = 0; i < MAX_TOUCHES; i++) + { + if (!wl->active_touch_positions[i].active) + { + for (j=i+1; jactive_touch_positions[j].active) + { + wl->active_touch_positions[i].active = + wl->active_touch_positions[j].active; + wl->active_touch_positions[i].id = + wl->active_touch_positions[j].id; + wl->active_touch_positions[i].x = wl->active_touch_positions[j].x; + wl->active_touch_positions[i].y = wl->active_touch_positions[j].y; + wl->active_touch_positions[j].active = false; + wl->active_touch_positions[j].id = -1; + wl->active_touch_positions[j].x = (unsigned) 0; + wl->active_touch_positions[j].y = (unsigned) 0; + break; + } + + if (j == MAX_TOUCHES) + return; + } + } + } +} + +static void touch_handle_up(void *data, + struct wl_touch *wl_touch, + uint32_t serial, + uint32_t time, + int32_t id) +{ + int i; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + for (i = 0; i < MAX_TOUCHES; i++) + { + if ( wl->active_touch_positions[i].active && + wl->active_touch_positions[i].id == id) + { + wl->active_touch_positions[i].active = false; + wl->active_touch_positions[i].id = -1; + wl->active_touch_positions[i].x = (unsigned)0; + wl->active_touch_positions[i].y = (unsigned)0; + wl->num_active_touches--; + } + } + reorder_touches(wl); +} + +static void touch_handle_motion(void *data, + struct wl_touch *wl_touch, + uint32_t time, + int32_t id, + wl_fixed_t x, + wl_fixed_t y) +{ + int i; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + for (i = 0; i < MAX_TOUCHES; i++) + { + if ( wl->active_touch_positions[i].active && + wl->active_touch_positions[i].id == id) + { + wl->active_touch_positions[i].x = (unsigned) wl_fixed_to_int(x); + wl->active_touch_positions[i].y = (unsigned) wl_fixed_to_int(y); + } + } +} + +static void touch_handle_frame(void *data, + struct wl_touch *wl_touch) +{ + /* TODO */ +} + +static void touch_handle_cancel(void *data, + struct wl_touch *wl_touch) +{ + /* If i understand the spec correctly we have to reset all touches here + * since they were not ment for us anyway */ + int i; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + for (i = 0; i < MAX_TOUCHES; i++) + { + wl->active_touch_positions[i].active = false; + wl->active_touch_positions[i].id = -1; + wl->active_touch_positions[i].x = (unsigned) 0; + wl->active_touch_positions[i].y = (unsigned) 0; + } + + wl->num_active_touches = 0; +} + +static void seat_handle_capabilities(void *data, + struct wl_seat *seat, unsigned caps) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if ((caps & WL_SEAT_CAPABILITY_KEYBOARD) && !wl->wl_keyboard) + { + wl->wl_keyboard = wl_seat_get_keyboard(seat); + wl_keyboard_add_listener(wl->wl_keyboard, &keyboard_listener, wl); + } + else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && wl->wl_keyboard) + { + wl_keyboard_destroy(wl->wl_keyboard); + wl->wl_keyboard = NULL; + } + if ((caps & WL_SEAT_CAPABILITY_POINTER) && !wl->wl_pointer) + { + wl->wl_pointer = wl_seat_get_pointer(seat); + wl_pointer_add_listener(wl->wl_pointer, &pointer_listener, wl); + } + else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && wl->wl_pointer) + { + wl_pointer_destroy(wl->wl_pointer); + wl->wl_pointer = NULL; + } + if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !wl->wl_touch) + { + wl->wl_touch = wl_seat_get_touch(seat); + wl_touch_add_listener(wl->wl_touch, &touch_listener, wl); + } + else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && wl->wl_touch) + { + wl_touch_destroy(wl->wl_touch); + wl->wl_touch = NULL; + } + +} + +static void seat_handle_name(void *data, + struct wl_seat *seat, const char *name) +{ + (void)data; + (void)seat; + RARCH_LOG("[Wayland]: Seat name: %s.\n", name); +} + +/* Surface callbacks. */ + +static void wl_surface_enter(void *data, struct wl_surface *wl_surface, + struct wl_output *output) +{ + output_info_t *oi; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + /* TODO: track all outputs the surface is on, pick highest scale */ + + wl_list_for_each(oi, &wl->all_outputs, link) + { + if (oi->output == output) + { + RARCH_LOG("[Wayland]: Entering output #%d, scale %d\n", oi->global_id, oi->scale); + wl->current_output = oi; + wl->last_buffer_scale = wl->buffer_scale; + wl->buffer_scale = oi->scale; + break; + } + }; +} + +static void wl_nop(void *a, struct wl_surface *b, struct wl_output *c) +{ + (void)a; + (void)b; + (void)c; +} + +/* Shell surface callbacks. */ +static void xdg_shell_ping(void *data, struct xdg_wm_base *shell, uint32_t serial) +{ + xdg_wm_base_pong(shell, serial); +} + +static void handle_surface_config(void *data, struct xdg_surface *surface, + uint32_t serial) +{ + xdg_surface_ack_configure(surface, serial); +} + +static void zxdg_shell_ping(void *data, + struct zxdg_shell_v6 *shell, uint32_t serial) +{ + zxdg_shell_v6_pong(shell, serial); +} + +static void handle_zxdg_surface_config(void *data, + struct zxdg_surface_v6 *surface, + uint32_t serial) +{ + zxdg_surface_v6_ack_configure(surface, serial); +} + +void handle_toplevel_close(void *data, + struct xdg_toplevel *xdg_toplevel) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + BIT_SET(wl->input.key_state, KEY_ESC); +} + +void handle_zxdg_toplevel_close(void *data, + struct zxdg_toplevel_v6 *zxdg_toplevel) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + BIT_SET(wl->input.key_state, KEY_ESC); +} + +static void display_handle_geometry(void *data, + struct wl_output *output, + int x, int y, + int physical_width, int physical_height, + int subpixel, + const char *make, + const char *model, + int transform) +{ + output_info_t *oi = (output_info_t*)data; + oi->physical_width = physical_width; + oi->physical_height = physical_height; + + RARCH_LOG("[Wayland]: Physical width: %d mm x %d mm.\n", + physical_width, physical_height); +} + +static void display_handle_mode(void *data, + struct wl_output *output, + uint32_t flags, + int width, + int height, + int refresh) +{ + (void)output; + (void)flags; + + output_info_t *oi = (output_info_t*)data; + oi->width = width; + oi->height = height; + oi->refresh_rate = refresh; + + /* Certain older Wayland implementations report in Hz, + * but it should be mHz. */ + RARCH_LOG("[Wayland]: Video mode: %d x %d @ %.4f Hz.\n", + width, height, refresh > 1000 ? refresh / 1000.0 : (double)refresh); +} + +static void display_handle_done(void *data, + struct wl_output *output) +{ + (void)data; + (void)output; +} + +static void display_handle_scale(void *data, + struct wl_output *output, + int32_t factor) +{ + output_info_t *oi = (output_info_t*)data; + + RARCH_LOG("[Wayland]: Display scale factor %d.\n", factor); + oi->scale = factor; +} + +/* Registry callbacks. */ +static void registry_handle_global(void *data, struct wl_registry *reg, + uint32_t id, const char *interface, uint32_t version) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + (void)version; + + if (string_is_equal(interface, "wl_compositor")) + wl->compositor = (struct wl_compositor*)wl_registry_bind(reg, + id, &wl_compositor_interface, 3); + else if (string_is_equal(interface, "wl_output")) + { + output_info_t *oi = (output_info_t*) + calloc(1, sizeof(output_info_t)); + + oi->global_id = id; + oi->output = (struct wl_output*)wl_registry_bind(reg, + id, &wl_output_interface, 2); + wl_output_add_listener(oi->output, &output_listener, oi); + wl_list_insert(&wl->all_outputs, &oi->link); + wl_display_roundtrip(wl->input.dpy); + } + else if (string_is_equal(interface, "xdg_wm_base")) + wl->xdg_shell = (struct xdg_wm_base*) + wl_registry_bind(reg, id, &xdg_wm_base_interface, 1); + else if (string_is_equal(interface, "zxdg_shell_v6")) + wl->zxdg_shell = (struct zxdg_shell_v6*) + wl_registry_bind(reg, id, &zxdg_shell_v6_interface, 1); + else if (string_is_equal(interface, "wl_shm")) + wl->shm = (struct wl_shm*)wl_registry_bind(reg, id, &wl_shm_interface, 1); + else if (string_is_equal(interface, "wl_seat")) + { + wl->seat = (struct wl_seat*)wl_registry_bind(reg, id, &wl_seat_interface, 2); + wl_seat_add_listener(wl->seat, &seat_listener, wl); + } + else if (string_is_equal(interface, "zwp_idle_inhibit_manager_v1")) + wl->idle_inhibit_manager = (struct zwp_idle_inhibit_manager_v1*)wl_registry_bind( + reg, id, &zwp_idle_inhibit_manager_v1_interface, 1); + else if (string_is_equal(interface, "zxdg_decoration_manager_v1")) + wl->deco_manager = (struct zxdg_decoration_manager_v1*)wl_registry_bind( + reg, id, &zxdg_decoration_manager_v1_interface, 1); +} + +static void registry_handle_global_remove(void *data, + struct wl_registry *registry, uint32_t id) +{ + output_info_t *oi, *tmp; + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + wl_list_for_each_safe(oi, tmp, &wl->all_outputs, link) + { + if (oi->global_id == id) + { + wl_list_remove(&oi->link); + free(oi); + break; + } + } +} + +const struct wl_registry_listener registry_listener = { + registry_handle_global, + registry_handle_global_remove, +}; + + +const struct wl_output_listener output_listener = { + display_handle_geometry, + display_handle_mode, + display_handle_done, + display_handle_scale, +}; + +const struct zxdg_shell_v6_listener zxdg_shell_v6_listener = { + zxdg_shell_ping, +}; + +const struct zxdg_surface_v6_listener zxdg_surface_v6_listener = { + handle_zxdg_surface_config, +}; + +const struct xdg_wm_base_listener xdg_shell_listener = { + xdg_shell_ping, +}; + +const struct xdg_surface_listener xdg_surface_listener = { + handle_surface_config, +}; + +const struct wl_surface_listener wl_surface_listener = { + wl_surface_enter, + wl_nop, +}; + +const struct wl_seat_listener seat_listener = { + seat_handle_capabilities, + seat_handle_name, +}; + +const struct wl_touch_listener touch_listener = { + touch_handle_down, + touch_handle_up, + touch_handle_motion, + touch_handle_frame, + touch_handle_cancel, +}; + +const struct wl_keyboard_listener keyboard_listener = { + keyboard_handle_keymap, + keyboard_handle_enter, + keyboard_handle_leave, + keyboard_handle_key, + keyboard_handle_modifiers, + keyboard_handle_repeat_info +}; + +const struct wl_pointer_listener pointer_listener = { + pointer_handle_enter, + pointer_handle_leave, + pointer_handle_motion, + pointer_handle_button, + pointer_handle_axis, +}; + +void flush_wayland_fd(void *data) +{ + struct pollfd fd = {0}; + input_ctx_wayland_data_t *wl = (input_ctx_wayland_data_t*)data; + + wl_display_dispatch_pending(wl->dpy); + wl_display_flush(wl->dpy); + + fd.fd = wl->fd; + fd.events = POLLIN | POLLOUT | POLLERR | POLLHUP; + + if (poll(&fd, 1, 0) > 0) + { + if (fd.revents & (POLLERR | POLLHUP)) + { + close(wl->fd); + frontend_driver_set_signal_handler_state(1); + } + + if (fd.revents & POLLIN) + wl_display_dispatch(wl->dpy); + if (fd.revents & POLLOUT) + wl_display_flush(wl->dpy); + } +} diff --git a/input/common/wayland_common.h b/input/common/wayland_common.h new file mode 100644 index 0000000000..4fd86b0842 --- /dev/null +++ b/input/common/wayland_common.h @@ -0,0 +1,212 @@ +/* RetroArch - A frontend for libretro. + * Copyright (C) 2011-2017 - Daniel De Matteis + * + * RetroArch is free software: you can redistribute it and/or modify it under the terms + * of the GNU General Public License as published by the Free Software Found- + * ation, either version 3 of the License, or (at your option) any later version. + * + * RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along with RetroArch. + * If not, see . + */ + +#ifndef WAYLAND_INPUT_COMMON_H__ +#define WAYLAND_INPUT_COMMON_H__ + +#include +#include + +#include +#include +#include + +#include "../input_driver.h" + +#ifdef HAVE_EGL +#include "../../gfx/common/egl_common.h" +#endif + +#ifdef HAVE_VULKAN +#include "../../gfx/common/vulkan_common.h" +#endif + +/* Generated from idle-inhibit-unstable-v1.xml */ +#include "../../gfx/common/wayland/idle-inhibit-unstable-v1.h" + +/* Generated from xdg-shell-unstable-v6.xml */ +#include "../../gfx/common/wayland/xdg-shell-unstable-v6.h" + +/* Generated from xdg-shell.xml */ +#include "../../gfx/common/wayland/xdg-shell.h" + +/* Generated from xdg-decoration-unstable-v1.h */ +#include "../../gfx/common/wayland/xdg-decoration-unstable-v1.h" + +#define UDEV_KEY_MAX 0x2ff +#define UDEV_MAX_KEYS (UDEV_KEY_MAX + 7) / 8 + +#define MAX_TOUCHES 16 + +#define WL_ARRAY_FOR_EACH(pos, array, type) \ + for (pos = (type)(array)->data; \ + (const char *) pos < ((const char *) (array)->data + (array)->size); \ + (pos)++) + +typedef struct +{ + bool active; + int16_t x; + int16_t y; +} wayland_touch_data_t; + +typedef struct touch_pos +{ + bool active; + int32_t id; + unsigned x; + unsigned y; +} touch_pos_t; + +typedef struct output_info +{ + struct wl_output *output; + uint32_t global_id; + unsigned width; + unsigned height; + unsigned physical_width; + unsigned physical_height; + int refresh_rate; + unsigned scale; + struct wl_list link; /* wl->all_outputs */ +} output_info_t; + +typedef struct input_ctx_wayland_data +{ + /* Wayland uses Linux keysyms. */ + uint8_t key_state[UDEV_MAX_KEYS]; + bool keyboard_focus; + + struct + { + int last_x, last_y; + int x, y; + int delta_x, delta_y; + bool last_valid; + bool focus; + bool left, right, middle; + } mouse; + + struct wl_display *dpy; + int fd; + + const input_device_driver_t *joypad; + bool blocked; + + wayland_touch_data_t touches[MAX_TOUCHES]; + +} input_ctx_wayland_data_t; + +typedef struct gfx_ctx_wayland_data +{ +#ifdef HAVE_EGL + egl_ctx_data_t egl; + struct wl_egl_window *win; +#endif + bool fullscreen; + bool maximized; + bool resize; + bool configured; + bool activated; + unsigned prev_width; + unsigned prev_height; + unsigned width; + unsigned height; + struct wl_registry *registry; + struct wl_compositor *compositor; + struct wl_surface *surface; + struct zxdg_surface_v6 *zxdg_surface; + struct zxdg_shell_v6 *zxdg_shell; + struct zxdg_toplevel_v6 *zxdg_toplevel; + struct xdg_surface *xdg_surface; + struct xdg_wm_base *xdg_shell; + struct xdg_toplevel *xdg_toplevel; + struct wl_keyboard *wl_keyboard; + struct wl_pointer *wl_pointer; + struct wl_touch *wl_touch; + struct wl_seat *seat; + struct wl_shm *shm; + struct zxdg_decoration_manager_v1 *deco_manager; + struct zxdg_toplevel_decoration_v1 *deco; + struct zwp_idle_inhibit_manager_v1 *idle_inhibit_manager; + struct zwp_idle_inhibitor_v1 *idle_inhibitor; + struct wl_list all_outputs; + output_info_t *current_output; + int swap_interval; + bool core_hw_context_enable; + + unsigned last_buffer_scale; + unsigned buffer_scale; + + struct + { + struct wl_cursor *default_cursor; + struct wl_cursor_theme *theme; + struct wl_surface *surface; + uint32_t serial; + bool visible; + } cursor; + + input_ctx_wayland_data_t input; + +#ifdef HAVE_VULKAN + gfx_ctx_vulkan_data_t vk; +#endif + int num_active_touches; + touch_pos_t active_touch_positions[MAX_TOUCHES]; +} gfx_ctx_wayland_data_t; + +#ifdef HAVE_XKBCOMMON +/* FIXME: Move this into a header? */ +int init_xkb(int fd, size_t size); +int handle_xkb(int code, int value); +void handle_xkb_state_mask(uint32_t depressed, + uint32_t latched, uint32_t locked, uint32_t group); +void free_xkb(void); +#endif + +void gfx_ctx_wl_show_mouse(void *data, bool state); + +void handle_toplevel_close(void *data, + struct xdg_toplevel *xdg_toplevel); + +void handle_zxdg_toplevel_close(void *data, + struct zxdg_toplevel_v6 *zxdg_toplevel); + +void flush_wayland_fd(void *data); + +extern const struct wl_keyboard_listener keyboard_listener; + +extern const struct wl_pointer_listener pointer_listener; + +extern const struct wl_touch_listener touch_listener; + +extern const struct wl_seat_listener seat_listener; + +extern const struct wl_surface_listener wl_surface_listener; + +extern const struct xdg_wm_base_listener xdg_shell_listener; + +extern const struct xdg_surface_listener xdg_surface_listener; + +extern const struct zxdg_shell_v6_listener zxdg_shell_v6_listener; + +extern const struct zxdg_surface_v6_listener zxdg_surface_v6_listener; + +extern const struct wl_output_listener output_listener; + +extern const struct wl_registry_listener registry_listener; + +#endif diff --git a/input/connect/joypad_connection.h b/input/connect/joypad_connection.h index e0ec396b65..454d91e9e2 100644 --- a/input/connect/joypad_connection.h +++ b/input/connect/joypad_connection.h @@ -70,7 +70,7 @@ typedef struct pad_connection_interface void (*get_buttons)(void *data, input_bits_t *state); int16_t (*get_axis)(void *data, unsigned axis); const char* (*get_name)(void *data); - bool (*button)(void *data, uint16_t joykey); + int16_t (*button)(void *data, uint16_t joykey); } pad_connection_interface_t; extern pad_connection_interface_t pad_connection_wii; diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 351fc4530b..fb49dbd455 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1062,11 +1062,7 @@ static void handle_hotplug(android_input_t *android, */ else if( ( - strstr(device_model, "R800x") || - strstr(device_model, "R800at") || - strstr(device_model, "R800i") || - strstr(device_model, "R800a") || - strstr(device_model, "R800") || + string_starts_with_size(device_model, "R800", STRLEN_CONST("R800")) || strstr(device_model, "Xperia Play") || strstr(device_model, "Play") || strstr(device_model, "SO-01D") @@ -1117,9 +1113,16 @@ static void handle_hotplug(android_input_t *android, } /* Amazon Fire TV & Fire stick */ - else if (strstr(device_model, "AFTB") || strstr(device_model, "AFTT") || - strstr(device_model, "AFTS") || strstr(device_model, "AFTM") || - strstr(device_model, "AFTRS")) + else if ( + string_starts_with_size(device_model, "AFT", STRLEN_CONST("AFT")) && + ( + strstr(device_model, "AFTB") || + strstr(device_model, "AFTT") || + strstr(device_model, "AFTS") || + strstr(device_model, "AFTM") || + strstr(device_model, "AFTRS") + ) + ) { RARCH_LOG("Special Device Detected: %s\n", device_model); { @@ -1312,8 +1315,6 @@ static void android_input_poll_memcpy(android_input_t *android) static bool android_input_key_pressed(android_input_t *android, int key) { - uint64_t joykey; - uint32_t joyaxis; rarch_joypad_info_t joypad_info; joypad_info.joy_idx = 0; joypad_info.auto_binds = input_autoconf_binds[0]; @@ -1324,21 +1325,12 @@ static bool android_input_key_pressed(android_input_t *android, int key) && android_keyboard_port_input_pressed(input_config_binds[0], key)) return true; - - joykey = - (input_config_binds[0][key].joykey != NO_BTN) - ? input_config_binds[0][key].joykey - : joypad_info.auto_binds[key].joykey; - joyaxis = - (input_config_binds[0][key].joyaxis != AXIS_NONE) - ? input_config_binds[0][key].joyaxis - : joypad_info.auto_binds[key].joyaxis; - - if ((uint16_t)joykey != NO_BTN && android->joypad->button(joypad_info.joy_idx, (uint16_t)joykey)) - return true; - if (((float)abs(android->joypad->axis(joypad_info.joy_idx, joyaxis)) / 0x8000) > joypad_info.axis_threshold) - return true; - return false; + return button_is_pressed( + android->joypad, + &joypad_info, + &input_config_binds[0], + joypad_info.joy_idx, + key); } /* Handle all events. If our activity is in pause state, @@ -1431,17 +1423,13 @@ static int16_t android_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = android->joypad->state( + joypad_info, binds[port], port); for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if ( - button_is_pressed( - android->joypad, joypad_info, binds[port], - port, i) - || android_keyboard_port_input_pressed(binds[port], i) - ) + if (android_keyboard_port_input_pressed(binds[port], i)) ret |= (1 << i); } } @@ -1462,9 +1450,6 @@ static int16_t android_input_state(void *data, } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(android->joypad, joypad_info, - port, idx, id, binds[port]); break; case RETRO_DEVICE_KEYBOARD: return (id < RETROK_LAST) && BIT_GET(android_key_state[ANDROID_KEYBOARD_PORT], rarch_keysym_lut[id]); diff --git a/input/drivers/cocoa_input.c b/input/drivers/cocoa_input.c index 93f3b482fd..9fb7928c90 100644 --- a/input/drivers/cocoa_input.c +++ b/input/drivers/cocoa_input.c @@ -48,8 +48,10 @@ int32_t cocoa_input_find_any_key(void) if (apple->joypad) apple->joypad->poll(); +#ifdef HAVE_MFI if (apple->sec_joypad) apple->sec_joypad->poll(); +#endif return apple_keyboard_find_any_key(); } @@ -89,6 +91,7 @@ int32_t cocoa_input_find_any_button(uint32_t port) if (ret != -1) return ret; +#ifdef HAVE_MFI if (apple->sec_joypad) { apple->sec_joypad->poll(); @@ -101,6 +104,7 @@ int32_t cocoa_input_find_any_button(uint32_t port) ret = cocoa_input_find_any_button_ret(apple, &state, port); } } +#endif if (ret != -1) return ret; @@ -116,8 +120,10 @@ int32_t cocoa_input_find_any_axis(uint32_t port) if (apple && apple->joypad) apple->joypad->poll(); +#ifdef HAVE_MFI if (apple && apple->sec_joypad) apple->sec_joypad->poll(); +#endif for (i = 0; i < 6; i++) { @@ -126,7 +132,9 @@ int32_t cocoa_input_find_any_axis(uint32_t port) if (abs(value) > 0x4000) return (value < 0) ? -(i + 1) : i + 1; +#ifdef HAVE_MFI value = apple->sec_joypad ? apple->sec_joypad->axis(port, i) : value; +#endif if (abs(value) > 0x4000) return (value < 0) ? -(i + 1) : i + 1; @@ -190,8 +198,10 @@ static void cocoa_input_poll(void *data) if (apple->joypad) apple->joypad->poll(); +#ifdef HAVE_MFI if (apple->sec_joypad) apple->sec_joypad->poll(); +#endif } static int16_t cocoa_mouse_state(cocoa_input_data_t *apple, @@ -345,18 +355,6 @@ static int16_t cocoa_input_state(void *data, } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - { - int16_t ret = 0; -#ifdef HAVE_MFI - ret = input_joypad_analog(apple->sec_joypad, joypad_info, port, - idx, id, binds[port]); -#endif - if (!ret) - ret = input_joypad_analog(apple->joypad, joypad_info, port, - idx, id, binds[port]); - return ret; - } break; case RETRO_DEVICE_KEYBOARD: return (id < RETROK_LAST) && apple_key_state[rarch_keysym_lut[(enum retro_key)id]]; @@ -383,8 +381,10 @@ static void cocoa_input_free(void *data) if (apple->joypad) apple->joypad->destroy(); +#ifdef HAVE_MFI if (apple->sec_joypad) apple->sec_joypad->destroy(); +#endif for (i = 0; i < MAX_KEYS; i++) apple_key_state[i] = 0; @@ -429,10 +429,12 @@ static void cocoa_input_grab_mouse(void *data, bool state) static const input_device_driver_t *cocoa_input_get_sec_joypad_driver(void *data) { +#ifdef HAVE_MFI cocoa_input_data_t *apple = (cocoa_input_data_t*)data; if (apple && apple->sec_joypad) return apple->sec_joypad; +#endif return NULL; } diff --git a/input/drivers/cocoa_input.h b/input/drivers/cocoa_input.h index ab65fc369d..2f2cd068ab 100644 --- a/input/drivers/cocoa_input.h +++ b/input/drivers/cocoa_input.h @@ -20,6 +20,10 @@ #include #include +#ifdef HAVE_CONFIG_H +#include "../../config.def.h" +#endif + #include "../input_driver.h" /* Input responder */ @@ -49,7 +53,9 @@ typedef struct int16_t mouse_wl; int16_t mouse_wr; +#ifdef HAVE_MFI const input_device_driver_t *sec_joypad; +#endif const input_device_driver_t *joypad; } cocoa_input_data_t; diff --git a/input/drivers/ctr_input.c b/input/drivers/ctr_input.c index 00a1fd1792..9e9862d3eb 100644 --- a/input/drivers/ctr_input.c +++ b/input/drivers/ctr_input.c @@ -58,38 +58,16 @@ static int16_t ctr_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if (button_is_pressed( - ctr->joypad, joypad_info, binds[port], port, i)) - ret |= (1 << i); - } - } + return ctr->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (id < RARCH_BIND_LIST_END) - { - if (binds[port][id].valid) - { - if (button_is_pressed( + if (id < RARCH_BIND_LIST_END) + if (binds[port][id].valid) + if (button_is_pressed( ctr->joypad, joypad_info, binds[port], port, id)) - return 1; - } - } - } + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(ctr->joypad, - joypad_info, port, idx, id, binds[port]); break; } diff --git a/input/drivers/dinput.c b/input/drivers/dinput.c index aacd52e92c..03fdbf1005 100644 --- a/input/drivers/dinput.c +++ b/input/drivers/dinput.c @@ -193,12 +193,14 @@ static void *dinput_init(const char *joypad_driver) static void dinput_poll(void *data) { + unsigned i; struct dinput_input *di = (struct dinput_input*)data; if (!di) return; - memset(di->state, 0, sizeof(di->state)); + for (i = 0; i < 256; i++) + di->state[i] = 0; if (di->keyboard) { if (FAILED(IDirectInputDevice8_GetDeviceState( @@ -207,7 +209,10 @@ static void dinput_poll(void *data) IDirectInputDevice8_Acquire(di->keyboard); if (FAILED(IDirectInputDevice8_GetDeviceState( di->keyboard, sizeof(di->state), di->state))) - memset(di->state, 0, sizeof(di->state)); + { + for (i = 0; i < 256; i++) + di->state[i] = 0; + } } } @@ -219,7 +224,11 @@ static void dinput_poll(void *data) point.x = 0; point.y = 0; - memset(&mouse_state, 0, sizeof(mouse_state)); + mouse_state.lX = 0; + mouse_state.lY = 0; + mouse_state.lZ = 0; + for (i = 0; i < 8; i++) + mouse_state.rgbButtons[i] = 0; if (FAILED(IDirectInputDevice8_GetDeviceState( di->mouse, sizeof(mouse_state), &mouse_state))) @@ -227,7 +236,13 @@ static void dinput_poll(void *data) IDirectInputDevice8_Acquire(di->mouse); if (FAILED(IDirectInputDevice8_GetDeviceState( di->mouse, sizeof(mouse_state), &mouse_state))) - memset(&mouse_state, 0, sizeof(mouse_state)); + { + mouse_state.lX = 0; + mouse_state.lY = 0; + mouse_state.lZ = 0; + for (i = 0; i < 8; i++) + mouse_state.rgbButtons[i] = 0; + } } di->mouse_rel_x = mouse_state.lX; @@ -556,46 +571,33 @@ static int16_t dinput_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; - if (input_dinput.keyboard_mapping_blocked) + int16_t ret = di->joypad->state( + joypad_info, binds[port], port); + + if (settings->uints.input_mouse_index[port] == 0) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - di->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if ( - settings->uints.input_mouse_index[port] == 0 - && dinput_mouse_button_pressed( + if (dinput_mouse_button_pressed( di, port, binds[port][i].mbutton) ) ret |= (1 << i); } } } - else + + if (!input_dinput.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - di->joypad, joypad_info, - binds[port], port, i)) - ret |= (1 << i); - else if ((binds[port][i].key < RETROK_LAST) && + if ((binds[port][i].key < RETROK_LAST) && di->state[rarch_keysym_lut [(enum retro_key)binds[port][i].key]] & 0x80) ret |= (1 << i); - else if ( - settings->uints.input_mouse_index[port] == 0 - && dinput_mouse_button_pressed( - di, port, binds[port][i].mbutton) - ) - ret |= (1 << i); } } } @@ -634,15 +636,8 @@ static int16_t dinput_input_state(void *data, di->state[rarch_keysym_lut[(enum retro_key)id]] & 0x80; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog(di->joypad, joypad_info, - port, idx, id, binds[port]); - if (!ret) - ret = dinput_pressed_analog(di, binds[port], idx, id); - return ret; - } + return dinput_pressed_analog(di, binds[port], idx, id); break; - case RETRO_DEVICE_MOUSE: { settings = config_get_ptr(); diff --git a/input/drivers/dos_input.c b/input/drivers/dos_input.c index 799ae2eafd..a6d2ab27bc 100644 --- a/input/drivers/dos_input.c +++ b/input/drivers/dos_input.c @@ -26,6 +26,8 @@ #include "../input_keymaps.h" #include "../drivers_keyboard/keyboard_event_dos.h" +#define MAX_KEYS LAST_KEYCODE + 1 + /* TODO/FIXME - * fix game focus toggle */ @@ -34,9 +36,8 @@ typedef struct dos_input const input_device_driver_t *joypad; } dos_input_t; -#define MAX_KEYS LAST_KEYCODE + 1 - /* First ports are used to keeping track of gamepad states. Last port is used for keyboard state */ +/* TODO/FIXME - static globals */ static uint16_t dos_key_state[DEFAULT_MAX_PADS+1][MAX_KEYS]; static bool dos_keyboard_port_input_pressed( @@ -86,18 +87,16 @@ static int16_t dos_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = dos->joypad->state( + joypad_info, binds[port], port); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if ( - button_is_pressed( - dos->joypad, joypad_info, binds[port], - port, i) - || dos_keyboard_port_input_pressed(binds[port], i) - ) - ret |= (1 << i); + if (id < RARCH_BIND_LIST_END) + if (dos_key_state[DOS_KEYBOARD_PORT][rarch_keysym_lut[binds[i].key]]) + ret |= (1 << i); } } @@ -108,9 +107,9 @@ static int16_t dos_input_state(void *data, if (binds[port][id].valid) { if ( - button_is_pressed( - dos->joypad, joypad_info, binds[port], - port, id) + button_is_pressed( + dos->joypad, joypad_info, binds[port], + port, id) || dos_keyboard_port_input_pressed(binds[port], id) ) return 1; @@ -118,7 +117,9 @@ static int16_t dos_input_state(void *data, } break; case RETRO_DEVICE_KEYBOARD: - return dos_keyboard_port_input_pressed(binds[port], id); + if (id < RARCH_BIND_LIST_END) + return (dos_key_state[DOS_KEYBOARD_PORT][rarch_keysym_lut[binds[id].key]]); + break; } return 0; diff --git a/input/drivers/gx_input.c b/input/drivers/gx_input.c index 72f3c45114..dd3f05e4dd 100644 --- a/input/drivers/gx_input.c +++ b/input/drivers/gx_input.c @@ -149,36 +149,16 @@ static int16_t gx_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed( - gx->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return gx->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (binds[port][id].valid) - if ( - button_is_pressed(gx->joypad, joypad_info, binds[port], - port, id)) - return 1; - } + if (binds[port][id].valid) + if ( + button_is_pressed(gx->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(gx->joypad, - joypad_info, port, idx, id, binds[port]); break; #ifdef HW_RVL case RETRO_DEVICE_MOUSE: @@ -202,7 +182,7 @@ static void gx_input_free_input(void *data) if (gx->joypad) gx->joypad->destroy(); #ifdef HW_RVL - if(gx->mouse) + if (gx->mouse) free(gx->mouse); #endif free(gx); @@ -211,18 +191,17 @@ static void gx_input_free_input(void *data) #ifdef HW_RVL static inline int gx_count_mouse(gx_input_t *gx) { + unsigned i; int count = 0; - if(gx) + if (gx) { - for(int i=0; ijoypad->name(i)) + if (gx->joypad->name(i)) { - if(!strcmp(gx->joypad->name(i), "Wiimote Controller")) - { + if (string_is_equal(gx->joypad->name(i), "Wiimote Controller")) count++; - } } } } @@ -237,11 +216,12 @@ static void *gx_input_init(const char *joypad_driver) if (!gx) return NULL; - gx->joypad = input_joypad_init_driver(joypad_driver, gx); + gx->joypad = input_joypad_init_driver(joypad_driver, gx); #ifdef HW_RVL /* Allocate at least 1 mouse at startup */ - gx->mouse_max = 1; - gx->mouse = (gx_input_mouse_t*) calloc(gx->mouse_max, sizeof(gx_input_mouse_t)); + gx->mouse_max = 1; + gx->mouse = (gx_input_mouse_t*)calloc( + gx->mouse_max, sizeof(gx_input_mouse_t)); #endif return gx; } @@ -249,26 +229,25 @@ static void *gx_input_init(const char *joypad_driver) #ifdef HW_RVL static void gx_input_poll_mouse(gx_input_t *gx) { - int count = 0; - count = gx_count_mouse(gx); + int count = gx_count_mouse(gx); - if(gx && count > 0) + if (gx && count > 0) { - if(count != gx->mouse_max) + if (count != gx->mouse_max) { gx_input_mouse_t* tmp = NULL; - tmp = (gx_input_mouse_t*)realloc(gx->mouse, count * sizeof(gx_input_mouse_t)); - if(!tmp) - { + tmp = (gx_input_mouse_t*)realloc( + gx->mouse, count * sizeof(gx_input_mouse_t)); + if (!tmp) free(gx->mouse); - } else { - gx->mouse = tmp; + unsigned i; + gx->mouse = tmp; gx->mouse_max = count; - for(int i=0; imouse_max; i++) + for (i = 0; i < gx->mouse_max; i++) { gx->mouse[i].x_last = 0; gx->mouse[i].y_last = 0; @@ -280,7 +259,8 @@ static void gx_input_poll_mouse(gx_input_t *gx) { gx->mouse[i].x_last = gx->mouse[i].x_abs; gx->mouse[i].y_last = gx->mouse[i].y_abs; - gx_joypad_read_mouse(i, &gx->mouse[i].x_abs, &gx->mouse[i].y_abs, &gx->mouse[i].button); + gx_joypad_read_mouse(i, &gx->mouse[i].x_abs, + &gx->mouse[i].y_abs, &gx->mouse[i].button); } } } @@ -294,7 +274,7 @@ static void gx_input_poll(void *data) { gx->joypad->poll(); #ifdef HW_RVL - if(gx->mouse) + if (gx->mouse) gx_input_poll_mouse(gx); #endif } diff --git a/input/drivers/linuxraw_input.c b/input/drivers/linuxraw_input.c index ea32436526..3f7c51446f 100644 --- a/input/drivers/linuxraw_input.c +++ b/input/drivers/linuxraw_input.c @@ -119,18 +119,14 @@ static int16_t linuxraw_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = linuxraw->joypad->state( + joypad_info, binds[port], port); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { if ( - button_is_pressed( - linuxraw->joypad, joypad_info, binds[port], - port, i) - ) - ret |= (1 << i); - else if ( linuxraw->state[rarch_keysym_lut[ (enum retro_key)binds[port][i].key]] ) @@ -162,13 +158,9 @@ static int16_t linuxraw_input_state(void *data, break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog(linuxraw->joypad, - joypad_info, port, idx, id, binds[port]); - if (!ret) - ret = linuxraw_analog_pressed(linuxraw, binds[port], idx, id); - return ret; - } + return linuxraw_analog_pressed( + linuxraw, binds[port], idx, id); + break; } return 0; diff --git a/input/drivers/ps2_input.c b/input/drivers/ps2_input.c index 16c49f1a1c..77743e6f0b 100644 --- a/input/drivers/ps2_input.c +++ b/input/drivers/ps2_input.c @@ -20,8 +20,6 @@ #include "../../config.h" #endif -#include - #include #include #include @@ -53,34 +51,15 @@ static int16_t ps2_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if (button_is_pressed(ps2->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return ps2->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (binds[port][id].valid) - { - if (button_is_pressed(ps2->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } + if (binds[port][id].valid) + if (button_is_pressed(ps2->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(ps2->joypad, joypad_info, port, idx, id, binds[port]); break; } diff --git a/input/drivers/ps3_input.c b/input/drivers/ps3_input.c index 147522933d..6677ae0e96 100644 --- a/input/drivers/ps3_input.c +++ b/input/drivers/ps3_input.c @@ -108,36 +108,16 @@ static int16_t ps3_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed(ps3->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return ps3->joypad->state( + joypad_info, binds[port], port); + + if (binds[port][id].valid) + if (button_is_pressed(ps3->joypad, joypad_info, binds[port], + port, id)) + return 1; - return ret; - } - else - { - if (binds[port][id].valid) - { - if (button_is_pressed(ps3->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog( - ps3->joypad, joypad_info, port, idx, id, binds[port]); break; #if 0 case RETRO_DEVICE_SENSOR_ACCELEROMETER: diff --git a/input/drivers/ps4_input.c b/input/drivers/ps4_input.c index 8a58487dfa..608425d28d 100644 --- a/input/drivers/ps4_input.c +++ b/input/drivers/ps4_input.c @@ -57,36 +57,16 @@ static int16_t ps4_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed(ps4->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return ps4->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (binds[port][id].valid) - { - if ( - button_is_pressed(ps4->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } + if (binds[port][id].valid) + if ( + button_is_pressed(ps4->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(ps4->joypad, joypad_info, port, idx, id, binds[port]); break; } diff --git a/input/drivers/psl1ght_input.c b/input/drivers/psl1ght_input.c index 468e7ad010..02df22bdcb 100644 --- a/input/drivers/psl1ght_input.c +++ b/input/drivers/psl1ght_input.c @@ -220,16 +220,14 @@ static int16_t ps3_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = ps3->joypad->state( + joypad_info, binds[port], port); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if ( - button_is_pressed(ps3->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - else if (psl1ght_keyboard_port_input_pressed(ps3, binds[port][i].key)) + if (psl1ght_keyboard_port_input_pressed(ps3, binds[port][i].key)) ret |= (1 << i); } } @@ -251,8 +249,6 @@ static int16_t ps3_input_state(void *data, } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(ps3->joypad, joypad_info, port, idx, id, binds[port]); break; case RETRO_DEVICE_KEYBOARD: return (psl1ght_keyboard_port_input_pressed(ps3, id)); @@ -404,7 +400,7 @@ static bool ps3_joypad_init(void *data) return true; } -static u16 transform_buttons(const padData *data) +static uint16_t transform_buttons(const padData *data) { return ( (data->BTN_CROSS << RETRO_DEVICE_ID_JOYPAD_B) @@ -426,71 +422,112 @@ static u16 transform_buttons(const padData *data) ); } -static bool ps3_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t ps3_joypad_button(unsigned port, uint16_t joykey) { - if (port_num >= MAX_PADS) - return false; - - return !!(transform_buttons(&pad_state[port_num]) & (UINT64_C(1) << joykey)); + uint16_t state = 0; + if (port >= MAX_PADS) + return 0; + state = transform_buttons( + &pad_state[port]); + return (state & (UINT64_C(1) << joykey); } -static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state) +static void ps3_joypad_get_buttons(unsigned port, input_bits_t *state) { - if (port_num < MAX_PADS) + if (port < MAX_PADS) { - u16 v = transform_buttons(&pad_state[port_num]); + uint16_t v = transform_buttons(&pad_state[port]); BITS_COPY16_PTR( state, v); } else BIT256_CLEAR_ALL_PTR(state); } -static int16_t ps3_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t ps3_joypad_axis_state(unsigned port, uint32_t joyaxis) { int val = 0x80; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { - axis = AXIS_NEG_GET(joyaxis); - is_neg = true; + axis = AXIS_NEG_GET(joyaxis); + is_neg = true; } else if (AXIS_POS_GET(joyaxis) < 4) { - axis = AXIS_POS_GET(joyaxis); - is_pos = true; + axis = AXIS_POS_GET(joyaxis); + is_pos = true; } switch (axis) { case 0: - val = pad_state[port_num].ANA_L_H; + val = pad_state[port].ANA_L_H; break; case 1: - val = pad_state[port_num].ANA_L_V; + val = pad_state[port].ANA_L_V; break; case 2: - val = pad_state[port_num].ANA_R_H; + val = pad_state[port].ANA_R_H; break; case 3: - val = pad_state[port_num].ANA_R_V; + val = pad_state[port].ANA_R_V; break; } - val = (val - 0x7f) * 0xff; + val = (val - 0x7f) * 0xff; if (is_neg && val > 0) - val = 0; + val = 0; else if (is_pos && val < 0) - val = 0; + val = 0; return val; } +static int16_t ps3_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (port >= DEFAULT_MAX_PADS) + return 0; + return ps3_joypad_axis_state(port, joyaxis); +} + +static int16_t ps3_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + uint16_t state = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + state = transform_buttons(&pad_state[port]); + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (state & (UINT64_C(1) << (uint16_t)joykey)) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(ps3_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void ps3_joypad_poll(void) { unsigned port; @@ -538,6 +575,7 @@ input_device_driver_t ps3_joypad = { ps3_joypad_query_pad, ps3_joypad_destroy, ps3_joypad_button, + ps3_joypad_state, ps3_joypad_get_buttons, ps3_joypad_axis, ps3_joypad_poll, diff --git a/input/drivers/psp_input.c b/input/drivers/psp_input.c index e0ff93da52..93c56b882b 100644 --- a/input/drivers/psp_input.c +++ b/input/drivers/psp_input.c @@ -300,36 +300,16 @@ static int16_t psp_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed(psp->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return psp->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (binds[port][id].valid) - { - if ( - button_is_pressed(psp->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } + if (binds[port][id].valid) + if ( + button_is_pressed(psp->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(psp->joypad, joypad_info, port, idx, id, binds[port]); break; #ifdef VITA case RETRO_DEVICE_KEYBOARD: diff --git a/input/drivers/qnx_input.c b/input/drivers/qnx_input.c index fe22277d08..897dea31a0 100644 --- a/input/drivers/qnx_input.c +++ b/input/drivers/qnx_input.c @@ -788,31 +788,16 @@ static int16_t qnx_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; - if (input_qnx.keyboard_mapping_blocked) + int16_t ret = qnx->joypad->state( + joypad_info, binds[port], port); + + if (!input_qnx.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - qnx->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - } - } - } - else - { - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if (button_is_pressed( - qnx->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if (qnx_keyboard_pressed(qnx, key)) + if (qnx_keyboard_pressed(qnx, key)) ret |= (1 << i); } } @@ -840,10 +825,7 @@ static int16_t qnx_input_state(void *data, } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(qnx->joypad, joypad_info, - port, idx, id, binds[port]); - return 0; + break; case RETRO_DEVICE_KEYBOARD: return qnx_keyboard_pressed(qnx, id); case RETRO_DEVICE_POINTER: diff --git a/input/drivers/rwebinput_input.c b/input/drivers/rwebinput_input.c index 31c528e7d8..f4f8e29fc8 100644 --- a/input/drivers/rwebinput_input.c +++ b/input/drivers/rwebinput_input.c @@ -566,16 +566,10 @@ static int16_t rwebinput_input_state(void *data, break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog( - rwebinput->joypad, joypad_info, port, - idx, id, binds[port]); - if (!ret) - ret = rwebinput_analog_pressed( + return rwebinput_analog_pressed( rwebinput, joypad_info, binds[port], idx, id); - return ret; - } + break; case RETRO_DEVICE_KEYBOARD: return rwebinput_key_pressed(rwebinput, id); case RETRO_DEVICE_MOUSE: @@ -642,10 +636,12 @@ static void rwebinput_process_keyboard_events(rwebinput_input_t *rwebinput, else if (translated_keycode == RETROK_TAB) character = '\t'; - input_keyboard_event(keydown, translated_keycode, character, mod, - RETRO_DEVICE_KEYBOARD); - - if (translated_keycode < RETROK_LAST) + if (translated_keycode != RETROK_UNKNOWN) { + input_keyboard_event(keydown, translated_keycode, character, mod, + RETRO_DEVICE_KEYBOARD); + } + + if (translated_keycode < RETROK_LAST && translated_keycode != RETROK_UNKNOWN) { rwebinput->keys[translated_keycode] = keydown; } diff --git a/input/drivers/sdl_input.c b/input/drivers/sdl_input.c index 53966518fc..d0760dc56f 100644 --- a/input/drivers/sdl_input.c +++ b/input/drivers/sdl_input.c @@ -202,18 +202,14 @@ static int16_t sdl_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = sdl->joypad->state( + joypad_info, binds[port], port); for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) - { - if (button_is_pressed( - sdl->joypad, joypad_info, binds[port], port, i)) + if (sdl_key_pressed(binds[port][i].key)) ret |= (1 << i); - else if (sdl_key_pressed(binds[port][i].key)) - ret |= (1 << i); - } } return ret; @@ -235,13 +231,7 @@ static int16_t sdl_input_state(void *data, break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog(sdl->joypad, - joypad_info, port, idx, id, binds[port]); - if (!ret) - ret = sdl_analog_pressed(sdl, binds[port], idx, id); - return ret; - } + return sdl_analog_pressed(sdl, binds[port], idx, id); break; case RETRO_DEVICE_MOUSE: if (config_get_ptr()->uints.input_mouse_index[ port ] == 0) diff --git a/input/drivers/switch_input.c b/input/drivers/switch_input.c index 7ed1b7ad04..76eabeac0f 100644 --- a/input/drivers/switch_input.c +++ b/input/drivers/switch_input.c @@ -394,37 +394,16 @@ static int16_t switch_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed(sw->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } + return sw->joypad->state( + joypad_info, binds[port], port); - return ret; - } - else - { - if (binds[port][id].valid) - { - if ( - button_is_pressed(sw->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } + if (binds[port][id].valid) + if ( + button_is_pressed(sw->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(sw->joypad, - joypad_info, port, idx, id, binds[port]); break; #ifdef HAVE_LIBNX case RETRO_DEVICE_KEYBOARD: diff --git a/input/drivers/udev_input.c b/input/drivers/udev_input.c index 6345c44076..33da6b0548 100644 --- a/input/drivers/udev_input.c +++ b/input/drivers/udev_input.c @@ -823,10 +823,16 @@ static int16_t udev_lightgun_aiming_state( if (!mouse) return 0; +#ifdef HAVE_X11 + /* udev->pointer_x and y is only set in X11 */ if (!(video_driver_translate_coord_viewport_wrap( &vp, udev->pointer_x, udev->pointer_y, &res_x, &res_y, &res_screen_x, &res_screen_y))) return 0; +#else + res_x = udev_mouse_get_pointer_x(mouse, false); + res_y = udev_mouse_get_pointer_y(mouse, false); +#endif inside = (res_x >= -edge_detect) && (res_y >= -edge_detect) @@ -975,6 +981,31 @@ static int16_t udev_pointer_state(udev_input_t *udev, return 0; } +static int16_t udev_input_lightgun_state( + udev_input_t *udev, + rarch_joypad_info_t *joypad_info, + const struct retro_keybind **binds, + unsigned port, unsigned device, unsigned idx, unsigned id) +{ + if (!input_udev.keyboard_mapping_blocked) + if ((binds[port][id].key < RETROK_LAST) + && udev_keyboard_pressed(udev, binds[port] + [id].key) ) + return 1; + if (binds[port][id].valid) + { + unsigned new_id = id; + if (button_is_pressed(udev->joypad, + joypad_info, binds[port], + port, new_id) + || udev_mouse_button_pressed(udev, port, + binds[port][new_id].mbutton) + ) + return 1; + } + return 0; +} + static int16_t udev_input_state(void *data, rarch_joypad_info_t *joypad_info, const struct retro_keybind **binds, @@ -988,36 +1019,26 @@ static int16_t udev_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; - if (input_udev.keyboard_mapping_blocked) + int16_t ret = udev->joypad->state( + joypad_info, binds[port], port); + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + if (binds[port][i].valid) { - if (binds[port][i].valid) - { - if (button_is_pressed( - udev->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if (udev_mouse_button_pressed(udev, port, binds[port][i].mbutton)) - ret |= (1 << i); - } + if (udev_mouse_button_pressed(udev, port, binds[port][i].mbutton)) + ret |= (1 << i); } } - else + if (!input_udev.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if ((binds[port][i].key < RETROK_LAST) && + if ((binds[port][i].key < RETROK_LAST) && udev_keyboard_pressed(udev, binds[port][i].key)) ret |= (1 << i); - else if (udev_mouse_button_pressed(udev, port, binds[port][i].mbutton)) - ret |= (1 << i); } } } @@ -1049,13 +1070,8 @@ static int16_t udev_input_state(void *data, break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog(udev->joypad, - joypad_info, port, idx, id, binds[port]); - if (!ret) - ret = udev_analog_pressed(binds[port], idx, id); - return ret; - } + return udev_analog_pressed(binds[port], idx, id); + break; case RETRO_DEVICE_KEYBOARD: return (id < RETROK_LAST) && udev_keyboard_pressed(udev, id); @@ -1084,204 +1100,38 @@ static int16_t udev_input_state(void *data, /*buttons*/ case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_TRIGGER].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_TRIGGER].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_TRIGGER].valid) - { - unsigned new_id = RARCH_LIGHTGUN_TRIGGER; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_TRIGGER); case RETRO_DEVICE_ID_LIGHTGUN_RELOAD: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_RELOAD].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_RELOAD].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_RELOAD].valid) - { - unsigned new_id = RARCH_LIGHTGUN_RELOAD; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_RELOAD); case RETRO_DEVICE_ID_LIGHTGUN_AUX_A: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_A].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_AUX_A].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_A].valid) - { - unsigned new_id = RARCH_LIGHTGUN_AUX_A; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_A); case RETRO_DEVICE_ID_LIGHTGUN_AUX_B: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_B].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_AUX_B].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_B].valid) - { - unsigned new_id = RARCH_LIGHTGUN_AUX_B; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_B); case RETRO_DEVICE_ID_LIGHTGUN_AUX_C: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_C].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_AUX_C].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_C].valid) - { - unsigned new_id = RARCH_LIGHTGUN_AUX_C; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_C); case RETRO_DEVICE_ID_LIGHTGUN_START: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_START].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_START].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_START].valid) - { - unsigned new_id = RARCH_LIGHTGUN_START; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_START); case RETRO_DEVICE_ID_LIGHTGUN_SELECT: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_SELECT].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_SELECT].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_SELECT].valid) - { - unsigned new_id = RARCH_LIGHTGUN_SELECT; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_SELECT); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_UP].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_DPAD_UP].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_UP].valid) - { - unsigned new_id = RARCH_LIGHTGUN_DPAD_UP; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_UP); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_DOWN].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_DPAD_DOWN].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_DOWN].valid) - { - unsigned new_id = RARCH_LIGHTGUN_DPAD_DOWN; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_DOWN); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_LEFT].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_DPAD_LEFT].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_LEFT].valid) - { - unsigned new_id = RARCH_LIGHTGUN_DPAD_LEFT; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_LEFT); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT: - if (!input_udev.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_RIGHT].key < RETROK_LAST) - && udev_keyboard_pressed(udev, binds[port] - [RARCH_LIGHTGUN_DPAD_RIGHT].key) ) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_RIGHT].valid) - { - unsigned new_id = RARCH_LIGHTGUN_DPAD_RIGHT; - if (button_is_pressed(udev->joypad, - joypad_info, binds[port], - port, new_id) - || udev_mouse_button_pressed(udev, port, - binds[port][new_id].mbutton) - ) - return 1; - } - break; - + return udev_input_lightgun_state(udev, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_RIGHT); /*deprecated*/ case RETRO_DEVICE_ID_LIGHTGUN_X: { diff --git a/input/drivers/uwp_input.c b/input/drivers/uwp_input.c index 322952964d..146daa6e54 100644 --- a/input/drivers/uwp_input.c +++ b/input/drivers/uwp_input.c @@ -112,7 +112,7 @@ static int16_t uwp_pressed_analog(uwp_input_t *uwp, unsigned port, unsigned idx, unsigned id) { const struct retro_keybind *bind_minus, *bind_plus; - int16_t pressed_minus = 0, pressed_plus = 0, pressed_keyboard; + int16_t pressed_minus = 0, pressed_plus = 0; unsigned id_minus = 0, id_plus = 0; /* First, process the keyboard bindings */ @@ -131,13 +131,7 @@ static int16_t uwp_pressed_analog(uwp_input_t *uwp, && uwp_keyboard_pressed(bind_plus->key)) pressed_plus = 0x7fff; - pressed_keyboard = pressed_plus + pressed_minus; - if (pressed_keyboard != 0) - return pressed_keyboard; - - /* Then, process the joypad bindings */ - return input_joypad_analog(uwp->joypad, - joypad_info, port, idx, id, binds); + return pressed_plus + pressed_minus; } static int16_t uwp_input_state(void *data, @@ -154,17 +148,16 @@ static int16_t uwp_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = uwp->joypad->state( + joypad_info, binds[port], port); + if (input_uwp.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - uwp->joypad, joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if (uwp_mouse_state(port, + if (uwp_mouse_state(port, binds[port][i].mbutton, false)) ret |= (1 << i); } @@ -176,9 +169,9 @@ static int16_t uwp_input_state(void *data, { if (binds[port][i].valid) { - if ( button_is_pressed( - uwp->joypad, joypad_info, binds[port], port, i) - || ((binds[port][i].key < RETROK_LAST) && uwp_keyboard_pressed(binds[port][i].key)) + if ( + ((binds[port][i].key < RETROK_LAST) + && uwp_keyboard_pressed(binds[port][i].key)) ) ret |= (1 << i); else if (uwp_mouse_state(port, diff --git a/input/drivers/wayland_input.c b/input/drivers/wayland_input.c index e869b87a88..dba61d8158 100644 --- a/input/drivers/wayland_input.c +++ b/input/drivers/wayland_input.c @@ -40,8 +40,7 @@ #include "../input_keymaps.h" #include "../common/linux_common.h" - -#include "../../gfx/common/wayland_common.h" +#include "../common/wayland_common.h" #include "../../retroarch.h" #include "../../verbosity.h" @@ -100,8 +99,17 @@ static int16_t input_wl_lightgun_state( } /* forward declaration */ -bool wayland_context_gettouchpos(void *data, unsigned id, - unsigned* touch_x, unsigned* touch_y); +static bool wayland_context_gettouchpos(void *data, unsigned id, + unsigned* touch_x, unsigned* touch_y) +{ + gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*)data; + + if (id >= MAX_TOUCHES) + return false; + *touch_x = wl->active_touch_positions[id].x; + *touch_y = wl->active_touch_positions[id].y; + return wl->active_touch_positions[id].active; +} static void input_wl_touch_pool(void *data) { @@ -300,15 +308,14 @@ static int16_t input_wl_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = wl->joypad->state( + joypad_info, binds[port], port); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed(wl->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - else if (BIT_GET(wl->key_state, + if (BIT_GET(wl->key_state, rarch_keysym_lut[binds[port][i].key]) ) ret |= (1 << i); } @@ -334,13 +341,7 @@ static int16_t input_wl_state(void *data, break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog( - wl->joypad, joypad_info, port, idx, id, binds[port]); - if (!ret) - ret = input_wl_analog_pressed(wl, binds[port], idx, id); - return ret; - } + return input_wl_analog_pressed(wl, binds[port], idx, id); break; case RETRO_DEVICE_KEYBOARD: return input_wl_state_kb(wl, binds, port, device, idx, id); diff --git a/input/drivers/wiiu_input.c b/input/drivers/wiiu_input.c index 15dab33bec..849ce8abbd 100644 --- a/input/drivers/wiiu_input.c +++ b/input/drivers/wiiu_input.c @@ -136,37 +136,19 @@ static int16_t wiiu_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; + return wiiu->joypad->state( + joypad_info, binds[port], port); - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - if (button_is_pressed( - wiiu->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - } - - return ret; - } - else - { - if (binds[port][id].valid) - return button_is_pressed( - wiiu->joypad, - joypad_info, binds[port], port, id); - } + if (binds[port][id].valid) + return button_is_pressed( + wiiu->joypad, + joypad_info, binds[port], port, id); break; case RETRO_DEVICE_KEYBOARD: if (id < RETROK_LAST && keyboard_state[id] && (keyboard_channel > 0)) return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(wiiu->joypad, - joypad_info, port, idx, id, binds[port]); break; case RETRO_DEVICE_POINTER: case RARCH_DEVICE_POINTER_SCREEN: diff --git a/input/drivers/winraw_input.c b/input/drivers/winraw_input.c index c912964c03..4316036d13 100644 --- a/input/drivers/winraw_input.c +++ b/input/drivers/winraw_input.c @@ -43,6 +43,7 @@ typedef struct const input_device_driver_t *joypad; } winraw_input_t; +/* TODO/FIXME - static globals */ static winraw_keyboard_t *g_keyboard = NULL; static winraw_mouse_t *g_mice = NULL; static unsigned g_mouse_cnt = 0; @@ -338,7 +339,8 @@ static void winraw_init_mouse_xy_mapping(void) } } -static int16_t winraw_deprecated_lightgun_state(winraw_input_t *wr, +static int16_t winraw_deprecated_lightgun_state( + winraw_input_t *wr, winraw_mouse_t *mouse, unsigned port, unsigned id) { @@ -562,10 +564,35 @@ static void winraw_poll(void *d) wr->joypad->poll(); } +static int16_t winraw_input_lightgun_state( + winraw_input_t *wr, + winraw_mouse_t *mouse, + rarch_joypad_info_t *joypad_info, + const struct retro_keybind **binds, + unsigned port, unsigned device, unsigned idx, unsigned id) +{ + if (!input_winraw.keyboard_mapping_blocked) + if ((binds[port][id].key < RETROK_LAST) + && winraw_keyboard_pressed(wr, binds[port] + [id].key)) + return 1; + if (binds[port][id].valid) + { + if (mouse && winraw_mouse_button_pressed(wr, + mouse, port, binds[port] + [id].mbutton)) + return 1; + return button_is_pressed( + wr->joypad, joypad_info, binds[port], + port, id); + } + return 0; +} + static int16_t winraw_input_state(void *d, rarch_joypad_info_t *joypad_info, const struct retro_keybind **binds, - unsigned port, unsigned device, unsigned index, unsigned id) + unsigned port, unsigned device, unsigned idx, unsigned id) { settings_t *settings = NULL; winraw_mouse_t *mouse = NULL; @@ -599,40 +626,31 @@ static int16_t winraw_input_state(void *d, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; + int16_t ret = wr->joypad->state( + joypad_info, binds[port], port); - if (input_winraw.keyboard_mapping_blocked) + if (mouse) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - wr->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if (mouse && winraw_mouse_button_pressed(wr, + if (winraw_mouse_button_pressed(wr, mouse, port, binds[port][i].mbutton)) ret |= (1 << i); } } } - else + + if (!input_winraw.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - wr->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if ((binds[port][i].key < RETROK_LAST) && + if ((binds[port][i].key < RETROK_LAST) && winraw_keyboard_pressed(wr, binds[port][i].key)) ret |= (1 << i); - else if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port][i].mbutton)) - ret |= (1 << i); } } } @@ -664,9 +682,6 @@ static int16_t winraw_input_state(void *d, } break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(wr->joypad, joypad_info, - port, index, id, binds[port]); break; case RETRO_DEVICE_KEYBOARD: return (id < RETROK_LAST) && winraw_keyboard_pressed(wr, id); @@ -690,184 +705,38 @@ static int16_t winraw_input_state(void *d, break; /*buttons*/ case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_TRIGGER].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_TRIGGER].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_TRIGGER].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_TRIGGER].mbutton)) - return 1; - return button_is_pressed( - wr->joypad, joypad_info, binds[port], - port, RARCH_LIGHTGUN_TRIGGER); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_TRIGGER); case RETRO_DEVICE_ID_LIGHTGUN_RELOAD: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_RELOAD].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_RELOAD].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_RELOAD].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_RELOAD].mbutton)) - return 1; - return button_is_pressed( - wr->joypad, joypad_info, binds[port], - port, RARCH_LIGHTGUN_RELOAD); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_RELOAD); case RETRO_DEVICE_ID_LIGHTGUN_AUX_A: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_A].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_AUX_A].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_A].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_AUX_A].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_A); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_A); case RETRO_DEVICE_ID_LIGHTGUN_AUX_B: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_B].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_AUX_B].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_B].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_AUX_B].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_B); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_B); case RETRO_DEVICE_ID_LIGHTGUN_AUX_C: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_AUX_C].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_AUX_C].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_AUX_C].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_AUX_C].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_C); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_AUX_C); case RETRO_DEVICE_ID_LIGHTGUN_START: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_START].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_START].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_START].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_START].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_START); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_START); case RETRO_DEVICE_ID_LIGHTGUN_SELECT: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_SELECT].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_SELECT].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_SELECT].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_SELECT].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_SELECT); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_SELECT); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_UP].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_DPAD_UP].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_UP].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_DPAD_UP].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_UP); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_UP); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_DOWN].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_DPAD_DOWN].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_DOWN].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_DPAD_DOWN].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_DOWN); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_DOWN); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_LEFT].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_DPAD_LEFT].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_LEFT].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_DPAD_LEFT].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_LEFT); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_LEFT); case RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_DPAD_RIGHT].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_DPAD_RIGHT].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_DPAD_RIGHT].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_DPAD_RIGHT].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_RIGHT); - } - break; - + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_DPAD_RIGHT); /*deprecated*/ case RETRO_DEVICE_ID_LIGHTGUN_X: case RETRO_DEVICE_ID_LIGHTGUN_Y: @@ -875,21 +744,8 @@ static int16_t winraw_input_state(void *d, return winraw_deprecated_lightgun_state(wr, mouse, port, id); break; case RETRO_DEVICE_ID_LIGHTGUN_PAUSE: - if (!input_winraw.keyboard_mapping_blocked) - if ((binds[port][RARCH_LIGHTGUN_START].key < RETROK_LAST) - && winraw_keyboard_pressed(wr, binds[port] - [RARCH_LIGHTGUN_START].key)) - return 1; - if (binds[port][RARCH_LIGHTGUN_START].valid) - { - if (mouse && winraw_mouse_button_pressed(wr, - mouse, port, binds[port] - [RARCH_LIGHTGUN_START].mbutton)) - return 1; - return button_is_pressed(wr->joypad, - joypad_info, binds[port], port, RARCH_LIGHTGUN_START); - } - break; + return winraw_input_lightgun_state(wr, mouse, joypad_info, + binds, port, device, idx, RARCH_LIGHTGUN_START); } break; } diff --git a/input/drivers/x11_input.c b/input/drivers/x11_input.c index 5a5c7600ee..ec8ddd84d8 100644 --- a/input/drivers/x11_input.c +++ b/input/drivers/x11_input.c @@ -81,14 +81,6 @@ static bool x_mouse_button_pressed( x11_input_t *x11, unsigned port, unsigned key) { bool result; - settings_t *settings = config_get_ptr(); - - if (port >= MAX_USERS) - return false; - - /* the driver only supports one mouse */ - if ( settings->uints.input_mouse_index[ port ] != 0 ) - return false; switch ( key ) { @@ -281,7 +273,11 @@ static int16_t x_input_state(void *data, const struct retro_keybind **binds, unsigned port, unsigned device, unsigned idx, unsigned id) { - x11_input_t *x11 = (x11_input_t*)data; + x11_input_t *x11 = (x11_input_t*)data; + settings_t *settings = config_get_ptr(); + + if (port >= MAX_USERS) + return 0; switch (device) { @@ -289,38 +285,30 @@ static int16_t x_input_state(void *data, if (id == RETRO_DEVICE_ID_JOYPAD_MASK) { unsigned i; - int16_t ret = 0; - if (input_x.keyboard_mapping_blocked) + int16_t ret = x11->joypad->state( + joypad_info, binds[port], port); + + if (settings->uints.input_mouse_index[port] == 0) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( - x11->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if (x_mouse_button_pressed(x11, port, + if (x_mouse_button_pressed(x11, port, binds[port][i].mbutton)) ret |= (1 << i); } } } - else + if (!input_x.keyboard_mapping_blocked) { for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) { if (binds[port][i].valid) { - if (button_is_pressed( x11->joypad, - joypad_info, binds[port], port, i)) - ret |= (1 << i); - else if ((binds[port][i].key < RETROK_LAST) && + if ((binds[port][i].key < RETROK_LAST) && x_keyboard_pressed(x11, binds[port][i].key)) ret |= (1 << i); - else if (x_mouse_button_pressed(x11, port, - binds[port][i].mbutton)) - ret |= (1 << i); } } } @@ -343,23 +331,20 @@ static int16_t x_input_state(void *data, || !input_x.keyboard_mapping_blocked) ) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][id].mbutton)) + return 1; + } } } } break; case RETRO_DEVICE_ANALOG: if (binds[port]) - { - int16_t ret = input_joypad_analog(x11->joypad, joypad_info, - port, idx, - id, binds[port]); - if (!ret) - ret = x_pressed_analog(x11, binds[port], idx, id); - return ret; - } + return x_pressed_analog(x11, binds[port], idx, id); + break; case RETRO_DEVICE_KEYBOARD: return (id < RETROK_LAST) && x_keyboard_pressed(x11, id); case RETRO_DEVICE_MOUSE: @@ -397,9 +382,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -417,9 +405,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -437,9 +428,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -457,9 +451,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -477,9 +474,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -497,9 +497,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -517,9 +520,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -537,9 +543,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -557,9 +566,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -577,9 +589,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -597,9 +612,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; @@ -622,9 +640,12 @@ static int16_t x_input_state(void *data, joypad_info, binds[port], port, new_id)) return 1; - else if (x_mouse_button_pressed(x11, port, - binds[port][new_id].mbutton)) - return 1; + else if (settings->uints.input_mouse_index[port] == 0) + { + if (x_mouse_button_pressed(x11, port, + binds[port][new_id].mbutton)) + return 1; + } } } break; diff --git a/input/drivers/xdk_xinput_input.c b/input/drivers/xdk_xinput_input.c index 5c4d9cd051..59fd13e607 100644 --- a/input/drivers/xdk_xinput_input.c +++ b/input/drivers/xdk_xinput_input.c @@ -63,37 +63,16 @@ static int16_t xdk_input_state(void *data, { case RETRO_DEVICE_JOYPAD: if (id == RETRO_DEVICE_ID_JOYPAD_MASK) - { - unsigned i; - int16_t ret = 0; + return xdk->joypad->state( + joypad_info, binds[port], port); - for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) - { - if (binds[port][i].valid) - { - if ( - button_is_pressed(xdk->joypad, joypad_info, binds[port], - port, i)) - ret |= (1 << i); - } - } - - return ret; - } - else - { - if (binds[port][id].valid) - { - if ( - button_is_pressed(xdk->joypad, joypad_info, binds[port], - port, id)) - return 1; - } - } + if (binds[port][id].valid) + if ( + button_is_pressed(xdk->joypad, joypad_info, binds[port], + port, id)) + return 1; break; case RETRO_DEVICE_ANALOG: - if (binds[port]) - return input_joypad_analog(xdk->joypad, joypad_info, port, index, id, binds[port]); break; } diff --git a/input/drivers/xenon360_input.c b/input/drivers/xenon360_input.c index 378b9d9337..1358b50037 100644 --- a/input/drivers/xenon360_input.c +++ b/input/drivers/xenon360_input.c @@ -142,6 +142,11 @@ static bool xenon360_input_set_rumble(void *data, unsigned port, return false; } +static const input_device_driver_t *xenon360_get_joypad_driver(void *data) +{ + return NULL; +} + input_driver_t input_xenon360 = { xenon360_input_init, xenon360_input_poll, @@ -155,6 +160,7 @@ input_driver_t input_xenon360 = { xenon360_input_grab_mouse, NULL, xenon360_input_set_rumble, + xenon360_get_joypad_driver, NULL, false }; diff --git a/input/drivers_hid/btstack_hid.c b/input/drivers_hid/btstack_hid.c index f690a26a80..494f608c91 100644 --- a/input/drivers_hid/btstack_hid.c +++ b/input/drivers_hid/btstack_hid.c @@ -1363,21 +1363,53 @@ static void btstack_hid_joypad_get_buttons(void *data, unsigned port, BIT256_CLEAR_ALL_PTR(state); } -static bool btstack_hid_joypad_button(void *data, +static int16_t btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey) { - input_bits_t buttons; - btstack_hid_joypad_get_buttons(data, port, &buttons); + input_bits_t buttons; + btstack_hid_joypad_get_buttons(data, port, &buttons); - /* Check hat. */ - if (GET_HAT_DIR(joykey)) - return false; + /* Check hat. */ + if (GET_HAT_DIR(joykey)) + return 0; + else if ((port < MAX_USERS) && (joykey < 32)) + return (BIT256_GET(buttons, joykey) != 0); + return 0; +} - /* Check the button. */ - if ((port < MAX_USERS) && (joykey < 32)) - return (BIT256_GET(buttons, joykey) != 0); +static int16_t btstack_hid_joypad_state( + void *data, + rarch_joypad_info_t *joypad_info, + const void *binds_data, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct retro_keybind *binds = (const struct retro_keybind*)binds_data; + const struct dinput_joypad_data *pad = &g_pads[port]; - return false; + if (!pad || !pad->joypad) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && btstack_hid_joypad_button(data, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(btstack_hid_joypad_axis(data, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; } static bool btstack_hid_joypad_rumble(void *data, unsigned pad, @@ -1394,9 +1426,6 @@ static int16_t btstack_hid_joypad_axis(void *data, unsigned port, uint32_t joyax btstack_hid_t *hid = (btstack_hid_t*)data; int16_t val = 0; - if (joyaxis == AXIS_NONE) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { val += pad_connection_get_axis(&hid->slots[port], port, AXIS_NEG_GET(joyaxis)); @@ -1462,6 +1491,7 @@ hid_driver_t btstack_hid = { btstack_hid_joypad_query, btstack_hid_free, btstack_hid_joypad_button, + btstack_hid_joypad_state, btstack_hid_joypad_get_buttons, btstack_hid_joypad_axis, btstack_hid_poll, diff --git a/input/drivers_hid/iohidmanager_hid.c b/input/drivers_hid/iohidmanager_hid.c index da2a99f16a..9c1f7bef2a 100644 --- a/input/drivers_hid/iohidmanager_hid.c +++ b/input/drivers_hid/iohidmanager_hid.c @@ -146,52 +146,46 @@ static void iohidmanager_hid_joypad_get_buttons(void *data, BIT256_CLEAR_ALL_PTR(state); } -static bool iohidmanager_hid_joypad_button(void *data, +static int16_t iohidmanager_hid_joypad_button(void *data, unsigned port, uint16_t joykey) { - input_bits_t buttons; - iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; - unsigned hat_dir = GET_HAT_DIR(joykey); + unsigned hat_dir; + input_bits_t buttons; + iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; - iohidmanager_hid_joypad_get_buttons(data, port, &buttons); + if (port >= DEFAULT_MAX_PADS) + return 0; + + iohidmanager_hid_joypad_get_buttons(data, port, &buttons); + + hat_dir = GET_HAT_DIR(joykey); /* Check hat. */ if (hat_dir) { unsigned h = GET_HAT(joykey); if (h >= 1) - return false; + return 0; - switch(hat_dir) + switch (hat_dir) { case HAT_LEFT_MASK: - return hid->hats[port][0] < 0; + return (hid->hats[port][0] < 0); case HAT_RIGHT_MASK: - return hid->hats[port][0] > 0; + return (hid->hats[port][0] > 0); case HAT_UP_MASK: - return hid->hats[port][1] < 0; + return (hid->hats[port][1] < 0); case HAT_DOWN_MASK: - return hid->hats[port][1] > 0; + return (hid->hats[port][1] > 0); + default: + break; } - - return 0; + /* hat requested and no hat button down */ } - - /* Check the button. */ - if ((port < MAX_USERS) && (joykey < 32)) - return (BIT256_GET(buttons, joykey) != 0) - || ((hid->buttons[port] & (1 << joykey)) != 0); - - return false; -} - -static bool iohidmanager_hid_joypad_rumble(void *data, unsigned pad, - enum retro_rumble_effect effect, uint16_t strength) -{ - iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; - if (!hid) - return false; - return pad_connection_rumble(&hid->slots[pad], pad, effect, strength); + else if (joykey < 32) + return ((BIT256_GET(buttons, joykey) != 0) + || ((hid->buttons[port] & (1 << joykey)) != 0)); + return 0; } static int16_t iohidmanager_hid_joypad_axis(void *data, @@ -200,9 +194,6 @@ static int16_t iohidmanager_hid_joypad_axis(void *data, iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; int16_t val = 0; - if (joyaxis == AXIS_NONE) - return 0; - if (AXIS_NEG_GET(joyaxis) < 11) { val += hid->axes[port][AXIS_NEG_GET(joyaxis)]; @@ -225,6 +216,47 @@ static int16_t iohidmanager_hid_joypad_axis(void *data, return val; } + +static int16_t iohidmanager_hid_joypad_state( + void *data, + rarch_joypad_info_t *joypad_info, + const void *binds_data, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct retro_keybind *binds = (const struct retro_keybind*)binds_data; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && iohidmanager_hid_joypad_button(data, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(iohidmanager_hid_joypad_axis(data, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + +static bool iohidmanager_hid_joypad_rumble(void *data, unsigned pad, + enum retro_rumble_effect effect, uint16_t strength) +{ + iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data; + if (!hid) + return false; + return pad_connection_rumble(&hid->slots[pad], pad, effect, strength); +} + static void iohidmanager_hid_device_send_control(void *data, uint8_t* data_buf, size_t size) { @@ -1131,6 +1163,7 @@ hid_driver_t iohidmanager_hid = { iohidmanager_hid_joypad_query, iohidmanager_hid_free, iohidmanager_hid_joypad_button, + iohidmanager_hid_joypad_state, iohidmanager_hid_joypad_get_buttons, iohidmanager_hid_joypad_axis, iohidmanager_hid_poll, diff --git a/input/drivers_hid/libusb_hid.c b/input/drivers_hid/libusb_hid.c index 6d0c7f3c7b..824e0f48fe 100644 --- a/input/drivers_hid/libusb_hid.c +++ b/input/drivers_hid/libusb_hid.c @@ -94,13 +94,13 @@ static void adapter_thread(void *data) int size = 0; slock_lock(adapter->send_control_lock); - if (fifo_read_avail(adapter->send_control_buffer) + if (FIFO_READ_AVAIL(adapter->send_control_buffer) >= sizeof(send_command_size)) { fifo_read(adapter->send_control_buffer, &send_command_size, sizeof(send_command_size)); - if (fifo_read_avail(adapter->send_control_buffer) + if (FIFO_READ_AVAIL(adapter->send_control_buffer) >= sizeof(send_command_size)) { fifo_read(adapter->send_control_buffer, @@ -132,7 +132,7 @@ static void libusb_hid_device_send_control(void *data, slock_lock(adapter->send_control_lock); - if (fifo_write_avail(adapter->send_control_buffer) >= size + sizeof(size)) + if (FIFO_WRITE_AVAIL(adapter->send_control_buffer) >= size + sizeof(size)) { fifo_write(adapter->send_control_buffer, &size, sizeof(size)); fifo_write(adapter->send_control_buffer, data_buf, size); @@ -454,20 +454,21 @@ static void libusb_hid_joypad_get_buttons(void *data, unsigned port, BIT256_CLEAR_ALL_PTR(state); } -static bool libusb_hid_joypad_button(void *data, +static int16_t libusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey) { input_bits_t buttons; + + if (port >= DEFAULT_MAX_PADS) + return 0; libusb_hid_joypad_get_buttons(data, port, &buttons); /* Check hat. */ if (GET_HAT_DIR(joykey)) - return false; - - /* Check the button. */ - if ((port < MAX_USERS) && (joykey < 32)) + return 0; + else if (joykey < 32) return (BIT256_GET(buttons, joykey) != 0); - return false; + return 0; } static bool libusb_hid_joypad_rumble(void *data, unsigned pad, @@ -485,9 +486,6 @@ static int16_t libusb_hid_joypad_axis(void *data, libusb_hid_t *hid = (libusb_hid_t*)data; int16_t val = 0; - if (joyaxis == AXIS_NONE) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { val = pad_connection_get_axis(&hid->slots[port], @@ -508,11 +506,42 @@ static int16_t libusb_hid_joypad_axis(void *data, return val; } +static int16_t libusb_hid_joypad_state( + void *data, + rarch_joypad_info_t *joypad_info, + const void *binds_data, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct retro_keybind *binds = (const struct retro_keybind*)binds_data; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && libusb_hid_joypad_button(data, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(libusb_hid_joypad_axis(data, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void libusb_hid_free(const void *data) { libusb_hid_t *hid = (libusb_hid_t*)data; - while(adapters.next) + while (adapters.next) if (remove_adapter(hid, adapters.next->device) == -1) RARCH_ERR("could not remove device %p\n", adapters.next->device); @@ -647,6 +676,7 @@ hid_driver_t libusb_hid = { libusb_hid_joypad_query, libusb_hid_free, libusb_hid_joypad_button, + libusb_hid_joypad_state, libusb_hid_joypad_get_buttons, libusb_hid_joypad_axis, libusb_hid_poll, diff --git a/input/drivers_hid/wiiu_hid.c b/input/drivers_hid/wiiu_hid.c index 998bc1b479..83039f0eba 100644 --- a/input/drivers_hid/wiiu_hid.c +++ b/input/drivers_hid/wiiu_hid.c @@ -17,10 +17,13 @@ #include "../include/wiiu/hid.h" #include +/* TODO/FIXME - static globals */ static wiiu_event_list events; static wiiu_adapter_list adapters; -static void report_hid_error(const char *msg, wiiu_adapter_t *adapter, int32_t error); +/* Forward declaration */ +static void report_hid_error(const char *msg, + wiiu_adapter_t *adapter, int32_t error); static bool wiiu_hid_joypad_query(void *data, unsigned slot) { @@ -61,16 +64,47 @@ static void wiiu_hid_joypad_get_buttons(void *data, unsigned slot, input_bits_t pad->iface->get_buttons(pad->data, state); } -static bool wiiu_hid_joypad_button(void *data, unsigned slot, uint16_t joykey) +static int16_t wiiu_hid_joypad_button(void *data, + unsigned slot, uint16_t joykey) { - joypad_connection_t *pad = get_pad((wiiu_hid_t *)data, slot); - + joypad_connection_t *pad = get_pad((wiiu_hid_t *)data, slot); if (!pad) - return false; - + return 0; return pad->iface->button(pad->data, joykey); } +static int16_t wiiu_hid_joypad_state( + void *data, + rarch_joypad_info_t *joypad_info, + const void *binds_data, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct retro_keybind *binds = (const struct retro_keybind*)binds_data; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && wiiu_hid_joypad_button( + data, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(wiiu_hid_joypad_axis(data, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static bool wiiu_hid_joypad_rumble(void *data, unsigned slot, enum retro_rumble_effect effect, uint16_t strength) { @@ -136,7 +170,7 @@ static void wiiu_hid_free(const void *data) if (events.list) { wiiu_attach_event *event = NULL; - while( (event = events.list) != NULL) + while ((event = events.list) != NULL) { events.list = event->next; delete_attach_event(event); @@ -496,9 +530,7 @@ static void wiiu_hid_read_loop_callback(uint32_t handle, int32_t error, } if (error < 0) - { report_hid_error("async read failed", adapter, error); - } if (adapter->state == ADAPTER_STATE_READING) { @@ -593,7 +625,7 @@ static void wiiu_hid_polling_thread_cleanup(OSThread *thread, void *stack) if (incomplete == 0) { RARCH_LOG("All in-flight reads complete.\n"); - while(adapters.list != NULL) + while (adapters.list) { RARCH_LOG("[hid]: shutting down adapter..\n"); adapter = adapters.list; @@ -610,7 +642,7 @@ static void wiiu_hid_polling_thread_cleanup(OSThread *thread, void *stack) RARCH_WARN("[hid]: timed out waiting for in-flight read to finish.\n"); incomplete = 0; } - } while(incomplete); + } while (incomplete); } static void wiiu_handle_attach_events(wiiu_hid_t *hid, wiiu_attach_event *list) @@ -667,7 +699,7 @@ static int wiiu_hid_polling_thread(int argc, const char **argv) RARCH_LOG("[hid]: polling thread is starting\n"); - while(!hid->polling_thread_quit) + while (!hid->polling_thread_quit) { wiiu_handle_attach_events(hid, synchronized_get_events_list()); wiiu_poll_adapters(hid); @@ -820,6 +852,7 @@ hid_driver_t wiiu_hid = { wiiu_hid_joypad_query, wiiu_hid_free, wiiu_hid_joypad_button, + wiiu_hid_joypad_state, wiiu_hid_joypad_get_buttons, wiiu_hid_joypad_axis, wiiu_hid_poll, diff --git a/input/drivers_hid/wiiusb_hid.c b/input/drivers_hid/wiiusb_hid.c index 554cdc234d..279e6b4c38 100644 --- a/input/drivers_hid/wiiusb_hid.c +++ b/input/drivers_hid/wiiusb_hid.c @@ -539,22 +539,54 @@ static void wiiusb_hid_joypad_get_buttons(void *data, BIT256_CLEAR_ALL_PTR(state); } -static bool wiiusb_hid_joypad_button(void *data, +static int16_t wiiusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey) { - input_bits_t buttons; + input_bits_t buttons; - wiiusb_hid_joypad_get_buttons(data, port, &buttons); + if (port >= DEFAULT_MAX_PADS) + return 0; + wiiusb_hid_joypad_get_buttons(data, port, &buttons); - /* Check hat. */ - if (GET_HAT_DIR(joykey)) - return false; + /* Check hat. */ + if (GET_HAT_DIR(joykey)) + return 0; + else if (joykey < 32) + return (BIT256_GET(buttons, joykey) != 0); - /* Check the button. */ - if ((port < MAX_USERS) && (joykey < 32)) - return (BIT256_GET(buttons, joykey) != 0); + return 0; +} - return false; +static int16_t wiiusb_hid_joypad_state( + void *data, + rarch_joypad_info_t *joypad_info, + const void *binds_data, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct retro_keybind *binds = (const struct retro_keybind*)binds_data; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && wiiusb_hid_joypad_button( + data, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(wiiusb_hid_joypad_axis(data, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; } static bool wiiusb_hid_joypad_rumble(void *data, unsigned pad, @@ -574,9 +606,6 @@ static int16_t wiiusb_hid_joypad_axis(void *data, int16_t val = 0; wiiusb_hid_t *hid = (wiiusb_hid_t*)data; - if (joyaxis == AXIS_NONE) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { val = pad_connection_get_axis(&hid->connections[port], @@ -675,6 +704,7 @@ hid_driver_t wiiusb_hid = { wiiusb_hid_joypad_query, wiiusb_hid_free, wiiusb_hid_joypad_button, + wiiusb_hid_joypad_state, wiiusb_hid_joypad_get_buttons, wiiusb_hid_joypad_axis, wiiusb_hid_poll, diff --git a/input/drivers_joypad/android_joypad.c b/input/drivers_joypad/android_joypad.c index 164007b263..c04eb81e72 100644 --- a/input/drivers_joypad/android_joypad.c +++ b/input/drivers_joypad/android_joypad.c @@ -25,51 +25,57 @@ static const char *android_joypad_name(unsigned pad) return input_config_get_device_name(pad); } -static bool android_joypad_init(void *data) -{ - return true; -} +static bool android_joypad_init(void *data) { return true; } -static bool android_joypad_button(unsigned port, uint16_t joykey) +static int16_t android_joypad_button_state( + struct android_app *android_app, + uint8_t *buf, + unsigned port, uint16_t joykey) { - uint8_t *buf = android_keyboard_state_get(port); - struct android_app *android_app = (struct android_app*)g_android; - unsigned hat_dir = GET_HAT_DIR(joykey); - - if (port >= DEFAULT_MAX_PADS) - return false; + unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) { unsigned h = GET_HAT(joykey); if (h > 0) - return false; + return 0; switch (hat_dir) { case HAT_LEFT_MASK: - return android_app->hat_state[port][0] == -1; + return (android_app->hat_state[port][0] == -1); case HAT_RIGHT_MASK: - return android_app->hat_state[port][0] == 1; + return (android_app->hat_state[port][0] == 1); case HAT_UP_MASK: - return android_app->hat_state[port][1] == -1; + return (android_app->hat_state[port][1] == -1); case HAT_DOWN_MASK: - return android_app->hat_state[port][1] == 1; + return (android_app->hat_state[port][1] == 1); default: - return false; + break; } + /* hat requested and no hat button down */ } - - return joykey < LAST_KEYCODE && BIT_GET(buf, joykey); + else if (joykey < LAST_KEYCODE) + return BIT_GET(buf, joykey); + return 0; } -static int16_t android_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t android_joypad_button(unsigned port, uint16_t joykey) +{ + struct android_app *android_app = (struct android_app*)g_android; + uint8_t *buf = android_keyboard_state_get(port); + + if (port >= DEFAULT_MAX_PADS) + return 0; + + return android_joypad_button_state(android_app, buf, port, joykey); +} + +static int16_t android_joypad_axis_state( + struct android_app *android_app, + unsigned port, uint32_t joyaxis) { int val = 0; - struct android_app *android_app = (struct android_app*)g_android; - - if (joyaxis == AXIS_NONE) - return 0; if (AXIS_NEG_GET(joyaxis) < MAX_AXIS) { @@ -87,10 +93,50 @@ static int16_t android_joypad_axis(unsigned port, uint32_t joyaxis) return val; } -static void android_joypad_poll(void) +static int16_t android_joypad_axis(unsigned port, uint32_t joyaxis) { + struct android_app *android_app = (struct android_app*)g_android; + return android_joypad_axis_state(android_app, port, joyaxis); } +static int16_t android_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + struct android_app *android_app = (struct android_app*)g_android; + uint8_t *buf = android_keyboard_state_get(port); + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ((uint16_t)joykey != NO_BTN + && android_joypad_button_state( + android_app, + buf, + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(android_joypad_axis_state( + android_app, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + +static void android_joypad_poll(void) { } + static bool android_joypad_query_pad(unsigned pad) { return (pad < MAX_USERS); @@ -115,6 +161,7 @@ input_device_driver_t android_joypad = { android_joypad_query_pad, android_joypad_destroy, android_joypad_button, + android_joypad_state, NULL, android_joypad_axis, android_joypad_poll, diff --git a/input/drivers_joypad/ctr_joypad.c b/input/drivers_joypad/ctr_joypad.c index a66ea7be07..894d674833 100644 --- a/input/drivers_joypad/ctr_joypad.c +++ b/input/drivers_joypad/ctr_joypad.c @@ -52,18 +52,14 @@ static void ctr_joypad_autodetect_add(unsigned autoconf_pad) static bool ctr_joypad_init(void *data) { ctr_joypad_autodetect_add(0); - - (void)data; - return true; } -static bool ctr_joypad_button(unsigned port_num, uint16_t key) +static int16_t ctr_joypad_button(unsigned port_num, uint16_t joykey) { if (port_num >= DEFAULT_MAX_PADS) - return false; - - return (pad_state & (1 << key)); + return 0; + return (pad_state & (1 << joykey)); } static void ctr_joypad_get_buttons(unsigned port_num, input_bits_t *state) @@ -83,7 +79,7 @@ static int16_t ctr_joypad_axis(unsigned port_num, uint32_t joyaxis) bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) + if (port_num >= DEFAULT_MAX_PADS) return 0; if (AXIS_NEG_GET(joyaxis) < 4) @@ -121,6 +117,37 @@ static int16_t ctr_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t ctr_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + + if ((uint16_t)joykey != NO_BTN && + (pad_state & (1 << (uint16_t)joykey))) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(ctr_joypad_axis(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static int16_t ctr_joypad_fix_range(int16_t val) { val = (val > 127)? 127: (val < -127)? -127: val; @@ -190,6 +217,7 @@ input_device_driver_t ctr_joypad = { ctr_joypad_query_pad, ctr_joypad_destroy, ctr_joypad_button, + ctr_joypad_state, ctr_joypad_get_buttons, ctr_joypad_axis, ctr_joypad_poll, diff --git a/input/drivers_joypad/dinput_joypad.c b/input/drivers_joypad/dinput_joypad.c index 1d2907d307..245b841c87 100644 --- a/input/drivers_joypad/dinput_joypad.c +++ b/input/drivers_joypad/dinput_joypad.c @@ -36,6 +36,13 @@ #include "../../verbosity.h" #include "dinput_joypad.h" +/* For DIJOYSTATE2 struct, rgbButtons will always have 128 elements */ +#define ARRAY_SIZE_RGB_BUTTONS 128 + +#ifndef NUM_HATS +#define NUM_HATS 4 +#endif + struct dinput_joypad_data { LPDIRECTINPUTDEVICE8 joypad; @@ -48,13 +55,7 @@ struct dinput_joypad_data DIEFFECT rumble_props; }; -/* For DIJOYSTATE2 struct, rgbButtons will always have 128 elements */ -#define ARRAY_SIZE_RGB_BUTTONS 128 - -#ifndef NUM_HATS -#define NUM_HATS 4 -#endif - +/* TODO/FIXME - static globals */ static struct dinput_joypad_data g_pads[MAX_USERS]; static unsigned g_joypad_cnt; static unsigned g_last_xinput_pad_idx; @@ -73,7 +74,9 @@ extern bool g_xinput_block_pads; extern int g_xinput_pad_indexes[MAX_USERS]; extern LPDIRECTINPUT8 g_dinput_ctx; -bool dinput_joypad_get_vidpid_from_xinput_index(int32_t index, int32_t *vid, int32_t *pid, int32_t *dinput_index) +bool dinput_joypad_get_vidpid_from_xinput_index( + int32_t index, int32_t *vid, + int32_t *pid, int32_t *dinput_index) { int i; @@ -195,14 +198,12 @@ static BOOL CALLBACK enum_axes_cb( DIPROPRANGE range; LPDIRECTINPUTDEVICE8 joypad = (LPDIRECTINPUTDEVICE8)p; - memset(&range, 0, sizeof(range)); - - range.diph.dwSize = sizeof(DIPROPRANGE); - range.diph.dwHeaderSize = sizeof(DIPROPHEADER); - range.diph.dwHow = DIPH_BYID; - range.diph.dwObj = inst->dwType; - range.lMin = -0x7fff; - range.lMax = 0x7fff; + range.diph.dwSize = sizeof(DIPROPRANGE); + range.diph.dwHeaderSize = sizeof(DIPROPHEADER); + range.diph.dwHow = DIPH_BYID; + range.diph.dwObj = inst->dwType; + range.lMin = -0x7fff; + range.lMax = 0x7fff; IDirectInputDevice8_SetProperty(joypad, DIPROP_RANGE, &range.diph); @@ -441,15 +442,11 @@ static bool dinput_joypad_init(void *data) return true; } -static bool dinput_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t dinput_joypad_button_state( + const struct dinput_joypad_data *pad, + uint16_t joykey) { - const struct dinput_joypad_data *pad = &g_pads[port_num]; - unsigned hat_dir = 0; - - if (!pad || !pad->joypad) - return false; - - hat_dir = GET_HAT_DIR(joykey); + unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) { @@ -463,61 +460,66 @@ static bool dinput_joypad_button(unsigned port_num, uint16_t joykey) { static const unsigned check1 = (JOY_POVRIGHT/2); static const unsigned check2 = (JOY_POVLEFT+JOY_POVRIGHT/2); - return - (pov == JOY_POVFORWARD) || - (pov == check1) || - (pov == check2); + return ( + (pov == JOY_POVFORWARD) || + (pov == check1) || + (pov == check2) + ); } case HAT_RIGHT_MASK: { static const unsigned check1 = (JOY_POVRIGHT/2); static const unsigned check2 = (JOY_POVRIGHT+JOY_POVRIGHT/2); - return - (pov == JOY_POVRIGHT) || - (pov == check1) || - (pov == check2); + return ( + (pov == JOY_POVRIGHT) || + (pov == check1) || + (pov == check2) + ); } case HAT_DOWN_MASK: { static const unsigned check1 = (JOY_POVRIGHT+JOY_POVRIGHT/2); static const unsigned check2 = (JOY_POVBACKWARD+JOY_POVRIGHT/2); return - (pov == JOY_POVBACKWARD) || - (pov == check1) || - (pov == check2); + ( + (pov == JOY_POVBACKWARD) || + (pov == check1) || + (pov == check2) + ); } case HAT_LEFT_MASK: { static const unsigned check1 = (JOY_POVBACKWARD+JOY_POVRIGHT/2); static const unsigned check2 = (JOY_POVLEFT+JOY_POVRIGHT/2); - return - (pov == JOY_POVLEFT) || - (pov == check1) || - (pov == check2); + + return + ( + (pov == JOY_POVLEFT) || + (pov == check1) || + (pov == check2) + ); } + default: + break; } } - - return false; + /* hat requested and no hat button down */ } - return (joykey < ARRAY_SIZE_RGB_BUTTONS) && pad->joy_state.rgbButtons[joykey]; + else if (joykey < ARRAY_SIZE_RGB_BUTTONS) + if (pad->joy_state.rgbButtons[joykey]) + return 1; + return 0; } -static int16_t dinput_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t dinput_joypad_axis_state( + const struct dinput_joypad_data *pad, + uint32_t joyaxis) { - const struct dinput_joypad_data *pad = NULL; int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE) - return 0; - - pad = &g_pads[port_num]; - if (!pad->joypad) - return 0; - if (AXIS_NEG_GET(joyaxis) <= 7) { axis = AXIS_NEG_GET(joyaxis); @@ -565,19 +567,106 @@ static int16_t dinput_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t dinput_joypad_button(unsigned port_num, uint16_t joykey) +{ + const struct dinput_joypad_data *pad = &g_pads[port_num]; + if (!pad || !pad->joypad) + return 0; + return dinput_joypad_button_state(pad, joykey); +} + +static int16_t dinput_joypad_axis(unsigned port_num, uint32_t joyaxis) +{ + const struct dinput_joypad_data *pad = &g_pads[port_num]; + if (!pad || !pad->joypad) + return 0; + return dinput_joypad_axis_state(pad, joyaxis); +} + +static int16_t dinput_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct dinput_joypad_data *pad = &g_pads[port]; + + if (!pad || !pad->joypad) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && dinput_joypad_button_state( + pad, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(dinput_joypad_axis_state(pad, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void dinput_joypad_poll(void) { unsigned i; for (i = 0; i < MAX_USERS; i++) { + unsigned j; HRESULT ret; - struct dinput_joypad_data *pad = &g_pads[i]; - bool polled = g_xinput_pad_indexes[i] < 0; + struct dinput_joypad_data *pad = &g_pads[i]; + bool polled = g_xinput_pad_indexes[i] < 0; if (!pad || !pad->joypad || !polled) continue; - memset(&pad->joy_state, 0, sizeof(pad->joy_state)); + pad->joy_state.lX = 0; + pad->joy_state.lY = 0; + pad->joy_state.lRx = 0; + pad->joy_state.lRy = 0; + pad->joy_state.lRz = 0; + pad->joy_state.rglSlider[0] = 0; + pad->joy_state.rglSlider[1] = 0; + pad->joy_state.rgdwPOV[0] = 0; + pad->joy_state.rgdwPOV[1] = 0; + pad->joy_state.rgdwPOV[2] = 0; + pad->joy_state.rgdwPOV[3] = 0; + for (j = 0; j < 128; j++) + pad->joy_state.rgbButtons[j] = 0; + + pad->joy_state.lVX = 0; + pad->joy_state.lVY = 0; + pad->joy_state.lVZ = 0; + pad->joy_state.lVRx = 0; + pad->joy_state.lVRy = 0; + pad->joy_state.lVRz = 0; + pad->joy_state.rglVSlider[0] = 0; + pad->joy_state.rglVSlider[1] = 0; + pad->joy_state.lAX = 0; + pad->joy_state.lAY = 0; + pad->joy_state.lAZ = 0; + pad->joy_state.lARx = 0; + pad->joy_state.lARy = 0; + pad->joy_state.lARz = 0; + pad->joy_state.rglASlider[0] = 0; + pad->joy_state.rglASlider[1] = 0; + pad->joy_state.lFX = 0; + pad->joy_state.lFY = 0; + pad->joy_state.lFZ = 0; + pad->joy_state.lFRx = 0; + pad->joy_state.lFRy = 0; + pad->joy_state.lFRz = 0; + pad->joy_state.rglFSlider[0] = 0; + pad->joy_state.rglFSlider[1] = 0; /* If this fails, something *really* bad must have happened. */ if (FAILED(IDirectInputDevice8_Poll(pad->joypad))) @@ -626,6 +715,7 @@ input_device_driver_t dinput_joypad = { dinput_joypad_query_pad, dinput_joypad_destroy, dinput_joypad_button, + dinput_joypad_state, NULL, dinput_joypad_axis, dinput_joypad_poll, diff --git a/input/drivers_joypad/dinput_joypad.h b/input/drivers_joypad/dinput_joypad.h index 2907a3f7b3..b6ab6c15f1 100644 --- a/input/drivers_joypad/dinput_joypad.h +++ b/input/drivers_joypad/dinput_joypad.h @@ -24,7 +24,9 @@ RETRO_BEGIN_DECLS -bool dinput_joypad_get_vidpid_from_xinput_index(int32_t index, int32_t *vid, int32_t *pid, int32_t *dinput_index); +bool dinput_joypad_get_vidpid_from_xinput_index( + int32_t index, int32_t *vid, + int32_t *pid, int32_t *dinput_index); RETRO_END_DECLS diff --git a/input/drivers_joypad/dos_joypad.c b/input/drivers_joypad/dos_joypad.c index 49b53be44a..e79f3721fc 100644 --- a/input/drivers_joypad/dos_joypad.c +++ b/input/drivers_joypad/dos_joypad.c @@ -159,18 +159,12 @@ static bool dos_joypad_init(void *data) dos_joypad_autodetect_add(0); - (void)data; - return true; } -static bool dos_joypad_button(unsigned port_num, uint16_t key) +static int16_t dos_joypad_button_state( + uint16_t *buf, uint16_t joykey) { - uint16_t *buf = dos_keyboard_state_get(port_num); - - if (port_num >= DEFAULT_MAX_PADS) - return false; - switch (key) { case RETRO_DEVICE_ID_JOYPAD_A: @@ -195,9 +189,46 @@ static bool dos_joypad_button(unsigned port_num, uint16_t key) return buf[DOSKEY_RIGHT]; } - return false; + return 0; } +static int16_t dos_joypad_button(unsigned port_num, uint16_t joykey) +{ + uint16_t *buf = dos_keyboard_state_get(port_num); + + if (port_num >= DEFAULT_MAX_PADS) + return 0; + return dos_joypad_button_state(buf, joykey); +} + +static int16_t dos_joypad_axis(unsigned port_num, uint32_t joyaxis) { return 0; } + +static int16_t dos_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + uint16_t *buf = dos_keyboard_state_get(port); + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + if ((uint16_t)joykey != NO_BTN && dos_joypad_button_state( + buf, (uint16_t)joykey)) + ret |= ( 1 << i); + } + + return ret; +} + + static void dos_joypad_poll(void) { uint32_t i; @@ -226,11 +257,6 @@ static bool dos_joypad_query_pad(unsigned pad) return (pad < MAX_USERS); } -static int16_t dos_joypad_axis(unsigned port_num, uint32_t joyaxis) -{ - return 0; -} - static void dos_joypad_destroy(void) { unhook_keyb_int(); @@ -241,6 +267,7 @@ input_device_driver_t dos_joypad = { dos_joypad_query_pad, dos_joypad_destroy, dos_joypad_button, + dos_joypad_state, NULL, dos_joypad_axis, dos_joypad_poll, diff --git a/input/drivers_joypad/gx_joypad.c b/input/drivers_joypad/gx_joypad.c index be499fa45e..d5d390b51b 100644 --- a/input/drivers_joypad/gx_joypad.c +++ b/input/drivers_joypad/gx_joypad.c @@ -243,11 +243,11 @@ static void check_port0_active(uint8_t pad_count) } } -static bool gx_joypad_button(unsigned port, uint16_t key) +static int16_t gx_joypad_button(unsigned port, uint16_t joykey) { if (port >= DEFAULT_MAX_PADS) - return false; - return (pad_state[port] & (UINT64_C(1) << key)); + return 0; + return (pad_state[port] & (UINT64_C(1) << joykey)); } static void gx_joypad_get_buttons(unsigned port, input_bits_t *state) @@ -260,51 +260,86 @@ static void gx_joypad_get_buttons(unsigned port, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t gx_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t gx_joypad_axis_state(unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { - axis = AXIS_NEG_GET(joyaxis); - is_neg = true; + axis = AXIS_NEG_GET(joyaxis); + is_neg = true; } else if (AXIS_POS_GET(joyaxis) < 4) { - axis = AXIS_POS_GET(joyaxis); - is_pos = true; + axis = AXIS_POS_GET(joyaxis); + is_pos = true; } switch (axis) { case 0: - val = analog_state[port][0][0]; + val = analog_state[port][0][0]; break; case 1: - val = analog_state[port][0][1]; + val = analog_state[port][0][1]; break; case 2: - val = analog_state[port][1][0]; + val = analog_state[port][1][0]; break; case 3: - val = analog_state[port][1][1]; + val = analog_state[port][1][1]; break; } if (is_neg && val > 0) - val = 0; + val = 0; else if (is_pos && val < 0) - val = 0; - + val = 0; return val; } +static int16_t gx_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (port >= DEFAULT_MAX_PADS) + return 0; + return gx_joypad_axis_state(port, joyaxis); +} + +static int16_t gx_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN && + (pad_state[port] & (UINT64_C(1) << joykey)) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(gx_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + #ifdef HW_RVL #ifndef PI @@ -402,10 +437,10 @@ static int16_t WPAD_StickY(WPADData *data, u8 right) static void gx_joypad_poll(void) { unsigned i, j, port; - uint8_t pad_count = 0; - uint8_t gcpad = 0; - uint64_t state_p1; - uint64_t check_menu_toggle; + uint64_t state_p1 = 0; + uint64_t check_menu_toggle = 0; + uint8_t pad_count = 0; + uint8_t gcpad = 0; pad_state[0] = 0; pad_state[1] = 0; @@ -628,6 +663,7 @@ input_device_driver_t gx_joypad = { gx_joypad_query_pad, gx_joypad_destroy, gx_joypad_button, + gx_joypad_state, gx_joypad_get_buttons, gx_joypad_axis, gx_joypad_poll, diff --git a/input/drivers_joypad/hid_joypad.c b/input/drivers_joypad/hid_joypad.c index c35aff850d..6c1a68a0cc 100644 --- a/input/drivers_joypad/hid_joypad.c +++ b/input/drivers_joypad/hid_joypad.c @@ -48,11 +48,45 @@ static void hid_joypad_free(void) generic_hid = NULL; } -static bool hid_joypad_button(unsigned port, uint16_t joykey) +static int16_t hid_joypad_button(unsigned port, uint16_t joykey) { if (generic_hid && generic_hid->button) return generic_hid->button((void*)hid_driver_get_data(), port, joykey); - return false; + return 0; +} + +static int16_t hid_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (generic_hid && generic_hid->axis) + return generic_hid->axis((void*)hid_driver_get_data(), port, joyaxis); + return 0; +} + +static int16_t hid_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ((uint16_t)joykey != NO_BTN && hid_joypad_button( + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(hid_joypad_axis(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; } static void hid_joypad_get_buttons(unsigned port, input_bits_t *state) @@ -63,13 +97,6 @@ static void hid_joypad_get_buttons(unsigned port, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t hid_joypad_axis(unsigned port, uint32_t joyaxis) -{ - if (generic_hid && generic_hid->axis) - return generic_hid->axis((void*)hid_driver_get_data(), port, joyaxis); - return 0; -} - static void hid_joypad_poll(void) { if (generic_hid && generic_hid->poll) @@ -96,6 +123,7 @@ input_device_driver_t hid_joypad = { hid_joypad_query_pad, hid_joypad_free, hid_joypad_button, + hid_joypad_state, hid_joypad_get_buttons, hid_joypad_axis, hid_joypad_poll, diff --git a/input/drivers_joypad/linuxraw_joypad.c b/input/drivers_joypad/linuxraw_joypad.c index c43c50eae7..2ccaae6ca5 100644 --- a/input/drivers_joypad/linuxraw_joypad.c +++ b/input/drivers_joypad/linuxraw_joypad.c @@ -99,7 +99,7 @@ static bool linuxraw_joypad_init_pad(const char *path, struct epoll_event event; ioctl(pad->fd, - JSIOCGNAME(sizeof(input_device_names[0])), pad->ident); + JSIOCGNAME(input_config_get_device_name_size(0)), pad->ident); event.events = EPOLLIN; event.data.ptr = pad; @@ -234,7 +234,7 @@ static bool linuxraw_joypad_init(void *data) path[0] = '\0'; pad->fd = -1; - pad->ident = input_device_names[i]; + pad->ident = input_config_get_device_name_ptr(i); snprintf(path, sizeof(path), "/dev/input/js%u", i); @@ -301,12 +301,15 @@ static void linuxraw_joypad_destroy(void) linuxraw_hotplug = false; } -static bool linuxraw_joypad_button(unsigned port, uint16_t joykey) +static int16_t linuxraw_joypad_button(unsigned port, uint16_t joykey) { - const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*) + const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*) &linuxraw_pads[port]; - - return joykey < NUM_BUTTONS && BIT32_GET(pad->buttons, joykey); + if (port >= DEFAULT_MAX_PADS) + return 0; + if (joykey < NUM_BUTTONS) + return (BIT32_GET(pad->buttons, joykey)); + return 0; } static void linuxraw_joypad_get_buttons(unsigned port, input_bits_t *state) @@ -322,16 +325,11 @@ static void linuxraw_joypad_get_buttons(unsigned port, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t linuxraw_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t linuxraw_joypad_axis_state( + const struct linuxraw_joypad *pad, + unsigned port, uint32_t joyaxis) { int16_t val = 0; - const struct linuxraw_joypad *pad = NULL; - - if (joyaxis == AXIS_NONE) - return 0; - - pad = (const struct linuxraw_joypad*)&linuxraw_pads[port]; - if (AXIS_NEG_GET(joyaxis) < NUM_AXES) { val = pad->axes[AXIS_NEG_GET(joyaxis)]; @@ -349,6 +347,46 @@ static int16_t linuxraw_joypad_axis(unsigned port, uint32_t joyaxis) return val; } +static int16_t linuxraw_joypad_axis(unsigned port, uint32_t joyaxis) +{ + const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*) + &linuxraw_pads[port]; + return linuxraw_joypad_axis_state(pad, port, joyaxis); +} + +static int16_t linuxraw_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*) + &linuxraw_pads[port]; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ((uint16_t)joykey != NO_BTN && + (joykey < NUM_BUTTONS) && + (BIT32_GET(pad->buttons, joykey))) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(linuxraw_joypad_axis_state(pad, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static bool linuxraw_joypad_query_pad(unsigned pad) { return pad < MAX_USERS && linuxraw_pads[pad].fd >= 0; @@ -359,6 +397,7 @@ input_device_driver_t linuxraw_joypad = { linuxraw_joypad_query_pad, linuxraw_joypad_destroy, linuxraw_joypad_button, + linuxraw_joypad_state, linuxraw_joypad_get_buttons, linuxraw_joypad_axis, linuxraw_joypad_poll, diff --git a/input/drivers_joypad/mfi_joypad.m b/input/drivers_joypad/mfi_joypad.m index bcbbee234d..dd9eed323e 100644 --- a/input/drivers_joypad/mfi_joypad.m +++ b/input/drivers_joypad/mfi_joypad.m @@ -331,73 +331,103 @@ bool apple_gamecontroller_joypad_init(void *data) return true; } -static void apple_gamecontroller_joypad_destroy(void) -{ -} +static void apple_gamecontroller_joypad_destroy(void) { } -static bool apple_gamecontroller_joypad_button(unsigned port, uint16_t joykey) +static int16_t apple_gamecontroller_joypad_button( + unsigned port, uint16_t joykey) { - /* Check hat. */ - if (GET_HAT_DIR(joykey)) - return false; - /* Check the button. */ - if ((port < MAX_USERS) && (joykey < 32)) - return ((mfi_buttons[port] & (1 << joykey)) != 0); - - return false; + if (port >= DEFAULT_MAX_PADS) + return 0; + /* Check hat. */ + else if (GET_HAT_DIR(joykey)) + return 0; + else if (joykey < 32) + return ((mfi_buttons[port] & (1 << joykey)) != 0); + return 0; } static void apple_gamecontroller_joypad_get_buttons(unsigned port, - input_bits_t *state) + input_bits_t *state) { BITS_COPY16_PTR(state, mfi_buttons[port]); } -static int16_t apple_gamecontroller_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t apple_gamecontroller_joypad_axis( + unsigned port, uint32_t joyaxis) { - int16_t val = 0; + int16_t val = 0; int16_t axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { - axis = AXIS_NEG_GET(joyaxis); - is_neg = true; + axis = AXIS_NEG_GET(joyaxis); + is_neg = true; } else if(AXIS_POS_GET(joyaxis) < 4) { - axis = AXIS_POS_GET(joyaxis); - is_pos = true; + axis = AXIS_POS_GET(joyaxis); + is_pos = true; } switch (axis) { case 0: - val = mfi_axes[port][0]; + val = mfi_axes[port][0]; break; case 1: - val = mfi_axes[port][1]; + val = mfi_axes[port][1]; break; case 2: - val = mfi_axes[port][2]; + val = mfi_axes[port][2]; break; case 3: - val = mfi_axes[port][3]; + val = mfi_axes[port][3]; break; } if (is_neg && val > 0) - val = 0; + val = 0; else if (is_pos && val < 0) - val = 0; + val = 0; return val; } +static int16_t apple_gamecontroller_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( (uint16_t)joykey != NO_BTN + && !GET_HAT_DIR(i) + && (i < 32) + && ((mfi_buttons[port] & (1 << i)) != 0) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(apple_gamecontroller_joypad_axis(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static bool apple_gamecontroller_joypad_query_pad(unsigned pad) { return pad < MAX_USERS; @@ -416,6 +446,7 @@ input_device_driver_t mfi_joypad = { apple_gamecontroller_joypad_query_pad, apple_gamecontroller_joypad_destroy, apple_gamecontroller_joypad_button, + apple_gamecontroller_joypad_state, apple_gamecontroller_joypad_get_buttons, apple_gamecontroller_joypad_axis, apple_gamecontroller_joypad_poll, diff --git a/input/drivers_joypad/parport_joypad.c b/input/drivers_joypad/parport_joypad.c index 44eeb6784b..9eea69d9c7 100644 --- a/input/drivers_joypad/parport_joypad.c +++ b/input/drivers_joypad/parport_joypad.c @@ -184,7 +184,7 @@ static bool parport_joypad_init_pad( if (!set_control) RARCH_WARN("[Joypad]: Failed to clear nStrobe and nIRQ bits on %s\n", path); - strlcpy(pad->ident, path, sizeof(input_device_names[0])); + strlcpy(pad->ident, path, input_config_get_device_name_size(0)); for (i = 0; i < PARPORT_NUM_BUTTONS; i++) pad->button_enable[i] = true; @@ -246,7 +246,7 @@ static bool parport_joypad_init(void *data) struct parport_joypad *pad = &parport_pads[i]; pad->fd = -1; - pad->ident = input_device_names[i]; + pad->ident = input_config_get_device_name_ptr(i); snprintf(path, sizeof(path), "/dev/parport%u", i); @@ -329,10 +329,49 @@ static void parport_joypad_destroy(void) parport_pads[i].fd = -1; } -static bool parport_joypad_button(unsigned port, uint16_t joykey) +static int16_t parport_joypad_button(unsigned port, uint16_t joykey) { - const struct parport_joypad *pad = (const struct parport_joypad*)&parport_pads[port]; - return joykey < PARPORT_NUM_BUTTONS && BIT32_GET(pad->buttons, joykey); + const struct parport_joypad *pad = (const struct parport_joypad*) + &parport_pads[port]; + if (port >= DEFAULT_MAX_PADS) + return 0; + if (joykey < PARPORT_NUM_BUTTONS) + return BIT32_GET(pad->buttons, joykey); + return 0; +} + +static int16_t parport_joypad_axis(unsigned port, uint32_t joyaxis) +{ + /* Parport does not support analog sticks */ + return 0; +} + +static int16_t parport_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct parport_joypad *pad = (const struct parport_joypad*) + &parport_pads[port]; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + if ( + (uint16_t)joykey != NO_BTN + && (joykey < PARPORT_NUM_BUTTONS) + && (BIT32_GET(pad->buttons, (uint16_t)joykey))) + ret |= ( 1 << i); + } + + return ret; } static void parport_joypad_get_buttons(unsigned port, input_bits_t *state) @@ -348,12 +387,6 @@ static void parport_joypad_get_buttons(unsigned port, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t parport_joypad_axis(unsigned port, uint32_t joyaxis) -{ - /* Parport does not support analog sticks */ - return 0; -} - static bool parport_joypad_query_pad(unsigned pad) { return pad < MAX_USERS && parport_pads[pad].fd >= 0; @@ -372,6 +405,7 @@ input_device_driver_t parport_joypad = { parport_joypad_query_pad, parport_joypad_destroy, parport_joypad_button, + parport_joypad_state, parport_joypad_get_buttons, parport_joypad_axis, parport_joypad_poll, diff --git a/input/drivers_joypad/ps2_joypad.c b/input/drivers_joypad/ps2_joypad.c index 86ca6069af..8a35b20a8b 100644 --- a/input/drivers_joypad/ps2_joypad.c +++ b/input/drivers_joypad/ps2_joypad.c @@ -84,29 +84,20 @@ static bool ps2_joypad_init(void *data) return init; } -static bool ps2_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t ps2_joypad_button(unsigned port, uint16_t joykey) { - if (port_num >= DEFAULT_MAX_PADS) - return false; - - return (pad_state[port_num] & (UINT64_C(1) << joykey)); + if (port >= DEFAULT_MAX_PADS) + return 0; + return pad_state[port] & (UINT64_C(1) << i); } -static void ps2_joypad_get_buttons(unsigned port_num, input_bits_t *state) -{ - BIT256_CLEAR_ALL_PTR(state); -} - -static int16_t ps2_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t ps2_joypad_axis_state(unsigned port_num, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { axis = AXIS_NEG_GET(joyaxis); @@ -142,6 +133,50 @@ static int16_t ps2_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t ps2_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && pad_state[port] & (UINT64_C(1) << joykey) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(ps2_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + +static int16_t ps2_joypad_axis(unsigned port_num, uint32_t joyaxis) +{ + if (port_num >= DEFAULT_MAX_PADS) + return 0; + return ps2_joypad_axis_state(port_num, joyaxis); +} + +static void ps2_joypad_get_buttons(unsigned port_num, input_bits_t *state) +{ + BIT256_CLEAR_ALL_PTR(state); +} + static void ps2_joypad_poll(void) { unsigned player; @@ -213,6 +248,7 @@ input_device_driver_t ps2_joypad = { ps2_joypad_query_pad, ps2_joypad_destroy, ps2_joypad_button, + ps2_joypad_state, ps2_joypad_get_buttons, ps2_joypad_axis, ps2_joypad_poll, diff --git a/input/drivers_joypad/ps3_joypad.c b/input/drivers_joypad/ps3_joypad.c index b2847fee9e..87424a0144 100644 --- a/input/drivers_joypad/ps3_joypad.c +++ b/input/drivers_joypad/ps3_joypad.c @@ -61,12 +61,11 @@ static bool ps3_joypad_init(void *data) return true; } -static bool ps3_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t ps3_joypad_button(unsigned port, uint16_t joykey) { - if (port_num >= DEFAULT_MAX_PADS) - return false; - - return pad_state[port_num] & (UINT64_C(1) << joykey); + if (port >= DEFAULT_MAX_PADS) + return 0; + return pad_state[port] & (UINT64_C(1) << joykey); } static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state) @@ -79,16 +78,13 @@ static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t ps3_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t ps3_joypad_axis_state(unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { axis = AXIS_NEG_GET(joyaxis); @@ -103,16 +99,16 @@ static int16_t ps3_joypad_axis(unsigned port_num, uint32_t joyaxis) switch (axis) { case 0: - val = analog_state[port_num][0][0]; + val = analog_state[port][0][0]; break; case 1: - val = analog_state[port_num][0][1]; + val = analog_state[port][0][1]; break; case 2: - val = analog_state[port_num][1][0]; + val = analog_state[port][1][0]; break; case 3: - val = analog_state[port_num][1][1]; + val = analog_state[port][1][1]; break; } @@ -124,6 +120,45 @@ static int16_t ps3_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t ps3_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (port >= DEFAULT_MAX_PADS) + return 0; + return ps3_joypad_axis_state(port, joyaxis); +} + +static int16_t ps3_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && pad_state[port] & (UINT64_C(1) << (uint16_t)joykey) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(ps3_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void ps3_joypad_poll(void) { unsigned port; @@ -252,6 +287,7 @@ input_device_driver_t ps3_joypad = { ps3_joypad_query_pad, ps3_joypad_destroy, ps3_joypad_button, + ps3_joypad_state, ps3_joypad_get_buttons, ps3_joypad_axis, ps3_joypad_poll, diff --git a/input/drivers_joypad/ps4_joypad.c b/input/drivers_joypad/ps4_joypad.c index 08ef34bcd8..7bec0f6e7b 100644 --- a/input/drivers_joypad/ps4_joypad.c +++ b/input/drivers_joypad/ps4_joypad.c @@ -130,11 +130,43 @@ static bool ps4_joypad_init(void *data) return true; } -static bool ps4_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t ps4_joypad_button(unsigned port, uint16_t joykey) { - if (port_num >= PS4_MAX_ORBISPADS) - return false; - return (pad_state[port_num] & (UINT64_C(1) << joykey)); + if (port >= PS4_MAX_ORBISPADS) + return 0; + return pad_state[port] & (UINT64_C(1) << joykey); +} + +static int16_t ps4_joypad_axis(unsigned port, uint32_t joyaxis) +{ + /* TODO/FIXME - implement */ + return 0; +} + +static int16_t ps4_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= PS4_MAX_ORBISPADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + if ( + (uint16_t)joykey != NO_BTN + && pad_state[port] & (UINT64_C(1) << (uint16_t)joykey) + ) + ret |= ( 1 << i); + } + + return ret; } static void ps4_joypad_get_buttons(unsigned port_num, input_bits_t *state) @@ -147,12 +179,6 @@ static void ps4_joypad_get_buttons(unsigned port_num, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t ps4_joypad_axis(unsigned port_num, uint32_t joyaxis) -{ - /* TODO/FIXME - implement */ - return 0; -} - static void ps4_joypad_poll(void) { unsigned player; @@ -198,20 +224,16 @@ static bool ps4_joypad_query_pad(unsigned pad) } static bool ps4_joypad_rumble(unsigned pad, - enum retro_rumble_effect effect, uint16_t strength) -{ - return false; -} + enum retro_rumble_effect effect, uint16_t strength) { return false; } -static void ps4_joypad_destroy(void) -{ -} +static void ps4_joypad_destroy(void) { } input_device_driver_t ps4_joypad = { ps4_joypad_init, ps4_joypad_query_pad, ps4_joypad_destroy, ps4_joypad_button, + ps4_joypad_state, ps4_joypad_get_buttons, ps4_joypad_axis, ps4_joypad_poll, diff --git a/input/drivers_joypad/psp_joypad.c b/input/drivers_joypad/psp_joypad.c index 1a6b7219fa..ea18ac971c 100644 --- a/input/drivers_joypad/psp_joypad.c +++ b/input/drivers_joypad/psp_joypad.c @@ -87,16 +87,11 @@ static bool psp_joypad_init(void *data) #if defined(VITA) if (!sceCtrlIsMultiControllerSupported()) - { psp2_model = SCE_KERNEL_MODEL_VITA; - } else if(sceCtrlIsMultiControllerSupported() > 0) - { + else if(sceCtrlIsMultiControllerSupported() > 0) psp2_model = SCE_KERNEL_MODEL_VITATV; - } if (psp2_model != SCE_KERNEL_MODEL_VITATV) - { players_count = 1; - } if (sceKernelGetModelForCDialog() != SCE_KERNEL_MODEL_VITATV) { sceTouchSetSamplingState(SCE_TOUCH_PORT_BACK, SCE_TOUCH_SAMPLING_STATE_START); @@ -119,34 +114,30 @@ static bool psp_joypad_init(void *data) return true; } -static bool psp_joypad_button(unsigned port_num, uint16_t key) +static int16_t psp_joypad_button(unsigned port, uint16_t joykey) { - if (port_num >= DEFAULT_MAX_PADS) - return false; - - return (pad_state[port_num] & (UINT64_C(1) << key)); + if (port >= DEFAULT_MAX_PADS) + return 0; + return pad_state[port] & (UINT64_C(1) << joykey); } -static void psp_joypad_get_buttons(unsigned port_num, input_bits_t *state) +static void psp_joypad_get_buttons(unsigned port, input_bits_t *state) { - if (port_num < DEFAULT_MAX_PADS) + if (port < DEFAULT_MAX_PADS) { - BITS_COPY16_PTR( state, pad_state[port_num] ); + BITS_COPY16_PTR( state, pad_state[port] ); } else BIT256_CLEAR_ALL_PTR(state); } -static int16_t psp_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t psp_joypad_axis_state(unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { axis = AXIS_NEG_GET(joyaxis); @@ -161,16 +152,16 @@ static int16_t psp_joypad_axis(unsigned port_num, uint32_t joyaxis) switch (axis) { case 0: - val = analog_state[port_num][0][0]; + val = analog_state[port][0][0]; break; case 1: - val = analog_state[port_num][0][1]; + val = analog_state[port][0][1]; break; case 2: - val = analog_state[port_num][1][0]; + val = analog_state[port][1][0]; break; case 3: - val = analog_state[port_num][1][1]; + val = analog_state[port][1][1]; break; } @@ -182,6 +173,45 @@ static int16_t psp_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t psp_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (port >= DEFAULT_MAX_PADS) + return 0; + return psp_joypad_axis_state(port, joyaxis); +} + +static int16_t dinput_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (pad_state[port] & (UINT64_C(1) << (uint16_t)joykey)) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(psp_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void psp_joypad_poll(void) { unsigned player; @@ -392,6 +422,7 @@ input_device_driver_t psp_joypad = { psp_joypad_query_pad, psp_joypad_destroy, psp_joypad_button, + psp_joypad_state, psp_joypad_get_buttons, psp_joypad_axis, psp_joypad_poll, diff --git a/input/drivers_joypad/qnx_joypad.c b/input/drivers_joypad/qnx_joypad.c index 586093607e..bccd4842ef 100644 --- a/input/drivers_joypad/qnx_joypad.c +++ b/input/drivers_joypad/qnx_joypad.c @@ -29,8 +29,6 @@ static bool qnx_joypad_init(void *data) { unsigned autoconf_pad; - (void)data; - for (autoconf_pad = 0; autoconf_pad < MAX_USERS; autoconf_pad++) input_autoconfigure_connect( qnx_joypad_name(autoconf_pad), @@ -44,33 +42,30 @@ static bool qnx_joypad_init(void *data) return true; } -static bool qnx_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t qnx_joypad_button(unsigned port, uint16_t joykey) { - qnx_input_device_t* controller = NULL; - qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); + qnx_input_device_t* controller = NULL; + qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); - if (!qnx || port_num >= DEFAULT_MAX_PADS) + if (!qnx || port >= DEFAULT_MAX_PADS) return 0; - controller = (qnx_input_device_t*)&qnx->devices[port_num]; + controller = (qnx_input_device_t*)&qnx->devices[port]; - if(port_num < MAX_USERS && joykey <= 19) - return (controller->buttons & (1 << joykey)) != 0; - - return false; + if (joykey <= 19) + return ((controller->buttons & (1 << joykey)) != 0); + return 0; } -static int16_t qnx_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t qnx_joypad_axis_state( + qnx_input_t *qnx, + qnx_input_device_t *controller, + unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); - - if (!qnx || joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) < 4) { axis = AXIS_NEG_GET(joyaxis); @@ -82,9 +77,6 @@ static int16_t qnx_joypad_axis(unsigned port_num, uint32_t joyaxis) is_pos = true; } - qnx_input_device_t* controller = NULL; - controller = (qnx_input_device_t*)&qnx->devices[port_num]; - switch (axis) { case 0: @@ -109,24 +101,66 @@ static int16_t qnx_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } -static void qnx_joypad_poll(void) +static int16_t qnx_joypad_axis(unsigned port, uint32_t joyaxis) { + qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); + qnx_input_device_t* controller = NULL; + if (!qnx || port >= DEFAULT_MAX_PADS) + return 0; + controller = (qnx_input_device_t*)&qnx->devices[port]; + return qnx_joypad_axis_state(qnx, controller, port, joyaxis); } +static int16_t qnx_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + qnx_input_t *qnx = (qnx_input_t*)input_driver_get_data(); + qnx_input_device_t* controller = NULL; + if (!qnx || port >= DEFAULT_MAX_PADS) + return 0; + controller = (qnx_input_device_t*)&qnx->devices[port]; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (joykey <= 19) + && ((controller->buttons & (1 << (uint16_t)joykey)) != 0) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(qnx_joypad_axis_state(qnx, controller, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + +static void qnx_joypad_poll(void) { } + static bool qnx_joypad_query_pad(unsigned pad) { return (pad < MAX_USERS); } -static void qnx_joypad_destroy(void) -{ -} +static void qnx_joypad_destroy(void) { } input_device_driver_t qnx_joypad = { qnx_joypad_init, qnx_joypad_query_pad, qnx_joypad_destroy, qnx_joypad_button, + qnx_joypad_state, NULL, qnx_joypad_axis, qnx_joypad_poll, diff --git a/input/drivers_joypad/rwebpad_joypad.c b/input/drivers_joypad/rwebpad_joypad.c index 463a9d4aa6..4b067a6c0e 100644 --- a/input/drivers_joypad/rwebpad_joypad.c +++ b/input/drivers_joypad/rwebpad_joypad.c @@ -99,17 +99,19 @@ static const char *rwebpad_joypad_name(unsigned pad) return ""; } -static bool rwebpad_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t rwebpad_joypad_button(unsigned port, uint16_t joykey) { EmscriptenGamepadEvent gamepad_state; - EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status( - port_num, &gamepad_state); + EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status( + port, &gamepad_state); - if (r == EMSCRIPTEN_RESULT_SUCCESS) - if (joykey < gamepad_state.numButtons) - return gamepad_state.digitalButton[joykey]; - - return false; + if (port >= DEFAULT_MAX_PADS) + return 0; + if (r != EMSCRIPTEN_RESULT_SUCCESS) + return 0; + if (joykey < gamepad_state.numButtons) + return gamepad_state.digitalButton[joykey]; + return 0; } static void rwebpad_joypad_get_buttons(unsigned port_num, input_bits_t *state) @@ -132,39 +134,77 @@ static void rwebpad_joypad_get_buttons(unsigned port_num, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t rwebpad_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t rwebpad_joypad_axis_state( + EmscriptenGamepadEvent *gamepad_state, + unsigned port, uint32_t joyaxis) { - EmscriptenGamepadEvent gamepad_state; - EMSCRIPTEN_RESULT r; - int16_t val = 0; - - if (joyaxis == 0xFFFFFFFF) - return 0; - - r = emscripten_get_gamepad_status(port_num, &gamepad_state); - - if (r == EMSCRIPTEN_RESULT_SUCCESS) + int16_t val = 0; + if (AXIS_NEG_GET(joyaxis) < gamepad_state->numAxes) { - if (AXIS_NEG_GET(joyaxis) < gamepad_state.numAxes) - { - val = CLAMPDOUBLE(gamepad_state.axis[AXIS_NEG_GET(joyaxis)]) * 0x7FFF; - if (val > 0) - val = 0; - } - else if (AXIS_POS_GET(joyaxis) < gamepad_state.numAxes) - { - val = CLAMPDOUBLE(gamepad_state.axis[AXIS_POS_GET(joyaxis)]) * 0x7FFF; - if (val < 0) - val = 0; - } + val = CLAMPDOUBLE(gamepad_state->axis[AXIS_NEG_GET(joyaxis)]) * 0x7FFF; + if (val > 0) + val = 0; + } + else if (AXIS_POS_GET(joyaxis) < gamepad_state->numAxes) + { + val = CLAMPDOUBLE(gamepad_state->axis[AXIS_POS_GET(joyaxis)]) * 0x7FFF; + if (val < 0) + val = 0; } return val; } +static int16_t rwebpad_joypad_axis(unsigned port, uint32_t joyaxis) +{ + EmscriptenGamepadEvent gamepad_state; + EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status(port, &gamepad_state); + if (r != EMSCRIPTEN_RESULT_SUCCESS) + return 0; + return rwebpad_joypad_axis_state(&gamepad_state, port, joyaxis); +} + +static int16_t rwebpad_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + EmscriptenGamepadEvent gamepad_state; + int16_t ret = 0; + EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status( + port, &gamepad_state); + if (r != EMSCRIPTEN_RESULT_SUCCESS) + return 0; + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (joykey < gamepad_state.numButtons) + && gamepad_state.digitalButton[(uint16_t)joykey] + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(rwebpad_joypad_axis_state( + &gamepad_state, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void rwebpad_joypad_poll(void) { - (void)emscripten_sample_gamepad_data(); + emscripten_sample_gamepad_data(); } static bool rwebpad_joypad_query_pad(unsigned pad) @@ -187,6 +227,7 @@ input_device_driver_t rwebpad_joypad = { rwebpad_joypad_query_pad, rwebpad_joypad_destroy, rwebpad_joypad_button, + rwebpad_joypad_state, rwebpad_joypad_get_buttons, rwebpad_joypad_axis, rwebpad_joypad_poll, diff --git a/input/drivers_joypad/sdl_joypad.c b/input/drivers_joypad/sdl_joypad.c index 40f6b2bdf0..739fa325e6 100644 --- a/input/drivers_joypad/sdl_joypad.c +++ b/input/drivers_joypad/sdl_joypad.c @@ -295,14 +295,11 @@ error: #endif } -static bool sdl_joypad_button(unsigned port, uint16_t joykey) +static int16_t sdl_joypad_button_state( + sdl_joypad_t *pad, + unsigned port, uint16_t joykey) { - unsigned hat_dir = 0; - sdl_joypad_t *pad = (sdl_joypad_t*)&sdl_pads[port]; - if (!pad || !pad->joypad) - return false; - - hat_dir = GET_HAT_DIR(joykey); + unsigned hat_dir = GET_HAT_DIR(joykey); /* Check hat. */ if (hat_dir) { @@ -310,52 +307,53 @@ static bool sdl_joypad_button(unsigned port, uint16_t joykey) uint16_t hat = GET_HAT(joykey); if (hat >= pad->num_hats) - return false; + return 0; dir = sdl_pad_get_hat(pad, hat); switch (hat_dir) { case HAT_UP_MASK: - return dir & SDL_HAT_UP; + return (dir & SDL_HAT_UP); case HAT_DOWN_MASK: - return dir & SDL_HAT_DOWN; + return (dir & SDL_HAT_DOWN); case HAT_LEFT_MASK: - return dir & SDL_HAT_LEFT; + return (dir & SDL_HAT_LEFT); case HAT_RIGHT_MASK: - return dir & SDL_HAT_RIGHT; + return (dir & SDL_HAT_RIGHT); default: break; } - return false; + /* hat requested and no hat button down */ } - - /* Check the button */ - if (joykey < pad->num_buttons && sdl_pad_get_button(pad, joykey)) - return true; - - return false; + else if (joykey < pad->num_buttons) + return sdl_pad_get_button(pad, joykey); + return 0; } -static int16_t sdl_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t sdl_joypad_button(unsigned port, uint16_t joykey) { - sdl_joypad_t *pad; - int16_t val = 0; - - if (joyaxis == AXIS_NONE) + sdl_joypad_t *pad = (sdl_joypad_t*)&sdl_pads[port]; + if (!pad || !pad->joypad) return 0; + if (port >= DEFAULT_MAX_PADS) + return 0; + return sdl_joypad_button_state(pad, port, joykey); +} - pad = (sdl_joypad_t*)&sdl_pads[port]; - if (!pad->joypad) - return false; - +static int16_t sdl_joypad_axis_state( + sdl_joypad_t *pad, + unsigned port, uint32_t joyaxis) +{ + int16_t val = 0; if (AXIS_NEG_GET(joyaxis) < pad->num_axes) { val = sdl_pad_get_axis(pad, AXIS_NEG_GET(joyaxis)); if (val > 0) val = 0; - else if (val < -0x7fff) /* -0x8000 can cause trouble if we later abs() it. */ + /* -0x8000 can cause trouble if we later abs() it. */ + else if (val < -0x7fff) val = -0x7fff; } else if (AXIS_POS_GET(joyaxis) < pad->num_axes) @@ -369,6 +367,49 @@ static int16_t sdl_joypad_axis(unsigned port, uint32_t joyaxis) return val; } +static int16_t sdl_joypad_axis(unsigned port, uint32_t joyaxis) +{ + sdl_joypad_t *pad = (sdl_joypad_t*)&sdl_pads[port]; + if (!pad || !pad->joypad) + return false; + return sdl_joypad_axis_state(pad, port, joyaxis); +} + +static int16_t sdl_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + sdl_joypad_t *pad = (sdl_joypad_t*)&sdl_pads[port]; + + if (!pad || !pad->joypad) + return 0; + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && sdl_joypad_button_state(pad, port, (uint16_t)joykey) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(sdl_joypad_axis_state(pad, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void sdl_joypad_poll(void) { #ifdef HAVE_SDL2 @@ -461,6 +502,7 @@ input_device_driver_t sdl_joypad = { sdl_joypad_query_pad, sdl_joypad_destroy, sdl_joypad_button, + sdl_joypad_state, NULL, sdl_joypad_axis, sdl_joypad_poll, diff --git a/input/drivers_joypad/switch_joypad.c b/input/drivers_joypad/switch_joypad.c index 5a998146e1..5511b19877 100644 --- a/input/drivers_joypad/switch_joypad.c +++ b/input/drivers_joypad/switch_joypad.c @@ -16,12 +16,14 @@ #include "../../retroarch.h" #include "../../command.h" +/* TODO/FIXME - weird header include */ #include "string.h" -static uint16_t pad_state[DEFAULT_MAX_PADS]; -static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; extern uint64_t lifecycle_state; +/* TODO/FIXME - static globals */ +static uint16_t pad_state[DEFAULT_MAX_PADS]; +static int16_t analog_state[DEFAULT_MAX_PADS][2][2]; #ifdef HAVE_LIBNX static u32 vibration_handles[DEFAULT_MAX_PADS][2]; static u32 vibration_handleheld[2]; @@ -83,11 +85,11 @@ static bool switch_joypad_init(void *data) return true; } -static bool switch_joypad_button(unsigned port_num, uint16_t key) +static int16_t switch_joypad_button(unsigned port_num, uint16_t joykey) { if (port_num >= DEFAULT_MAX_PADS) - return false; - return (pad_state[port_num] & (1 << key)); + return 0; + return (pad_state[port_num] & (1 << joykey)); } static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state) @@ -102,18 +104,13 @@ static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state) } } -static int16_t switch_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t switch_joypad_axis_state(unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; -#if 0 - /* TODO/FIXME - implement */ - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) { } -#endif - if (AXIS_NEG_GET(joyaxis) < 4) { axis = AXIS_NEG_GET(joyaxis); @@ -128,16 +125,16 @@ static int16_t switch_joypad_axis(unsigned port_num, uint32_t joyaxis) switch(axis) { case 0: - val = analog_state[port_num][0][0]; + val = analog_state[port][0][0]; break; case 1: - val = analog_state[port_num][0][1]; + val = analog_state[port][0][1]; break; case 2: - val = analog_state[port_num][1][0]; + val = analog_state[port][1][0]; break; case 3: - val = analog_state[port_num][1][1]; + val = analog_state[port][1][1]; break; } @@ -149,6 +146,45 @@ static int16_t switch_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t switch_joypad_axis(unsigned port, uint32_t joyaxis) +{ + if (port >= DEFAULT_MAX_PADS) + return 0; + return switch_joypad_axis_state(port, joyaxis); +} + +static int16_t switch_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (pad_state[port] & (1 << (uint16_t)joykey)) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(switch_joypad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static bool switch_joypad_query_pad(unsigned pad) { return pad < DEFAULT_MAX_PADS && pad_state[pad]; @@ -389,6 +425,7 @@ input_device_driver_t switch_joypad = { switch_joypad_query_pad, switch_joypad_destroy, switch_joypad_button, + switch_joypad_state, switch_joypad_get_buttons, switch_joypad_axis, switch_joypad_poll, diff --git a/input/drivers_joypad/udev_joypad.c b/input/drivers_joypad/udev_joypad.c index 31ba12101c..d2873b30ee 100644 --- a/input/drivers_joypad/udev_joypad.c +++ b/input/drivers_joypad/udev_joypad.c @@ -161,8 +161,12 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char unsigned long keybit[NBITS(KEY_MAX)] = {0}; unsigned long absbit[NBITS(ABS_MAX)] = {0}; unsigned long ffbit[NBITS(FF_MAX)] = {0}; + const char *device_name = input_config_get_device_name(p); - strlcpy(pad->ident, input_device_names[p], sizeof(pad->ident)); + if (string_is_empty(device_name)) + pad->ident[0] = '\0'; + else + strlcpy(pad->ident, device_name, sizeof(pad->ident)); /* Failed to get pad name */ if (ioctl(fd, EVIOCGNAME(sizeof(pad->ident)), pad->ident) < 0) @@ -586,10 +590,11 @@ error: return false; } -static bool udev_joypad_button(unsigned port, uint16_t joykey) +static int16_t udev_joypad_button_state( + const struct udev_joypad *pad, + unsigned port, uint16_t joykey) { - const struct udev_joypad *pad = (const struct udev_joypad*)&udev_pads[port]; - unsigned hat_dir = GET_HAT_DIR(joykey); + unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) { @@ -599,18 +604,31 @@ static bool udev_joypad_button(unsigned port, uint16_t joykey) switch (hat_dir) { case HAT_LEFT_MASK: - return pad->hats[h][0] < 0; + return (pad->hats[h][0] < 0); case HAT_RIGHT_MASK: - return pad->hats[h][0] > 0; + return (pad->hats[h][0] > 0); case HAT_UP_MASK: - return pad->hats[h][1] < 0; + return (pad->hats[h][1] < 0); case HAT_DOWN_MASK: - return pad->hats[h][1] > 0; + return (pad->hats[h][1] > 0); + default: + break; } } - return false; + /* hat requested and no hat button down */ } - return joykey < UDEV_NUM_BUTTONS && BIT64_GET(pad->buttons, joykey); + else if (joykey < UDEV_NUM_BUTTONS) + return (BIT64_GET(pad->buttons, joykey)); + return 0; +} + +static int16_t udev_joypad_button(unsigned port, uint16_t joykey) +{ + const struct udev_joypad *pad = (const struct udev_joypad*) + &udev_pads[port]; + if (port >= DEFAULT_MAX_PADS) + return 0; + return udev_joypad_button_state(pad, port, joykey); } static void udev_joypad_get_buttons(unsigned port, input_bits_t *state) @@ -626,20 +644,18 @@ static void udev_joypad_get_buttons(unsigned port, input_bits_t *state) BIT256_CLEAR_ALL_PTR(state); } -static int16_t udev_joypad_axis(unsigned port, uint32_t joyaxis) +static int16_t udev_joypad_axis_state( + const struct udev_joypad *pad, + unsigned port, uint32_t joyaxis) { int16_t val = 0; - const struct udev_joypad *pad; - if (joyaxis == AXIS_NONE) - return 0; - - pad = (const struct udev_joypad*)&udev_pads[port]; - if (AXIS_NEG_GET(joyaxis) < NUM_AXES) { val = pad->axes[AXIS_NEG_GET(joyaxis)]; /* Deal with analog triggers that report -32767 to 32767 */ - if (((AXIS_NEG_GET(joyaxis) == ABS_Z) || (AXIS_NEG_GET(joyaxis) == ABS_RZ)) + if (( + (AXIS_NEG_GET(joyaxis) == ABS_Z) || + (AXIS_NEG_GET(joyaxis) == ABS_RZ)) && (pad->neg_trigger[AXIS_NEG_GET(joyaxis)])) val = (val + 0x7fff) / 2; if (val > 0) @@ -649,7 +665,9 @@ static int16_t udev_joypad_axis(unsigned port, uint32_t joyaxis) { val = pad->axes[AXIS_POS_GET(joyaxis)]; /* Deal with analog triggers that report -32767 to 32767 */ - if (((AXIS_POS_GET(joyaxis) == ABS_Z) || (AXIS_POS_GET(joyaxis) == ABS_RZ)) + if (( + (AXIS_POS_GET(joyaxis) == ABS_Z) || + (AXIS_POS_GET(joyaxis) == ABS_RZ)) && (pad->neg_trigger[AXIS_POS_GET(joyaxis)])) val = (val + 0x7fff) / 2; if (val < 0) @@ -659,6 +677,47 @@ static int16_t udev_joypad_axis(unsigned port, uint32_t joyaxis) return val; } +static int16_t udev_joypad_axis(unsigned port, uint32_t joyaxis) +{ + const struct udev_joypad *pad = (const struct udev_joypad*) + &udev_pads[port]; + return udev_joypad_axis_state(pad, port, joyaxis); +} + +static int16_t udev_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + const struct udev_joypad *pad = (const struct udev_joypad*) + &udev_pads[port]; + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && udev_joypad_button_state(pad, port, (uint16_t)joykey) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(udev_joypad_axis_state(pad, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static bool udev_joypad_query_pad(unsigned pad) { return pad < MAX_USERS && udev_pads[pad].fd >= 0; @@ -677,6 +736,7 @@ input_device_driver_t udev_joypad = { udev_joypad_query_pad, udev_joypad_destroy, udev_joypad_button, + udev_joypad_state, udev_joypad_get_buttons, udev_joypad_axis, udev_joypad_poll, diff --git a/input/drivers_joypad/wiiu/hidpad_driver.c b/input/drivers_joypad/wiiu/hidpad_driver.c index 786dfcb104..1f7790857e 100644 --- a/input/drivers_joypad/wiiu/hidpad_driver.c +++ b/input/drivers_joypad/wiiu/hidpad_driver.c @@ -46,9 +46,9 @@ static bool hidpad_init(void *data) return true; } -static bool hidpad_query_pad(unsigned pad) +static bool hidpad_query_pad(unsigned port) { - return hidpad_ready && pad < MAX_USERS; + return hidpad_ready && port < MAX_USERS; } static void hidpad_destroy(void) @@ -58,36 +58,66 @@ static void hidpad_destroy(void) hid_deinit(&hid_instance); } -static bool hidpad_button(unsigned pad, uint16_t button) +static int16_t hidpad_button(unsigned port, uint16_t joykey) { - if (!hidpad_query_pad(pad)) - return false; - - return HID_BUTTON(pad, button); + if (!hidpad_query_pad(port)) + return 0; + return (HID_BUTTON(port, joykey)); } -static void hidpad_get_buttons(unsigned pad, input_bits_t *state) +static void hidpad_get_buttons(unsigned port, input_bits_t *state) { - if (!hidpad_query_pad(pad)) + if (!hidpad_query_pad(port)) BIT256_CLEAR_ALL_PTR(state); - HID_GET_BUTTONS(pad, state); + HID_GET_BUTTONS(port, state); } -static int16_t hidpad_axis(unsigned pad, uint32_t axis) +static int16_t hidpad_axis(unsigned port, uint32_t axis) { - if (!hidpad_query_pad(pad)) + if (!hidpad_query_pad(port)) + return 0; + return HID_AXIS(port, axis); +} + +static int16_t hidpad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (!hidpad_query_pad(port)) return 0; - return HID_AXIS(pad, axis); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && HID_BUTTON(port, (uint16_t)joykey) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(HID_AXIS(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; } -static const char *hidpad_name(unsigned pad) +static const char *hidpad_name(unsigned port) { - if (!hidpad_query_pad(pad)) + if (!hidpad_query_pad(port)) return "N/A"; - return HID_PAD_NAME(pad); + return HID_PAD_NAME(port); } input_device_driver_t hidpad_driver = @@ -96,6 +126,7 @@ input_device_driver_t hidpad_driver = hidpad_query_pad, hidpad_destroy, hidpad_button, + hidpad_state, hidpad_get_buttons, hidpad_axis, hidpad_poll, diff --git a/input/drivers_joypad/wiiu/kpad_driver.c b/input/drivers_joypad/wiiu/kpad_driver.c index a31370228b..52ffc3d036 100644 --- a/input/drivers_joypad/wiiu/kpad_driver.c +++ b/input/drivers_joypad/wiiu/kpad_driver.c @@ -22,14 +22,11 @@ #include "../../include/wiiu/input.h" -static bool kpad_init(void *data); -static bool kpad_query_pad(unsigned pad); -static void kpad_destroy(void); -static bool kpad_button(unsigned pad, uint16_t button); -static void kpad_get_buttons(unsigned pad, input_bits_t *state); -static int16_t kpad_axis(unsigned pad, uint32_t axis); +#define WIIU_PRO_BUTTON_MASK 0x3FC0000; +#define CLASSIC_BUTTON_MASK 0xFF0000; + +/* Forward declarations */ static void kpad_poll(void); -static const char *kpad_name(unsigned pad); static void kpad_deregister(unsigned channel); typedef struct _wiimote_state wiimote_state; @@ -44,7 +41,7 @@ struct _wiimote_state /* it would be nice to use designated initializers here, * but those are only in C99 and newer. Oh well. */ -wiimote_state wiimotes[WIIU_WIIMOTE_CHANNELS] = { +wiimote_state wiimotes[WIIU_WIIMOTE_CHANNELS] = { { 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE }, { 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE }, { 0, {{0,0},{0,0},{0,0}}, WIIMOTE_TYPE_NONE }, @@ -52,15 +49,16 @@ wiimote_state wiimotes[WIIU_WIIMOTE_CHANNELS] = { }; /* static global variables */ -static bool kpad_ready = false; -static int channel_slot_map[] = { -1, -1, -1, -1 }; +static bool kpad_ready = false; +static int channel_slot_map[] = { -1, -1, -1, -1 }; +static int poll_failures[WIIU_WIIMOTE_CHANNELS] = { 0, 0, 0, 0 }; static int to_wiimote_channel(unsigned pad) { unsigned i; for(i = 0; i < WIIU_WIIMOTE_CHANNELS; i++) - if(channel_slot_map[i] == pad) + if (channel_slot_map[i] == pad) return i; return -1; @@ -69,7 +67,7 @@ static int to_wiimote_channel(unsigned pad) static int get_slot_for_channel(unsigned channel) { int slot = pad_connection_find_vacant_pad(hid_instance.pad_list); - if(slot >= 0) + if (slot >= 0) { channel_slot_map[channel] = slot; hid_instance.pad_list[slot].connected = true; @@ -98,36 +96,35 @@ static void kpad_destroy(void) kpad_ready = false; } -static bool kpad_button(unsigned pad, uint16_t button_bit) +static int16_t kpad_button(unsigned port, uint16_t joykey) { int channel; - if (!kpad_query_pad(pad)) - return false; + if (!kpad_query_pad(port)) + return 0; - channel = to_wiimote_channel(pad); - if(channel < 0) - return false; - - return wiimotes[channel].button_state - & (UINT64_C(1) << button_bit); + channel = to_wiimote_channel(port); + if (channel < 0) + return 0; + return (wiimotes[channel].button_state + & (UINT64_C(1) << joykey)); } -static void kpad_get_buttons(unsigned pad, input_bits_t *state) +static void kpad_get_buttons(unsigned port, input_bits_t *state) { - int channel = to_wiimote_channel(pad); + int channel = to_wiimote_channel(port); - if (!kpad_query_pad(pad) || channel < 0) + if (!kpad_query_pad(port) || channel < 0) BIT256_CLEAR_ALL_PTR(state); else BITS_COPY16_PTR(state, wiimotes[channel].button_state); } -static int16_t kpad_axis(unsigned pad, uint32_t axis) +static int16_t kpad_axis(unsigned port, uint32_t axis) { axis_data data; - int channel = to_wiimote_channel(pad); + int channel = to_wiimote_channel(port); - if (!kpad_query_pad(pad) || channel < 0 || axis == AXIS_NONE) + if (!kpad_query_pad(port) || channel < 0) return 0; pad_functions.read_axis_data(axis, &data); @@ -136,6 +133,35 @@ static int16_t kpad_axis(unsigned pad, uint32_t axis) data.is_negative); } +static int16_t kpad_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && kpad_button( + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(kpad_axis(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void kpad_register(unsigned channel, uint8_t device_type) { if (wiimotes[channel].type != device_type) @@ -145,7 +171,7 @@ static void kpad_register(unsigned channel, uint8_t device_type) kpad_deregister(channel); slot = get_slot_for_channel(channel); - if(slot < 0) + if (slot < 0) { RARCH_ERR("Couldn't get a slot for this remote.\n"); return; @@ -156,9 +182,6 @@ static void kpad_register(unsigned channel, uint8_t device_type) } } -#define WIIU_PRO_BUTTON_MASK 0x3FC0000; -#define CLASSIC_BUTTON_MASK 0xFF0000; - static void kpad_poll_one_channel(unsigned channel, KPADData *kpad) { kpad_register(channel, kpad->device_type); @@ -200,7 +223,7 @@ static void kpad_deregister(unsigned channel) { int slot = channel_slot_map[channel]; - if(slot >= 0) + if (slot >= 0) { input_autoconfigure_disconnect(slot, kpad_driver.name(slot)); wiimotes[channel].type = WIIMOTE_TYPE_NONE; @@ -209,8 +232,6 @@ static void kpad_deregister(unsigned channel) } } -static int poll_failures[WIIU_WIIMOTE_CHANNELS] = { 0, 0, 0, 0 }; - static void kpad_poll(void) { unsigned channel; @@ -228,7 +249,7 @@ static void kpad_poll(void) if (result == 0) { poll_failures[channel]++; - if(poll_failures[channel] > 5) + if (poll_failures[channel] > 5) kpad_deregister(channel); continue; } @@ -271,6 +292,7 @@ input_device_driver_t kpad_driver = kpad_query_pad, kpad_destroy, kpad_button, + kpad_state, kpad_get_buttons, kpad_axis, kpad_poll, diff --git a/input/drivers_joypad/wiiu/wpad_driver.c b/input/drivers_joypad/wiiu/wpad_driver.c index 5689090af4..c6e418dec9 100644 --- a/input/drivers_joypad/wiiu/wpad_driver.c +++ b/input/drivers_joypad/wiiu/wpad_driver.c @@ -268,41 +268,35 @@ static bool wpad_init(void *data) return true; } -static bool wpad_query_pad(unsigned pad) +static bool wpad_query_pad(unsigned port) { - return pad < MAX_USERS && (to_gamepad_channel(pad) != WPAD_INVALID_CHANNEL); + return port < MAX_USERS && (to_gamepad_channel(port) != WPAD_INVALID_CHANNEL); } -static void wpad_destroy(void) -{ +static void wpad_destroy(void) { } -} - -static bool wpad_button(unsigned pad, uint16_t button_bit) +static int16_t wpad_button(unsigned port, uint16_t joykey) { VPADChan channel; - - if (!wpad_query_pad(pad)) - return false; - - channel = to_gamepad_channel(pad); + if (!wpad_query_pad(port)) + return 0; + channel = to_gamepad_channel(port); if (channel < 0) - return false; - - return gamepads[channel].button_state & (UINT64_C(1) << button_bit); + return 0; + return (gamepads[channel].button_state & (UINT64_C(1) << joykey)); } -static void wpad_get_buttons(unsigned pad, input_bits_t *state) +static void wpad_get_buttons(unsigned port, input_bits_t *state) { VPADChan channel; - if (!wpad_query_pad(pad)) + if (!wpad_query_pad(port)) { BIT256_CLEAR_ALL_PTR(state); return; } - channel = to_gamepad_channel(pad); + channel = to_gamepad_channel(port); if (channel < 0) { BIT256_CLEAR_ALL_PTR(state); @@ -312,15 +306,15 @@ static void wpad_get_buttons(unsigned pad, input_bits_t *state) BITS_COPY32_PTR(state, gamepads[channel].button_state); } -static int16_t wpad_axis(unsigned pad, uint32_t axis) +static int16_t wpad_axis(unsigned port, uint32_t axis) { axis_data data; VPADChan channel; - if (!wpad_query_pad(pad) || axis == AXIS_NONE) + if (!wpad_query_pad(port)) return 0; - channel = to_gamepad_channel(pad); + channel = to_gamepad_channel(port); if (channel < 0) return 0; @@ -328,7 +322,36 @@ static int16_t wpad_axis(unsigned pad, uint32_t axis) return pad_functions.get_axis_value(data.axis, gamepads[channel].analog_state, data.is_negative); } -static const char *wpad_name(unsigned pad) +static int16_t wpad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && wpad_button( + port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(wpad_axis_state(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + +static const char *wpad_name(unsigned port) { return PAD_NAME_WIIU_GAMEPAD; } @@ -339,6 +362,7 @@ input_device_driver_t wpad_driver = wpad_query_pad, wpad_destroy, wpad_button, + wpad_state, wpad_get_buttons, wpad_axis, wpad_poll, diff --git a/input/drivers_joypad/wiiu_joypad.c b/input/drivers_joypad/wiiu_joypad.c index c490436419..e5eada6620 100644 --- a/input/drivers_joypad/wiiu_joypad.c +++ b/input/drivers_joypad/wiiu_joypad.c @@ -18,9 +18,10 @@ #include "wiiu_dbg.h" -static input_device_driver_t *pad_drivers[MAX_USERS]; extern pad_connection_listener_t wiiu_pad_connection_listener; +/* TODO/FIXME - static globals */ +static input_device_driver_t *pad_drivers[MAX_USERS]; static bool ready = false; static bool wiiu_joypad_init(void* data) @@ -60,28 +61,61 @@ static void wiiu_joypad_destroy(void) #endif } -static bool wiiu_joypad_button(unsigned pad, uint16_t key) +static int16_t wiiu_joypad_button(unsigned port, uint16_t joykey) { - if (!wiiu_joypad_query_pad(pad)) - return false; - - return pad_drivers[pad]->button(pad, key); + if (!wiiu_joypad_query_pad(port)) + return 0; + if (port >= DEFAULT_MAX_PADS) + return 0; + return (pad_drivers[port]->button(port, joykey)); } -static void wiiu_joypad_get_buttons(unsigned pad, input_bits_t *state) +static void wiiu_joypad_get_buttons(unsigned port, input_bits_t *state) { - if (!wiiu_joypad_query_pad(pad)) + if (!wiiu_joypad_query_pad(port)) return; - - pad_drivers[pad]->get_buttons(pad, state); + pad_drivers[port]->get_buttons(port, state); } -static int16_t wiiu_joypad_axis(unsigned pad, uint32_t joyaxis) +static int16_t wiiu_joypad_axis(unsigned port, uint32_t joyaxis) { - if (!wiiu_joypad_query_pad(pad)) + if (!wiiu_joypad_query_pad(port)) + return 0; + return pad_drivers[port]->axis(port, joyaxis); +} + +static int16_t wiiu_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + + if (!wiiu_joypad_query_pad(port)) + return 0; + if (port >= DEFAULT_MAX_PADS) return 0; - return pad_drivers[pad]->axis(pad, joyaxis); + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && (pad_drivers[port]->button(port, (uint16_t)joykey)) + ) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(pad_drivers[port]->axis(port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; } static void wiiu_joypad_poll(void) @@ -114,6 +148,7 @@ input_device_driver_t wiiu_joypad = wiiu_joypad_query_pad, wiiu_joypad_destroy, wiiu_joypad_button, + wiiu_joypad_state, wiiu_joypad_get_buttons, wiiu_joypad_axis, wiiu_joypad_poll, diff --git a/input/drivers_joypad/xdk_joypad.c b/input/drivers_joypad/xdk_joypad.c index 1d88746d65..ee3b468174 100644 --- a/input/drivers_joypad/xdk_joypad.c +++ b/input/drivers_joypad/xdk_joypad.c @@ -90,83 +90,84 @@ static const uint16_t button_index_to_bitmap_code[] = { }; #endif -static bool xdk_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t xdk_joypad_button_state(XINPUT_GAMEPAD *pad, + unsigned port, uint16_t joykey) { - uint16_t btn_word = 0; - unsigned hat_dir = 0; - - if (port_num >= DEFAULT_MAX_PADS) - return false; - - btn_word = g_xinput_states[port_num].xstate.Gamepad.wButtons; - hat_dir = GET_HAT_DIR(joykey); + uint16_t btn_word = pad->wButtons; + unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) { switch (hat_dir) { case HAT_UP_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_UP; + return (btn_word & XINPUT_GAMEPAD_DPAD_UP); case HAT_DOWN_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_DOWN; + return (btn_word & XINPUT_GAMEPAD_DPAD_DOWN); case HAT_LEFT_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_LEFT; + return (btn_word & XINPUT_GAMEPAD_DPAD_LEFT); case HAT_RIGHT_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_RIGHT; + return (btn_word & XINPUT_GAMEPAD_DPAD_RIGHT); + default: + break; } - - return false; /* hat requested and no hat button down. */ + /* hat requested and no hat button down */ } - -#ifdef _XBOX1 - switch (joykey) + else { - case RETRO_DEVICE_ID_JOYPAD_A: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_B] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_B: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_A] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_Y: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_X] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_X: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_Y] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_START: - return (g_xinput_states[port_num].xstate.Gamepad.wButtons & XINPUT_GAMEPAD_START); - case RETRO_DEVICE_ID_JOYPAD_SELECT: - return (g_xinput_states[port_num].xstate.Gamepad.wButtons & XINPUT_GAMEPAD_BACK); - case RETRO_DEVICE_ID_JOYPAD_L3: - return (g_xinput_states[port_num].xstate.Gamepad.wButtons & XINPUT_GAMEPAD_LEFT_THUMB); - case RETRO_DEVICE_ID_JOYPAD_R3: - return (g_xinput_states[port_num].xstate.Gamepad.wButtons & XINPUT_GAMEPAD_RIGHT_THUMB); - case RETRO_DEVICE_ID_JOYPAD_L2: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_WHITE] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_R2: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_BLACK] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_L: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_LEFT_TRIGGER] > XINPUT_GAMEPAD_MAX_CROSSTALK); - case RETRO_DEVICE_ID_JOYPAD_R: - return (g_xinput_states[port_num].xstate.Gamepad.bAnalogButtons[XINPUT_GAMEPAD_RIGHT_TRIGGER] > XINPUT_GAMEPAD_MAX_CROSSTALK); - default: - break; - } +#ifdef _XBOX1 + switch (joykey) + { + case RETRO_DEVICE_ID_JOYPAD_A: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_B] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_B: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_A] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_Y: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_X] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_X: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_Y] > XINPUT_GAMEPAD_MAX_CROSSTALK) + case RETRO_DEVICE_ID_JOYPAD_START: + return (pad->wButtons & XINPUT_GAMEPAD_START); + case RETRO_DEVICE_ID_JOYPAD_SELECT: + return (pad->wButtons & XINPUT_GAMEPAD_BACK); + case RETRO_DEVICE_ID_JOYPAD_L3: + return (pad->wButtons & XINPUT_GAMEPAD_LEFT_THUMB); + case RETRO_DEVICE_ID_JOYPAD_R3: + return (pad->wButtons & XINPUT_GAMEPAD_RIGHT_THUMB); + case RETRO_DEVICE_ID_JOYPAD_L2: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_WHITE] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_R2: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_BLACK] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_L: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_LEFT_TRIGGER] > XINPUT_GAMEPAD_MAX_CROSSTALK); + case RETRO_DEVICE_ID_JOYPAD_R: + return (pad->bAnalogButtons[XINPUT_GAMEPAD_RIGHT_TRIGGER] > XINPUT_GAMEPAD_MAX_CROSSTALK); + default: + break; + } #else - if (joykey < 10) - return btn_word & button_index_to_bitmap_code[joykey]; + if (joykey < 10) + return (btn_word & button_index_to_bitmap_code[joykey]); #endif - - return false; + } + return 0; } -static int16_t xdk_joypad_axis(unsigned port_num, uint32_t joyaxis) +static int16_t xdk_joypad_button(unsigned port, uint16_t joykey) +{ + XINPUT_GAMEPAD *pad = &(g_xinput_states[port].xstate.Gamepad); + if (port >= DEFAULT_MAX_PADS) + return 0; + return xdk_joypad_button_state(pad, port, joykey); +} + +static int16_t xdk_joypad_axis_state(XINPUT_GAMEPAD *pad, + unsigned port, uint32_t joyaxis) { int val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - XINPUT_GAMEPAD *pad = NULL; - - if (joyaxis == AXIS_NONE || port_num >= DEFAULT_MAX_PADS) - return 0; - if (AXIS_NEG_GET(joyaxis) <= 3) { axis = AXIS_NEG_GET(joyaxis); @@ -178,7 +179,6 @@ static int16_t xdk_joypad_axis(unsigned port_num, uint32_t joyaxis) is_pos = true; } - pad = &(g_xinput_states[port_num].xstate.Gamepad); switch (axis) { @@ -218,6 +218,47 @@ static int16_t xdk_joypad_axis(unsigned port_num, uint32_t joyaxis) return val; } +static int16_t xdk_joypad_axis(unsigned port, uint32_t joyaxis) +{ + XINPUT_GAMEPAD *pad = &(g_xinput_states[port].xstate.Gamepad); + if (port >= DEFAULT_MAX_PADS) + return 0; + return xdk_joypad_axis_state(pad, port, joyaxis); +} + +static int16_t xdk_joypad_state( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + XINPUT_GAMEPAD *pad = &(g_xinput_states[port].xstate.Gamepad); + + if (port >= DEFAULT_MAX_PADS) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && xdk_joypad_button_state( + pad, port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(xdk_joypad_axis_state(pad, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void xdk_joypad_poll(void) { unsigned port; @@ -325,6 +366,7 @@ input_device_driver_t xdk_joypad = { xdk_joypad_query_pad, xdk_joypad_destroy, xdk_joypad_button, + xdk_joypad_state, NULL, xdk_joypad_axis, xdk_joypad_poll, diff --git a/input/drivers_joypad/xinput_joypad.c b/input/drivers_joypad/xinput_joypad.c index 7db0705ba1..9cf7ca1f3e 100644 --- a/input/drivers_joypad/xinput_joypad.c +++ b/input/drivers_joypad/xinput_joypad.c @@ -138,8 +138,8 @@ typedef struct bool connected; } xinput_joypad_state; +/* TODO/FIXME - static globals */ static XINPUT_VIBRATION g_xinput_rumble_states[4]; - static xinput_joypad_state g_xinput_states[4]; static INLINE int pad_index_to_xuser_index(unsigned pad) @@ -286,13 +286,18 @@ static bool xinput_joypad_init(void *data) } /* Zero out the states. */ - for (i = 0; i < 4; ++i) - memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state)); - - /* Do a dummy poll to check which controllers are connected. */ for (i = 0; i < 4; ++i) { - g_xinput_states[i].connected = !(g_XInputGetStateEx(i, &dummy_state) == ERROR_DEVICE_NOT_CONNECTED); + g_xinput_states[i].xstate.dwPacketNumber = 0; + g_xinput_states[i].xstate.Gamepad.wButtons = 0; + g_xinput_states[i].xstate.Gamepad.bLeftTrigger = 0; + g_xinput_states[i].xstate.Gamepad.bRightTrigger = 0; + g_xinput_states[i].xstate.Gamepad.sThumbLX = 0; + g_xinput_states[i].xstate.Gamepad.sThumbLY = 0; + g_xinput_states[i].xstate.Gamepad.sThumbRX = 0; + g_xinput_states[i].xstate.Gamepad.sThumbRY = 0; + g_xinput_states[i].connected = + !(g_XInputGetStateEx(i, &dummy_state) == ERROR_DEVICE_NOT_CONNECTED); } if ( (!g_xinput_states[0].connected) && @@ -372,7 +377,17 @@ static void xinput_joypad_destroy(void) unsigned i; for (i = 0; i < 4; ++i) - memset(&g_xinput_states[i], 0, sizeof(xinput_joypad_state)); + { + g_xinput_states[i].xstate.dwPacketNumber = 0; + g_xinput_states[i].xstate.Gamepad.wButtons = 0; + g_xinput_states[i].xstate.Gamepad.bLeftTrigger = 0; + g_xinput_states[i].xstate.Gamepad.bRightTrigger = 0; + g_xinput_states[i].xstate.Gamepad.sThumbLX = 0; + g_xinput_states[i].xstate.Gamepad.sThumbLY = 0; + g_xinput_states[i].xstate.Gamepad.sThumbRX = 0; + g_xinput_states[i].xstate.Gamepad.sThumbRY = 0; + g_xinput_states[i].connected = false; + } #if defined(HAVE_DYNAMIC) && !defined(__WINRT__) dylib_close(g_xinput_dll); @@ -407,68 +422,54 @@ static const uint16_t button_index_to_bitmap_code[] = { XINPUT_GAMEPAD_GUIDE }; -static bool xinput_joypad_button(unsigned port_num, uint16_t joykey) +static int16_t xinput_joypad_button_state( + unsigned xuser, unsigned port, uint16_t joykey) { - uint16_t btn_word = 0; - unsigned hat_dir = 0; - int xuser = pad_index_to_xuser_index(port_num); - -#ifdef HAVE_DINPUT - if (xuser == -1) - return dinput_joypad.button(port_num, joykey); -#endif - - if (!(g_xinput_states[xuser].connected)) - return false; - - btn_word = g_xinput_states[xuser].xstate.Gamepad.wButtons; - hat_dir = GET_HAT_DIR(joykey); + uint16_t btn_word = g_xinput_states[xuser].xstate.Gamepad.wButtons; + unsigned hat_dir = GET_HAT_DIR(joykey); if (hat_dir) { switch (hat_dir) { case HAT_UP_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_UP; + return (btn_word & XINPUT_GAMEPAD_DPAD_UP); case HAT_DOWN_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_DOWN; + return (btn_word & XINPUT_GAMEPAD_DPAD_DOWN); case HAT_LEFT_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_LEFT; + return (btn_word & XINPUT_GAMEPAD_DPAD_LEFT); case HAT_RIGHT_MASK: - return btn_word & XINPUT_GAMEPAD_DPAD_RIGHT; + return (btn_word & XINPUT_GAMEPAD_DPAD_RIGHT); + default: + break; } - - return false; /* hat requested and no hat button down. */ + /* hat requested and no hat button down */ } - - if (joykey < g_xinput_num_buttons) - return btn_word & button_index_to_bitmap_code[joykey]; - - return false; + else if (joykey < g_xinput_num_buttons) + return (btn_word & button_index_to_bitmap_code[joykey]); + return 0; } -static int16_t xinput_joypad_axis (unsigned port_num, uint32_t joyaxis) +static int16_t xinput_joypad_button(unsigned port, uint16_t joykey) +{ + int xuser = pad_index_to_xuser_index(port); +#ifdef HAVE_DINPUT + if (xuser == -1) + return dinput_joypad.button(port, joykey); +#endif + if (!(g_xinput_states[xuser].connected)) + return 0; + return xinput_joypad_button_state(xuser, port, joykey); +} + +static int16_t xinput_joypad_axis_state( + XINPUT_GAMEPAD *pad, + unsigned port, uint32_t joyaxis) { - int xuser; int16_t val = 0; int axis = -1; bool is_neg = false; bool is_pos = false; - XINPUT_GAMEPAD* pad = NULL; - - if (joyaxis == AXIS_NONE) - return 0; - - xuser = pad_index_to_xuser_index(port_num); - -#ifdef HAVE_DINPUT - if (xuser == -1) - return dinput_joypad.axis(port_num, joyaxis); -#endif - - if (!(g_xinput_states[xuser].connected)) - return 0; - /* triggers (axes 4,5) cannot be negative */ if (AXIS_NEG_GET(joyaxis) <= 3) { @@ -481,8 +482,6 @@ static int16_t xinput_joypad_axis (unsigned port_num, uint32_t joyaxis) is_pos = true; } - pad = &(g_xinput_states[xuser].xstate.Gamepad); - switch (axis) { case 0: @@ -517,6 +516,56 @@ static int16_t xinput_joypad_axis (unsigned port_num, uint32_t joyaxis) return val; } +static int16_t xinput_joypad_axis(unsigned port, uint32_t joyaxis) +{ + int xuser = pad_index_to_xuser_index(port); + XINPUT_GAMEPAD *pad = &(g_xinput_states[xuser].xstate.Gamepad); +#ifdef HAVE_DINPUT + if (xuser == -1) + return dinput_joypad.axis(port, joyaxis); +#endif + if (!(g_xinput_states[xuser].connected)) + return 0; + return xinput_joypad_axis_state(pad, port, joyaxis); +} + +static int16_t xinput_joypad_state_func( + rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, + unsigned port) +{ + unsigned i; + int16_t ret = 0; + int xuser = pad_index_to_xuser_index(port); + XINPUT_GAMEPAD *pad = &(g_xinput_states[xuser].xstate.Gamepad); +#ifdef HAVE_DINPUT + if (xuser == -1) + return dinput_joypad.state(joypad_info, binds, port); +#endif + if (!(g_xinput_states[xuser].connected)) + return 0; + + for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++) + { + /* Auto-binds are per joypad, not per user. */ + const uint64_t joykey = (binds[i].joykey != NO_BTN) + ? binds[i].joykey : joypad_info->auto_binds[i].joykey; + const uint32_t joyaxis = (binds[i].joyaxis != AXIS_NONE) + ? binds[i].joyaxis : joypad_info->auto_binds[i].joyaxis; + if ( + (uint16_t)joykey != NO_BTN + && xinput_joypad_button_state( + xuser, port, (uint16_t)joykey)) + ret |= ( 1 << i); + else if (joyaxis != AXIS_NONE && + ((float)abs(xinput_joypad_axis_state(pad, port, joyaxis)) + / 0x8000) > joypad_info->axis_threshold) + ret |= (1 << i); + } + + return ret; +} + static void xinput_joypad_poll(void) { unsigned i; @@ -595,6 +644,7 @@ input_device_driver_t xinput_joypad = { xinput_joypad_query_pad, xinput_joypad_destroy, xinput_joypad_button, + xinput_joypad_state_func, NULL, xinput_joypad_axis, xinput_joypad_poll, diff --git a/input/drivers_keyboard/keyboard_event_apple.c b/input/drivers_keyboard/keyboard_event_apple.c index f0361ea436..9f4e5124c4 100644 --- a/input/drivers_keyboard/keyboard_event_apple.c +++ b/input/drivers_keyboard/keyboard_event_apple.c @@ -29,7 +29,8 @@ #include "keyboard_event_apple.h" #if TARGET_OS_IPHONE -static bool small_keyboard_active; +/* TODO/FIXME - static globals */ +static bool small_keyboard_active = false; #define HIDKEY(X) X #else diff --git a/input/drivers_keyboard/keyboard_event_xkb.c b/input/drivers_keyboard/keyboard_event_xkb.c index 78a5f5d152..8bb002abf5 100644 --- a/input/drivers_keyboard/keyboard_event_xkb.c +++ b/input/drivers_keyboard/keyboard_event_xkb.c @@ -29,6 +29,7 @@ #define MOD_MAP_SIZE 5 +/* TODO/FIXME - static globals */ static struct xkb_context *xkb_ctx = NULL; static struct xkb_keymap *xkb_map = NULL; static struct xkb_state *xkb_state = NULL; diff --git a/input/include/gamepad.h b/input/include/gamepad.h index d895b55f25..a3fd5dff1e 100644 --- a/input/include/gamepad.h +++ b/input/include/gamepad.h @@ -20,11 +20,13 @@ #include "../input_driver.h" -struct pad_connection_listener_interface { +struct pad_connection_listener_interface +{ void (*connected)(unsigned port, input_device_driver_t *driver); }; -typedef struct _axis_data { +typedef struct _axis_data +{ int32_t axis; bool is_negative; } axis_data; diff --git a/input/include/hid_driver.h b/input/include/hid_driver.h index 81c9f7cd94..eed6fa8a18 100644 --- a/input/include/hid_driver.h +++ b/input/include/hid_driver.h @@ -38,7 +38,9 @@ struct hid_driver void *(*init)(void); bool (*query_pad)(void *handle, unsigned pad); void (*free)(const void *handle); - bool (*button)(void *handle, unsigned pad, uint16_t button); + int16_t (*button)(void *handle, unsigned pad, uint16_t button); + int16_t (*state)(void *data, rarch_joypad_info_t *joypad_info, + const void *binds_data, unsigned port); void (*get_buttons)(void *handle, unsigned pad, input_bits_t *state); int16_t (*axis)(void *handle, unsigned pad, uint32_t axis); void (*poll)(void *handle); diff --git a/input/input_driver.h b/input/input_driver.h index 8d9cb158db..45af484140 100644 --- a/input/input_driver.h +++ b/input/input_driver.h @@ -151,6 +151,18 @@ struct rarch_joypad_info float axis_threshold; }; +typedef struct +{ + char name[256]; + char display_name[256]; + char config_path[PATH_MAX_LENGTH]; + char config_name[PATH_MAX_LENGTH]; + uint16_t vid; + uint16_t pid; + bool autoconfigured; + unsigned name_index; +} input_device_info_t; + struct input_driver { /* Inits input driver. @@ -193,7 +205,9 @@ struct rarch_joypad_driver bool (*init)(void *data); bool (*query_pad)(unsigned); void (*destroy)(void); - bool (*button)(unsigned, uint16_t); + int16_t (*button)(unsigned, uint16_t); + int16_t (*state)(rarch_joypad_info_t *joypad_info, + const struct retro_keybind *binds, unsigned port); void (*get_buttons)(unsigned, input_bits_t *); int16_t (*axis)(unsigned, uint32_t); void (*poll)(void); @@ -203,6 +217,48 @@ struct rarch_joypad_driver const char *ident; }; +#if defined(ANDROID) +#define DEFAULT_MAX_PADS 8 +#define ANDROID_KEYBOARD_PORT DEFAULT_MAX_PADS +#elif defined(_3DS) +#define DEFAULT_MAX_PADS 1 +#elif defined(SWITCH) || defined(HAVE_LIBNX) +#define DEFAULT_MAX_PADS 8 +#elif defined(WIIU) +#ifdef WIIU_HID +#define DEFAULT_MAX_PADS 16 +#else +#define DEFAULT_MAX_PADS 5 +#endif +#elif defined(DJGPP) +#define DEFAULT_MAX_PADS 1 +#define DOS_KEYBOARD_PORT DEFAULT_MAX_PADS +#elif defined(XENON) +#define DEFAULT_MAX_PADS 4 +#elif defined(VITA) || defined(SN_TARGET_PSP2) +#define DEFAULT_MAX_PADS 4 +#elif defined(PSP) +#define DEFAULT_MAX_PADS 1 +#elif defined(PS2) +#define DEFAULT_MAX_PADS 2 +#elif defined(GEKKO) || defined(HW_RVL) +#define DEFAULT_MAX_PADS 4 +#elif defined(__linux__) || (defined(BSD) && !defined(__MACH__)) +#define DEFAULT_MAX_PADS 8 +#elif defined(__QNX__) +#define DEFAULT_MAX_PADS 8 +#elif defined(__CELLOS_LV2__) +#define DEFAULT_MAX_PADS 7 +#elif defined(_XBOX) +#define DEFAULT_MAX_PADS 4 +#elif defined(HAVE_XINPUT) && !defined(HAVE_DINPUT) +#define DEFAULT_MAX_PADS 4 +#elif defined(DINGUX) +#define DEFAULT_MAX_PADS 2 +#else +#define DEFAULT_MAX_PADS 16 +#endif + /** * config_get_input_driver_options: * @@ -224,12 +280,6 @@ const char* config_get_input_driver_options(void); bool input_driver_set_rumble_state(unsigned port, enum retro_rumble_effect effect, uint16_t strength); -uint64_t input_driver_get_capabilities(void); - -const input_device_driver_t * input_driver_get_joypad_driver(void); - -const input_device_driver_t * input_driver_get_sec_joypad_driver(void); - /** * input_sensor_set_state: * @port : User number. @@ -250,16 +300,10 @@ input_driver_t *input_get_ptr(void); void *input_get_data(void); -void input_driver_set_flushing_input(void); - -bool input_driver_is_libretro_input_blocked(void); - void input_driver_set_nonblock_state(void); void input_driver_unset_nonblock_state(void); -void input_driver_set_own_driver(void); - float *input_driver_get_float(enum input_action action); unsigned *input_driver_get_uint(enum input_action action); @@ -324,31 +368,6 @@ const input_device_driver_t *input_joypad_init_driver( break; \ } -/** - * input_joypad_analog: - * @drv : Input device driver handle. - * @port : User number. - * @idx : Analog key index. - * E.g.: - * - RETRO_DEVICE_INDEX_ANALOG_LEFT - * - RETRO_DEVICE_INDEX_ANALOG_RIGHT - * - RETRO_DEVICE_INDEX_ANALOG_BUTTON - * @ident : Analog key identifier. - * E.g.: - * - RETRO_DEVICE_ID_ANALOG_X - * - RETRO_DEVICE_ID_ANALOG_Y - * @binds : Binds of user. - * - * Gets analog value of analog key identifiers @idx and @ident - * from user with number @port with provided keybinds (@binds). - * - * Returns: analog value on success, otherwise 0. - **/ -int16_t input_joypad_analog(const input_device_driver_t *driver, - rarch_joypad_info_t *joypad_info, - unsigned port, unsigned idx, unsigned ident, - const struct retro_keybind *binds); - /** * input_joypad_set_rumble: * @drv : Input device driver handle. @@ -372,21 +391,7 @@ bool input_joypad_set_rumble(const input_device_driver_t *driver, **/ void input_pad_connect(unsigned port, input_device_driver_t *driver); -/** - * input_mouse_button_raw: - * @port : Mouse number. - * @button : Identifier of key (libretro mouse constant). - * - * Checks if key (@button) was being pressed by user - * with mouse number @port. - * - * Returns: true (1) if key was pressed, otherwise - * false (0). - **/ -bool input_mouse_button_raw(unsigned port, unsigned button); - #ifdef HAVE_HID - #include "include/hid_driver.h" /** @@ -439,29 +444,8 @@ struct input_keyboard_ctx_wait void input_keyboard_event(bool down, unsigned code, uint32_t character, uint16_t mod, unsigned device); -bool input_keyboard_line_append(const char *word); - -/** - * input_keyboard_start_line: - * @userdata : Userdata. - * @cb : Line complete callback function. - * - * Sets function pointer for keyboard line handle. - * - * The underlying buffer can be reallocated at any time - * (or be NULL), but the pointer to it remains constant - * throughout the objects lifetime. - * - * Returns: underlying buffer of the keyboard line. - **/ -const char **input_keyboard_start_line(void *userdata, - input_keyboard_line_complete_t cb); - -bool input_keyboard_ctl(enum rarch_input_keyboard_ctl_state state, void *data); - extern struct retro_keybind input_config_binds[MAX_USERS][RARCH_BIND_LIST_END]; extern struct retro_keybind input_autoconf_binds[MAX_USERS][RARCH_BIND_LIST_END]; -extern char input_device_names[MAX_USERS][64]; const char *input_config_bind_map_get_base(unsigned i); @@ -499,23 +483,26 @@ unsigned input_config_translate_str_to_bind_id(const char *str); void config_read_keybinds_conf(void *data); -void input_autoconfigure_joypad_conf(void *data, struct retro_keybind *binds); +/* Note: 'data' is an object of type config_file_t + * > We assume it was done like this to avoid including + * config_file.h... */ +void input_config_set_autoconfig_binds(unsigned port, void *data); +/* Set input_device_info */ void input_config_set_device_name(unsigned port, const char *name); - void input_config_set_device_display_name(unsigned port, const char *name); - -void input_config_set_device_config_name(unsigned port, const char *name); - void input_config_set_device_config_path(unsigned port, const char *path); +void input_config_set_device_config_name(unsigned port, const char *name); +void input_config_set_device_vid(unsigned port, uint16_t vid); +void input_config_set_device_pid(unsigned port, uint16_t pid); +void input_config_set_device_autoconfigured(unsigned port, bool autoconfigured); +void input_config_set_device_name_index(unsigned port, unsigned name_index); +/* Clear input_device_info */ void input_config_clear_device_name(unsigned port); - void input_config_clear_device_display_name(unsigned port); - -void input_config_clear_device_config_name(unsigned port); - void input_config_clear_device_config_path(unsigned port); +void input_config_clear_device_config_name(unsigned port); unsigned input_config_get_device_count(void); @@ -525,32 +512,32 @@ unsigned input_config_get_device(unsigned port); void input_config_set_device(unsigned port, unsigned id); +/* Get input_device_info */ const char *input_config_get_device_name(unsigned port); - const char *input_config_get_device_display_name(unsigned port); - -const char *input_config_get_device_config_name(unsigned port); - const char *input_config_get_device_config_path(unsigned port); +const char *input_config_get_device_config_name(unsigned port); +uint16_t input_config_get_device_vid(unsigned port); +uint16_t input_config_get_device_pid(unsigned port); +bool input_config_get_device_autoconfigured(unsigned port); +unsigned input_config_get_device_name_index(unsigned port); -const char *input_config_get_device_config_port(unsigned port); +/* TODO/FIXME: This is required by linuxraw_joypad.c + * and parport_joypad.c. These input drivers should + * be refactored such that this dubious low-level + * access is not required */ +char *input_config_get_device_name_ptr(unsigned port); +size_t input_config_get_device_name_size(unsigned port); const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned id); -void input_config_set_pid(unsigned port, uint16_t pid); - -uint16_t input_config_get_pid(unsigned port); - -void input_config_set_vid(unsigned port, uint16_t vid); - -uint16_t input_config_get_vid(unsigned port); - void input_config_save_keybinds_user(void *data, unsigned user); void input_config_save_keybind(void *data, const char *prefix, const char *base, const struct retro_keybind *bind, bool save_empty); +void input_config_reset_autoconfig_binds(unsigned port); void input_config_reset(void); void set_connection_listener(pad_connection_listener_t *listener); diff --git a/input/input_osk.h b/input/input_osk.h index 5570ea8a76..fd898fa12a 100644 --- a/input/input_osk.h +++ b/input/input_osk.h @@ -49,9 +49,6 @@ enum osk_type int input_event_get_osk_ptr(void); -void input_event_osk_append(enum osk_type *osk_idx, int ptr, bool is_rgui, - const char *word); - char **input_event_get_osk_grid(void); RETRO_END_DECLS diff --git a/input/input_overlay.h b/input/input_overlay.h index aebf91fbca..57ce2cf3b2 100644 --- a/input/input_overlay.h +++ b/input/input_overlay.h @@ -211,8 +211,6 @@ typedef struct void input_overlay_free_overlay(struct overlay *overlay); -bool input_overlay_key_pressed(input_overlay_t *ol, unsigned key); - void input_overlay_set_visibility(int overlay_idx,enum overlay_visibility vis); RETRO_END_DECLS diff --git a/input/input_remapping.c b/input/input_remapping.c deleted file mode 100644 index ec66f9f985..0000000000 --- a/input/input_remapping.c +++ /dev/null @@ -1,313 +0,0 @@ -/* RetroArch - A frontend for libretro. - * Copyright (C) 2011-2017 - Daniel De Matteis - * Copyright (C) 2016-2019 - Andrés Suárez - * - * 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 . - */ - -#include -#include -#include -#include -#include - -#include "input_remapping.h" -#include "../configuration.h" -#include "../retroarch.h" - -/* TODO/FIXME - static public global variables */ -static unsigned old_analog_dpad_mode[MAX_USERS]; -static unsigned old_libretro_device[MAX_USERS]; - -/** - * input_remapping_load_file: - * @data : Path to config file. - * - * Loads a remap file from disk to memory. - * - * Returns: true (1) if successful, otherwise false (0). - **/ -bool input_remapping_load_file(void *data, const char *path) -{ - unsigned i, j, k; - config_file_t *conf = (config_file_t*)data; - settings_t *settings = config_get_ptr(); - global_t *global = global_get_ptr(); - - if (!conf || string_is_empty(path)) - return false; - - if (!string_is_empty(global->name.remapfile)) - input_remapping_set_defaults(true); - global->name.remapfile = strdup(path); - - for (i = 0; i < MAX_USERS; i++) - { - char s1[64], s2[64], s3[64]; - char btn_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; - char key_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; - char stk_ident[8][192] = {{0}}; - - char key_strings[RARCH_FIRST_CUSTOM_BIND + 8][128] = { - "b", "y", "select", "start", - "up", "down", "left", "right", - "a", "x", "l", "r", "l2", "r2", - "l3", "r3", "l_x+", "l_x-", "l_y+", "l_y-", "r_x+", "r_x-", "r_y+", "r_y-" }; - - old_analog_dpad_mode[i] = settings->uints.input_analog_dpad_mode[i]; - old_libretro_device[i] = settings->uints.input_libretro_device[i]; - - s1[0] = '\0'; - s2[0] = '\0'; - s3[0] = '\0'; - - snprintf(s1, sizeof(s1), "input_player%u_btn", i + 1); - snprintf(s2, sizeof(s2), "input_player%u_key", i + 1); - snprintf(s3, sizeof(s3), "input_player%u_stk", i + 1); - - for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) - { - if (j < RARCH_FIRST_CUSTOM_BIND) - { - int btn_remap = -1; - int key_remap = -1; - - fill_pathname_join_delim(btn_ident[j], s1, - key_strings[j], '_', sizeof(btn_ident[j])); - fill_pathname_join_delim(key_ident[j], s2, - key_strings[j], '_', sizeof(btn_ident[j])); - - if (config_get_int(conf, btn_ident[j], &btn_remap)) - { - if (btn_remap == -1) - btn_remap = RARCH_UNMAPPED; - - configuration_set_uint(settings, - settings->uints.input_remap_ids[i][j], btn_remap); - } - - if (!config_get_int(conf, key_ident[j], &key_remap)) - key_remap = RETROK_UNKNOWN; - - configuration_set_uint(settings, - settings->uints.input_keymapper_ids[i][j], key_remap); - } - else - { - int stk_remap = -1; - k = j - RARCH_FIRST_CUSTOM_BIND; - - fill_pathname_join_delim(stk_ident[k], s3, - key_strings[j], '$', sizeof(stk_ident[k])); - - snprintf(stk_ident[k], - sizeof(stk_ident[k]), - "%s_%s", - s3, - key_strings[j]); - - if (config_get_int(conf, stk_ident[k], &stk_remap)) - { - if (stk_remap == -1) - stk_remap = RARCH_UNMAPPED; - - configuration_set_uint(settings, - settings->uints.input_remap_ids[i][j], stk_remap); - } - } - } - - snprintf(s1, sizeof(s1), "input_player%u_analog_dpad_mode", i + 1); - CONFIG_GET_INT_BASE(conf, settings, uints.input_analog_dpad_mode[i], s1); - - snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1); - CONFIG_GET_INT_BASE(conf, settings, uints.input_libretro_device[i], s1); - } - - config_file_free(conf); - - return true; -} - -/** - * input_remapping_save_file: - * @path : Path to remapping file (relative path). - * - * Saves remapping values to file. - * - * Returns: true (1) if successful, otherwise false (0). - **/ -bool input_remapping_save_file(const char *path) -{ - bool ret; - unsigned i, j, k; - size_t path_size = PATH_MAX_LENGTH * sizeof(char); - char *buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); - char *remap_file = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); - config_file_t *conf = NULL; - unsigned max_users = *(input_driver_get_uint(INPUT_ACTION_MAX_USERS)); - settings_t *settings = config_get_ptr(); - const char *dir_input_remapping = settings->paths.directory_input_remapping; - - buf[0] = remap_file[0] = '\0'; - - fill_pathname_join(buf, dir_input_remapping, path, path_size); - fill_pathname_noext(remap_file, buf, ".rmp", path_size); - - free(buf); - - if (!(conf = config_file_new_from_path_to_string(remap_file))) - { - if (!(conf = config_file_new_alloc())) - { - free(remap_file); - return false; - } - } - - for (i = 0; i < max_users; i++) - { - char s1[64], s2[64], s3[64]; - char btn_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; - char key_ident[RARCH_FIRST_CUSTOM_BIND][128] = {{0}}; - char stk_ident[8][128] = {{0}}; - - char key_strings[RARCH_FIRST_CUSTOM_BIND + 8][128] = { - "b", "y", "select", "start", - "up", "down", "left", "right", - "a", "x", "l", "r", "l2", "r2", - "l3", "r3", "l_x+", "l_x-", "l_y+", "l_y-", "r_x+", "r_x-", "r_y+", "r_y-" }; - - s1[0] = '\0'; - s2[0] = '\0'; - - snprintf(s1, sizeof(s1), "input_player%u_btn", i + 1); - snprintf(s2, sizeof(s2), "input_player%u_key", i + 1); - snprintf(s3, sizeof(s1), "input_player%u_stk", i + 1); - - for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) - { - unsigned remap_id = settings->uints.input_remap_ids[i][j]; - unsigned keymap_id = settings->uints.input_keymapper_ids[i][j]; - - if (j < RARCH_FIRST_CUSTOM_BIND) - { - fill_pathname_join_delim(btn_ident[j], s1, - key_strings[j], '_', sizeof(btn_ident[j])); - fill_pathname_join_delim(key_ident[j], s2, - key_strings[j], '_', sizeof(btn_ident[j])); - - /* only save values that have been modified */ - if (remap_id != j && remap_id != RARCH_UNMAPPED) - config_set_int(conf, btn_ident[j], - settings->uints.input_remap_ids[i][j]); - else if (remap_id != j && remap_id == RARCH_UNMAPPED) - config_set_int(conf, btn_ident[j], -1); - else - config_unset(conf, btn_ident[j]); - - if (keymap_id != RETROK_UNKNOWN) - config_set_int(conf, key_ident[j], - settings->uints.input_keymapper_ids[i][j]); - } - else - { - k = j - RARCH_FIRST_CUSTOM_BIND; - fill_pathname_join_delim(stk_ident[k], s3, - key_strings[j], '_', sizeof(stk_ident[k])); - if (remap_id != j && remap_id != RARCH_UNMAPPED) - config_set_int(conf, stk_ident[k], - settings->uints.input_remap_ids[i][j]); - else if (remap_id != j && remap_id == RARCH_UNMAPPED) - config_set_int(conf, stk_ident[k], - -1); - else - config_unset(conf, stk_ident[k]); - } - } - - snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1); - config_set_int(conf, s1, input_config_get_device(i)); - snprintf(s1, sizeof(s1), "input_player%u_analog_dpad_mode", i + 1); - config_set_int(conf, s1, settings->uints.input_analog_dpad_mode[i]); - } - - ret = config_file_write(conf, remap_file, true); - config_file_free(conf); - - free(remap_file); - return ret; -} - -bool input_remapping_remove_file(const char *path, - const char *dir_input_remapping) -{ - bool ret = false; - size_t path_size = PATH_MAX_LENGTH * sizeof(char); - char *buf = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); - char *remap_file = (char*)malloc(PATH_MAX_LENGTH * sizeof(char)); - buf[0] = remap_file[0] = '\0'; - - fill_pathname_join(buf, dir_input_remapping, path, path_size); - fill_pathname_noext(remap_file, buf, ".rmp", path_size); - - ret = filestream_delete(remap_file) == 0 ? true : false; - free(buf); - free(remap_file); - return ret; -} - -void input_remapping_set_defaults(bool deinit) -{ - unsigned i, j; - settings_t *settings = config_get_ptr(); - global_t *global = global_get_ptr(); - - if (!global) - return; - - if (deinit) - { - if (!string_is_empty(global->name.remapfile)) - free(global->name.remapfile); - global->name.remapfile = NULL; - rarch_ctl(RARCH_CTL_UNSET_REMAPS_CORE_ACTIVE, NULL); - rarch_ctl(RARCH_CTL_UNSET_REMAPS_CONTENT_DIR_ACTIVE, NULL); - rarch_ctl(RARCH_CTL_UNSET_REMAPS_GAME_ACTIVE, NULL); - } - - for (i = 0; i < MAX_USERS; i++) - { - for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++) - { - if (j < RARCH_FIRST_CUSTOM_BIND) - { - const struct retro_keybind *keybind = &input_config_binds[i][j]; - if (keybind) - configuration_set_uint(settings, - settings->uints.input_remap_ids[i][j], keybind->id); - configuration_set_uint(settings, - settings->uints.input_keymapper_ids[i][j], RETROK_UNKNOWN); - } - else - configuration_set_uint(settings, - settings->uints.input_remap_ids[i][j], j); - } - - if (old_analog_dpad_mode[i]) - configuration_set_uint(settings, - settings->uints.input_analog_dpad_mode[i], old_analog_dpad_mode[i]); - if (old_libretro_device[i]) - configuration_set_uint(settings, - settings->uints.input_libretro_device[i], old_libretro_device[i]); - } -} diff --git a/intl/.gitignore b/intl/.gitignore index 3e42ab0794..e696eebc80 100644 --- a/intl/.gitignore +++ b/intl/.gitignore @@ -1,4 +1,5 @@ -*.json crowdin.yaml crowdin.yml crowdin-cli.jar +msg_hash_*.json +progress.json diff --git a/intl/crowdin.yaml b/intl/crowdin.yaml index 4d83ee7e7d..0ea0f37ece 100644 --- a/intl/crowdin.yaml +++ b/intl/crowdin.yaml @@ -7,7 +7,13 @@ { "source": "/msg_hash_us.json", "translation": "/msg_hash_%two_letters_code%.json", - "translation_replace": { "_us": "" }, - "languages_mapping": { "zh-CN": "zhs", "zh-TW": "zht" }, }, + { + "source": "/steam_us.json", + "translation": "/steam_%two_letters_code%.json", + }, + { + "source": "/googleplay_us.json", + "translation": "/googleplay_%two_letters_code%.json", + }, ] diff --git a/intl/crowdin_sync.py b/intl/crowdin_sync.py index 95fbbf9868..57eea9c9fe 100755 --- a/intl/crowdin_sync.py +++ b/intl/crowdin_sync.py @@ -42,7 +42,7 @@ subprocess.run(['java', '-jar', 'crowdin-cli.jar', 'download', 'translations']) print('convert *.json to *.h') for file in os.listdir(dir_path): - if file.endswith('.json'): + if file.startswith('msg_hash_') and file.endswith('.json'): print(file) subprocess.run(['python3', 'json2h.py', file]) diff --git a/intl/googleplay_ar.json b/intl/googleplay_ar.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_ar.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_ast.json b/intl/googleplay_ast.json new file mode 100644 index 0000000000..f123bde716 --- /dev/null +++ b/intl/googleplay_ast.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch ye un proyeutu de códigu llibre qu'usa Libretro, una interfaz de desendolcu poderosa. Libretro permítete facer aplicaciones multiplataforma qu'usen carauterístiques como OpenGL, Vulkan y otres munches que van amestase nel futuru.\n\nVien cola so coleición integrada d'aplicaciones pa fornite un centru d'entretenimientu nel intre.\n\nLibretro y Retroarch valen perfeutamente pa crear xuegos, emuladores y programes multimedia. Si quies deprender más, vete al nuesu sitiu web (llístase embaxo)\n¡¡¡IMPORTANTE!!!\n\nRetroarch ye un programa modular, quier dicir que pa facer cualesquier cosa precises programes llamaos nucleos. Estos nucleos NUN S'INCLÚIN DE FÁBRICA pero pa baxalos vete a «Anovador en llinia -> Anovador de nucleos» dientro de l'aplicación.\n\nCARAUTERÍSTIQUES:\n*¡Una escoyeta de menús guapos!\n*¡Escanéu de ficheros/direutorios p'amestalos a coleiciones!\n*¡Amuesa de la información de cada xuegu namás amestalu a una coleición!\n*Descarga de programes (nucleos) en llinia\n*¡Anovamientu de tolos componentes!\n*¡Descarga de xuegos de Game & Watch pa xugalos nel nuesu emulador esclusivu de Game & Watch!\n*Mapéu integráu de controles y mandos\n*Xestión de trampes\n*¡Traducciones a otres llingües!\n*¡Más de 80 programes (nucleos) y contando!\n*¡Partíes en llinia con NetPlay!\n*¡Fechura de captures, puntos de guardáu y más!\n\n*Ensin DRM\n*Ensin torgues d'usu\n*Códigu abiertu\n*Ensin programes espía\n*Ensin anuncios\n\nXúnite al nuesu Discord pa consiguir sofitu y entamar partíes per NetPlay\nhttps://discord.gg/C4amCeV\n\n¡Visita la nuesa canal de YouTube pa tutoriales, noticies y muncho más!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nPa más información y ayuda, mira la nuesa documentación\nhttps://docs.libretro.com/\n\nVisita'l nuesu sitiu web\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "¡Xuegos retro y emuladores nel to preséu!" +} diff --git a/intl/googleplay_chs.json b/intl/googleplay_chs.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_chs.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_cht.json b/intl/googleplay_cht.json new file mode 100644 index 0000000000..eefbc2b5d9 --- /dev/null +++ b/intl/googleplay_cht.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro 遊戲和模擬器在您的設備上!" +} diff --git a/intl/googleplay_da.json b/intl/googleplay_da.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_da.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_de.json b/intl/googleplay_de.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_de.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_el.json b/intl/googleplay_el.json new file mode 100644 index 0000000000..0b5bd9517e --- /dev/null +++ b/intl/googleplay_el.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Κλασικά παιχνίδια και εξομοιωτές στη συσκευή σου!" +} diff --git a/intl/googleplay_es.json b/intl/googleplay_es.json new file mode 100644 index 0000000000..6633a557cc --- /dev/null +++ b/intl/googleplay_es.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch es un proyecto de código abierto que utiliza una potente interfaz de desarrollo llamada Libretro. Libretro permite crear aplicaciones multiplataforma capaces de utilizar características como OpenGL, cámaras multiplataforma, ubicación, y mucho más en el futuro.\n\nRetroArch incluye una colección integrada de aplicaciones para ofrecerte un centro único de entretenimiento.\n\nLibretro y RetroArch son aptos para crear juegos, emuladores y aplicaciones multimedia. Si quieres saber más, visita nuestra página web (más abajo).\n¡¡¡IMPORTANTE!!!\n\nRetroArch es un programa multiversátil, lo que significa que para poder hacer algo, necesita programas modulares a los que llamamos «núcleos». Estos núcleos NO VIENEN INCLUIDOS DE SERIE. Debes ir a Actualizador en línea -> Actualizador de núcleos dentro de la aplicación para descargarlos.\n\nCARACTERÍSTICAS:\n* ¡Varios menús elegantes a elegir!\n* ¡Busca archivos o carpetas y agrégalos por colecciones de sistemas de videojuegos!\n* ¡Accede a la información de cada juego en la base de datos cuando lo hayas añadido a una colección!\n* Descarga los programas («núcleos») a través de Internet\n* ¡Mantén todo actualizado!\n* ¡Descarga juegos de Game & Watch y disfruta de ellos con nuestro emulador exclusivo de Game & Watch!\n* Reasignación de entrada integrada\n* Reconfiguración de controles\n* Uso de trucos\n* ¡Soporte multiidioma!\n* ¡Actualmente hay más de 80 programas («núcleos»), y cada vez son más!\n* ¡Partidas multijugador en red!\n* ¡Haz capturas de pantalla, usa guardados rápidos, y mucho más!\n\n* Sin DRM\n* Sin restricciones de uso\n* Código abierto\n* Sin anuncios forzados\n* Sin espionaje alguno\n* Sin anuncios. Punto.\n\nÚnete a nosotros en Discord para recibir soporte técnico y para encontrar partidas de juego en red:\nhttps://discord.gg/C4amCeV\n\n¡Visita nuestro canal de YouTube para ver tutoriales, gameplays, noticias y los avances del desarrollo!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nPara más información, visita nuestra web de documentación (solo en inglés):\nhttps://docs.libretro.com/\n\n¡Visita nuestra página web!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "¡Juegos retrunos y emuladores en tu dispositivo!" +} diff --git a/intl/googleplay_fa.json b/intl/googleplay_fa.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_fa.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_fi.json b/intl/googleplay_fi.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_fi.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_fr.json b/intl/googleplay_fr.json new file mode 100644 index 0000000000..dde9888225 --- /dev/null +++ b/intl/googleplay_fr.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch est un projet open-source qui utilise une interface de développement puissante appelée Libretro. Libretro est une interface qui vous permet de créer des applications multi-plateformes qui peuvent utiliser des fonctionnalités riches comme OpenGL, la prise en charge multiplateforme de caméras, le support de la localisation, et plus encore à l'avenir.\n\nIl est livré avec sa propre collection d'applications intégrées pour vous fournir un 'guichet unique' pour le divertissement.\n\nLibretro et RetroArch sont parfaitement adaptés à la création de jeux, d'émulateurs et de programmes multimédia. Si vous voulez en savoir plus, rendez-vous sur notre site Web (listé ci-dessous).\nIMPORTANT!!!\n\nRetroArch est un programme polyvalent, ce qui signifie que pour qu'il fasse quoi que ce soit, vous avez besoin de programmes modulaires que nous appelons 'cœurs'. Ces cœurs NE SONT PAS INCLUS. Vous devez aller à \"Mise à jour en ligne -> Téléchargement de cœurs\" depuis l'application pour les télécharger.\n\nFONCTIONNALITÉS :\n* Des menus attractifs parmi lesquels choisir !\n* Analysez des fichiers/dossiers et ajoutez-les à des collections de systèmes de jeu !\n* Visualisez les informations de la base de données pour chaque jeu une fois ajouté à une collection !\n* Téléchargez des programmes ('cœurs') en ligne\n* Mettez tout à jour !\n* Téléchargez des jeux Game & Watch et jouez-y avec notre émulateur exclusif de Game & Watch !\n* Remappage de touches intégré\n* Possibilité de remapper les contrôles\n* Possibilité d'entrer et de charger des cheats\n* Support multilingue !\n* Plus de 80 programmes ('cœurs') pour l'instant et ça continue !\n* Jouez en multijoueur avec le jeu en réseau !\n* Prenez des captures d'écran, enregistrez des sauvegardes instantanées et plus encore !\n\n* Pas de DRM\n* Pas de restrictions d'utilisation\n* Open-source\n* Pas de publicités push\n* Pas d'espionnage\n* Pas de publicité, point\n\nRejoignez-nous sur discord pour le support et la recherche de joueurs en réseau\nhttps://discord.gg/C4amCeV\n\nVisitez notre chaîne Youtube ici pour des tutoriels, du gameplay, des nouvelles et la progression du développement !\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nPour plus d'infos et d'aide, consultez notre site de documentation -\nhttps://docs.libretro.com/\n\nVisitez notre site web !\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Jeux rétro et émulateurs sur votre appareil !" +} diff --git a/intl/googleplay_he.json b/intl/googleplay_he.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_he.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_it.json b/intl/googleplay_it.json new file mode 100644 index 0000000000..1f2d582333 --- /dev/null +++ b/intl/googleplay_it.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch è un progetto open-source che si avvale di una potente interfaccia di sviluppo chiamata Libretro. Libretro è un'interfaccia che consente di realizzare applicazioni multi-piattaforma che possono utilizzare funzioni ricche come OpenGL, supporto telecamera multi-piattaforma, supporto posizione e molto altro in futuro.\n\nViene fornito con la sua collezione integrata di applicazioni per fornire un 'one-stop-shop' per l'intrattenimento.\n\nLibretro e RetroArch sono perfettamente adatti per la creazione di giochi, emulatori e programmi multimediali. Se vuoi saperne di più, vai al nostro sito web (elencati di seguito).\nIMPORTANTE!!!\n\nRetroArch è un programma multi-versatile, il che significa che per fare qualsiasi cosa, hai bisogno di programmi modulari che chiamiamo 'core'. Queste anime NON FUORI DAL BOX. È necessario andare su \"Updater online -> Core Updater\" dall'interno dell'app per scaricarli.\n\nCARATTERISTICHE:\n* Menù Eye-candy tra cui scegliere!\n* Scansiona file / directory e aggiungili alle collezioni del sistema di gioco!\n* Visualizza le informazioni del database su ogni gioco una volta aggiunto ad una collezione!\n* Scarica programmi ('cores') online\n* Aggiorna tutto!\n* Scarica Game & Watch e gioca con il nostro emulatore esclusivo Game & Watch!\n* Rimappatura input integrata\n* Possibilità di riposizionare i controlli\n* Possibilità di immettere e caricare trucchi\n* Supporto multi-lingua!\n* Oltre 80 programmi ('cores') ora e conteggio!\n* Gioca multigiocatore con NetPlay!\n* Fai screenshot, risparmia stati e altro ancora!\n\n* Nessun DRM\n* Nessuna restrizione di utilizzo\n* Open-source\n* Nessun push ads\n* Nessun spionaggio\n* Nessun periodo di annunci\n\nUnisciti a noi per discord per supporto e matchmaking di netplay\nhttps://discord. g/C4amCeV\n\nVisita il nostro canale Youtube qui per tutorial, gameplay, news e sviluppo progresso!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube. om/RetroArchOfficial\n\nPer informazioni e aiuto, consulta il nostro sito di documentazione -\nhttps://docs.libretro.com/\n\nVisita il nostro sito web!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Giochi retrò ed emulatori sul tuo dispositivo!" +} diff --git a/intl/googleplay_ja.json b/intl/googleplay_ja.json new file mode 100644 index 0000000000..30237874d5 --- /dev/null +++ b/intl/googleplay_ja.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArchは、Libretroと呼ばれる強力な開発インタフェースを利用したオープンソースプロジェクトです。Libretroは、OpenGL、カメラサポート、位置情報などの豊富な機能を利用できるクロスプラットフォームのアプリケーションを作ることができるインタフェースです。\n\nLibretroには、エンターテイメントのための「ワンストップショップ」を提供する独自のアプリケーションが付属しています。\n\nLibretroとRetroArchは、ゲーム、エミュレータ、マルチメディアプログラムの作成に最適です。もっと詳しく知りたい方は、私達のウェブサイト(下記)をご覧ください。\n\n重要!\n\nRetroArch は多用途のプログラムです。つまり、何かを実行するためには、「コア」と呼ばれるモジュール式のプログラムが必要です。これらのコアはそのままでは提供されません。ダウンロードするには、アプリ内の「Online Updater -> Core Updater」にアクセスする必要があります。\n\n機能\n* 目の覚めるようなメニューから選ぶことができます。\n* ファイル/ディレクトリをスキャンして、ゲームシステムのコレクションに追加できます。\n* コレクションに追加された各ゲームのデータベース情報を見ることができます。\n* オンラインでプログラム('コア')をダウンロードできます。\n* すべてをアップデートできます!\n* ゲーム&ウォッチのゲームをダウンロードして、私たちの排他的なゲーム&ウォッチのエミュレータでそれらを再生します\n* 内蔵の入力リマッピング\n* コントロールをリマップする能力\n* チートを入力してロードする能力\n* 多言語対応!\n* 80以上のプログラム('コア')をサポートしています。\n* NetPlayでマルチプレイヤーをプレイ!\n* スクリーンショットを撮ったり、状態を保存したり\n\n* DRMはありません。\n* 使用上の制限はありません。\n* オープンソース\n* プッシュ広告はありません\n* スパイ活動はしていません\n* 広告期間はありません\n\nサポートとネットプレイのマッチメイキングのためにdiscordに参加しましょう\nhttps://discord.gg/C4amCeV\n\nチュートリアル、ゲームプレイ、ニュース、開発の進捗状況についてはこちらのYoutubeチャンネルをご覧ください。\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\n詳細とヘルプについては、ドキュメントサイトを参照してください。\nhttps://docs.libretro.com/\n\n私達のウェブサイトをご覧ください\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "レトロゲームとエミュレータをあなたの端末で!" +} diff --git a/intl/googleplay_ko.json b/intl/googleplay_ko.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_ko.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_nl.json b/intl/googleplay_nl.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_nl.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_pl.json b/intl/googleplay_pl.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_pl.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_pt_br.json b/intl/googleplay_pt_br.json new file mode 100644 index 0000000000..bc751c730e --- /dev/null +++ b/intl/googleplay_pt_br.json @@ -0,0 +1,4 @@ +{ + "main-desc": "O RetroArch é um projeto de código aberto que utiliza uma poderosa interface de desenvolvimento chamada Libretro. O Libretro é uma interface que permite criar aplicativos de plataforma cruzada que podem usar recursos avançados, como OpenGL, suporte a câmera com plataforma cruzada, suporte a localização e muito mais no futuro.\n\nEle vem com sua própria coleção interna de aplicativos para lhe fornecer um 'balcão único' de entretenimento.\n\nO Libretro e o RetroArch são perfeitamente adequados para criar jogos, emuladores e programas multimídia. Caso queira saber mais, acesse o nosso site (listado abaixo).\nIMPORTANTE!!!\n\nO RetroArch é um programa multi-versátil, o que significa que, para fazer qualquer coisa, você precisa de programas modulares que chamamos de 'núcleos'. Esses núcleos NÃO ESTÃO INCLUSOS. É preciso ir em \"Atualizador on-line -> Atualizador\" no aplicativo para fazer o download deles.\n\nRECURSOS:\n* Menus agradáveis ​​para escolher!\n* Digitalize arquivos / diretórios e adicione-os às coleções do sistema de jogos!\n* Ver informações do banco de dados sobre cada jogo, uma vez que for adicionado em uma coleção!\n* Baixe programas ('núcleos') on-line\n* Atualize tudo!\n* Baixe jogos Game & Watch e jogue-os com o nosso emulador de Game & Watch exclusivo!\n* Remapeamento da entrada embutido\n* Capacidade de remapear os controles\n* Capacidade de entrar e carregar trapaças\n* Suporte a vários idiomas!\n* Agora mais de 80 + programas ('núcleos') e contando!\n* Jogue online com o NetPlay!\n* Faça capturas de tela, salve as condições e muito mais!\n\n* Sem DRM\n* Sem restrições de uso\n* Código aberto\n* Sem anúncios na tela\n* Sem espionagem\n* Sem anúncios e ponto final\n\nJunte-se a nós no discord para suporte e jogatina online\nhttps://discord.gg/C4amCeV\n\nVisite o nosso canal aqui do Youtube para tutoriais, jogatina, notícias e para acompanhar o progresso do desenvolvimento!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nPara mais informações e ajuda, consulte a documentação do site -\nhttps://docs.libretro.com/\n\nVisite o nosso site!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Jogos retrô e emuladores no seu dispositivo!" +} diff --git a/intl/googleplay_pt_pt.json b/intl/googleplay_pt_pt.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_pt_pt.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_ru.json b/intl/googleplay_ru.json new file mode 100644 index 0000000000..af1db7ee39 --- /dev/null +++ b/intl/googleplay_ru.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Ретро игры и эмуляторы на вашем устройстве!" +} diff --git a/intl/googleplay_sk.json b/intl/googleplay_sk.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_sk.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_sv.json b/intl/googleplay_sv.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_sv.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_tr.json b/intl/googleplay_tr.json new file mode 100644 index 0000000000..e408d7694f --- /dev/null +++ b/intl/googleplay_tr.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch, Libretro adlı güçlü bir geliştirme arayüzünü kullanan açık kaynaklı bir projedir. Libretro, gelecekte OpenGL, platformlar arası kamera desteği, konum desteği ve daha fazlası gibi zengin özellikleri kullanabilen platformlar arası uygulamalar yapmanızı sağlayan bir arabirimidir.\n\nEğlence için 'herşeyi-tek-yerden-alma' sağlamak için kendi yerleşik uygulama koleksiyonu ile birlikte gelir.\n\nLibretro ve RetroArch, oyunlar, emülatörler ve multimedya programları oluşturmak için mükemmel bir şekilde uygundur. Daha fazla bilgi edinmek istiyorsanız, web sitemizi ziyaret edin (bağlantılar aşağıda listelenmiştir).\nÖNEMLİ!!!\n\nRetroArch çok yönlü bir programdır, yani herhangi bir şey yapabilmesi için 'çekirdek' dediğimiz modüler programlara ihtiyacınız vardır. Bu çekirdekler ilk etapta DAHİL DEĞİLDİR. İndirmek için uygulama içinden \"Çevrimiçi Güncelleyici -> Çekirdek Güncelleyici\" ye gitmeniz gerekir.\n\nÖZELLİKLERİ:\n* Kendinizin seçebileceği göze hitap eden menüler!\n* Dosyaları / dizinleri taratın ve oyun sistemi koleksiyonlarına ekletin!\n* Bir koleksiyona eklendiğinde her oyun hakkında veritabanı bilgilerini görüntüleyin!\n* Programları ('çekirdekler') çevrimiçi indirin\n* Her şeyi güncelleyin!\n* Game & Watch oyunlarını indirin ve özel Game & Watch emülatörümüzle oynayın!\n* Oyun kolu düğmeleri yeniden eşleştirme\n* Kontrolleri yeniden eşleme özelliği\n* Hileleri girme ve yükleme özelliği\n* Çoklu dil desteği!\n* Şu an 80'den fazla program ('çekirdek') mevcut ve her geçen gün yenisi ekleniyor!\n* NetPlay (ağ üzerinden oyna) ile çok oyunculu oyna!\n* Ekran görüntüleri alın, oyun anlarını ve daha fazlasını kaydedin!\n\n* DRM yok\n* Kullanım kısıtlaması yok\n* Açık kaynak\n* Reklam yok\n* Casusluk yok\n* Reklam bölümleri yok\n\nDestek ve ağ üzerinden oyun eşleştirme için Discord sunucumuzda bize katılın\nhttps://discord.gg/C4amCeV\n\nKılavuzlar, oynanışlar, haberler ve yazılım ilerlemesi için Youtube kanalımızı ziyaret edin!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nBilgi ve yardım için dokümantasyon sitemize bakın -\nhttps://docs.libretro.com/\n\nİnternet sitemizi ziyaret edin!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Cihazınızdaki retro oyunlar ve emülatörler!" +} diff --git a/intl/googleplay_uk.json b/intl/googleplay_uk.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_uk.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_us.json b/intl/googleplay_us.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_us.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/googleplay_vn.json b/intl/googleplay_vn.json new file mode 100644 index 0000000000..f68a4d9318 --- /dev/null +++ b/intl/googleplay_vn.json @@ -0,0 +1,4 @@ +{ + "main-desc": "RetroArch is an open-source project that makes use of a powerful development interface called Libretro. Libretro is an interface that allows you to make cross-platform applications that can use rich features such as OpenGL, cross-platform camera support, location support, and more in the future.\n\nIt comes with its own built-in collection of applications to provide you with a 'one-stop-shop' for entertainment.\n\nLibretro and RetroArch are perfectly suited for creating games, emulators and multimedia programs. If you want to learn more, go to our website (listed below).\nIMPORTANT!!!\n\nRetroArch is a multi-versatile program, that means that in order for it to do anything, you need modular programs that we call 'cores'. These cores DO NOT COME OUT OF THE BOX. You need to go to \"Online Updater -> Core Updater\" from within the app to download them.\n\nFEATURES:\n* Eye-candy menus to choose from!\n* Scan files / directories and add them to game system collections!\n* View database information about each game once added to a collection!\n* Download programs ('cores') online\n* Update everything!\n* Download Game & Watch games and play them with our exclusive Game & Watch emulator!\n* Built-in input remapping\n* Ability to remap controls\n* Ability to enter and load cheats\n* Multi-language support!\n* Over 80+ programs('cores') now and counting!\n* Play multiplayer with NetPlay!\n* Take screenshots, save states and more!\n\n* No DRM\n* No restrictions on usage\n* Open-source\n* No push ads\n* No spying\n* No ads period\n\nJoin us on discord for support and netplay matchmaking\nhttps://discord.gg/C4amCeV\n\nVisit our Youtube channel here for tutorials, gameplays, news and development progress!\nhttps://www.youtube.com/user/libretro\nhttps://www.youtube.com/RetroArchOfficial\n\nFor info and help, see our documentation site -\nhttps://docs.libretro.com/\n\nVisit our website!\nhttps://www.retroarch.com/\n\nwww.libretro.com", + "short-desc": "Retro games and emulators on your device!" +} diff --git a/intl/msg_hash_ar.h b/intl/msg_hash_ar.h index ebe3bf24aa..7d06f47b4c 100644 --- a/intl/msg_hash_ar.h +++ b/intl/msg_hash_ar.h @@ -457,6 +457,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "إزالة هذا النواة من القرص." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[تلقائي]" + ) /* Main Menu > Information > System Information */ @@ -542,7 +546,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "دعم Gamrpad على الشبكة" + "دعم Gamepad على الشبكة" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -1485,7 +1489,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "إزاحة العرض المخصصة المستخدمة لتحديد موقع المحور X-axis للمشاهدة. يتم تجاهل هذه إذا تم تمكين \"مقياس عدد صحيح\". سيتم التركيز عليها تلقائياً حينئذ." + "إزاحة العرض المخصصة المستخدمة لتحديد موقع المحور X-محور للمشاهدة. يتم تجاهل هذه إذا تم تمكين \"مقياس عدد صحيح\". سيتم التركيز عليها تلقائياً حينئذ." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1576,7 +1580,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "لا يوجد انحراف عن التوقيت الأساسي المطلوب. استخدم لشاشة معدل التحديث المتغير، GSync، FreeSync.s" + "لا يوجد انحراف عن التوقيت الأساسي المطلوب. استخدم لشاشة معدل التحديث المتغير، GSync، FreeSync، HDMI 2.1 VRR." ) /* Settings > Audio */ @@ -1962,10 +1966,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, "تغيير إعدادات التحكم في القائمة." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Input Hotkey Binds" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "تهيئة إعدادات المفتاح الساخن." @@ -2141,7 +2141,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "&مفاتيح الاختصار" + "مفاتيح الاختصار" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, @@ -2396,6 +2396,8 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "تحقق مما إذا كانت جميع البرامج الثابتة المطلوبة موجودة قبل محاولة تحميل المحتوى." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "السماح بالتدوير" @@ -2615,7 +2617,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "عدادات الأداء لـ RetroArch (والنماذج).\nيمكن أن تساعد بيانات العداد في تحديد اختناقات النظام وضبط أداء النظام والتطبيقات" + "عدادات الأداء لـ RetroArch (والنماذج).\nيمكن أن تساعد بيانات العداد في تحديد اختناقات النظام وضبط أداء النظام والتطبيقات." ) /* Settings > File Browser */ @@ -2903,6 +2905,8 @@ MSG_HASH( "عتامة جميع عناصر واجهة المستخدم للتراكب." ) + + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -3008,18 +3012,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, "تضمين تفاصيل الذاكرة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "يشمل استخدام الذاكرة الحالية/المجموع على الشاشة مع الإطارات الإطارية." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "خط الإشعارات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "حدد خط مختلف للإشعارات على الشاشة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "حجم الإشعارات" @@ -3079,14 +3075,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "المشاهدات" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "إظهار أو إخفاء العناصر على شاشة القائمة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "المظهر" @@ -3099,10 +3087,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "إظهار الإعدادات المتقدمة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "إظهار الإعدادات المتقدمة لمستخدمي الطاقة (مخفية بشكل افتراضي)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "وضعية kiosk" @@ -3127,10 +3111,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "تغلق الشاشة للبدء و/أو النهاية إذا تم الوصول إلى حدود القائمة أفقياً أو عمودياً." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "الإيقاف المؤقت عند تنشيط القائمة" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "في حالة التعطيل، سيبقى المحتوى قيد التشغيل في الخلفية عند تبديل قائمة RetroArch." @@ -3139,34 +3119,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, "استئناف المحتوى بعد استخدام حفظ الدول" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "إغلاق القائمة تلقائياً واستئناف المحتوى الحالي بعد تحديد 'حفظ الدولة' أو 'تحميل الدولة' من القائمة السريعة. تعطيل هذا يمكن أن يحفظ أداء الحالة على الأجهزة البطيئة جداً." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, "استئناف المحتوى بعد تغيير الأقراص" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "إغلاق القائمة تلقائياً واستئناف المحتوى الحالي بعد تحديد \"إدراج القرص\" أو \"تحميل قرص جديد\" من قائمة التحكم في القرص." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "دعم الفأرة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "يسمح للقائمة بالتحكم بها بواسطة الفأر." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "المس الدعم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "يسمح للقائمة بالتحكم في اللمسات على الشاشة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "مهام مطروحة" @@ -3175,10 +3139,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "تنفيذ المهام على موضوع منفصل." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "عدم التشغيل في الخلفية" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "إيقاف تشغيل اللعبة عندما يكون RetroArch ليس هو النافذة النشطة." @@ -3203,22 +3163,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "مرفقة واجهة المستخدم" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "تشغيل مرافقة واجهة المستخدم عند الإقلاع" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "شريط القائمة" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "قائمة سطح المكتب (إعادة التشغيل)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "إظهار قائمة سطح المكتب عند بدء التشغيل" - ) /* Settings > User Interface > Views */ @@ -3226,18 +3174,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "القائمة السريعة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "إظهار أو إخفاء العناصر على شاشة القائمة السريعة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "الإعدادات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "إظهار أو إخفاء العناصر على شاشة الإعدادات." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "إظهار نواة التحميل" @@ -3338,10 +3278,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "إظهار تبويب الإعدادات داخل القائمة الرئيسية." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "تعيين كلمة المرور لتمكين تبويب الإعدادات" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "توفير كلمة مرور عند إخفاء علامة تبويب الإعدادات يجعل من الممكن استعادتها في وقت لاحق من القائمة، عن طريق الذهاب إلى علامة التبويب القائمة الرئيسية، تحديد تمكين علامة تبويب الإعدادات وإدخال كلمة المرور." @@ -3454,10 +3390,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "إظهار التسميات الفرعية للقائمة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "يعرض معلومات إضافية لإدخال القائمة المحددة حاليا." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "عرض شاشة البداية" @@ -3823,26 +3755,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "عامل حجم القائمة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "تطبيق عامل قياس عام عند رسم القائمة. يمكن استخدامه لزيادة أو تقليل حجم واجهة المستخدم." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "الخلفية" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "حدد صورة لتعيينها كخلفية للقائمة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "شفافية الخلفية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "تعديل شفافية الخلفية الخلفية." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "شفافية العازل الإطاري" @@ -3879,26 +3795,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, "حركة نص المؤشر" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "حدد طريقة التمرير الأفقي المستخدمة لعرض سلاسل نص القائمة الطويلة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, "سرعة نص المؤشر" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "سرعة الرسوم المتحركة عند تمرير سلاسل نص القائمة الطويلة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, "نص المؤشر السلس" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "استخدام حركة تمرير سلسة عند عرض سلسلة نص قائمة طويلة. له تأثير صغير على الأداء." - ) /* Settings > AI Service */ @@ -3926,10 +3830,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, "تمكين خدمة الذكاء الاصطناعي للتشغيل عند الضغط على مفتاح خدمة الذكاء الاصطناعي." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "تبديل إيقاف خدمة AI المؤقت" - ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, "إيقاف مؤقت للنواة بينما تتم ترجمة الشاشة." @@ -3957,18 +3857,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, "تمكين إمكانية الوصول" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "تشغيل/إيقاف سرد إمكانية الوصول للتنقل في القائمة" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "سرعة خطاب المشرف" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "تعيين سرعة الكلام للمرآب، من السرعة إلى البطء" - ) /* Settings > Power Management */ @@ -3978,10 +3866,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "الإنجازات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "تنافس للحصول على منجزات مصممة خصيصا في الألعاب الكلاسيكية.\nلمزيد من المعلومات، قم بزيارة http://retroachievements.org" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "الوضع الصعب" @@ -3994,10 +3878,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "لوائح المتصدرين" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "لوحات المتصدرين الخاصة باللعبة.\nليس له أي تأثير إذا تم تعطيل وضع الهرنق." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, "واجهة ديسكورد" @@ -4034,10 +3914,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, "لقطة شاشة تلقائية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "التقاط لقطة شاشة تلقائياً عند تشغيل إنجاز." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, "شغل النشط" @@ -4093,58 +3969,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "كلمة مرور الخادم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "كلمة المرور للاتصال بمضيف الشبكة. تستخدم فقط في وضع المضيف." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "خادم Spectate-فقط كلمة المرور" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "كلمة المرور للاتصال بمضيف الشبكة مع امتيازات المشاهدة فقط. تستخدم فقط في وضع المضيف." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "وضع مشاهدة الشبكة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "ما إذا كان سيتم بدء تشغيل الشبكة في وضع المشاهدة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "السماح للعملاء في وضع الرق" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "سواء سمحت بالاتصالات في وضع العبيد. يحتاج عملاء وضع الرق إلى قدر ضئيل جداً من قوة المعالجة على أي من الجانبين، ولكن سيعاني كثيراً من تأخر الشبكة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "عدم السماح للعملاء في وضع غير الرق" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "سواء أكان عدم السماح بالاتصالات غير في وضع العبيد. لا يوصى بها إلا للشبكات السريعة جداً مع آلات ضعيفة جداً." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "وضع عديم الجنسية للشبكة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "ما إذا كان سيتم تشغيل netplay في وضع لا يتطلب حفظ الحالات. إذا تم تعيينها إلى الحقيقة، يتطلب الأمر شبكة سريعة جداً، ولكن لن يتم إجراء أي تصفيف، لذلك لن يكون هناك جهاز شبكة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "إطارات التحقق من الشبكة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "التردد في الأطر التي ستتحقق الشبكة من أن المضيف والعميل في تزامن معها." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "إطارات لاتفيا الإدخال" @@ -4189,18 +4037,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "منفذ أمر الشبكة" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Gamepad الشبكة" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "منفذ قاعدة الشبكة البعيدة" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "المستخدم %d عن بعد" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "أوامر ستدين" @@ -4213,10 +4049,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "التنزيلات المصغرة عند الطلب" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "تحميل الصور المصغرة المفقودة تلقائياً أثناء تصفح قوائم التشغيل. له تأثير قوي على الأداء." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "المحدّث" @@ -4259,10 +4091,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "قائمة المحفوظات" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "الاحتفاظ بقائمة تشغيل للألعاب والصور والموسيقى والفيديوهات المستخدمة مؤخرا." @@ -4275,10 +4103,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "الحد من عدد المدخلات في قائمة التشغيل الحديثة للألعاب والصور والموسيقى والفيديو." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "حجم قائمة المفضلة" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, "الحد من عدد الإدخالات في قائمة التشغيل المفضلة. بمجرد الوصول إلى الحد الأقصى، سيتم منع الإضافات الجديدة حتى تتم إزالة الإدخالات القديمة. تحديد قيمة -1 يسمح للمدخلات 'غير محدودة' (99999). تحذير: تخفيض القيمة سيؤدي إلى حذف المدخلات الموجودة!" @@ -4303,18 +4127,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, "ترتيب قوائم التشغيل بالأبجدية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "ترتيب قوائم تشغيل المحتوى بالترتيب الأبجدي. لاحظ أن قوائم تشغيل \"التاريخ\" للألعاب والصور والموسيقى والفيديوهات المستخدمة مؤخرا." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, "حفظ قوائم التشغيل باستخدام التنسيق القديم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, - "كتابة قوائم التشغيل باستخدام تنسيق نص عادي مستهلك. عند التعطيل، يتم تنسيق قوائم التشغيل باستخدام JSON." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, "ضغط قوائم التشغيل" @@ -4343,10 +4159,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "النواة" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "وقت اللعب:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "آخر لعب:" @@ -4359,14 +4171,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, "يحدد نوع سجل وقت التشغيل لعرضه على قائمة التشغيل Sblabels. (لاحظ أنه يجب تمكين سجل وقت التشغيل المقابل من خلال قائمة خيارات \"التوفير )" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "تنسيق \"آخر تشغيل\" لقائمة التشغيل الفرعية" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "يحدد نمط تنسيق التاريخ/الوقت المستخدم عند عرض سجل سجل التشغيل 'آخر تشغيل' معلومات الطابع الزمني. ملاحظة: خيارات '(AM/PM)' سيكون لها تأثير صغير على الأداء على بعض المنصات." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, "مطابقة الأرشيف الغامض" @@ -4383,14 +4187,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, "عند التعطيل، يتم إضافة المحتوى فقط إلى قوائم التشغيل إذا كان لديك أساس مثبت يدعم ملحقه. بتمكين هذا، سيضيف إلى قائمة التشغيل بغض النظر عن ذلك. بهذه الطريقة، يمكنك تثبيت النواة التي تحتاجها في وقت لاحق بعد المسح." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "إدارة قائمة التشغيل" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "تنفيذ مهام الصيانة في قائمة التشغيل المحددة (على سبيل المثال تعيين/إعادة تعيين الروابط الأساسية الافتراضية)." - ) /* Settings > Playlists > Playlist Management */ @@ -4422,18 +4218,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE, "طريقة الفرز" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "تغيير كيفية فرز المدخلات في قائمة التشغيل هذه." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, "تنظيف قائمة التشغيل" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "إزالة الإدخالات الغير صحيحة/المكررة والتحقق من صحة الروابط الأساسية." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "إحذف قائمة التشغيل" @@ -4473,10 +4261,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "اللّغة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "تعيين لغة الواجهة." - ) /* Settings > User > Privacy */ @@ -4511,10 +4295,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, "الإنجازات التراجعية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "خدمة الإنجازات التراجعية: للحصول على مزيد من المعلومات، يرجى زيارة http://retroachievements.org" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_YOUTUBE, "يوتيوب" @@ -4530,10 +4310,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "اسم المستخدم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "أدخل اسم المستخدم لحساب RetroAchievements الخاص بك." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "كلمة المرور" @@ -4579,10 +4355,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "مصادر" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "يتم الاستعلام عن هذا الموقع بشكل افتراضي عندما تحاول واجهات القائمة البحث عن الأصول القابلة للتحميل، إلخ." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "خلفيات ديناميكية" @@ -4603,10 +4375,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "مستعرض الملفات" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "تعيين دليل البدء لمتصفح الملف." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "الضبط" @@ -4691,18 +4459,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "إعدادات التسجيل" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "سيتم الاحتفاظ بإعدادات التسجيل هنا." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "الطبقات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "يحدد الدليل حيث يتم حفظ ملفات شريط الفيديو المستندة إلى GPU، لتيسير الوصول إليها." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, "تخطيط الفيديو" @@ -4723,18 +4483,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "إدخال التكوين التلقائي" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "إذا تم توصيل لوحة المروح، فسيتم تكوين لوحة المروحة هذه تلقائياً إذا كان ملف التكوين المقابل موجود داخل هذا الدليل." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "إعادة تعيين الإدخال" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "حفظ جميع الضوابط المجددة في هذا الدليل." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "قائمة التشغيل" @@ -4827,14 +4579,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "قطع اتصال الشبكة النشطة." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "تحديث غرفة القائمة" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "البحث عن غرف جديدة." - ) /* Netplay > Host */ @@ -4919,10 +4663,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, "حدد 'اسم النظام' يدويا للمحتوى الذي تم مسحه. يستخدم فقط عندما يتم تعيين 'اسم النظام' إلى ''." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "نواة" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, "حدد نواة افتراضية لاستخدامها عند بدء تشغيل المحتوى الممسوح." @@ -4931,10 +4671,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, "ملحقات الملف" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "قائمة محددة بالفضاء بأنواع الملفات لتضمينها في المسح. إذا كان فارغاً، يشمل جميع الملفات - أو إذا تم تحديد النواة الأساسية، جميع الملفات التي يدعمها النواة الأساسية." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, "مسح داخل المحفوظات" @@ -5037,10 +4773,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "النواة الحالية" - ) /* Playlist Item > Information */ @@ -5319,18 +5051,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "حفظ شفرات الغش الحالية كملف حفظ." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "إضافة شفرة جديدة إلى الأعلى" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "إضافة شفرة جديدة إلى الأسفل" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "حذف جميع الشفرات" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, "تطبيق تلقائي للغش أثناء فتح اللعبة" @@ -5374,18 +5094,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, "ترميز الطرف الأكبر" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "طريقة تخزين القيم في الذاكرة.\nمثلا 258 تخزن 0x0201 بالطرف الأصغر \nو 0x0102 بالطرف الأكبر." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "إبحث في الذاكرة عن القيم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "غير القيمة بأزرار اليسار / اليمين" - ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "يساوي %u أي %X" @@ -5551,26 +5263,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "عدد التكريرات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "عدد المرات التي سيتم فيها تطبيق الغش.\nاستخدم مع خياري التعديل الآخرين للتأثير على مساحات كبيرة من الذاكرة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "عنوان زيادة كل تغيير" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "بعد كل 'عدد التغييرات' سيتم زيادة عنوان الذاكرة بهذا العدد مرات 'حجم البحث في الذاكرة'." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "زيادة القيمة لكل تغيير" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "بعد كل \"عدد من التعديلات\" سيتم زيادة القيمة بهذا المبلغ." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, "الرماد عندما تكون الذاكرة" @@ -5619,10 +5319,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, "نسخ هذه الغش قبل" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "حذف هذه الغش" - ) /* Quick Menu > Disc Control */ @@ -5630,18 +5326,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, "إخراج القرص" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "يفتح صالة القرص الظاهري ويزيل القرص المحمل حاليا. ملاحظة: إذا تم تكوين RetroArch للإيقاف المؤقت أثناء نشاط القائمة، قد لا تسجل بعض النواة التغييرات ما لم يستأنف المحتوى لبضع ثوان بعد كل إجراء للتحكم في القرص." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "ادخل القرص" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "يدرج القرص المقابل لـ 'فهرس القرص الحالي' ويغلق صالة القرص الافتراضي. ملاحظة: إذا تم تكوين RetroArch للإيقاف المؤقت أثناء نشاط القائمة، قد لا تسجل بعض النواة التغييرات ما لم يستأنف المحتوى لبضع ثوان بعد كل إجراء للتحكم في القرص." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, "تحميل قرص جديد" @@ -5669,10 +5357,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "مشاهدة ملفات شاهر للتغييرات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "تطبيق تلقائي للتغييرات التي أجريت على ملفات المشهد على القرص." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "تحميل العرض المسبق" @@ -5717,10 +5401,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "تصاريح الشريط" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "زيادة أو تقليل كمية تصاريح خطوط أنابيب الهزل. يمكنك ربط حمام منفصل لكل تمرير من خطوط الأنابيب وتكوين حجمه وتصفيته." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "شيدر الظلال" @@ -5756,18 +5436,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "حفظ تجهيز نواة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "يحفظ إعدادات شيدر الظلال، بمثابة الإعداد الافتراضي لهذا التطبيق أو النواة." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "حفظ تجهيز مجلد المحتوى" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "يحفظ إعدادات شيدر الظلال، بمثابة الإعداد الافتراضي لجميع الملفات في نفس مجلد المحتوى الحالي." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "حفظ تجهيز اللعبة" @@ -6077,10 +5749,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "يجري الاستهلاك" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "لا يوجد مصدر" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<استخدم هذا الدليل>" @@ -6409,22 +6077,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "الماوس 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "عجلة أعلى" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "عجلة أسفل" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "عجلة اليسار" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "عجلة اليمين" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "مبكرا" @@ -6946,10 +6598,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "ظل الأيقونة" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "ارسم ظلال إسقاط لجميع الرموز.\nهذا سيكون له تأثير طفيف على الأداء." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, "خط أنابيب عرض القائمة" @@ -6986,10 +6634,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "تبويب الإعدادات" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "تمكين علامة تبويب الإعدادات. إعادة التشغيل مطلوبة حتى يظهر التبويب." - ) /* XMB: Settings Options */ @@ -6997,10 +6641,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "الشريط" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "الشريط (مبسط)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "الثلج البسيط" @@ -7160,18 +6800,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, "اقتطاع أسماء قائمة التشغيل" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "عند التمكين، سيتم إزالة أسماء النظام من قوائم التشغيل. على سبيل المثال، عرض \"PlayStation\" بدلاً من \"Sony - PlayStation\". التغييرات تتطلب إعادة تشغيل لتصبح نافذة المفعول." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, "فرز قوائم التشغيل بعد تعقب الاسم" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "عند التمكين، سيتم إعادة فرز قوائم التشغيل بالترتيب الأبجدي بعد إزالة مكون \"النظام\" من أسمائهم. التغييرات تتطلب إعادة تشغيل لتصبح سارية المفعول." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "سمة لون القائمة" @@ -7196,10 +6828,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "الصورة المصغرة الثانية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, - "استبدال لوحة البيانات الوصفية للمحتوى بصورة مصغرة أخرى." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, "استخدام نص المؤشر للبيانات الوصفية للمحتوى" @@ -7235,10 +6863,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_SHOW_NAV_BAR, "عرض اختصارات التنقل الدائمة على الشاشة. تمكين التبديل السريع بين فئات القائمة. مستحسن لأجهزة شاشة اللمس." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, - "تدوير شريط التنقل التلقائي" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, "نقل شريط التنقل تلقائياً إلى الجانب الأيمن من الشاشة عند استخدام توجيهات العرض الأفقي." @@ -7279,10 +6903,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, "إظهار الصورة المصغرة الثانوية في قائمة المشاهدات" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "تمكين عرض الصورة المصغرة الثانوية عند استخدام \"قائمة\" نوع أوضاع عرض المصغرة لقائمة التشغيل. لاحظ أن هذا الإعداد ينطبق فقط عندما يكون للشاشة عرض فعلي كافٍ لإظهار مصغرتين." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, "ارسم خلفيات مصغرة" @@ -8124,10 +7744,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "المستخدم" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "استخدام عارض الصور المدمجة" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "ماكس صور المبادلة" @@ -8175,10 +7791,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "نسبة الجوانب التلقائية" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "الإسم المستعار (lan):٪ s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "الحالات" @@ -8283,10 +7895,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "استكشاف الأخطاء في الصوت/الفيديو" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "تغيير تراكب لوحة اللعبة الظاهرية" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "تحميل المحتوى" @@ -8652,10 +8260,6 @@ MSG_HASH( MSG_UPNP_FAILED, "فشل تخطيط المنفذ" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "لم يتم تقديم أي حجج ولم يتم بناء قائمة، عرض المساعدة..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "إعداد القرص في الصبغة" @@ -10010,10 +9614,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR, "تجاوز مقياس شرائط الرسوم البيانية" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "تطبيق تجاوز عامل القياس اليدوي عند رسم أدوات العرض. يطبق فقط عندما يتم تعطيل \"مصغرات الرسومات التلقائية\". يمكن استخدامه لزيادة أو تقليل حجم الإشعارات المزخرفة والمؤشرات والضوابط بشكل مستقل عن القائمة نفسها." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, "دقة الشاشة" @@ -10102,14 +9702,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "المس" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "خريطة لوحة المفاتيح" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "نوع رسم خريطة لوحة المفاتيح" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "لوحة المفاتيح الصغيرة" diff --git a/intl/msg_hash_ast.h b/intl/msg_hash_ast.h index 2a641db65f..7e128cb80e 100644 --- a/intl/msg_hash_ast.h +++ b/intl/msg_hash_ast.h @@ -63,6 +63,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, "Esbilla'l conteníu a aniciar." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, + "Anovador" + ) MSG_HASH( MENU_ENUM_SUBLABEL_ONLINE_UPDATER, "Baxa complementos, componentes y conteníu pa RetroArch." @@ -152,13 +156,69 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Música" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_MUSIC, + "Equí va apaecer la música que se reproduxere anteriormente." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, + "Imáxenes" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_IMAGES, + "Equí van apaecer les imáxenes que se vieren anteriormente." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, + "Vídeos" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_VIDEO, + "Equí van apaecer los vídeos que se reproduxeren anteriormente." + ) /* Main Menu > Online Updater */ +MSG_HASH( + MENU_ENUM_SUBLABEL_UPDATE_INSTALLED_CORES, + "Anueva tolos nucleos instalaos a la última versión disponible." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, "Anovador de miniatures" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, + "Baxador de conteníu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, + "Anovar los gráficos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, + "Anovar los perfiles de mandos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, + "Anovar les trampes" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_DATABASES, + "Anovar les bases de datos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, + "Anovar los asolombradores GLSL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS, + "Anovar los asolombradores Cg" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS, + "Anovar los asolombradores Slang" + ) /* Main Menu > Information */ @@ -298,6 +358,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_FRANCHISE, "Franquicia" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING, + "Clasificación de TGDB" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING, + "Clasificación de BBFC" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ESRB_RATING, + "Clasificación d'ESRB" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ELSPA_RATING, + "Clasificación d'ELSPA" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_PEGI_RATING, + "Clasificación de PEGI" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_CERO_RATING, + "Clasificación de CERO" + ) /* Main Menu > Configuration File */ @@ -334,6 +418,42 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS, "Configuración" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, + "Camuda los axustes predeterminaos de los ficheros de configuración." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS, + "Guardáu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVING_SETTINGS, + "Camuda los axustes de guardáu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS, + "Rexistru" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, + "Camuda los axustes de rexistru." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, + "Restolador de ficheros" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, + "Camuda los axustes del restolador de ficheros." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, + "Grabación" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RECORDING_SETTINGS, + "Camuda los axustes de grabación." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS, "Serviciu d'IA" @@ -408,6 +528,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS, "Sincronización" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, + "Suspender el curiapantalles" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SUSPEND_SCREENSAVER_ENABLE, + "Evita que s'active'l curiapantalles del sistema." + ) /* Settings > Video > CRT SwitchRes */ @@ -439,9 +567,17 @@ MSG_HASH( /* Settings > Video > Scaling */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, + "Escala d'enteros" + ) /* Settings > Video > Synchronization */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC, + "Sincronización vertical" + ) /* Settings > Audio */ @@ -449,6 +585,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_SYNCHRONIZATION_SETTINGS, "Sincronización" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, + "Mecedor" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, + "Camuda los axustes del mecedor d'audiu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUNDS, + "Soníos del menú" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, + "Permite que'l controlador WASAPI tome'l control esclusivu del preséu d'audiu. Si se desactiva, va usase'l mou compartíu." + ) /* Settings > Audio > Output */ @@ -472,9 +624,33 @@ MSG_HASH( /* Settings > Audio > Mixer Settings > Mixer Stream */ +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, + "Va aniciar la reproducción del fluxu d'audiu. Namás acabar, esi fluxu va quitase de la memoria." + ) /* Settings > Audio > Menu Sounds */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, + "Mecedor" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, + "Activar el soníu «OK»" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, + "Activar el soníu «Cancel»" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, + "Activar el soníu «Notice»" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, + "Activar el soníu «BGM»" + ) /* Settings > Input */ @@ -482,43 +658,129 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS, "Usuarios máximos" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, + "El númberu máximu d'usuarios sofitaos por RetroArch." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, + "Atayos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, + "Controles del puertu %u" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, + "Configura los controles d'esti puertu." + ) /* Settings > Input > Haptic Feedback/Vibration */ /* Settings > Input > Menu Controls */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, + "Tolos usuarios controlen el menú" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, + "Permite que tolos usuarios controlen el menú. Si se desactiva esta opción, namás l'usuariu 1 pue controlalu." + ) /* Settings > Input > Hotkey Binds */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Atayos" + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Guarda un puntu de guardáu na ralura que s'esbillare anguaño." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, + "Asolombrador siguiente" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, + "Asolombrador anterior" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, + "Discu siguiente" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, + "Discu anterior" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, + "Serviciu d'IA" ) /* Settings > Input > Port # Binds */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_TYPE, + "Triba del preséu" + ) /* Settings > Latency */ /* Settings > Core */ +#ifndef HAVE_DYNAMIC +#endif /* Settings > Configuration */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, + "Guardar la configuración al colar" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, + "Guarda los cambeos nel ficheru de configuración al colar." + ) /* Settings > Saving */ +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, + "Enantes de crear un puntu de guardáu, l'índiz de puntos de guardáu aumenta automáticamente. Al cargar conteníu, esti índiz va afitase al máximu qu'esista." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, + "Carga automáticamente'l puntu de guardáu automáticu nel aniciu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVESTATE_FILE_COMPRESSION, + "Compresión de los puntos de guardáu" + ) /* Settings > Logging */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_VERBOSITY, + "Rexistru detalláu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_TO_FILE, + "Rexistrar nun ficheru" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOG_TO_FILE, + "Redireiciona los mensaxes del rexistru d'eventos del sistema a un ficheru. Rique que «Rexistru detalláu» s'active." + ) /* Settings > File Browser */ /* Settings > Frame Throttle */ +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND, + "Xestiona los axustes del rebobináu." + ) /* Settings > Frame Throttle > Rewind */ @@ -531,15 +793,57 @@ MSG_HASH( /* Settings > On-Screen Display */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS, + "Avisos flotantes" + ) /* Settings > On-Screen Display > On-Screen Overlay */ + + /* Settings > On-Screen Display > Video Layout */ /* Settings > On-Screen Display > On-Screen Notifications */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_FONT_ENABLE, + "Avisos flotantes" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, + "Tamañu de los avisos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_X, + "Posición de los avisos (Horizontal)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_Y, + "Posición de los avisos (Vertical)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE, + "Fondu de los avisos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED, + "Color del fondu de los avisos (Coloráu)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN, + "Color del fondu de los avisos (Verde)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE, + "Color del fondu de los avisos (Azul)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_OPACITY, + "Opacidá del fondu de los avisos" + ) /* Settings > User Interface */ @@ -547,6 +851,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Aspeutu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, + "Amosar los axustes avanzaos" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, + "Zarra automáticamente'l menú y resume'l conteníu dempués de guardar o cargar un puntu de guardáu. La desactivación d'esta opción pue ameyorar el rindimientu de los puntos de guardáu en preseos perlentos." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MOUSE_ENABLE, + "Permite que'l menú se controle con un mur." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_POINTER_ENABLE, + "Permite que'l menú se controle con una pantalla táctil." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, + "Fai xeres nun filu separtáu." + ) /* Settings > User Interface > Views */ @@ -558,6 +882,46 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "Axustes" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, + "Amuesa o anubre la opción «Cargar un nucleu»." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, + "Amosar l'anovador" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, + "Amuesa o anubre la opción «Anovador»." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, + "Amuesa o anubre la opción «Información»." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, + "Amuesa la llingüeta «Ficheru de configuración» dientro del menú principal." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, + "Amuesa la llingüeta «Ayuda» dientro del menú principal." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, + "Amuesa la llingüeta «Colar de Retroarch» dientro del menú principal." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_RESTART_RETROARCH, + "Amuesa la llingüeta «Reaniciar RetroArch» dientro del menú principal." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, + "Amuesa la llingüeta «Axustes» dientro del menú principal." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES, + "Amuesa la llingüeta «Favoritos» dientro del menú principal." + ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES, "Amuesa la llingüeta «Imáxenes» dientro del menú principal." @@ -594,9 +958,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE, "Amuesa'l nivel actual de la batería dientro del menú." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_ENABLE, + "Amosar el nome de los nucleos" + ) /* Settings > User Interface > Views > Quick Menu */ +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "Amuesa o anubre la opción «Amestar a favoritos»." + ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, "Amuesa o anubre la opción «Opciones»." @@ -609,28 +981,20 @@ MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, "Amuesa o anubre la opción «Asolombradores»." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, + "Amuesa o anubre la opción «Información»." + ) /* Settings > User Interface > Views > Settings */ /* Settings > User Interface > Appearance */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Fondu" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Esbilla una imaxe p'afitala como fondu del menú." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Opacidá del fondu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modifica la opacidá de la imaxe del fondu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS, "Miniatures" @@ -638,6 +1002,14 @@ MSG_HASH( /* Settings > AI Service */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG, + "Llingua d'orixe" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG, + "Llingua de destín" + ) /* Settings > Accessibility */ @@ -654,6 +1026,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "Mou perdifícil" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, + "Dobla la cantidá de puntos ganaos.\nDesactiva los puntos de guardáu, trampes, rebobináu, posa y movimientu lentu en tolos xuegos.\nL'alternancia d'esti axuste nel tiempu d'execución va reaniciar los xuegos." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, "Presencia arriquecida" @@ -662,9 +1038,29 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, "Insinies de llogros" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, + "Mou detalláu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, + "Amuesa más información nos avisos." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_START_ACTIVE, + "Anicia la sesión con tolos llogros activaos (tamién los que desbloquiesti anteriormente)." + ) /* Settings > Network */ +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY_IP_ADDRESS, + "La direición del agospiador al que coneutase." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, + "Contraseña del sirvidor" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "Descarga de miniatures so demanda" @@ -690,6 +1086,10 @@ MSG_HASH( /* Settings > Playlists > Playlist Management */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE, + "Métodu d'ordenación" + ) /* Settings > User */ @@ -709,20 +1109,12 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Llingua" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Afita la llingua de la interfaz." - ) /* Settings > User > Privacy */ /* Settings > User > Accounts */ -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "El serviciu de RetroAchievements. Pa más información, visita http://retroachievements.org ." - ) /* Settings > User > Accounts > RetroAchievements */ @@ -755,10 +1147,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY, "Miniatures" ) +MSG_HASH( /* FIXME Not RGUI specific */ + MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, + "Restolador de ficheros" + ) +MSG_HASH( /* FIXME Not RGUI specific */ + MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, + "Afita'l direutoriu d'aniciu del restolador de ficheros." + ) +MSG_HASH( /* FIXME Not RGUI specific */ + MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, + "Configuración" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH, "Nucleu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LIBRETRO_INFO_PATH, + "Información de nucelos" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY, "Base de datos" @@ -775,6 +1183,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_OUTPUT_DIRECTORY, "Les grabaciones van volquiase nesti direutoriu." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVESTATE_DIRECTORY, + "Guarda tolos puntos de guardáu nesti direutoriu. Si nun s'afita nengún, los puntos de guardáu van tentar de guardase dientro del direutoriu de trabayu del conteníu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY, "Caché" @@ -787,12 +1199,28 @@ MSG_HASH( /* Netplay */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETWORK_HOSTING_SETTINGS, + "Agospiu" + ) /* Netplay > Host */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_HOST, + "Agospiar" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_DISABLE_HOST, + "Dexar d'agospiar" + ) /* Import content */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST, + "Escanéu manual" + ) /* Import content > Scan File */ @@ -800,8 +1228,20 @@ MSG_HASH( /* Import content > Manual Scan */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Nucleu" + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, + "Estensiones de ficheros" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, + "Escaniar dientro de los ficheros" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, + "Aniciar l'escanéu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_START, + "Escania'l conteníu esbilláu." ) /* Playlist > Playlist Item */ @@ -810,6 +1250,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_RUN, "Anicia'l conteníu." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, + "Renomar" + ) MSG_HASH( MENU_ENUM_SUBLABEL_RENAME_ENTRY, "Renoma'l títulu de la entrada." @@ -843,6 +1287,26 @@ MSG_HASH( /* Quick Menu */ +MSG_HASH( + MENU_ENUM_SUBLABEL_RESUME_CONTENT, + "Sigue col conteníu n'execución y cola del menú rápidu." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESTART_CONTENT, + "Reanicia'l conteníu dende l'empiezu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT, + "Zarrar el conteníu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CLOSE_CONTENT, + "Zarra'l conteníu actual. Quiciabes se pierda cualesquier cambéu ensin guardar." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_TAKE_SCREENSHOT, + "Captura una imaxe de la pantalla." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_OPTIONS, "Opciones" @@ -887,6 +1351,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DESC, "Descripción" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, + "Númberu de repiticiones" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PRIMARY_DURATION, + "Duración del vibrador primariu (ms)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_STRENGTH, + "Fuercia del vibrador secundariu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_DURATION, + "Duración del vibrador secundariu (ms)" + ) /* Quick Menu > Disc Control */ @@ -897,6 +1377,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADERS_ENABLE, "Asolombradores de videu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHADER, + "Asolombrador" + ) /* Quick Menu > Shaders > Save */ @@ -918,6 +1402,38 @@ MSG_HASH( /* Miscellaneous UI Items */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORES_AVAILABLE, + "Nun hai nucleos disponibles" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, + "Nun hai favoritos disponibles" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_IMAGES_AVAILABLE, + "Nun hai imáxenes disponibles" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_MUSIC_AVAILABLE, + "Nun hai música disponible" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_VIDEOS_AVAILABLE, + "Nun haí vídeos disponibles" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_INFORMATION_AVAILABLE, + "Nun hai información disponible" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, + "Nun s'alcontraron axustes" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE, + "Nun hai nengún nucleu" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, "Atrás" @@ -926,6 +1442,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK, "Aceutar" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_ITEMS, + "Nun hai elementos" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MORE, "…" @@ -937,6 +1457,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV, "Historial y favoritos" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_NONE, + "NON" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV, "Historial y favoritos" @@ -953,6 +1477,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_RUNTIME_PER_CORE, "Per nucleu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, + "" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, + "" + ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_HANDLER_TYPE_EMU, "Emulador" @@ -961,6 +1493,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, "Captures de pantalla" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ON, + "SÍ" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OFF, + "NON" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_YES, "Sí" @@ -973,9 +1513,105 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE, "N/D" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT, + "Mur 1" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT, + "Mur 2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE, + "Mur 3" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4, + "Mur 4" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, + "Mur 5" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HMS, + "AAAA-MM-DD HH:MM:SS" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HM, + "AAAA-MM-DD HH:MM" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD, + "AAAA-MM-DD" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YM, + "AAAA-MM" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HMS, + "MM-DD-AAAA HH:MM:SS" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HM, + "MM-DD-AAAA HH:MM" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HMS, + "DD-MM-AAAA HH:MM:SS" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HM, + "DD-MM-AAAA HH:MM" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY, + "DD-MM-AAAA" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HMS_AMPM, + "AAAA-MM-DD HH:MM:SS (AM/PM)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HM_AMPM, + "AAAA-MM-DD HH:MM (AM/PM)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HMS_AMPM, + "MM-DD-AAAA HH:MM:SS (AM/PM)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HM_AMPM, + "MM-DD-AAAA HH:MM (AM/PM)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HMS_AMPM, + "DD-MM-AAAA HH:MM:SS (AM/PM)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HM_AMPM, + "DD-MM-AAAA HH:MM (AM/PM)" + ) /* RGUI: Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT, + "Animación del fondu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT_SPEED, + "Velocidá de l'animación del fondu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THUMBNAILS_RGUI, + "Miniatura cimera" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_RGUI, + "Miniatura baxera" + ) /* RGUI: Settings Options */ @@ -983,6 +1619,90 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_BILINEAR, "Billinial" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, + "Escala d'enteros" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED, + "Coloráu clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE, + "Naranxa clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW, + "Mariellu clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN, + "Verde clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE, + "Azul clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET, + "Violeta clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY, + "Buxu clásico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED, + "Coloráu heredao" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DARK_PURPLE, + "Moráu escuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_MIDNIGHT_BLUE, + "Azul nocherniego" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ELECTRIC_BLUE, + "Azul llétrico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_APPLE_GREEN, + "Verde mazana" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED, + "Coloráu volcánico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON, + "Llaguna" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_DRACULA, + "Drácula" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_NONE, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_RAIN, + "Lloviu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_VORTEX, + "Vórtiz" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_STARFIELD, + "Campu d'estrelles" + ) /* XMB: Settings > User Interface > Appearance */ @@ -994,9 +1714,57 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, "Animación horizontal" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN, + "L'animación que s'activa al xubir o baxar." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, + "L'aición que s'activa al abrir un somenú." + ) /* XMB: Settings Options */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SNOW, + "Ñeve" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_PIXEL, + "Píxel" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_APPLE_GREEN, + "Verde mazana" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE, + "Moráu escuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ELECTRIC_BLUE, + "Azul llétrico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LEGACY_RED, + "Coloráu heredao" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MIDNIGHT_BLUE, + "Azul nocherniego" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_VOLCANIC_RED, + "Coloráu volcánico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LIME, + "Verde llima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_PIKACHU_YELLOW, + "Mariellu Pikachu" + ) /* Ozone: Settings > User Interface > Appearance */ @@ -1046,13 +1814,45 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW, "Mariellu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DISABLED, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DUAL_ICON, + "Iconu doble" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DISABLED, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_DISABLED, + "NON" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_ALWAYS, + "SÍ" + ) /* Qt (Desktop Menu) */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_INFO, + "Información" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_FILE, "&Ficheru" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_LOAD_CORE, + "&Cargar un nucleu…" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, "&Axustes…" @@ -1069,6 +1869,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, "&Ayuda" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_DOCUMENTATION, + "Documentación" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOAD_CUSTOM_CORE, + "Cargar un nucleu personalizáu…" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOAD_CORE, + "Carga d'un nucleu" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_NAME, "Nome" @@ -1081,6 +1893,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER, "Restolador" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_UP, + "Xubir" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_DOCK_CONTENT_BROWSER, + "Restolador de conteníu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_INFO, + "Información del nucleu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_SELECTION_ASK, + "" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_INFORMATION, "Información" @@ -1097,10 +1925,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT, "%1 elementos" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_HIDE, + "Anubrir" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CHOOSE, "&Escoyer…" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_IS_EMPTY, + "El ficheru ta baleru." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS, + "N'iconos" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_LIST, + "En llista" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, + "Llimpiar" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PROGRESS, "Progresu:" @@ -1109,6 +1957,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_QUESTION, "Entruga" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_DELETE_FILE, + "Nun pudo desaniciase'l ficheru." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_RENAME_FILE, + "Nun pudo renomase'l ficheru." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_NAME, "Nome:" @@ -1129,6 +1985,38 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_EXTENSIONS, "Estensiones:" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FOR_THUMBNAILS, + "(úsase p'alcontrar miniatures)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_ENTRY, + "Amestar una entrada…" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FILES, + "Amestar ficheros…" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FOLDER, + "Amestar una carpeta…" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FILES, + "Amiestu de ficheros" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FOLDER, + "Amiestu d'una carpeta" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT_CONTRIBUTORS, + "Collaboradores" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CURRENT_SHADER, + "Asolombrador actual" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALREADY_IN_PROGRESS, "Yá hai una descarga en cursu." @@ -1152,13 +2040,37 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SUPPORTED_CORES, "Nucleos suxeríos" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UNABLE_TO_READ_COMPRESSED_FILE, + "Nun pue lleese'l ficheru comprimíu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_USER, + "Usuariu" + ) /* Unused (Only Exist in Translation Files) */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, + "Nomatu (LAN): %s" + ) +MSG_HASH( /* FIXME Still exists in a comment about being removed */ + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_FOOTER_OPACITY, + "Opacidá del pié" + ) +MSG_HASH( /* FIXME Still exists in a comment about being removed */ + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_HEADER_OPACITY, + "Opacidá de la testera" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, "Xuegu en llinia" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HELP_WHAT_IS_A_CORE, + "¿Qué ye un nucleu?" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_DESCRIPTION, "Descripción" @@ -1176,10 +2088,46 @@ MSG_HASH( /* Notifications */ +MSG_HASH( + MSG_WAITING_FOR_CLIENT, + "Esperando pol veceru…" + ) +MSG_HASH( + MSG_NETPLAY_YOU_HAVE_JOINED_AS_PLAYER_N, + "Xuniéstite como xugador %u" + ) +MSG_HASH( + MSG_NETPLAY_S_HAS_JOINED_AS_PLAYER_N, + "%.*s xunióse como xugador %u" + ) MSG_HASH( MSG_NETPLAY_SERVER_NAMED_HANGUP, "«%s» desconeutóse" ) +MSG_HASH( + MSG_NETPLAY_CANNOT_PLAY_UNPRIVILEGED, + "Nun tienes permisu pa xugar" + ) +MSG_HASH( + MSG_NETPLAY_CANNOT_PLAY_NOT_AVAILABLE, + "Los preseos d'entrada solicitaos nun tán disponibles" + ) +MSG_HASH( + MSG_NETPLAY_CHANGED_NICK, + "El to nomatu camudó a «%s»" + ) +MSG_HASH( + MSG_FETCHING_CORE_LIST, + "Diendo en cata de la llista de nucleos…" + ) +MSG_HASH( + MSG_ADDED_TO_FAVORITES, + "Amestóse a Favoritos" + ) +MSG_HASH( + MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES, + "El nucleu nun sofita puntos de guardáu." + ) MSG_HASH( MSG_DOWNLOADING, "Baxando" @@ -1212,6 +2160,22 @@ MSG_HASH( MSG_READING_FIRST_DATA_TRACK, "Lleendo la primer pista de datos…" ) +MSG_HASH( + MSG_SAVED_NEW_CONFIG_TO, + "Guardóse una configuración nueva en" + ) +MSG_HASH( + MSG_SHADER, + "Asolombrador" + ) +MSG_HASH( + MSG_SLOW_MOTION, + "Movimientu lentu." + ) +MSG_HASH( + MSG_FAST_FORWARD, + "Avance rápidu." + ) MSG_HASH( MSG_PRESS_AGAIN_TO_QUIT, "Volvi primir pa colar…" @@ -1228,20 +2192,56 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED, "nun se configuró" ) +MSG_HASH( + MSG_INPUT_ENABLE_SETTINGS_PASSWORD_NOK, + "La contraseña ye incorreuta." + ) +MSG_HASH( + MSG_CHEAT_DELETE_ALL_SUCCESS, + "Desaniciáronse toles trampes." + ) MSG_HASH( MSG_DEVICE_CONFIGURED_IN_PORT, "Configuróse nel puertu:" ) +MSG_HASH( + MSG_MISSING_ASSETS, + "Alvertencia: Falten gráficos, usa l'anovador si ta disponible" + ) MSG_HASH( MSG_DUMPING_DISC, "Volquiando'l discu…" ) +MSG_HASH( + MSG_LOAD_CORE_FIRST, + "Carga un nucleu primero, por favor." + ) /* Lakka */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LAKKA_VERSION, + "Versión de Lakka" + ) /* Environment Specific Settings */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INTERNAL_STORAGE_STATUS, + "Estáu del almacenamientu internu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, + "Amuesa o anubre la opción «Reaniciar»." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, + "Amuesa o anubre la opción «Apagar»." + ) +MSG_HASH( + MSG_READ_ONLY, + "Namás llectura" + ) #ifdef HAVE_LAKKA_SWITCH #endif @@ -1252,6 +2252,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LAKKA_SERVICES, "Servicios" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SSH_ENABLE, + "Usa SSH p'acceder remotamente a la llinia de comandos." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOCALAP_ENABLE, + "Puntu d'accesu Wi-Fi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOCALAP_ENABLE, + "Des/activa'l puntu d'accesu Wi-Fi." + ) +MSG_HASH( + MSG_LOCALAP_NOT_RUNNING, + "El puntu d'accesu Wi-Fi nun ta n'execución" + ) +MSG_HASH( + MSG_LOCALAP_ERROR_CONFIG_CREATE, + "Nun pudo crease'l ficheru de configuración del puntu d'accesu Wi-Fi." + ) #endif #ifdef GEKKO #endif diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 1008740632..b3256d570c 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "加载物理光盘。您应该先选择相对应的核心 (加载核心)。" + "加载物理光盘。请先「加载核心」选择光盘相对应的核心。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -109,15 +109,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "打开桌面应用风格的菜单。" + "打开传统桌面菜单。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, - "关闭懒人模式" + "禁用游戏机厅模式" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "关闭懒人模式。重新启动后生效。" + "禁用游戏机厅模式。(需要重启)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -200,7 +200,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "从下载文件夹安装或还原核心。" + "从「下载」文件夹安装或还原核心。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -238,7 +238,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "已经添加到「收藏」的游戏将出现在这里。" + "添加到「收藏」的游戏将出现在这里。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -293,7 +293,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "为选中的列表中每个游戏单独下载缩略图。" + "下载选中播放列表中游戏的缩略图。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -449,6 +449,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "必需" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "锁定已安装核心" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "防止修改当前安装的核心。当内容需要特定核心版本时可能会被用来避免不必要的更新 (例如街机的 ROM 集只适用于特定版本的核心)。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "删除核心" @@ -457,6 +465,38 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "从磁盘中删除该核心" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "备份核心" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "创建当前安装核心的归档备份。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "还原备份" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "从归档备份列表中安装之前版本的核心。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "删除备份" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "从归档备份列表中移除文件。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[自动]" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_CRC, + "CRC32:" + ) /* Main Menu > Information > System Information */ @@ -1099,7 +1139,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "使用的输入驱动。某些视频驱动可能需要使用特定的输入驱动才行。" + "使用的输入驱动。某些视频驱动强制使用不同的输入驱动。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, @@ -1107,7 +1147,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "使用的手柄驱动。" + "要使用的手柄驱动。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1141,9 +1181,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "使用的摄像头驱动。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_DRIVER, + "蓝牙" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "使用的蓝牙驱动。" + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "使用的 WiFi 驱动。" + "使用的 Wi-Fi 驱动。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1246,7 +1294,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "在帧与帧之间插入黑色的中间帧。通常用于消除在 120Hz 显示器上运行 60Hz 的游戏带来的重影问题。" + "在帧之间插入黑色帧。这能在高刷新率屏幕上消除残影。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1485,7 +1533,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "自定义 X 轴视图偏移量。如果启用「整数缩放」则忽略此选项。视图将自动居中。" + "自定义 X 轴视图偏移量。如果启用「整数缩放」则忽略此选项。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1493,7 +1541,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "自定义 Y 轴视图偏移量。如果启用「整数缩放」则忽略此选项。视图将自动居中。" + "自定义 Y 轴视图偏移量。如果启用「整数缩放」则忽略此选项。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1517,7 +1565,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "在图像边缘切掉一些像素,这通常是游戏开发者有意留下的白边或黑边,甚至也有可能包含垃圾像素。" + "在图像边缘切掉一些像素,这通常是游戏开发者有意留下的白边或黑边,甚至也有可能包含垃圾像素。(需要重启)" ) /* Settings > Video > Synchronization */ @@ -1542,6 +1590,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "自适应垂直同步 (Vsync)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, + "垂直同步启用,除非性能降到低于目标刷新率。当性能低于实时水平,这可以最大限度地减少卡顿,并且更加节能。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "帧延时" @@ -1572,7 +1624,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "不偏离请求核心时间。用于可变刷新率屏幕,G-Sync,FreeSync。" + "不偏离请求核心时间。用于可变刷新率屏幕 (G-Sync,FreeSync,HDMI 2.1 VRR)。" ) /* Settings > Audio */ @@ -1669,14 +1721,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_EXCLUSIVE_MODE, "WASAPI 排他模式" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, + "允许 WASAPI 驱动程序独占控制音频设备。如果禁用,它将使用共享模式。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT, "WASAPI 浮点格式" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT, + "如果音频设备支持 WASAPI 驱动程序,使用浮点格式。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH, "WASAPI 共享缓冲区长度" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH, + "在共享模式下使用 WASAPI 驱动程序时,中间缓冲区的长度 (帧)。" + ) /* Settings > Audio > Output */ @@ -1692,6 +1756,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE, "设备" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_DEVICE, + "覆盖音频驱动程序使用的默认音频设备。依赖于驱动程序。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, "音频延迟 (毫秒)" @@ -1734,10 +1802,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, "最大时序偏斜" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW, + "音频输入率的最大变化值。增加此值会使时间变化可以在很大的范围内变化,但是会导致音调不准 (比如在 NTSC 显示器上运行 PAL 核心)。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, "动态音频率控制" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, + "同步音频和视频时帮助平滑时间错位。请注意,如果禁用,激活不可能获得良好的同步效果。" + ) /* Settings > Audio > MIDI */ @@ -1829,19 +1905,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "启用确定声音" + "启用「确定」声音" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "启用取消声音" + "启用「取消」声音" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "启用通知声音" + "启用「通知」声音" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "启用背景声音" + "启用「背景音乐」声音" ) /* Settings > Input */ @@ -1856,19 +1932,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "轮询类型行为" + "轮询行为" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "设置轮询方式。根据设备的性能,设置为「较早」或「稍晚」可以降低延迟。" + "设置轮询方式。轮询是一种 CPU 定时检查输入输出设备的方式。根据设备的性能,设置为「较早」或「稍晚」可以降低延迟。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "重映射核心键位绑定" + "重映射核心键位控制" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "如果开启,则当前核心改为使用自定义键位设置。" + "用当前核心的重映射绑定覆盖输入绑定。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, @@ -1876,11 +1952,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "启用手柄自动配置,即插即玩。" + "自动配置已有配置文件的手柄,即插即玩。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, - "输入按钮轴阈值" + "输入键轴阈值" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BUTTON_AXIS_THRESHOLD, + "轴移动多远才会被认定为按键。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_DEADZONE, @@ -1894,17 +1974,25 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, "绑定超时" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, + "继续下一个绑定前等待的秒数。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD, "绑定保持" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD, + "绑定时需要按住输入的秒数。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "连发周期" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "连发时每两次按键之间的间隔帧数。" + "连发键打开所需的时间 (帧)。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1948,7 +2036,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "快捷键绑定" + "快捷键" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1956,7 +2044,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "端口 %u 的绑定" + "端口 %u 控制" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -1986,7 +2074,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "交换确定键和取消键" + "对调菜单中的「确定」键和「取消」键" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, @@ -2005,11 +2093,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "按两次退出" + "确认退出" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "按两次退出快捷键退出万能模拟器。" + "按两次「退出」快捷键退出全能模拟器。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2017,103 +2105,203 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "控制器用来切出菜单的组合键。" + "切换菜单的手柄组合键。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "快捷键启用延迟 (帧)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "快进开关" + "快进 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "在快进和正常速度之间切换。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "按住保持快进" + "快进 (保持)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "按住按键时启用快进模式。松开按键时以正常速度运行游戏。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "慢动作开关" + "慢放 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "在慢动作和正常速度之间切换。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "按住保持慢动作" + "慢放 (保持)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "按住按键时启用慢动作模式。松开按键时以正常速度运行游戏。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "加载状态" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "从当前选定的卡槽加载状态。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "保存状态" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "在当前选定的卡槽保存状态。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "全屏开关" + "全屏 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "切换全屏和窗口显示模式。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "退出程序" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "关闭 RetroArch,以确保所有存档数据和配置文件被保存到磁盘。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "状态存储卡槽 +" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "增加当前选中的即时存档栏位序号。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "状态存储卡槽 -" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "减少当前选中的即时存档栏位序号。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "回溯" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "按下按键时回溯当前游戏。注意:必须打开「启用回溯」选项。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "输入回放视频录制开关" + "记录输入回放 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "打开或关闭游戏操作录像。录像以 .bsv 格式保存。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "暂停开关" + "暂停 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "切换暂停游戏/继续游戏状态。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "帧提前量" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "暂停时,继续运行游戏一帧。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "重置游戏" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "从头重新开始游戏。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "下个着色器" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "加载并应用「图像渲染器」目录下的下一个渲染器预设文件。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "上个着色器" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "加载并应用「图像渲染器」目录下的前一个渲染器预设文件。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "金手指编号 +" + "下个金手指编号" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "增加当前选中的金手指栏位序号。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "金手指编号 -" + "上个金手指编号" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "减少当前选中的金手指栏位序号。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "金手指开关" + "金手指 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "开关当前选择的金手指。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "截屏" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "截图当前游戏。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "静音开关" + "静音 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "开关音频输出。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "屏幕键盘开关" + "屏幕键盘 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "开关屏幕键盘" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "FPS 开关" + "显示 FPS (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "开关每秒帧数(FPS)指示器。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, @@ -2121,23 +2309,31 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "联机主机开关" + "联机主机 (开关)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "切换联机游戏房主开关。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "联机「玩家/观战」模式开关" + "联机对战/观战模式 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "快捷键" + "启用热键" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "指定后,必须先按住「启用快捷键」键 (并保持),然后才能识别其他快捷键。允许手柄按键映射到快捷键功能,而不影响正常输入。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "音量 +" + "增大音量" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "音量 -" + "减小音量" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, @@ -2149,35 +2345,35 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "下一张光盘" + "下个光盘" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "上一张光盘" + "上个光盘" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "鼠标捕获开关" + "捕获鼠标 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "游戏焦点开关" + "游戏焦点 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "桌面菜单开关" + "桌面菜单 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "菜单开关" + "菜单 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "录像开关" + "录像 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "直播开关" + "直播 (开关)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, @@ -2200,15 +2396,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "全部绑定" + "设置所有控制" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "全部绑定至默认值" + "重置默认控制" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "保存自动配置" + "保存手柄配置文件" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2378,12 +2574,8 @@ MSG_HASH( "设置要超前运行的帧数。如果滞后于游戏本体的帧数将导致类似于抖动之类的游戏问题。" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "超前运行使用第二实例" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "超前运行隐藏警告" + MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, + "隐藏「超前运行」和「核心不支持即时存档」时出现的警告信息。" ) /* Settings > Core */ @@ -2404,10 +2596,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "核心关闭时加载假核心" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "某些核心有关机功能。如果启用,万能模拟器将防止自身被关闭,而是加载空核心。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "自动启动一个核心" @@ -2420,25 +2608,23 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "在加载游戏之前,先检查固件或 BIOS 的完整性。" ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "运行游戏时总是重载核心" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "加载游戏时重启全能模拟器,即使请求的核心已经加载了。这可能会提高系统稳定性,但是会增加加载时间。" + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "允许旋转" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "允许核心自行设置屏幕旋转角度。若关闭,旋转请求将被忽略。需要手动旋转显示器的用户请设置此选项。" - ) /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "退出时保存配置" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "退出时保存更改到配置文件。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "自动加载游戏特定的核心选项" @@ -2473,22 +2659,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GLOBAL_CORE_OPTIONS, - "将所有核心选项保存到一个通用设置文件 (retroarch-core-options.cfg)。当禁用时,每个核心的选项将被保存到万能模拟器的配置文件夹中一个独立的核心文件夹/文件。" + "将所有核心选项保存到一个通用设置文件 (retroarch-core-options.cfg)。当禁用时,每个核心的选项将被保存到全能模拟器的配置文件夹中一个独立的核心文件夹/文件。" ) /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "排序文件夹中的存档" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "在游戏存档的文件名前面加上核心名称来进行排序。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "排序文件夹中的状态存储" + "将即时存档保存到文件夹" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, @@ -2506,17 +2684,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "卡带内存自动保存间隔" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "每隔一段时间自动保存非易失性卡带内存。此选项默认关闭。间隔单位为秒。设置为 0 则关闭自动保存。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "保存状态自动编号" + "自动保存即时存档到下一个栏位" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "保存状态存储前,状态存储编号自动增加。加载游戏时,编号自动设置为最大的编号。" + "在保存即时存档时,栏位序号将自动递增。加载内容时,即时存档栏位将设置为最后保存的栏位。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2524,11 +2698,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "程序退出前自动保存状态。如果启用了「自动加载状态」,下次开始游戏时会加载该状态存储。" + "在内容关闭时自动保存即时存档。如果启用了“自动加载即时存档”,RetroArch 将自动加载此即时存档。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "自动加载状态" + "自动加载即时存档" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, @@ -2540,7 +2714,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "在菜单中显示状态存储缩略图。" + "在菜单中显示即时存档缩略图。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, @@ -2550,6 +2724,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_FILE_COMPRESSION, "状态存储压缩" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVESTATE_FILE_COMPRESSION, + "以压缩格式写入即时存档文件。会极大减少存档文件大小,但存档和读档时间将延长。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE, "写入存档到游戏文件夹" @@ -2624,22 +2802,10 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "显示隐藏的文件和文件夹" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "在文件浏览器中显示隐藏的文件或文件夹。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "过滤未知扩展名" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "在文件管理器中,只显示当前核心\n支持的游戏(根据扩展名)。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "使用内建媒体播放器" @@ -2663,22 +2829,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS, "帧计时器" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "最大运行速度" - ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, "快进时最多以几倍速运行。设置为 0 代表不限速。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "慢动作倍率" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "减速时以几分之一速度运行。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, "限制菜单帧率" @@ -2694,14 +2848,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "启用回溯" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "回溯粒度" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "每次回溯时回退的帧数。数值越高,回溯越快。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, "回溯缓冲区大小 (MB)" @@ -2748,14 +2894,6 @@ MSG_HASH( /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "录制质量" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "自定义录制配置" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, "录制线程" @@ -2780,22 +2918,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "直播模式" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "直播质量" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, - "自定义直播配置" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "直播标题" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "直播 URL" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, "直播 UDP 端口" @@ -2907,6 +3029,8 @@ MSG_HASH( "遮罩的 UI 缩放倍数。" ) + + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -2936,10 +3060,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, "图形部件" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "自动缩放图形部件" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, "基于当前菜单缩放自动调整通知,指示器和控件尺寸。" @@ -2948,26 +3068,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, "图形部件缩放倍数 (全屏)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "全屏模式中,绘制显示部件时应用手动缩放倍数覆盖。仅在「自动缩放图形部件」选项关闭时应用。可以独立于菜单缩放通知,指示和控制部件。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, "图形部件缩放覆盖 (窗口)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "窗口模式中,绘制显示部件时应用手动缩放倍数覆盖。仅在「自动缩放图形部件」选项关闭时应用。可以独立于菜单缩放通知,指示和控制部件。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "显示帧率" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "在屏幕上显示当前每秒的帧率。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, "帧率更新间隔 (以帧为单位)" @@ -2989,17 +3097,17 @@ MSG_HASH( "显示技术信息。" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "包含内存详情" + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "「加载游戏」启动通知" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "加载游戏时显示简短的反馈动画。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "通知字体" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "为屏显消息设置不同的字体。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "通知大小" @@ -3059,14 +3167,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "视图" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "显示或隐藏菜单屏幕上的元素。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "外观" @@ -3079,25 +3179,21 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "显示高级设置" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "为资深用户显示高级设置 (默认关闭)。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, - "开启懒人模式" + "游戏机厅模式" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_ENABLE_KIOSK_MODE, - "隐藏所有与配置文件相关的选项,\n以防止误改选项导致麻烦。" + "隐藏所有与配置文件相关的设置,以防止误改选项导致麻烦。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_KIOSK_MODE_PASSWORD, - "设置退出懒人模式的密码" + "设置退出游戏机厅模式的密码" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_KIOSK_MODE_PASSWORD, - "设置密码后,在菜单选择「退出懒人模式」\n并输入密码才能退出懒人模式。" + "启用游戏机厅模式时设置密码,以便之后在菜单中禁用。方法是进入菜单,选择「禁用游戏机厅模式」并输入密码。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_WRAPAROUND, @@ -3107,21 +3203,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "如果开启此选项,在列表的最上端继续向上翻页\n会回到最下端,向下翻页时也一样。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "当菜单激活时暂停" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "如果关闭此选项,打开菜单时游戏仍会后台运行。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, - "存档后继续游戏" + "即时存档后继续游戏" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "在快捷菜单中选择「保存状态」或「加载状态」后,自动关闭菜单并恢复当前游戏。禁用此项可以在低端设备上提高状态存储性能。" + "自动关闭菜单并在保存或加载即时存档后继续游戏。禁用此功能可以在非常慢的设备上提高即时存档性能。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, @@ -3133,7 +3225,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "允许在菜单中使用鼠标输入。" + "允许用鼠标控制菜单。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -3141,7 +3233,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "允许在菜单中使用触摸屏输入。" + "允许用触摸屏来控制菜单。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, @@ -3153,7 +3245,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "禁止后台运行" + "暂离时暂停游戏" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -3175,21 +3267,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "UI 伴侣" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "启动时打开 UI 伴侣" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "菜单栏" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "桌面菜单 (重启)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "启动时显示桌面菜单" + "桌面菜单(需要重启)" ) /* Settings > User Interface > Views */ @@ -3198,18 +3282,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "快速菜单" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "显示或隐藏「快捷菜单」屏幕上的元素。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "设置" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "在「设置」屏幕显示或隐藏元素。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "显示「加载核心」" @@ -3314,10 +3390,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "在菜单中显示设置页。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "设置启用设置页的密码" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "设置在隐藏设置页后,重新启用设置页的密码。\n启用方法:在菜单中选择「启用设置页」\n并输入密码来重新启用设置页。" @@ -3430,10 +3502,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "显示菜单副标签" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "显示当前选中菜单项的附加信息。" - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "显示开始屏幕" @@ -3795,26 +3863,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "菜单缩放倍数" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "绘制菜单时应用全局缩放倍数。可以增大或缩小用户界面元素的大小。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "背景" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "选择一张图片来将它设为菜单壁纸。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "背景不透明度" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "设置壁纸的不透明度。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "帧缓冲区不透明度" @@ -3866,10 +3918,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE, "AI 服务已启用" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "AI 服务暂停开关" - ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, "在屏幕翻译时暂停核心。" @@ -3889,18 +3937,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, "启用无障碍功能" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "打开/关闭菜单导航的无障碍阅读功能" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "阅读器语速" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "设置阅读器的语速,从快到慢" - ) /* Settings > Power Management */ @@ -3910,10 +3946,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "成就" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "打开或关闭成就。更多内容请访问\nhttp://retroachievements.org" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "硬核模式" @@ -3926,10 +3958,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "排行榜" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "启用或禁用游戏中排行榜。\n仅在硬核模式下生效。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, "展示状态" @@ -3950,6 +3978,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "为测试目的而打开或关闭非官方成就\n和测试版特性。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "解锁声音" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "解锁成就时播放声音。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, "详细模式" @@ -3962,10 +3998,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, "自动截屏" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "当达成一个成就时,自动截屏。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, "开始激活" @@ -4021,58 +4053,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "服务器密码" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "连接到在线游戏网络的密码。仅在主机模式下生效。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "服务器观战的密码" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "连接到在线游戏网络的密码,\n仅有观战权限。仅在主机模式下使用。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "在线游戏旁观者模式" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "是否启动在线游戏旁观者模式。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "允许从属模式客户端" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "是否允许从属模式网络连接。\n从属模式客户端占用网络带宽小,\n但网络延迟比较大。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "只允许从属模式客户端" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "是否禁止从属模式网络连接的客户端连接。\n仅建议网络速度快、主机性能高的用户开启。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "联机无状态模式" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "是否在不需要保存状态的模式下联机游戏。如果是,则需要非常快的网络,但是不会执行回溯,因此不会有联机干扰。" + "在没有即时存档的模式下开始联机游戏。需要非常快的网络,但是不进行回溯处理,因此不会有联机卡顿。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "在线游戏检查帧数" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "在线游戏中主机和客户端的帧频率将保持同步。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "输入延迟帧" @@ -4105,6 +4113,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUEST_DEVICE_I, "请求设备 %u" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY_REQUEST_DEVICE_I, + "请求播放给予的输入设备" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE, "网络命令" @@ -4113,18 +4125,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "网络命令端口" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "网络游戏控制器" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "网络远端基本端口" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "用户 %d 远程允许" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "标准输入流命令" @@ -4137,10 +4137,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "按需下载缩略图" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "在浏览列表时自动下载缺失的缩略图图像。有严重的性能影响。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "更新程序" @@ -4185,7 +4181,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "历史列表" + "历史记录" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -4201,7 +4197,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "收藏列表大小" + "收藏夹大小" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, @@ -4247,10 +4243,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "核心:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "游戏时间:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "上次游戏:" @@ -4259,10 +4251,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME_TYPE, "列表副标签运行时" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "列表副标签运行时「上次游戏」时间格式" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, "模糊压缩包匹配" @@ -4271,10 +4259,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, "扫描时不匹配核心" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "列表管理" - ) /* Settings > Playlists > Playlist Management */ @@ -4298,10 +4282,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, "清理列表" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "移除无效/重复条目并验证核心关联。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "删除列表" @@ -4337,10 +4317,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "语言" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "设置用户界面的语言。" - ) /* Settings > User > Privacy */ @@ -4367,10 +4343,6 @@ MSG_HASH( /* Settings > User > Accounts */ -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Retro 成就服务。更多内容请访问\nhttp://retroachievements.org" - ) /* Settings > User > Accounts > RetroAchievements */ @@ -4378,10 +4350,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "用户名" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "输入您的 RetroAchievements 账号。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "密码" @@ -4427,10 +4395,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "素材" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "当菜单界面试图查找可加载的资源时,\n默认情况下查找此位置。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "动态背景" @@ -4451,10 +4415,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "文件浏览器文件夹" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "设置文件管理器的起始文件夹。" - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "配置文件夹" @@ -4539,10 +4499,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "遮罩文件夹" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "保存遮罩文件的文件夹。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, "视频布局" @@ -4561,16 +4517,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "如果插入的游戏手柄与该目录中的配置文件匹配,\n这个游戏手柄将自动完成配置。" + "手柄自动配置文件保存在这个文件夹。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "输入重映射" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "保存自定义键位文件的文件夹。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "列表" @@ -4597,7 +4549,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, - "状态存储" + "即时存档" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_DIRECTORY, @@ -4651,14 +4603,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "断开当前网络连接。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "刷新房间列表" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "扫描新房间。" - ) /* Netplay > Host */ @@ -4735,10 +4679,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, "自定义系统名称" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "核心" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, "文件扩展名" @@ -4825,10 +4765,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "当前核心" - ) /* Playlist Item > Information */ @@ -5099,18 +5035,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "把当前的作弊代码保存成一个金手指文件。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "向顶部添加新代码" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "向底部添加新代码" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "删除所有代码" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, "游戏加载时自动应用金手指" @@ -5154,18 +5078,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, "大字节" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "大字节:258 = 0x0102,\n小字节:258 = 0x0201" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "搜索内存值" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "使用 左/右 按钮改变数值。" - ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "等于 %u (%X)" @@ -5383,10 +5299,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, "复制当前金手指之前" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "删除当前金手指" - ) /* Quick Menu > Disc Control */ @@ -5394,18 +5306,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, "弹出光盘" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "打开虚拟光驱托盘并移除当前加载的光盘。注意:如果配置为「显示菜单时暂停游戏」,一些核心可能直到游戏继续后几秒钟才会识别到换盘。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "插入光盘" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "插入对应当前编号的光盘并关闭虚拟光驱托盘。注意:如果配置为「显示菜单时暂停游戏」,一些核心可能直到游戏继续后几秒钟才会识别到换盘。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, "加载新光盘" @@ -5433,10 +5337,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "监视着色器文件更改" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "自动对磁盘上的着色器文件进行更改。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "加载着色器预设" @@ -5473,10 +5373,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "着色器渲染次数" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "增加或减少渲染器通道数量。\n每个通道都能单独配置所用的渲染器属性。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "着色器" @@ -5508,18 +5404,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "保存核心预设" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "将当前着色器设置保存为当前核心的默认设置。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "保存游戏文件夹预设" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "将当前着色器设置保存为当前游戏文件夹的默认设置。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "保存游戏预设" @@ -5596,10 +5484,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE, "暂停成就硬核模式" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_PAUSE, + "暂停当前对战的成就(然后可以开启即时存档、金手指、回溯、暂停和慢动作)。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME, "恢复成就硬核模式" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_RESUME, + "恢复当前对战的成就(不能开启即时存档、金手指、回溯、暂停和慢动作)。" + ) /* Quick Menu > Information */ @@ -5630,6 +5526,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "没有可用的核心信息。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "没有核心备份" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "没有收藏。" @@ -5662,6 +5562,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "没有找到设置。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "没有找到蓝牙设备" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "未发现网络。" @@ -5801,10 +5705,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "放电中" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "没有电源" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<使用此文件夹>" @@ -5829,10 +5729,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD, "手柄" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "带摇杆的手柄" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NONE, "无" @@ -5935,7 +5831,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_HANDLER_TYPE_RETRO, - "万能模拟器" + "全能模拟器" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_1, @@ -6139,19 +6035,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "向上滚动" + "鼠标滚轮向上" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "向下滚动" + "鼠标滚轮向下" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "向左滚动" + "鼠标滚轮向左" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "向右滚动" + "鼠标滚轮向右" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -6550,10 +6446,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "启用设置页" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "启用「设置」页。需要重新启动此页才会出现。" - ) /* XMB: Settings Options */ @@ -6561,10 +6453,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "彩条效果" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "简易彩条效果" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "简易雪花效果" @@ -6708,10 +6596,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, "按名称截断排序列表" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "启用后,列表会按字母顺序重新排序,并在名称中移除主机系统名称。更改需要重启才能生效。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "菜单主题颜色" @@ -6767,10 +6651,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_SHOW_NAV_BAR, "显示导航栏" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, - "自动旋转导航栏" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME, "菜单颜色主题" @@ -7035,7 +6915,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT, - "关于万能模拟器" + "关于全能模拟器" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_DOCUMENTATION, @@ -7367,11 +7247,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_NIGHTLY, - "更新万能模拟 (每日构建)" + "更新全能模拟 (每日构建)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_FINISHED, - "万能模拟器更新成功。请重启程序使更新生效。" + "全能模拟器更新成功。请重启程序使更新生效。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_FAILED, @@ -7568,6 +7448,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "没有列表。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "已连接" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "在线" @@ -7612,10 +7496,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_KEYBOARD, "键盘" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "使用内建的图像浏览器" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "最大交换链图像数" @@ -7663,10 +7543,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "自动选择宽高比" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "昵称 (局域网):%s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "状态" @@ -7761,7 +7637,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "更改虚拟游戏手柄遮罩" + "更改虚拟手柄遮罩" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, @@ -8038,7 +7914,7 @@ MSG_HASH( /* FIXME Should be MSG_ */ ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER_FALLBACK, - "您的系统图形驱动与当前万能模拟器的视频驱动不兼容,回退到「%s」驱动。请重启万能模拟器以使更改生效。" + "您的系统图形驱动与当前全能模拟器的视频驱动不兼容,回退到「%s」驱动。请重启全能模拟器以使更改生效。" ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS, @@ -8070,11 +7946,11 @@ MSG_HASH( ) MSG_HASH( MSG_PRESS_TWO_MORE_TIMES_TO_SEND_DEBUG_INFO, - "再按两次,将诊断信息提交给万能模拟器团队。" + "再按两次,将诊断信息提交给全能模拟器团队。" ) MSG_HASH( MSG_PRESS_ONE_MORE_TIME_TO_SEND_DEBUG_INFO, - "再按一次,将诊断信息提交给万能模拟器团队。" + "再按一次,将诊断信息提交给全能模拟器团队。" ) MSG_HASH( MSG_AUDIO_MIXER_VOLUME, @@ -8120,10 +7996,6 @@ MSG_HASH( MSG_UPNP_FAILED, "端口映射失败" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "未提供参数也没有内建菜单,正在显示帮助..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "正在将光盘放到托盘上" @@ -8158,15 +8030,15 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_NOT_RETROARCH, - "联机尝试失败,因为对方没有运行万能模拟器,或者运行的版本太旧。" + "联机尝试失败,因为对方没有运行全能模拟器,或者运行的版本太旧。" ) MSG_HASH( MSG_NETPLAY_OUT_OF_DATE, - "联机玩家运行旧版本的万能模拟器。无法连接。" + "联机玩家运行旧版本的全能模拟器。无法连接。" ) MSG_HASH( MSG_NETPLAY_DIFFERENT_VERSIONS, - "警告:联机玩家运行不同版本的万能模拟器。如果遇到问题,请改用相同版本。" + "警告:联机玩家运行不同版本的全能模拟器。如果遇到问题,请改用相同版本。" ) MSG_HASH( MSG_NETPLAY_DIFFERENT_CORES, @@ -8328,6 +8200,10 @@ MSG_HASH( MSG_ADD_TO_FAVORITES_FAILED, "收藏失败:列表已满" ) +MSG_HASH( + MSG_SET_CORE_ASSOCIATION, + "已设置核心:" + ) MSG_HASH( MSG_APPENDED_DISK, "附加光盘" @@ -8834,7 +8710,7 @@ MSG_HASH( ) MSG_HASH( MSG_PROGRAM, - "万能模拟器" + "全能模拟器" ) MSG_HASH( MSG_READING_FIRST_DATA_TRACK, @@ -9112,10 +8988,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "用户未设置,使用备用设置。" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "蓝牙扫描完成。" + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Wi-Fi 扫描完成。" ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "正在扫描蓝牙设备..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "扫描无线网络..." @@ -9152,10 +9036,102 @@ MSG_HASH( MSG_INPUT_KIOSK_MODE_PASSWORD_NOK, "密码错误。" ) +MSG_HASH( + MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES, + "超前运行已禁用,因为这个核心不支持即时存档。" + ) +MSG_HASH( + MSG_RUNAHEAD_FAILED_TO_SAVE_STATE, + "保存状态失败。已禁用超前运行。" + ) +MSG_HASH( + MSG_RUNAHEAD_FAILED_TO_LOAD_STATE, + "加载状态失败。已禁用超前运行。" + ) +MSG_HASH( + MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE, + "创建第二个实例失败。超前运行将只能使用一个实例。" + ) MSG_HASH( MSG_SCANNING_OF_FILE_FINISHED, "文件扫描完成" ) +MSG_HASH( + MSG_CHEAT_INIT_SUCCESS, + "启动金手指搜索成功" + ) +MSG_HASH( + MSG_CHEAT_INIT_FAIL, + "启动金手指搜索失败" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_NOT_INITIALIZED, + "搜索尚未初始化/启动" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_FOUND_MATCHES, + "新的匹配数量 = %u" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_SUCCESS, + "已添加 %u 个匹配" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL, + "添加匹配失败" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS, + "已从匹配创建代码" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADD_MATCH_FAIL, + "创建代码失败" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS, + "已删除匹配" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY, + "没有足够空间。金手指总数不能超过 100 个。" + ) +MSG_HASH( + MSG_CHEAT_ADD_TOP_SUCCESS, + "新的金手指已添加到列表顶部。" + ) +MSG_HASH( + MSG_CHEAT_ADD_BOTTOM_SUCCESS, + "新的金手指已添加到列表底部。" + ) +MSG_HASH( + MSG_CHEAT_DELETE_ALL_SUCCESS, + "所有金手指已删除。" + ) +MSG_HASH( + MSG_CHEAT_ADD_BEFORE_SUCCESS, + "在此金手指之前添加了新的金手指。" + ) +MSG_HASH( + MSG_CHEAT_ADD_AFTER_SUCCESS, + "在此金手指之后添加了新的金手指。" + ) +MSG_HASH( + MSG_CHEAT_COPY_BEFORE_SUCCESS, + "在此金手指之前复制。" + ) +MSG_HASH( + MSG_CHEAT_COPY_AFTER_SUCCESS, + "在此金手指之后复制。" + ) +MSG_HASH( + MSG_CHEAT_DELETE_SUCCESS, + "金手指已删除。" + ) +MSG_HASH( + MSG_DEVICE_CONFIGURED_IN_PORT, + "配置于端口:" + ) MSG_HASH( MSG_FAILED_TO_SET_DISK, "放置光盘失败" @@ -9264,6 +9240,62 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "扫描完成:" ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "正在扫描核心:" + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "当前安装核心的备份已存在:" + ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "正在备份核心:" + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "核心备份完成:" + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "选中的核心备份已安装过了:" + ) +MSG_HASH( + MSG_RESTORING_CORE, + "正在还原核心:" + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "核心还原完毕:" + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "选中的核心文件已安装过了:" + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "正在安装核心:" + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "核心安装完毕:" + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "选中的核心文件无效:" + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "核心备份失败:" + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "核心还原失败:" + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "核心安装失败:" + ) /* Lakka */ @@ -9288,7 +9320,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SPLIT_JOYCON, - "拆下 Joy-Con 手柄" + "分开 Joy-Con 手柄" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INTERNAL_STORAGE_STATUS, @@ -9298,10 +9330,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR, "图形部件缩放倍数" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "绘制显示部件时应用手动缩放倍数覆盖。仅在「自动缩放图形部件」选项关闭时应用。可以独立于菜单缩放通知,指示和控制部件。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, "屏幕分辨率" @@ -9338,6 +9366,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "启用软件过滤器" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_SETTINGS, + "蓝牙" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "扫描蓝牙设备并连接它们。" + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "扫描无线网络并且建立连接。" @@ -9414,6 +9450,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "显示或隐藏「关机」选项。" ) +MSG_HASH( + MSG_INTERNET_RELAY, + "互联网 (中继)" + ) +MSG_HASH( + MSG_READ_WRITE, + "读写" + ) +MSG_HASH( + MSG_READ_ONLY, + "只读" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( @@ -9551,6 +9599,6 @@ MSG_HASH( #ifdef HAVE_QT MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED, - "扫描完成。

\n为了是游戏被正确扫描,您必须:\n
  • 已下载了兼容的核心
  • \n
  • 已更新了「核心信息文件」
  • \n
  • 已更新了「Databases」
  • \n
  • 更新后重启万能模拟器
\n最后,游戏 ROM 必须匹配数据库。如果仍然不行,请报告 BUG。" + "扫描完成。

\n为了是游戏被正确扫描,您必须:\n
  • 已下载了兼容的核心
  • \n
  • 已更新了「核心信息文件」
  • \n
  • 已更新了「Databases」
  • \n
  • 更新后重启全能模拟器
\n最后,游戏 ROM 必须匹配数据库。如果仍然不行,请报告 BUG。" ) #endif diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index e9422e47e8..3b84a7d5c5 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -22,7 +22,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, - "遊玩記錄" + "歷史紀錄" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_IMAGES_TAB, @@ -57,7 +57,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_LIST, - "戴入模擬器核心" + "載入核心" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_LIST, @@ -69,7 +69,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, - "選擇遊戲" + "選擇要啟動的遊戲" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_DISC, @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "讀取實體碟片(需先選擇模擬器核心)" + "讀取實體光碟片(需先選擇模擬器核心)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -97,7 +97,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, - "掃瞄遊戲" + "添加遊戲內容" ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, @@ -109,16 +109,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "開啟桌面選單" + "開啟傳統桌面選單" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, "關閉 Kiosk 模式" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "關閉 Kiosk 模式(重新啟動後生效)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, "線上更新器" @@ -141,7 +137,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS, - "程式設定" + "設定程式" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, @@ -161,7 +157,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LIST, - "協助" + "說明" ) MSG_HASH( MENU_ENUM_SUBLABEL_HELP_LIST, @@ -200,7 +196,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "自下載目錄區安裝或重新安裝模擬器核心" + "在\"下載資料夾\"中安裝或還原模擬器核心" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -238,7 +234,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "先前加入至『我的最愛』的遊戲內容將會出現在這裡." + "增加到“收藏夾”的內容將顯示在此處。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -291,10 +287,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PL_THUMBNAILS_UPDATER_LIST, "遊戲清單預覽縮圖更新器" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "下載指定遊戲清單的所有預覽縮圖" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, "下載遊戲內容" @@ -309,7 +301,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "更新控制器自動設定範本" + "更新控制器配置" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -449,6 +441,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "必要項目" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "鎖定已安裝的核心" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "刪除模擬器核心" @@ -457,6 +453,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "從硬碟刪除模擬器核心" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "備份核心" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "建立目前已安裝的核心存檔備份。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "還原備份" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "從備份存檔列表中安裝核心的前一個版本。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "刪除備份" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "從備份存檔列表中移除一個檔案。" + ) /* Main Menu > Information > System Information */ @@ -542,7 +562,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "支援網路控制器" + "網路控制器支援" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -940,7 +960,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, - "操作" + "輸入" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_SETTINGS, @@ -992,7 +1012,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "變更檔案瀏覽器設定" + "調整瀏覽器設定" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, @@ -1097,17 +1117,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "輸入驅動程式" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "輸入驅動程式(依顯示驅動程式不同可能強制切換成其他驅動程式)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "遊戲控制器驅動程式" + "控制器" ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "使用的遊戲控制器驅動程式" + "使用的控制器驅動程式" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1141,6 +1157,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "使用的相機驅動程式" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_DRIVER, + "藍牙" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "使用藍牙驅動程式。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Wi-Fi 驅動程式" @@ -1252,10 +1276,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "插入黑色畫面(減少模糊)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "在幀與幀之間插入黑色的中間幀,通常用於消除在\n120Hz刷新率的顯示器上運行60Hz的遊戲內容帶來\n的鬼影。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, "啟用GPU截屏" @@ -1282,7 +1302,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER, - "視訊濾鏡" + "影像濾鏡" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FILTER, @@ -1391,7 +1411,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN, - "使用全屏模式" + "以全螢幕模式開始" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN, @@ -1399,39 +1419,71 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN, - "無邊框窗口全屏模式" + "無邊框視窗全螢幕模式" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOWED_FULLSCREEN, + "使用全螢幕視窗模式" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_X, "全螢幕寬度" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X, + "設定全螢幕時的螢幕寬度,未設定時將使用桌面解析度" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_Y, "全螢幕高度" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y, + "設定全螢幕時的螢幕高度,未設定時將使用桌面解析度" + ) /* Settings > Video > Windowed Mode */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALE, - "窗口縮放量" + "視窗縮放" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, + "設定相對於原始解析度的視窗大小比例,或者也可以設定設定為固定的視窗長寬大小" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY, "視窗不透明度" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS, + "顯示視窗裝飾" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, "記住視窗位置與大小" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION, + "記憶視窗的大小及位置,本項設定優先於視窗縮放選項" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH, - "窗口寬度" + "視窗寬度" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, + "自訂視窗寬度" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT, "視窗高度" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, + "自訂視窗高度" + ) /* Settings > Video > Scaling */ @@ -1439,6 +1491,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, "整數化縮放量" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, + "只根據系統回報的基本長寬大小比例進行整數倍縮放。如果「強制長寬比」沒有設定,X/Y軸將以整數倍進行縮放。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, "長寬比" @@ -1447,6 +1503,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO, "自定義畫面比例" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, + "如果長寬比設定為「自訂長寬比」,畫面比例 (長/寬) 可以為浮點數。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "自定義畫面X" @@ -1486,10 +1546,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "Nvidia智能垂直同步" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "V-Sync將保持啟用直到效能低於目標更新率。\n這可以最小化效能低落時無法及時運算所造成的卡頓,且更為節能。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "幀延時" @@ -1609,6 +1665,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, "聲音DSP插件" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_DSP_PLUGIN, + "音效DSP插件,用於在音頻發送到驅動器之前先對其進行處理。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_EXCLUSIVE_MODE, "WASAPI獨佔模式" @@ -1644,6 +1704,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE, "聲音設備" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_DEVICE, + "覆蓋音效驅動使用的預設聲音設備。 這取決於驅動程序。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, "聲音時延(ms)" @@ -1659,6 +1723,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY, "聲音重採樣器品質" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY, + "降低此參數可提高性能/降低延遲,而不是提高聲音品質;如果要獲得更好的聲音品質,則以降低性能/降低延遲為代價,可以提高此參數。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE, "聲音輸出碼率(Hz)" @@ -1686,6 +1754,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, "動態聲音碼率控制間隔" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, + "同步聲音和視訊時,有助於消除時序上的瑕疵。 請注意,如果禁用,則無法獲得正確的同步。" + ) /* Settings > Audio > MIDI */ @@ -1744,10 +1816,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, "停止播放" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, + "這將停止播放串流聲音,但不會將其從記憶體中刪除。 您可以通過選擇\"播放\"來再次開始播放。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, "移除" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE, + "這將停止播放串流聲音,並將其完全從記憶體中刪除。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME, "音量" @@ -1769,19 +1849,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "開啟確認聲" + "開啟'OK'音效" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "開啟取消聲" + "開啟'取消'音效" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "開啟注意聲" + "開啟'通知'音效" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "開啟背景音樂聲" + "開啟'背景音樂'音效" ) /* Settings > Input */ @@ -1794,13 +1874,9 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "RetroArch 最大遊戲支援人數" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "輪詢類型行為" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "啟用綁定重映射" + "對此核心重新映射控制器" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, @@ -1850,9 +1926,21 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS, "觸覺反饋/震動" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "更改觸覺反饋和振動設定。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS, + "選單控制" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, + "更改選單控制設定。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "輸入熱鍵綁定" + "熱鍵" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1860,7 +1948,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "輸入用戶 %u 的綁定" + "端口 %u 控制器" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -1869,6 +1957,10 @@ MSG_HASH( /* Settings > Input > Haptic Feedback/Vibration */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION, + "啟用設備振動(對於支援的內核)" + ) /* Settings > Input > Menu Controls */ @@ -1880,6 +1972,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, "選單切換 確定/取消 按鈕" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, + "交換 確定/取消 按鍵。禁用是以日本的按鍵O為確定,啟用是西方的按鍵X為確定。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, "所有用戶都能控制選單" @@ -1891,29 +1987,29 @@ MSG_HASH( /* Settings > Input > Hotkey Binds */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, + "確認離開" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "遊戲控制器選單切出組合鍵" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "控制器用來切出選單的組合鍵。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "快進切換" + "快進(切換)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "快進保持" + "快進(保持)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "慢動作開關" + "慢動作(切換)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "慢動作" + "慢動作(保持)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, @@ -1923,9 +2019,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "儲存狀態" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "將狀態儲存到目前選取的插槽。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "切換全營幕" + "全螢幕(切換)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, @@ -1943,14 +2043,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "回溯" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "視訊錄製開關" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "切換暫停" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "幀提前量" @@ -1969,15 +2061,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "金手指索引 +" + "下一個作弊碼索引" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "金手指索引 -" + "上一個作弊碼索引" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "金手指開關" + "作弊碼(切換)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, @@ -1985,19 +2077,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "靜音開關" + "靜音(切換)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "聲音輸出開關 開啟/關閉" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "切換營幕鍵盤" + "螢幕鍵盤(切換)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "螢幕鍵盤開關 開啟/關閉" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "顯示FPS" + "顯示FPS(切換)" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "連線遊戲切換 遊戲/圍觀 模式" + MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, + "傳送除錯資訊" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, @@ -2005,47 +2105,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "音量 +" + "調高音量" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "音量 -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "下一個覆層" + "降低音量" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, - "光驅出倉切換" + "光碟彈出切換" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "下一張光碟" + "下一片光碟" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "上一張光碟" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "鼠標捕獲開關" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "切換遊戲焦距" + "上一片光碟" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "切換選單" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "錄製開關" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "串流開關" + "選單(切換)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, @@ -2067,16 +2147,8 @@ MSG_HASH( "設備索引" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "綁定全部" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "綁定全部至默認值" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "儲存自動設定" + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, + "滑鼠索引" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, @@ -2094,22 +2166,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "開始鍵" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "上十字鍵" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "下十字鍵" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "左十字鍵" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "右十字鍵" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "A鍵(右側)" @@ -2232,10 +2288,16 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "載入遊戲前檢查必要的韌體/BIOS是否存在." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "允許旋轉" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "管理模擬器核心" + ) /* Settings > Configuration */ @@ -2243,10 +2305,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, "退出時儲存設定" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "程序將在退出時儲存修改到設定文件。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "自動戴入遊戲內容特定的核心選項" @@ -2273,7 +2331,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_SHADERS_ENABLE, - "自動戴入Shader預設" + "自動載入Shader預設" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GLOBAL_CORE_OPTIONS, @@ -2282,14 +2340,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "排序文件夾中的存檔" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "排序文件夾中的狀態存儲" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, "載入儲存狀態時不覆蓋SaveRAM" @@ -2298,17 +2348,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "SaveRAM自動儲存間隔" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "自動索引儲存狀態" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "自動儲存狀態" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "自動戴入狀態" + "自動載入狀態" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, @@ -2333,6 +2379,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOG_TO_FILE, "儲存記錄檔" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_TO_FILE_TIMESTAMP, + "時間戳記記錄檔" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "性能計數器" @@ -2342,11 +2392,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "顯示隱藏的文件和文件夾" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "在文件瀏覽器中顯示隱藏的文件或文件夾。" + "顯示隱藏的檔案和資料夾" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2367,10 +2413,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_SETTINGS, "回溯" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "最大運行速度" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, "慢動作倍率" @@ -2386,23 +2428,23 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "啟用回溯" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "回溯粒度" - ) /* Settings > Frame Throttle > Frame Time Counter */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, + "儲存存狀態後重置" + ) /* Settings > Recording */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "錄製品質" + "錄影畫質" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "錄影設定" + "自訂錄影設定" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, @@ -2416,13 +2458,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "串流模式" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "串流品質" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "串流名稱" + "串流標題" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_URL, @@ -2437,11 +2475,23 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS, - "營幕覆層" + "螢幕覆層" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONSCREEN_VIDEO_LAYOUT_SETTINGS, + "影像佈局" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_VIDEO_LAYOUT_SETTINGS, + "調整影像佈局" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS, - "營幕通知" + "螢幕通知" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, + "調整螢幕通知" ) /* Settings > On-Screen Display > On-Screen Overlay */ @@ -2475,8 +2525,14 @@ MSG_HASH( "覆層縮放比例" ) + + /* Settings > On-Screen Display > Video Layout */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_ENABLE, + "啟用影像佈局" + ) /* Settings > On-Screen Display > On-Screen Notifications */ @@ -2486,7 +2542,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, - "顯示營幕消息。" + "顯示螢幕消息。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, @@ -2494,7 +2550,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, - "在營幕上顯示當前每秒的幀率。" + "在螢幕上顯示目前每秒的幀率。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, @@ -2504,6 +2560,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "在畫面中顯示技術資訊." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, + "顯示記憶體使用量" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "屏顯消息(OSD)字體" @@ -2514,15 +2574,47 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_X, - "屏顯消息(OSD)X軸位置" + "通知的水平位置" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_Y, - "屏顯消息(OSD)Y軸位置" + "通知的垂直位置" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED, + "通知顏色(紅)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN, + "通知顏色(綠)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE, + "通知顏色(藍)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE, + "通知背景" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED, + "通知背景顏色(紅)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN, + "通知背景顏色(綠)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE, + "通知背景顏色(藍)" ) /* Settings > User Interface */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, + "選單的可見度" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "選單" @@ -2535,6 +2627,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "顯示高級設定" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, + "顯示高級用戶的進階設定" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "開啟 Kiosk 模式" @@ -2557,11 +2653,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "當選單激活時暫停" + "當選單啟用時暫停遊戲內容" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, - "鼠標支持" + "滑鼠支援" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -2571,10 +2667,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "啟用多線程數據執行循環" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "禁止後台運行" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "當窗口失去焦點時暫停遊戲。" @@ -2583,6 +2675,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION, "禁用桌面元素" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, + "選單列" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, + "桌面選單(需要重新啟動)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, + "啟動時開啟桌面選單" + ) /* Settings > User Interface > Views */ @@ -2591,12 +2695,56 @@ MSG_HASH( "快捷選單" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, - "顯示設定頁" + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, + "顯示載入的核心" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "設定開啟 Settings Tab 的密碼" + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, + "顯示載入的內容" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_DISC, + "顯示載入的光碟" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_DISC, + "顯示/隱藏'載入光碟'選項。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_DUMP_DISC, + "顯示導出的光碟" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, + "顯示線上更新器" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER, + "顯示核心下載器" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, + "顯示資訊" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, + "顯示設定檔" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, + "顯示說明" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, + "顯示退出 RetroArch" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_RESTART_RETROARCH, + "顯示重新啟動 RetroArch" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, + "顯示設定頁" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, @@ -2626,6 +2774,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, "顯示時間日期" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_DATE_SEPARATOR, + "日期分隔符號" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE, "顯示電池電量" @@ -2636,14 +2788,78 @@ MSG_HASH( ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, - "顯示開始營幕" + "顯示開始螢幕" ) /* Settings > User Interface > Views > Quick Menu */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESTART_CONTENT, + "顯示重新啟動內容" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, + "顯示加入到我的最愛" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, + "顯示選項" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, + "顯示控制器" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, + "顯示作弊碼" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, + "顯示資訊" + ) /* Settings > User Interface > Views > Settings */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DRIVERS, + "顯示驅動" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO, + "顯示影像" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO, + "顯示聲音" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT, + "顯示輸入" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY, + "顯示延遲" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE, + "顯示核心" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING, + "顯示錄影" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK, + "顯示網路" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER, + "顯示使用者" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY, + "顯示目錄" + ) /* Settings > User Interface > Appearance */ @@ -2653,7 +2869,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "選單壁紙" + "背景圖片" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -2707,15 +2923,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, - "連線遊戲TCP/UDP端口" + "連線遊戲TCP/UDP埠" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, - "服務器密碼" + "伺服器密碼" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, - "服務器圍觀的密碼" + "伺服器圍觀的密碼" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, @@ -2737,18 +2953,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "網路命令端口" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "網路遊戲控制器" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "網路遠端基本端口" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "用戶 %d 遠程允許" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "標準輸入流命令" @@ -2772,12 +2976,20 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, "自動解壓下載的檔案" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "當更新時備份模擬器核心" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "模擬器核心備份歷史大小" + ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "啟用歷史記錄" + "歷史紀錄" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -2799,6 +3011,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "核心目錄:" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, + "運行時間:" + ) /* Settings > Playlists > Playlist Management */ @@ -2823,16 +3039,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME, - "用戶名" + "使用者名稱" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "語言" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "設定用戶界面的語言。" - ) /* Settings > User > Privacy */ @@ -2864,11 +3076,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, - "用戶名" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "輸入Retro Achievements 的帳號." + "使用者名稱" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, @@ -2937,19 +3145,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CURSOR_DIRECTORY, - "指針目錄" + "游標" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH, - "金手指文件目錄" + "金手指文件" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_DIR, - "視訊濾鏡目錄" + "視訊濾鏡" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_FILTER_DIR, - "聲音過濾器目錄" + "音訊過濾器" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR, @@ -2969,7 +3177,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, - "營幕截圖目錄" + "螢幕截圖" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, @@ -2993,7 +3201,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY, - "緩沖目錄" + "快取" ) /* Music */ @@ -3011,10 +3219,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, "斷開連接" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "更新 Room 列表" - ) /* Netplay > Host */ @@ -3039,7 +3243,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_FILE, - "掃瞄文件" + "掃瞄檔案" ) /* Import content > Scan File */ @@ -3047,42 +3251,86 @@ MSG_HASH( /* Import content > Manual Scan */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME, + "系統名稱" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "核心" + "預設核心" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "遞迴掃描" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "當啟用後,指定的“Rom目錄”內的所有子目錄將包含在掃描中。" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, + "開始掃描" ) /* Playlist > Playlist Item */ MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN, - "運行" + "執行" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN, + "啟動遊戲內容。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RENAME_ENTRY, - "變更此筆資料的名稱." + "重新命名" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, "移除" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES_PLAYLIST, + "加入到我的最愛" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SET_CORE_ASSOCIATION, + "設定核心關聯" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION, + "重設核心關聯" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INFORMATION, - "訊息" + "資訊" ) /* Playlist Item > Set Core Association */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, + "目前使用的核心" + ) /* Playlist Item > Information */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_LABEL, + "名稱" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_PATH, + "檔案路徑" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CORE_NAME, "核心" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_INFO_DATABASE, - "遊戲內容數據庫目錄" + "資料庫" ) /* Quick Menu */ @@ -3101,7 +3349,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT, - "截取營幕" + "截取螢幕" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATE_SLOT, @@ -3113,16 +3361,20 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_STATE, - "戴入狀態" + "載入狀態" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE, - "撤銷戴入狀態" + "撤銷載入狀態" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_SAVE_STATE, "撤銷儲存狀態" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES, + "新增至我的最愛" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING, "開始錄製" @@ -3195,7 +3447,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_LOAD, - "戴入重映射文件" + "載入重映射文件" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_SAVE_CORE, @@ -3231,6 +3483,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "儲存目前的金手指." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, + "加入新的作弊碼在上方" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, + "加入新的作弊碼在下方" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, + "刪除全部的作弊碼" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_CHANGES, "套用變更" @@ -3246,6 +3510,10 @@ MSG_HASH( /* Quick Menu > Cheats > Start or Continue Cheat Search */ +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, + "按下左鍵或右鍵以改變數值" + ) /* Quick Menu > Cheats > Load Cheat File (Replace) */ @@ -3263,6 +3531,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_STATE, "啟用" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, + "移除此作弊碼" + ) /* Quick Menu > Disc Control */ @@ -3279,11 +3551,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, - "戴入Shader預設" + "載入Shader預設" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, + "儲存" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, + "移除" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES, - "應用Shader修改" + "套用Shader修改" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS, @@ -3382,6 +3662,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "沒有找到設定。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "沒有發現藍牙裝置" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "未發現網路。" @@ -3392,7 +3676,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SEARCH, - "搜索:" + "搜尋" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, @@ -3400,11 +3684,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY, - "上一級目錄" + "上一層目錄" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, - "沒有找到文件夾。" + "沒有找到資料夾。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ITEMS, @@ -3412,7 +3696,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SELECT_FILE, - "選擇文件" + "選擇檔案" ) /* Settings Options */ @@ -3439,7 +3723,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "沒有電源" + "無來源" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, @@ -3465,9 +3749,21 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD, "Retro觸控板" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "按住選擇鍵(2秒)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_DEFAULT, + "系統預設" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT, + "系統預設" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, - "截屏" + "抓圖" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_TITLE_SCREENS, @@ -3495,11 +3791,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TRUE, - "真" + "正確" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FALSE, - "取消" + "錯誤" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ENABLED, @@ -3507,7 +3803,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISABLED, - "禁用" + "關閉" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ENTRY, @@ -3519,7 +3815,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DONT_CARE, - "不關心" + "無所謂" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LINEAR, @@ -3541,6 +3837,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEY, "(鍵: %s)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, + "滑鼠滾輪上" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, + "滑鼠滾輪下" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, + "滑鼠滾輪左" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, + "滑鼠滾輪右" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "較早" @@ -3628,11 +3940,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_THEME, - "選單圖標主題" + "選單圖示主題" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, - "啟用圖標陰影" + "啟用圖示陰影" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, @@ -3646,17 +3958,9 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "開啟 Settings Tab" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "開啟 Settings tab. 必需重開機" - ) /* XMB: Settings Options */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Ribbon (簡化)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_CUSTOM, "自定義" @@ -3679,7 +3983,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LIGHT, - "亮色主題" + "淡色" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MORNING_BLUE, @@ -3764,10 +4068,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, "截斷播放清單名稱" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "啟用時,會在播放清單移除系統名稱。例如,'Sony - PlayStation' 會顯示成 'PlayStation'。這個變更必須重新啟動。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, "播放清單截斷後排序" @@ -3779,6 +4079,10 @@ MSG_HASH( /* MaterialUI: Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_ICONS_ENABLE, + "選單圖示" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME, "選單顏色主題" @@ -3843,12 +4147,16 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_LOAD_CORE, - "&戴入核心..." + "&載入核心..." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_SHADER_PARAMS, "預覽Shader參數" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME, + "佈景主題" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK, "深色" @@ -3859,11 +4167,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, - "&幫助" + "&說明" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_LOAD_CORE, - "戴入核心" + "載入核心" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_VERSION, + "版本" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS, @@ -3875,7 +4187,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT, - "營幕截圖目錄" + "螢幕截圖目錄" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CORE, @@ -3887,16 +4199,56 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_INFORMATION, - "訊息" + "資訊" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ERROR, "錯誤" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_HIDE, + "隱藏" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CHOOSE, + "選擇(&C)..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_THEME, + "選取佈景主題" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CUSTOM_THEME, + "自訂佈景主題" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW, + "檢視" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS, + "圖示" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_LIST, + "清單" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, + "清除" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DELETE_PLAYLIST, "刪除播放清單" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_NAME, + "名稱:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_PATH, + "路徑:" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_CORE, "核心目錄:" @@ -3905,10 +4257,54 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_DATABASE, "遊戲內容數據庫目錄:" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DELETE, + "刪除" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FILES, + "新增檔案" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FOLDER, + "新增資料夾" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_EDIT, + "編輯" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FILES, + "選取檔案" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FOLDER, + "選取資料夾" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOAD, + "載入" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SAVE, + "儲存" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_REMOVE, + "移除" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_APPLY, + "套用" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_RESET, "重置" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_RESET_ALL, + "全部重置" + ) /* Unsorted */ @@ -3954,16 +4350,20 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_SETTINGS, - "營幕覆層" + "螢幕覆層" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY, - "戴入最近的遊戲內容" + "載入最近的遊戲內容" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MULTIMEDIA_SETTINGS, "多媒體" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS, + "子系統" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETPLAY_HOSTS_FOUND, "未發現連線遊戲主機。" @@ -3976,13 +4376,21 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "沒有遊戲列表。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "已連線" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONLINE, + "線上" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PORT, - "端口" + "埠" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_MUSIC, - "運行" + "執行" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SECONDS, @@ -4002,7 +4410,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, - "用戶" + "使用者" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, @@ -4018,7 +4426,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO, - "Shader預設" + "渲染預設" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, @@ -4049,7 +4457,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "暱稱 (lan): %s" + "暱稱 (LAN): %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -4097,7 +4505,7 @@ MSG_HASH( /* FIXME Still exists in a comment about being removed */ ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, - "啟用連線遊戲" + "連線遊戲" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT, @@ -4109,19 +4517,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP, - "幫助" + "說明" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "聲音/視訊故障排除" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "變更虛擬遊戲控制器覆層" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, - "戴入遊戲內容" + "載入遊戲內容" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT, @@ -4145,7 +4549,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, - "在局域網內搜索並連接聯網遊戲的主機。" + "在區域網內搜尋並連接聯網遊戲的主機。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_MODE, @@ -4163,9 +4567,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_ENABLE, "限制最大運行速度" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_CONTINUE_SEARCH, + "繼續搜尋" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE, - "成就列表(專家模式)" + "成就列表(專家模式)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_NUM_PASSES, @@ -4192,63 +4600,63 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_DEVELOPER, - "數據庫 - 過濾器 : 開發者" + "資料庫 - 過濾器 : 開發者" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_PUBLISHER, - "數據庫 - 過濾器 : 發佈者" + "資料庫 - 過濾器 : 發佈者" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_ORIGIN, - "數據庫 - 過濾器 : Origin" + "資料庫 - 過濾器 : Origin" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_FRANCHISE, - "數據庫 - 過濾器 : Franchise" + "資料庫 - 過濾器 : Franchise" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_ESRB_RATING, - "數據庫 - 過濾器 : ESRB 分級" + "資料庫 - 過濾器 : ESRB 分級" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_ELSPA_RATING, - "數據庫 - 過濾器 : ELSPA 分級" + "資料庫 - 過濾器 : ELSPA 分級" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_PEGI_RATING, - "數據庫 - 過濾器 : PEGI 分級" + "資料庫 - 過濾器 : PEGI 分級" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_CERO_RATING, - "數據庫 - 過濾器 : CERO 分級" + "資料庫 - 過濾器 : CERO 分級" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_BBFC_RATING, - "數據庫 - 過濾器 : BBFC 分級" + "資料庫 - 過濾器 : BBFC 分級" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_MAX_USERS, - "數據庫 - 過濾器 : 最大用戶數" + "資料庫 - 過濾器 : 最大用戶數" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_RELEASEDATE_BY_MONTH, - "數據庫 - 過濾器 : 發行月份" + "資料庫 - 過濾器 : 發行月份" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_RELEASEDATE_BY_YEAR, - "數據庫 - 過濾器 : 發行年代" + "資料庫 - 過濾器 : 發行年代" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_EDGE_MAGAZINE_ISSUE, - "數據庫 - 過濾器 : Edge Magazine Issue" + "資料庫 - 過濾器 : Edge Magazine Issue" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_EDGE_MAGAZINE_RATING, - "數據庫 - 過濾器 : Edge Magazine Rating" + "資料庫 - 過濾器 : Edge 雜誌評分" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_DATABASE_INFO, - "數據庫訊息" + "Rating庫訊息" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG, @@ -4256,7 +4664,7 @@ MSG_HASH( ) MSG_HASH( /* FIXME Seems related to MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, possible duplicate */ MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIR, - "下載目錄" + "下載" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS, @@ -4264,7 +4672,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SLANG_SUPPORT, - "Slang 支持" + "俚語支持" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FBO_SUPPORT, @@ -4296,11 +4704,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_SCROLL_UP, - "向上滾動" + "向上捲動" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_START, - "默認值" + "預設值" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_TOGGLE_KEYBOARD, @@ -4313,16 +4721,24 @@ MSG_HASH( /* Discord Status */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED, + "已暫停" + ) /* Notifications */ MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, - "連線遊戲將在內容戴入後開始。" + "連線遊戲將在內容載入後開始。" ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, - "無法找到合適的核心或內容文件,手動戴入。" + "無法找到合適的核心或內容文件,手動載入。" + ) +MSG_HASH( /* FIXME Should be MSG_ */ + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR, + "核心安裝失敗" ) MSG_HASH( MSG_AUDIO_MIXER_VOLUME, @@ -4334,11 +4750,11 @@ MSG_HASH( ) MSG_HASH( MSG_SORRY_UNIMPLEMENTED_CORES_DONT_DEMAND_CONTENT_NETPLAY, - "對不起,錯誤發生:模擬器核心未請求內容,無法加入連線遊戲。" + "抱歉,發生錯誤:模擬器核心未請求內容,無法加入連線遊戲。" ) MSG_HASH( MSG_DEVICE_DISCONNECTED_FROM_PORT, - "設備已從連接口上移開" + "設備已從連接口上斷開" ) MSG_HASH( MSG_UNKNOWN_NETPLAY_COMMAND_RECEIVED, @@ -4346,7 +4762,7 @@ MSG_HASH( ) MSG_HASH( MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER, - "文件已存在。儲存到備份至緩衝區" + "檔案已存在。儲存到備份緩衝區" ) MSG_HASH( MSG_GOT_CONNECTION_FROM, @@ -4358,11 +4774,7 @@ MSG_HASH( ) MSG_HASH( MSG_PUBLIC_ADDRESS, - "公開地址" - ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "未提供參數也沒有內建選單,顯示幫助..." + "連接埠映射成功" ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, @@ -4378,11 +4790,11 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_YOU_HAVE_JOINED_AS_PLAYER_N, - "你已作為玩家 %d 加入" + "你已做為玩家 %u 加入" ) MSG_HASH( MSG_NETPLAY_ENDIAN_DEPENDENT, - "這個核心模擬器不支援不同系統的網路連線對打" + "這個核心模擬器不支援不同系統的網路連線對戰" ) MSG_HASH( MSG_NETPLAY_PLATFORM_DEPENDENT, @@ -4390,7 +4802,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_ENTER_PASSWORD, - "輸入連線遊戲服務器的密碼:" + "輸入連線遊戲伺服器的密碼:" ) MSG_HASH( MSG_NETPLAY_INCORRECT_PASSWORD, @@ -4398,15 +4810,15 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_SERVER_HANGUP, - "連線遊戲客戶端已離開" + "連線遊戲客戶端已斷線" ) MSG_HASH( MSG_NETPLAY_CLIENT_HANGUP, - "已離開連線遊戲模式" + "連線遊戲模式已斷線" ) MSG_HASH( MSG_NETPLAY_CANNOT_PLAY_UNPRIVILEGED, - "你沒有遊戲權限" + "你沒有遊玩的權限" ) MSG_HASH( MSG_NETPLAY_CANNOT_PLAY_NO_SLOTS, @@ -4452,17 +4864,25 @@ MSG_HASH( MSG_CONNECTION_SLOT, "連接到插槽" ) +MSG_HASH( + MSG_ALL_CORES_UPDATED, + "所有的模擬器核心皆為最新版本" + ) +MSG_HASH( + MSG_ADDED_TO_FAVORITES, + "已加到我的最愛" + ) MSG_HASH( MSG_APPENDED_DISK, "磁碟已加入" ) MSG_HASH( MSG_APPLICATION_DIR, - "應用程序目錄" + "應用程式目錄" ) MSG_HASH( MSG_APPLYING_SHADER, - "載入 shader" + "套用渲染" ) MSG_HASH( MSG_AUDIO_MUTED, @@ -4558,11 +4978,11 @@ MSG_HASH( ) MSG_HASH( MSG_COULD_NOT_READ_MOVIE_HEADER, - "無法讀取視訊頭部訊息." + "無法讀取影像表頭訊息." ) MSG_HASH( MSG_COULD_NOT_READ_STATE_FROM_MOVIE, - "無法讀取視訊狀態." + "無法讀取影像狀態." ) MSG_HASH( MSG_DECOMPRESSION_ALREADY_IN_PROGRESS, @@ -4770,7 +5190,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_TAKE_SCREENSHOT, - "營幕快照失敗." + "螢幕快照失敗." ) MSG_HASH( MSG_FAILED_TO_UNDO_LOAD_STATE, @@ -4790,7 +5210,7 @@ MSG_HASH( ) MSG_HASH( MSG_FILE_NOT_FOUND, - "未找到文件" + "未找到檔案" ) MSG_HASH( MSG_FOUND_AUTO_SAVESTATE_IN, @@ -4810,7 +5230,7 @@ MSG_HASH( ) MSG_HASH( MSG_FOUND_SHADER, - "找到 shader" + "已找到渲染" ) MSG_HASH( MSG_FRAMES, @@ -4882,7 +5302,7 @@ MSG_HASH( ) MSG_HASH( MSG_IN_GIGABYTES, - "(吉字節)" + "千兆字節" ) MSG_HASH( MSG_LIBRETRO_ABI_BREAK, @@ -4894,27 +5314,27 @@ MSG_HASH( ) MSG_HASH( MSG_LOADED_STATE_FROM_SLOT, - "戴入狀態從槽 #%d." + "載入狀態從槽 #%d." ) MSG_HASH( MSG_LOADED_STATE_FROM_SLOT_AUTO, - "戴入狀態從槽 #-1 (auto)." + "載入狀態從槽 #-1 (auto)." ) MSG_HASH( MSG_LOADING, - "正在戴入" + "讀取中" ) MSG_HASH( MSG_FIRMWARE, - "一個或多個固件文件丟失" + "遺失一個或多個韌體檔案" ) MSG_HASH( MSG_LOADING_CONTENT_FILE, - "正在戴入內容文件" + "正在讀取內容檔案" ) MSG_HASH( MSG_LOADING_HISTORY_FILE, - "正在讀取歷史文件" + "正在讀取歷史檔案" ) MSG_HASH( MSG_LOADING_STATE, @@ -5136,6 +5556,14 @@ MSG_HASH( MSG_VERSION_OF_LIBRETRO_API, "libretro API 版本" ) +MSG_HASH( + MSG_VIRTUAL_DISK_TRAY_EJECT, + "退出" + ) +MSG_HASH( + MSG_VIRTUAL_DISK_TRAY_CLOSE, + "關閉" + ) MSG_HASH( MSG_FAILED, "已失敗" @@ -5152,10 +5580,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "未設定,將使用內定值" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "藍牙掃描完成" + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Wi-Fi 掃瞄完成。" ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "正在掃描藍牙裝置..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "掃瞄無線網路..." @@ -5200,14 +5636,34 @@ MSG_HASH( MSG_FAILED_TO_SET_DISK, "設定磁盤失敗" ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_LOWEST, + "最低" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_LOWER, + "較低" + ) MSG_HASH( MSG_RESAMPLER_QUALITY_NORMAL, "正常" ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_HIGHER, + "較高" + ) +MSG_HASH( + MSG_RESAMPLER_QUALITY_HIGHEST, + "最高" + ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "掃瞄中: " ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "移除過時的備份: " + ) /* Lakka */ @@ -5238,6 +5694,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHUTDOWN, "關機" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_PICKER, + "開啟..." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_FLICKER, "閃爍過濾器" @@ -5250,6 +5710,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "啟用軟件過濾器" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_SETTINGS, + "藍牙" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "掃描藍牙設備並連接它們。" + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "掃瞄無線網路並且建立連接。" @@ -5282,18 +5750,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "啟用觸摸" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "鍵盤控制器映射啟用" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "鍵盤控制器映射類型" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "啟用小鍵盤" ) +MSG_HASH( + MSG_INTERNET, + "網際網路" + ) +MSG_HASH( + MSG_INTERNET_RELAY, + "網際網路(中繼)" + ) +MSG_HASH( + MSG_LOCAL, + "本地端" + ) +MSG_HASH( + MSG_READ_WRITE, + "讀取/寫入" + ) +MSG_HASH( + MSG_READ_ONLY, + "唯讀" + ) #ifdef HAVE_LAKKA_SWITCH #endif @@ -5332,6 +5812,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SSH_ENABLE, "啟用或者禁止遠程終端訪問(SSH)。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOCALAP_ENABLE, + "Wi-Fi存取點" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOCALAP_ENABLE, + "開啟或關閉Wi-Fi存取點" + ) #endif #ifdef GEKKO #endif @@ -5341,7 +5829,7 @@ MSG_HASH( #if defined(_3DS) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM, - "3DS底部屏幕" + "3DS底部螢幕" ) #endif #ifdef HAVE_QT diff --git a/intl/msg_hash_da.h b/intl/msg_hash_da.h new file mode 100644 index 0000000000..2dc26515ba --- /dev/null +++ b/intl/msg_hash_da.h @@ -0,0 +1,364 @@ +#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900) +#if (_MSC_VER >= 1700) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif +#pragma warning(disable:4566) +#endif + +/* Top-Level Menu */ + + +/* Main Menu */ + + +/* Main Menu > Load Core */ + + +/* Main Menu > Load Content */ + + +/* Main Menu > Load Content > Playlists */ + + +/* Main Menu > Online Updater */ + + +/* Main Menu > Information */ + + +/* Main Menu > Information > Core Information */ + + +/* Main Menu > Information > System Information */ + + +/* Main Menu > Information > Database Manager */ + + +/* Main Menu > Information > Database Manager > Information */ + + +/* Main Menu > Configuration File */ + + +/* Main Menu > Help */ + + +/* Main Menu > Help > Basic Menu Controls */ + + +/* Settings */ + + +/* Settings > Drivers */ + + +/* Settings > Video */ + + +/* Settings > Video > CRT SwitchRes */ + + +/* Settings > Video > Output */ + + +/* Settings > Video > Fullscreen Mode */ + + +/* Settings > Video > Windowed Mode */ + + +/* Settings > Video > Scaling */ + + +/* Settings > Video > Synchronization */ + + +/* Settings > Audio */ + + +/* Settings > Audio > Output */ + + +/* Settings > Audio > Resampler */ + + +/* Settings > Audio > Synchronization */ + + +/* Settings > Audio > MIDI */ + + +/* Settings > Audio > Mixer Settings > Mixer Stream */ + + +/* Settings > Audio > Menu Sounds */ + + +/* Settings > Input */ + + +/* Settings > Input > Haptic Feedback/Vibration */ + + +/* Settings > Input > Menu Controls */ + + +/* Settings > Input > Hotkey Binds */ + + +/* Settings > Input > Port # Binds */ + + +/* Settings > Latency */ + + +/* Settings > Core */ + +#ifndef HAVE_DYNAMIC +#endif + +/* Settings > Configuration */ + + +/* Settings > Saving */ + + +/* Settings > Logging */ + + +/* Settings > File Browser */ + + +/* Settings > Frame Throttle */ + + +/* Settings > Frame Throttle > Rewind */ + + +/* Settings > Frame Throttle > Frame Time Counter */ + + +/* Settings > Recording */ + + +/* Settings > On-Screen Display */ + + +/* Settings > On-Screen Display > On-Screen Overlay */ + + + + +/* Settings > On-Screen Display > Video Layout */ + + +/* Settings > On-Screen Display > On-Screen Notifications */ + + +/* Settings > User Interface */ + + +/* Settings > User Interface > Views */ + + +/* Settings > User Interface > Views > Quick Menu */ + + +/* Settings > User Interface > Views > Settings */ + + +/* Settings > User Interface > Appearance */ + + +/* Settings > AI Service */ + + +/* Settings > Accessibility */ + + +/* Settings > Power Management */ + +/* Settings > Achievements */ + + +/* Settings > Network */ + + +/* Settings > Network > Updater */ + + +/* Settings > Playlists */ + + +/* Settings > Playlists > Playlist Management */ + + +/* Settings > User */ + + +/* Settings > User > Privacy */ + + +/* Settings > User > Accounts */ + + +/* Settings > User > Accounts > RetroAchievements */ + + +/* Settings > User > Accounts > YouTube */ + + +/* Settings > User > Accounts > Twitch */ + + +/* Settings > Directory */ + + +/* Music */ + +/* Music > Quick Menu */ + + +/* Netplay */ + + +/* Netplay > Host */ + + +/* Import content */ + + +/* Import content > Scan File */ + + +/* Import content > Manual Scan */ + + +/* Playlist > Playlist Item */ + + +/* Playlist Item > Set Core Association */ + + +/* Playlist Item > Information */ + + +/* Quick Menu */ + + +/* Quick Menu > Options */ + + +/* Quick Menu > Controls */ + + +/* Quick Menu > Controls > Load Remap File */ + + +/* Quick Menu > Cheats */ + + +/* Quick Menu > Cheats > Start or Continue Cheat Search */ + + +/* Quick Menu > Cheats > Load Cheat File (Replace) */ + + +/* Quick Menu > Cheats > Load Cheat File (Append) */ + + +/* Quick Menu > Cheats > Cheat Details */ + + +/* Quick Menu > Disc Control */ + + +/* Quick Menu > Shaders */ + + +/* Quick Menu > Shaders > Save */ + + +/* Quick Menu > Shaders > Remove */ + + +/* Quick Menu > Shaders > Shader Parameters */ + + +/* Quick Menu > Overrides */ + + +/* Quick Menu > Achievements */ + + +/* Quick Menu > Information */ + + +/* Miscellaneous UI Items */ + + +/* Settings Options */ + + +/* RGUI: Settings > User Interface > Appearance */ + + +/* RGUI: Settings Options */ + + +/* XMB: Settings > User Interface > Appearance */ + + +/* XMB: Settings Options */ + + +/* Ozone: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings Options */ + + +/* Qt (Desktop Menu) */ + + +/* Unsorted */ + + +/* Unused (Only Exist in Translation Files) */ + + +/* Unused (Needs Confirmation) */ + + +/* Discord Status */ + + +/* Notifications */ + + +/* Lakka */ + + +/* Environment Specific Settings */ + + +#ifdef HAVE_LAKKA_SWITCH +#endif +#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) +#endif +#ifdef HAVE_LAKKA +#endif +#ifdef GEKKO +#endif +#ifdef HAVE_ODROIDGO2 +#else +#endif +#if defined(_3DS) +#endif +#ifdef HAVE_QT +#endif diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index f32ebd7739..fb6baf41fb 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -24,18 +24,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "Verlauf" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Bilder" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Musik" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Videotreiber" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, "Aktiviere Netplay" @@ -75,10 +67,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_DISC, "Disk laden" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LOAD_DISC, - "Lädt eine physische Medien-Disk. Du solltest zuerst den Core auswählen (Core laden), den du mit der Disk zu nutzen beabsichtigst." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, "Disk dumpen" @@ -99,26 +87,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, "Inhalt durchsuchen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Sucht nach Inhalten und fügt diese zur Datenbank hinzu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, "Desktop-Menü anzeigen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Öffnet das Desktop-Menü, wenn geschlossen." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, "Deaktiviere Kiosk-Modus" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Deaktiviert den Kiosk-Modus. Ein Neustart wird benötigt, damit die Änderungen angewendet werden." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, "Online-Aktualisierungen" @@ -194,10 +170,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, "Core installieren oder wiederherstellen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Installiere oder stelle einen Core aus dem Download-Verzeichnis wieder her." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, "Starte Videoprozessor" @@ -228,10 +200,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, "Favoriten" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Inhalt, den du zu deinen Favoriten hinzugefügt hast, wird hier erscheinen." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Musik" @@ -240,18 +208,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_MUSIC, "Musik, die bereits abgespielt wurde, wird hier erscheinen." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Bilder" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Bilder, die bereits angezeigt wurden, werden hier erscheinen." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Videotreiber" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Videos, die bereits abgespielt wurden, werden hier erscheinen." @@ -291,10 +251,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, "Zusätzliche Daten aktualisieren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Gamepad/Controller-Profile aktualisieren" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Cheats aktualisieren" @@ -500,10 +456,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, "Netzwerk-Befehlsinterface-Unterstützung" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Unterstützung für Netzwerk-Controller" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, "Cocoa-Unterstützung" @@ -930,10 +882,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Dateibrowser" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Passe die Dateibrowser-Einstellungen an." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, "Bildwiederholrate begrenzen" @@ -1021,18 +969,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "Eingabetreiber" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Zu verwendender Eingabetreiber. Abhängig vom Videotreiber kann dieser einen anderen Eingabetreiber erzwingen." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Controller-Treiber" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Zu verwendender Joypad-Treiber." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, "Videotreiber" @@ -1069,10 +1005,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "WLAN-Treiber" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Zu verwendender WLAN-Treiber." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, "Standort-Treiber" @@ -1114,7 +1046,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS, - "Synchronisiere Audio" + "Synchronisation" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, @@ -1136,10 +1068,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "Schwarzes Bild zwischen Einzelbildern einfügen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Fügt ein schwarzes Bild zwischen Einzelbildern ein. Nützlich für Benutzer von 120Hz-Monitoren, die 60Hz mit weniger 'ghosting' wünschen." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, "Verwende GPU für Bildschirmfotos" @@ -1319,18 +1247,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "X-Position des Bildes" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Benutzerdefinierter Versatz, der für die Position der X-Achse des Bildes verwendet wird. Wird ignoriert, wenn 'Pixelgenaue Bildskalierung' aktiviert ist, das Bild wird dann zentriert." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, "Y-Position des Bildes" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Benutzerdefinierter Versatz, der für die Position der Y-Achse des Bildes verwendet wird. Wird ignoriert, wenn 'Pixelgenaue Bildskalierung' aktiviert ist, das Bild wird dann zentriert." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Bildbreite" @@ -1351,10 +1271,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Bildränder (Overscan) zuschneiden (Neustart erforderlich)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Schneidet ein paar Pixel an den Bildrändern ab, die üblicherweise von Entwicklern leer gelassen werden und manchmal auch fehlerhafte Pixel enthalten." - ) /* Settings > Video > Synchronization */ @@ -1642,30 +1558,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Maximale Anzahl von Benutzern, die von RetroArch unterstützt werden." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Abfrageverhalten" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Beeinflusst, wie die Eingabe in RetroArch abgefragt wird. Wird dieser Wert auf 'Früh' oder 'Spät' gesetzt, kann sich je nach Konfiguration die Latenz verringern." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Tasten-Neubelegung aktivieren" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Wenn aktiviert, wird die Eingabebelegung mit den wiederzugewiesenen Belegungen, die für diesen Core gewählt wurden, überschrieben." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Automatische Konfiguration aktivieren" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Aktiviere automatische Erkennung von Eingabegeräten. Wird versuchen, Controller automatisch zu erkennen (Plug-and-Play)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, "Zeitlimit für Belegung" @@ -1678,10 +1574,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Autofeuer-Frequenz" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Beschreibt, nach wie vielen Einzelbildern eine Taste mit aktiviertem Turbo-Modus erneut gedrückt wird." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Autofeuer-Haltedauer" @@ -1690,18 +1582,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE, "Beschreibt, wie lange eine Taste mit aktivierem Turbo-Modus 'gedrückt' wird. Dieser Wert wird in der Anzahl der Einzelbilder angegeben." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Tastenkürzel belegen" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "Konfiguriere Hotkey-Einstellungen." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Port für Benutzer %u" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, "Steuerung für diesen Port konfigurieren." @@ -1720,10 +1604,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Verwende die selbe Steuerung für das Menü und die Spiele. Betrifft nur Tastatur." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Vertausche OK- und Zurück-Tasten im Menü" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, "Vertausche die Tasten für 'OK' und 'Abbrechen'. Wenn deaktiviert, wird die japanische Tastenbelegung verwendet; wenn aktiviert, wird die westliche Tastenbelegung verwendet." @@ -1743,22 +1623,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Controller-Tastenkombination für Menü" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Controller-Tastenkombination, mit der das Menü aufgerufen wird." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Zeitraffer ein-/ausschalten" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Zeitraffer (halten)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Zeitlupe" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Spielstand laden" @@ -1767,10 +1631,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Zustand (Savestate) abspeichern" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Vollbildmodus ein-/ausschalten" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "RetroArch beenden" @@ -1787,14 +1647,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Zurückspulen" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Videoaufzeichnung starten/beenden" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Pause/weiter" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Einzelbildvorlauf" @@ -1811,82 +1663,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Vorheriger Shader" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Cheat-Index +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Cheat-Index -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Cheat ein-/ausschalten" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Erstelle Bildschirmfoto" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Audio stumm-/lautschalten" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Bildschirmtastatur ein-/ausschalten" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Zwischen Spieler- und Beobachter-Modus wechseln" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Hotkeys aktivieren" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Lautstärke +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Lautstärke -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "Nächstes Overlay" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Datenträger einlegen/auswerfen" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Nächster Datenträger" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "Vorheriger Datenträger" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Mauszeiger einfangen/loslassen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Spielfokus ein-/ausschalten" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Menü aufrufen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Aufnahme starten/stoppen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Streamen starten/stoppen" - ) /* Settings > Input > Port # Binds */ @@ -1902,18 +1686,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "Geräteindex" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Alle zuordnen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Standard-Belegung wiederherstellen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Speichere Autokonfiguration" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, "Maus-Index" @@ -1934,22 +1706,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "Start-Knopf" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Steuerkreuz nach oben" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "Steuerkreuz nach unten" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Steuerkreuz nach links" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Steuerkreuz nach rechts" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "A-Knopf (rechts)" @@ -2036,10 +1792,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "Leeren Core laden, wenn Core beendet wird" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Einige Cores haben eine eigene Abschalt-Funktion. Wenn aktiviert, wird der Core daran gehindert, RetroArch zu beenden. Stattdessen wird ein Dummy-Core geladen." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "Cores automatisch starten" @@ -2052,25 +1804,15 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Überprüft, ob eventuell benötigte Firmware vorhanden ist, bevor versucht wird, Inhalte zu laden." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Erlaube Bildrotation" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Erlaubt Cores, die Bildrotation zu setzen. Wenn deaktiviert, werden Anfragen nach der Bildrotation deaktiviert. Nützlich für Bildschirme, die manuell gedreht werden sollen." - ) /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Einstellungen beim Beenden speichern" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Speichere Änderungen an der Konfigurationsdatei beim Beenden." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Lädt inhaltsspezifische Core-Einstellungen automatisch" @@ -2102,18 +1844,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Sortiere Speicherdaten in Ordnern" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Speichere Speicherdaten in Ordnern ab, die nach dem verwendeten Core benannt sind." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Sortiere Zustandsdaten in Ordnern" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "Speichere Spielstände in Ordnern ab, die nach dem verwendeten Core benannt sind." @@ -2130,30 +1860,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "Intervall für automatisches Speichern des SaveRAM" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Speichere den Inhalt des nicht-flüchtigen Save-RAM in regelmäßigen Abständen. Diese Einstellung ist standardmäßig deaktiviert. Das Speicherintervall wird in Sekunden angegeben. Ein Wert von 0 deaktiviert das automatische Speichern." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Automatische Indexierung von Spielständen" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Wenn ein Zustand (Savestate) gespeichert wird, wird der Zustands-Index automatisch erhöht, bevor der Spielstand gespeichert wird. Wenn Inhalt geladen wird, wird automatisch der höchste existierende Spielstand-Index gewählt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Zustand automatisch speichern" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Speichere den aktuellen Zustand automatisch, wenn RetroArch beendet wird. RetroArch wird diesen Spielstand automatisch laden, wenn 'Spielstand automatisch laden' aktiviert ist." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Zustand automatisch laden" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, "Lade den zuletzt gespeicherten Zustand beim Start automatisch." @@ -2162,10 +1872,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, "Zustands-Miniaturansichten" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Zeige Miniaturansichten von Spielständen im Menü an." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE, "Speicherdaten im Verzeichnis des Inhalts speichern" @@ -2208,22 +1914,10 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Zeige versteckte Dateien und Ordner" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Zeige versteckte Dateien und Ordner im Dateimanager an." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "Unbekannte Dateierweiterungen filtern" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Zeige nur Dateien mit unterstützten Dateierweiterungen im Dateibrowser an." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "Verwende eingebauten Medienplayer" @@ -2243,22 +1937,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "Verwalte die Einstellungen für die Rückspul-Funktion." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Maximale Ausführgeschwindigkeit" - ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, "Die maximale Geschwindigkeit, mit der Inhalt im Vorlauf-Modus dargestellt wird (z.B. 5x für 60 Inhalt mit 60 Bildern/sek => Begrenzung auf 300 Bilder/sek). Wenn 0x gewählt ist, ist die Vorlauf-Geschwindigkeit unbegrenzt." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Zeitlupen-Verhältnis" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "Im Zeitlupen-Modus wird der Inhalt um diesen Faktor verlangsamt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, "Bildwiederholrate im Menü begrenzen" @@ -2274,28 +1956,12 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "Zurückspulen (Rewind) aktivieren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Genauigkeit des Zurückspulens (Rewind)" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Wenn eine bestimmte Anzahl von Einzelbildern zurückgespult wird, kannst Du mehrere Einzelbilder auf einmal zurückspulen und damit die Zurückspul-Geschwindigkeit erhöhen." - ) /* Settings > Frame Throttle > Frame Time Counter */ /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "Aufnahmequalität" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Lade Aufnahme-Konfiguration..." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, "Wende Filter auf Aufnahme an" @@ -2316,14 +1982,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "Streamingmodus" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Streamingqualität" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Streamtitel" - ) /* Settings > On-Screen Display */ @@ -2403,6 +2061,8 @@ MSG_HASH( "Skalierung aller Bedienelemente des Overlays." ) + + /* Settings > On-Screen Display > Video Layout */ @@ -2420,10 +2080,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Bildwiederholrate anzeigen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Zeigt die aktuelle Bildwiederholrate auf dem Bildschirm an." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW, "Zeige die aktuelle Anzahl an Einzelbildern an" @@ -2440,10 +2096,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Schriftart für Bildschirm-Benachrichtigungen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Wähle eine andere Schriftart für Bildschirm-Benachrichtigungen." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "Schritftgröße der Bildschirm-Benachrichtigungen" @@ -2503,14 +2155,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Menü bearbeiten" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Zeige/verberge Elemente auf dem Menübildschirm" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Menü" @@ -2523,10 +2167,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "Zeige erweiterte Einstellungen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Zeige erweiterte Einstellungen für erfahrene Benutzer (standardmäßig ausgeblendet)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "Aktiviere Kiosk-Modus" @@ -2551,10 +2191,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "Springe zum Anfang und/oder Ende, wenn die Grenzen einer Liste horizontal oder vertikal erreicht werden." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausiere, wenn das Menü aktiv ist" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Wenn deaktiviert, wird der Inhalt im Hintergrund weiterlaufen, wenn das RetroArch-Menü aufgerufen wird." @@ -2563,18 +2199,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Maus-Unterstützung" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Aktiviere Maussteuerung im Menü." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Touch-Unterstützung" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Aktiviere Touch-Steuerung im Menü." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "Multithreading" @@ -2583,10 +2211,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "Führe Aufgaben im Hintergrund aus." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Nicht im Hintergrund ausführen" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pausiere das Spiel, wenn RetroArch nicht das aktive Fenster ist." @@ -2603,10 +2227,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "UI-Companion aktivieren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "UI-Companion beim Hochfahren starten" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Menüleiste" @@ -2618,10 +2238,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Spielmenü" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Zeige oder verstecke Elemente aus dem Spielmenü." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Zeige 'Core laden'" @@ -2686,10 +2302,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Zeige den Reiter 'Einstellungen' im Hauptmenü an" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Passwort zum Aktivieren des Reiters 'Einstellungen' festlegen" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "Wird vor dem Verstecken der Einstellungen ein Passwort vergeben, wird es später möglich sein, den Reiter wiederherzustellen, in dem die Funktion 'Aktiviere den Reiter 'Einstellungen' ausgewählt und das Passwort dort eingegeben wird." @@ -2907,22 +2519,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Menü-Skalierungsfaktor" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Menü-Hintergrundbild" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Wähle ein Bild aus, das als Menü-Hintergrundbild verwendet werden soll." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Hintergrundbild-Transparenz" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Ändere die Transparenz des Hintergrundbildes." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Framebuffer-Transparenz" @@ -3013,58 +2613,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "Server-Passwort" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Das Passwort, das für die Verbindung zum Netplay-Host verwendet werden soll. Wird nur im Host-Modus verwendet." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "Server-Passwort für Beobachtermodus" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Das Passwort, das für die Verbindung zum Netplay-Host mit Beobachter-Privilegien verwendet wird. Wird nur im Host-Modus verwendet." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "Im Beobachtermodus starten" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Lege fest, ob Netplay im Beobachtermodus starten soll." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "Erlaube Slave-Modus für Clients" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Lege fest, ob Verbindungen im Slave-Modus erlaubt werden. Clients im Slave-Modus benötigen zwar sehr wenig Rechenleistung, werden jedoch durch Netzwerk-Latenz erheblich beeinträchtigt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "Verbiete Clients, die nicht im Slave-Modus laufen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Lege fest, ob Verbindungen verboten werden, die nicht den Slave-Modus nutzen. Nicht empfohlen, außer für sehr schnelle Netzwerke mit sehr schwachen Geräten." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "Netplay ohne Savestates" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Lege fest, ob Netplay in einem Modus ohne Savestates läuft. Wenn aktiviert, ist ein sehr schnelles Netwerk nötig. Da kein Rücklauf erfolgt, läuft das Spiel flüssiger." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "Netplay-Synchronisation prüfen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Die Häufigkeit in Einzelbildern, mit der Netplay überprüfen wird wird, ob der Host und der Client miteinander synchronisiert sind." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "Eingabeverzögerung" @@ -3097,18 +2669,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Port für Netzwerk-Befehle" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Netzwerk-Controller aktivieren" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Netzwerk-Remote-Port" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Aktiviere Fernsteuerung für Benutzer %d" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdin-Befehle" @@ -3151,10 +2711,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Verlaufliste aktivieren" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Aktiviere Playlist für kürzlich geöffnete Inhalte." @@ -3225,10 +2781,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Sprache" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Legt die Sprache der Benutzeroberfläche fest." - ) /* Settings > User > Privacy */ @@ -3259,10 +2811,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, "Retro-Errungenschaften" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Retro Achievements (Errungenschaften-Dienst). Besuche http://retroachievements.org für weitere Informationen." - ) /* Settings > User > Accounts > RetroAchievements */ @@ -3270,10 +2818,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "Benutzername" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Gib den Benutzernamen deines Errungenschaften-Kontos ein." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "Passwort" @@ -3299,10 +2843,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ASSETS_DIRECTORY, "Speichere alle heruntergeladenen Dateien in diesem Verzeichnis." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Dieser Ort wird standardmäßig durchsucht, wenn das Menü nach ladbaren Inhalten wie Assets sucht." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "Dynamische Hintergrundbilder" @@ -3323,10 +2863,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "Dateibrowser" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Lege das Startverzeichnis für den Dateibrowser fest." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "Konfigurationen" @@ -3411,18 +2947,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "Aufnahme-Konfigurationen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Aufnahme-Konfigurationen werden in diesem Verzeichnis abgelegt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Overlays" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Verzeichnis, in dem alle Overlays abgelegt werden." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, "Bildschirmfotos" @@ -3435,18 +2963,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "Automatische Konfiguration von Controllern" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Wenn ein Controller eingesteckt wird, wird er automatisch konfiguriert, sofern eine passende Konfigurationsdatei in diesem Verzeichnis vorhanden ist." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "Tastenbelegungen" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Speichere alle wiederzugewiesenen Tastenbelegungen in diesem Verzeichnis." - ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY, "Speichere alle Playlists in diesem Verzeichnis." @@ -3511,14 +3031,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Beendet eine aktive Netplay-Verbindung." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Aktualisieren" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Suche nach neuen Räumen." - ) /* Netplay > Host */ @@ -3563,10 +3075,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Cores" - ) /* Playlist > Playlist Item */ @@ -3609,10 +3117,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Aktueller Core" - ) /* Playlist Item > Information */ @@ -3917,10 +3421,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "Shader-Durchläufe" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Erhöhe oder verringere die Anzahl der Shader-Durchläufe. Du kannst für jeden Shader-Durchlauf einen eigenen Shader festlegen und dessen Skalierung und Filterung ändern." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCALE, "Skalierung" @@ -3940,10 +3440,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "Core-Voreinstellung speichern" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Speichere die aktuellen Shader-Einstellungen als Standard-Einstellung für diesen Core." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "Spiel-Voreinstellung speichern" @@ -4081,10 +3577,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "Entlädt" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Keine Stromquelle" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "" @@ -4101,10 +3593,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "RetroPad mit Analogsticks" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, "Bildschirmfoto" @@ -4282,10 +3770,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Aktiviere den Reiter 'Einstellungen'" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Aktiviert den Reiter 'Einstellungen'. Ein Neustart wird benötigt, damit der Reiter angezeigt wird." - ) /* XMB: Settings Options */ @@ -4293,10 +3777,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "Band" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Band (vereinfacht)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Schnee (vereinfacht)" @@ -4536,10 +4016,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Benutzer" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Verwende eingebauten Bildbetrachter" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "Maximale Anzahl von Zwischenbildern" @@ -4655,10 +4131,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Audio/Video-Fehlerbehebung" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Ändert virtuelles Controller-Overlay" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Inhalt laden" @@ -4924,10 +4396,6 @@ MSG_HASH( MSG_UPNP_FAILED, "Portzuordnung fehlgeschlagen" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Es wurden keine Argumente übergeben, außerdem ist kein Menü vorhanden - zeige Hilfe an..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "Lege Datenträger in Laufwerksschublade ein" @@ -5934,14 +5402,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "Touch-Eingabe aktivieren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Controller-Eingabe auf Tastatur legen" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Typ der Keyboard-Controller-Abbildung" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "Kleine Tastatur aktivieren" diff --git a/intl/msg_hash_el.h b/intl/msg_hash_el.h index 60ab8f882e..7dc10f17e4 100644 --- a/intl/msg_hash_el.h +++ b/intl/msg_hash_el.h @@ -26,7 +26,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Εικόνα" + "Εικόνες" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, @@ -36,6 +36,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, "Βίντεο" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, + "Διαδικτυακό Παιχνίδι" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, "Εισαγωγή περιεχομένου" @@ -49,7 +53,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, - "Γρήγορα πρόσβαση σε όλες τις σχετικές ρυθμίσεις παιχνιδιού." + "Γρήγορη πρόσβαση σε όλες τις σχετικές ρυθμίσεις παιχνιδιού." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_LIST, @@ -57,7 +61,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_LIST, - "Επιλέξτε ποιον πυρήνα θα χρησιμοποιήστε." + "Επιλέξτε ποιον πυρήνα θα χρησιμοποιήσετε." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST, @@ -71,10 +75,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_DISC, "Φόρτωση Δίσκου" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LOAD_DISC, - "Φόρτωση φυσικού δίσκου πολυμέσων. Θα πρέπει να έχει επιλεγεί ο πυρήνας (Φόρτωση Πυρήνα) που θες να χρησιμοποιήσεις για το δίσκο." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB, "Λίστες Αναπαραγωγής" @@ -88,21 +88,17 @@ MSG_HASH( "Σάρωση Περιεχομένου" ) MSG_HASH( - MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Σάρωση περιεχομένου και προσθήκη στην βάση δεδομένων." + MENU_ENUM_LABEL_VALUE_SHOW_WIMP, + "Εμφάνιση Μενού Επιφάνειας Εργασίας" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_WIMP, - "Εμφάνιση Μενού Επιφάνεις Εργασίας" + MENU_ENUM_SUBLABEL_SHOW_WIMP, + "Ανοίγει το παραδοσιακό μενού επιτραπέζιων υπολογιστών." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, "Απενεργοποίηση Λειτουργίας Παιδιού" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Απενεργοποίηση Λειτουργίας Παιδιού. Απαιτείται Επανεκκίνηση." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, "Διαδικτυακός Ενημερωτής" @@ -117,7 +113,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY, - "Συμμετοχή ή δημιουργία μίας συνεδρίας netplay." + "Συμμετοχή ή δημιουργία μίας συνεδρίας διαδικτυακού παιχνιδιού." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS, @@ -178,10 +174,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, "Εγκατάσταση ή Επαναφορά ενός Πυρήνα" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Εγκατάσταση πυρήνα ή ανάκτηση από των κατάλογο των ληφθέντων." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, "Έναρξη Επεξεργαστή Βίντεο" @@ -216,10 +208,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, "Αγαπημένα" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Περιεχόμενο που έχετε προσθέσει στα 'Αγαπημένα' θα εμφανίζεται εδώ." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Μουσική" @@ -230,7 +218,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Εικόνα" + "Εικόνες" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, @@ -271,10 +259,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, "Ενημέρωση Βασικών Στοιχείων" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Ενημέρωση Προφίλ Joypad" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Ενημέρωση Κωδικών" @@ -409,6 +393,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Κατάργηση αυτού του πυρήνα από τον δίσκο." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Διαγραφή Αντιγράφου Ασφαλείας" + ) /* Main Menu > Information > System Information */ @@ -492,10 +480,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, "Υποστήριξη Γραμμής Εντολών Δικτύου" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Υποστήριξη Χειριστηρίου Δικτύου" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, "Υποστήριξη Cocoa" @@ -730,6 +714,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING, "Βαθμολογία TGDB" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_FAMITSU_MAGAZINE_RATING, + "Βαθμολογία του Περιοδικού Famitsu" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_EDGE_MAGAZINE_REVIEW, "Kριτική του Περιοδικού Edge" @@ -942,10 +930,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Περιηγητής Αρχείων" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Προσαρμογή ρυθμίσεων εξερευνητή αρχείου." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, "Περιορισμός Καρέ" @@ -1045,17 +1029,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "Οδηγός Εισαγωγής" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Οδηγός Εισόδου προς χρήση. Ανάλογα με τον οδηγό βίντεο, ίσως αλλάξει αναγκαστικά ο οδηγός εισαγωγής." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Οδηγός Joypad" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Οδηγός Joypad προς χρήση." + "Χειριστήριο" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1090,12 +1066,12 @@ MSG_HASH( "Οδηγός Κάμερας προς χρήση." ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, - "Οδηγός Wi-Fi" + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Οδηγός Bluetooth προς χρήση." ) MSG_HASH( - MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Οδηγός Wi-Fi προς χρήση." + MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, + "Οδηγός Wi-Fi" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1184,10 +1160,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "Εισαγωγή Μαύρων Καρέ" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Εισάγει ένα μαύρο καρέ ανάμεσα στα καρέ. Χρήσιμο για χρήστες με οθόνες 120Hz που θέλουν να παίξουν περιεχόμενο στα 60Hz χωρίς 'φαντάσματα' στην εικόνα." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, "Ενεργοποίηση Στιγμιότυπου Οθόνης Κάρτας Γραφικών" @@ -1371,18 +1343,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "Προτιμώμενη Θέση Άξωνα X Αναλογίας Οθόνης" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Προτιμώμενη απόκλειση οπτικής γωνίας για τον ορισμό της θέσης του άξωνα X της οπτικής γωνίας. Αυτό αγνοείται εάν έχεται ενεργοποιήσει την 'Ακέραια Κλίμακα'. Τότε θα κεντραριστεί αυτόματα." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, "Προτιμώμενη Θέση Άξωνα Y Αναλογίας Οθόνης" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Προτιμώμενη απόκλειση οπτικής γωνίας για τον ορισμό της θέσης του άξωνα Y της οπτικής γωνίας. Αυτό αγνοείται εάν έχεται ενεργοποιήσει την 'Ακέραια Κλίμακα'. Τότε θα κεντραριστεί αυτόματα." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Προτιμώμενο Πλάτος Αναλογίας Οθόνης" @@ -1403,10 +1367,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Περικοπή Υπερσάρωσης (Επαναφόρτωση)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Αφαιρεί μερικά pixel γύρω από την εικόνα όπου εθιμικά οι προγραμματιστές άφηναν κενά ή και που περιέχουν άχρηστα pixel." - ) /* Settings > Video > Synchronization */ @@ -1426,10 +1386,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "Προσαρμοστικό Vsync" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "Το V-Sync είναι ενεργό μέχρι τα καρέ να πέσουν χαμηλότερα από τα αναγραφόμενα.\n Με αυτόν το τρόπο θα μειωθεί το stuttering όταν οι επιδόσεις χαμηλώνουν ενώ ταυτόχρονα είναι ενεργειακά πιο αποδοτικό." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "Καθυστέρηση Καρέ" @@ -1663,6 +1619,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, "Ενεργοποίηση ή απενεργοποίηση ήχου μενού." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, + "Ενεργοποίηση Ήχου 'ΟΚ'" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, + "Ενεργοποίηση Ήχου της Ακύρωσης" + ) /* Settings > Input */ @@ -1674,14 +1638,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Μέγιστος αριθμός χρηστών που υποστηρίζεται από το RetroArch." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Τύπος Συμπεριφοράς Συγκέντρωσης" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Επιρροή του πως γίνεται η συγκέντρωση εισόδου μέσα στο RetroArch. Ο ορισμός σε 'Νωρίς' ή 'Αργά' μπορεί να έχει ως αποτέλεσμα μικρότερη καθυστέρηση με τις ρυθμίσεις σας." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Ενεργοποίηση Αυτόματης Διαμόρφωσης" @@ -1715,17 +1671,21 @@ MSG_HASH( "Λειτουργία Turbo" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Σύνδεση Πλήκτρων Εντολών" + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_DEFAULT_BUTTON, + "Προκαθορισμένο Πλήκτρο για Τούρμπο" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS, + "Μενού Χειριστηρίων" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, + "Αλλαγή Ρυθμίσεων Μενού Χειριστηρίων." ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "Διαμόρφωση ρυθμίσεων πλήκτρων εντολών." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Σύνδεση Πλήκτρων Εισόδου Χρήστη %u" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, "Διαμόρφωση χειρισμών για αυτόν τον χρήστη." @@ -1737,6 +1697,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIBRATE_ON_KEYPRESS, "Δόνηση με το πάτημα πλήκτρου" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION, + "Ενεργοποίηση Δόνησης Συσκευής (Για Υποστηριζόμενους Πυρήνες)" + ) /* Settings > Input > Menu Controls */ @@ -1748,10 +1712,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Χρήση του ίδιου χειρισμού για το μενού και το παιχνίδι. Εφαρμόζεται στο πληκτρολόγιο." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Εναλλαγή Κουμπιών Επιβεβαίωσης & Ακύρωσης Στο Μενού" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, "Εναλλαγή πλήτρκων για Επιβεβαίωση/Ακύρωση. Απενεργοποιημένο είναι ο Ιαπωνικός προσανατολισμός, ενεργοποιημένος είναι ο δυτικός προσανατολισμός." @@ -1771,25 +1731,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Συνδιασμός Πλήκτρων Χειριστηρίου για Άνοιγμα Μενού" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Συνδιασμός κουμπιών χειριστηρίου για την εμφάνιση του μενού." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Γρήγορη κίνηση" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Παύση γρήγορης κίνησης" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Αργή κίνηση" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Παύση αργής κίνησης" + "Αργή Κίνηση (Πατημένο)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, @@ -1799,10 +1743,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Αποθήκευση κατάστασης" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Πλήρης οθόνη" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Έξοδος από το RetroArch" @@ -1819,10 +1759,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Επιστροφή" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Παύση" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Επαναφορά παιχνιδιού" @@ -1835,85 +1771,25 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Προηγούμενη σκίαση" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Κατάλογος απάτης +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Κατάλογος απάτης -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Απάτες" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Λήψη Στιγμιότυπου" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Σίγαση Ήχου" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Πληκτρολόγιο οθόνης" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Εναλλαγή κατάστασης παιχνιδιού/θεατή Netplay" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Ενεργοποίηση πλήκτρων εντολών" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Ένταση +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Ένταση -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "Επόμενο επικάλλυμα" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Εξαγωγή δίσκου" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Επόμενος δίσκος" + "Επόμενος Δίσκος" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "Προηγούμενος δίσκος" + "Προηγούμενος Δίσκος" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Κλείδωμα ποντικιού" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Εστίαση παιχνιδιού" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Μενού επιφάνειας" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Μενού" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Εγγραφή" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Απευθείας Μετάδοση" + MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, + "Υπηρεσία Τεχνητής Νοημοσύνης" ) /* Settings > Input > Port # Binds */ @@ -1930,17 +1806,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "Κατάλογος Συσκευών" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Σύνδεση Όλων" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Επαναφορά Συνδέσεων Όλων" + "Επαναφορά στο Προεπιλεγμένο Χειρισμό" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Αποθήκευση Αυτόματης Διαμόρφωσης" + "Αποθήκευση Προφίλ Χειριστηρίου" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -1964,19 +1836,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "D-pad πάνω" + "Σταυρός Κατεύθυνσης Επάνω" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "D-pad κάτω" + "Σταυρός Κατεύθυνσης Κάτω" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "D-pad αριστερό" + "Σταυρός Κατεύθυνσης Αριστερά" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "D-pad δεξί" + "Σταυρός Κατεύθυνσης Δεξιά" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2108,6 +1980,8 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHECK_FOR_MISSING_FIRMWARE, "Έλεγχος για απών Firmware Πριν την Φόρτωση" ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Επίτρεψη περιστροφής" @@ -2115,14 +1989,6 @@ MSG_HASH( /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Απόθηκευση Διαμόρφωσης στην Έξοδο" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Αποθήκευση αλλαγών στο αρχείο διαμόρφωσης κατά την έξοδο." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Φόρτωση Επιλογών Πυρήνα Βάση Συγκεκριμένου Περιεχομένου Αυτόματα" @@ -2159,8 +2025,8 @@ MSG_HASH( "Διάστημα Αυτόματης Αποθήκευσης SaveRAM" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Αυτόματη Φόρτωση Κατάστασης" + MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, + "Αυτόματη Αποθήκευση Κατάστασης" ) /* Settings > Logging */ @@ -2172,10 +2038,6 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Εμφάνιση Κρυφών Αρχείων και Φακέλων" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "Φιλτράρισμα άγνωστων επεκτάσεων" @@ -2199,10 +2061,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "Διαχειρίζεται τις ρυθμίσεις επαναφοράς." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Μέγιστη Ταχύτητα" - ) /* Settings > Frame Throttle > Rewind */ @@ -2210,10 +2068,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "Ενεργοποίηση Επιστροφής" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Βαθμός Λεπτομέρειας Επιστροφής" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, "Μέγεθος Ενδιάμεσης Μνήμης Επιστροφής (MB)" @@ -2228,10 +2082,6 @@ MSG_HASH( /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "Ποιότητα Εγγραφής" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD, "Χρήση Εγγραφής Κάρτας Γραφικών" @@ -2240,18 +2090,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "Μέσο Απευθείας Μετάδοσης" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Ποιότητα Απευθείας Μετάδοσης" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Τίτλος Απευθείας Μετάδοσης" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "Σύνδεσμος Απευθείας Μετάδοσης" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, "Θύρα UDP Απευθείας Μετάδοσης" @@ -2343,6 +2181,8 @@ MSG_HASH( "Κλίμακα όλων των στοιχείων του επικαλλύματος." ) + + /* Settings > On-Screen Display > Video Layout */ @@ -2356,10 +2196,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Εμφάνιση μηνυμάτων οθόνης." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Αυτόματη Κλίμακα Γραφικών Προσθέτων" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, "Αυτόματη αλλαγή μεγέθους διακοσμημένων ειδοποιήσεων, δεικτών και χειρισμών βάση της τρέχουσας κλίμακας μενού." @@ -2368,10 +2204,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Προβολή Ρυθμού Καρέ" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Εμφανίζει τον τρέχων ρυθμό καρέ ανά δευτερόλεπτο στην οθόνη." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Εμφάνιση Στατιστικών" @@ -2380,10 +2212,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Εμφάνιση τεχνικών στατιστικών στην οθόνη." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Συμπερίληψη Λεπτομερειών Μνήμης" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Γραμματοσειρά Ειδοποιήσεων" @@ -2419,14 +2247,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Προβολές" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Προβολή ή απόκρυψη στοιχείων στην οθόνη του μενού." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Εμφάνιση" @@ -2447,10 +2267,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_KIOSK_MODE_PASSWORD, "Εισαγωγή Κωδικού για Απενεργοποίηση της Παιδικής Λειτουργίας" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Παύση όταν ενεργοποιείται το μενού" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Εάν απενεργοποιηθεί το περιεχόμενο θα συνεχίσει να τρέχει στο παρασκήνιο όταν το μενού του RetroArch είναι ανοικτό." @@ -2463,10 +2279,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Υποστήριξη Αφής" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Μην εκτελείτε στο παρασκήνιο" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Παύση παιχνιδιού όταν το RetroArch δεν είναι το ενεργό παράθυρο." @@ -2475,14 +2287,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Γραμμή Μενού" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Ενεργοποίηση μενού επιφάνειας εργασίας (επανεκκίνηση)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Εμφάνιση μενού επιφάνειας εργασίας κατά την εκκίνηση" - ) /* Settings > User Interface > Views */ @@ -2574,10 +2378,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Προβολή καρτέλας ρυθμίσεων μέσα στο μενού." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Ορισμός Κωδικού Για Την Ενεργοποίηση Της Καρτέλας Ρυθμίσεων" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_FAVORITES, "Προβολή Καρτέλας Αγαπημένων" @@ -2751,14 +2551,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Συντελεστής Κλίμακας Μενού" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Εφαρμόζει έναν γενικό συντελεστή κλίμακας κατά την απεικόνιση του μενού. Μπορεί να χρησιμοποιηθεί για να αυξήσει ή να μειώσει το μέγεθος του περιβάλλοντος χρήστη." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Φόντο" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Αδιαφάνεια φόντου" @@ -2770,6 +2562,14 @@ MSG_HASH( /* Settings > AI Service */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE, + "Υπηρεσία Τεχνητής Νοημοσύνης (AI)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, + "Ενεργοποιεί την υπηρεσία μόλις πατηθεί το πλήκτρο Τεχνητής Νοημοσύνης που αντιστοιχεί." + ) /* Settings > Accessibility */ @@ -2782,6 +2582,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "Ενεργοποίηση Επιτευγμάτων" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, + "Κερδίστε επιτεύγματα σε κλασικά παιχνίδια. Για περισσότερες πληροφορίες, επισκεφθείτε τη σελίδα https://retroachievements.org" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "Σκληροπυρηνική Λειτουργία" @@ -2808,7 +2612,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "Να αποθηκευθεί αυτόματα ένα στιγμιότυπο οθόνης (screenshot) μόλις ολοκληρωθεί ένα επίτευγμα." + "Αυτόματη λήψη στιγμιότυπου οθόνης (Screenshot) όταν ένα επίτευγμα υλοποιηθεί." ) /* Settings > Network */ @@ -2841,10 +2645,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUEST_DEVICE_I, "Αίτηση Συσκευής %u" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Χειριστήριο Δικτύου" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "Εντολές stdin" @@ -2875,10 +2675,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Ενεργοποίηση Λίστας Ιστορικού" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Ενεργοποίηση ή απενεργοποίηση λίστας πρόσφατων για παιχνίδια, εικόνες, μουσική και βίντεο." @@ -2891,10 +2687,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Περιορισμός καταχωρήσεων στην λίστα πρόσφατων για παιχνίδια, εικόνες, μουσική και βίντεο." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Μέγεθος Λίστας Αγαπημένων" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, "Περιορισμός του αριθμού καταχωρίσεων στην λίστα αγαπημένων. Μόλις φτάσει το όριο, οι νέες προσθήκες θα αποτρέπονται μέχρι οι παλιές να αφαιρεθούν. Ορίζοντας την τιμή σε -1 επιτρέπει 'απεριόριστες' (99999) καταχωρήσεις. ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Μειώνοντας την τιμή θα διαγράψει ήδη υπάρχ[...]" @@ -2911,18 +2703,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "Πυρήνας:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Χρόνος Παιχνιδιού:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "Τελευταίο Παιχνίδι:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Διαχείριση Λίστας Παιχνιδιών" - ) /* Settings > Playlists > Playlist Management */ @@ -2969,10 +2753,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Γλώσσα" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Ορίζει την γλώσσα του περιβάλλοντος." - ) /* Settings > User > Privacy */ @@ -2997,7 +2777,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Υπηρεσία RetroAchievements. Για περισσότερες πληροφορίες επισκεφθείτε το http://retroachievements.org" + "Κερδίστε επιτεύγματα σε κλασικά παιχνίδια. Για περισσότερες πληροφορίες, επισκεφθείτε τη σελίδα http://retroachievements.org" ) /* Settings > User > Accounts > RetroAchievements */ @@ -3006,10 +2786,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "Όνομα Χρήστη" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Εισάγεται το όνομα χρήστη του λογαριασμού σας στο RetroAchievements." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "Κωδικός" @@ -3103,10 +2879,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Επικάλλυμα" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Ορίζει ένα ευρετήριο όπου τα επικαλλύματα αποθηκεύονται για εύκολη πρόσβαση." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, "Διάταξη Βίντεο" @@ -3153,7 +2925,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_CLIENT, - "Ενεργοποιεί το netplay ως πελάτης." + "Ενεργοποιεί το διαδικτυακό παιχνίδι ως πελάτης." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_DISCONNECT, @@ -3163,14 +2935,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Αποσυνδέει μία ενεργή σύνδεση Netplay." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Ανανέωση Λίστας Δωματίων" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Σάρωση για νέα δωμάτια." - ) /* Netplay > Host */ @@ -3180,7 +2944,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ENABLE_HOST, - "Ενεργοποιεί το netplay ως οικοδεσπότης (εξυπηρετητής)." + "Ενεργοποιεί το διαδικτυακό παιχνίδι ως οικοδεσπότης (Διακομιστής)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_DISABLE_HOST, @@ -3213,6 +2977,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST, "Χειροκίνητη Σάρωση" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST, + "Σάρωση με δυνατότητα ρύθμισης παραμέτρων με βάση τα ονόματα αρχείων του περιεχομένου. Το περιεχόμενο δεν είναι απαραίτητο να ταιριάζει με τη βάση δεδομένων." + ) /* Import content > Scan File */ @@ -3227,10 +2995,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Πυρήνας" - ) /* Playlist > Playlist Item */ @@ -3273,10 +3037,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Τρέχων πυρήνας" - ) /* Playlist Item > Information */ @@ -3491,10 +3251,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS, "Αποθήκευση Αρχείου Απάτης Ως" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "Διαγραφή όλων των κωδικών" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, "Αυτόματη Εφαρμογή Απατών Κατά την Φόρτωση Παιχνιδιού" @@ -3518,10 +3274,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_START_OR_RESTART, "Αριστερά/Δεξιά για αλλαγή μεγέθους bit" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Αριστερά/Δεξιά για αλλαγή τιμής" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS, "Αριστερά/Δεξιά για αλλαγή τιμής" @@ -3574,18 +3326,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, "Εξαγωγή Δίσκου" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Ανοίγει μία εικονική θύρα δίσκου και αφαιρεί τον τωρινά φορτωμένο δίσκο. ΣΗΜΕΙΩΣΗ: Εάν το RetroArch έχει ρυθμιστεί να κάνει παύση ενώ το μενού είναι ενεργοποιημένο, μερικοί πυρήνες μπορεί να μην σημειώσουν τις αλλαγές εκτός και αν το περιεχόμενο συνεχιστεί για μερικά δευτερόλ[...]" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "Εισαγωγή Δίσκου" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Εισάγει τον δίσκο που αντιστοιχεί στον 'Δείκτη Τρέχοντος Δίσκου' και κλείνει την εικονική θύρα δίσκου. ΣΗΜΕΙΩΣΗ: Εάν το RetroArch έχει ρυθμιστεί να κάνει παύση ενώ το μενού είναι ενεργοποιημένο, μερικοί πυρήνες μπορεί να μην σημειώσουν τις αλλαγές εκτός και αν το περιεχόμενο συ[...]" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, "Φόρτωση Νέου Δίσκου" @@ -3690,6 +3434,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Δεν βρέθηκαν ρυθμίσεις." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Δεν βρέθηκαν συσκευές Bluetooth" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Δεν βρέθηκαν δίκτυα." @@ -3781,10 +3529,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "Ξεφορτίζει" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Καμία πηγή" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<Χρήση αυτού του ευρετηρίου>" @@ -3801,10 +3545,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "<Κανένα>" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "RetroPad με Αναλογικό" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNKNOWN, "Άγνωστο" @@ -3817,6 +3557,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWN_SELECT, "Κάτω (Σταυρός Κατεύθυνσης) + Select" ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_CHANGES, + "Αλλαγές" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_DOES_NOT_CHANGE, + "Δεν αλλάζει" + ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_PORT_16, "Όλα" @@ -3945,22 +3693,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "Ποντίκι 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Ροδέλα Πάνω" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Ροδέλα Κάτω" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Ροδέλα Αριστερά" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Ροδέλα Δεξιά" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "Νωρίς" @@ -4087,6 +3819,10 @@ MSG_HASH( /* RGUI: Settings Options */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_SINC, + "Sinc/Lanczos3 (Αργό)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_9_CENTRE, "16:9 (Στο Κέντρο)" @@ -4182,10 +3918,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Ενεργοποίηση Καρτέλας Μενού" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Ενεργοποιεί την καρτέλα Ρυθμίσεις. Χρειάζεται επανεκκίνηση για να εμφανιστεί η καρτέλα." - ) /* XMB: Settings Options */ @@ -4193,10 +3925,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "Κορδέλλα" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Κορδέλλα (απλοποιημένη)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Απλό Χιόνι" @@ -4314,6 +4042,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW, "Κίτρινο" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE, + "ΑΝΕΝΕΡΓΟ" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DISABLED, + "ΑΝΕΝΕΡΓΟ" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_SMALL, "Λίστα (Μικρά)" @@ -4322,6 +4058,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_MEDIUM, "Λίστα (Μεσαία)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DISABLED, + "ΑΝΕΝΕΡΓΟ" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_SMALL, "Λίστα (Μικρά)" @@ -4341,10 +4081,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_INFO, "Πληροφορίες" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_FILE, + "&Αρχείο" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_LOAD_CORE, "&Φόρτωση Πυρήνα..." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT, + "&Eπεξεργασία" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT_SEARCH, + "&Αναζήτηση" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW, + "&Προβολή" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, "&Options..." @@ -4385,6 +4141,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_LOADING_CORE, "Φόρτωση Πυρήνα..." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_NAME, + "Όνομα" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CORE_VERSION, "Έκδοση" @@ -4441,6 +4201,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_DOES_NOT_EXIST, "Το αρχείο δεν υπάρχει." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW, + "Προβολή" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS, + "Εικονίδια" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_LIST, + "Λίστα" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, "Εκκαθάριση" @@ -4592,6 +4364,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "Δεν βρέθηκαν λίστες αναπαραγωγής." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Συνδέθηκε" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONLINE, + "Σε σύνδεση" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PORT, "Θύρα" @@ -4628,10 +4408,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Χρήστης" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Χρήση Ενσωματωμένου Προβολέα Εικόνων" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "Μέγιστες εικόνες swapchain" @@ -4655,10 +4431,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "Αυτόματη Αναλογία Οθόνης" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Ψευδώνυμο (lan): %s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "Κατάσταση" @@ -4723,10 +4495,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Αντιμετώπιση Προβλημάτων Ήχου/Βίντεο" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Αλλαγή Επικαλύμματος Εικονικού Χειριστηρίου" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Φόρτωση Περιεχομένου" @@ -4936,10 +4704,6 @@ MSG_HASH( MSG_UPNP_FAILED, "Αποτυχία Καθορισμού Θυρών" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Δεν παρασχέθηκε διαφωνία και δεν υπάρχει ενσωματωμένο μενού, εμφάνιση βοήθειας..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "Τοποθέτηση δίσκου στην μονάδα δίσκου" @@ -5268,10 +5032,18 @@ MSG_HASH( MSG_VERSION_OF_LIBRETRO_API, "Έκδοση του libretro API" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Οκληρώθηκε η σάρωση Bluetooth." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Η σάρωση του Wi-Fi ολοκληρώθηκε." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Έλεγχος για συσκευές bluetooth..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Σάρωση ασύρματων δικτύων..." @@ -5324,6 +5096,10 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "Σάρωση: " ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Αποτυχία Εγκατάστασης Πυρήνα: " + ) /* Lakka */ @@ -5370,6 +5146,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Ενεργοποίηση Απαλού Φίλτρου" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Σκανάρισμα και ζεύξη συσκευών bluetooth." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, "Οδηγός Wi-Fi" diff --git a/intl/msg_hash_es.c b/intl/msg_hash_es.c index 4c9013e053..38dbe074a2 100644 --- a/intl/msg_hash_es.c +++ b/intl/msg_hash_es.c @@ -1,7 +1,7 @@ /* RetroArch - A frontend for libretro. * Copyright (C) 2011-2017 - Daniel De Matteis * Copyright (C) 2018 - Alfredo Monclus - * Copyright (C) 2019 - Víctor González Fraile + * Copyright (C) 2019-2020 - Víctor González Fraile * * 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- @@ -690,6 +690,7 @@ int msg_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) snprintf(s, len, "Opacidad de la superposición."); break; +#ifdef HAVE_VIDEO_LAYOUT case MENU_ENUM_LABEL_VIDEO_LAYOUT_ENABLE: snprintf(s, len, "Activa o desactiva el diseño de vídeo actual."); @@ -703,6 +704,7 @@ int msg_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) "Los diseños pueden contener múltiples vistas.\n" "Selecciona una."); break; +#endif case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT: snprintf(s, len, "Tiempo de espera para asignar una función\n" @@ -721,6 +723,14 @@ int msg_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) snprintf(s, len, "Escala de la superposición."); break; + case MENU_ENUM_LABEL_OVERLAY_CENTER_X: + snprintf(s, len, + "Compensación horizontal de la superposición."); + break; + case MENU_ENUM_LABEL_OVERLAY_CENTER_Y: + snprintf(s, len, + "Compensación vertical de la superposición."); + break; case MENU_ENUM_LABEL_AUDIO_OUTPUT_RATE: snprintf(s, len, "Frecuencia de muestreo de la salida de audio."); @@ -1937,9 +1947,11 @@ int msg_hash_get_help_es_enum(enum msg_hash_enums msg, char *s, size_t len) case MENU_ENUM_LABEL_VIDEO_CTX_SCALING: snprintf(s, len, #ifdef HAVE_ODROIDGO2 - "RGA scaling and bicubic filtering. May break widgets." + "Escalado RGA y filtrado bicúbico.\n" + "Podría inutilizar los widgets." #else - "Hardware context scaling (if available)." + "Escalado según contexto del hardware\n" + "(si existe)." #endif ); break; diff --git a/intl/msg_hash_es.h b/intl/msg_hash_es.h index c4b42388bd..1557baf121 100644 --- a/intl/msg_hash_es.h +++ b/intl/msg_hash_es.h @@ -34,11 +34,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Vídeo" + "Vídeos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, - "Salas de juego en red" + "Juego en red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, @@ -53,7 +53,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, - "Accede rápidamente a todas las opciones del juego." + "Accede rápidamente a todos los ajustes pertinentes para la partida." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_LIST, @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Carga un medio físico. Antes de nada, deberías cargar el núcleo que pretendes utilizar." + "Carga un medio físico. Primero tendrás que cargar el núcleo que pretendes utilizar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -109,7 +109,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Abre el menú de escritorio." + "Abre el menú tradicional de escritorio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Desactiva el modo quiosco. Es necesario reiniciar." + "Desactiva el modo quiosco (es necesario reiniciar)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -125,7 +125,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ONLINE_UPDATER, - "Descarga componentes y contenido adicional para RetroArch." + "Descarga complementos, componentes y contenidos de RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY, @@ -153,7 +153,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, - "Configuración" + "Archivo de configuración" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, @@ -200,7 +200,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Instala o restaura un núcleo desde la carpeta de descargas." + "Instala o restaura un núcleo mediante el directorio de Descargas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -215,7 +215,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_FAVORITES, - "Carpeta inicial" + "Directorio inicial" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST, @@ -250,7 +250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Imagen" + "Imágenes" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, @@ -258,7 +258,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Vídeo" + "Vídeos" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, @@ -285,7 +285,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_UPDATER_LIST, - "Descargar el paquete completo de miniaturas para el sistema seleccionado." + "Descarga el paquete completo de miniaturas para el sistema seleccionado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PL_THUMBNAILS_UPDATER_LIST, @@ -293,7 +293,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Descarga las miniaturas concretas de cada elemento de la lista de reproducción seleccionada." + "Descarga las miniaturas de los elementos de la lista de reproducción seleccionada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -301,7 +301,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES, - "Actualizar archivos de información de núcleo" + "Actualizar archivos de información de núcleos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, @@ -309,7 +309,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Actualizar perfiles de control" + "Actualizar perfiles de mandos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -344,7 +344,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_INFORMATION, - "Muestra información pertinente a la aplicación/núcleo." + "Muestra información pertinente a la aplicación o núcleo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISC_INFORMATION, @@ -445,14 +445,50 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Necesario" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Proteger núcleo instalado" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Evita que se modifique el núcleo instalado actualmente. Esta opción puede servir para evitar actualizaciones no deseadas en caso de que un contenido requiera una versión específica del núcleo (p. ej.: sets de ROMs arcade)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, - "Borrar núcleo" + "Eliminar núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Elimina este núcleo del disco." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Hacer copia de seguridad del núcleo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Crea una copia de seguridad del núcleo instalado." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Restaurar copia de seguridad" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Instala una versión anterior del núcleo a partir de una lista de copias de seguridad archivadas." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Eliminar copia de seguridad" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Elimina un archivo de la lista de copias de seguridad archivadas." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[Automático]" + ) /* Main Menu > Information > System Information */ @@ -486,7 +522,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CPU_CORES, - "La cantidad de núcleos que tiene la CPU." + "Indica la cantidad de núcleos que tiene la CPU." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER, @@ -538,7 +574,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Soporte de mando en red" + "Soporte de mandos por red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -594,7 +630,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_UDEV_SUPPORT, - "Soporte de Udev" + "Soporte de udev" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENVG_SUPPORT, @@ -741,7 +777,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_SELECTION, - "Seleccionar bases de datos" + "Seleccionar base de datos" ) /* Main Menu > Information > Database Manager > Information */ @@ -764,7 +800,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DEVELOPER, - "Desarrollador" + "Desarrolladora" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ORIGIN, @@ -832,7 +868,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, - "Soporte de analógico" + "Soporte de control analógico" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RUMBLE, @@ -901,7 +937,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, - "Salir" + "Cerrar RetroArch" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_KEYBOARD, @@ -916,7 +952,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, - "Cambia los controladores usados por el sistema." + "Cambia los controladores del sistema." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS, @@ -932,7 +968,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, - "Controles" + "Entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_SETTINGS, @@ -952,7 +988,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_SETTINGS, - "Cambia las opciones de los núcleos." + "Cambia los ajustes de los núcleos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS, @@ -968,7 +1004,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVING_SETTINGS, - "Cambia las opciones de guardado." + "Cambia los ajustes de guardado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS, @@ -976,7 +1012,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, - "Cambia las opciones de registro." + "Cambia los ajustes de registro." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, @@ -992,7 +1028,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, - "Cambia las opciones de rebobinado, aceleración de fotogramas y cámara lenta." + "Cambia los ajustes de rebobinado, avance rápido y cámara lenta." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, @@ -1000,7 +1036,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_SETTINGS, - "Cambia las opciones de grabación." + "Cambia los ajustes de grabación." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS, @@ -1008,7 +1044,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, - "Cambia las opciones de notificaciones, controles en pantalla y marcos." + "Cambia los ajustes de las notificaciones y las superposiciones de controles en pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS, @@ -1016,7 +1052,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, - "Cambia las opciones de la interfaz de usuario." + "Cambia los ajustes de la interfaz de usuario." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS, @@ -1024,7 +1060,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS, - "Cambia la configuración del servicio de IA (Traducción/texto a voz/etc.)." + "Cambia los ajustes del servicio de IA (traducción/texto a voz/etc.)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_SETTINGS, @@ -1032,7 +1068,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_SETTINGS, - "Cambia la configuración del narrador de accesibilidad." + "Cambia los ajustes del narrador de accesibilidad." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS, @@ -1040,7 +1076,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS, - "Cambia las opciones de energía." + "Cambia los ajustes de energía." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RETRO_ACHIEVEMENTS_SETTINGS, @@ -1048,7 +1084,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, - "Cambia las opciones de los logros." + "Cambia los ajustes de los logros." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS, @@ -1056,7 +1092,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, - "Configura las opciones del servidor y de red." + "Configura los ajustes del servidor y de red." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS, @@ -1064,7 +1100,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, - "Cambia las opciones de las listas de reproducción." + "Cambia los ajustes de las listas de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_SETTINGS, @@ -1072,15 +1108,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_SETTINGS, - "Cambia las opciones de cuentas, nombre de usuario y el idioma." + "Cambia los ajustes de cuentas, del nombre de usuario y del idioma." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS, - "Carpeta" + "Directorio" ) MSG_HASH( MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, - "Cambia las carpetas predeterminadas para los archivos." + "Cambia los directorios predeterminados para los archivos." ) /* Settings > Drivers */ @@ -1091,7 +1127,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Controlador de entrada a usar. El controlador de vídeo puede forzar uno distinto." + "Selecciona el controlador de entrada que se utilizará. Algunos controladores de vídeo pueden forzar el uso de otro distinto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, @@ -1099,7 +1135,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Controlador de mando a usar." + "Selecciona el controlador de mandos que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1107,11 +1143,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DRIVER, - "Controlador de vídeo a usar." + "Selecciona el controlador de vídeo que se utilizará." ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DRIVER, - "Controlador de audio a usar." + "Selecciona el controlador de audio que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER, @@ -1119,7 +1155,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_DRIVER, - "Remuestreador de audio a usar." + "Selecciona el controlador de remuestreo de audio que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CAMERA_DRIVER, @@ -1127,23 +1163,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, - "Controlador de cámara a usar." + "Selecciona el controlador de cámara que se utilizará." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Selecciona el controlador de Bluetooth que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, - "Controlador wifi" + "Wifi" ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Controlador wifi a usar." + "Selecciona el controlador de wifi que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, - "Localización" + "Ubicación" ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_DRIVER, - "Controlador de localización a usar." + "Selecciona el controlador de ubicación que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DRIVER, @@ -1151,7 +1191,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DRIVER, - "Controlador de menú a usar." + "Selecciona el controlador de menú que se utilizará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_DRIVER, @@ -1159,22 +1199,22 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORD_DRIVER, - "Controlador de grabación a usar." + "Selecciona el controlador de grabación que se utilizará." ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_DRIVER, - "Controlador MIDI a usar." + "Selecciona el controlador de MIDI que se utilizará." ) /* Settings > Video */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCHRES_SETTINGS, - "SwitchRes en CRT" + "SwitchRes para CRT" ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCHRES_SETTINGS, - "Generar señales de vídeo de baja resolución para pantallas CRT." + "Genera señales de vídeo a baja resolución para pantallas CRT." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_OUTPUT_SETTINGS, @@ -1206,7 +1246,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS, - "Cambia los ajustes de escalado de vídeo." + "Cambia los ajustes del escalado de vídeo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS, @@ -1230,7 +1270,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_THREADED, - "Mejora el rendimiento a costa de perder latencia y tener algunos tirones. Usar solo si no puede obtener máxima velocidad de otra manera." + "Mejora el rendimiento a costa de aumentar la latencia y los tirones en la señal de vídeo. Utilizar solo si no puedes obtener la máxima velocidad de otra manera." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, @@ -1238,15 +1278,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Introduce fotogramas negros intermedios. Útil para usuarios con pantallas de 120 Hz que quieren eliminar el efecto ghosting en contenidos que se reproducen a 60 Hz." + "Introduce un fotogramas negros intermedios. Es útil para eliminar el efecto «ghosting» (fantasma) en pantallas con una frecuencia de actualización elevada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, - "Capturas de pantalla de GPU" + "Capturar pantalla mediante la GPU" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT, - "Las capturas de pantalla mostrarán la imagen con shaders de la GPU si es posible." + "Si es posible, las capturas de pantalla mostrarán la imagen con los shaders aplicados por la GPU." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SMOOTH, @@ -1254,15 +1294,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SMOOTH, - "Aplica un ligero desenfoque a la imagen para eliminar los bordes de los píxeles. Esta opción apenas afecta al rendimiento." + "Aplica un ligero desenfoque a la imagen para suavizar los bordes de los píxeles. Esta opción apenas afecta al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY, - "Retraso de shaders automáticos" + "Retrasar carga automática de shaders" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_DELAY, - "Reduce la carga automática de shaders en milisegundos. Puede sortear los fallos gráficos al utilizar programas de captura de pantalla." + "Retrasa la carga automática de shaders en milisegundos. Puede sortear los fallos gráficos provocados al utilizar programas de captura de pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER, @@ -1270,7 +1310,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FILTER, - "Aplica un filtro de vídeo mediante la CPU.\nNota: Puede tener un alto coste de rendimiento. Algunos filtros solo funcionan con núcleos que usan 16 o 32 bits de color." + "Aplica un filtro de vídeo mediante la CPU.\nNOTA: Puede afectar en gran medida al rendimiento. Algunos filtros solo funcionan con núcleos que usen 16 o 32 bits de color." ) /* Settings > Video > CRT SwitchRes */ @@ -1281,7 +1321,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, - "Para pantallas CRT. Intenta usar la resolución y frecuencia de actualización exactas del núcleo/juego." + "Solo para pantallas CRT. Intentará utilizar la resolución y frecuencia de actualización exactas del núcleo/juego." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, @@ -1297,15 +1337,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_X_AXIS_CENTERING, - "Modifica esta opción si la imagen no está centrada en la pantalla." + "Modifica esta opción si la imagen no está correctamente centrada en la pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, - "Usar frecuencia personalizada" + "Usar frecuencia de actualización personalizada" ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION_USE_CUSTOM_REFRESH_RATE, - "Utiliza una frecuencia de actualización personalizada especificada en el archivo de configuración." + "Si es necesario, utiliza una frecuencia de actualización personalizada especificada en el archivo de configuración." ) /* Settings > Video > Output */ @@ -1324,7 +1364,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ROTATION, - "Fuerza una cierta rotación de la pantalla. La rotación se añade a la impuesta por el núcleo." + "Fuerza una rotación específica de la pantalla. Se añadirá a la impuesta por el núcleo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_ORIENTATION, @@ -1332,7 +1372,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SCREEN_ORIENTATION, - "Fuerza una cierta orientación de la pantalla respecto a la del sistema operativo." + "Fuerza una orientación específica de la pantalla respecto a la del sistema operativo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_INDEX, @@ -1340,7 +1380,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, - "Frecuencia de actualización" + "Frecuencia de actualización vertical" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, @@ -1360,7 +1400,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_POLLED, - "Muestra la frecuencia de actualización según el controlador de pantalla." + "Muestra la frecuencia de actualización que declara el controlador de vídeo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_SRGB_DISABLE, @@ -1368,14 +1408,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FORCE_SRGB_DISABLE, - "Fuerza la desactivación del soporte de FBO sRGB. Ayuda a algunos controladores OpenGL de Intel que tienen problemas de vídeo en Windows." + "Fuerza la desactivación del soporte de FBO sRGB. Activar esta opción puede mitigar problemas de vídeo con el soporte de FBO sRGB en ciertos controladores OpenGL de Intel en Windows." ) /* Settings > Video > Fullscreen Mode */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN, - "Iniciar en pantalla completa" + "Iniciar a pantalla completa" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN, @@ -1399,11 +1439,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_Y, - "Alto en pantalla completa" + "Altura en pantalla completa" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y, - "Establece el alto en pantalla completa. En caso de no asignar un valor, se usará la resolución del escritorio." + "Establece la altura a pantalla completa. En caso de no asignar un valor, se usará la resolución del escritorio." ) /* Settings > Video > Windowed Mode */ @@ -1414,7 +1454,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, - "Cambia el tamaño de la ventana para que sea relativo al núcleo. También puedes fijar un tamaño de ventana más abajo." + "Cambia el tamaño de la ventana de forma relativa al tamaño de pantalla asignado por el núcleo. También puedes indicar un alto y ancho de pantalla personalizados más abajo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY, @@ -1430,7 +1470,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION, - "Recuerda el tamaño y la posición de la ventana, ignorando el valor de Escala en ventana." + "Recuerda el tamaño y la posición de la ventana, ignorando la configuración del ajuste Escala en ventana." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH, @@ -1438,26 +1478,26 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, - "Establece el ancho de la ventana." + "Establece un ancho personalizado para la ventana." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT, - "Alto de la ventana" + "Altura de la ventana" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, - "Establece el alto de la ventana." + "Establece una altura personalizada para la ventana." ) /* Settings > Video > Scaling */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALE_INTEGER, - "Escalar usando enteros" + "Escalar usando números enteros" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, - "Limita el escalado de vídeo a múltiplos enteros. El tamaño base dependerá de la geometría del sistema y la relación de aspecto. Si la opción «Forzar aspecto» está desactivada, los valores X e Y serán escalados individualmente." + "Limita el escalado de vídeo a múltiplos enteros. El tamaño base dependerá de la geometría indicada por el sistema y la relación de aspecto. Si la opción «Forzar relación de aspecto» está desactivada, los valores X e Y serán escalados individualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, @@ -1465,11 +1505,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO, - "Configurar relación de aspecto" + "Relación de aspecto personalizada" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, - "Valor en coma flotante (ancho/alto) de la relación de aspecto si su valor es «Personalizado»." + "Indica el valor en coma flotante (ancho/alto) de la relación de aspecto si se ha elegido la opción «Personalizado»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, @@ -1477,7 +1517,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Diferencial de posición respecto al eje X de la pantalla. Si «Escala con valores enteros» está activado, este valor será ignorado y la imagen se centrará automáticamente." + "Indica el diferencial de posición respecto al eje X de la pantalla. Si «Escalar usando números enteros» está activado, este valor será ignorado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1485,7 +1525,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Diferencial de posición respecto al eje X de la pantalla. Si «Escala con valores enteros» está activado, este valor será ignorado y la imagen se centrará automáticamente." + "Indica el diferencial de posición respecto al eje Y de la pantalla. Si «Escalar usando números enteros» está activado, este valor será ignorado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1493,15 +1533,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, - "Ancho personalizado de la imagen. Se utiliza si el valor de la relación de aspecto es «Personalizado»." + "Ancho personalizado de la imagen. Este valor se utilizará si se ha elegido la opción «Personalizado» para la relación de aspecto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "Relación de aspecto personalizada (alto)" + "Relación de aspecto personalizada (altura)" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "Altura personalizada de la imagen. Se utiliza si el valor de la relación de aspecto es «Personalizado»." + "Altura personalizada de la imagen. Este valor se utilizará si se ha elegido la opción «Personalizado» para la relación de aspecto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, @@ -1509,7 +1549,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Corta unos píxeles de los bordes de la imagen que los desarrolladores suelen dejar en blanco o con basura." + "Corta unos píxeles de los bordes de la imagen que los desarrolladores suelen dejar en blanco o con basura (es necesario reiniciar)." ) /* Settings > Video > Synchronization */ @@ -1520,11 +1560,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VSYNC, - "Sincroniza la señal de vídeo de la tarjeta gráfica con la frecuencia de actualización de pantalla. Recomendado." + "Sincroniza la señal de vídeo de la tarjeta gráfica con la frecuencia de actualización de pantalla. Se recomienda su uso." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SWAP_INTERVAL, - "Intervalo de intercambio de Vsync" + "Intervalo de intercambio de la sincronía vertical" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, @@ -1532,11 +1572,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, - "Vsync adaptativa" + "Sincronía vertical adaptativa" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "La sincronía vertical estará activada hasta que el rendimiento sea inferior al necesario para mantener la frecuencia de actualización de la pantalla.\nEsta opción reduce los tirones provocados al bajar los FPS y tiene una mayor eficiencia energética." + "La sincronía vertical se mantendrá activada hasta que el rendimiento sea inferior al necesario para mantener la frecuencia de actualización de la pantalla. Puede reducir los tirones provocados al caer el rendimiento por debajo de la velocidad real y mejorar la eficiencia energética." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1544,7 +1584,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, - "Reduce la latencia a costa de un mayor riesgo de tirones. Agrega un retraso posterior a la Vsync en milisegundos." + "Reduce la latencia a costa de tener un mayor riesgo de tirones. Agrega un retraso posterior a la sincronía vertical en milisegundos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC, @@ -1552,15 +1592,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, - "Fuerza la sincronía entre CPU y GPU. Reduce la latencia a costa del rendimiento." + "Fuerza la sincronía entre CPU y GPU. Reduce la latencia a costa de perder rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES, - "Fotogramas para sincronía estricta de GPU" + "N.º de fotogramas para sincronía estricta de GPU" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES, - "Ajusta la cantidad de fotogramas que puede predecir la CPU de la GPU al utilizar la sincronía estricta de GPU." + "Ajusta la cantidad de fotogramas que puede utilizar la CPU para predecir la GPU al utilizar la sincronía estricta de GPU." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, @@ -1568,7 +1608,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Evita desviarse del timing que solicita el núcleo. Usar con pantallas con una frecuencia de actualización variable, G-Sync, FreeSync." + "Evita desviarse del intervalo solicitado por el núcleo. Usar con pantallas con una frecuencia de actualización variable (G-Sync, FreeSync, HDMI 2.1 VRR)." ) /* Settings > Audio */ @@ -1599,7 +1639,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_SETTINGS, - "Cambia las opciones de MIDI." + "Cambia los ajustes de MIDI." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, @@ -1607,7 +1647,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, - "Cambia las opciones del mezclador de audio." + "Cambia los ajustes del mezclador de audio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUNDS, @@ -1631,7 +1671,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_FASTFORWARD_MUTE, - "Silenciar sonido al acelerar" + "Silenciar sonido al usar el avance rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_FASTFORWARD_MUTE, @@ -1643,15 +1683,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_VOLUME, - "Ajusta el volumen de audio (en dB). 0 dB es el volumen normal, sin ganancia alguna." + "Amplifica el volumen de audio (en dB). 0 dB es el volumen normal, sin ganancia alguna." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, - "Volumen del mezclador de audio (dB)" + "Ganancia del mezclador de audio (dB)" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME, - "Volumen del mezclador de audio global (en dB). 0 dB es el volumen normal, sin ganancia alguna." + "Amplifica el volumen global del mezclador de audio (en dB). 0 dB es el volumen normal, sin ganancia alguna." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, @@ -1667,7 +1707,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, - "Permite que el controlador WASAPI tome el control exclusivo del dispositivo de audio. Si se desactiva esta opción se usará el modo compartido." + "Permite que el controlador WASAPI tome el control exclusivo del dispositivo de audio. Si se desactiva esta opción se usará el modo compartido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT, @@ -1698,7 +1738,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DEVICE, - "Fuerza el dispositivo a usar por el controlador de audio. Depende del controlador." + "Fuerza el dispositivo que utilizará el controlador de audio. Este ajuste depende del controlador." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, @@ -1713,19 +1753,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY, - "Calidad del muestreo de audio" + "Calidad de remuestreo" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY, - "Baja este valor para favorecer el rendimiento y la latencia a costa de la calidad o súbelo para mejorar la calidad a costa de perder rendimiento y latencia." + "Reduce este valor para favorecer el rendimiento y la latencia a costa de perder calidad del audio o auméntalo para mejorarla a costa de perder rendimiento y latencia." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE, - "Frecuencia de muestreo (Hz)" + "Frecuencia de salida (Hz)" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_RATE, - "Velocidad de muestreo de la salida de audio." + "Ajusta la frecuencia de muestreo de la salida de audio." ) /* Settings > Audio > Synchronization */ @@ -1736,7 +1776,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, - "Sincroniza el audio. Recomendado." + "Sincroniza el audio. Se recomienda su uso." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, @@ -1744,7 +1784,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW, - "Ajusta la variación máxima en la velocidad de audio. Un valor alto permite grandes cambios de timing a costa de alterar el tono del audio (p. ej.: núcleos PAL en pantallas NTSC)." + "Ajusta la variación máxima en la velocidad de entrada de audio. Un valor alto permite grandes cambios de cadencia a costa de alterar el tono del audio (p. ej.: ejecutar un núcleo PAL en una pantalla NTSC)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, @@ -1752,7 +1792,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, - "Ayuda a suavizar imperfecciones de timing al sincronizar audio y vídeo. Cuidado: Si se desactiva esta opción, es casi imposible tener una sincronía correcta." + "Suaviza las imperfecciones de ritmo al sincronizar audio y vídeo. Cuidado: Si se desactiva esta opción, es casi imposible tener una sincronía correcta." ) /* Settings > Audio > MIDI */ @@ -1771,7 +1811,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_OUTPUT, - "Selecciona un dispositivo de salida." + "Selecciona el dispositivo de salida." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_VOLUME, @@ -1790,23 +1830,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, - "Inicia la reproducción de audio. Al finalizar, será borrado de la memoria." + "Inicia la reproducción de la secuencia de audio. Al finalizar, será borrada de la memoria." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_LOOPED, - "Reproducir (Repetir)" + "Reproducir (bucle)" ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_LOOPED, - "Inicia la reproducción de audio. Al finalizar, será reproducido de nuevo." + "Inicia la reproducción de la secuencia de audio. Al finalizar, se volverá a reproducir en bucle." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_SEQUENTIAL, - "Reproducir (Secuencial)" + "Reproducir (secuencialmente)" ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL, - "Inicia la reproducción de audio. Al finalizar, se continuará con el siguiente, útil para álbumes." + "Inicia la reproducción de audio y, cuando se acabe, continuará reproduciendo el siguiente. Sirve para reproducir álbumes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, @@ -1814,7 +1854,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, - "Detiene la reproducción sin borrar el audio de la memoria. Puedes continuar la reproducción." + "Detiene la reproducción de la secuencia de audio sin borrarla de la memoria. Podrás continuar la reproducción seleccionando Reproducir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, @@ -1822,7 +1862,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE, - "Detiene la reproducción y borra el audio de la memoria." + "Detiene la reproducción de la secuencia de audio y la borra de la memoria." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME, @@ -1837,11 +1877,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, - "Mezclador de audio" + "Mezclador" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, - "Reproduce varias pistas de audio a la vez, incluso dentro del menú." + "Reproduce varias secuencias de audio a la vez, incluso dentro del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, @@ -1880,27 +1920,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Reasignar controles en este núcleo" + "Reasignar controles para este núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Al activar esta opción, se utilizará la reasignación de controles para el núcleo actual en vez de la reasignación estándar." + "Ignora la reasignación de entrada general y utiliza una personalizada para el núcleo actual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, - "Activar autoconfiguración" + "Configuración automática" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Activa la detección automática de controles, al estilo «Plug and Play»." + "Configura de forma automática aquellos mandos para los que exista un perfil, a lo Plug-and Play." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, - "Umbral de entrada de los ejes" + "Umbral de entrada de ejes en botones" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BUTTON_AXIS_THRESHOLD, - "Ajusta la distancia a la que debe llegar un eje para que el botón se considere presionado." + "Ajusta la distancia que debe recorrer un eje para que el botón se considere presionado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_DEADZONE, @@ -1912,7 +1952,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, - "Asignar tiempo límite" + "Margen de tiempo de la asignación" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, @@ -1932,7 +1972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Describe el periodo entre pulsación de los botones con turbo (en fotogramas)." + "Indica la duración (en fotogramas) en la que se alternarán los botones con turbo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1976,7 +2016,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Asignar teclas rápidas" + "Teclas rápidas" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -2010,7 +2050,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, - "Usa los mismos controles para el menú y el juego. Esta opción también se aplica al teclado." + "Utiliza los mismos controles para el menú y el juego. Este ajuste también se aplica al teclado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, @@ -2033,184 +2073,356 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Pulsar Salir dos veces" + "Confirmar el cierre de RetroArch" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Pulsa la tecla rápida Salir dos veces para salir de RetroArch." + "Obliga a pulsar la tecla rápida de Cerrar RetroArch dos veces." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Combinación para mostrar el menú" + "Combinación de mando para mostrar el menú" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Asigna una combinación de botones en el mando para mostrar el menú." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Retraso para activar teclas rápidas (en fotogramas)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Añade un retraso en fotogramas antes de bloquear las acciones normales tras empezar a mantener pulsada la tecla Activar teclas rápidas. Permite capturar los controles normales de la tecla Activar teclas rápidas si está asignada a otra acción (p. ej.: RetroPad Select)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Alternar avance rápido" + "Avance rápido (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Alterna entre el avance rápido y la velocidad normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Mantener para avance rápido" + "Avance rápido (mantener)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Activa el avance rápido al mantener pulsado el botón. Al soltarlo, el contenido se ejecutará a velocidad normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Alternar cámara lenta" + "Cámara lenta (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Alterna entre la velocidad a cámara lenta y normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Mantener para cámara lenta" + "Cámara lenta (mantener)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "Activa la cámara lenta al mantener pulsado el botón. Al soltarlo, el contenido se ejecutará a velocidad normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Cargar guardado rápido" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "Carga un guardado rápido de la posición seleccionada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Guardado rápido" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Genera un guardado rápido en la posición seleccionada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Pantalla completa" + "Pantalla completa (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Alterna entre los modos a pantalla completa o en ventana." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Cerrar RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "Cierra RetroArch guardando todos los archivos guardados y de configuración al disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "Siguiente posición de guardado rápido" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "Aumenta el índice de la posición de guardado rápido seleccionada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "Posición de guardado rápido anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "Disminuye el índice de la posición de guardado rápido seleccionada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Rebobinar" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "Rebobina el contenido mientras se mantenga pulsado el botón. Nota: la función de Rebobinado debe estar activada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Grabar repetición de partida" + "Grabar repetición de partida (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "Indica si se guardarán las grabaciones de entrada de las partidas en formato .bsv." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Pausar" + "Pausa (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "Mantiene el contenido en ejecución estando en pausa." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Avanzar fotograma" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "Avanza el contenido un fotograma estando en pausa." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Reiniciar juego" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "Reinicia el contenido actual desde el principio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Siguiente shader" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "Carga y aplica el siguiente preajuste de shaders que se encuentre en la raíz del directorio de shaders de vídeo." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Shader anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "Carga y aplica el preajuste de shaders anterior que se encuentre en la raíz del directorio de shaders de vídeo." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, "Siguiente índice de trucos" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "Aumenta el índice de trucos seleccionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, "Índice de trucos anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "Disminuye el índice de trucos seleccionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Activar truco" + "Trucos (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "Activa o desactiva el truco seleccionado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Capturar pantalla" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "Captura una imagen del contenido actual." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Silenciar audio" + "Silenciar audio (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "Activa o desactiva la salida de audio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Teclado en pantalla" + "Teclado en pantalla (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Activa o desactiva el teclado en pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "Mostrar FPS" + "Mostrar FPS (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "Activa o desactiva el indicador de fotogramas por segundo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Enviar datos de depuración" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Envía información de diagnóstico sobre tu dispositivo y tu configuración de RetroArch a nuestros servidores para su posterior análisis." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "Crear una partida de juego en red" + "Crear servidor de juego en red (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "Activa o desactiva el servidor de juego en red." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Juego en red: cambiar modo juego/espectador" + "Cliente/espectador en juego en red (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "Cambia la sesión actual de juego en red entre los modos de jugador y espectador." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, "Activar teclas rápidas" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "Al asignar una tecla a «Activar teclas rápidas», deberás mantenerla pulsada para que se reconozcan otras teclas rápidas. Permite asignar botones de mandos a funciones de las teclas rápidas sin que afecten a los controles normales." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, "Subir volumen" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Aumenta el volumen de la salida de audio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, "Bajar volumen" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "Reduce el volumen de la salida de audio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, "Siguiente superposición" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT, + "Cambia al siguiente diseño disponible de la superposición en pantalla actual." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Expulsar disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "Si la bandeja de disco virtual está cerrada, abrirla para extraer el disco cargado. En caso contrario, introduce el disco seleccionado y cierra la bandeja." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, "Siguiente disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "Aumenta el índice de disco seleccionado. Nota: La bandeja de disco virtual debe estar abierta." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, "Disco anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "Disminuye el índice de disco seleccionado. Nota: La bandeja de disco virtual debe estar abierta." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Capturar ratón" + "Capturar ratón (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GRAB_MOUSE_TOGGLE, + "Captura o libera el ratón. Al capturarlo, se ocultará el cursor del sistema y quedará confinado a los límites de la ventana de RetroArch, mejorando la entrada relativa del ratón." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Prioridad al juego" + "Dar prioridad al juego (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GAME_FOCUS_TOGGLE, + "Activa o desactiva la prioridad al juego. Cuando el contenido tiene prioridad, se desactivarán las teclas rápidas (el núcleo en ejecución recibirá todas las pulsaciones del teclado) y se capturará el ratón." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Menú de escritorio" + "Menú de escritorio (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_UI_COMPANION_TOGGLE, + "Abre la interfaz asistente de escritorio WIMP (siglas en inglés de ventanas, iconos, menús y puntero)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Mostrar menú" + "Menú (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MENU_TOGGLE, + "Alterna el menú con el contenido en ejecución." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Comenzar/detener grabación" + "Grabar (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "Inicia o detiene la grabación de la sesión actual en un archivo de vídeo local." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Comenzar/detener streaming" + "Streaming (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "Inicia o detiene la transmisión por streaming de la sesión actual a una plataforma de vídeo online." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "Servicio de IA" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "Captura una imagen del contenido actual y traduce o lee en voz alta los textos que contenga. Nota: Es necesario haber activado y configurado el servicio de IA." + ) /* Settings > Input > Port # Binds */ @@ -2228,15 +2440,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Asignar todo" + "Asignar todos los controles" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Asignar valores por defecto" + "Restablecer controles predeterminados" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Guardar autoconfiguración" + "Guardar perfil de mando" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2292,51 +2504,51 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, - "Botón L2 (LT)" + "Botón L2 (gatillo)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, - "Botón R2 (RT)" + "Botón R2 (gatillo)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, - "Botón L3 (Pulsar analógico izq.)" + "Botón L3 (pulsar analógico izq.)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, - "Botón R3 (Pulsar analógico der.)" + "Botón R3 (pulsar analógico der.)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, - "Analógico izq. X+ (derecha)" + "Analógico izdo. X+ (derecha)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, - "Analógico izq. X- (izquierda)" + "Analógico izdo. X- (izquierda)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, - "Analógico izq. Y+ (abajo)" + "Analógico izdo. Y+ (abajo)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, - "Analógico izq. Y- (arriba)" + "Analógico izdo. Y- (arriba)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, - "Analógico der. X+ (derecha)" + "Analógico dcho. X+ (derecha)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, - "Analógico der. X- (izquierda)" + "Analógico dcho. X- (izquierda)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, - "Analógico der. Y+ (abajo)" + "Analógico dcho. Y+ (abajo)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, - "Analógico der. Y- (arriba)" + "Analógico dcho. Y- (arriba)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, @@ -2348,15 +2560,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, - "Arma: Aux A" + "Arma: Aux. A" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, - "Arma: Aux B" + "Arma: Aux. B" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, - "Arma: Aux C" + "Arma: Aux. C" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, @@ -2387,7 +2599,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_ENABLED, - "Reducir latencia de forma predictiva" + "Reducción predictiva de latencia" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, @@ -2403,26 +2615,26 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "Segunda instancia de predicción" + "Usar una segunda instancia para la reducción predictiva" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "Utiliza una segunda instancia del núcleo para predecir los cambios. Previene los problemas de audio causados al cargar guardados rápidos." + "Utiliza una segunda instancia del núcleo RetroArch para predecir cambios. Previene los problemas de audio causados al cargar guardados rápidos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "Ocultar advertencias de predicción" + "Ocultar advertencias de reducción predictiva" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "Oculta el mensaje de advertencia que aparece al usar la reducción de latencia predictiva si el núcleo no es compatible con los guardados rápidos." + "Oculta el mensaje de advertencia que aparece al usar la reducción predictiva si el núcleo no es compatible con los guardados rápidos." ) /* Settings > Core */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT, - "Activar contexto compartido por HW" + "Activar contexto compartido por hardware" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, @@ -2434,15 +2646,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Permite que los núcleos fuercen un controlador de vídeo distinto al que esté en uso." + "Permite que los núcleos cambien el controlador de vídeo a uno ajeno al que se esté utilizando." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, - "Cargar vacío al cerrar núcleo" + "Cargar un núcleo vacío al cerrar un núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Algunos núcleos tienen una opción de apagado. Activa esta opción para evitar que RetroArch se cierre y, en su lugar, cargue un núcleo vacío." + "Algunos núcleos tienen una opción de apagado. Activa esta opción para que RetroArch cargue un núcleo vacío y así evitar que se cierre solo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2456,24 +2668,42 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Verifica que el firmware necesario esté disponible antes de cargar el contenido." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Recargar siempre el núcleo al ejecutar contenido" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Reinicia RetroArch al iniciar un contenido, incluso cuando ya se ha cargado el núcleo solicitado. Puede mejorar la estabilidad del sistema a costa de aumentar los tiempos de carga." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Permitir rotación" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Permite a los núcleos rotar la pantalla. Al desactivar esta opción, se ignorarán las peticiones de rotación. Es útil cuando se puede rotar la pantalla de forma manual." + "Permite que los núcleos roten la pantalla. Al desactivar esta opción, se ignorarán las peticiones de rotación. Sirve para cuando se puede rotar la pantalla de forma manual." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Administrar núcleos" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Ejecuta tareas de mantenimiento en los núcleos instalados (copia de seguridad, eliminación, etc.) de forma local y muestra información de los mismos." ) /* Settings > Configuration */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Guardar configuración al salir" + "Guardar configuración al cerrar RetroArch" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Guarda los cambios en el archivo de configuración al salir." + "Guarda los cambios en el archivo de configuración al cerrar RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2481,11 +2711,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GAME_SPECIFIC_OPTIONS, - "Carga la configuración de núcleos personalizada por defecto al arrancar." + "Carga de forma predeterminada la configuración de núcleos personalizada al arrancar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_OVERRIDES_ENABLE, - "Autocargar archivos de personalización" + "Cargar archivos de personalización automáticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_OVERRIDES_ENABLE, @@ -2493,7 +2723,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_REMAPS_ENABLE, - "Autocargar archivos de reasignación" + "Cargar archivos de reasignación automáticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTO_REMAPS_ENABLE, @@ -2501,7 +2731,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_SHADERS_ENABLE, - "Autocargar ajustes de shaders" + "Cargar preajustes de shaders automáticamente" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GLOBAL_CORE_OPTIONS, @@ -2509,7 +2739,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GLOBAL_CORE_OPTIONS, - "Guarda toda la configuración de los núcleos en un archivo común (retroarch-core-options.cfg). Si se desactiva esta opción, se guardará la configuración de cada núcleo en una carpeta o archivo único por núcleo, dentro de la carpeta «Config» de RetroArch." + "Guarda toda la configuración de los núcleos en un archivo común (retroarch-core-options.cfg). Si se desactiva esta opción, se guardará la configuración de cada núcleo en una carpeta o archivo independientes por cada núcleo en el directorio «Config» de RetroArch." ) /* Settings > Saving */ @@ -2532,7 +2762,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, - "No sobrescribir SaveRAM al cargar un guardado rápido" + "No sobrescribir la SaveRAM al cargar un guardado rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_BLOCK_SRAM_OVERWRITE, @@ -2540,19 +2770,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, - "Intervalo de autoguardados SaveRAM" + "Intervalo entre autoguardados de la SaveRAM" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Guarda automáticamente la memoria no volátil Save RAM a intervalos regulares (en segundos). Esta función se desactiva seleccionando 0." + "Guarda de forma automática la SaveRAM no volátil a intervalos periódicos (en segundos)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Indizar automáticamente la posición" + "Aumentar automáticamente el índice de guardados rápidos" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Al hacer un guardado rápido, se incrementará el índice de forma automática antes de guardar. Al cargar contenido, el índice será el mayor existente." + "Antes de hacer un guardado rápido, se incrementará el índice de guardados rápidos de forma automática. Al cargar un contenidos, se asignará el mayor número disponible del índice." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2560,7 +2790,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Hace un guardado rápido al salir de RetroArch. Se cargará automáticamente si la opción «Cargar guardado rápido automáticamente» está activada." + "Hace un guardado rápido de forma automática al cerrar un contenido. RetroArch lo cargará automáticamente si la opción «Cargar guardado rápido automáticamente» está activada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, @@ -2584,7 +2814,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_FILE_COMPRESSION, - "Escribe los archivos SaveRAM en un formato para archivar. Reduce drásticamente el tamaño del archivo a costa de aumentar (escasamente) los tiempos de guardado y carga. Nota: Solo compatible con núcleos que utilicen la interfaz estándar para SaveRAM de libretro." + "Escribe los archivos SaveRAM en un archivo comprimido. Reduce drásticamente el tamaño del archivo a costa de aumentar (escasamente) los tiempos de guardado y carga. Nota: Solo compatible con núcleos que utilicen la interfaz estándar para SaveRAM de libretro." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_FILE_COMPRESSION, @@ -2592,23 +2822,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_FILE_COMPRESSION, - "Escribe los guardados rápidos en un formato para archivar. Reduce drásticamente el tamaño del archivo a costa de aumentar los tiempos de guardado y carga." + "Escribe los guardados rápidos en un archivo comprimido. Reduce drásticamente el tamaño del archivo a costa de aumentar los tiempos de guardado y carga." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE, - "Escribir partidas guardadas en la carpeta del contenido" + "Escribir archivos de guardado en el directorio del contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATES_IN_CONTENT_DIR_ENABLE, - "Escribir guardados rápidos en la carpeta del contenido" + "Escribir guardados rápidos en el directorio del contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEMFILES_IN_CONTENT_DIR_ENABLE, - "Guardar archivos del sistema en la carpeta del contenido" + "Guardar archivos del sistema en el directorio del contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOTS_IN_CONTENT_DIR_ENABLE, - "Escribir capturas de pantalla en la carpeta del contenido" + "Escribir capturas de pantalla en el directorio del contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_RUNTIME_LOG, @@ -2635,7 +2865,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_VERBOSITY, - "Registra los eventos a la terminal o a un archivo." + "Registra los eventos a una terminal o archivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, @@ -2667,7 +2897,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_TO_FILE_TIMESTAMP, - "Al enviar los registros a un archivo, redirige los registros de cada sesión de RetroArch a un archivo nuevo, marcando su fecha. Al desactivar esta opción se sobrescribirá el archivo de registro cada vez que se reinicie RetroArch." + "Al enviar los registros a un archivo, redirige los registros de cada sesión de RetroArch a un archivo nuevo, marcando su fecha. Si se desactiva esta opción, se sobrescribirá el registro cada vez que se reinicie RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, @@ -2675,7 +2905,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "Activa los contadores de rendimiento para RetroArch y sus núcleos.\nSu información puede ayudar a localizar cuellos de botella en el sistema y a perfilar el rendimiento" + "Activa los contadores de rendimiento en RetroArch y sus núcleos. Su información puede ayudar a localizar cuellos de botella en el sistema y a perfilar el rendimiento." ) /* Settings > File Browser */ @@ -2694,7 +2924,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Muestra únicamente los archivos con extensiones conocidas." + "Muestra en el explorador de archivos únicamente a aquellos archivos que tengan extensiones conocidas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2713,7 +2943,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_REWIND, - "Administra las opciones de rebobinado." + "Administra los ajustes de rebobinado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS, @@ -2721,15 +2951,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS, - "Modifica la configuración del contador de duración de fotogramas (solo se activará al desactivar el vídeo multihilo)." + "Modifica los ajustes del contador de duración de fotogramas (solo funciona al desactivar el vídeo multihilo)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Velocidad máxima de ejecución" + "Velocidad de avance rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, - "Ajusta la velocidad máxima con la que se ejecutará un contenido al usar el avance rápido (p. ej.: 5.0x para un juego de 60 fps = 300 fps). Si el valor es 0, no habrá límite." + "Ajusta la velocidad máxima con la que se ejecutará un contenido al usar el avance rápido (p. ej.: 5.0x para un juego de 60 fps = 300 fps). Si el valor es 0, el avance rápido irá a la máxima velocidad posible (no usará un limitador de FPS)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, @@ -2737,7 +2967,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "Al usar la cámara lenta, el contenido se ralentizará según el factor especificado." + "Ajusta la velocidad a la que se reproducirá el contenido si se utiliza la cámara lenta." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2745,7 +2975,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE, - "Limita los FPS del menú." + "Limita la velocidad de fotogramas dentro del menú." ) /* Settings > Frame Throttle > Rewind */ @@ -2756,15 +2986,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "¿Te has equivocado? Rebobina y vuelve a intentarlo.\nTen en cuenta que afectará al rendimiento." + "Vuelve a un punto anterior de tu partida más reciente. Afectará gravemente al rendimiento de la partida." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Nivel de detalle del rebobinado" + "N.º de fotogramas de rebobinado" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Rebobina un número determinado de fotogramas a la vez para aumentar la velocidad del rebobinado." + "Indica el número de fotogramas que cubrirá cada paso de rebobinado. Un valor elevado aumentará la velocidad del rebobinado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2772,11 +3002,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE, - "Asigna una cantidad de memoria (en MB) a reservar para el búfer de rebobinado. Este valor cambiará la longitud del historial de rebobinado." + "Reserva una cantidad de memoria (en MB) para el búfer de rebobinado. Este valor cambiará la longitud del historial de rebobinado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE_STEP, - "Tamaño del intervalo de ajuste del búfer (MB)" + "Tamaño del búfer de pasos de rebobinado (MB)" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE_STEP, @@ -2795,7 +3025,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, - "Reiniciar tras cargar guardado rápido" + "Reiniciar tras cargar un uardado rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, @@ -2803,7 +3033,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, - "Reiniciar tras guardado rápido" + "Reiniciar tras generar un guardado rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, @@ -2846,7 +3076,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Calidad del stream" + "Calidad de streaming" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, @@ -2854,7 +3084,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Título del stream" + "Título del streaming" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_URL, @@ -2908,7 +3138,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_HIDE_IN_MENU, - "Oculta la superposición en el menú y la vuelve a mostrar al salir." + "Oculta la superposición dentro del menú y la vuelve a mostrar al salir de él." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, @@ -2916,7 +3146,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, - "Muestra las pulsaciones de los controles en pantalla." + "Muestra los botones o teclas pulsados en la superposición." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, @@ -2924,7 +3154,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, - "Selecciona el puerto que se utilizará al activar la opción «Mostrar entradas en la superposición»." + "Selecciona el puerto de escucha que se utilizará al activar la opción Mostrar entradas en la superposición." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, @@ -2936,11 +3166,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_AUTO_ROTATE, - "Autorotar superposición" + "Rotar automáticamente la superposición" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_AUTO_ROTATE, - "Si la superposición lo permite, rotarla para que coincida con la orientación y relación de aspecto de la pantalla." + "Si la superposición lo permite, se rotará automáticamente para que coincida con la orientación y relación de aspecto de la pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY, @@ -2952,15 +3182,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_OPACITY, - "Opacidad" + "Opacidad de superposición" ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_OPACITY, - "Controla la transparencia de la superposición." + "Controla la opacidad de todos los elementos de la superposición." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET, - "Preset" + "Preajuste de superposiciones" ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_PRESET, @@ -2968,11 +3198,29 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_SCALE, - "Escala" + "Escala de superposición" ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_SCALE, - "Controla el tamaño de la superposición." + "Controla la escala de todos los elementos de la superposición." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "Compensación X de superposición" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "Compensa la posición horizontal de todos los elementos de la superposición." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Compensación Y de superposición" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "Compensa la posición vertical de todos los elementos de la superposición." ) /* Settings > On-Screen Display > Video Layout */ @@ -3018,31 +3266,31 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Utiliza animaciones, notificaciones, indicadores y controles con decoración moderna en vez del antiguo sistema de texto simple." + "Utiliza animaciones, notificaciones, indicaciones y controles decorativos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Escala automática de los gráficos de Widgets" + "Escalar widgets gráficos automáticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, - "Cambiar automáticamente el tamaño de las notificaciones, indicadores y controles basados en la escala del menú actual." + "Cambia automáticamente el tamaño de las notificaciones, indicadores y controles según la escala actual del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Escala de los gráficos de Widgets (Pantalla completa)" + "Personalizar escala de widgets gráficos (pantalla completa)" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Aplica un valor a la escala de los gráficos de widgets en modo de pantalla completa. Solo aplica cuando 'Escala automática de los gráficos de Widgets' esta deactivado. Se puede utilizar para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles independientemente del propio menú." + "Aplica un valor de escalado personalizado a los widgets gráficos en el modo a pantalla completa. Solo se utilizará cuando la opción Escalar widgets gráficos automáticamente esté desactivada. Sirve para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles de forma independiente al menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "Escala de los gráficos de Widgets (Ventana)" + "Personalizar escala de widgets gráficos (ventana)" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "Aplica un valor a la escala de los gráficos de widgets en modo ventana. Solo aplica cuando 'Escala automática de los gráficos de Widgets' esta deactivado. Se puede utilizar para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles independientemente del propio menú." + "Aplica un valor de escalado personalizado a los widgets gráficos en el modo ventana. Solo se utilizará cuando la opción Escalar widgets gráficos automáticamente esté desactivada. Sirve para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles de forma independiente al menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, @@ -3050,7 +3298,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, - "Muestra la velocidad de FPS." + "Muestra el número de fotogramas por segundo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, @@ -3066,7 +3314,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW, - "Muestra el contador de fotogramas." + "Muestra en pantalla el contador de fotogramas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, @@ -3074,15 +3322,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, - "Muestra las estadísticas técnicas en pantalla." + "Muestra en pantalla estadísticas técnicas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Incluir datos de memoria" + "Mostrar consumo de memoria" ) MSG_HASH( MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Añade el indicador de memoria usada/total en el contador de FPS/fotogramas." + "Muestra la cantidad de memoria usada y total del sistema." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Notificación al empezar a cargar un contenido" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Muestra una breve animación para indicar que se está cargando un contenido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, @@ -3090,7 +3346,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Selecciona otra fuente de letra para las notificaciones." + "Selecciona la fuente de letra de las notificaciones." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -3106,7 +3362,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_X, - "Especifica la posición sobre el eje X para el texto en pantalla." + "Especifica una posición personalizada del texto en pantalla respecto al eje X." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_POS_Y, @@ -3114,7 +3370,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y, - "Especifica la posición sobre el eje Y para el texto en pantalla." + "Especifica una posición personalizada del texto en pantalla respecto al eje Y." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED, @@ -3153,11 +3409,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Vistas" + "Visibilidad de elementos del menú" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Muestra u oculta elementos del menú." + "Modifica la visibilidad de los elementos del menú de RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -3165,7 +3421,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SETTINGS, - "Ajusta la apariencia del menú." + "Cambia los ajustes de la apariencia del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, @@ -3173,7 +3429,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Muestra opciones avanzadas (ocultas por defecto)." + "Muestra opciones avanzadas para usuarios más expertos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3181,15 +3437,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_ENABLE_KIOSK_MODE, - "Evita que se pueda modificar la configuración." + "Protege la configuración ocultando los ajustes relacionados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_KIOSK_MODE_PASSWORD, - "Establecer contraseña para desactivar modo quiosco" + "Contraseña para desactivar modo quiosco" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_KIOSK_MODE_PASSWORD, - "Al usar una contraseña para activar el modo quiosco, es posible desactivarlo desde el menú principal desde «Desactivar modo quiosco»." + "Al utilizar una contraseña para activar el modo quiosco, será posible desactivarlo desde el menú principal mediante la opción «Desactivar modo quiosco»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_WRAPAROUND, @@ -3197,15 +3453,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, - "Manda la lista de vuelta al principio cuando se llegue al final horizontal o vertical." + "Cuando se llegue al final horizontal o vertical de una lista, volverá al otro extremo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausar al activar el menú" + "Pausar contenido al activar el menú" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, - "Desactiva esta opción para que el contenido siga ejecutándose cuando estés en el menú." + "Desactiva esta opción para que el contenido siga ejecutándose en segundo plano dentro del menú de RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, @@ -3213,7 +3469,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Cierra el menú y reanuda el contenido actual de forma automática tras seleccionar «Guardado rápido» o «Cargar guardado rápido» en el menú rápido. Si se desactiva esta opción, puede mejorar el rendimiento de los guardados rápidos en dispositivos lentos." + "Cierra el menú y reanuda el contenido automáticamente tras guardar o cargar rápidamente la partida. Si se desactiva esta opción, podría mejorar el rendimiento de los guardados rápidos en dispositivos muy lentos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, @@ -3221,7 +3477,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "Cierra automáticamente el menú y reanuda el contenido actual tras seleccionar «Introducir disco» o «Cargar un disco nuevo» en el menú de control de disco." + "Cierra el menú y reanuda el contenido automáticamente tras introducir o cargar un disco nuevo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, @@ -3229,7 +3485,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Permite controlar el menú con el ratón." + "Permite controlar el menú con un ratón." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -3237,19 +3493,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Permite controlar el menú con la pantalla táctil." + "Permite controlar el menú con una pantalla táctil." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, - "Tareas en hilos" + "Tareas multihilo" ) MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, - "Ejecuta otras tareas en un hilo separado." + "Ejecuta otras tareas en un hilo independiente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Pausar al pasar a segundo plano" + "Pausar contenido cuando no esté activo" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -3261,7 +3517,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, - "Los gestores de pantalla utilizan la composición para aplicar efectos visuales o ventanas que no respondan, entre otras cosas." + "Los administradores de ventanas utilizan la composición para aplicar efectos visuales o detectar ventanas que no respondan, entre otras cosas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCROLL_FAST, @@ -3269,7 +3525,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SCROLL_FAST, - "Velocidad máxima del cursor al mantener presionada una dirección para desplazarse." + "Ajusta la velocidad máxima del cursor cuando se mantiene pulsada una dirección para desplazarse por un menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, @@ -3285,11 +3541,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Activar menú de escritorio (reiniciar)" + "Menú de escritorio (es necesario reiniciar)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Mostrar menú de escritorio al arrancar" + "Abrir menú de escritorio al arrancar" ) /* Settings > User Interface > Views */ @@ -3300,15 +3556,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Muestra elementos del menú rápido." + "Modifica la visibilidad de los elementos del menú rápido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, - "Opciones" + "Ajustes" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Muestra elementos de la pantalla de Opciones." + "Modifica la visibilidad de los elementos del menú de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, @@ -3376,11 +3632,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, - "Mostrar Configuración" + "Mostrar Archivo de configuración" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, - "Muestra la opción «Configuración»." + "Muestra la opción «Archivo de configuración»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, @@ -3408,83 +3664,83 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, - "Mostrar pestaña Configuración" + "Mostrar la sección Ajustes" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, - "Muestra la pestaña de configuración en el menú principal." + "Muestra la pestaña de ajustes en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Establecer contraseña para activar la pestaña de opciones" + "Establecer contraseña para activar la sección de Ajustes" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, - "Permite usar una contraseña para ocultar la pestaña de opciones. Esto permite restaurarla desde el menú principal activando «Pestaña de opciones»." + "Permite usar una contraseña para ocultar la sección de Ajustes. Esto permite restaurarla desde el menú principal activando «Pestaña de Ajustes»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_FAVORITES, - "Mostrar pestaña Favoritos" + "Mostrar la sección Favoritos" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES, - "Muestra la pestaña de favoritos en el menú principal." + "Muestra la sección Favoritos en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_IMAGES, - "Mostrar pestaña Imágenes" + "Mostrar la sección Imágenes" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES, - "Muestra la pestaña de imágenes en el menú principal." + "Muestra la sección Imágenes en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_MUSIC, - "Mostrar pestaña Música" + "Mostrar la sección Música" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_MUSIC, - "Muestra la pestaña de música en el menú principal." + "Muestra la sección Música en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO, - "Mostrar pestaña Vídeo" + "Mostrar la sección Vídeo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO, - "Muestra la pestaña de vídeo en el menú principal." + "Muestra la sección Vídeo en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_NETPLAY, - "Mostrar pestaña Juego en red" + "Mostrar la sección Juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_NETPLAY, - "Muestra la pestaña de juego en red en el menú principal." + "Muestra la sección Juego en red en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_HISTORY, - "Mostrar pestaña Historial" + "Mostrar la sección Historial" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_HISTORY, - "Muestra la pestaña de historial en el menú principal." + "Muestra la sección Historial en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_ADD, - "Mostrar pestaña Importar contenido" + "Mostrar la sección Importar contenido" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD, - "Muestra la pestaña de importar contenido en el menú principal." + "Muestra la sección Importar contenido en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_PLAYLISTS, - "Mostrar pestañas de listas de reproducción" + "Mostrar secciones de listas de reproducción" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, - "Muestra las pestañas de las listas de reproducción en el menú principal." + "Muestra secciones con las listas de reproducción en el menú principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, @@ -3516,7 +3772,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE, - "Muestra el nivel de batería actual en el menú." + "Muestra la carga actual de la batería en el menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_ENABLE, @@ -3528,11 +3784,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, - "Mostrar subetiquetas en el menú" + "Mostrar subetiquetas de menús" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Muestra información adicional sobre la entrada de menú seleccionada." + "Proporciona información adicional sobre los elementos del menú." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, @@ -3555,7 +3811,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESTART_CONTENT, - "Mostrar Reiniciar contenido" + "Mostrar Reiniciar (contenido)" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESTART_CONTENT, @@ -3571,7 +3827,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, - "Mostrar Captura de pantalla" + "Mostrar Capturar pantalla" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, @@ -3579,7 +3835,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, - "Mostrar Guardado rápido" + "Mostrar opciones de Guardado rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, @@ -3591,7 +3847,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, - "Muestra las opciones que permiten deshacer las guardados rápidos y las cargas rápidas." + "Muestra las opciones para deshacer los guardados rápidos y las cargas rápidas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, @@ -3687,7 +3943,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS, - "Mostrar opciones de superposición" + "Mostrar opciones de superposiciones" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO_LAYOUT, @@ -3707,11 +3963,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, - "Mostrar Guardar personalizaciones de juego" + "Mostrar Guardar personalizaciones del juego" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, - "Muestra la opción «Guardar personalizaciones de juego»." + "Muestra la opción «Guardar personalizaciones del juego»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, @@ -3738,7 +3994,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS, - "Muestra la opción «Controladores» en la pantalla de Opciones." + "Muestra la opción «Controladores» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO, @@ -3746,7 +4002,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_VIDEO, - "Muestra la opción «Vídeo» en la pantalla de Opciones." + "Muestra la opción «Vídeo» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO, @@ -3754,15 +4010,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AUDIO, - "Muestra la opción «Audio» en la pantalla de Opciones." + "Muestra la opción «Audio» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT, - "Mostrar Controles" + "Mostrar Entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT, - "Muestra la opción «Controles» en la pantalla de Opciones." + "Muestra la opción «Controles» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY, @@ -3770,7 +4026,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LATENCY, - "Muestra la opción «Latencia» en la pantalla de Opciones." + "Muestra la opción «Latencia» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE, @@ -3778,7 +4034,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CORE, - "Muestra la opción «Núcleo» en la pantalla de Opciones." + "Muestra la opción «Núcleo» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CONFIGURATION, @@ -3786,7 +4042,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CONFIGURATION, - "Muestra la opción «Configuración» en la pantalla de Opciones." + "Muestra la opción «Configuración» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_SAVING, @@ -3794,7 +4050,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_SAVING, - "Muestra la opción «Guardado» en la pantalla de Opciones." + "Muestra la opción «Guardado» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LOGGING, @@ -3802,7 +4058,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LOGGING, - "Muestra la opción «Registros» en la pantalla de Opciones." + "Muestra la opción «Registros» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_FRAME_THROTTLE, @@ -3810,7 +4066,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_FRAME_THROTTLE, - "Muestra la opción «Limitador de fotogramas» en la pantalla de Opciones." + "Muestra la opción «Limitador de fotogramas» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING, @@ -3818,7 +4074,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_RECORDING, - "Muestra la opción «Grabación» en la pantalla de Opciones." + "Muestra la opción «Grabación» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ONSCREEN_DISPLAY, @@ -3826,7 +4082,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY, - "Muestra la opción «Información en pantalla» en la pantalla de Opciones." + "Muestra la opción «Información en pantalla» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER_INTERFACE, @@ -3834,7 +4090,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER_INTERFACE, - "Muestra la opción «Interfaz de usuario» en la pantalla de Opciones." + "Muestra la opción «Interfaz de usuario» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AI_SERVICE, @@ -3842,7 +4098,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AI_SERVICE, - "Muestra la opción «Servicio de IA» en la pantalla de Opciones." + "Muestra la opción «Servicio de IA» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_POWER_MANAGEMENT, @@ -3850,7 +4106,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_POWER_MANAGEMENT, - "Muestra la opción «Energía» en la pantalla de Opciones." + "Muestra la opción «Energía» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ACHIEVEMENTS, @@ -3858,7 +4114,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ACHIEVEMENTS, - "Muestra la opción «Logros» en la pantalla de Opciones." + "Muestra la opción «Logros» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK, @@ -3866,15 +4122,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_NETWORK, - "Muestra la opción «Red» en la pantalla de Opciones." + "Muestra la opción «Red» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_PLAYLISTS, - "Mostrar Listas" + "Mostrar Listas de reproducción" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_PLAYLISTS, - "Muestra la opción «Listas de reproducción» en la pantalla de Opciones." + "Muestra la opción «Listas de reproducción» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER, @@ -3882,15 +4138,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER, - "Muestra la opción «Usuario» en la pantalla de Opciones." + "Muestra la opción «Usuario» en la pantalla de Ajustes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY, - "Mostrar Carpeta" + "Mostrar directorio" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DIRECTORY, - "Muestra la opción «Carpeta» en la pantalla de Opciones." + "Muestra la opción «Directorios» en la pantalla de Ajustes." ) /* Settings > User Interface > Appearance */ @@ -3901,15 +4157,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Aplica un valor global a la escala del menú. Se puede usar para aumentar o disminuir el tamaño de la interfaz de usuario." + "Cambia la escala de los elementos de la interfaz de usuario del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Fondo" + "Imagen de fondo" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Selecciona una imagen para usar de fondo en el menú." + "Selecciona una imagen para usar como fondo del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -3917,7 +4173,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modifica la opacidad del fondo de pantalla." + "Modifica la opacidad de la imagen de fondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, @@ -3929,11 +4185,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, - "Usar los colores del sistema" + "Usar esquema de colores del sistema" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME, - "Utiliza la paleta de colores del sistema operativo (si está disponible)." + "Utiliza la paleta de colores del sistema operativo (si está disponible), ignorando los ajustes del tema." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS, @@ -3949,7 +4205,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_THUMBNAIL_UPSCALE_THRESHOLD, - "Escala automáticamente las miniaturas a un ancho/alto inferior al valor especificado. Mejora la calidad de la imagen y tiene un pequeño coste de rendimiento." + "Escala automáticamente las miniaturas cuyo ancho/alto sea inferior al valor especificado. Mejora la calidad de la imagen afectando moderadamente al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, @@ -3980,11 +4236,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_MODE, - "Formato de salida del servicio de IA" + "Salida del servicio de IA" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, - "Muestra la traducción como una superposición de texto (Imagen) o reproducir una conversión de texto a voz (modo Voz)." + "Muestra la traducción como una superposición de texto (imagen) o reproduce una conversión de texto a voz (voz)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL, @@ -3992,7 +4248,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_URL, - "Indica una dirección URL que lleve al servicio de traducción que quieras utilizar." + "Indica una dirección URL del servicio de traducción que quieras utilizar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_ENABLE, @@ -4000,11 +4256,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, - "Inicia el servicio de IA cuando se pulse la tecla rápida del servicio de IA." + "Permite que se ejecute el servicio de IA cuando se pulse su tecla rápida." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "Alternar pausa del servicio de IA" + "Pausar durante la traducción" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, @@ -4035,15 +4291,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "Activa o desactiva el narrador de accesibilidad en los menús." + "Activa la conversión de texto a voz como ayuda de navegación por los menús." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Velocidad de lectura del narrador" + "Velocidad de lectura de texto a voz" ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Ajusta la velocidad de lectura del narrador." + "Ajusta la velocidad de la voz del conversor de texto a voz." ) /* Settings > Power Management */ @@ -4052,11 +4308,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, - "Activar logros" + "Logros" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "Compite para conseguir logros hechos a medida para los juegos clásicos.\nPara más información, visita http://retroachievements.org" + "Desbloquea logros en los juegos clásicos. Para más información, visita https://retroachievements.org." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, @@ -4072,7 +4328,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "Utiliza tablas de clasificación específicas para cada juego.\nEsta opción no surtirá efecto si se ha desactivado el modo Hardcore." + "Utiliza tablas de clasificación específicas para cada juego. Esta opción no surtirá efecto si se ha desactivado el modo Hardcore." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, @@ -4080,7 +4336,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_RICHPRESENCE_ENABLE, - "Envía el estado detallado del juego al sitio web RetroAchievements." + "Envía información detallada sobre tus partidas a la página web de RetroAchievements." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, @@ -4098,13 +4354,21 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Activa los logros no oficiales o beta para probarlos." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Sonido de desbloqueo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Reproduce un sonido al desbloquear un logro." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, - "Modo informativo" + "Modo descriptivo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, - "Muestra información adicional en las notificaciones." + "Muestra más información en las notificaciones." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, @@ -4112,7 +4376,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "Captura la pantalla automáticamente al obtener un logro." + "Captura la pantalla automáticamente al conseguir un logro." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, @@ -4127,27 +4391,27 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PUBLIC_ANNOUNCE, - "Anunciar servidor de forma pública" + "Anunciar servidor de juego en red abiertamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PUBLIC_ANNOUNCE, - "Permite anunciar las sesiones de juego en red de forma pública, de lo contrario, los clientes deberán conectarse manualmente." + "Permite anunciar las sesiones de juego en red de forma pública. De lo contrario, los clientes no podrán utilizar la sala de espera pública y deberán conectarse manualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER, - "Usar servidor de retransmisión" + "Utilizar servidor intermediario" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, - "Envía las conexiones de juego en red a través de otro servidor (man-in-the-middle). Útil si el servidor está tras un cortafuegos o tiene problemas de NAT/UPnP." + "Reenvía las conexiones de juego en red a un servidor intermediario (man-in-the-middle). Sirve para cuando el servidor se encuentra tras un cortafuegos o tiene problemas de NAT/UPnP." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER, - "Ubicación del servidor de retransmisión" + "Ubicación del servidor intermediario" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_MITM_SERVER, - "Elige un servidor concreto. Las ubicaciones geográficamente cercanas suelen tener una latencia más baja." + "Elige un servidor intermediario concreto. Las ubicaciones más cercanas geográficamente hablando suelen tener una latencia más baja." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, @@ -4159,7 +4423,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, - "Juego en red: puerto TCP" + "Puerto TCP del juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_TCP_UDP_PORT, @@ -4171,7 +4435,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Indica una contraseña a pedir a los clientes que se conecten al estar en modo servidor." + "Indica la contraseña que deben usar los clientes que se conecten al servidor." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -4179,15 +4443,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Contraseña a pedir a los espectadores que se conecten al estar en modo servidor." + "Indica la contraseña que deben usar los clientes que se conecten al servidor como espectadores." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, - "Juego en red: modo espectador" + "Modo espectador de juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Selecciona si se debe iniciar el juego en red en modo espectador." + "Inicia una sesión de juego en red en modo espectador." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -4195,7 +4459,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Indica si se permiten conexiones en modo esclavo. El modo esclavo consume muy pocos recursos, pero afectará en gran medida a la latencia de red." + "Permite las conexiones en modo esclavo. El modo esclavo consume muy pocos recursos, pero afectará en gran medida a la latencia de red." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -4203,47 +4467,47 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Forzar conexiones que utilicen el modo esclavo. No se recomienda su uso salvo en redes muy rápidas con máquinas poco potentes." + "Rechaza las conexiones que no utilicen el modo esclavo. No se recomienda su uso salvo en redes muy rápidas con máquinas poco potentes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, - "Juego en red: modo sin estados" + "Modo sin estados de juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Indica si se puede ejecutar el juego en red en un modo que no permita guardados rápidos. Necesita una red muy rápida, pero se eliminarán los tirones provocados por el rebobinado." + "Ejecuta el juego en red en un modo que no permita guardados rápidos. Necesita una red muy rápida, pero como no se utilizará la función de rebobinado, se eliminarán los tirones que provoca." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, - "Juego en red: comprobar fotogramas" + "Frecuencia de comprobación del juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "La frecuencia en fotogramas con la que se verificará si el servidor y el cliente están sincronizados." + "Indica la frecuencia (en fotogramas) con la que se verificará si el servidor y el cliente están sincronizados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, - "Latencia en fotogramas" + "Fotogramas de latencia de entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, - "Indica el número de fotogramas de entrada a usar para ocultar la latencia durante el juego en red. Reduce los tirones y el uso de la CPU a costa de incrementar la latencia de entrada." + "Indica el número de fotogramas de entrada que se utilizarán para ocultar la latencia durante el juego en red. Reduce los tirones y el uso de la CPU a costa de incrementar la latencia de entrada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, - "Rango de latencia en fotogramas" + "Rango de fotogramas de latencia de entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, - "Indica el rango de fotogramas de entrada a usar para ocultar la latencia durante el juego en red. Reduce los tirones y el uso de la CPU a costa de incrementar la latencia de entrada." + "Indica el rango de fotogramas de entrada que se utilizarán para ocultar la latencia durante el juego en red. Reduce los tirones y el uso de la CPU a costa de incrementar la latencia de entrada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, - "Juego en red: NAT traversal" + "NAT traversal para juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NAT_TRAVERSAL, - "Cuando se es un servidor, buscar conexiones desde Internet mediante UPnP o tecnologías similares con las que salir de redes locales." + "Al ejecutar un servidor, se buscarán conexiones desde Internet mediante UPnP o tecnologías similares con las que salir de redes locales." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL, @@ -4267,15 +4531,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Mando en red" + "RetroPad de red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Puerto de base remota de red" + "Puerto base de RetroPad de red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Usuario remoto %d activado" + "RetroPad de red del usuario %d" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -4287,11 +4551,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, - "Descarga de miniaturas automática" + "Descarga de miniaturas bajo demanda" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "Descarga automáticamente las miniaturas mientras se navega por las listas de reproducción. Provoca una bajada importante en el rendimiento." + "Descarga automáticamente las miniaturas que falten mientras se navega por las listas de reproducción. Afectará gravemente al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, @@ -4302,27 +4566,27 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL, - "URL de núcleos de Buildbot" + "URL de núcleos del buildbot" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_BUILDBOT_URL, - "URL de la carpeta del actualizador de núcleos en el buildbot Libretro." + "Indica la URL del directorio del actualizador de núcleos del buildbot de Libretro." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BUILDBOT_ASSETS_URL, - "URL de recursos del Buildbot" + "URL de recursos del buildbot" ) MSG_HASH( MENU_ENUM_SUBLABEL_BUILDBOT_ASSETS_URL, - "URL de la carpeta de recursos en el buildbot Libretro." + "Indica la URL del directorio del actualizador de recursos del buildbot de Libretro." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, - "Extraer automáticamente los archivos descargados" + "Extraer automáticamente archivos descargados" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, - "Extrae automáticamente los archivos después de descargarlos." + "Extrae los contenidos de los archivos nada más descargarlos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, @@ -4332,12 +4596,28 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, "Incluye núcleos «experimentales» en la lista del descargador de núcleos. Suelen utilizarse solo con fines de desarrollo o prueba y no se recomienda su uso generalizado." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "Guardar una copia de los núcleos al actualizarlos" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP, + "Crea automáticamente una copia de seguridad de cualquier núcleo instalado al usar el actualizador en línea. Así se puede recuperar fácilmente un núcleo funcional en caso de que una actualización introduzca una regresión." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Tamaño del historial de copias de seguridad del núcleo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Especifica cuántas copias de seguridad automáticas se conservarán por núcleo instalado. Al llegar a este límite, la próxima copia de seguridad producida por una actualización eliminará la copia más antigua. Nota: las copias de seguridad manuales de los núcleos no se verán afectadas por este ajuste." + ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Listado del historial" + "Historial" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -4349,7 +4629,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, - "Limita el número de entradas en la lista de reproducción de elementos recientes." + "Limita el número de elementos en la lista de reproducción de juegos, imágenes, música y vídeos recientes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, @@ -4357,23 +4637,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, - "Limita la cantidad de elementos de la lista de reproducción. Cuando se alcance el límite, no se podrán añadir más entradas hasta que se eliminen otras. Utiliza el valor -1 para tener un número «ilimitado» (99999) de entradas. ADVERTENCIA. ¡Si se reduce este valor, se borrarán las entradas ya existentes!" + "Limita la cantidad de elementos de la lista de reproducción de favoritos. Cuando se alcance el límite, no se añadirán más entradas hasta que se eliminen otras. Introduce -1 para tener un número de entradas «ilimitado» (99999). ADVERTENCIA: ¡Si se reduce este valor, se borrarán las entradas ya existentes!" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, - "Permitir renombrar entradas" + "Permitir renombrar elementos" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME, - "Permite al usuario cambiar el nombre de las entradas en las listas de reproducción." + "Permite que el usuario pueda cambiar el nombre de los elementos de las listas de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, - "Permitir la eliminación de entradas" + "Permitir eliminar elementos" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_REMOVE, - "Permite que el usuario pueda eliminar entradas de las listas de reproducción." + "Permite que el usuario pueda eliminar los elementos de las listas de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, @@ -4381,15 +4661,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "Ordena las listas de contenidos por orden alfabético. Esta opción no se aplica a los historiales de elementos reproducidos recientemente." + "Ordena las listas de contenidos por orden alfabético, salvo las listas de historial, imágenes, música y vídeos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, - "Usar el antiguo formato de listas de reproducción" + "Guardar listas de reproducción con el formato antiguo" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, - "Guarda las listas de reproducción en el formato de texto simple (abandonado). Las listas utilizarán el formato JSON si esta opción está desactivada." + "Guarda las listas de reproducción en el formato de texto simple (abandonado). Si se desactiva esta opción, las listas utilizarán el formato JSON." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, @@ -4397,7 +4677,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_COMPRESSION, - "Archiva las listas de reproducción al guardarlas en disco. Reduce el tamaño del archivo y los tiempos de carga a costa de aumentar (escasamente) el consumo de la CPU. Se pueden comprimir las listas en el formato antiguo o nuevo." + "Archiva las listas de reproducción al guardarlas en disco. Reduce el tamaño del archivo y los tiempos de carga a costa de aumentar (escasamente) el consumo de la CPU. Se pueden comprimir listas con el formato antiguo o nuevo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_INLINE_CORE_NAME, @@ -4405,7 +4685,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, - "Indica si se deben asociar entradas en las listas de reproducción con el núcleo actual asociado (si existe). AVISO: Este ajuste se ignorará si se activan las subetiquetas en las listas." + "Indica si se deben asociar elementos de las listas de reproducción con el núcleo actual asociado (si existe). AVISO: Este ajuste se ignorará si se activan las subetiquetas en las listas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_SUBLABELS, @@ -4413,7 +4693,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_SUBLABELS, - "Muestra información adicional en cada entrada de las listas de reproducción, como la asociación de núcleos (si está disponible). Afecta al rendimiento de forma variable." + "Muestra información adicional en cada elemento de las listas de reproducción, como la asociación de núcleos (si está disponible). Afecta al rendimiento de forma variable." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, @@ -4421,7 +4701,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Tiempo de juego:" + "Ejecución:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, @@ -4437,11 +4717,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Formato de «Última partida» en subetiquetas de listas" + "Formato de fecha y hora de la última partida" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Selecciona el formato de fecha y hora para la información de la última partida jugada al mostrar el registro de ejecución. Nota: Las opciones AM/PM afectarán levemente al rendimiento en algunas plataformas." + "Ajusta el formato de la fecha y hora mostradas en la información de la última partida. Nota: Las opciones AM/PM afectarán levemente al rendimiento en algunas plataformas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, @@ -4449,7 +4729,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, - "Al buscar entradas asociadas a archivos comprimidos en las listas de reproducción, solo se buscará una coincidencia en el nombre del archivo, en vez de [nombre de archivo]+[contenido]. Activar para evitar duplicados en el historial al cargar archivos comprimidos." + "Al buscar elementos asociados a archivos comprimidos en las listas de reproducción, solo se buscará una coincidencia en el nombre del archivo, en vez de [nombre de archivo]+[contenido]. Esto evitará que aparezcan elementos duplicados en el historial al cargar archivos comprimidos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, @@ -4457,15 +4737,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, - "Al desactivar esta opción, solo se añadirán contenidos a las listas de reproducción si se ha instalado un núcleo compatible con sus extensiones. Al activar esta opción se añadirán a la lista de reproducción sin hacer distinciones. Así podrás instalar un núcleo necesario después de buscar contenidos." + "Si se desactiva esta opción, solo se añadirán contenidos a las listas de reproducción si se ha instalado un núcleo compatible con sus extensiones. Al activar esta opción se añadirán a la lista de reproducción sin hacer distinciones. Así podrás instalar un núcleo necesario después de buscar contenidos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Gestionar listas de reproducción" + "Administrar listas de reproducción" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Permite hacer tareas de mantenimiento en la lista seleccionada (p. ej.: asignar o reiniciar asociaciones de núcleos predeterminadas)." + "Permite gestionar las listas de reproducción." ) /* Settings > Playlists > Playlist Management */ @@ -4500,7 +4780,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Cambia el orden de las entradas de esta lista de reproducción." + "Indica el orden de los elementos de esta lista de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, @@ -4508,11 +4788,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Elimina las entradas duplicadas o no válidas y valida las asociaciones de núcleos." + "Confirma las asociaciones a núcleos y elimina los elementos no válidos y duplicados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, - "Borrar lista de reproducción" + "Eliminar lista de reproducción" ) MSG_HASH( MENU_ENUM_SUBLABEL_DELETE_PLAYLIST, @@ -4527,7 +4807,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, - "Cambia las opciones de privacidad." + "Cambia los ajustes de privacidad." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST, @@ -4543,7 +4823,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NICKNAME, - "Introduce tu apodo. Se utilizará en las sesiones de juego en red y en otros sitios." + "Introduce tu nombre de usuario. Se utilizará en las sesiones de juego en red y en otros sitios." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, @@ -4551,7 +4831,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Cambia el idioma de la interfaz." + "Ajusta el idioma de la interfaz de usuario." ) /* Settings > User > Privacy */ @@ -4566,22 +4846,22 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISCORD_ALLOW, - "Permite que la aplicación Discord pueda mostrar más información sobre el contenido que estés utilizando.\nNOTA: Esta función solo funcionará con el cliente de escritorio, no con la versión web." + "Permite que la aplicación Discord pueda mostrar más información sobre el contenido que estés utilizando.\nNOTA: Solo funcionará con el cliente de escritorio de Discord, no con la versión web." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW, - "Activar localización" + "Activar ubicación" ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_ALLOW, - "Permite que los núcleos puedan acceder a los servicios de localización." + "Permite que los núcleos puedan acceder a los servicios de ubicación." ) /* Settings > User > Accounts */ MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Servicio de RetroAchievements. Para más información, visita http://retroachievements.org." + "Desbloquea logros en los juegos clásicos. Para más información, visita http://retroachievements.org." ) /* Settings > User > Accounts > RetroAchievements */ @@ -4625,7 +4905,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SYSTEM_DIRECTORY, - "Establece la carpeta del sistema. Los núcleos la utilizan para cargar BIOS, configuraciones de sistema, etc." + "Establece el directorio del sistema. Los núcleos lo utilizan para cargar BIOS, configuraciones de sistema, etc." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, @@ -4633,7 +4913,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ASSETS_DIRECTORY, - "En esta carpeta se guardan los archivos descargados." + "En este directorio se guardarán todos los archivos descargados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, @@ -4641,7 +4921,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Esta carpeta es el lugar predeterminado en el que las interfaces de los menús buscarán los recursos que necesiten." + "En este directorio se guardan los recursos de los menús de RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -4649,7 +4929,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DYNAMIC_WALLPAPERS_DIRECTORY, - "Carpeta donde se guardan los fondos de pantalla dinámicos según el contenido." + "El directorio donde se guardan los fondos de pantalla dinámicos según el contenido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY, @@ -4657,15 +4937,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_DIRECTORY, - "Carpeta de miniaturas adicionales (cajas, capturas, etc.)." + "Aquí se almacenarán las miniaturas adicionales (cajas, capturas, etc.)." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, - "Explorador" + "Explorador de archivos" ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Establece la carpeta inicial del explorador de archivos." + "Establece el directorio inicial del explorador de archivos." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, @@ -4673,7 +4953,7 @@ MSG_HASH( /* FIXME Not RGUI specific */ ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_CONFIG_DIRECTORY, - "Establece la ubicación inicial del explorador del menú." + "Establece el directorio inicial del explorador de configuraciones del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LIBRETRO_DIR_PATH, @@ -4681,7 +4961,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LIBRETRO_DIR_PATH, - "En esta carpeta se buscan los contenidos o los núcleos." + "En este directorio se buscarán los contenidos o los núcleos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LIBRETRO_INFO_PATH, @@ -4689,19 +4969,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LIBRETRO_INFO_PATH, - "En esta carpeta se guardan los archivos de información de aplicación y de núcleos." + "Aquí se guardarán los archivos de información de aplicación y de núcleos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_DATABASE_DIRECTORY, - "Base de datos" + "Bases de datos" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_DATABASE_DIRECTORY, - "En esta carpeta se guardan las bases de datos." + "En este directorio se guardan las bases de datos." ) MSG_HASH( MENU_ENUM_SUBLABEL_CURSOR_DIRECTORY, - "En esta carpeta se guarda el historial de búsquedas." + "En este directorio se guardará el historial de búsquedas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DATABASE_PATH, @@ -4717,7 +4997,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FILTER_DIR, - "En esta carpeta se guardan los filtros de vídeo basados en CPU." + "En este directorio se guardan los filtros de vídeo basados en CPU." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_FILTER_DIR, @@ -4725,7 +5005,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_FILTER_DIR, - "En esta carpeta se guardan los filtros DSP de audio." + "En este directorio se guardan los filtros DSP de audio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR, @@ -4733,7 +5013,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_DIR, - "En esta carpeta se guardan los filtros de vídeo basados en GPU." + "Define el directorio donde se guardarán los filtros de vídeo basados en GPU." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY, @@ -4741,7 +5021,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_OUTPUT_DIRECTORY, - "En esta carpeta se guardarán las grabaciones." + "En este directorio se guardarán las grabaciones." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, @@ -4749,7 +5029,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "En esta carpeta se guardan las configuraciones de grabación." + "En este directorio se guardan las configuraciones de grabación." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, @@ -4757,15 +5037,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "En esta carpeta se guardan las superposiciones." + "En este directorio se guardan las superposiciones." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, - "Diseño de vídeo" + "Diseños de vídeo" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_DIRECTORY, - "En esta carpeta se guardan los diseños de vídeo." + "Define el directorio donde se guardarán los diseños de vídeo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, @@ -4773,7 +5053,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SCREENSHOT_DIRECTORY, - "En esta carpeta se guardan las capturas de pantalla." + "En este directorio se guardan las capturas de pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, @@ -4781,15 +5061,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Al conectar un mando, se configurará automáticamente si existe un archivo de configuración correspondiente dentro de esta carpeta." + "En este directorio se guardan los perfiles de mando, usados para configurarlos automáticamente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, - "Reasignación de entrada" + "Reasignaciones de entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "En esta carpeta se guardan las reasignaciones de controles." + "En este directorio se guardan las reasignaciones de entrada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, @@ -4797,7 +5077,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY, - "En esta carpeta se guardan las listas de reproducción." + "En este directorio se guardarán las listas de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUNTIME_LOG_DIRECTORY, @@ -4805,15 +5085,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUNTIME_LOG_DIRECTORY, - "En esta carpeta se guardan los registros de ejecución." + "En este directorio se guardarán los registros de ejecución." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY, - "Partidas guardadas" + "Archivos de guardados" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVEFILE_DIRECTORY, - "En esta carpeta se almacenarán todos los archivos de guardado. Si no hay una carpeta asignada, se intentarán guardar en la carpeta del contenido." + "En este directorio se almacenarán todos los archivos de guardado. Si no hay un directorio asignado, se intentarán guardar en el directorio del contenido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY, @@ -4821,7 +5101,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_DIRECTORY, - "En esta carpeta se almacenarán todos los guardados rápidos. Si no hay una carpeta asignada, se intentarán guardar en la carpeta del contenido." + "En este directorio se almacenarán todos los guardados rápidos. Si no hay un directorio asignado, se intentarán guardar en el directorio del contenido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CACHE_DIRECTORY, @@ -4829,7 +5109,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CACHE_DIRECTORY, - "Si seleccionas una carpeta, los contenidos (p. ej.: de otros archivos) se extraerán temporalmente en ella." + "Al seleccionar un directorio, los contenidos (p. ej.: de archivos comprimidos) se extraerán temporalmente en él." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOG_DIR, @@ -4837,7 +5117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_DIR, - "En esta carpeta se guardan los archivos de registros del sistema." + "En este directorio se guardarán los archivos de registros del sistema." ) /* Music */ @@ -4850,7 +5130,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER, - "Agrega esta pista de audio a una casilla. Si no hay disponibles, se ignorará." + "Agrega esta pista de audio a un espacio de secuencias de audio. Si no hay espacios disponibles, se ignorará." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_PLAY, @@ -4858,14 +5138,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER_AND_PLAY, - "Agrega esta pista de audio a una casilla y la reproduce. Si no hay disponibles, se ignorará." + "Agrega esta pista de audio a un espacio de secuencias de audio y la reproduce. Si no hay espacios disponibles, se ignorará." ) /* Netplay */ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_HOSTING_SETTINGS, - "Anfitrión" + "Servidor" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, @@ -4885,11 +5165,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Actualizar lista de salas" + "Actualizar lista de servidores de juego en red" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Busca salas nuevas." + "Busca servidores de juego en red." ) /* Netplay > Host */ @@ -4904,22 +5184,22 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_DISABLE_HOST, - "Terminar juego en red" + "Detener servidor de juego en red" ) /* Import content */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_DIRECTORY, - "Buscar carpeta" + "Escanear directorio" ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_DIRECTORY, - "Busca contenidos de la base de datos en una carpeta." + "Busca contenidos de la base de datos en un directorio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_THIS_DIRECTORY, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_FILE, @@ -4927,7 +5207,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_FILE, - "Busca un archivo de la base de datos." + "Busca un archivo cuyo contenido se encuentre en la base de datos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST, @@ -4935,7 +5215,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST, - "Escaneado configurable mediante nombres de contenidos. No necesita que los contenidos coincidan con los de la base de datos." + "Escaneado configurable mediante nombres de contenidos. Los contenidos no tienen por qué coincidir con los de la base de datos." ) /* Import content > Scan File */ @@ -4953,11 +5233,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DIR, - "Carpeta de contenidos" + "Directorio de contenidos" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DIR, - "Selecciona una carpeta a escanear." + "Selecciona un directorio donde buscar contenidos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME, @@ -4977,11 +5257,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Núcleo" + "Núcleo predeterminado" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, - "Selecciona el núcleo que se utilizará para iniciar contenidos escaneados de forma predeterminada." + "Selecciona el núcleo asignado de forma predeterminada para iniciar los contenidos escaneados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, @@ -4989,15 +5269,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "Una lista separada con espacios de los tipos de archivo que se incluirán en el escaneo. En caso de estar en blanco, incluirá todos los archivos; si se ha indicado un núcleo, incluirá todos los archivos compatibles con el núcleo." + "Una lista separada con espacios de los tipos de archivo que se incluirán en el escaneo. En caso de estar en blanco, incluirá todos los tipos de archivo; si se ha indicado un núcleo, incluirá todos los archivos compatibles con el núcleo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Búsqueda recursiva" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Al activar esta opción, la búsqueda incluirá todos los subdirectorios del directorio de contenidos especificado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, - "Escanear dentro de archivos" + "Escanear dentro de archivos contenedores" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, - "Al activar esta opción, se buscarán contenidos válidos o compatibles dentro de archivos contenedores (.zip, .7z, etc.). Podría afectar al rendimiento del escaneado." + "Si se activa esta opción, se buscarán contenidos válidos o compatibles dentro de archivos contenedores (.zip, .7z, etc.). Podría afectar significativamente al rendimiento del escaneado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE, @@ -5005,15 +5293,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE, - "Selecciona un archivo DAT XML de Logiqx o MAME para nombrar automáticamente los contenidos de arcade escaneados (para MAME, FinalBurn Neo, etc.)." + "Selecciona una lista en formato DAT XML de Logiqx o MAME para nombrar automáticamente los contenidos de arcade escaneados (para MAME, FinalBurn Neo, etc.)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE_FILTER, - "Filtro DAT de arcade" + "Filtrar según archivos DAT de arcade" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE_FILTER, - "Cuando utilice un archivo DAT arcade, solo agregue contenido a la lista de reproducción si se encuentra una entrada de archivo DAT coincidente." + "Al utilizar un archivo DAT de arcade, solo se añadirán contenidos a una lista de reproducción si coinciden con la información de un archivo DAT." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_OVERWRITE, @@ -5021,7 +5309,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_OVERWRITE, - "Al activar esta opción se borrará cualquier lista de reproducción existente antes de escanear contenidos. Al desactivarla, se preservarán las listas ya existentes y solo se añadirán aquellos contenidos que no se encuentren en la lista." + "Si se activa esta opción, se eliminará cualquier lista de reproducción existente antes de escanear contenidos. Al desactivarla, se preservarán los elementos ya existentes en las listas de reproducción y solo se añadirán aquellos contenidos que no se encuentren." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, @@ -5048,7 +5336,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RENAME_ENTRY, - "Cambia el título de esta entrada." + "Cambia el título de este elemento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_ENTRY, @@ -5064,7 +5352,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES_PLAYLIST, - "Agrega la entrada a tus favoritos." + "Agrega el elemento a tus favoritos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SET_CORE_ASSOCIATION, @@ -5088,7 +5376,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DOWNLOAD_PL_ENTRY_THUMBNAILS, - "Descarga miniaturas para el contenido actual. Actualizará cualquier miniatura ya existente." + "Descarga miniaturas con capturas, carátulas o pantallas de inicio del contenido actual. Actualizará cualquier miniatura ya existente." ) /* Playlist Item > Set Core Association */ @@ -5133,7 +5421,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME_CONTENT, - "Reanuda la ejecución del contenido y abandona el menú rápido." + "Reanuda el contenido ejecutado y abandona el menú rápido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RESTART_CONTENT, @@ -5149,7 +5437,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CLOSE_CONTENT, - "Cierra el contenido actual. Se perderá cualquier progreso." + "Cierra el contenido actual. Se perderá cualquier progreso no guardado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT, @@ -5177,7 +5465,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_STATE, - "Cargar guardado rápido" + "Carga rápida" ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_STATE, @@ -5189,7 +5477,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_UNDO_LOAD_STATE, - "Si se carga un guardado rápido, el contenido volverá al estado previo a la carga." + "Si se ha cargado un guardado rápido, el contenido volverá al estado previo a la carga." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_SAVE_STATE, @@ -5205,7 +5493,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES, - "Agrega la entrada a tus favoritos." + "Agrega el elemento a tus favoritos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_START_RECORDING, @@ -5253,7 +5541,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_INPUT_REMAPPING_OPTIONS, - "Cambia los controles para el contenido cargado." + "Cambia los controles del contenido cargado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS, @@ -5281,7 +5569,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_OVERRIDE_OPTIONS, - "Opciones para anteponer configuraciones personalizadas sobre las globales." + "Opciones para utilizar configuraciones personalizadas individualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST, @@ -5311,15 +5599,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CORE, - "Borrar reasignación del núcleo" + "Eliminar reasignación del núcleo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_SAVE_CONTENT_DIR, - "Carpeta de reasignaciones según contenido" + "Guardar archivo de reasignación de directorios de contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CONTENT_DIR, - "Borrar carpeta de reasignaciones de juegos" + "Eliminar archivo de reasignación de directorios de contenido" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_SAVE_GAME, @@ -5327,14 +5615,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_GAME, - "Borrar reasignación del juego" + "Eliminar reasignación del juego" ) /* Quick Menu > Controls > Load Remap File */ MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE, - "Archivo de reasignación de controles" + "Archivo de reasignación" ) /* Quick Menu > Cheats */ @@ -5345,7 +5633,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD, - "Cargar archivo de trucos (Reemplazar)" + "Cargar archivo de trucos (reemplazar)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD, @@ -5353,7 +5641,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD_APPEND, - "Cargar archivo de trucos (Añadir)" + "Cargar archivo de trucos (añadir)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD_APPEND, @@ -5365,7 +5653,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS, - "Guardar archivo de trucos como" + "Guardar archivo de trucos como..." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, @@ -5373,15 +5661,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "Agregar nuevo truco al principio" + "Agregar truco nuevo al principio" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "Agregar nuevo truco al final" + "Agregar truco nuevo al final" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "Borrar todos los trucos" + "Eliminar todos los trucos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, @@ -5424,11 +5712,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Izquierda/Derecha para cambiar el valor." + "Pulsa Izquierda o Derecha para cambiar el valor." ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, @@ -5436,35 +5724,35 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LT, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL, - "Menos que antes" + "Inferior al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LTE, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL, - "Menos o igual que antes" + "Inferior o igual al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GT, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL, - "Más que antes" + "Superior al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GTE, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL, - "Más o igual que antes" + "Superior o igual al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQ, @@ -5472,19 +5760,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL, - "Igual que antes" + "Igual al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_NEQ, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL, - "Distinto que antes" + "Distinto al anterior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQPLUS, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS, @@ -5492,11 +5780,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL, - "Igual que antes +%u (%X)" + "Igual al anterior +%u (%X)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQMINUS, - "Buscar valores de memoria" + "Buscar valores en memoria" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQMINUS, @@ -5504,7 +5792,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL, - "Igual que antes -%u (%X)" + "Igual al anterior -%u (%X)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_MATCHES, @@ -5512,7 +5800,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_MATCH, - "Borrar coincidencia n.º " + "Eliminar coincidencia n.º " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_COPY_MATCH, @@ -5597,7 +5885,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "Indica la cantidad de veces en las que se aplicará el truco.\nUsar con las otras dos opciones de iteración para cubrir regiones grandes de memoria." + "Indica la cantidad de veces en las que se aplicará el truco. Usar con las otras dos opciones de iteración para cubrir regiones grandes de memoria." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, @@ -5605,7 +5893,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "Tras cada «Número de iteraciones», se incrementará la dirección de memoria con este valor multiplicado por el tamaño de búsqueda de memoria." + "Tras cada iteración, se incrementará la dirección de memoria con este valor multiplicado por el tamaño de búsqueda de memoria." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, @@ -5613,7 +5901,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "Tras cada «Número de iteraciones», se incrementará el valor con esta cantidad." + "Tras cada iteración, se incrementará el valor con esta cantidad." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, @@ -5665,7 +5953,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "Borrar este truco" + "Eliminar este truco" ) /* Quick Menu > Disc Control */ @@ -5676,7 +5964,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Abre la bandeja de disco virtual y extrae el disco que esté cargado. NOTA: Si RetroArch está configurado para pausarse al activar el menú, algunos núcleos podrían no registrar los cambios hasta que hayan pasado unos segundos tras reanudar el contenido y tras cada acción de control de discos." + "Abre la bandeja de disco virtual y extrae el disco que esté cargado. Si la opción Pausar contenido al activar el menú está activada, algunos núcleos podrían no registrar los cambios hasta que hayan pasado unos segundos tras reanudar el contenido y tras cada acción de control de discos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, @@ -5684,7 +5972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Introduce el disco correspondiente al índice de disco actual y cierra la bandeja de disco virtual. NOTA: Si RetroArch está configurado para pausarse al activar el menú, algunos núcleos podrían no registrar los cambios hasta que hayan pasado unos segundos tras reanudar el contenido y tras cada acción de control de discos." + "Introduce el disco correspondiente al índice de disco actual y cierra la bandeja de disco virtual. Si la opción Pausar contenido al activar el menú está activada, algunos núcleos podrían no registrar los cambios hasta que hayan pasado unos segundos tras reanudar el contenido y tras cada acción de control de discos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, @@ -5694,6 +5982,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, "Expulsa el disco actual, selecciona uno nuevo del sistema de archivos, lo introduce y cierra la bandeja de disco virtual. NOTA: Esta es una característica antigua. Se recomienda cargar títulos de varios discos a través de listas de reproducción M3U, las cuales permiten seleccionar discos mediante las opciones «Expulsar disco», «Introducir disco» e «Índice de disco actual»." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND_TRAY_OPEN, + "Selecciona un disco nuevo del sistema de archivos y lo introduce sin cerrar la bandeja de disco virtual. NOTA: Esta es una característica antigua. Se recomienda cargar títulos de varios discos a través de listas de reproducción M3U, las cuales permiten seleccionar discos mediante la opción «Índice de disco actual»." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, "Índice de disco actual" @@ -5719,11 +6011,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, - "Cargar preset de shaders" + "Cargar preajuste de shaders" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, - "Carga un preset de shaders. Será configurado automáticamente." + "Carga un preajuste de shaders. La secuencia de shaders se configurará automáticamente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, @@ -5731,7 +6023,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE, - "Guarda el preset de shaders actual." + "Guarda el preajuste de shaders actual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, @@ -5739,7 +6031,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE, - "Elimina los presets de shaders de tipos concretos." + "Elimina un preajuste de shaders." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES, @@ -5755,7 +6047,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS, - "Modifica el shader actual directamente. No se guardarán los cambios en el preset." + "Modifica el shader actual directamente. No se guardarán los cambios en el preajuste." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, @@ -5763,7 +6055,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Cambia la cantidad de pasadas de shaders. Puedes asignar shaders individualmente a cada pasada y configurar su escalado y filtrado." + "Cambia la cantidad de pasadas de shaders. Cada shader puede ser asignado de forma individual a cada pasada para configurar su escalado y filtrado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FILTER, @@ -5778,39 +6070,39 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS, - "Guardar preset de shaders como..." + "Guardar preajuste de shaders como..." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS, - "Guarda la configuración actual de shaders como un preset nuevo." + "Guarda la configuración actual de shaders como un preajuste nuevo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GLOBAL, - "Guardar preset global" + "Guardar preajuste global" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL, - "Guarda la configuración actual de shaders para todos los contenidos." + "Guarda la configuración actual de shaders y lo convierte en la configuración global predeterminada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, - "Guardar preset para el núcleo" + "Guardar preajuste para el núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Guarda la configuración actual de shaders para este núcleo." + "Convierte la configuración actual de shaders en la predeterminada para este núcleo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Guardar preset de directorio de contenido" + "Guardar preajuste de directorio de contenidos" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Guarda la configuración actual de shaders para todos los archivos del directorio de contenido actual." + "Convierte la configuración actual de shaders en la predeterminada para todos los archivos del directorio de contenidos actual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, - "Guardar preset para el juego" + "Guardar preajuste para el juego" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME, @@ -5821,39 +6113,39 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND, - "No se han encontrado presets automáticos de shaders" + "No se han encontrado preajustes automáticos de shaders" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL, - "Eliminar preset global" + "Eliminar preajuste global" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL, - "Elimina el preset global, usado por todos los contenidos y núcleos." + "Elimina el preajuste global usado por todos los contenidos y núcleos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE, - "Eliminar preset de núcleo" + "Eliminar preajuste de núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_CORE, - "Elimina el preset del núcleo, usado por todos los contenidos compatibles con el núcleo cargado actualmente." + "Elimina el preajuste del núcleo usado por todos los contenidos compatibles con el núcleo cargado actualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT, - "Eliminar preset de carpeta de contenidos" + "Eliminar preajuste de directorio de contenidos" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT, - "Elimina el preset de la carpeta de contenidos, usado por todos los contenidos de la carpeta usada actualmente." + "Elimina el preajuste de directorios de contenidos usado por todos los contenidos del directorio actual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME, - "Eliminar preset de juego" + "Eliminar preajuste de juego" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GAME, - "Elimina el preset de juego, usado solo por el juego seleccionado." + "Elimina el preajuste de juego usado solo por el juego en cuestión." ) /* Quick Menu > Shaders > Shader Parameters */ @@ -5871,15 +6163,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, - "Guarda un archivo de personalización que se aplicará a todo el contenido cargado con este núcleo. Tendrá prioridad sobre la configuración principal." + "Guarda un archivo de configuración personalizado que se aplicará a todos los contenidos cargados con este núcleo y que tendrá prioridad sobre la configuración principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, - "Carpeta de personalizaciones de contenidos" + "Guardar personalización de directorios de contenidos" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, - "Guarda un archivo de configuraciones que aplicará a todo el contenido cargado desde el mismo directorio que el archivo actual. Tendrá prioridad sobre el archivo principal." + "Guarda un archivo de configuración personalizada que se aplicará a todos los contenidos cargados desde el mismo directorio que el archivo actual y que tendrá prioridad sobre la configuración principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, @@ -5887,14 +6179,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, - "Guarda un archivo de personalización que se aplicará solo a este contenido cargado. Tendrá prioridad sobre la configuración principal." + "Guarda un archivo de configuración personalizada que se aplicará solo al contenido actual. Este archivo tendrá prioridad sobre la configuración principal." ) /* Quick Menu > Achievements */ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY, - "No hay logros que mostrar" + "No hay logros visibles" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE, @@ -5929,7 +6221,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY, - "No hay entradas disponibles" + "No hay elementos disponibles" ) /* Miscellaneous UI Items */ @@ -5946,6 +6238,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "No hay información del núcleo disponible" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "No hay copias de seguridad disponibles" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "No hay favoritos disponibles" @@ -5972,12 +6268,16 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLIST_ENTRIES_AVAILABLE, - "No hay entradas disponibles en la lista de reproducción" + "No hay elementos disponibles en la lista de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "No se ha encontrado una configuración" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "No se han encontrado dispositivos con Bluetooth" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "No se han encontrado redes" @@ -5992,7 +6292,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_BACK, - "Atrás" + "Volver" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_OK, @@ -6000,11 +6300,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY, - "Carpeta superior" + "Directorio superior" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NOT_FOUND, - "No se ha encontrado la carpeta" + "No se ha encontrado el directorio" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ITEMS, @@ -6039,7 +6339,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_MAX, - "Máx." + "Al máximo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_AVERAGE, @@ -6063,15 +6363,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_IMAGE_MODE, - "Modo Imagen" + "Modo imagen" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SPEECH_MODE, - "Modo Voz" + "Modo voz" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_NARRATOR_MODE, - "Modo Narrador" + "Modo narrador" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV, @@ -6099,7 +6399,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_RUNTIME_PER_CORE, - "Por núcleo" + "Según núcleo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_RUNTIME_AGGREGATE, @@ -6119,23 +6419,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "No hay una fuente" + "No hay fuente de alimentación" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, @@ -6153,6 +6453,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, "Mantener Start (2 segundos)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "Mantener Select (2 segundos)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWN_SELECT, "Abajo + Select" @@ -6187,19 +6491,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_TYPE_LT_VALUE, - "Menor al valor de vibración" + "Inferior al valor de vibración" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_TYPE_GT_VALUE, - "Mayor al valor de vibración" + "Superior al valor de vibración" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_TYPE_INCREASE_BY_VALUE, - "Incrementa por el valor de vibración" + "Incrementa según el valor de vibración" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_TYPE_DECREASE_BY_VALUE, - "Disminuye por el valor de vibración" + "Disminuye según el valor de vibración" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_PORT_16, @@ -6243,31 +6547,31 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_1, - "1 bit, valor máx. = 0x01" + "1 bit, valor máximo = 0x01" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_2, - "2 bits, valor máx. = 0x03" + "2 bits, valor máximo = 0x03" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_4, - "4 bits, valor máx. = 0x0F" + "4 bits, valor máximo = 0x0F" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_8, - "8 bits, valor máx. = 0xFF" + "8 bits, valor máximo = 0xFF" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_16, - "16 bits, valor máx. = 0xFFFF" + "16 bits, valor máximo = 0xFFFF" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_32, - "32 bits, valor máx. = 0xFFFFFFFF" + "32 bits, valor máximo = 0xFFFFFFFF" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_DEFAULT, - "Por defecto" + "Configuración predeterminada" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_ALPHABETICAL, @@ -6283,15 +6587,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS, - "Quitar paréntesis ()" + "Quitar contenidos entre ()" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_BRACKETS, - "Quitar corchetes []" + "Quitar contenidos entre []" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS_AND_BRACKETS, - "Quitar paréntesis y corchetes" + "Quitar contenidos entre () y []" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION, @@ -6307,11 +6611,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT, - "Valores predeterminados del sistema" + "Configuración predeterminada" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS, - "Cajas" + "Carátulas" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, @@ -6323,15 +6627,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCROLL_FAST, - "Rápido" + "Rápida" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ON, - "Activado" + "Sí" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OFF, - "Desactivado" + "No" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_YES, @@ -6387,7 +6691,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CONTENT_DIR, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CUSTOM, @@ -6431,19 +6735,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Rueda arriba" + "Rueda del ratón hacia arriba" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Rueda abajo" + "Rueda del ratón hacia abajo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Rueda izquierda" + "Rueda del ratón hacia la izquierda" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Rueda derecha" + "Rueda del ratón hacia la derecha" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -6534,7 +6838,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, - "Ancho del relleno del borde" + "Grosor del relleno del borde" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, @@ -6550,11 +6854,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_FULL_WIDTH_LAYOUT, - "Cambia la longitud y posición de las entradas del menú para aprovechar al máximo el espacio disponible en pantalla. Desactiva esta opción para utilizar la disposición clásica de doble columna." + "Cambia la longitud y posición de los elementos del menú para aprovechar al máximo el espacio disponible en pantalla. Desactiva esta opción para utilizar la disposición clásica de doble columna." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, - "Filtro lineal en el menú" + "Aplicar un filtro lineal al menú" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_LINEAR_FILTER, @@ -6566,7 +6870,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_INTERNAL_UPSCALE_LEVEL, - "Reescala el menú antes de mostrarlo en pantalla. Si se utiliza cuando «Filtro lineal del menú» está activado, se eliminarán los defectos de escalado (píxeles no proporcionales) manteniendo una imagen nítida. Afecta al rendimiento en función del nivel de reescalado." + "Aumenta la escala de la interfaz del menú antes de mostrarla en pantalla. Si se utiliza teniendo activado el ajuste «Filtro lineal del menú», se eliminarán los defectos de escalado (píxeles no proporcionales) manteniendo una imagen nítida. Afecta significativamente al rendimiento en función del nivel de reescalado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_ASPECT_RATIO, @@ -6582,7 +6886,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_ASPECT_RATIO_LOCK, - "Preserva la relación de aspecto correcta del menú. Al desactivar esta opción, se estirará el menú rápido para adaptarse al contenido cargado." + "Preserva la relación de aspecto correcta del menú. Al desactivar esta opción, se estirará el menú rápido para adaptarlo al contenido cargado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, @@ -6590,7 +6894,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RGUI_MENU_COLOR_THEME, - "Selecciona un esquema de color. «Personalizado» permite utilizar esquemas de menú personalizados." + "Selecciona otro esquema de color. «Personalizado» permite utilizar esquemas de menú personalizados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_THEME_PRESET, @@ -6606,7 +6910,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_SHADOWS, - "Muestra sombras en los textos, bordes y miniaturas del menú. Afecta levemente al rendimiento." + "Muestra sombras en los textos, bordes y miniaturas del menú. Apenas afecta al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT, @@ -6614,7 +6918,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT, - "Activa el efecto de partículas animadas de fondo. Afecta medianamente al rendimiento." + "Activa un efecto de partículas animadas de fondo. Afecta significativamente al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT_SPEED, @@ -6630,7 +6934,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_INLINE_THUMBNAILS, - "Muestra las miniaturas de forma secuencial en las listas de reproducción. Al desactivar esta opción, todavía se puede mostrar la miniatura superior pulsando el botón RetroPad Y." + "Muestra las miniaturas de forma secuencial en las listas de reproducción. Si se desactiva esta opción, la miniatura superior se podrá mostrar a pantalla completa pulsando el botón RetroPad Y." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_RGUI, @@ -6638,7 +6942,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_RGUI, - "Indica las miniaturas que se mostrarán en la parte superior derecha de las listas de reproducción. Podrán mostrarse a pantalla completa pulsando el botón RetroPad Y." + "Indica el tipo de miniatura que se mostrará en la parte superior derecha de las listas de reproducción. Podrán mostrarse a pantalla completa pulsando el botón RetroPad Y." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_RGUI, @@ -6646,7 +6950,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_RGUI, - "Indica las miniaturas que se mostrarán en la parte inferior derecha de las listas de reproducción." + "Indica el tipo de miniatura que se mostrará en la parte inferior derecha de las listas de reproducción." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_SWAP_THUMBNAILS, @@ -6713,7 +7017,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_NONE, - "Desactivado" + "No" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN, @@ -6721,7 +7025,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, - "Escala con valores enteros" + "Escalar usando números enteros" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, @@ -6809,11 +7113,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK, - "Gruvbox oscuro" + "Gruvbox (oscuro)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT, - "Gruvbox claro" + "Gruvbox (claro)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL, @@ -6880,15 +7184,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS, - "Tipo de miniaturas a mostrar en la parte izquierda de la pantalla." + "Indica el tipo de miniatura que se mostrará en la parte izquierda de la pantalla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER, - "Fondo de pantalla dinámico" + "Fondo dinámico" ) MSG_HASH( MENU_ENUM_SUBLABEL_DYNAMIC_WALLPAPER, - "Carga un fondo de pantalla según el contenido." + "Carga un fondo de pantalla según el contexto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_HORIZONTAL_ANIMATION, @@ -6904,7 +7208,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT, - "Indica la animación que aparece al desplazarte entre pestañas." + "Indica la animación que aparece al desplazarte entre secciones." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_MOVE_UP_DOWN, @@ -6952,15 +7256,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_LAYOUT, - "Selecciona otra disposición para la interfaz XMB." + "Selecciona la disposición de la interfaz XMB." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_THEME, - "Tema de iconos del menú" + "Esquema de iconos del menú" ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_THEME, - "Selecciona otro tema de iconos." + "Selecciona otro esquema de iconos de RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, @@ -6968,7 +7272,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Muestra sombras en todos los iconos.\nAfecta levemente al rendimiento." + "Muestra sombras en todos los iconos. Afecta levemente al rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, @@ -6984,11 +7288,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_MENU_COLOR_THEME, - "Selecciona otro color para el fondo." + "Selecciona otro esquema de colores degradados de fondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS, - "Posición vertical de miniaturas" + "Disposición vertical de miniaturas" ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS, @@ -7000,15 +7304,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_XMB_THUMBNAIL_SCALE_FACTOR, - "Reduce el tamaño de las miniaturas mediante un ancho máximo." + "Reduce el tamaño de las miniaturas indicando un ancho máximo." ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Pestaña de opciones" + "Sección de Ajustes" ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Activa la pestaña de opciones. Es necesario reiniciar." + "Muestra la sección de Ajustes (es necesario reiniciar)." ) /* XMB: Settings Options */ @@ -7083,11 +7387,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_SUNBEAM, - "Sol" + "Rayos de sol" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE, - "Violeta" + "Violeta oscuro" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ELECTRIC_BLUE, @@ -7158,7 +7462,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "Quita los nombres de los sistemas de las listas de reproducción (p. ej.: mostrará «PlayStation» en lugar de «Sony - PlayStation»). Es necesario reiniciar." + "Quita los nombres de los sistemas de las listas de reproducción. Por ejemplo, «Sony - PlayStation» pasaría a ser «PlayStation» (es necesario reiniciar)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, @@ -7166,7 +7470,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Al activar esta opción, se volverán a ordenar las listas de reproducción por orden alfabético tras eliminar el componente «sistema» de sus nombres. Es necesario reiniciar." + "Reordena las listas de reproducción por orden alfabético quitando la parte del fabricante de sus nombres (es necesario reiniciar)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, @@ -7174,7 +7478,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME, - "Selecciona otro color." + "Selecciona otro esquema de color." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_WHITE, @@ -7190,7 +7494,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_GRUVBOX_DARK, - "Gruvbox oscuro" + "Gruvbox (oscuro)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, @@ -7206,7 +7510,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SCROLL_CONTENT_METADATA, - "Al activar esta opción, cada elemento de los metadatos de un contenido que se muestren en la barra derecha de las listas de reproducción (núcleo asociado, tiempo de juego...) ocupará únicamente una línea y las cadenas que superen el ancho disponible se desplazarán automáticamente. Al desactivar esta opción, cada elemento de los metadatos se mostrará de forma estática, extendiéndose las líneas que sean necesarias." + "Si se activa esta opción, cada elemento de los metadatos de un contenido que se muestren en la barra derecha de las listas de reproducción (núcleo asociado, tiempo de juego...) ocupará únicamente una línea y las cadenas que superen el ancho disponible se desplazarán automáticamente. Al desactivarla, cada elemento de los metadatos se mostrará de forma estática, ocupando las líneas que sean necesarias." ) /* MaterialUI: Settings > User Interface > Appearance */ @@ -7217,7 +7521,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, - "Muestra iconos a la izquierda de las entradas del menú." + "Muestra iconos a la izquierda de los elementos del menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, @@ -7233,11 +7537,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_SHOW_NAV_BAR, - "Muestra un menú de navegación en pantalla con accesos directos. Permite cambiar rápidamente entre categorías. Recomendado para dispositivos que utilicen pantallas táctiles." + "Muestra un menú permanente de navegación con accesos directos. Permite cambiar rápidamente entre categorías. Recomendado para dispositivos que utilicen pantallas táctiles." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, - "Autorotar barra de navegación" + "Rotar automáticamente la barra de navegación" ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, @@ -7249,7 +7553,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME, - "Selecciona otro color para el fondo." + "Selecciona otro esquema de colores degradados de fondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIMATION, @@ -7257,7 +7561,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_MENU_TRANSITION_ANIMATION, - "Activa los efectos de animación al navegar entre las distintas opciones del menú." + "Permite navegar por las distintas opciones del menú con una animación fluida." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT, @@ -7281,7 +7585,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "Permite mostrar una miniatura secundaria al utilizar los formatos tipo lista de miniaturas en las listas de reproducción. Aviso: Este ajuste sólo tendrá efecto cuando la pantalla tenga el ancho necesario para mostrar dos miniaturas." + "Muestra una miniatura secundaria al utilizar los formatos tipo lista de miniaturas en las listas de reproducción. Este ajuste sólo surtirá efecto cuando la pantalla tenga el ancho suficiente para mostrar dos miniaturas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, @@ -7297,7 +7601,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_MATERIALUI, - "Miniatura principal relacionada con las entradas en las listas de reproducción. Suele ser el icono del contenido." + "Miniatura principal relacionada con cada elemento de las listas de reproducción. Suele ser el icono del contenido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_MATERIALUI, @@ -7305,7 +7609,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_MATERIALUI, - "Miniatura auxiliar asociada con las entradas en las listas de reproducción. Se utilizará en función del modo de miniaturas que esté seleccionado." + "Miniatura auxiliar relacionada con cada elemento de las listas de reproducción. Se utilizará en función del modo de miniaturas que esté seleccionado." ) /* MaterialUI: Settings Options */ @@ -7316,7 +7620,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_BLUE_GREY, - "Azul gris" + "Gris azulado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_DARK_BLUE, @@ -7436,7 +7740,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_DISABLED, - "No" + "Desactivado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_ALWAYS, @@ -7483,7 +7787,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_CLOSED_DOCKS, - "Docks cerrados" + "Ventanas cerradas" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_SHADER_PARAMS, @@ -7491,11 +7795,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, - "&Opciones..." + "&Ajustes..." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_DOCK_POSITIONS, - "Recordar las posiciones de dock:" + "Recordar las posiciones de las ventanas acopladas:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY, @@ -7511,7 +7815,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_SYSTEM_DEFAULT, - "" + "" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK, @@ -7523,11 +7827,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE, - "Opciones" + "Ajustes" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_TOOLS, - "Herramien&tas" + "&Herramientas" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, @@ -7563,11 +7867,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS, - "Listas" + "Listas de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER, - "Explorador" + "Explorador de archivos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_TOP, @@ -7579,11 +7883,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_DOCK_CONTENT_BROWSER, - "Explorador de contenido" + "Explorador de contenidos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_BOXART, - "Caja" + "Carátula" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT, @@ -7595,7 +7899,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ALL_PLAYLISTS, - "Todas las listas" + "Todas las listas de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CORE, @@ -7651,7 +7955,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_HIDDEN_PLAYLISTS, - "Listas ocultas" + "Listas de reproducción ocultas" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_HIDE, @@ -7679,7 +7983,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_PATH_IS_BLANK, - "La ruta al archivo está en blanco." + "La ruta del archivo está en blanco." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_IS_EMPTY, @@ -7687,11 +7991,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_READ_OPEN_FAILED, - "No se pudo leer el archivo." + "No se ha podido leer el archivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_WRITE_OPEN_FAILED, - "No se pudo escribir el archivo." + "No se ha podido escribir el archivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_FILE_DOES_NOT_EXIST, @@ -7731,7 +8035,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SHOW_HIDDEN_FILES, - "Mostrar elementos ocultos" + "Mostrar archivos y carpetas ocultos:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_NEW_PLAYLIST, @@ -7743,15 +8047,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DELETE_PLAYLIST, - "Borrar lista" + "Eliminar lista de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_RENAME_PLAYLIST, - "Renombrar lista" + "Renombrar lista de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CONFIRM_DELETE_PLAYLIST, - "¿Seguro que quieres borrar la lista «%1»?" + "¿Seguro que quieres eliminar la lista %1?" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_QUESTION, @@ -7759,15 +8063,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_DELETE_FILE, - "No se pudo borrar el archivo." + "No se pudo eliminar el archivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_RENAME_FILE, - "No se pudo renombrar el archivo." + "No se ha podido renombrar el archivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_GATHERING_LIST_OF_FILES, - "Cargando lista de archivos..." + "Creando lista de archivos..." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ADDING_FILES_TO_PLAYLIST, @@ -7775,7 +8079,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY, - "Entrada de la lista" + "Elemento de la lista" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_NAME, @@ -7799,7 +8103,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_EXTENSIONS_PLACEHOLDER, - "(separar con espacios; incluye a todas por defecto)" + "(separar con espacios; incluye todas por defecto)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_FILTER_INSIDE_ARCHIVES, @@ -7811,7 +8115,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CONFIRM_DELETE_PLAYLIST_ITEM, - "¿Seguro que quieres borrar «%1»?" + "¿Seguro que quieres eliminar el elemento %1?" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CANNOT_ADD_TO_ALL_PLAYLISTS, @@ -7819,11 +8123,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DELETE, - "Borrar" + "Eliminar" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ADD_ENTRY, - "Agregar entrada..." + "Agregar elemento..." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ADD_FILES, @@ -7851,7 +8155,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_UPDATE_PLAYLIST_ENTRY, - "Error al actualizar la entrada de la lista." + "Error al actualizar el elemento de la lista." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_PLEASE_FILL_OUT_REQUIRED_FIELDS, @@ -7859,11 +8163,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_NIGHTLY, - "Actualizar RetroArch (nightly)" + "Actualizar RetroArch («nightly»)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_FINISHED, - "RetroArch ha sido actualizado. Reinicie la aplicación para aplicar los cambios." + "RetroArch ha sido actualizado. Reinicia la aplicación para aplicar los cambios." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_FAILED, @@ -7871,7 +8175,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT_CONTRIBUTORS, - "Contribuyentes" + "Colaboradores" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CURRENT_SHADER, @@ -7951,7 +8255,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_DROP_SIZE_LIMIT, - "Límite del tamaño de miniaturas al arrastrar:" + "Límite del tamaño de miniaturas arrastradas:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS, @@ -7959,11 +8263,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS_ENTIRE_SYSTEM, - "Sistema completo" + "Todo el sistema" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS_THIS_PLAYLIST, - "Esta lista" + "Esta lista de reproducción" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_PACK_DOWNLOADED_SUCCESSFULLY, @@ -8038,7 +8342,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY, - "Selecciona un contenido de la lista de contenidos recientes." + "Selecciona un contenido de la lista del historial." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS, @@ -8046,7 +8350,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETPLAY_HOSTS_FOUND, - "No se han encontrado anfitriones." + "No se han encontrado servidores de juego en red." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PERFORMANCE_COUNTERS, @@ -8056,6 +8360,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "No hay listas de reproducción." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Conectado" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "En línea" @@ -8066,7 +8374,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SETTINGS, - "Opciones de trucos" + "Ajustes de trucos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_SETTINGS, @@ -8118,11 +8426,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_PARAMETERS, - "Modifica el preset de shader que se usa actualmente en el menú." + "Modifica el preajuste de shaders que se utiliza actualmente en el menú." ) MSG_HASH( MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO, - "Preset de shader" + "Preajuste de shaders" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, @@ -8142,7 +8450,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND, - "Contenido compatible encontrado" + "Se ha encontrado contenido compatible" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_GONG, @@ -8157,7 +8465,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Apodo (lan): %s" + "Apodo (LAN): %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -8181,7 +8489,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_USE_OUTPUT_DIRECTORY, - "Usar carpeta de salida" + "Guardar grabaciones en directorio de salida" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_MATCH_IDX, @@ -8189,7 +8497,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_MATCH_IDX, - "Selecciona una coincidencia." + "Selecciona la coincidencia que quieres ver." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_ASPECT, @@ -8205,7 +8513,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME, - "Reanuda la ejecución del contenido y abandona el menú rápido." + "Reanuda el contenido actual y abandona el menú rápido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_VIEW_MATCHES, @@ -8217,7 +8525,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_OPTION, - "Borrar esta coincidencia" + "Eliminar esta coincidencia" ) MSG_HASH( /* FIXME Still exists in a comment about being removed */ MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_FOOTER_OPACITY, @@ -8237,7 +8545,7 @@ MSG_HASH( /* FIXME Still exists in a comment about being removed */ ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE, - "Activar juego en red" + "Juego en red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT, @@ -8245,7 +8553,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_PATH, - "Ruta del historial" + "Ruta del historial de contenidos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_OUTPUT_DISPLAY_ID, @@ -8273,7 +8581,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_SCANNING_CONTENT, - "Buscando contenido" + "Buscando contenidos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_WHAT_IS_A_CORE, @@ -8293,15 +8601,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_DELAY_FRAMES, - "Juego en red: retrasar fotogramas" + "Retrasar fotogramas durante el juego en red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_LAN_SCAN_SETTINGS, - "Buscar red local" + "Buscar en red local" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_LAN_SCAN_SETTINGS, - "Buscar sesiones de juego en red en la red local." + "Busca servidores de juego en red en la red local." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_MODE, @@ -8309,7 +8617,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATOR_MODE_ENABLE, - "Juego en red: activar espectadores" + "Activar modo espectador en el juego en red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_DESCRIPTION, @@ -8368,19 +8676,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X, - "Analógico izq. X" + "Analógico izdo. X" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y, - "Analógico izq. Y" + "Analógico izdo. Y" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X, - "Analógico der. X" + "Analógico dcho. X" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y, - "Analógico der. Y" + "Analógico dcho. Y" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_SETTINGS, @@ -8432,11 +8740,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_RELEASEDATE_BY_MONTH, - "Filtro de base de datos: lanzamiento por mes" + "Filtro de base de datos: mes de lanzamiento" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_RELEASEDATE_BY_YEAR, - "Filtro de base de datos: lanzamiento por año" + "Filtro de base de datos: año de lanzamiento" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_CURSOR_LIST_ENTRY_EDGE_MAGAZINE_ISSUE, @@ -8460,7 +8768,7 @@ MSG_HASH( /* FIXME Seems related to MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS, - "Configurar juego en red" + "Ajustes de juego en red" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SLANG_SUPPORT, @@ -8496,7 +8804,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_QUIT, - "Salir" + "Cerrar RetroArch" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_SCROLL_UP, @@ -8519,7 +8827,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_IN_MENU, - "En el menú" + "Dentro del menú" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME, @@ -8527,7 +8835,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED, - "Dentro del juego (Pausado)" + "Dentro del juego (pausado)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING, @@ -8546,7 +8854,7 @@ MSG_HASH( /* FIXME Should be MSG_ */ ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, - "No se encontró el núcleo o contenido, hay que cargarlo manualmente." + "No se encontró el núcleo o contenido. Hay que cargarlos manualmente." ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER_FALLBACK, @@ -8562,7 +8870,7 @@ MSG_HASH( /* FIXME Should be MSG_ */ ) MSG_HASH( MSG_CHEAT_DELETE_ALL_INSTRUCTIONS, - "Presiona derecha cinco veces para borrar todos los trucos." + "Presiona derecha cinco veces para eliminar todos los trucos." ) MSG_HASH( MSG_FAILED_TO_SAVE_DEBUG_INFO, @@ -8582,7 +8890,7 @@ MSG_HASH( ) MSG_HASH( MSG_PRESS_TWO_MORE_TIMES_TO_SEND_DEBUG_INFO, - "Vuelve a pulsar el botón dos veces para enviar la información de diagnóstico al equipo de RetroArch." + "Pulsa el botón otras dos veces más para enviar la información de diagnóstico al equipo de RetroArch." ) MSG_HASH( MSG_PRESS_ONE_MORE_TIME_TO_SEND_DEBUG_INFO, @@ -8598,7 +8906,7 @@ MSG_HASH( ) MSG_HASH( MSG_SORRY_UNIMPLEMENTED_CORES_DONT_DEMAND_CONTENT_NETPLAY, - "Lo sentimos, este sistema no está implementado: los núcleos que no requieren contenido no pueden participar en el juego en red." + "Lo sentimos, este sistema no está implementado: los núcleos que no requieren contenidos no pueden usar el juego en red." ) MSG_HASH( MSG_NATIVE, @@ -8634,7 +8942,7 @@ MSG_HASH( ) MSG_HASH( MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "No se pasaron argumentos y no hay menú integrado, mostrando ayuda..." + "No se presentaron argumentos y no hay menú integrado, mostrando ayuda..." ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, @@ -8682,7 +8990,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_DIFFERENT_CORES, - "Un cliente de juego en red está utilizando una versión distinta del núcleo. No se puede conectar con el cliente." + "Un cliente de juego en red está utilizando un núcleo distinto. No se puede conectar con el cliente." ) MSG_HASH( MSG_NETPLAY_DIFFERENT_CORE_VERSIONS, @@ -8690,15 +8998,15 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_ENDIAN_DEPENDENT, - "Este núcleo no es compatible con el juego en red entre diferentes arquitecturas de sistemas" + "Este núcleo no permite el juego en red entre las arquitecturas de estos sistemas" ) MSG_HASH( MSG_NETPLAY_PLATFORM_DEPENDENT, - "Este núcleo no es compatible con el juego en red entre diferentes sistemas" + "Este núcleo no permite el juego en red entre diferentes sistemas" ) MSG_HASH( MSG_NETPLAY_ENTER_PASSWORD, - "Introducir la contraseña del servidor de juego en red:" + "Introduce la contraseña del servidor de juego en red:" ) MSG_HASH( MSG_DISCORD_CONNECTION_REQUEST, @@ -8710,7 +9018,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_SERVER_NAMED_HANGUP, - "\"%s\" se ha desconectado" + "«%s» se ha desconectado" ) MSG_HASH( MSG_NETPLAY_SERVER_HANGUP, @@ -8718,7 +9026,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_CLIENT_HANGUP, - "Te has desconectado del juego en red" + "La sesión del juego en red ha sido desconectada" ) MSG_HASH( MSG_NETPLAY_CANNOT_PLAY_UNPRIVILEGED, @@ -8726,7 +9034,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_CANNOT_PLAY_NO_SLOTS, - "No hay espacios para jugadores disponibles" + "No hay sitio para más jugadores" ) MSG_HASH( MSG_NETPLAY_CANNOT_PLAY_NOT_AVAILABLE, @@ -8738,11 +9046,11 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_PEER_PAUSED, - "El cliente de juego en red \"%s\" está pausado" + "El cliente de juego en red «%s» está pausado" ) MSG_HASH( MSG_NETPLAY_CHANGED_NICK, - "Tu apodo pasa a ser a \"%s\"" + "Tu apodo ha sido cambiado a «%s»" ) MSG_HASH( MSG_AUDIO_VOLUME, @@ -8750,23 +9058,23 @@ MSG_HASH( ) MSG_HASH( MSG_AUTODETECT, - "Autodetectar" + "Detección automática" ) MSG_HASH( MSG_AUTOLOADING_SAVESTATE_FROM, - "Cargando guardado rápido desde" + "Cargando guardado rápido automáticamente desde" ) MSG_HASH( MSG_CAPABILITIES, - "Capacidades" + "Funcionalidades" ) MSG_HASH( MSG_CONNECTING_TO_NETPLAY_HOST, - "Conectando al servidor de juego en red" + "Conectando a servidor de juego en red" ) MSG_HASH( MSG_CONNECTING_TO_PORT, - "Conectando al puerto" + "Conectando a puerto" ) MSG_HASH( MSG_CONNECTION_SLOT, @@ -8782,7 +9090,7 @@ MSG_HASH( ) MSG_HASH( MSG_LATEST_CORE_INSTALLED, - "Última versión ya instalada: " + "Última versión instalada: " ) MSG_HASH( MSG_UPDATING_CORE, @@ -8802,7 +9110,7 @@ MSG_HASH( ) MSG_HASH( MSG_SCANNING_CORES, - "Escaneando núcleos..." + "Buscando núcleos..." ) MSG_HASH( MSG_CHECKING_CORE, @@ -8816,6 +9124,14 @@ MSG_HASH( MSG_NUM_CORES_UPDATED, "núcleos actualizados: " ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "núcleos omitidos: " + ) +MSG_HASH( + MSG_CORE_UPDATE_DISABLED, + "Actualización de núcleo desactivada, el núcleo está protegido: " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "Reiniciando núcleos: " @@ -8830,7 +9146,7 @@ MSG_HASH( ) MSG_HASH( MSG_PLAYLIST_MANAGER_PLAYLIST_CLEANED, - "Lista de reproducción limpiada: " + "Se ha limpiado la lista de reproducción: " ) MSG_HASH( MSG_ADDED_TO_FAVORITES, @@ -8846,7 +9162,7 @@ MSG_HASH( ) MSG_HASH( MSG_RESET_CORE_ASSOCIATION, - "Se ha restablecido la asociación del núcleo de la entrada de la lista." + "Se ha restablecido la asociación del núcleo del elemento de la lista." ) MSG_HASH( MSG_APPENDED_DISK, @@ -8862,7 +9178,7 @@ MSG_HASH( ) MSG_HASH( MSG_APPLYING_CHEAT, - "Aplicando trucos." + "Aplicando cambios en los trucos." ) MSG_HASH( MSG_APPLYING_SHADER, @@ -8874,7 +9190,7 @@ MSG_HASH( ) MSG_HASH( MSG_AUDIO_UNMUTED, - "Silencio desactivado." + "Audio habilitado." ) MSG_HASH( MSG_AUTOCONFIG_FILE_ERROR_SAVING, @@ -8882,7 +9198,7 @@ MSG_HASH( ) MSG_HASH( MSG_AUTOCONFIG_FILE_SAVED_SUCCESSFULLY, - "El archivo de autoconfiguración ha sido guardado." + "Se ha guardado el archivo de autoconfiguración." ) MSG_HASH( MSG_AUTOSAVE_FAILED, @@ -8894,7 +9210,7 @@ MSG_HASH( ) MSG_HASH( MSG_BLOCKING_SRAM_OVERWRITE, - "Bloqueando sobrescritura de SaveRAM" + "Bloqueando sobrescritura de SRAM" ) MSG_HASH( MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT, @@ -8906,7 +9222,7 @@ MSG_HASH( ) MSG_HASH( MSG_CHEEVOS_HARDCORE_MODE_ENABLE, - "Modo Hardcore activado, guardado rápido y rebobinado desactivados." + "Modo Hardcore activado. Se ha desactivado el guardado rápido y el rebobinado." ) MSG_HASH( MSG_COMPARING_WITH_KNOWN_MAGIC_NUMBERS, @@ -8918,7 +9234,7 @@ MSG_HASH( ) MSG_HASH( MSG_CONFIG_DIRECTORY_NOT_SET, - "Carpeta de configuración no establecida. No se puede guardar la configuración." + "Directorio de configuración no establecido. No se puede guardar la nueva configuración." ) MSG_HASH( MSG_CONNECTED_TO, @@ -8938,19 +9254,19 @@ MSG_HASH( ) MSG_HASH( MSG_CORE_OPTIONS_FILE_CREATED_SUCCESSFULLY, - "El archivo de opciones del núcleo ha sido creado." + "Se ha creado el archivo de opciones del núcleo." ) MSG_HASH( MSG_COULD_NOT_FIND_ANY_NEXT_DRIVER, - "No se encuentra otro controlador" + "No se encontró otro controlador." ) MSG_HASH( MSG_COULD_NOT_FIND_COMPATIBLE_SYSTEM, - "No se encuentra un sistema compatible." + "No se encontró un sistema compatible." ) MSG_HASH( MSG_COULD_NOT_FIND_VALID_DATA_TRACK, - "No se encuentra una pista de datos válida" + "No se encontró una pista de datos válida." ) MSG_HASH( MSG_COULD_NOT_OPEN_DATA_TRACK, @@ -8970,7 +9286,7 @@ MSG_HASH( ) MSG_HASH( MSG_CRC32_CHECKSUM_MISMATCH, - "El CRC32 del contenido no concuerda con el de la repetición. Es muy probable que la reproducción se desincronice." + "El CRC32 del contenido no concuerda con el de la cabecera de la repetición. Es muy probable que la reproducción se desincronice." ) MSG_HASH( MSG_CUSTOM_TIMING_GIVEN, @@ -8978,7 +9294,7 @@ MSG_HASH( ) MSG_HASH( MSG_DECOMPRESSION_ALREADY_IN_PROGRESS, - "Descomprimiendo." + "El archivo ya está siendo descomprimido." ) MSG_HASH( MSG_DECOMPRESSION_FAILED, @@ -9018,11 +9334,11 @@ MSG_HASH( ) MSG_HASH( MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT, - "El núcleo Libretro necesita contenido, pero no fue provisto." + "Este núcleo Libretro necesita contenidos, pero no se ha suministrado ninguno." ) MSG_HASH( MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT, - "El núcleo Libretro necesita un contenido especial, pero no fue provisto." + "Este núcleo Libretro necesita contenidos especiales, pero no se ha suministrado ninguno." ) MSG_HASH( MSG_ERROR_LIBRETRO_CORE_REQUIRES_VFS, @@ -9030,7 +9346,7 @@ MSG_HASH( ) MSG_HASH( MSG_ERROR_PARSING_ARGUMENTS, - "Error al analizar argumentos." + "Error al analizar los argumentos." ) MSG_HASH( MSG_ERROR_SAVING_CORE_OPTIONS_FILE, @@ -9046,11 +9362,11 @@ MSG_HASH( ) MSG_HASH( MSG_ERROR_SAVING_SHADER_PRESET, - "Error al guardar el preset de shaders." + "Error al guardar el preajuste de shaders." ) MSG_HASH( MSG_EXTERNAL_APPLICATION_DIR, - "Carpeta externa a la aplicación" + "Directorio externo a la aplicación" ) MSG_HASH( MSG_EXTRACTING, @@ -9082,7 +9398,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_APPLY_SHADER_PRESET, - "Error al aplicar el preset de shaders:" + "Error al aplicar el preajuste de shaders:" ) MSG_HASH( MSG_FAILED_TO_BIND_SOCKET, @@ -9090,11 +9406,11 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_CREATE_THE_DIRECTORY, - "Error al crear la carpeta." + "Error al crear el directorio." ) MSG_HASH( MSG_FAILED_TO_EXTRACT_CONTENT_FROM_COMPRESSED_FILE, - "Error al extraer el contenido del archivo comprimido" + "Error al extraer los contenidos del archivo comprimido" ) MSG_HASH( MSG_FAILED_TO_GET_NICKNAME_FROM_CLIENT, @@ -9130,7 +9446,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_RECEIVE_HEADER_FROM_CLIENT, - "Error al recibir el encabezado desde el cliente." + "Error al recibir el encabezado del cliente." ) MSG_HASH( MSG_FAILED_TO_RECEIVE_NICKNAME, @@ -9146,7 +9462,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_RECEIVE_SRAM_DATA_FROM_HOST, - "Error al recibir los datos SaveRAM del servidor." + "Error al recibir los datos SRAM del servidor." ) MSG_HASH( MSG_FAILED_TO_REMOVE_DISK_FROM_TRAY, @@ -9154,15 +9470,15 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_REMOVE_TEMPORARY_FILE, - "Error al eliminar el archivo temporal" + "Error al eliminar el archivo temporal." ) MSG_HASH( MSG_FAILED_TO_SAVE_SRAM, - "Error al guardar SaveRAM" + "Error al guardar la SRAM" ) MSG_HASH( MSG_FAILED_TO_SAVE_STATE_TO, - "Error al guardar en" + "Error a crear un guardado rápido en" ) MSG_HASH( MSG_FAILED_TO_SEND_NICKNAME, @@ -9182,7 +9498,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_SEND_SRAM_DATA_TO_CLIENT, - "Error al enviar datos SaveRAM al cliente." + "Error al enviar los datos de SRAM al cliente." ) MSG_HASH( MSG_FAILED_TO_START_AUDIO_DRIVER, @@ -9190,23 +9506,23 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_START_MOVIE_RECORD, - "Error al iniciar clip de grabación." + "Error al iniciar la grabación." ) MSG_HASH( MSG_FAILED_TO_START_RECORDING, - "Error al iniciar grabación." + "Error al iniciar la grabación." ) MSG_HASH( MSG_FAILED_TO_TAKE_SCREENSHOT, - "Error al capturar pantalla." + "Error al capturar la pantalla." ) MSG_HASH( MSG_FAILED_TO_UNDO_LOAD_STATE, - "Error al deshacer carga." + "Error al deshacer la carga rápida." ) MSG_HASH( MSG_FAILED_TO_UNDO_SAVE_STATE, - "Error al deshacer guardado." + "Error al deshacer el guardado rápido." ) MSG_HASH( MSG_FAILED_TO_UNMUTE_AUDIO, @@ -9214,7 +9530,7 @@ MSG_HASH( ) MSG_HASH( MSG_FATAL_ERROR_RECEIVED_IN, - "Error fatal recibido en" + "Error fatal en" ) MSG_HASH( MSG_FILE_NOT_FOUND, @@ -9222,23 +9538,23 @@ MSG_HASH( ) MSG_HASH( MSG_FOUND_AUTO_SAVESTATE_IN, - "Autoguardado localizado en" + "Guardado rápido automático localizado en" ) MSG_HASH( MSG_FOUND_DISK_LABEL, - "Encontrada la etiqueta del disco" + "Se ha localizado la etiqueta del disco" ) MSG_HASH( MSG_FOUND_FIRST_DATA_TRACK_ON_FILE, - "Encontrada la primer pista de datos del archivo" + "Se ha localizado la primera pista de datos del archivo" ) MSG_HASH( MSG_FOUND_LAST_STATE_SLOT, - "Encontrada la última posición de guardado rápido" + "Se ha localizado la última posición de guardado rápido" ) MSG_HASH( MSG_FOUND_SHADER, - "Encontrado el shader" + "Se ha localizado un shader" ) MSG_HASH( MSG_FRAMES, @@ -9266,7 +9582,7 @@ MSG_HASH( ) MSG_HASH( MSG_HW_RENDERED_MUST_USE_POSTSHADED_RECORDING, - "El núcleo Libretro se renderiza por hardware. Las grabaciones deben tener shaders aplicados." + "Este núcleo Libretro se renderiza por hardware. Las grabaciones deben tener shaders aplicados." ) MSG_HASH( MSG_INFLATED_CHECKSUM_DID_NOT_MATCH_CRC32, @@ -9282,7 +9598,7 @@ MSG_HASH( ) MSG_HASH( MSG_INPUT_PRESET_FILENAME, - "Introducir nombre de archivo del preset" + "Introducir nombre de archivo del preajuste" ) MSG_HASH( MSG_INPUT_RENAME_ENTRY, @@ -9318,7 +9634,7 @@ MSG_HASH( ) MSG_HASH( MSG_LIBRETRO_ABI_BREAK, - "está compilado para otra versión de Libretro" + "está compilado para una versión diferente de Libretro." ) MSG_HASH( MSG_LIBRETRO_FRONTEND, @@ -9326,11 +9642,11 @@ MSG_HASH( ) MSG_HASH( MSG_LOADED_STATE_FROM_SLOT, - "Guardado rápido n.º %d cargado." + "Carga del guardado rápido n.º %d terminada." ) MSG_HASH( MSG_LOADED_STATE_FROM_SLOT_AUTO, - "Guardado rápido #-1 (autom.) cargado." + "Carga del guardado rápido n.º -1 (automático) terminada." ) MSG_HASH( MSG_LOADING, @@ -9378,7 +9694,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_FAILED, - "Error al iniciar juego en red." + "Error al iniciar el juego en red." ) MSG_HASH( MSG_NO_CONTENT_STARTING_DUMMY_CORE, @@ -9430,15 +9746,15 @@ MSG_HASH( ) MSG_HASH( MSG_REDIRECTING_SAVESTATE_TO, - "Redirigiendo archivo de guardado rápido a" + "Redirigiendo guardado rápido a" ) MSG_HASH( MSG_REMAP_FILE_SAVED_SUCCESSFULLY, - "La reasignación ha sido guardada." + "El archivo de reasignación ha sido guardado." ) MSG_HASH( MSG_REMAP_FILE_REMOVED_SUCCESSFULLY, - "La reasignación ha sido eliminada." + "El archivo de reasignación ha sido eliminado." ) MSG_HASH( MSG_REMOVED_DISK_FROM_TRAY, @@ -9454,23 +9770,23 @@ MSG_HASH( ) MSG_HASH( MSG_RESTARTING_RECORDING_DUE_TO_DRIVER_REINIT, - "Reiniciando grabación por reinicio del controlador." + "Reanudando grabación por reinicio del controlador." ) MSG_HASH( MSG_RESTORED_OLD_SAVE_STATE, - "Restaurado antiguo guardado rápido." + "El antiguo guardado rápido ha sido restaurado." ) MSG_HASH( MSG_RESTORING_DEFAULT_SHADER_PRESET_TO, - "Shaders: restaurado el preset por defecto en" + "Shaders: restaurando el preajuste predeterminado en" ) MSG_HASH( MSG_REVERTING_SAVEFILE_DIRECTORY_TO, - "Revirtiendo la carpeta de guardado a" + "Revirtiendo el directorio de archivos de guardado a" ) MSG_HASH( MSG_REVERTING_SAVESTATE_DIRECTORY_TO, - "Revirtiendo la carpeta de guardado rápido a" + "Revirtiendo el directorio de guardados rápidos a" ) MSG_HASH( MSG_REWINDING, @@ -9482,7 +9798,7 @@ MSG_HASH( ) MSG_HASH( MSG_REWIND_INIT_FAILED, - "Error al iniciar el buffer. El rebobinado se desactivará." + "Error al iniciar el búfer de rebobinado. La función de rebobinado se desactivará." ) MSG_HASH( MSG_REWIND_INIT_FAILED_THREADED_AUDIO, @@ -9490,19 +9806,19 @@ MSG_HASH( ) MSG_HASH( MSG_REWIND_REACHED_END, - "Se ha alcanzado el final del buffer de rebobinado." + "Se ha alcanzado el final del búfer de rebobinado." ) MSG_HASH( MSG_SAVED_NEW_CONFIG_TO, - "Guardada nueva configuración en" + "Se ha guardado una nueva configuración en" ) MSG_HASH( MSG_SAVED_STATE_TO_SLOT, - "Guardado rápido en la posición %d terminado." + "Guardado rápido n.º %d terminado." ) MSG_HASH( MSG_SAVED_STATE_TO_SLOT_AUTO, - "Guardado rápido en la posición #-1 (autom.) terminado." + "Guardado rápido n.º -1 (automático) terminado." ) MSG_HASH( MSG_SAVED_SUCCESSFULLY_TO, @@ -9522,7 +9838,7 @@ MSG_HASH( ) MSG_HASH( MSG_SCANNING_OF_DIRECTORY_FINISHED, - "Búsqueda de carpeta finalizada." + "El directorio ha sido escaneado" ) MSG_HASH( MSG_SENDING_COMMAND, @@ -9530,11 +9846,11 @@ MSG_HASH( ) MSG_HASH( MSG_SEVERAL_PATCHES_ARE_EXPLICITLY_DEFINED, - "Hay varios parches definidos explícitamente, ignorando todos..." + "Hay varios parches definidos explícitamente, ignorándolos todos..." ) MSG_HASH( MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, - "Preset de shaders guardado." + "Se ha guardado el preajuste de shaders." ) MSG_HASH( MSG_SKIPPING_SRAM_LOAD, @@ -9566,15 +9882,15 @@ MSG_HASH( ) MSG_HASH( MSG_STATE_SIZE, - "Tamaño del guardado" + "Tamaño del guardado rápido" ) MSG_HASH( MSG_STATE_SLOT, - "Posición de guardado" + "Posición de guardado rápido" ) MSG_HASH( MSG_TAKING_SCREENSHOT, - "Capturando pantalla" + "Capturando pantalla." ) MSG_HASH( MSG_SCREENSHOT_SAVED, @@ -9602,7 +9918,7 @@ MSG_HASH( ) MSG_HASH( MSG_PRESS_AGAIN_TO_QUIT, - "Vuelve a pulsar para salir..." + "Vuelve a pulsar la tecla para cerrar RetroArch..." ) MSG_HASH( MSG_TO, @@ -9630,11 +9946,11 @@ MSG_HASH( ) MSG_HASH( MSG_USING_CORE_NAME_FOR_NEW_CONFIG, - "Usando el nombre del núcleo para la nueva configuración." + "Utilizando el nombre del núcleo para la nueva configuración." ) MSG_HASH( MSG_USING_LIBRETRO_DUMMY_CORE_RECORDING_SKIPPED, - "Usando núcleo vacío. Omitiendo grabación." + "Usando núcleo libretro vacío. Omitiendo grabación." ) MSG_HASH( MSG_VALUE_CONNECT_DEVICE_FROM_A_VALID_PORT, @@ -9688,17 +10004,25 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "no configurado, usando respaldo" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Búsqueda de Bluetooth finalizada." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Búsqueda de señales wifi finalizada." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Buscando dispositivos con Bluetooth..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Buscando redes inalámbricas..." ) MSG_HASH( MSG_NETPLAY_LAN_SCANNING, - "Buscando sesiones de juego en red..." + "Buscando servidores de juego en red..." ) MSG_HASH( MSG_PREPARING_FOR_CONTENT_SCAN, @@ -9730,23 +10054,23 @@ MSG_HASH( ) MSG_HASH( MSG_CONFIG_OVERRIDE_LOADED, - "Configuración personalizada cargada." + "Se ha cargado la configuración personalizada." ) MSG_HASH( MSG_GAME_REMAP_FILE_LOADED, - "Archivo de reasignaciones de juego cargado." + "Se ha cargado el archivo de reasignaciones de juego." ) MSG_HASH( MSG_DIRECTORY_REMAP_FILE_LOADED, - "Cargado archivo de reasignación de carpeta de contenidos." + "Cargado archivo de reasignación de directorio de contenidos." ) MSG_HASH( MSG_CORE_REMAP_FILE_LOADED, - "Archivo de reasignaciones de núcleo cargado." + "Se ha cargado el archivo de reasignaciones del núcleo." ) MSG_HASH( MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES, - "La reducción de latencia predictiva ha sido desactivada porque este núcleo no es compatible con guardados rápidos." + "La reducción predictiva ha sido desactivada porque este núcleo no es compatible con guardados rápidos." ) MSG_HASH( MSG_RUNAHEAD_FAILED_TO_SAVE_STATE, @@ -9758,7 +10082,7 @@ MSG_HASH( ) MSG_HASH( MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE, - "Error al crear la segunda instancia. La reducción predictiva solo usará una a partir de este momento." + "Error al crear la segunda instancia. La reducción predictiva solo usará una instancia a partir de este momento." ) MSG_HASH( MSG_SCANNING_OF_FILE_FINISHED, @@ -9798,7 +10122,7 @@ MSG_HASH( ) MSG_HASH( MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS, - "Borrar coincidencia" + "Se ha eliminado la coincidencia" ) MSG_HASH( MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY, @@ -9814,7 +10138,7 @@ MSG_HASH( ) MSG_HASH( MSG_CHEAT_DELETE_ALL_SUCCESS, - "Todos los trucos fueron borrados." + "Se han eliminado todos los trucos." ) MSG_HASH( MSG_CHEAT_ADD_BEFORE_SUCCESS, @@ -9834,7 +10158,7 @@ MSG_HASH( ) MSG_HASH( MSG_CHEAT_DELETE_SUCCESS, - "Truco borrado." + "Truco eliminado." ) MSG_HASH( MSG_DEVICE_CONFIGURED_IN_PORT, @@ -9846,7 +10170,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_SET_INITIAL_DISK, - "Error al establecer el último disco usado..." + "Error al asignar el último disco usado..." ) MSG_HASH( MSG_CHEEVOS_HARDCORE_MODE_DISABLED, @@ -9870,11 +10194,11 @@ MSG_HASH( ) MSG_HASH( MSG_RESAMPLER_QUALITY_HIGHEST, - "Ultra" + "Máxima" ) MSG_HASH( MSG_MISSING_ASSETS, - "ADVERTENCIA: Faltan recursos, utiliza el actualizador en línea si está disponible" + "Advertencia: Faltan recursos, utiliza el actualizador en línea si está disponible" ) MSG_HASH( MSG_DUMPING_DISC, @@ -9902,11 +10226,11 @@ MSG_HASH( ) MSG_HASH( MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY, - "Preset de shaders eliminado." + "Se ha eliminado el preajuste de shaders." ) MSG_HASH( MSG_ERROR_REMOVING_SHADER_PRESET, - "Error al eliminar el preset de shaders." + "Error al eliminar el preajuste de shaders." ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_DAT_FILE_INVALID, @@ -9918,7 +10242,7 @@ MSG_HASH( ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_DAT_FILE_LOAD_ERROR, - "Ha habido un error al cargar el archivo DAT de arcade (¿el formato no es válido?)" + "Error al cargar el archivo DAT de arcade (¿el formato no es válido?)" ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_INVALID_CONFIG, @@ -9938,12 +10262,92 @@ MSG_HASH( ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_M3U_CLEANUP, - "Limpiando entradas en archivo M3U: " + "Limpiando elementos de archivo M3U: " ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "Escaneo finalizado: " ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "Escaneando núcleo: " + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "Ya existe una copia de seguridad del núcleo instalado: " + ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "Haciendo copia de seguridad del núcleo: " + ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "Eliminando copias de seguridad obsoletas: " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Se ha completado la copia de seguridad del núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "La copia de seguridad seleccionada ya está instalada: " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "Restaurando núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "Se ha restaurado el núcleo: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "El archivo de núcleo seleccionado ya está instalado: " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "Instalando núcleo: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "Núcleo instalado: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "Se ha seleccionado un archivo de núcleo no válido: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Error al hacer la copia de seguridad del núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "Error al restaurar la copia de seguridad del núcleo: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Error al instalar el núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "Restauración de núcleo desactivada, el núcleo está protegido: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "Instalación de núcleo desactivada, el núcleo está protegido: " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "Error al proteger el núcleo: " + ) +MSG_HASH( + MSG_CORE_UNLOCK_FAILED, + "Error al desproteger el núcleo: " + ) +MSG_HASH( + MSG_CORE_DELETE_DISABLED, + "Eliminación de núcleo desactivada, el núcleo está protegido: " + ) /* Lakka */ @@ -9976,11 +10380,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR, - "Escala de los gráficos de Widgets" + "Personalizar escala de widgets gráficos" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "Aplica un valor a la escala de los gráficos de widgets. Solo aplica cuando 'Escala automática de los gráficos de Widgets' esta deactivado. Se puede utilizar para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles independientemente del propio menú." + "Aplica un valor de escalado personalizado a los widgets gráficos. Solo se utilizará cuando la opción Escalar widgets gráficos automáticamente esté desactivada. Sirve para aumentar o disminuir el tamaño de las notificaciones, indicadores y controles de forma independiente al menú." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, @@ -10004,11 +10408,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_PICKER, - "Abre otra carpeta mediante el explorador de archivos del sistema." + "Abre otro directorio mediante el explorador de archivos del sistema." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_FLICKER, - "Filtro de parpadeo" + "Filtro antiparpadeo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GAMMA, @@ -10018,6 +10422,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Filtro de suavizado" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Busca dispositivos con Bluetooth para conectarse a ellos." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, "Wifi" @@ -10062,9 +10470,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "Reiniciar RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "Cierra y reinicia RetroArch. Es necesario para activar ciertos cambios de menú (por ejemplo, al cambiar el controlador de menú)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, - "Bloquear fotogramas" + "Fotogramas por trama de audio" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_PREFER_FRONT_TOUCH, @@ -10076,11 +10488,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Activar asignación de teclado/mando" + "Asignación de mando a teclado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Tipo de asignación de teclado/mando" + "Tipo de asignación de mando a teclado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, @@ -10110,6 +10522,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "Muestra la opción «Apagar»." ) +MSG_HASH( + MSG_INTERNET_RELAY, + "Internet (relé)" + ) +MSG_HASH( + MSG_READ_WRITE, + "Lectura/escritura" + ) +MSG_HASH( + MSG_READ_ONLY, + "Solo lectura" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( @@ -10118,7 +10542,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SWITCH_GPU_PROFILE, - "Ajusta la velocidad de la GPU." + "Aumenta o reduce la velocidad de la GPU de Switch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SWITCH_BACKLIGHT_CONTROL, @@ -10126,7 +10550,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL, - "Ajusta el brillo de la pantalla." + "Aumenta o reduce el brillo de la pantalla de Switch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REBOOT_RCM, @@ -10140,7 +10564,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SWITCH_CPU_PROFILE, - "Acelera la CPU." + "Acelera la CPU de Switch." ) #endif #ifdef HAVE_LAKKA @@ -10160,17 +10584,9 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SERVICES_SETTINGS, "Administra los servicios del sistema operativo." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAMBA_ENABLE, - "Activar SAMBA" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SAMBA_ENABLE, - "Activa o desactiva el compartido de carpetas en red mediante el protocolo SMB." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SSH_ENABLE, - "Activar SSH" + "Permite compartir carpetas en red mediante el protocolo SMB." ) MSG_HASH( MENU_ENUM_SUBLABEL_SSH_ENABLE, @@ -10210,7 +10626,7 @@ MSG_HASH( ) MSG_HASH( MSG_LOCALAP_ERROR_CONFIG_PARSE, - "Archivo de configuración incorrecto: no se han podido encontrar los valores APNAME o PASSWORD en %s" + "Archivo de configuración incorrecto: no se encontraron los valores APNAME o PASSWORD en %s" ) #endif #ifdef GEKKO @@ -10230,7 +10646,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_RGA_SCALING, - "Escalado mediante RGA y filtrado bicúbico. Puede romper los widgets." + "Escalado de imagen que utiliza RGA y filtrado bicúbico. Puede romper los widgets." ) #else MSG_HASH( @@ -10249,28 +10665,28 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_3DS_LCD_BOTTOM, - "Mostrar información de estado en la pantalla inferior. Desactiva esta opción para mejorar la duración de la batería y el rendimiento." + "Muestra información de estado en la pantalla inferior. Desactiva esta opción para mejorar la duración de la batería y el rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_3DS_DISPLAY_MODE, - "Modo de pantalla de 3DS" + "Modo de vídeo de 3DS" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_3DS_DISPLAY_MODE, - "Selecciona el modo de pantalla 2D o 3D. En el modo 3D, los píxeles serán rectangulares y se aplicará un efecto de profundidad al usar el menú rápido. El modo 2D es el mejor para el rendimiento." + "Alterna entre los modos de vídeo 2D y 3D. En el modo 3D, los píxeles serán rectangulares y se aplicará un efecto de profundidad al usar el menú rápido. El modo 2D tiene un mejor rendimiento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_400X240, - "2D (Efecto de cuadrícula de píxeles)" + "2D (efecto de cuadrícula de píxeles)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_800X240, - "2D (Alta resolución)" + "2D (alta resolución)" ) #endif #ifdef HAVE_QT MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED, - "Búsqueda finalizada.

\nPara que un contenido pueda ser identificado, es necesario lo siguiente:\n
  • Un núcleo compatible ya descargado
  • \n
  • Los archivos de información de núcleos actualizados
  • \n
  • Las bases de datos actualizadas
  • \n
  • Reiniciar RetroArch si has usado el actualizador en línea para actualizar alguno de estos elementos
\nPor último, el contenido debe coincidir con las bases de datos que se encuentran aquí. Si aún no consigues resultados, puedes enviar un informe de error." + "Búsqueda finalizada.

\nPara que un contenido pueda ser identificado, es necesario lo siguiente:\n
  • Un núcleo compatible ya descargado
  • \n
  • Tener los archivos de información de núcleos al día
  • \n
  • Haber actualizado las bases de datos mediante el actualizador en línea
  • \n
  • Reiniciar RetroArch si ya has hecho cualquiera de los pasos anteriores
\nPor último, el contenido debe coincidir con las bases de datos que se encuentran aquí. Si aún no consigues resultados, puedes enviar un informe de error." ) #endif diff --git a/intl/msg_hash_fa.h b/intl/msg_hash_fa.h index 2c9fb30843..841ec3d09e 100644 --- a/intl/msg_hash_fa.h +++ b/intl/msg_hash_fa.h @@ -24,18 +24,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "پیشینه" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "نگاره" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "موسیقی" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "ویدیو" - ) /* Main Menu */ @@ -92,14 +84,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "موسیقی" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "نگاره" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "ویدیو" - ) /* Main Menu > Online Updater */ @@ -300,6 +284,8 @@ MSG_HASH( /* Settings > Core */ +#ifndef HAVE_DYNAMIC +#endif /* Settings > Configuration */ @@ -335,6 +321,8 @@ MSG_HASH( /* Settings > On-Screen Display > On-Screen Overlay */ + + /* Settings > On-Screen Display > Video Layout */ @@ -347,10 +335,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "بازدیدها" - ) /* Settings > User Interface > Views */ @@ -363,10 +347,6 @@ MSG_HASH( /* Settings > User Interface > Appearance */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "زمینه" - ) /* Settings > AI Service */ @@ -387,14 +367,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "فهرست پیشینه" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "اندازه فهرست برگزیده‌ها" - ) /* Settings > Playlists > Playlist Management */ @@ -567,7 +539,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_LANG_PERSIAN, - "Persian - فارسی (Restart)" + "Persian - فارسی (Restart Required)" ) /* RGUI: Settings > User Interface > Appearance */ diff --git a/intl/msg_hash_fi.h b/intl/msg_hash_fi.h new file mode 100644 index 0000000000..2dc26515ba --- /dev/null +++ b/intl/msg_hash_fi.h @@ -0,0 +1,364 @@ +#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900) +#if (_MSC_VER >= 1700) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif +#pragma warning(disable:4566) +#endif + +/* Top-Level Menu */ + + +/* Main Menu */ + + +/* Main Menu > Load Core */ + + +/* Main Menu > Load Content */ + + +/* Main Menu > Load Content > Playlists */ + + +/* Main Menu > Online Updater */ + + +/* Main Menu > Information */ + + +/* Main Menu > Information > Core Information */ + + +/* Main Menu > Information > System Information */ + + +/* Main Menu > Information > Database Manager */ + + +/* Main Menu > Information > Database Manager > Information */ + + +/* Main Menu > Configuration File */ + + +/* Main Menu > Help */ + + +/* Main Menu > Help > Basic Menu Controls */ + + +/* Settings */ + + +/* Settings > Drivers */ + + +/* Settings > Video */ + + +/* Settings > Video > CRT SwitchRes */ + + +/* Settings > Video > Output */ + + +/* Settings > Video > Fullscreen Mode */ + + +/* Settings > Video > Windowed Mode */ + + +/* Settings > Video > Scaling */ + + +/* Settings > Video > Synchronization */ + + +/* Settings > Audio */ + + +/* Settings > Audio > Output */ + + +/* Settings > Audio > Resampler */ + + +/* Settings > Audio > Synchronization */ + + +/* Settings > Audio > MIDI */ + + +/* Settings > Audio > Mixer Settings > Mixer Stream */ + + +/* Settings > Audio > Menu Sounds */ + + +/* Settings > Input */ + + +/* Settings > Input > Haptic Feedback/Vibration */ + + +/* Settings > Input > Menu Controls */ + + +/* Settings > Input > Hotkey Binds */ + + +/* Settings > Input > Port # Binds */ + + +/* Settings > Latency */ + + +/* Settings > Core */ + +#ifndef HAVE_DYNAMIC +#endif + +/* Settings > Configuration */ + + +/* Settings > Saving */ + + +/* Settings > Logging */ + + +/* Settings > File Browser */ + + +/* Settings > Frame Throttle */ + + +/* Settings > Frame Throttle > Rewind */ + + +/* Settings > Frame Throttle > Frame Time Counter */ + + +/* Settings > Recording */ + + +/* Settings > On-Screen Display */ + + +/* Settings > On-Screen Display > On-Screen Overlay */ + + + + +/* Settings > On-Screen Display > Video Layout */ + + +/* Settings > On-Screen Display > On-Screen Notifications */ + + +/* Settings > User Interface */ + + +/* Settings > User Interface > Views */ + + +/* Settings > User Interface > Views > Quick Menu */ + + +/* Settings > User Interface > Views > Settings */ + + +/* Settings > User Interface > Appearance */ + + +/* Settings > AI Service */ + + +/* Settings > Accessibility */ + + +/* Settings > Power Management */ + +/* Settings > Achievements */ + + +/* Settings > Network */ + + +/* Settings > Network > Updater */ + + +/* Settings > Playlists */ + + +/* Settings > Playlists > Playlist Management */ + + +/* Settings > User */ + + +/* Settings > User > Privacy */ + + +/* Settings > User > Accounts */ + + +/* Settings > User > Accounts > RetroAchievements */ + + +/* Settings > User > Accounts > YouTube */ + + +/* Settings > User > Accounts > Twitch */ + + +/* Settings > Directory */ + + +/* Music */ + +/* Music > Quick Menu */ + + +/* Netplay */ + + +/* Netplay > Host */ + + +/* Import content */ + + +/* Import content > Scan File */ + + +/* Import content > Manual Scan */ + + +/* Playlist > Playlist Item */ + + +/* Playlist Item > Set Core Association */ + + +/* Playlist Item > Information */ + + +/* Quick Menu */ + + +/* Quick Menu > Options */ + + +/* Quick Menu > Controls */ + + +/* Quick Menu > Controls > Load Remap File */ + + +/* Quick Menu > Cheats */ + + +/* Quick Menu > Cheats > Start or Continue Cheat Search */ + + +/* Quick Menu > Cheats > Load Cheat File (Replace) */ + + +/* Quick Menu > Cheats > Load Cheat File (Append) */ + + +/* Quick Menu > Cheats > Cheat Details */ + + +/* Quick Menu > Disc Control */ + + +/* Quick Menu > Shaders */ + + +/* Quick Menu > Shaders > Save */ + + +/* Quick Menu > Shaders > Remove */ + + +/* Quick Menu > Shaders > Shader Parameters */ + + +/* Quick Menu > Overrides */ + + +/* Quick Menu > Achievements */ + + +/* Quick Menu > Information */ + + +/* Miscellaneous UI Items */ + + +/* Settings Options */ + + +/* RGUI: Settings > User Interface > Appearance */ + + +/* RGUI: Settings Options */ + + +/* XMB: Settings > User Interface > Appearance */ + + +/* XMB: Settings Options */ + + +/* Ozone: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings Options */ + + +/* Qt (Desktop Menu) */ + + +/* Unsorted */ + + +/* Unused (Only Exist in Translation Files) */ + + +/* Unused (Needs Confirmation) */ + + +/* Discord Status */ + + +/* Notifications */ + + +/* Lakka */ + + +/* Environment Specific Settings */ + + +#ifdef HAVE_LAKKA_SWITCH +#endif +#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) +#endif +#ifdef HAVE_LAKKA +#endif +#ifdef GEKKO +#endif +#ifdef HAVE_ODROIDGO2 +#else +#endif +#if defined(_3DS) +#endif +#ifdef HAVE_QT +#endif diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 650c6897e4..bd4852bd22 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -24,17 +24,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "Historique" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Images" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Musique" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Vidéo" + "Vidéos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, @@ -77,7 +73,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Charger un disque média physique. Vous devriez d'abord sélectionner le cœur (Charger un cœur) que vous souhaitez utiliser avec le disque." + "Charger un disque média physique. Sélectionnez d'abord le cœur (Charger un cœur) à utiliser avec le disque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -109,7 +105,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Ouvre l'interface de bureau si cette dernière est fermée." + "Ouvre l'interface de bureau traditionnelle." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +113,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Désactive le mode kiosque. Un redémarrage est requis pour que la modification prenne effet." + "Désactive le mode kiosque. (Redémarrage requis)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -238,7 +234,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Le contenu que vous avez ajouté aux 'Favoris' apparaîtra ici." + "Le contenu ajouté aux 'Favoris' apparaîtra ici." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -248,10 +244,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_MUSIC, "La musique précédemment jouée apparaîtra ici." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Images" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Les images visionnées précédemment apparaîtront ici." @@ -293,7 +285,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Télécharge les miniatures individuelles pour la liste de lecture sélectionnée." + "Télécharge des miniatures pour les entrées dans la liste de lecture sélectionnée." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -449,6 +441,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Requis" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Verrouiller le cœur installé" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Empêche la modification du cœur actuellement installé. Peut être utilisé pour éviter les mises à jour indésirables lorsque le contenu nécessite une version spécifique (les sets de ROMs d'arcade par exemple)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Supprimer le cœur" @@ -457,6 +457,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Retirer ce cœur du disque." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Sauvegarder le cœur" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Crée une sauvegarde archivée du cœur installé actuellement." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Restaurer une sauvegarde" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Installe une version précédente du cœur à partir d'une liste de sauvegardes archivées." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Supprimer une sauvegarde" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Supprime un fichier de la liste des sauvegardes archivées." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_CRC, + "CRC32 : " + ) /* Main Menu > Information > System Information */ @@ -542,7 +570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Prise en charge de la manette en réseau " + "Prise en charge de manette en réseau " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -1079,7 +1107,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Pilote d'entrées à utiliser. Selon le pilote vidéo sélectionné, l'utilisation d'un pilote d'entrées différent peut être forcée." + "Pilote d'entrées à utiliser. Certains pilotes vidéo forcent l'utilisation d'un pilote d'entrées différent." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, @@ -1121,6 +1149,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Pilote de caméra à utiliser." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Pilote Bluetooth à utiliser." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Wi-Fi " @@ -1234,7 +1266,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Insère une image noire entre chaque image. Utile pour les utilisateurs d'écrans 120Hz qui souhaitent jouer à du contenu 60Hz sans rémanence." + "Insère une image noire entre les images. Utile pour certains écrans à fréquence de rafraîchissement élevée pour éliminer la rémanence." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1473,7 +1505,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Décalage de la fenêtre d'affichage sur l'axe X. Cette option sera ignorée si l'option 'Échelle à l'entier' est activée. Elle sera alors centrée automatiquement." + "Décalage de la fenêtre d'affichage sur l'axe X. Cette option sera ignorée si l'option 'Échelle à l'entier' est activée." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1481,7 +1513,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Décalage de la fenêtre d'affichage sur l'axe Y. Cette option sera ignorée si l'option 'Échelle à l'entier' est activée. Elle sera alors centrée automatiquement." + "Décalage de la fenêtre d'affichage sur l'axe Y. Cette option sera ignorée si l'option 'Échelle à l'entier' est activée." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1505,7 +1537,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Tronque quelques pixels sur les bords de l'image habituellement laissés vides par les développeurs, qui contiennent parfois aussi des pixels parasites." + "Tronque quelques pixels sur les bords de l'image habituellement laissés vides par les développeurs, qui contiennent parfois aussi des pixels parasites. (Redémarrage requis)" ) /* Settings > Video > Synchronization */ @@ -1532,7 +1564,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "La synchronisation verticale (V-Sync) est activée jusqu'à ce que les performances descendent en dessous de la fréquence de rafraîchissement cible.\nCela peut minimiser les saccades lorsque les performances sont inférieures au temps réel, et être plus économe en énergie." + "La synchronisation verticale (V-Sync) est activée jusqu'à ce que les performances descendent en dessous de la fréquence de rafraîchissement cible. Peut minimiser les saccades lorsque les performances sont inférieures au temps réel, et être plus économe en énergie." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1564,7 +1596,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Élimine les déviations par rapport au timing requis par le cœur. Utilisez cette option pour les écrans à fréquence de rafraîchissement variable, G-Sync, FreeSync." + "Élimine les déviations par rapport au timing requis par le cœur. Utilisez cette option pour les écrans à fréquence de rafraîchissement variable (G-Sync, FreeSync, HDMI 2.1 VRR)." ) /* Settings > Audio */ @@ -1884,7 +1916,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Si cette option est activée, tente de configurer automatiquement les contrôleurs, style Plug-and-Play." + "Tente de configurer automatiquement les manettes, style Plug-and-Play." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, @@ -1924,7 +1956,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Décrit la durée après laquelle une touche est en mode turbo. Les nombres sont décrits en images." + "Durée (en images) après laquelle une touche est en mode turbo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1968,7 +2000,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Assignations des touches de raccourci" + "Raccourcis" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -2025,11 +2057,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Appuyer sur quitter deux fois" + "Confirmer avant de quitter" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Appuyez deux fois sur la touche de raccourci Quitter pour quitter RetroArch." + "Nécessite que la touche de raccourci Quitter soit pressée deux fois pour quitter RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2039,162 +2071,342 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Combinaison de touches de la manette pour afficher/masquer le menu." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Délai d'activation de la touche de raccourcis (en images)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Ajoute un délai en images avant que l'entrée normale ne soit bloquée après avoir appuyé (et maintenu) la touche 'Raccourcis activés' assignée. Permet l'entrée normale de la touche 'Raccourcis activés' lorsqu'elle est mappée à une autre action (RetroManette 'Select' par exemple)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, "Avance rapide (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Bascule entre l'avance rapide et la vitesse normale." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, "Avance rapide (maintenir)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "En maintenant la touche, cela active l'avance rapide. Le contenu rebascule en vitesse normale lorsque la touche n'est plus maintenue." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, "Ralenti (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Bascule entre le ralenti et la vitesse normale." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, "Ralenti (maintenir)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "En maintenant la touche, cela active le ralenti. Le contenu rebascule en vitesse normale lorsque la touche n'est plus maintenue." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Charger une sauvegarde instantanée" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "Charge une sauvegarde instantanée depuis l'emplacement actuellement sélectionné." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Sauvegarde instantanée" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Effectue une sauvegarde instantanée dans l'emplacement actuellement sélectionné." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, "Plein écran (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Bascule entre le mode d'affichage plein écran et fenêtré." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Quitter RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "Ferme RetroArch, en s'assurant que tous les fichiers de sauvegarde et de configuration sont enregistrés sur le disque." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "Emplacement de sauvegarde instantanée +" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "Incrémente le numéro d'emplacement de sauvegarde instantanée sélectionné." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "Emplacement de sauvegarde instantanée -" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "Décrémente le numéro d'emplacement de sauvegarde instantanée sélectionné." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Rembobiner" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "En maintenant la touche, cela active le rembobinage. Remarque : 'Prise en charge du rembobinage' doit être activé." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, "Enregistrement de la relecture (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "Active/désactive l'enregistrement des touches pressées au format .bsv." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, "Mettre en pause/reprendre" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "Met en pause/reprend le contenu en cours d'exécution." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Avance image par image" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "Lorsqu'il est en pause, avance le contenu d'une image." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Redémarrer le jeu" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "Redémarre le contenu actuel depuis le début." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Shader suivant" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "Charge et applique le fichier de préréglages de shaders suivant à la racine du dossier 'Shaders vidéo'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Shader précédent" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "Charge et applique le fichier de préréglages de shaders précédent à la racine du dossier 'Shaders vidéo'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Numéro de cheat +" + "Numéro de cheat suivant" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "Incrémente le numéro du cheat sélectionné." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Numéro de cheat -" + "Numéro de cheat précédent" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "Décrémente le numéro du cheat sélectionné." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, "Cheats (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "Active/désactive le cheat actuellement sélectionné." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Prendre une capture d'écran" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "Capture une image du contenu actuel." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, "Mode muet (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "Active/désactive la sortie audio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, "Clavier virtuel à l'écran (afficher/masquer)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Active/désactive le clavier virtuel à l'écran." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, "Afficher/masquer les images/s" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "Active/désactive l'indicateur d'état des images par seconde." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Envoyer les informations de diagnostic" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Envoie les informations de diagnostic pour votre appareil et la configuration de RetroArch à nos serveurs pour analyse." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, "Hébergement du jeu en réseau (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "Active/désactive l'hébergement du jeu en réseau." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, "Mode joueur/spectateur de jeu en réseau" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "Bascule la session de jeu en réseau actuelle entre les modes 'jeu' et 'spectateur'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Raccourcis" + "Raccourcis activés" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "Si assignée, la touche 'Raccourcis activés' doit être enfoncée (et maintenue) avant que les autres touches de raccourcis ne soient reconnues. Permet aux touches d'être assignées aux fonctions de raccourci sans affecter les entrées normales." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, + "Augmenter le volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Augmente le volume de la sortie audio." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, + "Baisser le volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "Diminue le volume de la sortie audio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, "Surimpression suivante" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT, + "Passe à la disposition suivante disponible pour la surimpression active à l'écran." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Éjecter/insérer un disque" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "Si le plateau du lecteur de disque virtuel est fermé, cela l'ouvre et retire le disque chargé. Sinon, insère le disque sélectionné et ferme le tiroir." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, "Disque suivant" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "Incrémente le numéro du disque sélectionné actuellement. Remarque : le plateau du lecteur de disque virtuel doit être ouvert." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, "Disque précédent" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "Décrémente le numéro du disque sélectionné actuellement. Remarque : le plateau du lecteur de disque virtuel doit être ouvert." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, "Capture de la souris (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GRAB_MOUSE_TOGGLE, + "Capture ou relâche la souris. Lorsqu'elle est capturée, le curseur système est masqué et confiné à la fenêtre d'affichage de RetroArch, améliorant le mouvement relatif de la souris." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, "Jeu au premier plan/en arrière-plan" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GAME_FOCUS_TOGGLE, + "Active/désactive le mode de jeu au premier plan. Lorsque le contenu est au premier plan, les touches de raccourci sont désactivées (la saisie au clavier est passée au cœur actif) et la souris est capturée." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, "Interface de bureau (afficher/masquer)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_UI_COMPANION_TOGGLE, + "Ouvre l'interface de bureau WIMP (fenêtres, icônes, menus et dispositif de pointage) associée." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, "Menu (afficher/masquer)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MENU_TOGGLE, + "Bascule l'affichage actuel entre le menu et l'exécution de contenu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, "Enregistrement (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "Lance/arrête l'enregistrement de la session en cours vers un fichier vidéo local." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, "Streaming (activer/désactiver)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "Lance/arrête le streaming de la session en cours vers une plateforme vidéo en ligne." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "Service IA" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "Capture une image du contenu actuel puis traduit et/ou lit à haute voix tout texte à l'écran. Remarque : 'Service IA' doit être activé et configuré." + ) /* Settings > Input > Port # Binds */ @@ -2212,7 +2424,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Tout assigner" + "Assigner toutes les touches" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, @@ -2383,7 +2595,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, - "Nombre d'images à éxécuter en avance. Provoque des problèmes de jeu tels que des variations de la latence si vous dépassez le nombre d'images de latence interne du jeu." + "Nombre d'images à exécuter en avance. Provoque des problèmes de jeu tels que des variations de la latence si vous dépassez le nombre d'images de latence interne du jeu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, @@ -2391,7 +2603,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "Utilisez une seconde instance du cœur RetroArch pour l'éxécution en avance. Empêche les problèmes audio dus au chargement de l'état précédent." + "Utilise une seconde instance du cœur RetroArch pour l'exécution en avance. Empêche les problèmes audio dus au chargement de l'état précédent." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, @@ -2399,7 +2611,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "Masque le message d'avertissement qui apparaît lors de l'utilisation de l'éxécution en avance si le cœur ne prend pas en charge les sauvegardes instantanées." + "Masque le message d'avertissement qui apparaît lors de l'utilisation de l'exécution en avance si le cœur ne prend pas en charge les sauvegardes instantanées." ) /* Settings > Core */ @@ -2418,7 +2630,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Autorise les cœurs à forcer le changement vers un pilote vidéo différent de celui qui est chargé actuellement." + "Autorise les cœurs à basculer vers un pilote vidéo différent de celui qui est chargé actuellement." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, @@ -2426,7 +2638,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Certains cœurs ont une fonctionnalité d'extinction. Si activée, cette option empêchera le cœur de fermer RetroArch. À la place, un cœur factice sera chargé." + "Certains cœurs ont une fonctionnalité d'extinction, charger un cœur factice empêchera RetroArch de se fermer." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2440,6 +2652,16 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Vérifie que tous les firmwares requis sont présents avant de tenter le chargement du contenu sélectionné." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Toujours recharger le cœur lors du lancement de contenu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Redémarrer RetroArch lors du lancement de contenu, même lorsque le cœur demandé est déjà chargé. Cela peut améliorer la stabilité du système, au détriment d'un temps de chargement accru." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Autoriser la rotation" @@ -2448,6 +2670,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, "Autorise les cœurs à définir la rotation. Si désactivé, les demandes de rotation seront ignorées. Utile pour les configurations où l'écran pivote manuellement." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Gérer les cœurs" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Effectue des tâches de maintenance hors-ligne sur les cœurs installés (sauvegarde, restauration, suppression, etc.) et affiche des informations sur les cœurs." + ) /* Settings > Configuration */ @@ -2457,7 +2687,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Enregistrer les modifications dans le fichier de configuration à la sortie." + "Enregistrer les modifications dans le fichier de configuration à la fermeture." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2528,7 +2758,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Sauvegarde automatiquement la mémoire SRAM non volatile à un intervalle régulier. Cette option est désactivée par défaut. L'intervalle est mesuré en secondes. Une valeur de 0 désactive la sauvegarde automatique." + "Sauvegarde automatiquement la mémoire SRAM non volatile à un intervalle régulier (en secondes)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, @@ -2536,7 +2766,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Lors de la création d'une sauvegarde instantanée, le numéro de la sauvegarde instantanée est automatiquement incrémenté avant l'enregistrement. Lors du chargement de contenu, le numéro sera réglé sur le plus haut existant." + "Avant la création d'une sauvegarde instantanée, le numéro de la sauvegarde instantanée est automatiquement incrémenté. Lors du chargement de contenu, le numéro sera réglé sur le plus haut existant." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2544,7 +2774,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Créer automatiquement une sauvegarde instantanée à la fin de l'exécution de RetroArch. RetroArch chargera à nouveau cette sauvegarde instantanée automatiquement si 'Chargement auto des sauvegardes instantanées' est activé" + "Crée automatiquement une sauvegarde instantanée à la fermeture de contenu. RetroArch chargera cette sauvegarde instantanée automatiquement si 'Chargement auto des sauvegardes instantanées' est activé." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, @@ -2659,7 +2889,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "Compteurs de performance pour RetroArch (et les cœurs).\nLes données de compteur peuvent aider à déterminer les goulots d'étranglement du système et à ajuster les performances du système et de l'application" + "Compteurs de performance pour RetroArch et les cœurs. Les données de compteur peuvent aider à déterminer les goulots d'étranglement du système et à ajuster les performances." ) /* Settings > File Browser */ @@ -2721,7 +2951,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "En mode ralenti, le contenu ralentira selon le facteur spécifié/défini." + "Taux de ralentissement auquel le contenu sera joué en mode ralenti." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2740,15 +2970,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Vous avez fait une erreur ? Utilisez le rembobinage et réessayez.\nAttention, activer cette option entraîne une baisse des performances lors du jeu." + "Revenir à un point précédent dans le jeu (limité dans le temps). Cette option entraîne une forte baisse des performances lors du jeu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Précision du rembobinage " + "Vitesse du rembobinage " ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Lorsque vous définissez le rembobinage sur plusieurs images à la fois, vous augmentez sa vitesse." + "Nombre d'images à rembobiner par étape, les valeurs plus hautes augmentent la vitesse du rembobinage." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2830,7 +3060,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Qualité de la diffusion" + "Qualité de la diffusion " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, @@ -2959,6 +3189,24 @@ MSG_HASH( "Échelle de tous les éléments d'interface utilisateur de la surimpression." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "Position horizontale de la surimpression" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "Décalage sur l'axe X de tous les éléments d'interface utilisateur de la surimpression." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Position verticale de la surimpression" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "Décalage sur l'axe Y de tous les éléments d'interface utilisateur de la surimpression." + ) + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -3002,7 +3250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Utilisez des animations, des notifications, des indicateurs et des commandes modernes, au lieu de l'ancien système utilisant uniquement du texte." + "Utilisez des animations, des notifications, des indicateurs et des commandes modernes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, @@ -3034,7 +3282,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, - "Affiche le nombre d'images/s à l'écran." + "Affiche le nombre d'images/s actuel." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, @@ -3062,11 +3310,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Inclure les détails de la mémoire" + "Afficher l'utilisation de la mémoire" ) MSG_HASH( MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Inclut l'utilisation actuelle/le total de la mémoire utilisée à l'écran avec les images/s et le nombre d'images." + "Affiche la quantité de mémoire utilisée et totale sur le système." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Notification au démarrage de contenu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Afficher une brève notification animée lors du chargement de contenu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, @@ -3074,7 +3330,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Sélectionner une police différente pour les notifications à l'écran." + "Sélectionner la police pour les notifications à l'écran." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -3137,11 +3393,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Vues" + "Visibilité des éléments du menu" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Afficher ou masquer des éléments dans l'écran du menu." + "Afficher ou masquer des éléments du menu dans RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -3157,7 +3413,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Affiche les réglages avancés pour les utilisateurs expérimentés (masqués par défaut)." + "Affiche les réglages avancés pour les utilisateurs expérimentés." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3185,7 +3441,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Mettre en pause quand le menu est activé" + "Mettre en pause le contenu lorsque le menu est actif" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, @@ -3197,7 +3453,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Ferme automatiquement le menu et reprends le contenu actuel après la sélection de 'Sauvegarde instantanée' ou 'Charger une sauvegarde instantanée' depuis le menu rapide. Désactiver cette option peut améliorer les performances de sauvegarde instantanée sur des appareils très lents." + "Ferme automatiquement le menu et reprends le contenu après la sauvegarde ou le chargement instantané. Désactiver cette option peut améliorer les performances de sauvegarde instantanée sur des appareils très lents." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, @@ -3205,7 +3461,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "Ferme automatiquement le menu et reprends le contenu actuel après la sélection de 'Insérer le disque' ou 'Charger un nouveau disque' depuis le menu de contrôle du disque." + "Ferme automatiquement le menu et reprends le contenu actuel après l'insertion ou le chargement d'un nouveau disque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, @@ -3221,7 +3477,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Permet de contrôler le menu avec le toucher." + "Permet de contrôler le menu avec un écran tactile." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, @@ -3233,7 +3489,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Ne pas fonctionner en arrière-plan" + "Mettre en pause le contenu lors de la mise en arrière-plan" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -3269,11 +3525,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Interface de bureau (Redémarrer)" + "Interface de bureau (Redémarrage requis)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Afficher l'interface de bureau au démarrage" + "Ouvrir l'interface de bureau au démarrage" ) /* Settings > User Interface > Views */ @@ -3284,7 +3540,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Afficher ou masquer des éléments dans l'écran du menu rapide." + "Afficher ou masquer des éléments dans le menu rapide." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, @@ -3292,7 +3548,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Afficher ou masquer des éléments dans l'écran des réglages." + "Afficher ou masquer des éléments dans le menu des réglages." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, @@ -3516,7 +3772,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Affiche des informations supplémentaires pour l'entrée actuellement sélectionnée dans le menu." + "Affiche des informations supplémentaires pour les éléments du menu." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, @@ -3885,15 +4141,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Applique un facteur de mise à l'échelle global lors de l'affichage du menu. Peut être utile pour augmenter ou réduire la taille de l'interface utilisateur." + "Met à l'échelle les éléments de l'interface utilisateur dans le menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Arrière-plan " + "Image d'arrière-plan " ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Sélectionner une image à définir comme fond d'écran du menu." + "Sélectionner une image à définir comme arrière-plan du menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -3901,7 +4157,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modifier l'opacité du fond d'écran." + "Modifier l'opacité de l'image d'arrière-plan." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, @@ -3941,7 +4197,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "Selectionne la méthode de défilement horizontal utilisée pour l'affichage du texte trop long dans le menu." + "Sélectionne la méthode de défilement horizontal utilisée pour l'affichage de texte trop long dans le menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, @@ -3988,7 +4244,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "Mettre en pause pour le Service IA" + "Mettre en pause lors de la traduction " ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, @@ -4019,15 +4275,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "Activer/désactiver le narrateur d'accessibilité pour la navigation dans le menu" + "Active la synthèse vocale pour aider à la navigation dans le menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Débit vocal du narrateur" + "Débit de la synthèse vocale" ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Définir le débit vocal pour le narrateur, de rapide à lent" + "Débit vocal pour la voix de la synthèse vocale." ) /* Settings > Power Management */ @@ -4040,7 +4296,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "Rivalisez pour gagner des succès sur mesure dans des jeux rétro.\nPour plus d'informations, veuillez visiter http://retroachievements.org" + "Gagnez des succès dans les jeux rétro. Pour plus d'informations, visitez http://retroachievements.org" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, @@ -4056,7 +4312,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "Classements spécifiques au jeu.\nN'a aucun effet si le mode Hardcore est désactivé." + "Classements spécifiques au jeu. N'a aucun effet si le mode Hardcore est désactivé." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, @@ -4082,6 +4338,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Utiliser des succès non officiels et/ou fonctionnalités bêta à des fins de test." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Son de succès" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Jouer un son lorsqu'un succès est débloqué." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, "Mode verbeux" @@ -4155,7 +4419,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Mot de passe pour se connecter à l'hôte de jeu en réseau. Utilisé uniquement en mode hôte." + "Mot de passe utilisé par les clients pour se connecter à l'hôte." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -4163,7 +4427,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Mot de passe pour se connecter à l'hôte de jeu en réseau avec des privilèges spectateur uniquement. Utilisé uniquement en mode hôte." + "Mot de passe utilisé par les clients pour se connecter à l'hôte en tant que spectateur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, @@ -4171,7 +4435,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Détermine s'il faut démarrer le jeu en réseau en mode spectateur." + "Démarre le jeu en réseau en mode spectateur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -4179,7 +4443,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Autoriser ou non les connexions en mode passif. Les clients en mode passif nécessitent très peu de puissance de traitement de part et d'autre, mais souffrent considérablement de la latence du réseau." + "Autorise les connexions en mode passif. Les clients en mode passif nécessitent très peu de puissance de traitement de part et d'autre, mais souffrent considérablement de la latence du réseau." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -4187,7 +4451,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Interdire les connexions qui ne sont pas en mode passif. Non recommandé sauf pour les réseaux très rapides avec des machines très faibles." + "Interdit les connexions qui ne sont pas en mode passif. Non recommandé sauf pour les réseaux très rapides avec des machines très faibles." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, @@ -4195,7 +4459,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Détermine s'il faut exécuter le jeu en réseau dans un mode ne nécessitant pas de sauvegardes instantanées. Un réseau très rapide est requis, mais aucun rembobinage ne sera effectué. Il n'y aura donc pas de variations de la latence lors du jeu en réseau" + "Lance le jeu en réseau dans un mode ne nécessitant pas de sauvegardes instantanées. Un réseau très rapide est requis, mais aucun rembobinage ne sera effectué, il n'y aura donc pas de variations de la latence lors du jeu en réseau." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, @@ -4203,7 +4467,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Fréquence en images avec laquelle le jeu en réseau vérifiera que l'hôte et le client sont synchronisés." + "Fréquence (en images) à laquelle le jeu en réseau vérifiera que l'hôte et le client sont synchronisés." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, @@ -4251,15 +4515,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Manette en réseau" + "RetroManette en réseau" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Port de base de la manette en réseau" + "Port de base de la RetroManette en réseau" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Utilisateur %d en réseau" + "RetroManette en réseau de l'utilisateur %d" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -4316,6 +4580,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, "Inclure les cœurs 'expérimentaux' dans la liste de 'Téléchargement de cœurs'. Ils sont généralement destinés à des fins de développement/test uniquement, et ne sont pas recommandés pour une utilisation générale." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "Sauvegarder les cœurs lors de la mise à jour" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP, + "Crée automatiquement une sauvegarde de tous les cœurs installés lors d'une mise à jour en ligne. Permet un retour facile vers un cœur fonctionnel si une mise à jour introduit une régression." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Taille de l'historique de sauvegarde des cœurs" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Spécifie combien de sauvegardes générées automatiquement pour chaque cœur installé seront conservées. Lorsque cette limite est atteinte, la création d'une nouvelle sauvegarde via une mise à jour en ligne supprimera la sauvegarde la plus ancienne. Remarque : Les cœurs sauvegardés manuellement ne sont pas affectées par ce paramètre." + ) /* Settings > Playlists */ @@ -4365,7 +4645,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "Trier les listes de lecture de contenu par ordre alphabétique. Notez que les listes de lecture 'Historique' des jeux, images, musiques et vidéos récemment utilisés sont exclues." + "Trie les listes de lecture de contenu par ordre alphabétique, excluant les listes 'Historique', 'Images', 'Musique' et 'Vidéo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, @@ -4421,11 +4701,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Format du temps de jeu pour l'étiquette dans la liste de lecture 'joué pour la dernière fois'" + "Format du temps de jeu pour 'Joué pour la dernière fois'" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Sélectionne le style de mise en forme de la date/l'heure utilisé pour l'affichage des informations d'horodatage dans l'enregistrement du journal de temps de jeu 'joué pour la dernière fois'. REMARQUE : Les options '(AM/PM)' auront un faible impact sur les performances pour certaines plateformes." + "Règle le style de la date et l'heure affichées pour les informations d'horodatage dans 'Joué pour la dernière fois'. REMARQUE : Les options '(AM/PM)' auront un faible impact sur les performances pour certaines plateformes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, @@ -4445,11 +4725,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Gestionnaire de listes de lecture" + "Gérer les listes de lecture" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Effectue des tâches de maintenance sur la liste de lecture sélectionnée (assigner/réinitialiser les associations aux cœurs par défaut, par exemple)." + "Effectue des tâches de maintenance sur les listes de lecture." ) /* Settings > Playlists > Playlist Management */ @@ -4484,7 +4764,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Changer l'ordre de tri dans cette liste de lecture." + "Détermine l'ordre de tri dans cette liste de lecture." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, @@ -4492,7 +4772,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Supprime les entrées invalides/en double et valide les associations aux cœurs." + "Valide les associations aux cœurs et supprime les entrées invalides/en double." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, @@ -4535,7 +4815,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Définir la langue de l'interface." + "Définit la langue de l'interface utilisateur." ) /* Settings > User > Privacy */ @@ -4573,7 +4853,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Service de RetroSuccès (RetroAchievements). Pour plus d'informations, veuillez visiter http://retroachievements.org" + "Gagnez des succès dans les jeux rétro. Pour plus d'informations, visitez http://retroachievements.org" ) /* Settings > User > Accounts > RetroAchievements */ @@ -4584,7 +4864,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Entrez le nom d'utilisateur de votre compte RetroSuccès (RetroAchievements)." + "Entrez le nom d'utilisateur du compte RetroSuccès (RetroAchievements)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, @@ -4617,7 +4897,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SYSTEM_DIRECTORY, - "Définit le dossier système. Les cœurs peuvent requérir ce répertoire pour charger des BIOS, des configurations spécifiques au système, etc." + "Définit le dossier système. Les cœurs peuvent rechercher des BIOS, des configurations spécifiques au système, etc. à cet emplacement." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, @@ -4633,7 +4913,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Cet emplacement est requis par défaut lorsque les interfaces de menu tentent de rechercher des assets chargeables, etc." + "Les assets de menu utilisés par RetroArch sont conservés dans ce dossier." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -4745,7 +5025,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Les configurations d'enregistrement seront conservées ici." + "Les configurations d'enregistrement sont conservées ici." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, @@ -4753,7 +5033,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Les surimpressions seront conservées dans ce dossier pour un accès facile." + "Les surimpressions sont conservées dans ce dossier." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, @@ -4777,7 +5057,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Lorsqu'une manette est connectée, cette manette sera configurée automatiquement si un fichier de configuration correspondant est présent dans ce dossier." + "Les profils de manettes utilisés pour la configuration automatique sont conservés dans ce dossier." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, @@ -4785,7 +5065,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Les fichiers de remappage des touches seront conservés dans ce dossier." + "Les fichiers de remappage des touches sont conservés dans ce dossier." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, @@ -4885,7 +5165,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Rechercher de nouveaux salons." + "Recherche d'hôtes de jeu en réseau." ) /* Netplay > Host */ @@ -4973,7 +5253,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Cœur" + "Cœur par défaut" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, @@ -4985,7 +5265,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "Liste délimitée par espaces des types de fichiers à inclure lors de l'analyse. Si laissée vide, inclut tous les fichiers - ou si un cœur est spécifié, tous les fichiers supportés par ce cœur." + "Liste des types de fichiers à inclure lors de l'analyse, délimitée par espaces. Si laissée vide, inclut tous les fichiers, ou si un cœur est spécifié, tous les fichiers supportés par ce cœur." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Analyser récursivement" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Lorsque cette option est activée, tous les sous-dossiers du 'Dossier du contenu' spécifié seront inclus dans l'analyse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, @@ -5361,15 +5649,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "Ajouter un nouveau code (en haut)" + "Ajouter un nouveau cheat (en haut)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "Ajouter un nouveau code (en bas)" + "Ajouter un nouveau cheat (en bas)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "Supprimer tous les codes" + "Supprimer tous les cheats" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, @@ -5420,7 +5708,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Gauche/droite pour changer la valeur" + "Appuyez sur gauche ou droite pour changer la valeur" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, @@ -5577,7 +5865,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "Nombre de fois que le cheat sera appliqué.\nUtiliser avec les deux autres options d'itération pour affecter de grandes zones de mémoire." + "Nombre de fois que le cheat sera appliqué. Utiliser avec les deux autres options d'itération pour affecter de grandes zones de mémoire." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, @@ -5585,7 +5873,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "Après chaque 'Nombre d'itérations', l'adresse mémoire sera incrémentée de ce montant multiplié par la 'Taille de recherche dans la mémoire'." + "Après chaque itération l'adresse mémoire sera incrémentée de ce montant multiplié par la 'Taille de recherche dans la mémoire'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, @@ -5593,7 +5881,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "Après chaque 'Nombre d'itérations', la valeur sera augmentée de ce montant." + "Après chaque itération la 'Valeur' sera augmentée de ce montant." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, @@ -5652,7 +5940,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Ouvre le plateau du lecteur de disque virtuel et retire le disque actuellement chargé. REMARQUE : Si RetroArch est configuré pour se mettre en pause lorsque le menu est actif, certains cœurs peuvent ne pas enregistrer les modifications à moins que le contenu ne soit repris pendant quelques secondes après chaque action liée au contrôle du disque." + "Ouvre le plateau du lecteur de disque virtuel et retire le disque actuellement chargé. Si 'Mettre en pause le contenu lorsque le menu est actif' est activé, certains cœurs peuvent ne pas enregistrer les modifications à moins que le contenu ne soit repris pendant quelques secondes après chaque action liée au contrôle du disque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, @@ -5660,7 +5948,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Insère le disque correspondant au 'Numéro du disque actuel' et ferme le plateau du lecteur de disque virtuel. REMARQUE : Si RetroArch est configuré pour se mettre en pause lorsque le menu est actif, certains cœurs peuvent ne pas enregistrer les modifications à moins que le contenu ne soit repris pendant quelques secondes après chaque action liée au contrôle du disque." + "Insère le disque correspondant au 'Numéro du disque actuel' et ferme le plateau du lecteur de disque virtuel. Si 'Mettre en pause le contenu lorsque le menu est actif' est activé, certains cœurs peuvent ne pas enregistrer les modifications à moins que le contenu ne soit repris pendant quelques secondes après chaque action liée au contrôle du disque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, @@ -5670,6 +5958,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, "Éjecte le disque actuel, sélectionne un nouveau disque dans le système de fichiers, puis l'insère et ferme le plateau du lecteur de disque virtuel. REMARQUE : C'est une fonctionnalité obsolète. Il est plutôt recommandé de charger des titres multi-disques via des listes de lecture M3U, qui permettent la sélection du disque en utilisant les options 'Éjecter/Insérer le disque' et 'Numéro du disque actuel'." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND_TRAY_OPEN, + "Sélectionne un nouveau disque dans le système de fichiers puis l'insère sans fermer le plateau du lecteur de disque virtuel. REMARQUE : C'est une fonctionnalité obsolète. Il est plutôt recommandé de charger des titres multi-disques via des listes de lecture M3U, qui permettent la sélection du disque en utilisant l'option 'Numéro du disque actuel'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, "Numéro du disque actuel" @@ -5739,7 +6031,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Augmenter ou diminuer le nombre de passages du pipeline des shaders. Vous pouvez assigner un shader distinct à chaque passage du pipeline et configurer son échelle et son mode de filtrage." + "Augmenter ou diminuer le nombre de passages du pipeline des shaders. Des shader distincts peuvent être assigné à chaque passage du pipeline ainsi que la configuration de leur échelle et leur mode de filtrage." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FILTER, @@ -5774,7 +6066,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Enregistrer les réglages de shaders actuels en tant que réglages par défaut pour cette application/ce cœur." + "Enregistrer les réglages de shaders actuels en tant que réglages par défaut pour ce cœur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, @@ -5922,6 +6214,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "Aucune information de cœur disponible." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "Aucune sauvegarde de cœur disponible" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "Aucun favori disponible." @@ -5954,6 +6250,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Aucun fichier de réglages trouvé." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Aucun périphérique Bluetooth trouvé" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Aucun réseau trouvé." @@ -6137,6 +6437,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, "Maintenir Start (2 secondes)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "Maintenir Select (2 secondes)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWN_SELECT, "Bas + Select" @@ -6964,7 +7268,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Ajouter des ombres portées pour toutes les icônes.\nCette option aura un impact mineur sur les performances." + "Ajouter des ombres portées pour toutes les icônes. Cette option aura un impact mineur sur les performances." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, @@ -7004,7 +7308,7 @@ MSG_HASH( /* FIXME Unused? */ ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Active l'onglet Réglages. Un redémarrage est requis pour que l'onglet apparaisse." + "Active l'onglet Réglages. (Redémarrage requis)" ) /* XMB: Settings Options */ @@ -7162,7 +7466,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "Si cette option est activée, le nom des systèmes sera retiré des listes de lecture. Par exemple, 'PlayStation' sera affiché au lieu de 'Sony - PlayStation'. Les changements requièrent un redémarrage pour prendre effet." + "Retire le nom des systèmes des listes de lecture. Par exemple, 'Sony - PlayStation' deviendra 'PlayStation'. (Redémarrage requis)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, @@ -7170,7 +7474,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Si cette option est activée, les listes de lecture seront re-triées par ordre alphabétique après avoir supprimé le composant 'système' de leurs noms. Les changements requièrent un redémarrage pour prendre effet." + "Les listes de lecture seront re-triées par ordre alphabétique après avoir supprimé le composant fabricant de leurs noms. (Redémarrage requis)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, @@ -7198,7 +7502,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, - "Remplacer le panneau des métadonnées du contenu par une autre miniature." + "Remplace le panneau des métadonnées du contenu par une autre miniature." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, @@ -7281,7 +7585,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "Affiche une miniature secondaire lors de l'utilisation d'un mode d'affichage de type 'Liste' dans les listes de lecture. Notez que ce réglage n'est appliqué que si l'écran dispose d'une largeur suffisante pour afficher deux miniatures." + "Affiche une miniature secondaire lors de l'utilisation d'un mode d'affichage de type 'Liste' dans les listes de lecture. Ce réglage n'est appliqué que si l'écran dispose d'une largeur suffisante pour afficher deux miniatures." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, @@ -8052,6 +8356,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "Aucune liste de lecture." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Connecté" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "En ligne" @@ -8149,7 +8457,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Pseudo (lan) : %s" + "Pseudo (LAN) : %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -8800,6 +9108,14 @@ MSG_HASH( MSG_NUM_CORES_UPDATED, "cœurs mis à jour : " ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "cœurs ignorés : " + ) +MSG_HASH( + MSG_CORE_UPDATE_DISABLED, + "Mise à jour du cœur désactivée - cœur verrouillé : " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "Réinitialisation des cœurs : " @@ -9676,10 +9992,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "non configuré, utilisation de l'état de secours" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Recherche Bluetooth terminée." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Recherche Wi-Fi terminé." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Recherche de périphériques Bluetooth…" + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Recherche de réseaux sans fil..." @@ -9734,19 +10058,19 @@ MSG_HASH( ) MSG_HASH( MSG_RUNAHEAD_CORE_DOES_NOT_SUPPORT_SAVESTATES, - "L'éxécution en avance a été désactivée car ce cœur ne prend pas en charge les sauvegardes instantanées." + "L'exécution en avance a été désactivée car ce cœur ne prend pas en charge les sauvegardes instantanées." ) MSG_HASH( MSG_RUNAHEAD_FAILED_TO_SAVE_STATE, - "Échec de la sauvegarde de l'état. L'éxécution en avance a été désactivée." + "Échec de la sauvegarde instantanée. L'exécution en avance a été désactivée." ) MSG_HASH( MSG_RUNAHEAD_FAILED_TO_LOAD_STATE, - "Échec du chargement de l'état. L'éxécution en avance a été désactivée." + "Échec du chargement de la sauvegarde instantanée. L'exécution en avance a été désactivée." ) MSG_HASH( MSG_RUNAHEAD_FAILED_TO_CREATE_SECONDARY_INSTANCE, - "Impossible de créer une deuxième instance. L'éxécution en avance utilisera désormais une seule instance." + "Impossible de créer une deuxième instance. L'exécution en avance utilisera désormais une seule instance." ) MSG_HASH( MSG_SCANNING_OF_FILE_FINISHED, @@ -9936,6 +10260,86 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "Analyse terminée : " ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "Analyse du cœur : " + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "La sauvegarde du cœur installé existe déjà : " + ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "Sauvegarde du cœur : " + ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "Suppression des sauvegardes obsolètes : " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Sauvegarde du cœur terminée : " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "La sauvegarde du cœur sélectionné est déjà installée : " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "Restauration du cœur : " + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "Restauration du cœur terminée : " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "Le fichier de cœur sélectionné est déjà installé : " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "Installation du cœur : " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "Installation du cœur terminée : " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "Fichier de cœur sélectionné invalide : " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Échec de la sauvegarde du cœur : " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "Échec de la restauration du cœur : " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Échec de l'installation du cœur : " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "Restauration du cœur désactivée - cœur verrouillé : " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "Installation du cœur désactivée - cœur verrouillé : " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "Impossible de verrouiller les cœurs : " + ) +MSG_HASH( + MSG_CORE_UNLOCK_FAILED, + "Impossible de déverrouiller les cœurs : " + ) +MSG_HASH( + MSG_CORE_DELETE_DISABLED, + "Suppression du cœur désactivée - cœur verrouillé : " + ) /* Lakka */ @@ -10010,6 +10414,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Filtre logiciel" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Rechercher des périphériques Bluetooth et les connecter." + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "Analyser les réseaux sans fil et établir la connexion." @@ -10050,6 +10458,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "Redémarrer RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "Quitte puis redémarre RetroArch. Requis pour l'activation de certains paramètres du menu (lors d'un changement du pilote de menu, par exemple)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, "Taille des blocs" @@ -10098,6 +10510,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "Afficher/masquer l'option 'Éteindre'." ) +MSG_HASH( + MSG_INTERNET_RELAY, + "Internet (relais)" + ) +MSG_HASH( + MSG_READ_WRITE, + "Lecture/écriture" + ) +MSG_HASH( + MSG_READ_ONLY, + "Lecture seule" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( diff --git a/intl/msg_hash_he.h b/intl/msg_hash_he.h index 2e0b991ade..469930bcae 100644 --- a/intl/msg_hash_he.h +++ b/intl/msg_hash_he.h @@ -24,18 +24,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "היסטוריה" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "תמונה" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "מוזיקה" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "וידאו" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, "ייבוא תוכן" @@ -140,10 +132,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "מוזיקה" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "וידאו" - ) /* Main Menu > Online Updater */ @@ -325,10 +313,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "רשת אלחוטית" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "בחר התקן רשת אלחוטית." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, "שירותי מיקום" @@ -479,10 +463,6 @@ MSG_HASH( /* Settings > Input > Hotkey Binds */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "הפעל/הפסק מצב מסך מלא" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "אתחל את המשחק" @@ -495,18 +475,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "שלח נתוני ניפוי תקלות" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "מקשי קיצור" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "עוצמת שמע +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "עוצמת שמע -" - ) /* Settings > Input > Port # Binds */ @@ -520,6 +488,8 @@ MSG_HASH( /* Settings > Core */ +#ifndef HAVE_DYNAMIC +#endif /* Settings > Configuration */ @@ -551,6 +521,8 @@ MSG_HASH( /* Settings > On-Screen Display > On-Screen Overlay */ + + /* Settings > On-Screen Display > Video Layout */ diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 746be99437..b30d6036ff 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -34,7 +34,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Driver Video" + "Video" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Carica un disco fisico multimediale. Dovresti prima selezionare il core (Carica Core) che intendi utilizzare con il disco." + "Carica un disco multimediale fisico. Per prima cosa, seleziona il core (Load Core) da usare con il disco." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -101,7 +101,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Effettua la scansione del contenuto e li aggiunge al database." + "Scansiona il contenuto e aggiungi al database." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, @@ -109,7 +109,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Apre il menu del desktop se chiuso." + "Apre il menu desktop tradizionale." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Disabilita la modalità kiosk. È necessario un riavvio affinchè la modifica abbia effetto." + "Disabilita la modalità chiosco. (Restart richiesto)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -200,7 +200,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Installare o ripristinare un core dalla directory download." + "Installare o ripristinare un core dalla directory 'Downloads'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -238,7 +238,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Qui verrà visualizzato il contenuto che hai aggiunto a 'Preferiti'." + "Il contenuto aggiunto a 'Preferiti' apparirà qui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -250,7 +250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Immmagini" + "Immagini" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, @@ -258,7 +258,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Driver Video" + "Video" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, @@ -293,7 +293,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Scarica singole miniature per ogni voce della playlist selezionata." + "Scarica le miniature per le voci nella playlist selezionata." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -309,7 +309,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Aggiorna i profili del Joypad" + "Aggiorna Profili Controller" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -445,6 +445,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Richiesto" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Blocca Core Installato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Impedisci la modifica del nucleo attualmente installato. Può essere usato per evitare aggiornamenti indesiderati quando il contenuto richiede una specifica versione core (ad esempio Arcade ROM set)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Cancella core" @@ -453,6 +461,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Rimuove questo core dal disco." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Crea un backup archiviato del core attualmente installato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Ripristina Backup" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Installare una versione precedente del core da un elenco di backup archiviati." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Elimina Backup" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Rimuove un file dalla lista dei backup archiviati." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "Automatico" + ) /* Main Menu > Information > System Information */ @@ -538,7 +570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Supporto Gamepad di rete" + "Supporto Controllore Di Rete" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -980,7 +1012,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Regola le impostazioni del filebrowser." + "Regola le impostazioni del browser file." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, @@ -1087,15 +1119,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Indica il Driver di input utilizzato. A seconda del driver video, potrebbe forzare un diverso driver di input." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Driver del JoyPad" + "Driver di input da usare. Alcuni driver video forzano un driver di input diverso." ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Indica il driver del JoyPad utilizzato." + "Controller driver da usare." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1129,13 +1157,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Indica il driver della fotocamera utilizzato." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Driver Bluetooth da usare." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Driver Wi-Fi" ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Indica il driver WiFi utilizzato." + "Driver Wi-Fi da usare." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1242,7 +1274,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Inserisce una cornice nera tra i fotogrammi. Utile per gli utenti che hanno schermi da 120 Hz e vogliono riprodurre il materiale da 60 Hz con l' eliminazione dell'effetto ghosting." + "Inserisce una cornice nera tra i quadri. Utile su alcune schermate ad alta frequenza di aggiornamento per eliminare il fantasma." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1481,7 +1513,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Offset di visualizzazione personalizzata utilizzata per definire la posizione dell'asse X di visualizzazione. Queste vengono ignorate se è abilitata l'opzione 'Integer Scale' e sarà centrata automaticamente." + "Scostamento visuale personalizzato usato per definire la posizione dell'asse X della porta di visualizzazione. Questi vengono ignorati se 'Scala intera' è abilitata." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1489,7 +1521,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Offset di visualizzazione personalizzata utilizzata per definire la posizione dell'asse Y di visualizzazione. Queste vengono ignorate se è abilitata l'opzione 'Integer Scale' e sarà centrata automaticamente." + "Scostamento visuale personalizzato usato per definire la posizione dell'asse Y della porta di visualizzazione. Questi vengono ignorati se 'Scala intera' è abilitata." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1513,7 +1545,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Taglia alcuni pixel intorno ai bordi dell'immagine generalmente lasciati vuoti dagli sviluppatori che a volte contengono anche i pixel che non vengono utilizzati." + "Taglia alcuni pixel attorno ai bordi dell'immagine di solito lasciati vuoti dagli sviluppatori che a volte contengono anche pixel spazzatura. (Restart richiesto)" ) /* Settings > Video > Synchronization */ @@ -1540,7 +1572,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "Il V-Sync è abilitato fino a quando le prestazioni non scendono al di sotto della frequenza di aggiornamento indicata.\nPuò ridurre eventuali problemi di stuttering e può essere più efficiente dal punto di vista energetico." + "V-Sync è abilitato fino a quando le prestazioni non scendono al di sotto della velocità di aggiornamento di destinazione. Può ridurre al minimo le interferenze quando le prestazioni scendono al di sotto del tempo reale ed essere più efficienti in termini di energia." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1572,7 +1604,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Nessuna deviazione dal tempo richiesto dal core. Usa per schermate Variabili Frequenza di Aggiornamento, G-Sync, FreeSync." + "Nessuna deviazione dal tempo richiesto dal core. Usa per schermate Variabili di Frequenza di Aggiornamento (G-Sync, FreeSync, HDMI 2.1 VRRR)." ) /* Settings > Audio */ @@ -1849,19 +1881,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "Abilita suono OK" + "Abilita Suono 'OK'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "Abilita Annulla Suono" + "Abilita Suono 'Annulla'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "Abilita suono delle notifiche" + "Abilita Suono 'Avviso'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "Abilita suono bgm" + "Abilita Suono 'BGM'" ) /* Settings > Input */ @@ -1876,19 +1908,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Menu Principale" + "Comportamento da songaggio" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Influisce come il polling degli input che viene fatto all'interno di RetroArch. L'impostazione 'Anticipato' o 'Ritardato' può causare una minore latenza, a seconda della configurazione." + "Influenza su come viene eseguito il sondaggio in input in RetroArch. Impostarlo a 'Early' o 'Late' può causare meno latenza, a seconda della configurazione." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Rimappa Tasti Abilitati" + "Reimposta controlli per questo core" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Se abilitato, gli input dell'override si legano con i bind rimappati impostati per il core corrente" + "Sostituisce le connessioni in ingresso con le binds rimappate impostate per il core corrente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, @@ -1896,7 +1928,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Attiva il rilevamento automatico degli input. Tenterà di autoconfigurare i joypad,stile Plug-and-Play ." + "Configura automaticamente i controller che hanno uno stile di profilo, Plug-and-Play." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, @@ -1922,6 +1954,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, "Quantità di secondi da attendere fino al prossimo bind." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD, + "Tempi di pressione" + ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD, "Quantità di secondi per tenere premuto un pulsante per collegarlo." @@ -1932,7 +1968,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Descrive il periodo in cui i tasti turbo-abilitati vengono commutati. I numeri sono descritti in fotogrammi." + "Il periodo (in fotogrammi) quando i pulsanti abilitati per turbo vengono attivati." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1958,6 +1994,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON, "Pulsante attivo predefinito per la Modalità Turbo 'pulsante singolo'." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "Feedback Tattile/Vibrazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "Modifica le impostazioni del feedback tattile e della vibrazione." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS, "Controlli Menu" @@ -1968,7 +2012,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Attribuzione degli tasti di scorciatoia" + "Scorciatoie" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1976,7 +2020,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Tasti del controllore %u" + "Controlli porta %u" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -2006,7 +2050,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Scambia i pulsanti OK & Annulla" + "Menu: Scambia pulsanti OK e Annulla" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, @@ -2025,11 +2069,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Premi Esci Due Volte" + "Conferma Esci" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Premi due volte il tasto di scelta rapida per uscire da RetroArch." + "Richiede che il tasto di scelta rapida Esci sia premuto due volte per uscire da RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2037,156 +2081,344 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Combinazioni dei pulsanti del Gamepad per attivare il menu." + "Combinazione pulsante controller per attivare il menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Ritardo per Attiva Scorciatoia (in Fotogrammi)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Aggiunge un ritardo in fotogrammi al blocco degli input normali dopo aver premuto 'Attiva Scorciatoia'. Consente l'uso del tasto assegnato al comando 'Attiva Scorciatoia' anche quando è associato a un'altra azione (es.: RetroPad 'Select')." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Pulsante per avanzamento veloce" + "Accelerazione (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Alterna tra la riproduzione accelerata e la velocità normale." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Andare avanti veloce" + "Rapido Avanti (Attesa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Attiva la riproduzione accelerata quando si tiene premuto il tasto. Il contenuto è riprodotto a velocità normale quando il tasto viene rilasciato." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Attiva Slow-Motion" + "Moviola (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Alterna tra la riproduzione in moviola e la velocità normale." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, + "Moviola (pressione continua)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "Attiva la riproduzione in moviola quando si tiene premuto il tasto. Il contenuto è riprodotto a velocità normale quando il tasto viene rilasciato." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Pulsante Carica Stato" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "Carica un'instantanea dallo slot attualmente selezionato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Pulsante Salva Stato" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Salva un'instantanea nello slot attualmente selezionato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Pulsante per lo schermo intero" + "Schermo intero (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Alterna tra la modalità a schermo intero e la visualizzazione in finestra." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Pulsante per uscire da RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "Chiude RetroArch, assicurandosi che i salvataggi e i file di configurazione siano salvati su disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "Slot di Salvataggio +" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "Passa al successivo slot di istantanee." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "Slot di Salvataggio -" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "Passa al precedente slot di istantanee." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Riavvolgimento" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "Riavvolge il contenuto attuale quando si tiene premuto il tasto. Nota: il 'Supporto al Riavvolgimento' deve essere abilitato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Pulsante registratore Film" + "Registra Sequenza degli Input (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "Attiva o disattiva la registrazione in format .bsv degli input utilizzati." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Pulsante Pausa" + "Pausa (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "Consente di mettere in pausa o riprendere la riproduzione del contenuto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, + "Avanza di un Fotogramma" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "Quando si è in pausa, fa avanzare il contenuto di un fotogramma." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Resetta il gioco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "Riavvia il contenuto attuale dall'inizio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Shader successivo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "Carica e attiva lo Shader Preconfigurato successivo nella radice della cartella 'Shader Video'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Shader Precedente" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "Carica e attiva lo Shader Preconfigurato precedente nella radice della cartella 'Shader Video'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Indice dei Cheat +" + "Indice Successivo dei Trucchi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "Passa all'indice successivo dei trucchi." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Indice dei Cheat -" + "Indice Precedente dei Trucchi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "Passa all'indice precedente dei trucchi." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Pulsante Cheat" + "Trucchi (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "Attiva o disattiva i trucchi attualmente selezionati." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Effettua uno screenshot" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "Acquisisce una schermata del contenuto attuale." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Pulsante per disattivare l'audio" + "Silenzia Audio (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "Attiva o disattiva l'audio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Pulsante per la tastiera su schermo" + "Tastiera Su Schermo (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Attiva o disattiva la tastiera su schermo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "Attiva FPS" + "Mostra FPS (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "Attiva o disattiva l'indicatore dei fotogrammi al secondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Invia Informazioni di Debug" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Invia ai nostri server informazioni diagnostiche relativamente al tuo dispositivo e alla configurazione di RetroArch per un'analisi." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "Netplay Hosting Attiva/Disattiva" + "Netplay Hosting (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "Attiva/disattiva hosting netplay." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Pulsante Netplay per la modalità giocatore/spettatore" + "Modalità Netplay Play/Spectate (Abilita)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "Cambia la sessione di netplay corrente tra le modalità 'play' e 'spectate'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Abilita hotkeys" + "Attiva Scorciatoia" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "Una volta assegnato, il tasto 'Scorciatoia' deve essere premuto (e mantenuto) prima di riconoscere qualsiasi altro tasto. Consente di mappare i pulsanti del regolatore alle funzioni del tasto di scelta rapida senza influire sull'input normale." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, + "Alza il Volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Aumenta il livello del volume dell'audio in uscita." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, + "Abbassa il Volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "Diminuisce il livello del volume dell'audio in uscita." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "Overlay successivo" + "Prossimo Overlay" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT, + "Passa al prossimo layout disponibile della sovrapposizione attualmente attiva sullo schermo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Pulsante espulsione Disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "Se il vassoio del disco virtuale è chiuso, lo apre e rimuove il disco caricato. Altrimenti, inserisce il disco selezionato e chiude il vassoio." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Disco successivo" + "Disco Successivo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "Incrementa l'indice del disco attualmente selezionato. Nota: il vassoio del disco virtuale deve essere aperto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "Disco precedente" + "Disco Precedente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "Diminuisce l'indice del disco attualmente selezionato. Nota: il vassoio del disco virtuale deve essere aperto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Pulsante per il tocco del mouse" + "Cattura Il Mouse (Abilita)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GRAB_MOUSE_TOGGLE, + "Cattura o rilascia il mouse. Quando afferrato, il cursore di sistema è nascosto e limitato alla finestra di visualizzazione RetroArch, migliorando l'ingresso relativo del mouse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Pulsante Game focus" + "Focus di gioco (Abilita)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GAME_FOCUS_TOGGLE, + "Abilita o disabilita la modalità 'Focus del gioco'. Quando il contenuto è focalizzato, i tasti di scelta rapida sono disabilitati (l'ingresso completo della tastiera viene passato al nucleo corrente) e il mouse viene afferrato." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Attiva/Disattiva Menu Desktop" + "Menu Desktop (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_UI_COMPANION_TOGGLE, + "Apre l'interfaccia utente desktop WIMP (Windows, Icone, Menu, Puntatore)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Pulsante per il Menu" + "Menu (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MENU_TOGGLE, + "Cambia la visualizzazione corrente tra il menu e il contenuto in esecuzione." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Attiva/Disattiva registrazione" + "Registrazione (Attiva / Disattiva)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "Avvia/interrompe la registrazione della sessione corrente su un file video locale." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Attiva/disattiva streaming" + "Streaming (Abilita)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "Avvia/ferma lo streaming della sessione corrente su una piattaforma video online." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "Servizio AI" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "Cattura un'immagine del contenuto corrente, quindi traduce e/o legge ad alta voce qualsiasi testo sullo schermo. Nota: 'Servizio AI' Deve essere abilitato e configurato." + ) /* Settings > Input > Port # Binds */ @@ -2204,15 +2436,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Associa Tutto" + "Imposta Tutti i Controlli" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Attribuire per impostazione predefinita" + "Ripristina i Controlli Predefiniti" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Salva file Autoconfig" + "Salva Profilo del Controller" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2236,19 +2468,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "D-pad su" + "D-Pad Su" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "D-pad giù" + "D-Pad Giù" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "D-pad sinistro" + "D-Pad Sinistra" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "D-pad Destro" + "D-Pad Destra" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2365,6 +2597,38 @@ MSG_HASH( /* Settings > Latency */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_ENABLED, + "Anticipa per Ridurre la Latenza" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, + "Eseguire la logica di base uno o più fotogrammi avanti quindi caricare lo stato di nuovo per ridurre il ritardo percepito in ingresso." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_FRAMES, + "Numero di Fotogrammi da Anticipare" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, + "Il numero di fotogrammi da eseguire in anticipo. Causa problemi di gameplay come il jitter se si supera il numero di fotogrammi di ritardo interno al gioco." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, + "Usa una Seconda Istanza per Anticipare" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, + "Usa una seconda istanza del core RetroArch per eseguire. Previene problemi audio a causa dello stato di caricamento." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, + "Nascondi Avvisi sull'Anticipazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, + "Nascondi il messaggio di avviso che appare quando si usa Run-Ahead e il core non supporta gli stati di salvataggio." + ) /* Settings > Core */ @@ -2382,7 +2646,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Permetti ai core di forzare il passaggio a un driver video diverso da quello attualmente caricato." + "Consenti ai core di passare a un driver video diverso da quello attualmente caricato." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, @@ -2390,7 +2654,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Alcuni core potrebbero avere una funzione di arresto. Se abilitato, impedirà al core di arrestare RetroArch. Al contrario, carica un core dummy." + "Alcun core hanno una funzione di spegnimento, il caricamento di un nucleo fittizio impedirà RetroArch di spegnere." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2404,24 +2668,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Controlla che il firmware richiesto sia presente prima di tentare di caricare il contenuto." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Consenti la rotazione" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Consente ai core di impostare la rotazione. Se disattivato, le richieste di rotazione vengono ignorate. Utile per le impostazioni in cui ruota manualmente lo schermo." + "Permetti ai core di impostare la rotazione. Quando disabilitato, le richieste di rotazione vengono ignorate. Utile per le impostazioni che ruotano manualmente lo schermo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Gestisci Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Eseguire attività di manutenzione offline su core installati (backup, ripristino, eliminazione, ecc.) e visualizzare le informazioni di base." ) /* Settings > Configuration */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Salva la configurazione all' uscita" + "Salva la Configurazione all'Uscita" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Salva le modifiche al file di configurazione all'uscita del programma." + "Salva le modifiche al file di configurazione all'uscita." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2464,15 +2738,15 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Ordina il Salvataggio in Cartelle" + "Ordina i Salvataggi in Cartelle" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Ordina i file salvati in cartelle dopo che un core viene utilizzato." + "Ordina il salvataggio dei file nelle cartelle che prendono il nome dal core utilizzato." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Ordina i Salvataggi in Cartelle" + "Ordina le Istantanee in Cartelle" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, @@ -2492,15 +2766,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Salva automaticamente la memoria RAM non volatile ad un intervallo regolare. Questa impostazione è disabilitata per impostazione predefinita, L'intervallo è misurato in secondi. Un valore 0 disabilita il salvataggio automatico." + "Salva automaticamente la SaveRAM non volatile ad un intervallo regolare (in secondi)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Indice del salva stato automatico" + "Passa Automaticamente Allo Slot Successivo delle Istantanee" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Quando si effettua un salvataggio, viene salvato automaticamente l'indice del salvataggio prima di essere salvato. Quando carichi il contenuto, l'indice sarà impostato al valore più alto esistente." + "Prima di fare uno stato di salvataggio, l'indice di stato di salvataggio viene automaticamente aumentato. Durante il caricamento del contenuto, l'indice sarà impostato sull'indice esistente più alto." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2512,7 +2786,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Carica automaticamente i salvataggi" + "Carica Istantanea Automaticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, @@ -2524,7 +2798,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Visualizza le miniature degli stati di salvataggio all'interno del menu" + "Mostra un'anteprima in miniatura delle istantanee nel menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, @@ -2560,7 +2834,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_RUNTIME_LOG, - "Salva Registro Di Runtime (Per Core)" + "Salva Registro Di Durata (Per Core)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_RUNTIME_LOG, @@ -2568,7 +2842,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_RUNTIME_LOG_AGGREGATE, - "Salva Registro Di Runtime (Aggregato)" + "Salva Registro Di Durata (Aggregato)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_RUNTIME_LOG_AGGREGATE, @@ -2577,6 +2851,10 @@ MSG_HASH( /* Settings > Logging */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_VERBOSITY, + "Verbosità del Registro" + ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_VERBOSITY, "Abilita o disabilita la registrazione al terminale." @@ -2601,20 +2879,36 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOG_TO_FILE, "Log su file" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOG_TO_FILE, + "Reindirizza i messaggi di registro eventi di sistema a file. Richiede 'Verbalità di registrazione' per essere abilitato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_TO_FILE_TIMESTAMP, + "File di registro marca temporale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOG_TO_FILE_TIMESTAMP, + "Durante la registrazione su file, reindirizza l'output da ogni sessione RetroArch a un nuovo file temporizzato. Se disabilitato, il log viene sovrascritto ogni volta che RetroArch viene riavviato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "Contatori di prestazioni" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, + "Contatori di prestazioni per RetroArch e core. I dati del contatore possono aiutare a determinare le strozzature di sistema e a ottimizzare le prestazioni." + ) /* Settings > File Browser */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Visualizza cartelle e file nascosti" + "Mostra file e cartelle nascoste" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Mostra file / directory nascoste all'interno del file browser." + "Mostra i file e le cartelle nascoste nel browser dei file." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2622,7 +2916,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Filtra i file visualizzati nel filebrowser da estensioni supportate." + "Filtra i file mostrati nell'esploratore file per le estensioni supportate." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2643,13 +2937,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "Gestisce le impostazioni di riavvolgimento." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_SETTINGS, + "Contatore di tempo dei fotogrammi" + ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS, "Regola le impostazioni che influenzano il contatore del frame time (attivo solo quando il video threaded è disabilitato)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Velocità massima di esercizio" + "Velocità di accelerazione" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, @@ -2657,11 +2955,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Rapporto Slow-Motion" + "Velocità di rallentamento" ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "In slow motion, il contenuto verrà rallentato dal valore specificato / impostato." + "La velocità che il contenuto riprodurrà quando si usa il rallentamento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2680,15 +2978,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Hai commesso un errore? Riavvolgi e provaci ancora.\nAttenzione, questo influisce sulle prestazioni durante il gioco." + "Ritorna a un punto precedente nel gioco recente. Questo provoca un grave colpo di prestazioni durante la riproduzione." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Livello di riavvolgimento" + "Riavvolgi Fotogrammi" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Quando si riavvolge un numero definito di fotogrammi, è possibile riavvolgere più fotogrammi alla volta, aumentando la velocità di riavvolgimento." + "Il numero di fotogrammi da riavvolgere per passo, valori più alti aumentano la velocità di riavvolgimento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2698,9 +2996,41 @@ MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE, "La quantità di memoria (in MB) da riservare al buffer del riavvolgimento. Aumentando questo, aumenterà la quantità di storia del riavvolgimento." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE_STEP, + "Passo Dimensione Buffer Rewind (MB)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE_STEP, + "Ogni volta che si aumenta o diminuisce il valore della dimensione del buffer di rewind tramite questa UI cambierà di questo importo" + ) /* Settings > Frame Throttle > Frame Time Counter */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, + "Ripristina dopo accelerazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, + "Ripristina il contatore del tempo del fotogramma dopo l'avanzamento veloce." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, + "Ripristina dopo il caricamento di stato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, + "Reimposta il contatore di tempo frame dopo aver caricato uno stato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, + "Ripristina dopo aver salvato lo stato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, + "Reimposta il contatore di tempo frame dopo aver salvato uno stato." + ) /* Settings > Recording */ @@ -2710,7 +3040,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Carica configurazione di registrazione." + "Configurazione Registrazione Personalizzata" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, + "Thread di esecuzoini di registrazione" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, @@ -2734,15 +3068,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Qualità stream" + "Qualità di trasmissione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, + "Configurazione di trasmissione personalizzata" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Titolo dello Stream" + "Titolo della trasmissione" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "URL dello Streaming" + "Url della trasmissione" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, @@ -2755,10 +3093,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_OVERLAY_SETTINGS, "Overlay sullo schermo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_OVERLAY_SETTINGS, + "Regola le lunette e i controlli sullo schermo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONSCREEN_VIDEO_LAYOUT_SETTINGS, + "Layout Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_VIDEO_LAYOUT_SETTINGS, + "Regola Layout Video" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_SETTINGS, "Notifiche sullo schermo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, + "Regola Notifiche A Schermo" + ) /* Settings > On-Screen Display > On-Screen Overlay */ @@ -2790,6 +3144,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, "Visualizza Inputs Listen Port" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, + "Selezionare la porta per la sovrapposizione da ascoltare se Mostra input in overlay è abilitato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, + "Mostra Il Cursore Del Mouse Con l'overlay" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, + "Mostra il cursore del mouse quando si usa un'overlay sullo schermo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_AUTO_ROTATE, + "Rotaziona automatica dell'overlay" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_OVERLAY_AUTO_ROTATE, + "Se supportato dall'overlay attivo, ruota automaticamente il layout per corrispondere al rapporto orientazione/aspetto dello schermo." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_AUTOLOAD_PREFERRED, "Autocarica overlay preferito" @@ -2819,8 +3193,50 @@ MSG_HASH( "Scala di tutti gli elementi dell'interfaccia utente dell'overlay" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "Posizionamento X dell'overlay" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "Spostamento X di tutti gli elementi UI dell'overlay." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Posizionamento Y dell'overlay" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "Spostamento dell'asse Y di tutti gli elementi UI dell'overlay." + ) + /* Settings > On-Screen Display > Video Layout */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_ENABLE, + "Abilita Layout Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_ENABLE, + "I layout video sono utilizzati per le lunette e altre illustrazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_PATH, + "Percorso Layout Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_PATH, + "Selezionare un layout video dal browser dei file." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_SELECTED_VIEW, + "Vista Selezionata" + ) +MSG_HASH( /* FIXME Unused */ + MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_SELECTED_VIEW, + "Seleziona una vista all'interno del layout caricato." + ) /* Settings > On-Screen Display > On-Screen Notifications */ @@ -2832,9 +3248,37 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "Visualizza i messaggi sullo schermo." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, + "Widget Grafici" + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Usa animazioni, notifiche, indicatori e controlli decorati moderni invece del vecchio sistema di solo testo." + "Utilizzare animazioni, notifiche, indicatori e controlli decorati." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, + "Scala Automaticamente i Widget Grafici" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, + "Ridimensiona automaticamente le notifiche, gli indicatori e i controlli decorati in base alla scala del menu corrente." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, + "Sovvrascrivere le dimensioni dei Widget grafici (Schermo Intero)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, + "Applica lla sovrascrittura di un fattore di scala manuale quando si disegnano widget di visualizzazione in modalità schermo intero. Si applica solo quando 'Scala automaticamente i widget grafici' è disabilitato. Può essere utilizzato per aumentare o diminuire la dimensione delle notifiche, indicatori e controlli decorati indipendentemente dal menu stesso." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, + "Sovvrascrivere le dimensioni dei Widget grafici (Finestra)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, + "Applica lla sovrascrittura di un fattore di scala manuale quando si disegnano widget di visualizzazione in modalità schermo intero. Si applica solo quando 'Scala automaticamente i widget grafici' è disabilitato. Può essere utilizzato per aumentare o diminuire la dimensione delle notifiche, indicatori e controlli decorati indipendentemente dal menu stesso." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, @@ -2842,7 +3286,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, - "Consente di visualizzare la frequenza dei fotogrammi corrente al secondo sullo schermo." + "Visualizza il numero attuale di fotogrammi al secondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, @@ -2852,6 +3296,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_FPS_UPDATE_INTERVAL, "La visualizzazione del framerate verrà aggiornato all'intervallo impostato (in fotogrammi)." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW, + "Mostra Conteggio dei Fotogrammi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW, + "Visualizza sullo schermo un conteggio dei fotogrammi attuali." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW, "Mostra statistiche" @@ -2860,13 +3312,21 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Mostra statistiche tecniche su schermo." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, + "Mostra Utilizzo della Memoria" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MEMORY_SHOW, + "Visualizza la quantità di memoria usata e totale sul sistema." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Font delle notifiche su schermo" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Seleziona un altro tipo di carattere per le notifiche sullo schermo." + "Seleziona il carattere per le notifiche sullo schermo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -2892,16 +3352,48 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_MESSAGE_POS_Y, "Specifica la posizione personalizzata dell'asse Y per il testo sullo schermo." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED, + "Colore delle Notifiche (Rosso)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN, + "Colore delle Notifiche (Verde)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE, + "Colore delle Notifiche (Blu)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE, + "Sfondo delle Notifiche" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED, + "Colore dello Sfondo di Notifica (Rosso)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN, + "Colore dello Sfondo di Notifica (Verde)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE, + "Colore dello Sfondo di Notifica (Blue)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_OPACITY, + "Opacità dello Sfondo di Notifica" + ) /* Settings > User Interface */ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Opzioni di visualizzazione" + "Visibilità delle voci del Menu" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Mostra o nasconde gli elementi nella schermata del menu." + "Attiva/disattiva le voci del menu di visibilità in RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -2917,7 +3409,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Mostra le impostazioni avanzate per gli utenti esperti (nascosti per impostazione predefinita)." + "Mostra impostazioni avanzate per gli utenti esperti." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -2945,19 +3437,35 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausa quando il menu è attivato" + "Pausa il contenuto quando il menu è attivo" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Se disattivato, il contenuto continuerà a funzionare in background quando il menu di RetroArch è attivato." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, + "Riprendi il contenuto dopo aver utilizzato i salvataggi di stato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, + "Chiudere automaticamente il menu e riprendere il contenuto dopo aver salvato o caricato uno stato. Disabilitarlo può migliorare le prestazioni di salvataggio dello stato su dispositivi molto lenti." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, + "Riprendi il contenuto dopo aver cambiato i dischi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, + "Chiude automaticamente il menu e riprendi il contenuto dopo aver inserito o caricato un nuovo disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Supporto del Mouse" ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Abilita i controlli del mouse all'interno del menu." + "Consente di controllare il menu con un mouse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -2965,7 +3473,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Abilita i controlli tramite Touch all'interno del menu." + "Consente di controllare il menu con un touchscreen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, + "Processi multipli" ) MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, @@ -2973,7 +3485,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Non eseguire in background" + "Pausa del contenuto quando non attivo" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -2987,18 +3499,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "Attiva o disattiva la composizione (solo Windows)." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SCROLL_FAST, + "Accelerazione Scorrimento del Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SCROLL_FAST, + "Velocità massima del cursore quando si mantiene una direzione da scorrere." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "Abilita UI Companion" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Abilita UI Companion all'avvio" + "Attiva UI Companion all'Avvio" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Menubar" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, + "Menu Desktop (Riavvio Necessario)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, + "Apri il Menu Desktop all'Avvio" + ) /* Settings > User Interface > Views */ @@ -3008,12 +3536,16 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Mostra o nasconde gli elementi nella schermata Menu rapido." + "Abilita la visibilità delle voci di menu nel menu rapido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "Impostazioni" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, + "Abilita la visibilità delle voci di menu nel menu Impostazioni." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Visualizza Carica Core" @@ -3030,6 +3562,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, "Mostra/Nascondi l'opzione 'Carica contenuto'." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_DISC, + "Mostra Carica Disco" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_DISC, + "Mostra o nasconde l'opzione 'Carica disco'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_DUMP_DISC, + "Mostra Esporta Disco" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_DUMP_DISC, + "Mostra o nasconde l'opzione 'Scarica Disco'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, "Visualizza Aggiorna Online" @@ -3046,6 +3594,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, "Mostra / nasconde la possibilità di aggiornare i core (e i file di informazioni principali)." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, + "Mostra Aggiornamento Miniature Legacy" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, + "Mostra o nasconde la possibilità di scaricare i pacchetti di miniature legacy." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, "Visualizza informazioni" @@ -3078,6 +3634,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, "Mostra/Nasconde l'opzione 'Esci da RetroArch'." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_RESTART_RETROARCH, + "Mostra Riavvia RetroArch" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_RESTART_RETROARCH, + "Mostra o nasconde l'opzione 'Riavvia RetroArch'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, "Visualizza colonna Impostazioni" @@ -3088,7 +3652,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Imposta una Password per abilitare la colonna Impostazioni" + "Imposta Password Per Abilitare La Scheda 'Impostazioni'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, @@ -3150,6 +3714,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD, "Mostra la sezione 'Importa Contenuto' all'interno del menu principale." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_PLAYLISTS, + "Mostra Schede Playlist" + ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, "Mostra le sezione 'Playlist' all'interno del menu principale." @@ -3162,6 +3730,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE, "Mostra la data e/o l'ora attuale nel menu" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE, + "Stile di data e ora" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_TIMEDATE_STYLE, + "Cambia lo stile della data e/o ora corrente mostrato all'interno del menu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_DATE_SEPARATOR, "Separatore Data" @@ -3186,6 +3762,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ENABLE, "Visualizza il nome corrente del core all'interno del menu." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, + "Mostra Sotto-Etichette Del Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, + "Fornisce informazioni aggiuntive per le voci di menu." + ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "Visualizzazione schermata Start" @@ -3269,6 +3853,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING, "Mostra/Nasconde l'opzione 'Inizia lo streaming'." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, + "Mostra Imposta Associazione Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, + "Mostra o nasconde l'opzione 'Imposta associazione core'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, "Visualizza associazione Reset Core" @@ -3333,6 +3925,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS, "Mostra le impostazioni di sovrapposizione" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO_LAYOUT, + "Mostra Impostazioni Layout Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO_LAYOUT, + "Mostra o nascondi le opzioni di Layout video." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, "Visualizza Salva gli Override dei core" @@ -3357,9 +3957,41 @@ MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, "Mostra/nasconde l'opzione 'Informazioni'." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_DOWNLOAD_THUMBNAILS, + "Mostra Miniature Download" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_DOWNLOAD_THUMBNAILS, + "Mostra o nasconde l'opzione 'Scarica miniature'." + ) /* Settings > User Interface > Views > Settings */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DRIVERS, + "Mostra Driver" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS, + "Mostra o nascondi 'Impostazioni Driver nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO, + "Mostra Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_VIDEO, + "Mostra o nascondi 'Impostazioni video' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO, + "Mostra Audio" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AUDIO, + "Mostra o nascondi 'Impostazioni audio' nella schermata Impostazioni." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT, "Visualizza Input" @@ -3368,16 +4000,152 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT, "Visualizza/Nasconde l'opzione 'Impostazioni Input' nella schermata Impostazioni." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY, + "Mostra Latenza" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LATENCY, + "Mostra o nascondi 'Impostazioni di latenza' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE, + "Mostra Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CORE, + "Mostra o nascondi 'Impostazioni del Core' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CONFIGURATION, + "Mostra Configurazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CONFIGURATION, + "Mostra o nascondi 'Impostazioni di configurazione' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_SAVING, + "Mostra Salvataggi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_SAVING, + "Mostra o nascondi 'Impostazioni di salvataggio' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LOGGING, + "Mostra Registro" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LOGGING, + "Mostra o nascondi 'Impostazioni di registrazione' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_FRAME_THROTTLE, + "Mostra Acceleratore Fotogrammi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_FRAME_THROTTLE, + "Mostra o nascondi 'Impostazioni acceleratore fotogrammi' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING, + "Mostra Registrazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_RECORDING, + "Mostra o nascondi 'Impostazioni di registrazione' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ONSCREEN_DISPLAY, + "Mostra Schermo a finestra" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY, + "Mostra o nascondi 'Impostazioni di visualizzazione a schermo' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER_INTERFACE, + "Mostra Interfaccia Utente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER_INTERFACE, + "Mostra o nascondi 'Impostazioni interfaccia utente' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AI_SERVICE, + "Mostra Servizio IA" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AI_SERVICE, + "Mostra o nascondi 'Impostazioni Servizio IA' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_POWER_MANAGEMENT, + "Mostra Gestione dell'alimentazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_POWER_MANAGEMENT, + "Mostra o nascondi 'Impostazioni di gestione dell'alimentazione' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ACHIEVEMENTS, + "Mostra Obiettivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ACHIEVEMENTS, + "Mostra o nascondi 'Impostazioni risultati' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK, + "Mostra Rete" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_NETWORK, + "Mostra o nascondi 'Impostazioni di rete' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_PLAYLISTS, + "Mostra Collezioni" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_PLAYLISTS, + "Mostra o nascondi 'Impostazioni scalette' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER, + "Mostra Utente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER, + "Mostra o nascondi 'Impostazioni utente' nella schermata Impostazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY, + "Mostra Cartelle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DIRECTORY, + "Mostra o nascondi 'Impostazioni cartella' nella schermata Impostazioni." + ) /* Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, + "Fattore di Scala del Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, + "Scala la dimensione degli elementi dell'interfaccia utente nel menu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Sfondo" + "Immagine di Sfondo" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Seleziona un'immagine da impostare come sfondo nel menu." + "Selezionare un'immagine da impostare come sfondo del menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -3385,7 +4153,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modifica l'opacità dello sfondo" + "Modifica l'opacità dell'immagine di sfondo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, @@ -3411,13 +4179,53 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS, "Tipo di miniatura da visualizzare." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_THUMBNAIL_UPSCALE_THRESHOLD, + "Soglia di ingrandimento delle miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_THUMBNAIL_UPSCALE_THRESHOLD, + "Migliora automaticamente le immagini delle miniature con una larghezza/altezza inferiore al valore specificato. Migliora la qualità dell'immagine. Ha un impatto moderato sulle prestazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, + "Animazione del testo scorrevole" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, + "Seleziona il metodo di scorrimento orizzontale usato per visualizzare il testo del menu lungo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, + "Velocità di testo scorrevole" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, + "La velocità di animazione durante lo scorrimento del testo del menu lungo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, + "Fluidità del testo scorrevole" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, + "Usare l'animazione di scorrimento fluido quando si visualizza un testo di menu lungo. Ha un piccolo impatto sulle prestazioni." + ) /* Settings > AI Service */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_MODE, + "Uscita del servizio IA" + ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, "Mostra la traduzione come overlay di testo (modalità Immagine) o la riproduce come sintesi vocale (modalità vocale)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL, + "URL di servizio IA" + ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_URL, "Un URL http:// che punta al servizio di traduzione da utilizzare." @@ -3430,6 +4238,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, "Abilita AI Service per l'esecuzione quando si preme il tasto di scelta rapida AI Service" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, + "Pausa Durante La Traduzione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, + "Mette in pausa il core mentre lo schermo viene tradotto." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG, "Sorgente del Linguaggio" @@ -3449,6 +4265,22 @@ MSG_HASH( /* Settings > Accessibility */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, + "Attiva Accessibilità" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, + "Abilita la pronuncia per aiutare nella navigazione del menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "Velocità del sintetizzatore vocale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "La velocità per la voce del sintetizzatore vocale." + ) /* Settings > Power Management */ @@ -3458,10 +4290,38 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "Abilita Achievements" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, + "Guadagna risultati nei giochi classici. Per ulteriori informazioni, visita https://retroachievements.org" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "Modalità Achievements Hardcore" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, + "Raddoppia la quantità di punti guadagnati.\nDisabilita gli stati di salvataggio, i tradimenti, il riavvolgimento, la pausa e il rallentamento per tutti i giochi.\nAttivando questa impostazione al runtime si riavvierà il gioco." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, + "Classifiche" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, + "Classifiche specifiche del gioco. Non ha effetto se la modalità 'Hardcore' è disabilitata." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_RICHPRESENCE_ENABLE, + "Invia lo stato di gioco dettagliato al sito RetroAchievements." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, + "Distintivi Obiettivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE, + "Mostra i distintivi nella lista degli obiettivi." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL, "Testa gli Achievements non ufficiali" @@ -3478,6 +4338,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, "Abilita o disabilita OSD verbosity per gli achievements." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, + "Cattura schermata automatica" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, + "Prendi automaticamente una schermata quando viene guadagnato un risultato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, + "Avvia Attivo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_START_ACTIVE, + "Inizia la sessione con tutti gli obiettivi attivi (anche quelli precedentemente sbloccati)." + ) /* Settings > Network */ @@ -3497,6 +4373,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, "Inoltra le connessioni da netplay attraverso un server man-in-the-middle . Utile se l'host è dietro un firewall o ha problemi NAT/UPnP" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER, + "Posizione Del Server Relè" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY_MITM_SERVER, + "Scegli uno specifico relè server da usare. Le posizioni geograficamente più vicine tendono ad avere una latenza inferiore." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_IP_ADDRESS, "Indirizzo Server" @@ -3505,6 +4389,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_IP_ADDRESS, "Indirizzo dell'host per connettersi." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_TCP_UDP_PORT, + "Porta Netplay TCP" + ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_TCP_UDP_PORT, "La porta dell'indirizzo IP dell' host. Può essere una porta TCP o UDP." @@ -3515,7 +4403,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "La password per il collegamento all'host netplay. Utilizzato solo in modalità host." + "La password utilizzata dai client che si connettono all'host." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -3523,7 +4411,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "La password per il collegamento all'host netplay con solo privilegi da spettatore. Utilizzato solo in modalità host." + "La password utilizzata dai client che si connettono all'host come spettatore." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, @@ -3531,7 +4419,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Avvia il netplay in modalità spettatore." + "Avvia netplay in modalità spettatore." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -3539,7 +4427,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Permette di connettersi in modalità slave. La modalità slave per i client richiede una piccola potenza di elaborazione su entrambi i lati, ma soffre significativamente della latenza di rete." + "Consenti connessioni in modalità slave. I client in modalità slave richiedono pochissima potenza di elaborazione su entrambi i lati, ma soffriranno in modo significativo di latenza di rete." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -3547,7 +4435,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Non consente le connessioni che non sono in modalità slave . Non raccomandato tranne per reti molto veloci con macchine molto deboli." + "Non consentire connessioni non in modalità slave. Non consigliato, tranne per reti molto veloci con macchine molto deboli." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, @@ -3555,7 +4443,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Il netplay viene avviato in una modalità che non richiede i salva stati. Se impostato su on,è necessaria una rete molto veloce, ma nessun riavvolgimento verrà eseguito, quindi non ci saranno i jitter del netplay." + "Avvia netplay in una modalità che non richiede stati di salvataggio. È necessaria una rete molto veloce, ma non viene eseguito alcun riavvolgimento, quindi non ci sarà alcun jitter del netplay." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, @@ -3563,7 +4451,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "La frequenza dei fotogrammi con cui il netplay verificherà che l'host e il client sono sincronizzati." + "La frequenza (in fotogrammi) che netplay verificherà che l'host e il client siano sincronizzati." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, @@ -3573,14 +4461,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "Il numero della latenza nei fotogrammi di input per il netplay da utilizzare per nascondere la latenza di rete. Riduce il jitter e rende il netplay meno intenso di CPU, a scapito di un ritardo di input notevole." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, + "Intervallo della Latenza In Ingresso dei fotogrammi" + ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, "L'intervallo della latenza nei fotogrammi di input che può essere utilizzato per nascondere la latenza di rete. Riduce il jitter e rende il netplay meno intenso di CPU, a scapito di un imprevisto ritardo di input." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, + "NAT traversale per il netplay" + ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NAT_TRAVERSAL, "L'hosting, tenterà di ricercare la connessione da Internet, utilizzando l' UPnP o tecnologie simili per saltare la LAN." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL, + "Condivisione Ingresso Digitale" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_REQUEST_DEVICE_I, + "Richiedi dispositivo %u" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY_REQUEST_DEVICE_I, + "Richiedi di giocare con il dispositivo di input specificato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_ENABLE, "Comandi di rete" @@ -3591,15 +4499,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Rete Gamepad" + "RetroPad Di Rete" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Porta della rete remota di Base" + "Porta di Base del RetroPad Di Rete" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Abilita Utente %d da remoto" + "RetroPad rete %d utente" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -3609,6 +4517,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STDIN_CMD_ENABLE, "Abilita l'interfaccia di comando stdin." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, + "Download Di Miniatura On-Demand" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, + "Scarica automaticamente le miniature mancanti durante la navigazione delle playlist. Ha un forte impatto sulle prestazioni." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "Aggiornamento" @@ -3616,6 +4532,10 @@ MSG_HASH( /* Settings > Network > Updater */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_BUILDBOT_URL, + "Url dei core Buildbot" + ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_BUILDBOT_URL, "URL alla directory di aggiornamento del core nel buildbot di Libretro." @@ -3644,12 +4564,28 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, "Includi core 'experimental' nella lista Core Downloader. Questi sono tipicamente solo per scopi di sviluppo/test e non sono raccomandati per un uso generale." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "Backup dei Core Durante l'aggiornamento" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP, + "Crea automaticamente un backup di qualsiasi core installato quando esegui un aggiornamento online. Abilita il rollback facile a un core di lavoro se un aggiornamento introduce una regressione." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Dimensione della Cronologia Backup dei Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Specifica quanti backup generati automaticamente da mantenere per ogni core installato. Quando questo limite viene raggiunto, la creazione di un nuovo backup tramite un aggiornamento online eliminerà il backup più vecchio. Nota: I backup manuali del core non sono influenzati da questa impostazione." + ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Abilita l'elenco della cronologia" + "Storico" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -3663,6 +4599,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Limita il numero di voci nella playlist recente per giochi, immagini, musica e video." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, + "Dimensione Preferiti" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, + "Limita il numero di voci nella playlist dei preferiti. Una volta raggiunto il limite, le nuove aggiunte saranno evitate fino a quando le vecchie voci saranno rimosse. Impostazione di un valore di -1 permette 'illimitati' (99999) voci. ATTENZIONE: Ridurre il valore eliminerà le voci esistenti!" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, "Permette di rinominare le voci" @@ -3679,9 +4623,77 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_REMOVE, "Consente all'utente di rimuovere le voci dalla playlists." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, + "Ordina Scalette Alfabeticamente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, + "Ordina le scalette dei contenuti in ordine alfabetico, escludendo le scalette 'Cronologia', 'Immagini', 'Musica' e 'Video'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, + "Salva Scalette Usando Il Vecchio Formato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, + "Scrivere le scalette usando il formato di testo svalutato. Quando disabilitato, le scalette vengono formattate usando JSON." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, + "Comprimi Scalette" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_COMPRESSION, + "Archivia i dati della scaletta quando si scrive su disco. Riduce le dimensioni del file e i tempi di caricamento a scapito di un maggiore utilizzo della CPU (trascurabile). Può essere utilizzato con scalette vecchie o di nuovo formato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_INLINE_CORE_NAME, + "Mostra i core associati nelle scalette" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, + "Specifica quando etichettare le voci della scaletta con il core attualmente associato (se ce ne sono). NOTA: questa impostazione viene ignorata quando i sottomarini della scaletta sono abilitati." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SHOW_SUBLABELS, + "Mostra Sotto-Etichette delle scalette" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_SUBLABELS, + "Mostra informazioni aggiuntive per ogni voce della scaletta, come l'associazione di core corrente e il runtime (se disponibile). Ha un impatto di prestazioni variabile." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Tempo di Gioco:" + "Durata:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, + "Ultima Riproduzione:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME_TYPE, + "Durata delle sotto-etichetta della scaletta" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, + "Seleziona il tipo di record di durata da visualizzare nelle sotto-etichetta della scaletta. (Si noti che il corrispondente resgitro di durata deve essere abilitato tramite il menu 'Salvataggio')" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, + "Stile data e ora 'Ultima partita'" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, + "Imposta lo stile della data e dell'ora visualizzata per le informazioni dell' 'Ultima Partita'. NOTA: le opzioni '(AM/PM)' avranno un piccolo impatto sulle prestazioni su alcune piattaforme." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, + "Corrispondenza approssimativa degli archivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, + "Quando si cercano le playlist per le voci associate ai file compressi, corrispondono solo il nome del file di archivio invece di [nome del file]+[content]. Abilitare questa opzione per evitare di duplicare le voci della cronologia dei contenuti durante il caricamento dei file compressi." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, @@ -3691,6 +4703,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, "Se disabilitato, il contenuto viene aggiunto alle playlist solo se hai un core installato che supporta la sua estensione. Abilitando questo, verrà aggiunto alla playlist indipendentemente. In questo modo, è possibile installare il core di cui si ha bisogno in seguito dopo la scansione." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, + "Gestisci Scalette" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, + "Esegui attività di manutenzione nelle scalette." + ) /* Settings > Playlists > Playlist Management */ @@ -3698,10 +4718,50 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_DEFAULT_CORE, "Core Predefinito" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_DEFAULT_CORE, + "Specifica il core da usare quando si avvia un contenuto tramite una voce della scaletta che non ha un'associazione di core esistente." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_RESET_CORES, + "Reimposta Associazioni Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_RESET_CORES, + "Rimuovi le associazioni di base esistenti per tutte le voci della scaletta." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE, + "Modalità Visualizzazione Etichetta" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE, + "Cambia come vengono visualizzate le etichette dei contenuti in questa scaletta." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE, + "Metodo Di Ordinamento" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, + "Determina come le voci sono ordinate in questa scaletta." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, + "Pulisci Scaletta" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, + "Convalida le associazioni core e rimuove voci non valide e duplicate." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "Elimina scaletta" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DELETE_PLAYLIST, + "Rimuovi scaletta dalle cartelle di sistema." + ) /* Settings > User */ @@ -3709,6 +4769,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PRIVACY_SETTINGS, "Modifica le tue impostazioni della privacy." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCOUNTS_LIST, + "Account" + ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_LIST, "Gestisce gli account attivi e configurati." @@ -3727,7 +4791,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Imposta la lingua dell'interfaccia." + "Imposta la lingua dell'interfaccia utente." ) /* Settings > User > Privacy */ @@ -3744,6 +4808,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_ALLOW, "Abilita Discord" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISCORD_ALLOW, + "Consente all'applicazione discord di mostrare più dati sul contenuto riprodotto.\nNOTA: Non funzionerà con la versione del browser, solo con il client desktop nativo." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_ALLOW, "Consenti Posizione" @@ -3761,7 +4829,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Servizio Retro Achievements. Per maggiori informazioni, visitare il sito http://retroachievements.org" + "Guadagna risultati nei giochi classici. Per ulteriori informazioni, visita http://retroachievements.org" ) /* Settings > User > Accounts > RetroAchievements */ @@ -3772,7 +4840,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Inserisci il nome utente del tuo account Retro Achievements." + "Inserisci il nome utente dell'account RetroAchievements." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_PASSWORD, @@ -3811,9 +4879,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ASSETS_DIRECTORY, "Salva tutti i file scaricati in questa directory." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, + "Asset" + ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Questa posizione viene interrogata per impostazione predefinita quando le interfacce di menu cercano asset caricabili, ecc." + "Le risorse del menu utilizzate da RetroArch sono memorizzate in questa cartella." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -3831,9 +4903,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_DIRECTORY, "Qui vengono memorizzate miniature aggiuntive (boxarts / immagini , ecc.)" ) +MSG_HASH( /* FIXME Not RGUI specific */ + MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, + "Esplorazione File" + ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Imposta la directory di avvio per il filebrowser." + "Imposta la cartella iniziale per l'esplorazione dei file." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, @@ -3909,19 +4985,35 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Le configurazioni di registrazione saranno conservate qui." + "Le configurazioni di registrazione sono memorizzate in questa cartella." ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Definisce una directory in cui l'overlay viene mantenuto per un facile accesso." + "Gli overlay sono memorizzate in questa directory." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, + "Layout Video" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_DIRECTORY, + "Definisce una cartella in cui i layout video sono mantenuti per un facile accesso." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, + "Schermata" ) MSG_HASH( MENU_ENUM_SUBLABEL_SCREENSHOT_DIRECTORY, "Directory per scaricare screenshots su." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, + "Configurazione automatica dei comandi" + ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Se un joypad viene collegato, verrà automaticamente configurato se all'interno di questa directory è presente un file di configurazione corrispondente." + "I profili di controllo utilizzati per configurare automaticamente i controller sono memorizzati in questa cartella." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, @@ -3929,12 +5021,24 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Salva tutti i controlli remappati in questa directory." + "I remapppamenti dei comandi sono memorizzati in questa cartella." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, + "Scalette" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_DIRECTORY, "Salva tutte le playlist in questa directory." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUNTIME_LOG_DIRECTORY, + "Registri di Durata" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUNTIME_LOG_DIRECTORY, + "Salva i file di registri durata in questa cartella." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY, "Salvare il file" @@ -3955,6 +5059,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CACHE_DIRECTORY, "Se non viene impostata una directory, il contenuto estratto temporaneamente (ad esempio dagli archivi) si troverà in questa directory." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOG_DIR, + "Registro Eventi Di Sistema" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOG_DIR, + "Salva i file di registro degli eventi di sistema in questa cartella." + ) /* Music */ @@ -3997,11 +5109,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Aggiorna la lista delle lobby" + "Aggiorna Elenco Host per il Netplay" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Scansiona nuove lobby." + "Scansiona per gli host di rete." ) /* Netplay > Host */ @@ -4041,6 +5153,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_FILE, "Esegue la scansione di un file compatibile." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST, + "Scansione Manuale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST, + "Scansione configurabile basata sui nomi dei file di contenuto. Non è necessario che il contenuto corrisponda al database." + ) /* Import content > Scan File */ @@ -4055,6 +5175,94 @@ MSG_HASH( /* Import content > Manual Scan */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DIR, + "Contenuto Cartella" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DIR, + "Seleziona una cartella da analizzare per il contenuto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME, + "Nome del Sistema" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME, + "Specifica un 'nome di sistema' con cui associare il contenuto scansionato. Usato per nominare il file generato della scaletta e per identificare le miniature della scaletta." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, + "Nome Di Sistema Personalizzato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, + "Specifica manualmente un 'nome di sistema' per il contenuto scansionato. Usato solo quando 'Nome di sistema' è impostato a ''." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, + "Core Predefinito" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, + "Selezionare un core predefinito da utilizzare quando si avvia il contenuto scansionato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, + "Estensioni File" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, + "Elenco dei tipi di file da includere nella scansione, separati da spazi. Se vuoto, include tutti i tipi di file, o se è specificato un core, tutti i file supportati dal nucleo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Scansiona Ricorsivamente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Se abilitata, tutte le sottocartelle della cartella dei contenuti specificata saranno incluse nella scansione." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, + "Scansiona il contenuto degli archivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, + "Se abilitata, verranno cercati i file di archivio (.zip, .7z, ecc.) per i contenuti validi/supportati. Potrebbe avere un impatto significativo sulle prestazioni di scansione." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE, + "File DAT Arcade" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE, + "Selezionare un file XML DAT Logiqx o MAME List per abilitare la denominazione automatica del contenuto arcade scannerizzato (MAME, FinalBurn Neo, ecc.)." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE_FILTER, + "Filtro DAT Arcade" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE_FILTER, + "Quando si utilizza un file DAT di arcade, aggiungere un contenuto alla playlist solo se viene trovata una voce corrispondente al file DAT." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_OVERWRITE, + "Sovrascrivi Scaletta Esistente" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_OVERWRITE, + "Se abilitata, qualsiasi scaletta esistente verrà eliminata prima di scansionare il contenuto. Quando disabilitato, le voci della scaletta esistenti sono conservate e solo i contenuti attualmente mancanti dalla scaletta saranno aggiunti." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, + "Avvia Scansione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_START, + "Scansiona il contenuto selezionato." + ) /* Playlist > Playlist Item */ @@ -4090,6 +5298,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_FAVORITES_PLAYLIST, "Aggiunge il titolo ai tuoi preferiti." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SET_CORE_ASSOCIATION, + "Imposta Associazione Core" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION, + "Reimposta Associazione Core" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INFORMATION, "Informazioni" @@ -4098,16 +5314,40 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INFORMATION, "Visualizza ulteriori informazioni sul contenuto." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWNLOAD_PL_ENTRY_THUMBNAILS, + "Scarica Miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_PL_ENTRY_THUMBNAILS, + "Scarica le anteprime di schermate/box art/schermata titolo per il contenuto attuale. Aggiorna ogni anteprima esistente." + ) /* Playlist Item > Set Core Association */ MSG_HASH( MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Core attuale" + "Core Attuale" ) /* Playlist Item > Information */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_LABEL, + "Nome" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_PATH, + "Percorso File" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_RUNTIME, + "Tempo Di Gioco" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_LAST_PLAYED, + "Ultima Riproduzione" + ) /* Quick Menu */ @@ -4239,6 +5479,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_INPUT_REMAPPING_OPTIONS, "Modifica i controlli per il contenuto attualmente in esecuzione." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CHEAT_OPTIONS, + "Trucchi" + ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_CHEAT_OPTIONS, "Imposta i codici cheat." @@ -4293,6 +5537,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CORE, "Cancella il file di Remap del Core" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REMAP_FILE_SAVE_CONTENT_DIR, + "Salva il file del remap per il contenuto della cartella" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REMAP_FILE_REMOVE_CONTENT_DIR, + "Elimina il file del gioco per il contenuto della cartella" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REMAP_FILE_SAVE_GAME, "Salva il file di Remap del gioco" @@ -4311,6 +5563,10 @@ MSG_HASH( /* Quick Menu > Cheats */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_START_OR_CONT, + "Inizia o continua la ricerca di trucchi" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD, "Carica File Cheat" @@ -4319,6 +5575,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD, "Carica un file cheat." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD_APPEND, + "Carica File Cheat (Allegato)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD_APPEND, + "Carica un file cheat e aggiungi ai trucchi esistenti." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RELOAD_CHEATS, + "Ricarica I Trucchi Specifici" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_SAVE_AS, "Salva il file cheat come" @@ -4327,6 +5595,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "Salva i cheat correnti come file di salvataggio." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, + "Aggiungi un nuovo trucco in cima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, + "Aggiungi un nuovo trucco sul fondo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, + "Elimina Tutti I Trucchi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, + "Auto-Applica i Trucchi Durante il caricamento Del gioco" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_LOAD, + "Applica automaticamente i trucchi quando il gioco è caricato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_TOGGLE, + "Applica Dopo L'attivazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_TOGGLE, + "Applica il trucco immediatamente dopo aver attivato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_CHANGES, "Applica i cambiamenti" @@ -4335,9 +5631,125 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_CHANGES, "Le modifiche sui cheat avranno effetto immediato." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT, + "Trucchi" + ) /* Quick Menu > Cheats > Start or Continue Cheat Search */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_START_OR_RESTART, + "Inizia o riavvia la ricerca dei trucchi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_START_OR_RESTART, + "Sinistra/Destra per cambiare dimensione bit" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, + "Big Endian : 258 = 0x0102,\nLittle Endian : 258 = 0x0201" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, + "Premere sinistra o destra per modificare il valore" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, + "Uguale a %u (%X)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LT, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL, + "Meno Di Prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LTE, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL, + "Meno di o uguale a prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GT, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL, + "Maggiore Di Prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GTE, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL, + "Maggiore di o uguale a prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQ, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL, + "Uguale a Prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_NEQ, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL, + "Non uguale a prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQPLUS, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS, + "Sinistra/Destra per cambiare valore" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL, + "Uguale a prima +%u (%X)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQMINUS, + "Cerca memoria per valori" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQMINUS, + "Sinistra/Destra per cambiare valore" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL, + "Uguale a prima -%u (%X)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_MATCHES, + "Aggiungi le %u partite alla tua lista" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_MATCH, + "Elimina Partita #" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_COPY_MATCH, + "Crea Codice Corrispondenza #" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_MATCH, + "Indirizzo corrispondenza: %08X Maschera: %02X" + ) /* Quick Menu > Cheats > Load Cheat File (Replace) */ @@ -4348,27 +5760,195 @@ MSG_HASH( /* Quick Menu > Cheats > Load Cheat File (Append) */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_FILE_APPEND, + "File Di Cheat (Allegato)" + ) /* Quick Menu > Cheats > Cheat Details */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DETAILS_SETTINGS, + "Dettagli Trucchi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_IDX, + "Indice" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_IDX, + "Posizione indicizzata nella lista." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_STATE, "Abilitato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DESC, + "Descrizione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_HANDLER, + "Gestore" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_MEMORY_SEARCH_SIZE, + "Dimensione Ricerca Memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_TYPE, + "Tipo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_VALUE, + "Valore" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS, + "Indirizzo Memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_BROWSE_MEMORY, + "Indirizzo di navigazione: %08X" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS_BIT_POSITION, + "Maschera dell'Indirizzo della Memoria" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_ADDRESS_BIT_POSITION, + "Indirizzo bitmask quando la dimensione di ricerca della memoria < 8-bit." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, + "Numero di Iterazioni" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, + "Il numero di volte che il trucco verrà applicato. Usa con le altre due opzioni 'Iterazione' per influenzare ampie aree di memoria." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, + "Aumento Indirizzo a ogni Iterazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, + "Dopo ogni iterazione il 'Indirizzo della memoria' verrà aumentato di questo numero di volte il 'Dimensione della ricerca della memoria'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, + "Aumenta il valore a ogni iterazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, + "Dopo ogni iterazione il 'Valore' sarà aumentato di questo importo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, + "Vibra per la memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_VALUE, + "Valore della vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PORT, + "Porta della vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PRIMARY_STRENGTH, + "Forza principale della vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_PRIMARY_DURATION, + "Durata principale della vibrazione (ms)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_STRENGTH, + "Forza secondaria della vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_SECONDARY_DURATION, + "Durata secondaria della vibrazione (ms)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_CODE, + "Codice" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_AFTER, + "Aggiungi un nuovo trucco dopo questo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BEFORE, + "Aggiungi un nuovo trucco prima di questo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_COPY_AFTER, + "Copia Questo Trucco Dopo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, + "Copia Questo Trucco Prima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, + "Rimuovi Questo Trucco" + ) /* Quick Menu > Disc Control */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, + "Espelli Disco" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, + "Apre il vassoio di disco virtuale e rimuove il disco attualmente caricato. Se 'Pausa contenuto quando il menu è attivo' è abilitato, alcuni core potrebbero non registrare le modifiche a meno che il contenuto non venga ripreso per alcuni secondi dopo ogni azione di controllo del disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "Aggiungere Immagine disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, + "Inserisce il disco corrispondente a 'Indice disco corrente' e chiude il vassoio disco virtuale. Se 'Pausa contenuto quando il menu è attivo' è abilitato, alcuni core potrebbero non registrare le modifiche a meno che il contenuto non venga ripreso per alcuni secondi dopo ogni azione di controllo del disco." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, + "Carica Nuovo Disco" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, + "Espellere il disco corrente, selezionare un nuovo disco dal filesystem quindi inserirlo e chiudere il vassoio del disco virtuale. NOTA: Questa è una funzione legacy. Si consiglia invece di caricare titoli multi-disco tramite playlist M3U, che consentono la selezione dei dischi usando le opzioni 'Espelli/Inserisci Disco' e 'Indice attuale del disco'." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND_TRAY_OPEN, + "Selezionare un nuovo disco dal file di sistema e inserirlo senza chiudere il vassoio del disco virtuale. NOTA: Questa è una funzione legacy. Si consiglia invece di caricare titoli multi-disco tramite playlist M3U, che consentono la selezione dei dischi utilizzando l'opzione 'Indice disco corrente'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, "Indice del Disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_INDEX, + "Scegli il disco corrente dall'elenco delle immagini disponibili. Il disco verrà caricato quando viene selezionato 'Inserisci disco'." + ) /* Quick Menu > Shaders */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADERS_ENABLE, + "Shaders video" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, + "Guarda i file Shader per le modifiche" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, + "Applicare automaticamente le modifiche apportate ai file shader sul disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "Carica Shader Preset" @@ -4377,6 +5957,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, "Carica uno shader preimpostato. Lo shader pipeline sarà automaticamente impostato." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, + "Salva" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE, + "Salva la preimpostazione shader corrente." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, "Rimuovi" @@ -4401,9 +5989,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS, "Consente di modificare direttamente lo shader corrente. Le modifiche non verranno salvate nel file preimpostato." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, + "Passaggi Shader" + ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Aumenta o diminuisce la quantità di shader pipeline. È possibile legare uno shader separato a ciascun passaggio di pipeline e configurare la sua scala e il suo filtro." + "Aumenta o diminuisce la quantità di passaggi della pipeline degli shader. Le ombre separate possono essere associate ad ogni passaggio della pipeline e configurarne la scala e il filtraggio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FILTER, @@ -4424,13 +6016,29 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS, "Salva le impostazioni correnti dello shader come nuova preimpostazione dello shader." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GLOBAL, + "Salva Preset Globale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL, + "Salva le impostazioni di shader attuali come impostazione globale predefinita." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "Salva Core Preset" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Salva le impostazioni dello shader corrente come impostazioni predefinite per questa applicazione/core." + "Salva le impostazioni di shader attuali come predefinito per questo nucleo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, + "Salva Preimpostazione Cartella Contenuto" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, + "Salva le impostazioni di shader correnti come predefinito per tutti i file nella directory di contenuto corrente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, @@ -4443,6 +6051,10 @@ MSG_HASH( /* Quick Menu > Shaders > Remove */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND, + "Nessun parametro di shader automatici trovato" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL, "Rimuovi Global Preset" @@ -4493,6 +6105,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, "Salva un file di configurazione override che si applica a tutti i contenuti caricati con questo core. Avrà la precedenza sulla configurazione principale." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, + "Salvala sovrascrittura della configurazione per la cartella" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, + "Salva un file di configurazione di rimpiazzo che verrà applicato per tutti i contenuti caricati dalla stessa cartella del file corrente. Ha la precedenza sulla configurazione principale." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, "Salva gli Override dei giochi" @@ -4508,9 +6128,37 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY, "Nessun achievements da visualizzare." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE, + "Pausa della modalità Hardcore degli obiettivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_PAUSE, + "Metti in pausa gli obiettivi per la sessione corrente (questa azione consentirà di salvare stati, tradimenti, riavvolgimento, pausa e rallentamento)." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME, + "Riprendi la Modalità Hardcore degli obiettivi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_RESUME, + "Riprendi gli obiettivi per la sessione corrente (questa azione disabiliterà gli stati di salvataggio, i trucchi, il riavvolgimento, la pausa e il rallentamento e ripristina la partita corrente)." + ) /* Quick Menu > Information */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_INFO_CHEEVOS_HASH, + "Hash RetroAchievements" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DETAIL, + "Elemento Database" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RDB_ENTRY_DETAIL, + "Mostra le informazioni del database per il contenuto corrente" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY, "Nessuna voce da visualizzare." @@ -4530,6 +6178,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "Nessuna informazione sul core disponibile." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "Nessun Core Backup Disponibile" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "Nessun preferito disponibile." @@ -4562,6 +6214,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Nessuna impostazione trovata." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Nessun Dispositivo Bluetooth Trovato" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Nessuna rete trovata." @@ -4601,6 +6257,46 @@ MSG_HASH( /* FIXME Should be MENU_LABEL_VALUE */ MSG_UNKNOWN_COMPILER, "Compilatore sconosciuto" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_OR, + "Condividi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_XOR, + "Afferra" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_VOTE, + "Vota" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG, + "Condivisione Ingresso Analogico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_MAX, + "Massima" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_AVERAGE, + "Media" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NONE, + "Nessuno" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NO_PREFERENCE, + "Nessuna preferenza" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE_BOUNCE, + "Rimbalzo Sinistra/Destra" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE_LOOP, + "Scorri A Sinistra" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_IMAGE_MODE, "Modalità Immagine" @@ -4609,6 +6305,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SPEECH_MODE, "Modalità vocale" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_NARRATOR_MODE, + "Modalità Narratore" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV, + "Cronologia & Preferiti" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_ALL, + "Tutte Le Playlist" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV, + "Cronologia & Preferiti" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_ALWAYS, + "Sempre" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER, + "Mai" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_RUNTIME_AGGREGATE, + "Aggregato" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_CHARGED, "Caricato" @@ -4623,7 +6347,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Nessuna fonte" + "Nessuna Fonte" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, @@ -4643,7 +6367,71 @@ MSG_HASH( /* FIXME Unused? */ ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "RetroPad w/ Analogico" + "RetroPad con analogico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NONE, + "Nessuno" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UNKNOWN, + "Sconosciuto" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_START, + "Mantieni Start (2 secondi)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "Mantieni Seelect (2 secondi)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWN_SELECT, + "Giù + Seleziona" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_DISABLED, + "" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_CHANGES, + "Modifiche" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_DOES_NOT_CHANGE, + "Non Cambiare" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_INCREASE, + "Aumenta" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_DECREASE, + "Diminuisci" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_EQ_VALUE, + "= Valore Vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_NEQ_VALUE, + "!= Valore Vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_LT_VALUE, + "< Valore Vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_GT_VALUE, + "> Valore Vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_INCREASE_BY_VALUE, + "Aumenta del valore vibrazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_RUMBLE_TYPE_DECREASE_BY_VALUE, + "Riduce per valore vibrazione" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_PORT_16, @@ -4665,10 +6453,94 @@ MSG_HASH( MENU_ENUM_LABEL_CHEAT_TYPE_DECREASE_VALUE, "Diminuisci per valore" ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_EQ, + "Esegui Il Prossimo Trucchi Se Valore = Memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_NEQ, + "Esegui Il Prossimo Trucco Se Valore != Memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_LT, + "Esegui Il Prossimo Trucco Se Valore < Memoria" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_TYPE_RUN_NEXT_IF_GT, + "Esegui Il Prossimo Trucchi Se Valore > Memoria" + ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_HANDLER_TYPE_EMU, "Emulatore" ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_1, + "1-Bit, Valore Massimo = 0x01" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_2, + "2-Bit, Valore Massimo = 0x03" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_4, + "4-Bit, Valore Massimo = 0x0F" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_8, + "8-Bit, Valore Massimo = 0XFF" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_16, + "16-Bit, Valore Massimo = 0xFFFF" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_MEMORY_SIZE_32, + "32-Bit, Valore Massimo = 0xFFFFFF" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_DEFAULT, + "Predefinito Di Sistema" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_ALPHABETICAL, + "Alfabetico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_OFF, + "Nessuno" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_DEFAULT, + "Mostra Etichette Complete" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS, + "Rimuovi () Contenuto" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_BRACKETS, + "Rimuovi [] Contenuto" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_REMOVE_PARENS_AND_BRACKETS, + "Rimuovere () e []" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION, + "Mantieni Regione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_DISC_INDEX, + "Mantieni Indice Del Disco" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_KEEP_REGION_AND_DISC_INDEX, + "Mantieni Indice Regione e Disco" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_THUMBNAIL_MODE_DEFAULT, + "Predefinito Di Sistema" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_SCREENSHOTS, "Schermate" @@ -4717,6 +6589,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY, "Sbloccato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNOFFICIAL_ENTRY, + "Non Ufficiale" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNSUPPORTED_ENTRY, + "Non Supportato" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DONT_CARE, "Non importa" @@ -4725,6 +6605,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LINEAR, "Lineare" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NEAREST, + "Più Vicino" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CONTENT_DIR, + "" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CUSTOM, + "" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME_DETECT, + "" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_ANALOG, "Analogico sinistro" @@ -4737,6 +6633,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEY, "(Tasto: %s)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, + "Ruota Del Mouse Su" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, + "Ruota Del Mouse Giù" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, + "Rotella Del Mouse Sinistra" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, + "Ruota Del Mouse Destra" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "Anticipato" @@ -4844,29 +6756,233 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE, "Abilita lo spessore del riempimento dello sfondo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE, + "Aumenta la grossolanità del motivo scacchiera dello sfondo del menu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, "Abilita riempimento dei bordi" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, + "Spessore Del Filler Di Bordo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, + "Aumenta la grossolanità del motivo scacchiera dello sfondo del menu." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_ENABLE, + "Mostra bordo menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_FULL_WIDTH_LAYOUT, + "Abilita Layout a Larghezza Piena" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_FULL_WIDTH_LAYOUT, + "Ridimensiona e posiziona le voci del menu per sfruttare al meglio lo spazio dello schermo disponibile. Disabilita questa opzione per usare il classico layout a due colonne a larghezza fissa." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Filtro lineare del Menu" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_LINEAR_FILTER, + "Aggiunge una leggera sfocatura al menu per rimuovere i bordi dei pixel duri." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_INTERNAL_UPSCALE_LEVEL, + "Upscaling Interno" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_INTERNAL_UPSCALE_LEVEL, + "Ridimensiona l'interfaccia del menu prima di disegnarlo sullo schermo. Quando viene usato con 'Filtro lineare dei menu' abilitato, rimuove gli artefatti di scala (pixel irregolari) mantenendo un'immagine nitida. Ha un impatto significativo sulle prestazioni che aumenta con il livello di upscaling." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_ASPECT_RATIO, + "Rapporto Dimensioni Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_ASPECT_RATIO, + "Seleziona il rapporto delle proporzioni del menù. I rapporti Widescreen aumentano la risoluzione orizzontale dell'interfaccia del menù. (Può richiedere un riavvio se 'Blocca il rapporto delle proporzioni del menu' è disabilitato)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_ASPECT_RATIO_LOCK, + "Blocca Rapporto Dimensioni Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_ASPECT_RATIO_LOCK, + "Assicura che il menu sia sempre visualizzato con il corretto rapporto di aspetto. Se disabilitato, il menu rapido sarà allungato per corrispondere al contenuto attualmente caricato." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, "Colore del tema di Menu" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RGUI_MENU_COLOR_THEME, + "Selezionare un tema di colore diverso. Scegliendo 'Personalizzato' si abilita l'uso di file predefiniti tema menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_THEME_PRESET, + "Preimpostazione Tema Menu Personalizzato" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RGUI_MENU_THEME_PRESET, + "Selezionare una preimpostazione del tema del menu dal browser dei file." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_SHADOWS, + "Effetti Ombra" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_SHADOWS, + "Abilita le ombre per il testo, i bordi e le miniature del menu. Ha un impatto modesto sulle prestazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT, + "Animazione Sfondo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT, + "Abilita l'effetto di animazione delle particelle di sfondo. Ha un impatto significativo sulle prestazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT_SPEED, + "Velocità Animazione Sfondo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT_SPEED, + "Regola la velocità degli effetti di animazione delle particelle di sfondo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_INLINE_THUMBNAILS, + "Mostra Miniature delle Playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_INLINE_THUMBNAILS, + "Abilita la visualizzazione delle miniature in linea downscaled durante la visualizzazione delle playlist. Quando disabilitato, 'Miniature in alto' può essere ancora attivata a schermo intero premendo RetroPad Y." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THUMBNAILS_RGUI, + "Miniatura in Alto" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_THUMBNAILS_RGUI, + "Tipo di miniatura da visualizzare in alto a destra delle playlist. Questa miniatura può essere attivata a schermo intero premendo RetroPad Y." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_RGUI, + "Miniatura In Basso" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_RGUI, + "Tipo di miniatura da visualizzare in basso a destra delle playlist." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_SWAP_THUMBNAILS, + "Scambia Miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_SWAP_THUMBNAILS, + "Scambia le posizioni di visualizzazione di 'Miniature in alto' e 'Miniatura in basso'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_THUMBNAIL_DOWNSCALER, + "Metodo Di Ridimensionamento Miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_THUMBNAIL_DOWNSCALER, + "Metodo di ricampionamento usato quando si restringono miniature di grandi dimensioni per adattarsi al display." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_THUMBNAIL_DELAY, + "Ritardo Miniatura (ms)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_THUMBNAIL_DELAY, + "Applica un ritardo di tempo tra la selezione di una voce della playlist e il caricamento delle miniature associate. Impostare questo valore ad un valore di almeno 256 ms consente uno scorrimento rapido senza ritardi anche sui dispositivi più lenti." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_EXTENDED_ASCII, + "Supporto Esteso ASCII" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_EXTENDED_ASCII, + "Abilita la visualizzazione di caratteri ASCII non standard. Richiesto per compatibilità con alcune lingue occidentali non inglesi. Ha un impatto di prestazioni moderato." + ) /* RGUI: Settings Options */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_POINT, + "Il più vicino (Veloce)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_BILINEAR, + "Bilineare" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_THUMB_SCALE_SINC, + "Sinc/Lanczos3 (Lento)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_UPSCALE_NONE, + "Nessuno" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_9_CENTRE, + "16:9 (Centrato)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_16_10_CENTRE, + "16:10 (Centrato)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FIT_SCREEN, + "Adatta Schermo" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_INTEGER, "Scala Intera" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, + "Schermo Di Riempimento (Stirato)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, "Personalizzato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_RED, + "Rosso Classico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_ORANGE, + "Arancione Classico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_YELLOW, + "Giallo Classico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREEN, + "Verde Classico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_BLUE, + "Blu Classico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_VIOLET, + "Viola Classica" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CLASSIC_GREY, + "Grigio Classico" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LEGACY_RED, "Rosso Legacy" @@ -4895,9 +7011,85 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_VOLCANIC_RED, "Rosso vulcanico" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_LAGOON, + "Laguna" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FAIRYFLOSS, + "Seta di Fata" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLATUI, + "Minimalista" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_DARK, + "Gruvbox scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_GRUVBOX_LIGHT, + "Gruvbox chiaro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_HACKING_THE_KERNEL, + "Hackerare il Kernel" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_ONE_DARK, + "Uno Oscuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_DARK, + "Scuro Solarizzato" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_SOLARIZED_LIGHT, + "Chiaro Solarizzato" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_DARK, + "Tango scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_TANGO_LIGHT, + "Tango chiaro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_FLUX, + "Flusso" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_SNOW, + "Neve (Leggera)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_SNOW_ALT, + "Neve (intensa)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_RAIN, + "Pioggia" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_VORTEX, + "Vortice" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RGUI_PARTICLE_EFFECT_STARFIELD, + "Cielo stellato" + ) /* XMB: Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS, + "Miniature a sinistra" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS, + "Tipo di miniatura da visualizzare a sinistra." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPER, "Sfondo dinamico" @@ -4918,14 +7110,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT, "Evidenziazione dell'icona orizzontale dell'animazione" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT, + "L'animazione che si attiva durante lo scorrimento tra schede." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_MOVE_UP_DOWN, "Sposta Animazione su/giù" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN, + "L'animazione che si attiva quando si sposta su o giù." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, "Menu principale Animazione Apri/Chiudi" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, + "L'animazione che si attiva quando si apre un sottomenu." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR, "Menu del fattore Alfa" @@ -4950,6 +7154,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_BLUE, "Font del Menu di colore Blue" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_LAYOUT, + "Layout Menu" + ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_LAYOUT, "Seleziona un layout diverso per l'interfaccia XMB." @@ -4966,6 +7174,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "Abilita Ombre delle Icone" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, + "Disegna ombre per tutte le icone. Questo avrà un colpo di performance minore." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, + "Pipeline del menù di Shader" + ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE, "Seleziona un effetto con sfondo animato. Può essere intenso in base alla GPU a seconda dell'effetto. Se le prestazioni sono insoddisfacenti, disattivare o tornare ad un effetto più semplice." @@ -4978,13 +7194,29 @@ MSG_HASH( MENU_ENUM_SUBLABEL_XMB_MENU_COLOR_THEME, "Seleziona un colore di sfondo differente nel tema." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS, + "Disposizione Verticale Delle Miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS, + "Visualizza la miniatura sinistra sotto quella destra, sul lato destro dello schermo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_XMB_THUMBNAIL_SCALE_FACTOR, + "Fattore Scala delle Miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_THUMBNAIL_SCALE_FACTOR, + "Riduce la dimensione del display delle miniature ridimensionando la larghezza massima consentita." + ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Abilita la colonna Impostazioni" ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Abilita la colonna Impostazioni. È necessario un riavvio affinchè le modifiche abbiano effetto." + "Abilita la scheda Impostazioni. (Riavvio richiesto)" ) /* XMB: Settings Options */ @@ -4995,7 +7227,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Onda (semplificata)" + "Nastro (semplificato)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, @@ -5005,10 +7237,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SNOW, "Neve" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SNOWFLAKE, + "Fiocco Di Neve" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_CUSTOM, "Personalizzato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_FLATUI, + "Minimalista" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME, "Monocromatico" @@ -5029,6 +7269,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_RETROACTIVE, "RetroAttivo" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_AUTOMATIC, + "Automatico" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_AUTOMATIC_INVERTED, + "Automatico Invertito" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_APPLE_GREEN, "Mela Verde" @@ -5037,6 +7285,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK, "Scuro" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LIGHT, + "Chiaro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_MORNING_BLUE, + "Blu Del Mattino" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_SUNBEAM, + "Luce solare" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_DARK_PURPLE, "Viola Scuro" @@ -5069,16 +7329,56 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_VOLCANIC_RED, "Rosso vulcanico" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_LIME, + "Verde Lime" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_PIKACHU_YELLOW, + "Giallo Di Pikachu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_GAMECUBE_PURPLE, + "Cubo Viola" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_FAMICOM_RED, + "Rosso Famiglia" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_FLAMING_HOT, + "Caldo Fiammeggiante" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME_ICE_COLD, + "Freddo glaciale" + ) /* Ozone: Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLLAPSE_SIDEBAR, + "Comprimi la barra laterale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR, + "Avere la barra laterale sinistra sempre collassato." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, + "Tronca Nomi della playlist" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, + "Rimuove i nomi di sistema dalle playlist. Ad esempio, 'Sony - PlayStation' diventa 'PlayStation'. (Riavvio richiesto)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, "Ordina Scalette Dopo La Trunzione Del Nome" ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Se abilitata, le playlist saranno riordinate in ordine alfabetico dopo aver rimosso il componente 'system' dei loro nomi. Le modifiche richiedono un riavvio per avere effetto." + "Le playlist saranno riordinate in ordine alfabetico dopo aver rimosso il componente produttore dei loro nomi. (Riavvio richiesto)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, @@ -5096,6 +7396,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_BASIC_BLACK, "Nero Basic" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLOR_THEME_GRUVBOX_DARK, + "Gruvbox scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, + "Seconda Miniatura" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, + "Sostituire il pannello dei metadati del contenuto con un'altra miniatura." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, + "Usa l'animazione del testo per i Metadati del Contenuto" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_SCROLL_CONTENT_METADATA, + "Se abilitata, ogni elemento di metadati di contenuto mostrato nella barra laterale destra delle playlist (nucleo associato, tempo di riproduzione) occuperà una singola riga; le stringhe che superano la larghezza della barra laterale saranno visualizzate come testo dell'animazione di scorrimento. Quando disabilitato, ogni elemento di metadati di contenuto verrà visualizzato staticamente, confezionato per occupare quante righe richieste." + ) /* MaterialUI: Settings > User Interface > Appearance */ @@ -5107,6 +7427,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "Abilita/disabilita le icone del menu visualizzate sul lato sinistro di ogni voce." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, + "Ottimizza Disposizione Orizzontale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, + "Regola automaticamente il layout del menu per adattarsi meglio allo schermo quando si utilizzano gli orientamenti di visualizzazione orizzontale." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_SHOW_NAV_BAR, + "Mostra Barra di Navigazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_SHOW_NAV_BAR, + "Visualizza le scorciatoie permanenti del menu a schermo. Abilita il passaggio veloce tra le categorie di menu. Consigliato per i dispositivi touchscreen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, + "Ruota Automaticamente La Barra Di Navigazione" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, + "Spostare automaticamente la barra di navigazione sul lato destro dello schermo quando si usano gli orientamenti di visualizzazione orizzontale." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME, "Colore del tema di Menu" @@ -5115,6 +7459,62 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME, "Seleziona uno sfondo differente con colore sfumato nel tema." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIMATION, + "Animazione della Transizione del Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_TRANSITION_ANIMATION, + "Abilita gli effetti di animazione fluidi quando si naviga tra diversi livelli del menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT, + "Miniatura in modalità ritratto" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT, + "Specifica la modalità di visualizzazione delle miniature della playlist quando si usano gli orientamenti di visualizzazione verticale." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE, + "Miniatura in modalità orizzontale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE, + "Specifica la modalità di visualizzazione delle miniature della scaletta quando si utilizzano gli orientamenti di visualizzazione orizzontale." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, + "Mostra Miniatura Secondaria Nell'elenco visite" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, + "Visualizza una miniatura secondaria quando si usano le modalità di visualizzazione delle miniature della scaletta 'Lista'. Questa impostazione si applica solo quando lo schermo ha una larghezza fisica sufficiente per mostrare due miniature." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, + "Genera gli sfondi delle miniature" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, + "Abilita il riempimento di spazio inutilizzato nelle immagini delle miniature con uno sfondo solido. Ciò assicura una dimensione di visualizzazione uniforme per tutte le immagini, migliorando l'aspetto del menu quando si visualizzano le miniature di contenuto misto con diverse dimensioni di base." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THUMBNAILS_MATERIALUI, + "Miniatura Principale" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_THUMBNAILS_MATERIALUI, + "Tipo principale di miniatura da associare ad ogni voce della playlist. In genere serve come icona del contenuto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_MATERIALUI, + "Miniatura Secondaria" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_MATERIALUI, + "Tipo ausiliario di miniatura da associare ad ogni voce della scaletta. L'utilizzo dipende dalla modalità di visualizzazione delle miniature della scaletta." + ) /* MaterialUI: Settings Options */ @@ -5134,6 +7534,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GREEN, "Verde" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_NVIDIA_SHIELD, + "Nvidia Shield" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_RED, "Rosso" @@ -5142,6 +7546,58 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW, "Giallo" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_MATERIALUI_DARK, + "Materiale Ui Scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_OZONE_DARK, + "Ozone Scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_GRUVBOX_DARK, + "Gruvbox scuro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_SOLARIZED_DARK, + "Scuro Solarizzato" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_BLUE, + "Cutie Blu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_CYAN, + "Cutie Ciano" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_GREEN, + "Cutie verde" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_ORANGE, + "Cutie Arancione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PINK, + "Cutie Rosa" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_PURPLE, + "Cutie Viola" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_RED, + "Cutie Rosso" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_FADE, + "Dissolvenza" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_SLIDE, + "Diapositive" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_SMALL, "Elenco (Piccolo)" @@ -5166,6 +7622,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_LARGE, "Elenco (Grande)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_EXCLUDE_THUMBNAIL_VIEWS, + "Escludi Le visualizzazioni delle Miniature" + ) /* Qt (Desktop Menu) */ @@ -5177,10 +7637,54 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_LOAD_CORE, "&Carica Core..." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_UNLOAD_CORE, + "&Scarica Core" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_FILE_EXIT, + "E&sci" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT, + "&Modifica" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_EDIT_SEARCH, + "&Cerca" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW, + "&Visualizza" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_CLOSED_DOCKS, + "Pannelli Chiusi" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_SHADER_PARAMS, "Anteprima dei parametri Shader" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, + "&Impostazioni..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_DOCK_POSITIONS, + "Ricorda le posizioni del pannello:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_GEOMETRY, + "Ricorda la geometria delle finestre:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SAVE_LAST_TAB, + "Ricorda l'ultima scheda browser contenuti:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME, + "Tema:" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_DARK, "Scuro" @@ -5189,38 +7693,374 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THEME_CUSTOM, "Personalizzato..." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_TITLE, + "Impostazioni" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_TOOLS, + "&Strumenti" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_HELP, "&Aiuto" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_ABOUT, + "Informazioni Su RetroArch" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_HELP_DOCUMENTATION, + "Documentazione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOAD_CUSTOM_CORE, + "Carica core Personalizzato..." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_LOAD_CORE, "Carica Core" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOADING_CORE, + "Caricamento Core..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_NAME, + "Nome" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_VERSION, + "Versione" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_TAB_PLAYLISTS, + "Playlist" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER, + "Browser dei file" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_TOP, + "Alto" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_TAB_FILE_BROWSER_UP, + "Su" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_DOCK_CONTENT_BROWSER, + "Browser Dei Contenuti" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_SCREENSHOT, + "Schermata" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_TITLE_SCREEN, + "Schermata Titolo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ALL_PLAYLISTS, + "Tutte Le Playlist" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CORE_INFO, "Informazione sul Core" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_SELECTION_ASK, + "" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_INFORMATION, "Informazioni" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_WARNING, + "Attenzione" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_ERROR, "Errore" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_NETWORK_ERROR, + "Errore Di Rete" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_RESTART_TO_TAKE_EFFECT, + "Riavviare il programma affinché le modifiche abbiano effetto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOG, + "Registro" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ITEMS_COUNT, + "%1 elementi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DROP_IMAGE_HERE, + "Trascina qui l'immagine" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DONT_SHOW_AGAIN, + "Non mostrarlo più" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_STOP, + "Ferma" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ASSOCIATE_CORE, + "Core Associato" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_HIDDEN_PLAYLISTS, + "Playlist Nascoste" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_HIDE, + "Nascondi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_HIGHLIGHT_COLOR, + "Colore dell'evidenziazione:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CHOOSE, + "&Scegli..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_COLOR, + "Seleziona Colore" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_THEME, + "Seleziona Tema" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CUSTOM_THEME, + "Tema Personalizzato" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_PATH_IS_BLANK, + "Il percorso del file è vuoto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_IS_EMPTY, + "Il file è vuoto." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_READ_OPEN_FAILED, + "Impossibile aprire il file in lettura." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_WRITE_OPEN_FAILED, + "Impossibile aprire il file in scrittura." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FILE_DOES_NOT_EXIST, + "Il file non esiste." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SUGGEST_LOADED_CORE_FIRST, + "Suggerisci prima il core caricato:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ZOOM, + "Ingrandisci" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW, + "Visualizza" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_ICONS, + "Icone" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_VIEW_TYPE_LIST, + "Elenco" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_SEARCH_CLEAR, "Cancella" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PROGRESS, + "Progresso:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_LIST_MAX_COUNT, + "\"Tutte le playlist\" elenco massimo voci:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_ALL_PLAYLISTS_GRID_MAX_COUNT, + "\"Tutte le Playlist\" max voci della griglia:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_SHOW_HIDDEN_FILES, + "Mostra file e cartelle nascoste:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_NEW_PLAYLIST, + "Nuova playlist" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ENTER_NEW_PLAYLIST_NAME, + "Inserisci il nome della nuova playlist:" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_DELETE_PLAYLIST, "Elimina scaletta" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_RENAME_PLAYLIST, + "Rinomina playlist" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_QUESTION, + "Domanda" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_NAME, + "Nome:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_PATH, + "Percorso:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_PLAYLIST_ENTRY_EXTENSIONS, + "Estensioni:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DELETE, + "Elimina" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_ENTRY, + "Aggiungi Voce..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FILES, + "Aggiungi File..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_ADD_FOLDER, + "Aggiungi Cartella..." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_EDIT, + "Modifica" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FILES, + "Seleziona File" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SELECT_FOLDER, + "Seleziona Cartella" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_FIELD_MULTIPLE, + "" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_COULD_NOT_UPDATE_PLAYLIST_ENTRY, + "Errore nell'aggiornare la voce della playlist." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MOVE_DOWN, + "Sposta In Basso" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MOVE_UP, + "Sposta In Alto" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_LOAD, + "Carica" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SAVE, + "Salva" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_REMOVE, + "Rimuovi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_REMOVE_PASSES, + "Rimuovi I Passaggi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_APPLY, + "Applica" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SHADER_ADD_PASS, + "Aggiungi Passaggio" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SHADER_CLEAR_ALL_PASSES, + "Cancella Tutti I Passaggi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_THUMBNAIL, + "Scarica miniatura" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALREADY_IN_PROGRESS, + "È già in corso un download." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_STARTUP_PLAYLIST, + "Avvia nella playlist:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_TYPE, + "Miniatura" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS_THUMBNAIL_CACHE_LIMIT, + "Limite cache miniature:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS, + "Scarica Tutte Le Miniature" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS_ENTIRE_SYSTEM, + "Intero Sistema" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_ALL_THUMBNAILS_THIS_PLAYLIST, + "Questa playlist" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_THUMBNAIL_PACK_DOWNLOADED_SUCCESSFULLY, + "Miniature scaricate con successo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_DOWNLOAD_PLAYLIST_THUMBNAIL_PROGRESS, + "Riuscito: %1 non riuscito: %2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_CORE_OPTIONS, + "Opzioni Core" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_RESET, "Resetta" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_RESET_ALL, + "Reimposta Tutto" + ) /* Unsorted */ @@ -5228,6 +8068,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SETTINGS, "Aggiorna" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS, + "Cheevos Account" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_SETTINGS, "Retro Achievements" @@ -5260,6 +8104,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY, "Carica Recenti" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY, + "Seleziona il contenuto dalla playlist della cronologia recente." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS, + "Sottosistemi" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETPLAY_HOSTS_FOUND, "Nessun host netplay trovato." @@ -5272,10 +8124,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "Nessuna playlists." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Connesso" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PORT, "Porta" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SETTINGS, + "Impostazioni Trucchi" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_SETTINGS, + "Inizia o continua la ricerca di trucchi" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_MUSIC, "Avvia" @@ -5288,6 +8152,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_START_CORE, "Avvia Core" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_START_CORE, + "Avvia nucleo senza contenuti." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUPPORTED_CORES, "Core Suggeriti" @@ -5302,7 +8170,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Utilizza Visualizzatore immagini integrato" + "Usa Visualizzatore Di Immagini Integrato" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, @@ -5328,10 +8196,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_START, "Avvia" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME, + "Soprannome: %s" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND, "Contenuto compatibile trovato" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_START_GONG, + "Gong di avvio" + ) /* Unused (Only Exist in Translation Files) */ @@ -5421,7 +8297,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Cambia la sovrapposizione virtuale del gamepad" + "Cambiare l'overlay Del Controllore Virtuale" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, @@ -5590,6 +8466,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_CONFIRM, "Conferma/OK" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_INFO, + "Informazioni" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_QUIT, "Abbandona" @@ -5598,6 +8478,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_SCROLL_UP, "Scorri verso l'alto" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_START, + "Predefiniti" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BASIC_MENU_ENUM_CONTROLS_TOGGLE_KEYBOARD, "Pulsante Keyboard" @@ -5621,6 +8505,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_IN_GAME_PAUSED, "Nel Gioco (In Pausa)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PLAYING, + "Riproduzione" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_STATUS_PAUSED, "In Pausa" @@ -5636,6 +8524,18 @@ MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, "Non è possibile trovare un core o un file di contenuto adatto, caricare manualmente." ) +MSG_HASH( /* FIXME Should be MSG_ */ + MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER_FALLBACK, + "Il driver grafico non è compatibile con il driver video corrente in RetroArch, tornando al driver %s. Riavviare RetroArch affinché le modifiche abbiano effetto." + ) +MSG_HASH( /* FIXME Should be MSG_ */ + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS, + "Installazione centrale riuscita" + ) +MSG_HASH( /* FIXME Should be MSG_ */ + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_ERROR, + "Installazione core fallita" + ) MSG_HASH( MSG_AUDIO_MIXER_VOLUME, "Volume globale del mixer audio" @@ -5668,10 +8568,6 @@ MSG_HASH( MSG_PUBLIC_ADDRESS, "Indirizzo pubblico" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Nessun argomento fornito e nessun menu incorporato, visualizzazione della guida..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "impostazioni del disco nel cassetto" @@ -5752,6 +8648,14 @@ MSG_HASH( MSG_CONNECTION_SLOT, "Connessione allo slot" ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "core saltati: " + ) +MSG_HASH( + MSG_CORE_UPDATE_DISABLED, + "Aggiornamento core disabilitato - il core è bloccato: " + ) MSG_HASH( MSG_ADDED_TO_FAVORITES, "Aggiunto ai Preferiti" @@ -6298,7 +9202,7 @@ MSG_HASH( ) MSG_HASH( MSG_RESET, - "Resetta" + "Riavviato" ) MSG_HASH( MSG_RESTORED_OLD_SAVE_STATE, @@ -6512,6 +9416,90 @@ MSG_HASH( MSG_SCANNING_OF_FILE_FINISHED, "Scansione del file completata" ) +MSG_HASH( + MSG_CHEAT_INIT_SUCCESS, + "Ricerca cheat iniziata con successo" + ) +MSG_HASH( + MSG_CHEAT_INIT_FAIL, + "Impossibile avviare la ricerca dei cheat" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_NOT_INITIALIZED, + "La ricerca non è stata inizializzata/avviata" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_FOUND_MATCHES, + "Nuovo conteggio delle partite = %u" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_SUCCESS, + "Aggiunti %u corrispondenze" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_FAIL, + "Impossibile aggiungere corrispondenze" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADD_MATCH_SUCCESS, + "Codice creato dalla corrispondenza" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADD_MATCH_FAIL, + "Impossibile creare il codice" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_DELETE_MATCH_SUCCESS, + "Corrispondenza eliminata" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY, + "Non c'è abbastanza spazio. Il numero totale di trucchi che puoi avere è 100." + ) +MSG_HASH( + MSG_CHEAT_ADD_TOP_SUCCESS, + "Nuovo cheat aggiunto in cima alla lista." + ) +MSG_HASH( + MSG_CHEAT_ADD_BOTTOM_SUCCESS, + "Nuovo cheat aggiunto in fondo alla lista." + ) +MSG_HASH( + MSG_CHEAT_DELETE_ALL_SUCCESS, + "Tutti i trucchi eliminati." + ) +MSG_HASH( + MSG_CHEAT_ADD_BEFORE_SUCCESS, + "Nuovo cheat aggiunto prima di questo." + ) +MSG_HASH( + MSG_CHEAT_ADD_AFTER_SUCCESS, + "Nuovo cheat aggiunto dopo questo." + ) +MSG_HASH( + MSG_CHEAT_COPY_BEFORE_SUCCESS, + "Cheat copiato prima di questo." + ) +MSG_HASH( + MSG_CHEAT_COPY_AFTER_SUCCESS, + "Trucchi copiati dopo questo." + ) +MSG_HASH( + MSG_CHEAT_DELETE_SUCCESS, + "Trucco cancellato." + ) +MSG_HASH( + MSG_DEVICE_CONFIGURED_IN_PORT, + "Configurato nella porta:" + ) +MSG_HASH( + MSG_FAILED_TO_SET_DISK, + "Impostazione del disco non riuscita" + ) +MSG_HASH( + MSG_FAILED_TO_SET_INITIAL_DISK, + "Impossibile impostare l'ultimo disco usato..." + ) MSG_HASH( MSG_RESAMPLER_QUALITY_LOWEST, "Molto Basso" @@ -6536,6 +9524,70 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "Scansione in corso: " ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "Backup del core: " + ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "Rimozione backup obsoleti: " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Backup del core completato: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "Il backup del core selezionato è già installato: " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "Ripristino del core: " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "Installazione del core: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "Installazione del core completata: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "File core selezionato non valido: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Backup del core non riuscito: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "Ripristino del core non riuscito: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Installazione core non riuscita: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "Ripristino core disabilitato - core è bloccato: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "Installazione core disabilitata - core bloccato: " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "Blocco del core non riuscito: " + ) +MSG_HASH( + MSG_CORE_UNLOCK_FAILED, + "Sblocco del core non riuscito: " + ) +MSG_HASH( + MSG_CORE_DELETE_DISABLED, + "Eliminazione core disabilitata - core è bloccato: " + ) /* Lakka */ @@ -6566,6 +9618,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INTERNAL_STORAGE_STATUS, "Stato di archiviazione interna" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR, + "Scala Oggetti Grafici Override" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, + "Applica la sovrascrittura di un fattore di scala manuale quando si disegnano widget di visualizzazione in modalità schermo intero. Si applica solo quando 'Scala automaticamente i widget grafici' è disabilitato. Può essere utilizzato per aumentare o diminuire la dimensione delle notifiche, indicatori e controlli decorati indipendentemente dal menu stesso." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, "Risoluzione schermo" @@ -6574,10 +9634,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHUTDOWN, "Arresta il sistema" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_UWP_PERMISSIONS, + "Abilita accesso al file esterno" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_UWP_PERMISSIONS, + "Apri le impostazioni dei permessi di accesso ai file Windows" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_PICKER, + "Apri..." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_PICKER, + "Apre un'altra directory usando il selettore di file di sistema" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER_FLICKER, "Filtro sfarfallio" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_GAMMA, + "Gamma Video" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Abilita il filtro morbido" @@ -6590,10 +9670,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "Effettua una scansione delle reti wireless e stabilisce la connessione." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_VFILTER, + "Eliminazione flicker" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VI_WIDTH, "Impostare la larghezza dello schermo VI" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_OVERSCAN_CORRECTION_TOP, + "Sovrascrivi Correzione (Alto)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_OVERSCAN_CORRECTION_TOP, + "Regola la visualizzazione del ritaglio overscan riducendo la dimensione dell'immagine in base al numero specificato di linee di scanline (prese dalla parte inferiore dello schermo). Nota: può introdurre artefatti di scala." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_OVERSCAN_CORRECTION_BOTTOM, + "Sovrascrivi Correzione (Basso)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_OVERSCAN_CORRECTION_BOTTOM, + "Regola la visualizzazione del ritaglio overscan riducendo la dimensione dell'immagine in base al numero specificato di linee di scanline (prese dalla parte inferiore dello schermo). Nota: può introdurre artefatti di scala." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUSTAINED_PERFORMANCE_MODE, "Modalità delle Prestazioni Sostenute" @@ -6606,6 +9706,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "Riavvia RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "Esci quindi riavvia RetroArch. Richiesto per l'attivazione di determinate impostazioni del menu (ad esempio, quando si cambia il driver del menu)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, "Blocchi Frame" @@ -6620,16 +9724,24 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Mappatura del Gamepad su tastiera Abilitato" + "Mappatura controller tastiera" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Tipo di mappatura del gamepad della tastiera" + "Tipo di Mappatura controller tastiera" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "Piccola Tastiera Abilitata" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_BLOCK_TIMEOUT, + "Tempo limite per il blocco input" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BLOCK_TIMEOUT, + "Il numero di millisecondi da attendere per ottenere un campione di ingresso completo, usarlo se avete problemi con le pressioni simultanee dei pulsanti (solo Android)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, "Visualizza Riavvia" @@ -6646,6 +9758,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "Mostra/Nasconde l'opzione 'Spegnimento'" ) +MSG_HASH( + MSG_INTERNET_RELAY, + "Internet (Relè)" + ) +MSG_HASH( + MSG_LOCAL, + "Locale" + ) +MSG_HASH( + MSG_READ_WRITE, + "Lettura/Scrittura" + ) +MSG_HASH( + MSG_READ_ONLY, + "Sola Lettura" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( @@ -6664,6 +9792,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SWITCH_BACKLIGHT_CONTROL, "Aumenta o diminuisce la luminosità dello schermo del Nintendo Switch" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REBOOT_RCM, + "Riavvia in RCM" + ) #endif #if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) MSG_HASH( @@ -6746,11 +9878,51 @@ MSG_HASH( ) #endif #ifdef GEKKO +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE, + "Scala del Mouse" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MOUSE_SCALE, + "Regola la scala x/y per la velocità della pistola ottica Wiimote." + ) #endif #ifdef HAVE_ODROIDGO2 +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_RGA_SCALING, + "Scala RGA" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_RGA_SCALING, + "Scala RGA e filtraggio bicubico. Può rompere i widget." + ) #else +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_CTX_SCALING, + "Scala Specifica Contesto" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_CTX_SCALING, + "Scala del contesto hardware (se disponibile)." + ) #endif #if defined(_3DS) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_3DS_LCD_BOTTOM, + "Schermo Inferiore 3DS" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_3DS_LCD_BOTTOM, + "Abilita la visualizzazione delle informazioni di stato sullo schermo inferiore. Disabilita per aumentare la durata della batteria e migliorare le prestazioni." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_3DS_DISPLAY_MODE, + "Modalità Visualizzazione 3DS" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_3DS_DISPLAY_MODE, + "Seleziona tra le modalità di visualizzazione 3D e 2D. In modalità 3D, i pixel sono quadrati e viene applicato un effetto di profondità quando si visualizza il menu rapido. La modalità '2D' fornisce le migliori prestazioni." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_400X240, "2D (Effetto Griglia Pixel)" diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 1b61876f1a..0ecc6ce005 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -34,7 +34,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "ビデオ" + "動画" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, @@ -75,17 +75,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_DISC, "ディスクをロード" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LOAD_DISC, - "物理メディア(ディスク)をロードします。\n事前に[コアをロード]でコアを選択しておく必要があります。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, "ディスクをダンプ" ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMP_DISC, - "物理メディア(ディスク)を内部ストレージにダンプします。\nイメージファイルとして保存されます。" + "物理メディア(ディスク)を内部ストレージにダンプします. イメージファイルとして保存されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB, @@ -101,7 +97,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "コンテンツをスキャンしてデータベースに登録します。" + "コンテンツをスキャンしてデータベースに追加します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, @@ -109,7 +105,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "デスクトップメニューを開きます。" + "従来のデスクトップメニューを開きます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +113,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "キオスクモードを無効にします。変更を完全に反映するには再起動が必要。" + "キオスクモードを無効にします. (再起動が必要)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -192,7 +188,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, - "オンラインアップデータからコアをダウンロードしてインストールします。" + "オンラインアップデータからコアをダウンロードしてインストールします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, @@ -200,7 +196,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "ダウンロードディレクトリからコアをインストールまたは復元します。" + "ダウンロードディレクトリからコアをインストールまたは復元します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -238,7 +234,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "お気に入りに追加したコンテンツを表示します。" + "「お気に入り」に追加されたコンテンツはここに表示されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -258,7 +254,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "ビデオ" + "動画" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, @@ -267,13 +263,17 @@ MSG_HASH( /* Main Menu > Online Updater */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST, + "コアダウンローダ" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_INSTALLED_CORES, - "インストール済みのコアをアップデート" + "インストール済みのコアを更新" ) MSG_HASH( MENU_ENUM_SUBLABEL_UPDATE_INSTALLED_CORES, - "インストール済みのすべてのコアを, 利用可能な最新バージョンにアップデートします。" + "インストール済みのすべてのコアを, 利用可能な最新バージョンに更新します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, @@ -289,7 +289,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "プレイリスト中の各エントリ用のサムネイルをダウンロードします。" + "選択したプレイリスト内の各エントリに対応するサムネイルをダウンロードします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -297,39 +297,39 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES, - "コアの情報ファイルをアップデート" + "コアの情報ファイルを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, - "アセットをアップデート" + "アセットを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "自動設定プロファイルをアップデート" + "コントローラプロファイルを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, - "チートをアップデート" + "チートを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_DATABASES, - "データベースをアップデート" + "データベースを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS, - "オーバーレイをアップデート" + "オーバーレイを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, - "GLSLシェーダをアップデート" + "GLSLシェーダを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS, - "Cgシェーダをアップデート" + "Cgシェーダを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS, - "Slangシェーダをアップデート" + "Slangシェーダを更新" ) /* Main Menu > Information */ @@ -445,6 +445,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "必須" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "インストール済みコアをロック" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "現在インストールされているコアの更新を防止します. コンテンツが特定のコアバージョン(例:Arcade ROM セット)を必要とする場合, 望ましくない更新を避けるために使用されることがあります. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "コアを削除" @@ -453,6 +461,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "コアをハードディスクから削除します。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "コアをバックアップ" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "現在インストールされているコアのアーカイブバックアップを作成します. " + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "バックアップから復元" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "アーカイブされたバックアップのリストから以前のバージョンのコアをインストールします. " + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "バックアップを削除" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "アーカイブされたバックアップのリストからファイルを削除します. " + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[自動]" + ) /* Main Menu > Information > System Information */ @@ -538,7 +574,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "ネットワークゲームパッド対応" + "ネットワークコントローラのサポート" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -859,11 +895,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, - "現在のメイン設定を保存" + "現在の設定を保存" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG, - "新しいメイン設定を保存" + "新しい設定を保存" ) /* Main Menu > Help */ @@ -988,7 +1024,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "ファイルブラウザの設定をします。" + "ファイルブラウザの設定を変更します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, @@ -1095,15 +1131,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "使用する入力のドライバです。\nビデオのドライバによっては, 別の入力のドライバを強制される可能性があります。" + "使用する入力ドライバです. 一部のビデオドライバは強制的に異なる入力ドライバを使用します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "ジョイパッドのドライバ" + "コントローラ" ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "使用するジョイパッドのドライバです。" + "使用するコントローラドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1111,7 +1147,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DRIVER, - "使用するビデオのドライバです。" + "使用するビデオドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DRIVER, @@ -1119,7 +1155,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DRIVER, - "使用するオーディオのドライバです。" + "使用するオーディオドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_DRIVER, @@ -1135,7 +1171,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, - "使用するカメラのドライバです。" + "使用するカメラドライバです. " + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "使用するBluetoothドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, @@ -1143,7 +1183,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "使用するWi-Fiのドライバです。" + "使用するWi-Fiドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1151,7 +1191,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_DRIVER, - "使用する位置情報のドライバです。" + "使用する位置情報ドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DRIVER, @@ -1159,7 +1199,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DRIVER, - "使用するメニューのドライバです。" + "使用するメニュードライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_DRIVER, @@ -1167,7 +1207,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORD_DRIVER, - "使用する録画のドライバです。" + "使用する録画ドライバです. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_DRIVER, @@ -1175,7 +1215,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_DRIVER, - "使用するMIDIのドライバです。" + "使用するMIDIドライバです. " ) /* Settings > Video */ @@ -1242,7 +1282,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_THREADED, - "遅延やビデオのつっかえを犠牲にして, パフォーマンスを改良します。\nフルスピードを得られない場合のみ使用してください。" + "遅延やビデオのつっかえを犠牲にして, パフォーマンスを改良します. フルスピードを得られない場合のみ使用してください. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, @@ -1250,7 +1290,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "フレームの間に黒フレームを挿入します。\n60Hzコンテンツを120Hz画面でプレイするときに役立ちます。" + "フレーム間に黒いフレームを挿入します. 高リフレッシュレート画面を使用している場合, ゴーストの防止に役立ちます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1266,7 +1306,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SMOOTH, - "イメージにわずかなぼかしを加えて, ピクセルの輪郭の硬さを和らげます。\nこのオプションはパフォーマンスにはほとんど影響しません。" + "イメージにわずかなぼかしを加えて, ピクセルの輪郭の硬さを和らげます. このオプションはパフォーマンスにはほとんど影響しません. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY, @@ -1274,7 +1314,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_DELAY, - "シェーダーの自動読み込みを遅延させます(ミリ秒単位)。 画面取り込みソフトウェアを使用するときに画像の不具合を回避できます。" + "シェーダーの自動読み込みを遅延させます(ミリ秒単位). 画面取り込みソフトウェアを使用するときに画像の不具合を回避できます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER, @@ -1282,7 +1322,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FILTER, - "CPUベースのビデオフィルタを適用します。\n一部のビデオフィルタは, コアによっては動作しない可能性があります。\nまた, パフォーマンスに大きく影響します。" + "CPUベースのビデオフィルタを適用します. \n注意: パフォーマンスに大きく影響します. 一部のビデオフィルタは16ビットまたは32ビットを使用するコアでのみ動作します. " ) /* Settings > Video > CRT SwitchRes */ @@ -1293,7 +1333,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, - "CRTディスプレイ専用です。\nコア/ゲームの正確な解像度とリフレッシュレートを使用するよう試みます。" + "CRTディスプレイ専用です. コア/ゲームの正確な解像度とリフレッシュレートを使用するよう試みます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION_SUPER, @@ -1336,7 +1376,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ROTATION, - "指定した角度で画面を強制的に回転させます。\nこの回転はコアが指定する回転に追加されます。" + "指定した角度で画面を強制的に回転させます. この回転はコアが指定する回転に追加されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_ORIENTATION, @@ -1356,7 +1396,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, - "スクリーンの垂直リフレッシュレートです。\n適切なオーディオ入力レートを計算するために使用します。\n備考: [ビデオをスレッド化]を有効にすると, この値は無視されます。" + "スクリーンの垂直リフレッシュレートです. 適切なオーディオ入力レートを計算するために使用します. \n備考: [ビデオをスレッド化]を有効にすると, この値は無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, @@ -1380,7 +1420,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FORCE_SRGB_DISABLE, - "sRGB FBO対応を強制的に無効にします。\n一部の Windows用Intel OpenGLドライバで発生するビデオの問題を回避します。" + "sRGB FBO対応を強制的に無効にします. 一部の Windows用Intel OpenGLドライバで発生するビデオの問題を回避します. " ) /* Settings > Video > Fullscreen Mode */ @@ -1391,7 +1431,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN, - "フルスクリーンで起動します。\n実行時にも切り替え可能です。" + "フルスクリーンで起動します. 実行時にも切り替え可能です. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_FULLSCREEN, @@ -1407,7 +1447,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_X, - "フルスクリーンモードの幅を設定します。\n設定しないとデスクトップの解像度を使用します。" + "フルスクリーンモードの幅を設定します. 設定しないとデスクトップの解像度を使用します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_Y, @@ -1415,7 +1455,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_Y, - "フルスクリーンモードの高さを設定します。\n設定しないとデスクトップの解像度を使用します。" + "フルスクリーンモードの高さを設定します. 設定しないとデスクトップの解像度を使用します. " ) /* Settings > Video > Windowed Mode */ @@ -1426,7 +1466,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SCALE, - "コアの表示領域サイズを基準にウィンドウを拡大します。\nまたは, 一定の幅と高さが適用される固定ウィンドウサイズも設定できます。" + "コアの表示領域サイズを基準にウィンドウを拡大します. または, 一定の幅と高さが適用される固定ウィンドウサイズも設定できます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY, @@ -1442,7 +1482,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_SAVE_POSITION, - "ウィンドウの位置とサイズを記憶します。\n[ウィンドウの拡大率]設定より優先されます。" + "ウィンドウの位置とサイズを記憶します. [ウィンドウの拡大率]設定より優先されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_WIDTH, @@ -1450,7 +1490,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_WIDTH, - "ウィンドウの幅を指定します。\n0を指定すると可能な限りウィンドウを拡大します。" + "ウィンドウの幅を指定します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_HEIGHT, @@ -1458,7 +1498,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_WINDOW_HEIGHT, - "ウィンドウの高さを指定します。\n0を指定すると可能な限りウィンドウを拡大します。" + "ウィンドウの高さを指定します. " ) /* Settings > Video > Scaling */ @@ -1469,7 +1509,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, - "ビデオの拡大率を整数倍に限定します。\n基礎サイズはシステムが提供するジオメトリとアスペクト比に依存します。\n[アスペクト比を強制]が指定されていない場合, 幅と高さはそれぞれ独立して整数倍で拡大します。" + "ビデオの拡大率を整数倍に限定します. 基礎サイズはシステムが提供するジオメトリとアスペクト比に依存します. [アスペクト比を強制]が指定されていない場合, 幅と高さはそれぞれ独立して整数倍で拡大します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, @@ -1481,7 +1521,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, - "ビデオのアスペクト比(幅/高さ)の浮動小数点値です。\n[アスペクト比]に'Config'を設定しているときに使用されます。" + "ビデオのアスペクト比(幅/高さ)の浮動小数点値です. [アスペクト比]に'Config'を設定しているときに使用されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, @@ -1489,7 +1529,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "カスタム表示領域のX方向オフセット値です。\n[整数スケール]が有効の場合は無視され, 自動でセンタリングされます。" + "カスタム表示領域のX方向オフセット値です. [整数スケール]が有効の場合は無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1497,7 +1537,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "カスタム表示領域のY方向オフセット値です。\n[整数スケール]が有効の場合は無視され, 自動でセンタリングされます。" + "カスタム表示領域のY方向オフセット値です. [整数スケール]が有効の場合は無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1505,7 +1545,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, - "カスタム表示領域の幅です。\n[アスペクト比]に'Custom'を設定しているときに使用されます。" + "カスタム表示領域の幅です. [アスペクト比]に'Custom'を設定しているときに使用されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_HEIGHT, @@ -1513,16 +1553,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "カスタム表示領域の高さです。\n[アスペクト比]に'Custom'を設定しているときに使用されます。" + "カスタム表示領域の高さです. [アスペクト比]に'Custom'を設定しているときに使用されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "オーバースキャンの切り取り(要再起動)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "画面端の数ピクセルを切り取ります。\nこの部分はゴミが含まれていることもあり, 開発者が慣例的に空白にしています。" - ) /* Settings > Video > Synchronization */ @@ -1540,16 +1576,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, - "垂直同期のスワップ間隔としてカスタム値を使用します。\nこれを設定すると, モニタのリフレッシュレートが事実上半分になります。" + "垂直同期のスワップ間隔としてカスタム値を使用します. これを設定すると, モニタのリフレッシュレートが事実上半分になります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "適応垂直同期" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "パフォーマンスが目標のリフレッシュレートを下回るまでは垂直同期が有効になります。\nこれにより, パフォーマンスがリアルタイムを下回ったときのつっかえを最小限に抑えることができ, 効率もよくなります。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "遅延フレーム" @@ -1564,7 +1596,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, - "CPUとGPUを強制に同期します。\n遅延が減る代わりに性能が低下します。" + "CPUとGPUを強制に同期します. 遅延が減る代わりに性能が低下します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES, @@ -1578,10 +1610,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, "正確なフレームレートと同期(G-Sync/FreeSync)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "可変リフレッシュレート, G-Sync, FreeSyncを使用します。\nコアの要求するタイミングから逸脱がありません。" - ) /* Settings > Audio */ @@ -1655,7 +1683,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_VOLUME, - "オーディオの音量(dB)です。\n0dB は通常の音量で, 増幅されません。" + "オーディオの音量(dB)です. 0dB は通常の音量で, 増幅されません. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, @@ -1663,7 +1691,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME, - "グローバルのミキサー音量(dB)です。\n0dBは通常の音量で, 増幅されません。" + "グローバルのミキサー音量(dB)です. 0dBは通常の音量で, 増幅されません. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, @@ -1679,7 +1707,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, - "WASAPI ドライバがオーディオデバイスの排他制御を行うことを許可します。無効にすると、代わりに共有モードが使用されます。" + "WASAPI ドライバがオーディオデバイスの排他制御を行うことを許可します. 無効にすると, 代わりに共有モードが使用されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT, @@ -1687,7 +1715,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT, - "オーディオデバイスでサポートされている場合は、WASAPI ドライバに浮動小数点形式を使用します。" + "オーディオデバイスでサポートされている場合は, WASAPI ドライバに浮動小数点形式を使用します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH, @@ -1695,7 +1723,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH, - "共有モードでWASAPIドライバを使用するときの中間バッファ長 (フレーム単位)。" + "共有モードでWASAPIドライバを使用するときの中間バッファ長 (フレーム単位). " ) /* Settings > Audio > Output */ @@ -1714,7 +1742,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DEVICE, - "オーディオドライバが使用する標準オーディオデバイスをオーバーライドします。\nこの設定はドライバに依存します。" + "オーディオドライバが使用する標準オーディオデバイスをオーバーライドします. この設定はドライバに依存します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, @@ -1760,7 +1788,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW, - "音声入力レートの最大変化量です。\nNTSCディスプレイでPALコアを実行するなど, オーディオピッチの正確さを犠牲にしてタイミングを非常に大きく変更できるようにするには, これを増やすことをお勧めします。" + "音声入力レートの最大変化量です. NTSCディスプレイでPALコアを実行するなど, オーディオピッチの正確さを犠牲にしてタイミングを非常に大きく変更できるようにするには, これを増やすことをお勧めします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, @@ -1768,7 +1796,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, - "オーディオとビデオを同時に同期するときに, タイミングの不完全さを解消するのに役立ちます。\n無効にすると, 適切な同期をとることがほぼ不可能になります。" + "オーディオとビデオを同時に同期するときに, タイミングの不完全さを解消するのに役立ちます. 無効にすると, 適切な同期をとることがほぼ不可能になります. " ) /* Settings > Audio > MIDI */ @@ -1806,7 +1834,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, - "オーディオストリームの再生を開始します。\n再生が終わると, 現在のオーディオストリームはメモリから取り除かれます。" + "オーディオストリームの再生を開始します. 再生が終わると, 現在のオーディオストリームはメモリから取り除かれます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_LOOPED, @@ -1814,7 +1842,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_LOOPED, - "オーディオストリームの再生を開始します。\n再生が終わると, トラックは最初から繰り返して再生されます。" + "オーディオストリームの再生を開始します. 再生が終わると, トラックは最初から繰り返して再生されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_SEQUENTIAL, @@ -1822,7 +1850,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL, - "オーディオストリームの再生を開始します。\n再生が終わると, 順番に次のオーディオストリームに移り, それを繰り返します。\nアルバム再生モードとして便利です。" + "オーディオストリームの再生を開始します. 再生が終わると, 順番に次のオーディオストリームに移り, それを繰り返します. アルバム再生モードとして便利です. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, @@ -1830,7 +1858,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, - "オーディオストリームの再生を停止します。\nメモリからは取り除かれず, [再生]を選択することで再び再生を開始できます。" + "オーディオストリームの再生を停止します. メモリからは取り除かれず, [再生]を選択することで再び再生を開始できます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, @@ -1861,19 +1889,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "OKの音を有効" + "'OK'音を有効にする" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "キャンセルの音を有効" + "'キャンセル'音を有効にする" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "通知の音を有効" + "通知音を有効にする" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "BGMの音を有効" + "BGMを有効にする" ) /* Settings > Input */ @@ -1892,24 +1920,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "RetroArch内での入力ポーリングの方法に影響を与えます。\nこれを'早い'または'遅い'に設定すると, 設定によっては待ち時間が短くなる可能性があります。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "リマップバインドを有効" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "有効にすると, 現在のコアに指定したリマップバインドで入力バインドをオーバーライドします。" + "RetroArch での入力ポーリングの実行方法に影響を与えます. これを「早い」または「遅い」に設定すると, 設定によっては遅延が少なくなることがあります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "自動設定を有効" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "入力自動検出を有効にします。プラグアンドプレイスタイルでジョイパッドの自動設定を試みます。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, "入力ボタン軸のしきい値" @@ -1946,10 +1962,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "ターボの期間" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "ターボ対応ボタンが切り替わる期間(フレーム)です。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "デューティー比" @@ -1992,7 +2004,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "入力のホットキーバインド" + "ホットキー" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -2000,7 +2012,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "入力ユーザ%uのバインド" + "ポート %u コントロール" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -2034,7 +2046,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, - "OK/キャンセルボタンの扱いを入れ替えます。\n'無効'はマルをOKとする日本式配置, '有効'はバツをOKとする西洋式配置です。" + "OK/キャンセルボタンの扱いを入れ替えます. 'オフ'はマルボタンをOKとする日本式配置, 'オン'はバツボタンをOKとする西洋式配置です. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, @@ -2042,18 +2054,18 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, - "どのユーザでもメニューを操作できます。\nオフにすると, ユーザ1のみが操作できます。" + "どのユーザでもメニューを操作できます. オフにすると, ユーザ1のみが操作できます. " ) /* Settings > Input > Hotkey Binds */ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "[終了]ホットキーの二度押し" + "終了時に確認" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "[終了]ホットキーを二度押すことでRetroArchを終了します。" + "RetroArchを終了するのに, 終了ホットキーを2回押す必要があります." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2061,59 +2073,115 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "ゲームパッドのボタン同時押しでメニューに切り替えます。" + "メニュー切り替え用のコントローラーボタンの組み合わせです." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "ホットキー有効の遅延(フレーム数)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "割り当てられた「ホットキー有効」キーを押した後, 通常の入力がブロックされる前にフレームに遅延を追加します. 別のアクション(例:RetroPad「Select」)にマップされたときにキャプチャする「ホットキー有効」キーから通常の入力を許可します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "早送りに切り替え" + "早送り (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "速度を早送りと通常で切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "ホールドで早送り" + "早送り (保持)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "押している間, 早送りを有効にします. キーを放すと, 通常の速度で実行されます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "スローモーションに切り替え" + "スローモーション (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "速度をスローモーションと通常で切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "ホールドでスローモーション" + "スローモーション (保持)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "押している間, スローモーションを有効にします. キーを放すと, 通常の速度で実行されます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "ステートロード" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "現在選択中のスロットからセーブされたステートをロードします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "ステートセーブ" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "現在選択中のスロットにステートをセーブします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "フルスクリーンに切り替え" + "フルスクリーン (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "全画面表示モードとウィンドウ表示モードを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "RetroArchを終了" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "RetroArchを終了し, すべての保存データと設定ファイルをディスクに書き込みます." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "次のステートスロット" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "現在選択中のステートスロットのインデックスをひとつ増やします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "前のステートスロット" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "現在選択中のステートスロットのインデックスをひとつ減らします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "巻き戻し" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "録画" + "入力リプレイを録画 (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "ゲームプレイ入力記録(.bsv形式)のオン/オフを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "一時停止" + "一時停止 (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "実行中コンテンツの一時停止/実行を切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, @@ -2123,6 +2191,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "リセット" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "現在のコンテンツを最初から再起動します." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "次のシェーダ" @@ -2135,98 +2207,162 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, "次のチートインデックス" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "現在選択中のチートのインデックスをひとつ増やします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, "前のチートインデックス" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "現在選択中のチートのインデックスをひとつ減らします." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "チートの切り替え" + "チート (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "現在選択中のチートのオン/オフを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "スクリーンショット" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "現在のコンテンツの画面をキャプチャします。" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "消音" + "消音 (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "オーディオ出力のオン/オフを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "ソフトウェアキーボードを切り替え" + "ソフトウェアキーボード (切り替え)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "FPS表示の切り替え" + "FPS表示 (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "'フレーム/秒'状態表示のオン/オフを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "デバッグ情報の送信" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "解析のため, お使いのデバイスに関する診断情報とRetroArch設定をサーバーに送信します." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "ネットプレイのホスティングを切り替え" + "ネットプレイのホスティング (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "ネットプレイホスティングのオン/オフを切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "ネットプレイの観覧を切り替え" + "ネットプレイの参加/視聴モード (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "現在のネットプレイのモードを'参加'と'視聴'で切り替えます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "ホットキーを有効" + "ホットキー有効化" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "割り当てられた場合, 他のホットキーが認識される前に「ホットキー有効」キーを押したままにする必要があります. 通常の入力に影響を与えることなく, コントローラボタンをホットキー機能にマッピングできます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "音量を上げる" + "音量アップ" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "オーディオ出力の音量を上げます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "音量を下げる" + "音量ダウン" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "オーディオ出力の音量を下げます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "次のオーバーレイ" + "次のオーバレイ" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "ディスクの取り出し" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "仮想ディスクトレイが閉じられている場合, それを開き, ロードされたディスクを取り除きます. それ以外の場合は, 現在選択されているディスクを挿入してトレイを閉じます. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "次のディスクに切り替え" + "次のディスク" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "現在選択中のディスクのインデックスをひとつ増やします. 注: 仮想ディスクトレイが開いている必要があります." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "前のディスクに切り替え" + "前のディスク" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "マウスグラブの切り替え" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "ゲームのフォーカスの切り替え" + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "現在選択中のディスクのインデックスをひとつ減らします. 注: 仮想ディスクトレイが開いている必要があります." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "デスクトップメニューに切り替え" + "デスクトップメニュー (切り替え)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "メニューに切り替え" + "メニュー (切り替え)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "録画に切り替え" + "録画 (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "ローカルビデオファイルへの録画を開始/停止します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "ストリーミングに切り替え" + "ストリーミング (切り替え)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "オンライン動画プラットフォームへのストリーミングを開始/停止します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "AIサービス" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "現在のコンテンツの画面をキャプチャし, 画面上のテキストを翻訳および/または読み上げます. 注意: [AI サービス]を有効にして設定する必要があります." + ) /* Settings > Input > Port # Binds */ @@ -2244,15 +2380,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "全てをバインド" + "すべてのコントロールを設定" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "全てのバインドを初期化" + "初期設定に戻す" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "自動設定を保存" + "コントローラのプロファイルを保存" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2276,19 +2412,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "上 (十字キー)" + "十字キー 上" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "下 (十字キー)" + "十字キー 下" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "左 (十字キー)" + "十字キー 左" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "右 (十字キー)" + "十字キー 右" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2340,7 +2476,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, - "右 (右アナログ" + "右 (右アナログ)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, @@ -2411,7 +2547,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, - "入力遅延を減らすため, コアロジックを1フレーム以上先に実行してからステートをロードします。" + "入力遅延を減らすため, コアロジックを1フレーム以上先に実行してからステートをロードします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_FRAMES, @@ -2419,23 +2555,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, - "先読みするフレーム数です。\nゲーム内部のラグフレームの数を超えると, ジッターなどのゲームプレイの問題が発生します。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "2つ目のコアで先読みする" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "RetroArchコアの2番目のインスタンスを使用して先読みします。\nステートのロードによるオーディオの問題を防ぎます。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "先読みの警告を隠す" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "先読み時に表示される警告メッセージを非表示にします。\nコアはステートのセーブをサポートしません。" + "先読みするフレーム数です. ゲーム内部のラグフレームの数を超えると, ジッターなどのゲームプレイの問題が発生します. " ) /* Settings > Core */ @@ -2446,15 +2566,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, - "ハードウェアレンダリングコアに独自のプライベートコンテキストを与えます。\nフレーム間でハードウェアの状態が変化することを想定しなくて済みます。" + "ハードウェアレンダリングコアに独自のプライベートコンテキストを与えます. フレーム間でハードウェアの状態が変化することを想定しなくて済みます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DRIVER_SWITCH_ENABLE, - "コアにビデオドライバの切り替えを許可する" + "コアにビデオドライバの切り替えを許可" ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "現在ロードされているものとは異なるビデオドライバに強制的に切り替えることをコアに許可します。" + "コアに現在ロードされているものとは異なるビデオドライバに切り替えることを許可します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, @@ -2462,7 +2582,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "一部のコアはシャットダウン機能を有しています。\nこの機能は, RetroArchの終了を妨げる可能性があります。\n有効にすると, 代わりにダミーのコアをロードします。" + "一部のコアには終了機能があり, ダミーコアをロードするとRetroArchが終了するのを防止できます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2476,24 +2596,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "コンテンツをロードする前に, 必要なファームウェアがすべて存在するかどうかを確認します。" ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "回転を許可" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "コアに回転を許可します。\n無効にすると, 回転リクエストは無視されます。\n手動で画面を回転したいときに便利です。" + "コアの回転設定を許可します. 無効にすると回転リクエストは無視されます. 画面を手動で回転させる場合に有用です. " + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "コアの管理" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "インストールされているコアのオフラインでの管理(バックアップ, 復元, 削除など)を行い, コア情報を表示します. " ) /* Settings > Configuration */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "終了前に設定を自動保存" + "終了時に設定を保存" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "終了時に設定を自動的に保存します。" + "終了時に設定ファイルに変更を保存します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2529,23 +2659,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GLOBAL_CORE_OPTIONS, - "全てのコアオプションを共通の設定ファイル(retroarch-core-options.cfg)に保存します。\n無効に設定すると, [設定]ディレクトリにコアごとのフォルダ/ファイルを作成して保存します。" + "全てのコアオプションを共通の設定ファイル(retroarch-core-options.cfg)に保存します. 無効に設定すると, [設定]ディレクトリにコアごとのフォルダ/ファイルを作成して保存します. " ) /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "フォルダでセーブファイルを分類" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "使用したコアの名前に基づいてセーブファイルをフォルダごとに分類します。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "フォルダでステートセーブを分類" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "使用したコアの名前に基づいてステートセーブをフォルダごとに分類します。" @@ -2556,7 +2674,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_BLOCK_SRAM_OVERWRITE, - "セーブしたステートをロードするときに上書き保存からRAMをブロックします。\n潜在的にバグのあるゲームにつながる可能性があります。" + "セーブしたステートをロードするときに上書き保存からRAMをブロックします. 潜在的にバグのあるゲームにつながる可能性があります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, @@ -2564,15 +2682,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "不揮発性のセーブRAMを定期的に自動保存します。\n特に設定しない限り, これはデフォルトで無効になっています。\n単位は秒で, 0は自動保存を無効にします。" + "不揮発性のSaveRAMを一定間隔(秒単位)で自動的に保存します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "ステートセーブの自動インデックス" + "セーブステートのインデックスを自動的に増加" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "ステートセーブ時にインデックスを自動増加します。\nロード時には既存の最も高いインデックスを使用します。" + "ステートセーブ前に, ステートセーブのインデックスが自動的に増加します. コンテンツをロードするとき, インデックスは既存のインデックスのうち最も大きい値に設定されます。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2580,11 +2698,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "RetroArchの終了時に自動でステートセーブします。\n[自動ステートロード]が有効であれば, 自動でセーブしたステートをロードします。" + "コンテンツを閉じるときに自動的にステートセーブを行います. [自動的にステートをロード]が有効の場合, RetroArchは自動的にこのセーブステートをロードします." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "自動ステートロード" + "自動的にステートをロード" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, @@ -2596,7 +2714,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "メニューにステートセーブのサムネイルを表示します。" + "メニュー内にセーブステートのサムネイルを表示します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, @@ -2604,7 +2722,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_FILE_COMPRESSION, - "不揮発性セーブファイルをアーカイブ形式で書き込みます。保存/読み込み時間の増加を犠牲にして、ファイルサイズを大幅に削減します。 注:標準のlibretroセーブインタフェースを介して保存をするコアにのみ適用されます。" + "不揮発性セーブファイルをアーカイブ形式で書き込みます. 保存/読み込み時間の増加を犠牲にして, ファイルサイズを大幅に削減します. 注:標準のlibretroセーブインタフェースを介して保存をするコアにのみ適用されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_FILE_COMPRESSION, @@ -2612,7 +2730,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_FILE_COMPRESSION, - "セーブステートファイルをアーカイブ形式で書き込みます。保存/読み込み時間の増加を犠牲にしてファイルサイズを劇的に削減します。" + "セーブステートファイルをアーカイブ形式で書き込みます. 保存/読み込み時間の増加を犠牲にしてファイルサイズを劇的に削減します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE, @@ -2663,7 +2781,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, - "フロントエンドのログレベルを設定します。\nフロントエンドによって発行されたログレベルがこの値を下回る場合, 無視されます。" + "フロントエンドのログレベルを設定します. フロントエンドによって発行されたログレベルがこの値を下回る場合, 無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LIBRETRO_LOG_LEVEL, @@ -2671,7 +2789,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LIBRETRO_LOG_LEVEL, - "コアのログレベルを設定します。\nコアによって発行されたログレベルがこの値を下回る場合, 無視されます。" + "コアのログレベルを設定します. コアによって発行されたログレベルがこの値を下回る場合, 無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOG_TO_FILE, @@ -2679,7 +2797,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_TO_FILE, - "システムのイベントログメッセージをファイルにリダイレクトします。\n[ログの出力]を有効にする必要があります。" + "システムのイベントログメッセージをファイルにリダイレクトします. [ログの出力]を有効にする必要があります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOG_TO_FILE_TIMESTAMP, @@ -2687,26 +2805,22 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOG_TO_FILE_TIMESTAMP, - "ファイルへのログ出力時, RetroArchの各セッション毎に新たなタイムスタンプ付きのファイルにリダイレクトします。\n無効の場合, ログはRetroArchを再起動するたびに上書きされます。" + "ファイルへのログ出力時, RetroArchの各セッション毎に新たなタイムスタンプ付きのファイルにリダイレクトします. 無効の場合, ログはRetroArchを再起動するたびに上書きされます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "パフォーマンスカウンタ" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "RetroArch(およびコア)のパフォーマンスカウンタを有効にします。\nデータは, システムのボトルネックを判断し, システムとアプリケーションのパフォーマンスを微調整するのに役立ちます。" - ) /* Settings > File Browser */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "隠しファイルとフォルダを表示" + "隠しファイルとディレクトリを表示" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "ファイルブラウザの中に隠しファイルとフォルダを表示します。" + "隠しファイルとディレクトリをファイルブラウザに表示します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2714,7 +2828,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "ファイルブラウザに表示されるファイルを対応する拡張子で絞り込みます。" + "サポートされている拡張子によってファイルブラウザーに表示されるファイルをフィルタリングします." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2741,23 +2855,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS, - "フレームタイムカウンターに影響する設定を調整します(スレッドビデオが無効になっている場合のみ有効)。" + "フレームタイムカウンターに影響する設定を調整します(スレッドビデオが無効になっている場合のみ有効). " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "早送り比" + "早送りの倍率" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, - "早送り中のコンテンツの最大フレームレートです。\n例えば, 60FPSコンテンツに5xを指定すると, 最大フレームレートは300FPSになります。\n「0.0x」を指定した場合は無制限になります(フレームレート制限なし)。" + "早送り中のコンテンツの最大フレームレートです. 例えば, 60FPSコンテンツに5xを指定すると, 最大フレームレートは300FPSになります. 「0.0x」を指定した場合は無制限になります(フレームレート制限なし). " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "スローモーション比" + "スローモーションの倍率" ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "スローモーション時, コンテンツは設定した比率に応じて減速します。" + "スローモーションを使用するときにコンテンツが再生される倍率." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2774,18 +2888,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "巻き戻しを有効" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "巻き戻しを有効にします。 \nこの設定はプレイ中のパフォーマンスに影響を及ぼす。" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "巻き戻しの粒状度" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "定義した数のフレームを巻き戻すときは, 一度に複数のフレームを巻き戻すことができ, 巻き戻し速度が速くなります。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, "巻き戻しバッファサイズ(MB)" @@ -2811,7 +2913,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, - "高速転送後にフレームタイムカウンターをリセットします。" + "高速転送後にフレームタイムカウンターをリセットします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, @@ -2819,7 +2921,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, - "ステートロード後にフレームタイムカウンターをリセットします。" + "ステートロード後にフレームタイムカウンターをリセットします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, @@ -2827,18 +2929,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, - "ステートセーブ後にフレームタイムカウンターをリセットします。" + "ステートセーブ後にフレームタイムカウンターをリセットします. " ) /* Settings > Recording */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "録画の品質" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "録画設定ファイル" + "録画品質" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, @@ -2850,7 +2948,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_POST_FILTER_RECORD, - "(シェーダを除く)フィルタ適用後の出力を録画します。\n画面上で見ているるものと同じくらい見栄えがよくなります。" + "(シェーダを除く)フィルタ適用後の出力を録画します. 画面上で見ているるものと同じくらい見栄えがよくなります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD, @@ -2866,19 +2964,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "配信の品質" + "ストリーミング品質" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, - "カスタムストリーム設定" + "カスタムストリーミング設定" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "配信タイトル" + "ストリームタイトル" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "配信URL" + "ストリーム URL" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, @@ -2956,7 +3054,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_AUTO_ROTATE, - "現在のオーバーレイでサポートされている場合、画面の向き/アスペクト比に合わせてレイアウトを自動的に回転させます。" + "現在のオーバーレイでサポートされている場合, 画面の向き/アスペクト比に合わせてレイアウトを自動的に回転させます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY, @@ -2991,6 +3089,24 @@ MSG_HASH( "オーバーレイUI要素の表示拡大率です。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "オーバレイオフセット X" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "オーバレイ UI 要素の X オフセット." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "オーバレイオフセット Y" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "オーバレイ UI 要素の Y オフセット." + ) + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -3003,7 +3119,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_PATH, - "ファイルブラウザからビデオレイアウトを選択します。" + "ファイルブラウザからビデオレイアウトを選択します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_SELECTED_VIEW, @@ -3011,7 +3127,7 @@ MSG_HASH( ) MSG_HASH( /* FIXME Unused */ MENU_ENUM_SUBLABEL_VIDEO_LAYOUT_SELECTED_VIEW, - "ロードされたレイアウト内のビューを選択します。" + "ロードされたレイアウト内のビューを選択します. " ) /* Settings > On-Screen Display > On-Screen Notifications */ @@ -3028,18 +3144,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, "グラフィックウィジェット" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "古いテキストのみのシステムの代わりに、近代的な装飾されたアニメーション、通知、インジケータとコントロールを使用します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "フレームレートを表示" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "画面に現在のフレームレートを表示します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, "フレームレートの更新間隔(フレーム数)" @@ -3064,22 +3172,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "技術的な統計を画面に表示します。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "メモリ利用状態を含める" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "FPS/フレーム表示に, 現在のメモリ利用量/総量表示を含めます。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "OSDメッセージのフォント" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "OSDの使用するフォントを選択します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "OSDメッセージのサイズ" @@ -3141,11 +3237,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "表示" + "メニュー項目の表示" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "メニュー画面の要素を表示/非表示にします。" + "各メニュー項目の表示/非表示を切り替えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -3161,7 +3257,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "上級ユーザ向けの詳細設定を表示します(標準では非表示)。" + "パワーユーザー向けの高度な設定を表示します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3189,7 +3285,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "メニュー表示時に一時停止" + "メニュー表示中はコンテンツを一時停止" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, @@ -3199,26 +3295,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, "ステートセーブ後にコンテンツを再開" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "クィックメニューから'ステートセーブ'や'ステートロード'を選択した後に,\n自動的にメニューを閉じてコンテンツを再開します。\n低パフォーマンスのデバイスでは, これを無効にするとステートセーブのパフォーマンスを向上できます。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "マウス対応" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "メニューのマウス操作を有効にします。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "タッチ対応" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "メニューのタッチ操作を有効にします。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "タスクをスレッド化" @@ -3227,10 +3311,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "タスクを別のスレッドで実行します。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "バックグラウンドで実行しない" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "ウィンドウが非アクティブになったときにゲームプレイを一時停止します。" @@ -3247,21 +3327,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "UIコンパニオン" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "UIコンパニオンを起動時に表示" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "メニューバー" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "デスクトップメニュー (要再起動)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "起動時にデスクトップメニューを表示" + "起動時にデスクトップメニューを開く" ) /* Settings > User Interface > Views */ @@ -3272,7 +3344,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "クイックメニュー画面の要素を表示/非表示にします。" + "クイックメニュー内の各メニュー項目の表示/非表示を切り替えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, @@ -3280,7 +3352,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "[設定]タブの要素を表示/非表示にします。" + "[設定]内の各メニュー項目の表示/非表示を切り替えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, @@ -3324,7 +3396,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, - "コア(とコアの情報ファイル)をアップデートする機能を表示/非表示にします。" + "コア(とコアの情報ファイル)を更新する機能を表示/非表示にします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, @@ -3382,10 +3454,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "メニューに[設定]タブを表示します。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "設定タブを有効にするパスワード" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "[設定]タブを隠す際にあらかじめパスワードを設定しておくことで, そのパスワードを使用してメニューから設定タブを復元することができます。" @@ -3494,10 +3562,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "メニューのサブラベルを表示" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "現在選択されているメニューエントリに関する追加情報を表示します。" - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "スタート画面を表示" @@ -3855,22 +3919,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "メニューの倍率" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "メニューの壁紙" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "壁紙として設定する画像を選択します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "壁紙の不透明度" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "壁紙の不透明度を調整します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "フレームバッファの不透明度" @@ -3897,32 +3949,20 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_THUMBNAIL_UPSCALE_THRESHOLD, - "指定された値より小さい幅/高さのサムネイル画像を自動的に拡大します。\n画質を改善します。\n中程度のパフォーマンスへの影響があります。" + "指定された値より小さい幅/高さのサムネイル画像を自動的に拡大します. 画質を改善します. 中程度のパフォーマンスへの影響があります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, "ティッカーテキストのアニメーション" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "メニューに長い文字列を表示するときの水平スクロール方式を選択します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, "ティッカーテキストの速度" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "メニューに長い文字列を表示するときのアニメーション速度です。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, "ティッカーテキストのスムージング" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "長いテキスト文字列を表示するときのスクロールをスムーズにします。\nパフォーマンスに少し影響します。" - ) /* Settings > AI Service */ @@ -3932,7 +3972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, - "'Image mode'は翻訳中にゲームを一時停止, 'Speech mode'は実行継続します。" + "テキストオーバーレイとして翻訳を表示する(画像モード)か, テキスト読み上げとして再生します(音声モード)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL, @@ -3950,13 +3990,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, "AIサービスのホットキーを押したときにAIサービスの実行を有効にします。" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, + "画面の翻訳中にコアを一時停止します. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG, "翻訳対象の言語" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_SOURCE_LANG, - "サービスを利用して翻訳する対象の言語です。\n'値なし'に設定している場合, 自動検出を試みます。\n適切に言語を設定すれば, 翻訳の精度が向上します。" + "サービスを利用して翻訳する対象の言語です. '値なし'に設定している場合, 自動検出を試みます. 適切に言語を設定すれば, 翻訳の精度が向上します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_TARGET_LANG, @@ -3964,11 +4008,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_TARGET_LANG, - "サービスを利用して翻訳したあとの言語です。\n'値なし'に設定している場合, デフォルトは英語になります。" + "サービスを利用して翻訳したあとの言語です. '値なし'に設定している場合, デフォルトは英語になります. " ) /* Settings > Accessibility */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "テキスト読み上げ速度" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "テキスト読み上げ音声の速度." + ) /* Settings > Power Management */ @@ -3980,19 +4032,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "実績を有効または無効にします。\n詳細については, http://retroachievements.org を参照してください。" + "古典的なゲームで実績を獲得しましょう. 詳細については、https://retroachievements.org をご覧ください。" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "ハードコアモード" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, + "獲得ポイントが2倍になります. \nすべてのゲームでセーブ状態, チート, 巻き戻し, 一時停止, スローモーションを無効にします. \n実行時にこの設定を切り替えるとゲームが再起動します. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "ランキング" ) MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "ゲーム固有のリーダーボードです。\nハードコアモードが無効のときには効果ありません。" + MENU_ENUM_SUBLABEL_CHEEVOS_RICHPRESENCE_ENABLE, + "RetroAchievements のウェブサイトに詳細なプレイステータスを送信します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, @@ -4024,7 +4080,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "実績を獲得したときに自動でスクリーンショットを撮ります。" + "実績を獲得したときに自動的にスクリーンショットを撮ります." ) /* Settings > Network */ @@ -4035,7 +4091,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PUBLIC_ANNOUNCE, - "ゲームのネットプレイを一般公開します。\n設定しない場合, クライアントは手動接続が必要です。" + "ゲームのネットプレイを一般公開します. 設定しない場合, クライアントは手動接続が必要です. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER, @@ -4043,7 +4099,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, - "中継サーバーを介してネットプレイ接続を転送します。\nホストがファイアウォールの内側にある場合, またはNAT/UPnPの問題がある場合に役立ちます。" + "中継サーバーを介してネットプレイ接続を転送します. ホストがファイアウォールの内側にある場合, またはNAT/UPnPの問題がある場合に役立ちます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER, @@ -4075,7 +4131,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "ネットプレイのホストに接続するためのパスワードです。\nホストモードでのみ使用されます。" + "ホストに接続しているクライアントが使用するパスワード." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -4083,7 +4139,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "観戦者のみに適用されるネットプレイのホストに接続するためのパスワードです。\nホストモードでのみ使用されます。" + "視聴者としてホストに接続するクライアントが使用するパスワード." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, @@ -4091,7 +4147,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "ネットプレイを観覧モードで開始します。" + "視聴モードでネットプレイを開始します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -4099,7 +4155,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "スレーブモードで接続を許可します。\nスレーブモードのクライアントは, どちらの側にもあまり処理能力を必要としませんが, ネットワーク遅延の影響を大きく受けます。" + "スレーブモードでの接続を許可します. スレーブモードのクライアントはどちら側にもほとんど処理能力を必要としませんが, ネットワークの遅延に大きく影響を受けます." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -4107,31 +4163,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "スレーブモードではない接続を許可します\n高速なネットワークで非力なマシンを使う場合を除いてはお勧めできません。" + "スレーブモードでの接続を禁止します. 非常に弱いマシンがある非常に高速なネットワーク以外では推奨されません." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "ネットプレイのステートレスモード" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "保存状態を必要としないモードでネットプレイを実行します。\n有効にすると, 高速なネットワークが必要になりますが, 巻き戻しは行われないため, ネットプレイでのジッタは発生しません。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "ネットプレイのチェックフレーム" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "ネットプレイがホストとクライアント間で同期していることを検証するフレームの頻度です。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "入力遅延フレーム数" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, - "ネットワーク遅延を隠すために使用する, ネットプレイ中の入力遅延のフレーム数です。\n顕著な入力の遅れを犠牲にして, ジッタを減らし, CPUの負担を軽減します。" + "ネットワーク遅延を隠すために使用する, ネットプレイ中の入力遅延のフレーム数です. 顕著な入力の遅れを犠牲にして, ジッタを減らし, CPUの負担を軽減します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, @@ -4139,7 +4187,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, - "ネットワーク遅延を隠すために使用される可能性がある入力遅延フレームの範囲です。\n予期しない入力遅延を犠牲にして, ジッタを減らし, ネットプレイのCPU使用率を減らします。" + "ネットワーク遅延を隠すために使用される可能性がある入力遅延フレームの範囲です. 予期しない入力遅延を犠牲にして, ジッタを減らし, ネットプレイのCPU使用率を減らします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, @@ -4171,15 +4219,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "ネットワークゲームパッド" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "ネットワークリモートのベースポート" + "ネットワークレトロパッド" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "ユーザ%dのリモートを有効" + "ユーザー %d ネットワークのレトロパッド" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -4195,7 +4239,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "プレイリストを参照し自動的に不足しているサムネイル画像をダウンロードします。\nパフォーマンスに深刻な影響を与えます。" + "再生リストの閲覧中に, 欠落しているサムネイルを自動的にダウンロードします. パフォーマンスに大きな影響を与えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, @@ -4228,12 +4272,20 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_EXTRACT_ARCHIVE, "ダウンロード後, ダウンロードしたコンテンツが含まれるアーカイブを自動的に展開します。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, + "実験的なコアを表示" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, + "コアダウンローダリストに「実験的なl」コアを含めます. これらは通常, 開発/テストのみを目的としており, 一般的な使用には推奨されません. " + ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "履歴を有効" + "履歴" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -4249,7 +4301,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "お気に入りの保存件数" + "お気に入りのサイズ" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME, @@ -4273,7 +4325,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "プレイリストをアルファベット順に並び替えます。" + "「履歴」, 「画像」, 「音楽」, 「動画」を除き, プレイリストをアルファベット順に並べ替えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, @@ -4297,16 +4349,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SHOW_SUBLABELS, - "現在のコア関連付けやプレイ記録(利用可能な場合)など, 各プレイリストエントリの追加情報を表示します。\nパフォーマンスに影響があります。" + "現在のコア関連付けやプレイ記録(利用可能な場合)など, 各プレイリストエントリの追加情報を表示します. パフォーマンスに影響があります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "コア:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "プレイ時間:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "最終プレイ時刻:" @@ -4317,7 +4365,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, - "サブラベルに表示するプレイ記録の種類を選択します。\n(対応するプレイ記録は[保存]オプションメニューで有効にする必要があります)" + "サブラベルに表示するプレイ記録の種類を選択します. (対応するプレイ記録は[保存]オプションメニューで有効にする必要があります)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, @@ -4325,7 +4373,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, - "圧縮ファイルに関連付けられたエントリをプレイリストで検索するときは, [ファイル名]+[内容]ではなく, アーカイブファイル名のみを一致させます。\n圧縮ファイルをロードするときに重複するコンテンツ履歴エントリを避けるためにこれを有効にしてください。" + "圧縮ファイルに関連付けられたエントリをプレイリストで検索するときは, [ファイル名]+[内容]ではなく, アーカイブファイル名のみを一致させます. 圧縮ファイルをロードするときに重複するコンテンツ履歴エントリを避けるためにこれを有効にしてください. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, @@ -4333,15 +4381,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, - "無効にすると, その拡張子をサポートするコアがインストールされている場合にのみコンテンツがプレイリストに追加されます。\n有効にすると, 関係なくプレイリストに追加します。\nこれにより, スキャンした後に必要なコアをインストールできます。" + "無効にすると, その拡張子をサポートするコアがインストールされている場合にのみコンテンツがプレイリストに追加されます. 有効にすると, 関係なくプレイリストに追加します. これにより, スキャンした後に必要なコアをインストールできます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "プレイリスト管理" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "選択したプレイリストの管理タスクを実行します。 (例: デフォルトコアの関連付け設定/リセット)" + "プレイリストの管理" ) /* Settings > Playlists > Playlist Management */ @@ -4350,6 +4394,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_DEFAULT_CORE, "デフォルトのコア" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_DEFAULT_CORE, + "プレイリストエントリを介してコア関連付けを持たないコンテンツを起動するときに使用するコアを指定します. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_RESET_CORES, "コアの関連付けのリセット" @@ -4376,7 +4424,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "無効/重複項目を削除し、コアの関連付けを検証します。" + "コアの関連付けを検証し, 無効または重複したエントリを削除します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, @@ -4384,7 +4432,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DELETE_PLAYLIST, - "ファイルシステムからプレイリストを削除します。" + "ファイルシステムからプレイリストを削除します. " ) /* Settings > User */ @@ -4417,10 +4465,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "言語" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "ユーザインタフェースの言語を変更します。" - ) /* Settings > User > Privacy */ @@ -4430,7 +4474,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_ALLOW, - "コアでのカメラ使用を許す。" + "コアでのカメラ使用を許可します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISCORD_ALLOW, @@ -4446,15 +4490,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_ALLOW, - "コアでの位置情報サービスを許す。" + "コアでの位置情報サービスを許可します. " ) /* Settings > User > Accounts */ -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "RetroAchievementサービスです。詳細については, http://retroachievements.orgを参照してください。" - ) /* Settings > User > Accounts > RetroAchievements */ @@ -4462,10 +4502,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "ユーザ名" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "RetroAchievementsアカウントのユーザ名です。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "パスワード" @@ -4497,7 +4533,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SYSTEM_DIRECTORY, - "システムフォルダを指定します。\nコアはBIOSや特定システムの設定などをこのフォルダからロードします。" + "システムフォルダを指定します. コアはBIOSや特定システムの設定などをこのフォルダからロードします. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIRECTORY, @@ -4511,10 +4547,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "アセット" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "メニューインタフェースがロード可能なアセットなどを検索するフォルダです。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "ダイナミック壁紙" @@ -4535,10 +4567,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "ファイルブラウザ" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "ファイルブラウザの開始ディレクトリを指定します。" - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "設定" @@ -4623,18 +4651,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "録画設定" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "このフォルダに録画設定ファイルを保存します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "オーバーレイ" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "オーバーレイが存在するフォルダを指定します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, "ビデオレイアウト" @@ -4651,18 +4671,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "入力デバイスの自動設定" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "ジョイパッドを接続したとき, そのジョイパッドに対応した設定ファイルが指定したフォルダに存在していれば, そのジョイパッドは自動的に設定されます。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "入力リマップ" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "すべてのコントローラリマップファイルをこのフォルダに保存します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "プレイリスト" @@ -4722,7 +4734,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER, - "このオーディオトラックを使用可能なオーディオストリームスロットに追加します。\n空きスロットが存在しない場合は無視されます。" + "このオーディオトラックを使用可能なオーディオストリームスロットに追加します. 空きスロットが存在しない場合は無視されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_PLAY, @@ -4730,7 +4742,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER_AND_PLAY, - "このオーディオトラックを使用可能なオーディオストリームスロットに追加して再生します。\n空きスロットが存在しない場合は無視されます。" + "このオーディオトラックを使用可能なオーディオストリームスロットに追加して再生します. 空きスロットが存在しない場合は無視されます. " ) /* Netplay */ @@ -4755,13 +4767,9 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "アクティブなネットプレイ接続を切断します。" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "ルーム一覧を更新" - ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "新しいネットプレイルームをスキャンします。" + "ネットプレイのホストをスキャンします." ) /* Netplay > Host */ @@ -4833,12 +4841,28 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "コア" + "デフォルトのコア" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, + "スキャンしたコンテンツを起動するときに使用するデフォルトのコアを選択します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, "ファイル拡張子" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "再帰的にスキャン" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_OVERWRITE, + "既存のプレイリストを上書き" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_OVERWRITE, + "有効にすると, コンテンツをスキャンする前に既存のプレイリストが削除されます. 無効にすると, 既存のプレイリストエントリが保存され, 現在プレイリストから欠落しているコンテンツのみが追加されます. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, "スキャンを開始" @@ -4904,7 +4928,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DOWNLOAD_PL_ENTRY_THUMBNAILS, - "現在のコンテンツに対応するスクリーンショット/ボックスアート/タイトルスクリーンをダウンロードします。\nすでに存在するサムネイルがあれば更新します。" + "現在のコンテンツに対応するスクリーンショット/ボックスアート/タイトルスクリーンをダウンロードします. すでに存在するサムネイルがあれば更新します. " ) /* Playlist Item > Set Core Association */ @@ -4965,7 +4989,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CLOSE_CONTENT, - "現在動作中のゲームを終了します。\nすべての保存されていない変更は失われる可能性があります。" + "現在動作中のゲームを終了します. すべての保存されていない変更は失われる可能性があります. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT, @@ -4981,7 +5005,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_STATE_SLOT, - "現在選択中のステートスロットを変更します。" + "現在選択中のステートスロットを変更します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_STATE, @@ -4989,7 +5013,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_STATE, - "現在選択中のスロットにゲームの進行状況を保存します。" + "現在選択中のスロットにゲームの進行状況を保存します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_STATE, @@ -4997,7 +5021,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_STATE, - "現在選択中のスロットに保存されたゲームの進行状況をロードします。" + "現在選択中のスロットに保存されたゲームの進行状況をロードします." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE, @@ -5193,11 +5217,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "新規コードを先頭に追加" + "新規チートを先頭に追加" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "新規コードを最後に追加" + "新規チートを最後に追加" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, @@ -5213,11 +5237,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_TOGGLE, - "トグルの後で適用" + "切り替えの後で適用" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_APPLY_AFTER_TOGGLE, - "トグルした後, 直ちにチートを適用します。" + "切り替えた後, 直ちにチートを適用します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_CHANGES, @@ -5240,7 +5264,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_START_OR_RESTART, - "左/右でビット幅を変更します。" + "左/右でビット幅を変更" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, @@ -5248,23 +5272,91 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "ビッグエンディアン : 258 = 0x0102,\nリトルエンディアン : 258 = 0x0201" + "ビッグエンディアン: 258 = 0x0102,\nリトルエンディアン: 258 = 0x0201" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, + "値でメモリ空間を検索" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "左/右で値を変更します。" + "左/右で値を変更" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "%u (%X) に等しい" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LT, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_LT_VAL, + "以前の値より小さい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_LTE, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_LTE_VAL, + "以前の値と等しいまたは小さい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GT, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_GT_VAL, + "以前の値より大きい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_GTE, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_GTE_VAL, + "以前の値と等しいまたは大きい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQ, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQ_VAL, + "以前の値と等しい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_NEQ, + "値でメモリ空間を検索" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_NEQ_VAL, + "以前の値と等しくない" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQPLUS, + "値でメモリ空間を検索" + ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQPLUS, - "左/右で値を変更します。" + "左/右で値を変更" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQPLUS_VAL, + "以前の値 +%u (%X ) に等しい" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EQMINUS, + "値でメモリ空間を検索" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EQMINUS, - "左/右で値を変更します。" + "左/右で値を変更" + ) +MSG_HASH( + MENU_ENUM_LABEL_CHEAT_SEARCH_EQMINUS_VAL, + "以前の値 -%u (%X ) に等しい" ) /* Quick Menu > Cheats > Load Cheat File (Replace) */ @@ -5276,6 +5368,10 @@ MSG_HASH( /* Quick Menu > Cheats > Load Cheat File (Append) */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_FILE_APPEND, + "チートファイル(追加)" + ) /* Quick Menu > Cheats > Cheat Details */ @@ -5283,6 +5379,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DETAILS_SETTINGS, "チート詳細" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_IDX, + "インデックス" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_IDX, + "リスト内のインデックス位置. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_STATE, "有効" @@ -5295,14 +5399,54 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_HANDLER, "ハンドラ" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_MEMORY_SEARCH_SIZE, + "メモリ検索サイズ" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_VALUE, "値" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS, + "メモリアドレス" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_BROWSE_MEMORY, + "参照アドレス: %08X" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADDRESS_BIT_POSITION, + "メモリアドレスマスク" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEAT_ADDRESS_BIT_POSITION, + "メモリ検索サイズ < 8ビットのときのアドレスビットマスク." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, + "繰り返し回数" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_CODE, "コード" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_AFTER, + "新規チートをこの後に追加" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BEFORE, + "新規チートをこの前に追加" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_COPY_AFTER, + "このチートの後にコピー" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, + "このチートの前にコピー" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, "このチートを削除" @@ -5310,6 +5454,10 @@ MSG_HASH( /* Quick Menu > Disc Control */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, + "ディスクの取り出し" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "ディスクイメージを挿入" @@ -5320,7 +5468,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, - "現在のディスクを取り出して、ファイルシステムから新しいディスクを選択し、それを挿入し、仮想ディスクトレイを閉じます。 注: これは古い機能です。代わりに、M3Uプレイリストを介してマルチディスクタイトルを読み込むことをお勧めします。これにより、「ディスクの挿入/取り出し」オプションと「現在のディスクインデックス」オプションを使用してディスク[...]" + "現在のディスクを取り出して, ファイルシステムから新しいディスクを選択し, それを挿入し, 仮想ディスクトレイを閉じます. 注: これは古い機能です. 代わりに, M3Uプレイリストを介してマルチディスクタイトルを読み込むことをお勧めします. これにより, 「ディスクの挿入/取り出し」オプションと「現在のディスクインデックス」オプションを使用してディスク選択が[...]" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, @@ -5328,7 +5476,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_INDEX, - "利用可能な画像のリストから現在のディスクを選択してください。「ディスクを挿入」を選択するとディスクが読み込まれます。" + "利用可能な画像のリストから現在のディスクを選択してください. 「ディスクを挿入」を選択するとディスクが読み込まれます. " ) /* Quick Menu > Shaders */ @@ -5341,17 +5489,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "シェーダファイルの変更を監視" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "ディスク上のシェーダーファイルに行われた変更を自動的に適用します。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "シェーダのプリセットをロード" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, - "シェーダープリセットをロードします。シェーダーパイプラインは自動的にセットアップされます。" + "シェーダープリセットをロードします. シェーダーパイプラインは自動的にセットアップされます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, @@ -5359,7 +5503,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE, - "現在のシェーダープリセットを保存します。" + "現在のシェーダープリセットを保存します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, @@ -5371,7 +5515,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHADER_APPLY_CHANGES, - "シェーダの設定の変更を直ちに反映します。\nシェーダのパス数やフィルタリング, FBOスケールなどを変更したときに使用します。" + "シェーダの設定の変更を直ちに反映します. シェーダのパス数やフィルタリング, FBOスケールなどを変更したときに使用します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS, @@ -5381,10 +5525,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "シェーダのパス数" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "シェーダパイプラインのパス数を増加または減少させます。\n各パイプラインに別々のシェーダをバインドし, フィルタリングとスケールを設定することができます。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "シェーダ" @@ -5404,10 +5544,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS, "シェーダのプリセットに名前を付けて保存" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS, + "現在のシェーダ設定を新しいシェーダプリセットとして保存します." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GLOBAL, + "グローバルプリセットを保存" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL, + "現在のシェーダー設定をデフォルトのグローバル設定として保存します." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "コアのプリセットを保存" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, + "現在のシェーダー設定をこのコアのデフォルトとして保存します." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "コンテンツフォルダのゲームプリセットを保存" @@ -5416,6 +5572,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "ゲームのプリセットを保存" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME, + "現在のシェーダー設定をコンテンツのデフォルト設定として保存します." + ) /* Quick Menu > Shaders > Remove */ @@ -5425,7 +5585,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_GLOBAL, - "すべてのコンテンツとすべてのコアで使用されるグローバルプリセットを削除します。" + "すべてのコンテンツとすべてのコアで使用されるグローバルプリセットを削除します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_CORE, @@ -5433,7 +5593,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_CORE, - "現在ロードされているコアで実行されたすべてのコンテンツで使用されるコアプリセットを削除します。" + "現在ロードされているコアで実行されたすべてのコンテンツで使用されるコアプリセットを削除します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_PARENT, @@ -5441,7 +5601,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE_PARENT, - "現在の作業ディレクトリ内のすべてのコンテンツで使用されるコンテンツディレクトリプリセットを削除します。" + "現在の作業ディレクトリ内のすべてのコンテンツで使用されるコンテンツディレクトリプリセットを削除します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GAME, @@ -5467,7 +5627,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_CORE, - "このコアでロードされたすべてのコンテンツに適用するオーバーライド設定ファイルを保存します。\nメイン設定より優先されます。" + "このコアでロードされたすべてのコンテンツに適用するオーバーライド設定ファイルを保存します. メイン設定より優先されます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG_OVERRIDE_CONTENT_DIR, @@ -5479,7 +5639,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_CURRENT_CONFIG_OVERRIDE_GAME, - "現在のコンテンツにのみ適用するオーバーライド設定ファイルを保存します。\nメイン設定より優先されます。" + "現在のコンテンツにのみ適用するオーバーライド設定ファイルを保存します. メイン設定より優先されます. " ) /* Quick Menu > Achievements */ @@ -5492,10 +5652,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE, "実績ハードコアモードを一時停止" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_PAUSE, + "現在のセッションの実績を一時停止します (これにより, セーブ状態, チート, 巻き戻し, 一時停止, スローモーションが可能になります)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME, "実績ハードコアモードを再開" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_RESUME, + "現在のセッションの実績を再開します (これにより, セーブ状態, チート, 巻き戻し, 一時停止, スローモーションを無効にし, 現在のゲームをリセットします)." + ) /* Quick Menu > Information */ @@ -5526,6 +5694,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "コア情報はありません。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "利用可能なコアのバックアップはありません" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "お気に入りがありません。" @@ -5558,6 +5730,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "設定が見つかりませんでした。" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Bluetooth デバイスが見つかりません" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "該当するネットワークが見つかりませんでした。" @@ -5693,10 +5869,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "放電" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "ソースはありません" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<このフォルダを使用>" @@ -5723,7 +5895,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "レトロパッド(アナログ付)" + "アナログ付きレトロパッド" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NONE, @@ -5951,19 +6123,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "マウス ホイール上" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "マウス ホイール下" + "マウスホイール上" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "マウス ホイール左" + "マウスホイール左" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "マウス ホイール右" + "マウスホイール右" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -6110,7 +6278,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_SHADOWS, - "メニューテキスト、外枠、サムネイルの影のドロップを有効にします。パフォーマンスに影響を与えます。" + "メニューテキスト, 外枠, サムネイルの影のドロップを有効にします. パフォーマンスに影響を与えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT, @@ -6118,7 +6286,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT, - "背景の部分アニメーション効果を有効にします。パフォーマンスに大きな影響を与えます。" + "背景の部分アニメーション効果を有効にします. パフォーマンスに大きな影響を与えます. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_PARTICLE_EFFECT_SPEED, @@ -6126,7 +6294,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_PARTICLE_EFFECT_SPEED, - "背景の部分アニメーション効果の速度を調整します。" + "背景の部分アニメーション効果の速度を調整します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_INLINE_THUMBNAILS, @@ -6152,6 +6320,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_THUMBNAIL_DELAY, "サムネイルの遅延 (ms)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_RGUI_EXTENDED_ASCII, + "拡張 ASCII サポート" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_RGUI_EXTENDED_ASCII, + "非標準ASCII文字の表示を有効にします. 特定の非英語言語との互換性に必要です. パフォーマンスに中程度の影響を与えます." + ) /* RGUI: Settings Options */ @@ -6232,20 +6408,32 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_HORIZONTAL_ANIMATION, - "メニューの水平アニメーションを有効にします。\nこれによりパフォーマンスが低下します。" + "メニューの水平アニメーションを有効にします. これによりパフォーマンスが低下します. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT, "水平アイコンハイライト時のアニメーション" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_HORIZONTAL_HIGHLIGHT, + "タブ間をスクロールしたときのアニメーション. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_MOVE_UP_DOWN, "上下移動時のアニメーション" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_MOVE_UP_DOWN, + "上下に移動するときのアニメーション. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, "メインメニュー開閉時のアニメーション" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_XMB_ANIMATION_OPENING_MAIN_MENU, + "サブメニューを開いたときのアニメーション. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ALPHA_FACTOR, "メニューの不透明度" @@ -6290,17 +6478,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "アイコンに影を表示" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "すべてのアイコンにドロップシャドウを適用します。\nこの設定はわずかにパフォーマンスに影響を及ぼします。" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, "メニューのシェーダパイプライン" ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE, - "背景アニメーション効果を選択します。\n効果によってはGPUに大きな負荷をかけます。\nパフォーマンスが不足する場合, 効果をオフにするか, より単純な効果を選択してください。" + "背景アニメーション効果を選択します. 効果によってはGPUに大きな負荷をかけます. パフォーマンスが不足する場合, 効果をオフにするか, より単純な効果を選択してください. " ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_MENU_COLOR_THEME, @@ -6330,10 +6514,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "設定タブを有効" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "[設定]タブを有効にします。タブを表示するには再起動が必要。" - ) /* XMB: Settings Options */ @@ -6341,10 +6521,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "リボン" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "リボン (シンプル)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "シンプルスノー" @@ -6456,6 +6632,26 @@ MSG_HASH( /* Ozone: Settings > User Interface > Appearance */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_COLLAPSE_SIDEBAR, + "サイドバーを隠す" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR, + "左サイドバーを常に隠れた状態にします." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, + "プレイリスト名を切り詰める" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, + "プレイリストからシステム名を削除します. たとえば、「Sony - PlayStation」は「PlayStation」になります。(再起動が必要)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, + "名前切り詰め後にプレイリストを並び替える" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "メニューの色テーマ" @@ -6991,7 +7187,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_NIGHTLY, - "RetroArchをアップデート (nightly)" + "RetroArchを更新 (nightly)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_UPDATE_RETROARCH_FINISHED, @@ -7116,6 +7312,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_SETTINGS, "Cheevosアカウント" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_DISK, + "ディスクが選択されていません" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HORIZONTAL_MENU, "水平メニュー" @@ -7200,17 +7400,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_KEYBOARD, "キーボード" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "内蔵画像ビューアを使用" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, - "最高のスワップチェーンイメージ" + "スワップチェーンイメージの最大値" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_MAX_SWAPCHAIN_IMAGES, - "指定するバッファモードをビデオドライバに伝えます。" + "指定したバッファリングモードを明示的に使用するようビデオドライバに指定します. " ) MSG_HASH( MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO, @@ -7249,7 +7445,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "ニックネーム (lan): %s" + "ニックネーム (LAN): %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -7335,10 +7531,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "オーディオとビデオのトラブルシューティング" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "バーチャルゲームパッドオーバーレイの変更" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "コンテンツをロードするには" @@ -7417,7 +7609,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_SEARCH, - "チートコードの検索を開始/再開します。" + "チートコードの検索を開始/再開します." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_NUM_PASSES, @@ -7578,7 +7770,11 @@ MSG_HASH( /* FIXME Should be MSG_ */ ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, - "該当するコアやコンテンツファイルが見つかりませんでした。\n手動でロードしてください。" + "該当するコアやコンテンツファイルが見つかりませんでした. 手動でロードしてください. " + ) +MSG_HASH( /* FIXME Should be MSG_ */ + MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER_FALLBACK, + "グラフィックドライバは, RetroArchの現在のビデオドライバと互換性がありません. %s ドライバに戻ります. 変更を有効にするには, RetroArchを再起動してください. " ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_SUCCESS, @@ -7590,7 +7786,7 @@ MSG_HASH( /* FIXME Should be MSG_ */ ) MSG_HASH( MSG_CHEAT_DELETE_ALL_INSTRUCTIONS, - "すべてのチートを削除するには, 右を5回押してください。" + "すべてのチートを削除するには, 右を5回押してください." ) MSG_HASH( MSG_FAILED_TO_SAVE_DEBUG_INFO, @@ -7670,7 +7866,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_NOT_RETROARCH, - "相手の接続が失敗しました。\n古いRetroArchバージョンを使っているかもしれません。" + "相手の接続が失敗しました. 古いRetroArchバージョンを使っているかもしれません. " ) MSG_HASH( MSG_NETPLAY_OUT_OF_DATE, @@ -7678,7 +7874,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_DIFFERENT_VERSIONS, - "警告: 相手が違うRetroArchバージョンを使っています。\n問題があれば同じバージョンを使って下さい。" + "警告: 相手が違うRetroArchバージョンを使っています. 問題があれば同じバージョンを使って下さい. " ) MSG_HASH( MSG_NETPLAY_DIFFERENT_CORES, @@ -7686,7 +7882,7 @@ MSG_HASH( ) MSG_HASH( MSG_NETPLAY_DIFFERENT_CORE_VERSIONS, - "警告: 相手が違うコアのバージョンを使っています。\n問題があれば同じバージョンを使って下さい。" + "警告: 相手が違うコアのバージョンを使っています. 問題があれば同じバージョンを使って下さい. " ) MSG_HASH( MSG_NETPLAY_ENDIAN_DEPENDENT, @@ -7774,7 +7970,7 @@ MSG_HASH( ) MSG_HASH( MSG_UPDATING_CORE, - "コアをアップデート中: " + "コアを更新中: " ) MSG_HASH( MSG_DOWNLOADING_CORE, @@ -7802,16 +7998,32 @@ MSG_HASH( ) MSG_HASH( MSG_NUM_CORES_UPDATED, - "アップデートされたコア: " + "更新されたコア: " ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "コアをリセット中: " ) +MSG_HASH( + MSG_PLAYLIST_MANAGER_CORES_RESET, + "コアのリセット: " + ) +MSG_HASH( + MSG_PLAYLIST_MANAGER_CLEANING_PLAYLIST, + "プレイリストを削除中: " + ) +MSG_HASH( + MSG_PLAYLIST_MANAGER_PLAYLIST_CLEANED, + "プレイリストを削除しました: " + ) MSG_HASH( MSG_ADDED_TO_FAVORITES, "お気に入りに追加しました" ) +MSG_HASH( + MSG_ADD_TO_FAVORITES_FAILED, + "お気に入りの追加に失敗しました: プレイリストがいっぱいです" + ) MSG_HASH( MSG_RESET_CORE_ASSOCIATION, "プレイリストエントリのコアの関連付けがリセットされました" @@ -7820,6 +8032,10 @@ MSG_HASH( MSG_APPENDED_DISK, "ディスクを挿入しました" ) +MSG_HASH( + MSG_FAILED_TO_APPEND_DISK, + "ディスクの追加に失敗しました" + ) MSG_HASH( MSG_APPLICATION_DIR, "アプリフォルダ" @@ -7868,10 +8084,18 @@ MSG_HASH( MSG_CHEEVOS_HARDCORE_MODE_ENABLE, "ハードコアモードが有効された。ステートセーブと巻き戻しは無効になった。" ) +MSG_HASH( + MSG_CONFIG_DIRECTORY_NOT_SET, + "設定ディレクトリが設定されていません. 新しい設定を保存できません. " + ) MSG_HASH( MSG_CONNECTED_TO, "接続しました to" ) +MSG_HASH( + MSG_CONTENT_CRC32S_DIFFER, + "コンテンツの CRC32 が異なります. 違うゲームでは使用できません." + ) MSG_HASH( MSG_CORE_DOES_NOT_SUPPORT_SAVESTATES, "コアはステートセーブに対応していません" @@ -7940,6 +8164,10 @@ MSG_HASH( MSG_DOWNLOADING, "ダウンロード中" ) +MSG_HASH( + MSG_INDEX_FILE, + "インデックス" + ) MSG_HASH( MSG_DOWNLOAD_FAILED, "ダウンロードに失敗しました" @@ -7948,6 +8176,10 @@ MSG_HASH( MSG_ERROR, "エラー" ) +MSG_HASH( + MSG_ERROR_LIBRETRO_CORE_REQUIRES_CONTENT, + "Libretroコアはコンテンツを必要としますが, 何も提供されませんでした." + ) MSG_HASH( MSG_ERROR_LIBRETRO_CORE_REQUIRES_SPECIAL_CONTENT, "Libretro コアは特別なコンテンツを必要としていますが, それらが供給されていません。" @@ -7996,6 +8228,10 @@ MSG_HASH( MSG_FAILED_TO, "失敗しました to" ) +MSG_HASH( + MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT, + "パッチを適用したコンテンツのメモリ割り当てに失敗しました..." + ) MSG_HASH( MSG_FAILED_TO_APPLY_SHADER, "シェーダの適用に失敗しました" @@ -8164,6 +8400,10 @@ MSG_HASH( MSG_FRAMES, "フレーム" ) +MSG_HASH( + MSG_GAME_SPECIFIC_CORE_OPTIONS_FOUND_AT, + "ゲーム毎のオプション: ゲーム固有のコアオプション" + ) MSG_HASH( MSG_GOT_INVALID_DISK_INDEX, "無効なディスクインデックスです" @@ -8252,6 +8492,10 @@ MSG_HASH( MSG_LOADING_HISTORY_FILE, "履歴ファイルをロード中" ) +MSG_HASH( + MSG_LOADING_FAVORITES_FILE, + "お気に入りファイルを読み込み中" + ) MSG_HASH( MSG_LOADING_STATE, "ステートロード中" @@ -8260,6 +8504,14 @@ MSG_HASH( MSG_MEMORY, "メモリ" ) +MSG_HASH( + MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE, + "入力リプレイムービーファイルは有効なBSV1ファイルではありません. " + ) +MSG_HASH( + MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION, + "入力リプレイ動画フォーマットはシリアライザのバージョンが異なるようです. ほとんどの場合失敗します. " + ) MSG_HASH( MSG_MOVIE_PLAYBACK_ENDED, "動画の再生を終了しました" @@ -8272,6 +8524,10 @@ MSG_HASH( MSG_NETPLAY_FAILED, "ネットプレイの初期化に失敗しました" ) +MSG_HASH( + MSG_NO_CONTENT_STARTING_DUMMY_CORE, + "コンテンツがありません. ダミーコアを開始します. " + ) MSG_HASH( MSG_NO_SAVE_STATE_HAS_BEEN_OVERWRITTEN_YET, "ステートセーブはまだ上書きされていません" @@ -8296,6 +8552,10 @@ MSG_HASH( MSG_READING_FIRST_DATA_TRACK, "最初のデータトラックを読み込んでいます..." ) +MSG_HASH( + MSG_RECORDING_TERMINATED_DUE_TO_RESIZE, + "サイズ変更のため録音が終了しました. " + ) MSG_HASH( MSG_REDIRECTING_CHEATFILE_TO, "チートファイルの出力先を変更しています to" @@ -8348,13 +8608,17 @@ MSG_HASH( MSG_REWIND_INIT_FAILED, "巻き戻しバッファの初期化に失敗しました。巻き戻しが無効になります" ) +MSG_HASH( + MSG_REWIND_INIT_FAILED_THREADED_AUDIO, + "実装はスレッドオーディオを使用しています. 巻き戻しは使用できません. " + ) MSG_HASH( MSG_REWIND_REACHED_END, "巻き戻しバッファの終わりに達しました" ) MSG_HASH( MSG_SAVED_NEW_CONFIG_TO, - "新しいメイン設定ファイルを保存しました to" + "新しいメイン設定ファイルを保存しました: " ) MSG_HASH( MSG_SAVED_STATE_TO_SLOT, @@ -8436,6 +8700,22 @@ MSG_HASH( MSG_TAKING_SCREENSHOT, "スクリーンショットを撮影中" ) +MSG_HASH( + MSG_SCREENSHOT_SAVED, + "スクリーンショットを保存しました" + ) +MSG_HASH( + MSG_ACHIEVEMENT_UNLOCKED, + "実績をアンロックしました" + ) +MSG_HASH( + MSG_CHANGE_THUMBNAIL_TYPE, + "サムネイルの種類を変更" + ) +MSG_HASH( + MSG_NO_THUMBNAIL_AVAILABLE, + "利用可能なサムネイルがありません" + ) MSG_HASH( MSG_PRESS_AGAIN_TO_QUIT, "もう一度押すと終了します..." @@ -8580,6 +8860,18 @@ MSG_HASH( MSG_CHEAT_INIT_FAIL, "チート検索の開始に失敗しました" ) +MSG_HASH( + MSG_CHEAT_SEARCH_NOT_INITIALIZED, + "検索は初期化/開始されていません" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_FOUND_MATCHES, + "新しいマッチ数 = %u" + ) +MSG_HASH( + MSG_CHEAT_SEARCH_ADDED_MATCHES_TOO_MANY, + "十分なスペースがありません. チートの合計数は 100 です. " + ) MSG_HASH( MSG_CHEAT_ADD_TOP_SUCCESS, "新しいチートをリストの先頭に追加しました。" @@ -8590,7 +8882,23 @@ MSG_HASH( ) MSG_HASH( MSG_CHEAT_DELETE_ALL_SUCCESS, - "すべてのチートを削除しました。" + "すべてのチートを削除しました." + ) +MSG_HASH( + MSG_CHEAT_ADD_BEFORE_SUCCESS, + "この前に新しいチートが追加されました. " + ) +MSG_HASH( + MSG_CHEAT_ADD_AFTER_SUCCESS, + "この後に新しいチートが追加されました. " + ) +MSG_HASH( + MSG_CHEAT_COPY_BEFORE_SUCCESS, + "チートはこの前にコピーされました. " + ) +MSG_HASH( + MSG_CHEAT_COPY_AFTER_SUCCESS, + "チートはこの後にコピーされました. " ) MSG_HASH( MSG_CHEAT_DELETE_SUCCESS, @@ -8664,6 +8972,10 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_INVALID_CONFIG, "手動スキャンの設定が無効です" ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_INVALID_CONTENT, + "有効なコンテンツが見つかりませんでした" + ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_START, "コンテンツをスキャン中: " @@ -8676,12 +8988,68 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "スキャン完了: " ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "コアのバックアップ完了: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "選択したコアのバックアップは既にインストールされています: " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "コアの復元中: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "コアの復元が完了: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "選択されたコアファイルは既にインストールされています: " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "コアをインストール中: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "コアのインストール完了: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "無効なコアファイルが選択されました: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "コアのバックアップに失敗しました: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "コアの復元に失敗しました: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "コアのインストールに失敗しました: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "コアの復元は無効です - コアはロックされています: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "コアのインストールは無効です - コアがロックされています: " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "コアをロックできませんでした: " + ) /* Lakka */ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_LAKKA, - "Lakkaをアップデート" + "Lakkaを更新" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_NAME, @@ -8710,6 +9078,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHUTDOWN, "シャットダウン" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FILE_BROWSER_OPEN_UWP_PERMISSIONS, + "外部ファイルアクセスを有効にする" + ) MSG_HASH( MENU_ENUM_SUBLABEL_FILE_BROWSER_OPEN_UWP_PERMISSIONS, "Windowsファイルアクセス権限の設定を開く" @@ -8754,18 +9126,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "RetroArchを再起動" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "RetroArchを終了して再起動します. 特定のメニュー設定の有効化(例えば, メニューの変更時など)に必要です. " + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "タッチを有効" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "キーボードのゲームパッドマッピングを有効" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "キーボードのゲームパッドマッピング式" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "小さいキーボードを有効" @@ -8786,6 +9154,26 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "[シャットダウン]オプションを表示/非表示にします。" ) +MSG_HASH( + MSG_INTERNET, + "インターネット" + ) +MSG_HASH( + MSG_INTERNET_RELAY, + "インターネット (リレー)" + ) +MSG_HASH( + MSG_LOCAL, + "ローカル" + ) +MSG_HASH( + MSG_READ_WRITE, + "読み込み/書き込み" + ) +MSG_HASH( + MSG_READ_ONLY, + "読み込みのみ" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 13a27c06de..927f968f61 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "물리 미디어 디스크를 불러옵니다. 먼저 디스크와 사용할 코어를 선택해야 합니다.(코어 불러오기)" + "물리 미디어 디스크를 불러옵니다. 먼저 디스크를 사용할 코어를 불러와야(코어 불러오기) 합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -101,7 +101,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "컨텐츠 검색 및 데이터베이스를 추가합니다." + "컨텐츠를 검색하여 데이터베이스에 추가합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, @@ -117,7 +117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "키오스크 모드를 비활성화 합니다. 완전한 비활성화를 위해 재시작이 필요합니다." + "키오스크 모드를 비활성화합니다. (재시작 필요)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -139,6 +139,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS, "설정" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS, + "프로그램을 설정합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, "정보" @@ -186,6 +190,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, "코어 다운로드..." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, + "온라인 업데이터를 통해 코어를 설치합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, "코어 설치 또는 복원" @@ -242,7 +250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "사진" + "이미지" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, @@ -250,7 +258,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "영상" + "비디오" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, @@ -259,6 +267,18 @@ MSG_HASH( /* Main Menu > Online Updater */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST, + "코어 다운로더" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_INSTALLED_CORES, + "설치된 코어 모두 업데이트" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_UPDATE_INSTALLED_CORES, + "설치된 코어를 모두 최신 버전으로 업데이트합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, "미리보기 업데이터" @@ -273,7 +293,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "선택된 실행목록 상의 각각의 미리보기를 다운로드합니다." + "선택된 실행목록 내 모든 항목의 미리보기를 다운로드합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -289,7 +309,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "자동설정 프로필 업데이트" + "컨트롤러 프로필 업데이트" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -305,15 +325,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, - "GLSL 쉐이더 업데이트" + "GLSL 셰이더 업데이트" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS, - "Cg 쉐이더 업데이트" + "Cg 셰이더 업데이트" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS, - "Slang 쉐이더 업데이트" + "Slang 셰이더 업데이트" ) /* Main Menu > Information */ @@ -437,6 +457,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "이 코어를 삭제합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "코어 백업" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "현재 설치된 코어의 백업을 생성합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "백업 복원" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "이전에 백업해둔 코어를 다시 설치합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "백업 삭제" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "이전에 백업해둔 코어를 삭제합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[자동]" + ) /* Main Menu > Information > System Information */ @@ -522,7 +570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "네트워크 게임패드 지원" + "네트워크 컨트롤러 지원" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -710,7 +758,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_PYTHON_SUPPORT, - "Python (쉐이더에서 지원) 지원" + "Python (셰이더에서 지원) 지원" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_V4L2_SUPPORT, @@ -730,6 +778,10 @@ MSG_HASH( /* Main Menu > Information > Database Manager > Information */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_NAME, + "이름" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DESCRIPTION, "설명" @@ -1014,6 +1066,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS, "AI 서비스(번역/TTS/기타 등등) 설정을 변경합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_SETTINGS, + "접근성" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_SETTINGS, + "접근성 나레이터 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS, "전력 관리" @@ -1075,11 +1135,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "조이패드 드라이버" + "컨트롤러" ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "사용할 조이패드 드라이버입니다." + "사용할 컨트롤러 드라이버입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1119,7 +1179,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "사용할 WiFi 드라이버입니다." + "사용할 Wi-Fi 드라이버입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1176,10 +1236,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FULLSCREEN_MODE_SETTINGS, "전체 화면 모드" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_FULLSCREEN_MODE_SETTINGS, + "전체화면 모드 설정을 변경합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_WINDOWED_MODE_SETTINGS, + "창 모드" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_WINDOWED_MODE_SETTINGS, + "창 모드 설정을 변경합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SCALING_SETTINGS, + "크기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS, + "비디오 크기 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS, "오디오 싱크" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SYNCHRONIZATION_SETTINGS, + "비디오 동기화 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, "화면보호기 동작 차단" @@ -1210,7 +1294,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_GPU_SCREENSHOT, - "가능한 경우 GPU 쉐이더 처리된 화면 스크린샷을 저장합니다." + "가능한 경우 스크린샷을 GPU에서 셰이더 처리된 화면으로 저장합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SMOOTH, @@ -1222,7 +1306,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY, - "자동-쉐이더 지연" + "자동 셰이더 지연" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHADER_DELAY, + "자동 셰이더 로드를 지연(밀리초)합니다. 화면 캡쳐 소프트웨어의 이상 작동을 막을 수 있습니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER, @@ -1302,6 +1390,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE, "수직 리프레시 비율" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, + "화면의 주사율입니다. 적절한 오디오 입력 비율을 계산하는데 사용됩니다.\n참고: '스레드된 비디오' 설정 사용시 무시됩니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, "예상 화면 프레임비율" @@ -1465,7 +1557,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "불필요 픽셀을 포함해 개발자가 숨겨지길 원했던 가장자리 주변 픽셀을 잘라냅니다." + "개발자가 의도적으로 비워두는 가장자리 픽셀을 잘라냅니다. (재시작 필요)" ) /* Settings > Video > Synchronization */ @@ -1492,7 +1584,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "설정된 주사율보다 낮은 성능이 감지될 경우 수직 동기화가 자동으로 비활성화됩니다.\n퍼포먼스가 떨어질 때 버벅임을 방지할 수 있습니다." + "설정된 주사율보다 낮은 성능이 감지될 경우 수직 동기화가 자동으로 비활성화됩니다. 퍼포먼스가 떨어질 때 버벅임을 방지할 수 있습니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1524,7 +1616,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "코어에서 요구하는 타이밍에 편차가 발생하지 않게 합니다. 유동 화면 재생비율을 가진 G-Sync, FreeSync 모니터에 사용합니다." + "코어에서 요구하는 타이밍에 편차가 발생하지 않게 합니다. 유동적인 화면 주사율을 가진 모니터(G-Sync, FreeSync, HDMI 2.1 VRR)에서 사용할 수 있습니다." ) /* Settings > Audio */ @@ -1537,10 +1629,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_SETTINGS, "오디오 출력 설정을 변경합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_SETTINGS, + "리샘플러" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_SETTINGS, + "오디오 리샘플러 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_SYNCHRONIZATION_SETTINGS, "오디오 싱크" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_SYNCHRONIZATION_SETTINGS, + "오디오 동기화 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_SETTINGS, "MIDI 드라이버" @@ -1577,6 +1681,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_MUTE, "믹서 볼륨을 음소거/해제합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_FASTFORWARD_MUTE, + "빨리 감기 중 음소거" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_FASTFORWARD_MUTE, + "빨리 감기를 사용할 때 오디오를 음소거합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME, "오디오 볼륨 레벨 (dB)" @@ -1787,22 +1899,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, "메뉴 효과음을 활성화/해제합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "확인 사운드 사용" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "취소 사운드 사용" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "알람 사운드 사용" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "배경음악 사용" - ) /* Settings > Input */ @@ -1820,15 +1916,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "RetroArch 내부에서 입력 폴링이 수행되는 방식을 설정합니다. 설정에 따라 지연시간을 줄 일 수 있습니다." + "RetroArch에서 입력 폴링이 수행되는 방식을 설정합니다. 설정에 따라 지연시간이 줄어들 수 있습니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "입력설정 파일 사용" + "이 코어에 입력설정 파일 사용" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "사용시 재설정된 입력설정이 현재 코어에 설정된 입력에 우선하게 됩니다." + "재설정된 입력설정을 현재 코어에 설정된 입력보다 우선 적용합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, @@ -1836,7 +1932,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "입력 자동감지를 사용합니다. 조이패드를 자동으로 구성해줍니다." + "사용 시 프로필이 존재하는 컨트롤러를 자동으로 구성합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, @@ -1876,7 +1972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "터보 사용 버튼이 눌렸을 때 적용되는 터보 간격입니다. (숫자는 프레임)" + "터보를 사용하는 버튼이 눌렸을 때 사용될 입력 간격(프레임)입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1886,14 +1982,54 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE, "터보 사용 가능 버튼의 동작 기간입니다. (숫자는 프레임)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_MODE, + "터보 모드" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_TURBO_MODE, + "터보 모드의 작동 방식을 설정합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_DEFAULT_BUTTON, + "터보 기본 버튼" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON, + "'단일 버튼' 터보 모드의 기본 터보 활성화 버튼을 설정합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "햅틱 피드백/진동" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "햅틱 피드백 및 진동 설정을 변경합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS, + "메뉴 조작" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, + "메뉴 조작 설정을 변경합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "입력 핫키 설정" + "핫키 설정" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "핫키를 설정합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, + "%u번 포트 입력 설정" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, + "이 포트에 대한 입력을 설정합니다." + ) /* Settings > Input > Haptic Feedback/Vibration */ @@ -1941,7 +2077,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "종료 핫키를 두 번 둘러서 RetroArch를 종료합니다." + "종료 핫키를 두 번 눌러야 RetroArch가 종료되도록 합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -1949,23 +2085,39 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "메뉴 호출을 위한 게임패드 콤보입력입니다." + "메뉴를 호출하는 버튼 조합입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "빨리 진행하기 켜기/끄기" + "빨리 감기 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "빠른 속도와 일반 속도 사이를 전환합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "빨리 진행하기 홀드버튼" + "빨리 감기 (홀드)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "누르고 있을 경우 빨리 감기를 사용합니다. 키를 떼면 다시 정상 속도로 실행됩니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "슬로우 모션 켜기/끄기" + "슬로모션 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "슬로모션과 일반 속도 사이를 전환합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "슬로우 모션" + "슬로모션 (홀드)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "누르고 있을 경우 슬로모션을 사용합니다. 키를 떼면 다시 정상 속도로 실행됩니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, @@ -1977,7 +2129,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "전체화면 켜기/끄기" + "전체화면 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "전체화면 모드와 창 모드 사이를 전환합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, @@ -1997,120 +2153,136 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "동영상 기록 시작/중지" + "입력 기록 (시작/중지)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "사용자 입력을 .bsv 파일로 기록하는 것을 시작/중지합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "일시정지 켜기/끄기" + "일시정지 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "컨텐츠의 일시정지를 설정/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "다음 프레임" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "일시정지된 상태에서 컨텐츠를 한 프레임 진행합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "게임 초기화" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "컨텐츠를 처음부터 다시 시작합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, - "다음 쉐이더" + "다음 셰이더" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, - "이전 쉐이더" + "이전 셰이더" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "치트 인덱스 +" + "다음 치트 인덱스" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "선택된 치트 인덱스를 증가시킵니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "치트 인덱스 -" + "이전 치트 인덱스" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "선택된 치트 인덱스를 감소시킵니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "치트 켜기/끄기" + "치트 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "현재 선택된 치트를 활성화/비활성화합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "스크린샷 저장" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "현재 컨텐츠의 화면 이미지를 캡쳐합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "음소거 켜기/끄기" + "음소거 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "음소거를 사용/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "화상 키보드 켜기/끄기" + "화상 키보드 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "화상 키보드를 사용/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "FPS 켜기/끄기" + "FPS 표시 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "'초당 프레임 수' 표시기를 사용/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "디버그 정보 보내기" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "장치와 RetroArch 설정 정보를 분석을 위해 서버로 전송합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "넷플레이 호스트 켜기/끄기" + "넷플레이 호스트 (켜기/끄기)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "넷플레이 호스트를 사용/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, "넷플레이 플레이/관전 전환" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "현재 넷플레이 세션 모드를 '플레이' 또는 '관전'으로 전환합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, "핫키 사용" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "볼륨 +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "볼륨 -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "다음 오버레이" + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "할당된 경우, 다른 모든 핫키는 '핫키 사용'키를 누른 채로 입력해야 합니다. 일반 입력에 영향을 끼치지 않으면서 컨트롤러 버튼을 핫키로 할당할 수 있게 합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "디스크 꺼내기" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "다음 디스크" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "이전 디스크" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "마우스 켜기/끄기" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "게임 포커스 사용/해제" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "데스크탑 메뉴 열기/닫기" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "메뉴 열기/닫기" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "녹화 시작/중지" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "방송 시작/중지" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "AI 서비스" @@ -2130,17 +2302,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "장치 인덱스" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "모두 설정" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "모두 기본 값으로 설정" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "자동설정 저장" + "컨트롤러 프로필 저장" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2162,22 +2326,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "시작 버튼" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "위 D-패드" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "아래 D-패드" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "왼쪽 D-패드" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "오른쪽 D-패드" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "A 버튼 (우)" @@ -2309,22 +2457,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, "먼저 실행할 프레임 수를 설정합니다. 게임 내부의 지연 프레임을 넘어설 경우 화면이 흔들리는 등 게임플레이에 문제가 있을 수 있습니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "미리 실행에 보조 인스턴스 사용" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "코어가 미리 실행하는데 두 번째 인스턴스를 시용합니다. 상태 불러오기 중에 발생하는 오디오 문제를 해결해줍니다." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "미리 실행 경고 숨김" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "상태저장을 지원하지 않는 코어에서 미리 실행 사용시 표시되는 경고 메시지를 숨겨줍니다." - ) /* Settings > Core */ @@ -2337,12 +2469,12 @@ MSG_HASH( "하드웨어 렌더링 된 코어에 고유의 컨텍스트를 부여합니다. 프레임간 하드웨어 상태가 변경된 것으로 가정하지 않도록 합니다." ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, - "코어 종료 시 더미 불러오기" + MENU_ENUM_LABEL_VALUE_DRIVER_SWITCH_ENABLE, + "코어의 비디오 드라이버 교체 허용" ) MSG_HASH( - MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "코어 자체에 시스템 종료기능을 내장한 경우가 있는데 이 경우 더미 코어를 불러와서 코어가 RetroArch를 종료하지 못하게 방지합니다." + MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, + "코어 종료 시 더미 불러오기" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2356,25 +2488,15 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "콘텐츠를 불러오기 전에 필요한 펌웨어가 모두 있는지 확인합니다." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "회전 허용" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "코어의 화면 회전 설정을 허용합니다. 비활성화하면 회전 요청을 무시하게 되어 수동으로 화면 회전시 유용합니다." - ) /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "종료 시 환경설정 저장하기" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "종료 시 변경된 설정을 저장합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "컨텐츠 특정 코어 옵션 자동으로 불러오기" @@ -2401,11 +2523,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_SHADERS_ENABLE, - "쉐이드 프리셋 자동으로 불러오기" + "셰이더 프리셋 자동으로 불러오기" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GLOBAL_CORE_OPTIONS, - "광역 코어 옵션 파일 사용" + "전역 코어 옵션 파일 사용" ) MSG_HASH( MENU_ENUM_SUBLABEL_GLOBAL_CORE_OPTIONS, @@ -2414,18 +2536,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "폴더 안 세이브파일 정렬" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "코어 이름 폴더별로 저장된 세이브파일을 정렬합니다." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "폴더 안 상태저장파일 정렬" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "코어 이름 폴더별로 저장된 상태저장파일을 정렬합니다." @@ -2442,30 +2552,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "SaveRAM 자동저장 간격" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "비휘발성 SaveRAM을 정기적으로 자동 저장합니다. 기본값은 비활성이며 기간은 초 단위입니다. 0으로 설정시 자동저장이 비활성 됩니다." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "상태저장 자동 인덱스" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "상태저장 생성시 자동으로 인덱스를 추가 저장합니다. 불러올 시에는 가장 높은 숫자의 인덱스로 설정합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "자동 상태저장" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "RetroArch의 실행이 종료되면 자동으로 상태저장 파일을 생성합니다. 자동 상태 불러오기를 활성화시키면 다음 시작시 해당 상태저장을 자동으로 불러옵니다." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "자동 상태 불러오기" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, "시작시 자동으로 상태저장 파일을 불러옵니다." @@ -2474,10 +2564,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, "상태저장 미리보기" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "메뉴에 상태저장 미리보기를 보입니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE, "저장 파일을 컨텐츠 폴더에 저장" @@ -2560,22 +2646,10 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "숨겨진 파일 및 폴더 표시" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "파일 탐색기에 숨김 파일/폴더를 보입니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "알 수 없는 확장자 숨김" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "지원되는 확장자 기준으로 파일 탐색기에 표시합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "내장 미디어 플레이어 사용" @@ -2605,7 +2679,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "최대 실행 속도" + "빨리 감기 비율" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, @@ -2613,11 +2687,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "슬로우 모션 비율" + "슬로모션 비율" ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "슬로우 모션 일 때 콘텐츠가 지정된 수치 만큼 느려집니다." + "슬로모션을 사용할 때 컨텐츠를 느려지게 할 비율입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2634,18 +2708,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "뒤로 감기 사용" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "실수했나요? 뒤로 감아 다시 해보세요.\n사용시 퍼포먼스 저하가 발생합니다." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "뒤로 감기 세부제어" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "뒤로 감는데 사용하는 프레임 수입니다. 한 번에 여러 프레임을 되감기 하여 속도를 올릴 수 있습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, "뒤로 감기 버퍼 크기 (MB)" @@ -2692,14 +2754,6 @@ MSG_HASH( /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "녹화 품질" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "사용자 녹화 설정" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, "녹화 스레드" @@ -2710,7 +2764,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_POST_FILTER_RECORD, - "필터가 적용된 이미지를 캡처합니다(쉐이더는 제외). 화면상에 보이는 것 그대로 멋지게 적용됩니다." + "필터가 적용된 이미지를 캡처합니다(셰이더는 제외). 화면상에 보이는 것 그대로 멋지게 저장됩니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD, @@ -2718,28 +2772,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_GPU_RECORD, - "가능할 시 GPU 쉐이더 처리된 출력을 녹화합니다." + "가능한 경우 GPU에서 셰이더 처리된 화면을 녹화합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "방송 모드" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "방송 품질" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, - "사용자 방송 설정" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "방송 제목" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "방송 URL" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, "UDP 스트림 포트" @@ -2814,6 +2852,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, "온스크린 오버레이 사용 중 마우스 커서를 보여줍니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_AUTO_ROTATE, + "오버레이 자동 회전" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_OVERLAY_AUTO_ROTATE, + "오버레이가 회전을 지원할 경우 오버레이를 자동 회전하여 화면에 맞춥니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY, "오버레이" @@ -2847,6 +2893,8 @@ MSG_HASH( "오버레이에 사용할 전체 UI 구성요소의 크기를 설정합니다." ) + + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -2884,18 +2932,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, "온스크린 메시지를 표시합니다." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "이전 문자 위주의 시스템 텍스트 대신 모던하고 세련된 애니메이션, 알림, 표시 및 컨트롤을 사용합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "FPS 표시" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "화면에 현재 FPS를 표시합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, "프레임레이트 업데이트 주기 (프레임)" @@ -2920,22 +2960,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "화면에 표시되는 고급 사용자용 통계를 표시합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "메모리 세부정보 포함" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "FPS와 함께 현재 메모리 사용량을 표시합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "OSD 알림 폰트" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "온스크린 알림에 사용할 폰트를 선택합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "OSD 알림 크기" @@ -2995,14 +3023,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "보기" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "메뉴 화면에 항목을 표시하거나 숨깁니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "메뉴" @@ -3015,10 +3035,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "고급 설정 보임" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "파워 유저를 위한 고급 설정을 보여줍니다(기본값은 숨김)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "키오스크 모드 활성화" @@ -3043,10 +3059,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "가로 또는 세로 목록의 끝에 도달하면 시작 또는 끝으로 이어서 연결합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "메뉴 실행 시 일시정지" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "사용하지 않으면 RetroArch 메뉴 호출시에도 컨텐츠가 백그라운드에서 계속 실행됩니다." @@ -3055,26 +3067,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, "상태저장 후 컨텐츠 이어하기" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "빠른 메뉴에서 '상태저장' 또는 '상태저장 불러오기' 실행 후 자동으로 메뉴를 닫고 현재 컨텐츠를 이어합니다. 해제시 느린 기기에서 상태저장 성능을 개선 할 수 있습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "마우스 지원" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "메뉴에서 마우스 사용을 설정합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "터치 지원" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "메뉴에서 터치 컨트롤 사용을 설정합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "다중 스레드 작업" @@ -3083,10 +3083,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "분할된 스레드에서 작업을 수행합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "배경에서 실행하지 않음" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "RetroArch가 활성 창이 아닐 때 게임 플레이를 일시 중지합니다." @@ -3099,26 +3095,22 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DISABLE_COMPOSITION, "데스크탑 구성요소를 활성화 또는 비활성화합니다. (Windows에만 해당)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SCROLL_FAST, + "메뉴 스크롤 가속" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SCROLL_FAST, + "한 방향으로 스크롤할 때 커서의 최대 속도를 설정합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "UI 컴패니언 사용" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "부팅시 UI 컴패니언 실행" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "메뉴바" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "데스크탑 메뉴 (재시작)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "시작시 데스크탑 메뉴 표시" - ) /* Settings > User Interface > Views */ @@ -3126,18 +3118,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "빠른 메뉴" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "빠른 메뉴의 컨텐츠를 표시/해제합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "설정" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "설정화면 항목을 표시/해제합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "코어 불러오기 설정 표시" @@ -3178,6 +3162,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, "온라인 업데이트 설정란을 표시/해제합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER, + "코어 다운로더 표시" + ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, "업데이트 가능한 코어와 코어 정보 파일을 표시/해제합니다." @@ -3238,10 +3226,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "메인 메뉴에 설정 탭을 보입니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "'설정 탭 표시'란에 비밀번호 설정" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "설정 탭을 숨길 때 비밀번호를 설정해 나중에 되돌릴 수 있게 끔 합니다. 메인 메뉴에서 '설정 탭 표시'를 선택 후 비밀번호를 입력해 되돌릴 수 있습니다." @@ -3346,10 +3330,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "메뉴 보조 설명 보이기" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "선택된 메뉴 항목의 추가 정보를 보여줍니다." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "시작 화면 표시" @@ -3475,11 +3455,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, - "쉐이더 표시" + "셰이더 표시" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, - "쉐이더 설정란을 표시/해제합니다." + "셰이더 항목을 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND, @@ -3554,7 +3534,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS, - "'드라이버 설정'을 설정화면에 표시/해제합니다." + "'드라이버' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO, @@ -3562,7 +3542,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_VIDEO, - "'비디오 설정'을 설정화면에 표시/해제합니다." + "'비디오' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO, @@ -3570,7 +3550,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AUDIO, - "'오디오 설정'을 설정화면에 표시/해제합니다." + "'오디오' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT, @@ -3578,7 +3558,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT, - "'입력 설정'을 설정 화면에 표시/해제합니다." + "'입력' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY, @@ -3586,7 +3566,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LATENCY, - "'지연시간 설정'을 설정화면에 표시/해제합니다." + "'지연시간' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE, @@ -3594,7 +3574,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CORE, - "'코어 설정'을 설정화면에 표시/해제합니다." + "'코어' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CONFIGURATION, @@ -3602,7 +3582,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CONFIGURATION, - "'환경설정'을 설정화면에 표시/해제합니다." + "'환경설정' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_SAVING, @@ -3610,7 +3590,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_SAVING, - "'저장 설정'을 설정화면에 표시/해제합니다." + "'저장' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LOGGING, @@ -3618,7 +3598,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LOGGING, - "'로그 설정'을 설정화면에 표시/해제합니다." + "'로그' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_FRAME_THROTTLE, @@ -3626,7 +3606,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_FRAME_THROTTLE, - "'프레임 조절 설정'을 설정화면에 표시/해제합니다." + "'프레임 조절' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING, @@ -3634,7 +3614,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_RECORDING, - "'녹화 설정'을 설정화면에 표시/해제합니다." + "'녹화' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ONSCREEN_DISPLAY, @@ -3642,7 +3622,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY, - "'OSD 설정'을 설정화면에 표시/해제합니다." + "'OSD 설정' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER_INTERFACE, @@ -3650,7 +3630,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER_INTERFACE, - "'사용자 인터페이스 설정'을 설정화면에 표시/해제합니다." + "'사용자 인터페이스' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AI_SERVICE, @@ -3658,7 +3638,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AI_SERVICE, - "'AI 서비스 설정'을 설정화면에 표시/해제합니다." + "'AI 서비스' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_POWER_MANAGEMENT, @@ -3666,7 +3646,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_POWER_MANAGEMENT, - "'전력 관리 설정'을 설정화면에 표시/해제합니다." + "'전력 관리' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ACHIEVEMENTS, @@ -3674,7 +3654,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ACHIEVEMENTS, - "'도전과제 설정'을 설정화면에 표시/해제합니다." + "'도전과제' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK, @@ -3682,7 +3662,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_NETWORK, - "'네트워크 설정'을 설정화면에 표시/해제합니다." + "'네트워크' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_PLAYLISTS, @@ -3690,7 +3670,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_PLAYLISTS, - "'실행목록 설정'을 설정화면에 표시/해제합니다." + "'실행목록' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER, @@ -3698,7 +3678,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER, - "'사용자 설정'을 설정화면에 표시/해제합니다." + "'사용자' 옵션을 설정화면에 표시/해제합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY, @@ -3706,31 +3686,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DIRECTORY, - "'디렉토리 설정'을 설정화면에 표시/해제합니다." + "'디렉토리' 설정을 설정화면에 표시/해제합니다." ) /* Settings > User Interface > Appearance */ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, - "메뉴 크기 요소" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "배경" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "메뉴 배경으로 사용할 이미지를 선택하십시오." + "메뉴 크기 배율" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "배경 투명도" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "배경화면의 투명도 변경합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "프레임 버퍼 불투명도" @@ -3767,26 +3735,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, "한 줄 텍스트 애니메이션" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "긴 메뉴 텍스트 항목을 표시하는데 사용할 가로 스크롤 방식을 선택합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, "한 줄 텍스트 속도" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "긴 메뉴 항목 스크롤시 사용할 애니메이션 속도입니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, "부드러운 한 줄 텍스트" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "긴 메뉴 텍스트등을 표시할때 부드럽게 스크롤합니다. 성능에 작은 영향을 줄 수 있습니다." - ) /* Settings > AI Service */ @@ -3794,6 +3750,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_MODE, "AI 서비스 출력" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, + "번역 결과를 텍스트 오버레이로 표시(이미지 모드)하거나, TTS로 읽어줍니다(음성 모드)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL, "AI 서비스 URL" @@ -3810,6 +3770,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, "AI 서비스 핫키가 눌러지면 AI 서비스를 실행합니다." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, + "화면이 번역되는 동안 코어를 일시정지합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SOURCE_LANG, "원본 언어" @@ -3829,6 +3793,22 @@ MSG_HASH( /* Settings > Accessibility */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, + "접근성 기능 사용" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, + "메뉴 탐색을 위한 TTS 기능을 사용합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "TTS 말하기 속도" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, + "TTS의 말하는 속도를 조정합니다." + ) /* Settings > Power Management */ @@ -3838,10 +3818,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "도전과제 사용" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "고전 게임에서 도전과제를 획득하십시오.\n자세한 정보는 http://retroachievements.org 에서 확인하세요." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "도전과제 하드코어 모드" @@ -3854,10 +3830,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "리더보드" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "게임별 리더보드입니다.\n하드코어 모드가 비활성 상태일 시 아무런 영향을 주지 않습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE, "도전과제 뱃지" @@ -3886,10 +3858,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, "자동 스크린샷 저장" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "도전과제 달성 시 자동으로 스크린샷을 저장합니다." - ) /* Settings > Network */ @@ -3937,58 +3905,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "서버 비밀번호" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "넷플레이 호스트에 연결하기 위한 비밀번호를 설정합니다. 호스트 모드에서만 사용됩니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "서버 관전 전용 비밀번호" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "관전 권한만 있는 넷플레이 호스트에 연결하기 위한 비밀번호입니다. 호스트 모드에서만 사용됩니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "넷플레이 관전 모드" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "넷플레이를 관전 모드로 실행할지 선택합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "슬레이브 모드 클라이언트 허용" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "슬레이브 모드 연결을 허용할지 여부를 선택합니다. 슬레이브 모드 클라이언트는 양측에 처리능력이 거의 필요하지 않지만 네트워크 지연을 겪을 수 있습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "비 슬레이브 모드 클라이언트 차단" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "슬레이브 모드가 아닌 연결을 허용하지 않을지 여부를 선택합니다. 낮은 성능의 컴퓨터에 매우 빠른 네트워크를 제외하고는 권장하지 않습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "넷플레이 상태저장금지 모드" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "상태저장이 필요 없는 모드로 넷플레이를 실행할지 여부를 선택합니다. 설정할 경우 빠른 네트워크가 필요하지만 되감기가 불가능하여 넷플레이 지터는 발생하지 않습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "넷플레이 프레임 체크" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "넷플레이가 호스트와 클라이언트가 동기화 중인지 확인하는 프레임의 빈도를 설정합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "입력 대기 프레임" @@ -4033,18 +3973,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "네트워크 명령 포트" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "네트워크 게임패드" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "네트워크 원격 기본 포트" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "사용자 %d 원격 사용" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdin 명령" @@ -4057,10 +3985,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "주문형 미리보기 다운로드" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "실행 목록을 보는 동안 부족한 미리보기를 자동으로 다운로드합니다. 퍼포먼스에 큰 영향을 줄 수 있습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "업데이트" @@ -4095,10 +4019,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "최근 실행목록 사용" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "게임, 이미지, 음악 및 비디오의 최근 실행 목록을 활성화 또는 비활성화합니다." @@ -4111,10 +4031,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "게임, 이미지, 음악 및 비디오의 최근 실행 목록 항목 수를 제한합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "즐겨찾기 목록 크기" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, "즐겨찾기 목록의 항목 수를 제한합니다. 제한 수량을 채우면 이전 목록을 삭제하기 전까지 추가 저장이 제한됩니다. 설정값을 -1로 하면 '무제한'(99999)으로 설정됩니다. 경고: 값을 줄이면 기존 항목이 삭제 될 수 있음!" @@ -4139,10 +4055,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, "실행목록 알파벳 순서로 정렬" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "실행목록 컨텐츠를 알파벳 순서로 정렬합니다. 최근 사용된 게임, 이미지, 음악, 비디오 등이 표시되는 '기록' 실행목록은 제외되는 점 참고하세요." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, "이전 형식으로 실행목록 저장" @@ -4167,10 +4079,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "코어:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "실행 시간:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "최근 실행:" @@ -4199,14 +4107,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, "해제할 경우 설치된 코어가 지원되는 확장자만 실행목록에 추가됩니다. 설정하면 상관없이 추가됩니다. 스캐닝 이후에 코어를 설치할때 사용합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "실행목록 관리" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "선택된 실행목록의 관리 작업을 수행합니다(예: 기본 코어 연결 설정/초기화 등)." - ) /* Settings > Playlists > Playlist Management */ @@ -4234,10 +4134,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE, "컨텐츠 라벨이 실행목록에서 표시되는 방법을 변경합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, + "실행목록 정리" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "재생목록 삭제" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DELETE_PLAYLIST, + "재생목록을 파일 시스템에서 삭제합니다." + ) /* Settings > User */ @@ -4269,10 +4177,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "언어" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "인터페이스 언어를 설정합니다." - ) /* Settings > User > Privacy */ @@ -4307,10 +4211,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, "레트로 도전과제" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "레트로 도전과제 서비스. 자세한 정보는 http://retroachievements.org를 찾아주세요." - ) /* Settings > User > Accounts > RetroAchievements */ @@ -4318,10 +4218,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "사용자 이름" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "레트로 도전과제 계정의 사용자 이름을 입력합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "비밀번호" @@ -4369,7 +4265,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "이 위치에서 메뉴 인터페이스가 애셋 등을 찾을 경우 기본적으로 확인하게 됩니다." + "RetroArch가 사용하는 메뉴 애셋이 저장되는 디렉토리입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -4391,10 +4287,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "파일 탐색기" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "파일 탐색기의 시작 디렉토리를 설정합니다." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "설정" @@ -4461,11 +4353,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DIR, - "비디오 쉐이더" + "비디오 셰이더" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_DIR, - "쉬운 접근을 위해 GPU기반 비디오 쉐이더가 저장될 디렉토리 정의합니다." + "쉬운 접근을 위해 GPU기반 비디오 셰이더가 저장될 디렉토리 정의합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_OUTPUT_DIRECTORY, @@ -4481,7 +4373,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "녹화 설정이 이곳에 저장됩니다." + "녹화 설정이 저장되는 디렉토리입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, @@ -4489,7 +4381,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "쉬운 접근을 위해 오버레이가 저장된 디렉토리를 정의합니다." + "오버레이가 저장되는 디렉토리입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, @@ -4513,7 +4405,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "조이패드가 연결되면 해당 디렉토리에 설정 파일이 있는 경우 자동으로 구성해줍니다." + "컨트롤러를 자동으로 구성하는 프로필을 저장하는 디렉토리입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, @@ -4521,7 +4413,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "모든 입력설정 파일이 이 디렉토리에 저장됩니다." + "입력설정 파일이 저장되는 디렉토리입니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, @@ -4595,6 +4487,10 @@ MSG_HASH( /* Netplay */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETWORK_HOSTING_SETTINGS, + "넷플레이 호스트" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ENABLE_CLIENT, "넷플레이 호스트 연결" @@ -4611,14 +4507,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "활성 중인 모든 넷플레이 연결을 해제합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "새로 고침" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "새 호스트를 검색합니다." - ) /* Netplay > Host */ @@ -4657,6 +4545,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_FILE, "파일에서 데이터베이스에 일치하는 컨텐츠를 검색합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_LIST, + "수동 검색" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_LIST, + "파일 이름을 기준으로 하는 설정 가능한 검색입니다. 컨텐츠가 데이터베이스와 일치하지 않아도 됩니다." + ) /* Import content > Scan File */ @@ -4672,8 +4568,68 @@ MSG_HASH( /* Import content > Manual Scan */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "코어" + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DIR, + "컨텐츠 디렉토리" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DIR, + "컨텐츠를 검색할 디렉토리입니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME, + "시스템 이름" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME, + "검색된 컨텐츠를 분류할 '시스템 이름'입니다. 생성될 실행목록의 이름과 미리보기를 찾는 데 사용됩니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, + "사용자 정의 시스템 이름" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, + "검색된 컨텐츠의 '시스템 이름'을 직접 지정합니다. '시스템 이름'이 '<사용자 정의>'일 때만 사용됩니다." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, + "검색된 컨텐츠를 실행할 기본 코어를 선택합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, + "파일 확장자" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, + "압축파일 내 검색" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, + "사용할 경우, 압축 파일(.zip, .7z 등) 속의 파일들도 모두 검색합니다. 검색 성능에 큰 영향을 줄 수 있습니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE, + "아케이드 DAT 파일" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE, + "Logiqx 또는 MAME 리스트 XML DAT 파일을 선택하여 검색되는 아케이드 컨텐츠(MAME, FinalBurn Neo 등)의 이름을 자동으로 정할 수 있습니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_OVERWRITE, + "실행목록 덮어쓰기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_OVERWRITE, + "사용할 경우, 컨텐츠를 검색하기 전 이미 존재하는 실행목록은 삭제됩니다. 그렇지 않을 경우, 이미 존재하는 실행목록은 유지되고 실행목록에 없는 새 항목만 실행목록에 추가됩니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_START, + "검색 시작" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_START, + "선택한 컨텐츠 검색을 시작합니다." ) /* Playlist > Playlist Item */ @@ -4737,10 +4693,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "현재 코어" - ) /* Playlist Item > Information */ @@ -4913,11 +4865,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS, - "쉐이더" + "셰이더" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHADER_OPTIONS, - "화면에 시각적으로 더해질 쉐이더를 설정합니다." + "화면에 시각적으로 더해질 셰이더를 설정합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_OVERRIDE_OPTIONS, @@ -4989,11 +4941,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD, - "치트 파일 불러오기" + "치트 파일 불러오기 (교체)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD, - "치트파일을 불러옵니다." + "치트 파일을 불러옵니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD_APPEND, @@ -5001,7 +4953,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD_APPEND, - "치트파일을 불러오고 기존 치트에 병합합니다." + "치트 파일을 불러오고 기존 치트에 병합합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RELOAD_CHEATS, @@ -5015,18 +4967,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "현재 치트를 세이브 파일로 저장합니다." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "새 코드를 가장 위에 추가" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "새 코드를 가장 아래에 추가" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "전체 코드 삭제" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, "게임 불러오는 동안 자동으로 치트 적용" @@ -5067,17 +5007,13 @@ MSG_HASH( "좌/우로 bit 사이즈를 변경하세요" ) MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "빅 엔디안일 때: 258 = 0x0102,\n리틀 엔디안일 때: 258 = 0x0201" + MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, + "빅 엔디안" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "메모리에서 값 검색" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "좌/우로 값을 변경하세요" - ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "%u 동일값(%X)" @@ -5239,26 +5175,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "반복 횟수" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "치트가 적용되는 횟수입니다.\n메모리의 많은 영역에 적용하려면 다른 두 반복 옵션과 함께 사용하십시오." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "반복 시 주소 증가" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "반복 회수 마다 메모리 검색 사이즈에 지정한 숫자만큼 메모리 주소를 증가시킵니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "반복 시 증가 값" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "반복 회수 마다 지정된 크기만큼 값을 증가시킵니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, "메모리 있을 시 진동" @@ -5307,10 +5231,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, "현재 치트를 앞으로 복사" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "현재 치트 삭제" - ) /* Quick Menu > Disc Control */ @@ -5331,23 +5251,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADERS_ENABLE, - "비디오 쉐이더" + "비디오 셰이더" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, - "쉐이더 파일 변경 확인" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "디스크상의 쉐이더 파일 변경을 자동으로 적용합니다." + "셰이더 파일 변경 확인" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, - "쉐이더 프리셋 불러오기" + "셰이더 프리셋 불러오기" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET, - "쉐이더 프리셋을 불러옵니다. 쉐이더 파이프라인이 자동으로 설정됩니다." + "셰이더 프리셋을 불러옵니다. 셰이더 파이프라인이 자동으로 설정됩니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE, @@ -5355,7 +5271,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE, - "현재 쉐이서 프리셋을 저장합니다." + "현재 셰이더 프리셋을 저장합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE, @@ -5363,7 +5279,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_REMOVE, - "특정 형식의 쉐이더 프리셋을 제거합니다." + "자동 셰이더 프리셋을 제거합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_APPLY_CHANGES, @@ -5371,27 +5287,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHADER_APPLY_CHANGES, - "쉐이더 설정의 변경사항은 즉시 적용됩니다. 쉐이더 패스 및 필터링, FBO등 많은 부분을 변경했을 시 적용합니다." + "셰이더 설정의 변경사항이 즉시 적용됩니다. 이 설정은 셰이더 패스, 필터링, FBO 배율 등을 변경했을 경우에 사용하십시오." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS, - "쉐이더 매개변수 미리보기" + "셰이더 매개변수 미리보기" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS, - "현재 쉐이더를 직접 변경합니다. 변경사항이 프리셋 파일로 저장되진 않습니다." + "현재 셰이더를 직접 변경합니다. 변경사항이 프리셋 파일로 저장되지는 않습니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, - "쉐이더 패스" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "쉐이더 파이프라인 패스를 감소 또는 증가시킵니다. 각각의 쉐이더를 파이프라인에 연결하고 크기 및 필터링을 변경할 수 있습니다." + "셰이더 패스" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, - "쉐이더" + "셰이더" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FILTER, @@ -5406,50 +5318,42 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_AS, - "쉐이더 프리셋 다른 이름으로 저장" + "셰이더 프리셋 다른 이름으로 저장" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_AS, - "현재 쉐이더 설정을 새로운 프리셋으로 저장합니다." + "현재 셰이더 설정을 새로운 프리셋으로 저장합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GLOBAL, - "광역 설정 저장" + "전역 설정 저장" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GLOBAL, - "현재 쉐이더 설정을 기본 광역 설정으로 저장합니다." + "현재 셰이더 설정을 기본 전역 설정으로 저장합니다." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "코어 프리셋 저장" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "현재 쉐이더 설정을 현재 앱/코어의 기본 값으로 저장합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "컨텐츠 폴더 프리셋 저장" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "현재의 쉐이더 설정을 컨텐츠가 있는 폴더의 모든 파일에 기본 설정으로 저장합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "게임 프리셋 저장" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_GAME, - "현재 쉐이더 설정을 컨텐츠의 기본 값으로 저장합니다." + "현재 셰이더 설정을 컨텐츠의 기본 값으로 저장합니다." ) /* Quick Menu > Shaders > Remove */ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PRESETS_FOUND, - "자동 쉐이더 프리셋 찾지 못함." + "자동 셰이더 프리셋 찾지 못함" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_REMOVE_GLOBAL, @@ -5488,7 +5392,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SHADER_PARAMETERS, - "쉐이더 매개변수 없음." + "셰이더 매개변수 없음" ) /* Quick Menu > Overrides */ @@ -5669,6 +5573,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_AVERAGE, "중간" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NONE, + "없음" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NO_PREFERENCE, "선호항목 없음" @@ -5689,6 +5597,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_SPEECH_MODE, "음성 모드" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_NARRATOR_MODE, + "나레이터 모드" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV, "최근 실행 & 즐겨찾기" @@ -5733,10 +5645,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "방전 중" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "없음" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<현재 디렉토리 사용>" @@ -5762,8 +5670,12 @@ MSG_HASH( "Retro패드" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "Retro패드 아날로그" + MENU_ENUM_LABEL_VALUE_NONE, + "없음" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UNKNOWN, + "알 수 없음" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, @@ -5885,6 +5797,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_DEFAULT, "시스템 기본" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_ALPHABETICAL, + "알파벳순" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE_OFF, + "없음" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LABEL_DISPLAY_MODE_DEFAULT, "전체 라벨 표시" @@ -5933,6 +5853,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SCROLL_NORMAL, "보통" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SCROLL_FAST, + "빠르게" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ON, "켬" @@ -5949,6 +5873,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO, "아니오" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_TRUE, + "참" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FALSE, + "거짓" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ENABLED, "사용" @@ -5973,6 +5905,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE, "하드코어" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNOFFICIAL_ENTRY, + "비공식" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNSUPPORTED_ENTRY, + "지원 안 됨" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DONT_CARE, "상관없음" @@ -5985,6 +5925,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NEAREST, "근접" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CONTENT_DIR, + "<컨텐츠 디렉토리>" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SYSTEM_NAME_USE_CUSTOM, + "<사용자 정의>" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME_DETECT, + "<지정 안 함>" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_ANALOG, "좌 아날로그" @@ -6017,22 +5969,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "마우스 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "마우스 휠 스크롤 업" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "마우스 휠 스크롤 다운" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "마우스 휠 스크롤 왼쪽" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "마우스 휠 스크롤 오른쪽" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "일찍" @@ -6486,13 +6422,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "아이콘 그림자 사용" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "모든 아이콘에 그림자를 사용합니다.\n퍼포먼스에 약간의 영향을 줄 수 있습니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, - "메뉴 쉐이더 파이프라인" + "메뉴 셰이더 파이프라인" ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_RIBBON_ENABLE, @@ -6526,10 +6458,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "설정 탭 표시" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "설정 탭을 표시/해제합니다. 다시 표시하기 위해 재시작이 필요합니다." - ) /* XMB: Settings Options */ @@ -6537,10 +6465,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "리본" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "리본 (단순화)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "눈 (단순화)" @@ -6668,10 +6592,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, "실행목록 이름 단축" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "사용할 경우 실행목록 상의 시스템 이름을 숨김니다. 예를 들면 'Sony - PlayStation' 대신에 'PlayStation'으로 표시됩니다. 변경사항을 적용하려면 재시작해야 합니다." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "메뉴 테마 색상" @@ -6701,8 +6621,12 @@ MSG_HASH( "두 번째 미리보기" ) MSG_HASH( - MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, - "다른 미리보기로 컨텐츠 메타데이터 패널을 변경합니다." + MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, + "컨텐츠 메타데이터 한 줄로 표시" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OZONE_SCROLL_CONTENT_METADATA, + "사용할 경우, 오른쪽 사이드바에 표시되는 컨텐츠 메타데이터(코어, 실행 시간 등)를 항목당 한 줄씩으로 표시합니다. 사이드바 너비를 초과하는 길이의 문구는 스크롤됩니다. 사용하지 않을 경우, 컨텐츠 메타데이터는 필요한 만큼 줄 수를 늘려가며 정적으로 표시됩니다." ) /* MaterialUI: Settings > User Interface > Appearance */ @@ -6715,6 +6639,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, "메뉴 항목에 왼쪽에 표시되는 메뉴 아이콘들을 표시/해제합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, + "가로 레이아웃 최적화" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, + "화면을 가로로 사용할 경우 메뉴 레이아웃을 보기 좋게 자동으로 조정합니다." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, + "화면을 가로로 사용할 경우 내비게이션 바를 오른쪽에 표시합니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME, "메뉴 테마 색상" @@ -6723,6 +6659,58 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME, "배경색 그라데이션 테마를 선택합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIMATION, + "메뉴 전환 애니메이션" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_TRANSITION_ANIMATION, + "메뉴 사이를 전환할 때 부드러운 전환 효과를 위한 애니메이션을 사용합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT, + "세로 화면 미리보기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_PORTRAIT, + "세로 화면에서 미리보기를 표시할 방식을 지정합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE, + "가로 화면 미리보기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_MENU_THUMBNAIL_VIEW_LANDSCAPE, + "가로 화면에서 미리보기를 표시할 방식을 지정합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, + "목록에 두 번째 미리보기 표시" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, + "미리보기에 배경 추가" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, + "미리보기 테두리에 단색의 테두리 배경을 추가합니다. 미리보기를 항상 일정한 크기로 표시하여 미리보기의 크기 또는 비율이 일정하지 않더라도 일관된 모습을 유지합니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THUMBNAILS_MATERIALUI, + "첫 번째 미리보기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_THUMBNAILS_MATERIALUI, + "실행목록의 각 항목을 나타낼 주 미리보기의 종류입니다. 컨텐츠의 아이콘으로 사용됩니다." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_MATERIALUI, + "두 번째 미리보기" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_MATERIALUI, + "실행목록의 각 항목을 나타낼 보조 미리보기의 종류입니다. 실행목록의 미리보기 형식에 따라 용도가 결정됩니다." + ) /* MaterialUI: Settings Options */ @@ -6770,6 +6758,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_AUTO, "자동" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_FADE, + "페이드" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_SLIDE, + "슬라이드" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_NONE, "끔" @@ -6778,10 +6774,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_DISABLED, "끔" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_SMALL, + "목록 (작게)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_PORTRAIT_LIST_MEDIUM, + "목록 (보통)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DISABLED, "끔" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_SMALL, + "목록 (작게)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_MEDIUM, + "목록 (보통)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_LARGE, + "목록 (크게)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DESKTOP, + "데스크탑" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_DISABLED, "끔" @@ -6831,7 +6851,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_SHADER_PARAMS, - "쉐이더 매개변수" + "셰이더 매개변수" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MENU_VIEW_OPTIONS, @@ -7207,7 +7227,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_CURRENT_SHADER, - "현재 쉐이더" + "현재 셰이더" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_MOVE_DOWN, @@ -7247,7 +7267,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_SHADER_NO_PASSES, - "쉐이더 패스 없음." + "셰이더 패스 없음." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QT_RESET_PASS, @@ -7364,10 +7384,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY, "최근 컨텐츠 불러오기" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_CONTENT_HISTORY, + "최근 실행 재생목록에서 컨텐츠를 불러옵니다." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MULTIMEDIA_SETTINGS, "멀티미디어" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SUBSYSTEM_SETTINGS, + "서브시스템" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETPLAY_HOSTS_FOUND, "넷플레이 호스트 찾지 못함." @@ -7428,10 +7456,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_KEYBOARD, "키보드" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "내장 이미지 뷰어 사용" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "최대 스왑체인 이미지" @@ -7442,11 +7466,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_PARAMETERS, - "현재 메뉴상에서 사용되는 쉐이더를 변경합니다." + "현재 메뉴상에서 사용되는 셰이더를 변경합니다." ) MSG_HASH( MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_TWO, - "쉐이더 프리셋" + "셰이더 프리셋" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST, @@ -7468,6 +7492,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_COMPAT_CONTENT_FOUND, "호환 가능한 컨텐츠 발견" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_START_GONG, + "Gong 시작" + ) /* Unused (Only Exist in Translation Files) */ @@ -7475,10 +7503,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "자동 화면비" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "사용자 (랜): %s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "상태" @@ -7583,10 +7607,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "오디오/비디오 문제해결" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "가상 게임패드 오버레이 변경" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "컨텐츠 불러오기" @@ -7788,7 +7808,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FBO_SUPPORT, - "OpenGL/Direct3D 텍스처 렌더링(멀티패스 쉐이더) 지원" + "OpenGL/Direct3D 텍스처 렌더링(멀티패스 셰이더) 지원" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_DIR, @@ -7936,6 +7956,14 @@ MSG_HASH( MSG_FILE_ALREADY_EXISTS_SAVING_TO_BACKUP_BUFFER, "파일이 이미 존재합니다. 백업 버퍼에 저장합니다" ) +MSG_HASH( + MSG_GOT_CONNECTION_FROM, + "다음에서 연결: \"%s\"" + ) +MSG_HASH( + MSG_GOT_CONNECTION_FROM_NAME, + "다음에서 연결: \"%s (%s)\"" + ) MSG_HASH( MSG_PUBLIC_ADDRESS, "공개 주소" @@ -7944,10 +7972,6 @@ MSG_HASH( MSG_UPNP_FAILED, "포트 맵핑 실패" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "제공되는 인수 및 메뉴, 도움말이 없습니다..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "디스크 트레이 설정" @@ -8020,6 +8044,10 @@ MSG_HASH( MSG_NETPLAY_INCORRECT_PASSWORD, "잘못된 비밀번호" ) +MSG_HASH( + MSG_NETPLAY_SERVER_NAMED_HANGUP, + "\"%s\" 연결 끊김" + ) MSG_HASH( MSG_NETPLAY_SERVER_HANGUP, "넷플레이 클라이언트가 연결해제 되었습니다" @@ -8044,6 +8072,14 @@ MSG_HASH( MSG_NETPLAY_CANNOT_PLAY, "플레이 모드로 전환하지 못했습니다" ) +MSG_HASH( + MSG_NETPLAY_PEER_PAUSED, + "넷플레이 사용자 \"%s\" 일시정지됨" + ) +MSG_HASH( + MSG_NETPLAY_CHANGED_NICK, + "닉네임이 \"%s\"(으)로 변경됨" + ) MSG_HASH( MSG_AUDIO_VOLUME, "오디오 볼륨" @@ -8072,6 +8108,50 @@ MSG_HASH( MSG_CONNECTION_SLOT, "연결 슬롯" ) +MSG_HASH( + MSG_FETCHING_CORE_LIST, + "코어 목록을 읽어오는 중..." + ) +MSG_HASH( + MSG_CORE_LIST_FAILED, + "코어 목록을 읽어올 수 없습니다!" + ) +MSG_HASH( + MSG_LATEST_CORE_INSTALLED, + "이미 최신 버전이 설치됨: " + ) +MSG_HASH( + MSG_UPDATING_CORE, + "코어 업데이트 중: " + ) +MSG_HASH( + MSG_DOWNLOADING_CORE, + "코어 다운로드 중: " + ) +MSG_HASH( + MSG_EXTRACTING_CORE, + "코어 압축해제 중: " + ) +MSG_HASH( + MSG_CORE_INSTALLED, + "코어 설치됨: " + ) +MSG_HASH( + MSG_SCANNING_CORES, + "코어 탐색 중..." + ) +MSG_HASH( + MSG_CHECKING_CORE, + "코어 확인 중: " + ) +MSG_HASH( + MSG_ALL_CORES_UPDATED, + "모든 코어가 최신 버전입니다" + ) +MSG_HASH( + MSG_NUM_CORES_UPDATED, + "코어 업데이트됨: " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "코어 초기화 중: " @@ -8110,7 +8190,7 @@ MSG_HASH( ) MSG_HASH( MSG_APPLYING_SHADER, - "쉐이더 적용" + "셰이더 적용" ) MSG_HASH( MSG_AUDIO_MUTED, @@ -8144,6 +8224,10 @@ MSG_HASH( MSG_BRINGING_UP_COMMAND_INTERFACE_ON_PORT, "포트상의 명령 인터페이스 띄우기" ) +MSG_HASH( + MSG_BYTES, + "바이트" + ) MSG_HASH( MSG_CANNOT_INFER_NEW_CONFIG_PATH, "새 설정 경로를 파악할 수 없습니다. 현재 시간을 사용합니다." @@ -8294,7 +8378,7 @@ MSG_HASH( ) MSG_HASH( MSG_ERROR_SAVING_SHADER_PRESET, - "쉐이더 프리셋 저장 오류." + "셰이더 프리셋 저장 오류." ) MSG_HASH( MSG_EXTERNAL_APPLICATION_DIR, @@ -8326,11 +8410,11 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_APPLY_SHADER, - "쉐이더 적용 실패." + "셰이더 적용 실패." ) MSG_HASH( MSG_FAILED_TO_APPLY_SHADER_PRESET, - "쉐이더 프리셋을 적용하지 못했습니다:" + "셰이더 프리셋을 적용하지 못했습니다:" ) MSG_HASH( MSG_FAILED_TO_BIND_SOCKET, @@ -8486,7 +8570,7 @@ MSG_HASH( ) MSG_HASH( MSG_FOUND_SHADER, - "쉐이더 발견" + "셰이더 발견" ) MSG_HASH( MSG_FRAMES, @@ -8514,7 +8598,7 @@ MSG_HASH( ) MSG_HASH( MSG_HW_RENDERED_MUST_USE_POSTSHADED_RECORDING, - "Libretro 코어는 렌더링 된 하드웨어입니다. 쉐이드 후처리된 녹화를 사용하십시오." + "이 libretro 코어는 하드웨어 가속을 사용합니다. 셰이드 후처리된 녹화를 사용하십시오." ) MSG_HASH( MSG_INFLATED_CHECKSUM_DID_NOT_MATCH_CRC32, @@ -8710,7 +8794,7 @@ MSG_HASH( ) MSG_HASH( MSG_RESTORING_DEFAULT_SHADER_PRESET_TO, - "쉐이더: 기본 쉐이더 프리셋 복구-" + "셰이더: 기본 셰이더 프리셋 복구: " ) MSG_HASH( MSG_REVERTING_SAVEFILE_DIRECTORY_TO, @@ -8782,11 +8866,11 @@ MSG_HASH( ) MSG_HASH( MSG_SHADER, - "쉐이더" + "셰이더" ) MSG_HASH( MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, - "쉐이더 프리셋 저장 성공." + "셰이더 프리셋 저장 성공." ) MSG_HASH( MSG_SKIPPING_SRAM_LOAD, @@ -8860,6 +8944,10 @@ MSG_HASH( MSG_UNDOING_SAVE_STATE, "상태저장 되돌리기" ) +MSG_HASH( + MSG_UNKNOWN, + "알 수 없음" + ) MSG_HASH( MSG_UNPAUSED, "일시정지 해제." @@ -9122,16 +9210,48 @@ MSG_HASH( ) MSG_HASH( MSG_SHADER_PRESET_REMOVED_SUCCESSFULLY, - "쉐이더 프리셋이 성공적으로 삭제되었습니다." + "셰이더 프리셋이 성공적으로 삭제되었습니다." ) MSG_HASH( MSG_ERROR_REMOVING_SHADER_PRESET, - "쉐이더 프리셋 삭제 오류." + "셰이더 프리셋 삭제 오류." + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_DAT_FILE_INVALID, + "아케이드 DAT 파일이 올바르지 않습니다" + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_DAT_FILE_TOO_LARGE, + "선택된 아케이드 DAT 파일이 너무 큽니다 (메모리 부족)" + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_DAT_FILE_LOAD_ERROR, + "아케이드 DAT 파일을 불러올 수 없습니다 (올바르지 않은 형식?)" + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_INVALID_CONFIG, + "수동 검색 구성이 올바르지 않습니다" + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_INVALID_CONTENT, + "컨텐츠를 찾을 수 없습니다" + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_START, + "컨텐츠 검색 중: " ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "검색 중: " ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_M3U_CLEANUP, + "M3U 항목 정리 중: " + ) +MSG_HASH( + MSG_MANUAL_CONTENT_SCAN_END, + "검색 완료: " + ) /* Lakka */ @@ -9254,14 +9374,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "터치 사용" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "키보드 방식 게임패드 설정 사용" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "키보드 게임패드 설정 형식" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "작은 키보드 사용" @@ -9352,8 +9464,52 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SSH_ENABLE, "원격 명령줄의 접근 사용을 설정합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOCALAP_ENABLE, + "Wi-Fi 액세스 포인트" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOCALAP_ENABLE, + "Wi-Fi 액세스 포인트를 사용합니다." + ) +MSG_HASH( + MSG_LOCALAP_SWITCHING_OFF, + "Wi-Fi 액세스 포인트를 종료합니다." + ) +MSG_HASH( + MSG_WIFI_DISCONNECT_FROM, + "Wi-Fi '%s'에서 연결 해제됨" + ) +MSG_HASH( + MSG_LOCALAP_ALREADY_RUNNING, + "Wi-Fi 액세스 포인트가 이미 켜져 있습니다" + ) +MSG_HASH( + MSG_LOCALAP_NOT_RUNNING, + "Wi-Fi 액세스 포인트가 꺼져 있습니다" + ) +MSG_HASH( + MSG_LOCALAP_STARTING, + "Wi-Fi 액세스 포인트를 시작합니다. SSID=%s 암호=%s" + ) +MSG_HASH( + MSG_LOCALAP_ERROR_CONFIG_CREATE, + "Wi-Fi 액세스 포인트 설정 파일을 만들 수 없습니다." + ) +MSG_HASH( + MSG_LOCALAP_ERROR_CONFIG_PARSE, + "설정 파일이 잘못되었습니다 - %s에서 APNAME 또는 PASSWORD를 찾을 수 없습니다" + ) #endif #ifdef GEKKO +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_SCALE, + "마우스 배율" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MOUSE_SCALE, + "Wii 리모컨의 x/y 속도 배율을 조정합니다." + ) #endif #ifdef HAVE_ODROIDGO2 #else @@ -9375,6 +9531,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_3DS_DISPLAY_MODE, "3D 및 2D 화면 모드를 선택합니다. '3D' 모드에선 픽셀이 사각으로 표시되고 빠른 메뉴에 입체 효과가 적용됩니다. '2D' 모드는 최상의 퍼포먼스를 제공합니다." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_400X240, + "2D (픽셀 그리드 효과)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_800X240, + "2D (고해상도)" + ) #endif #ifdef HAVE_QT MSG_HASH( diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index b2e48257e1..c3111c8163 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -204,6 +204,10 @@ MSG_HASH( MENU_ENUM_LABEL_CAMERA_DRIVER, "camera_driver" ) +MSG_HASH( + MENU_ENUM_LABEL_BLUETOOTH_DRIVER, + "bluetooth_driver" + ) MSG_HASH( MENU_ENUM_LABEL_CB_CORE_CONTENT_DIRS_LIST, "cb_core_content_dirs_list" @@ -360,6 +364,10 @@ MSG_HASH( MENU_ENUM_LABEL_CHEEVOS_USERNAME, "cheevos_username" ) +MSG_HASH( + MENU_ENUM_LABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "cheevos_unlock_sound_enable" + ) MSG_HASH( MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE, "cheevos_verbose_enable" @@ -884,6 +892,10 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_SETTINGS_LIST, "deferred_onscreen_notifications_settings_list" ) +MSG_HASH( + MENU_ENUM_LABEL_DEFERRED_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS_LIST, + "deferred_onscreen_notifications_views_settings_list" + ) MSG_HASH( MENU_ENUM_LABEL_DEFERRED_PLAYLIST_SETTINGS_LIST, "deferred_playlist_settings" @@ -988,6 +1000,10 @@ MSG_HASH( MENU_ENUM_LABEL_DEFERRED_CRT_SWITCHRES_SETTINGS_LIST, "deferred_crt_switchres_settings_list" ) +MSG_HASH( + MENU_ENUM_LABEL_DEFERRED_BLUETOOTH_SETTINGS_LIST, + "deferred_bluetooth_settings_list" + ) MSG_HASH( MENU_ENUM_LABEL_DEFERRED_WIFI_SETTINGS_LIST, "deferred_wifi_settings_list" @@ -1080,6 +1096,12 @@ MSG_HASH( MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN, "dummy_on_core_shutdown" ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "always_reload_core_on_run_content" + ) +#endif MSG_HASH( MENU_ENUM_LABEL_DYNAMIC_WALLPAPER, "menu_dynamic_wallpaper_enable" @@ -1854,6 +1876,10 @@ MSG_HASH( MENU_ENUM_LABEL_NO_NETPLAY_HOSTS_FOUND, "no_netplay_hosts_found" ) +MSG_HASH( + MENU_ENUM_LABEL_NO_BT_DEVICES_FOUND, + "no_bt_devices_found" + ) MSG_HASH( MENU_ENUM_LABEL_NO_NETWORKS_FOUND, "no_networks_found" @@ -1906,6 +1932,10 @@ MSG_HASH( MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, "onscreen_notifications_settings" ) +MSG_HASH( + MENU_ENUM_LABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS, + "onscreen_notifications_views_settings" + ) MSG_HASH( MENU_ENUM_LABEL_OPEN_ARCHIVE, "open_archive" @@ -3214,6 +3244,10 @@ MSG_HASH( MENU_ENUM_LABEL_WIFI_SETTINGS, "wifi_settings" ) +MSG_HASH( + MENU_ENUM_LABEL_BLUETOOTH_SETTINGS, + "bluetooth_settings" + ) MSG_HASH( MENU_ENUM_LABEL_XMB_ALPHA_FACTOR, "xmb_alpha_factor" @@ -4278,6 +4312,34 @@ MSG_HASH( MENU_ENUM_LABEL_MENU_WIDGETS_ENABLE, "menu_widgets_enable" ) +MSG_HASH( + MENU_ENUM_LABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "menu_show_load_content_animation" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_AUTOCONFIG, + "notification_show_autoconfig" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_CHEATS_APPLIED, + "notification_show_cheats_applied" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_REMAP_LOAD, + "notification_show_remap_load" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, + "notification_show_config_override_load" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_SET_INITIAL_DISK, + "notification_show_set_initial_disk" + ) +MSG_HASH( + MENU_ENUM_LABEL_NOTIFICATION_SHOW_FAST_FORWARD, + "notification_show_fast_forward" + ) MSG_HASH( MENU_ENUM_LABEL_VIDEO_SHADERS_ENABLE, "video_shader_enable" diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 5ccfc078d7..833ee3386f 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -32,6 +32,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Muziek" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_TAB, + "Video 's" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, "Importeer inhoud" @@ -69,7 +73,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Laad een fysieke mediaschijf. U moet eerst de core (Core Laden) selecteren die u met de schijf wilt gebruiken." + "Laad een fysieke mediaschijf. Selecteer eerst de core (Core Laden) die u met de schijf wilt gebruiken." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -101,7 +105,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Opent het bureaubladmenu indien gesloten." + "Opent het traditionele bureaubladmenu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -109,7 +113,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Kioskmodus uitschakelen. Een herstart is vereist om de wijziging volledig door te voeren." + "Kioskmodus uitschakelen (Opnieuw opstarten vereist)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -182,13 +186,17 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, "Een Core Downloaden" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, + "Download en installeer een core van de online updater." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, "Installer of Herstel een Core" ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Installeer of Herstel een Core vanuit de downloads map." + "Installeer of herstel een core vanuit de 'Downloads' map." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -240,6 +248,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Afbeeldingen die eerder zijn bekeken, worden hier weergegeven." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, + "Video 's" + ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Video's die eerder zijn afgespeeld, worden hier weergegeven." @@ -269,7 +281,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Download individuele miniaturen voor elke invoer van de geselecteerde afspeellijst." + "Download miniaturen voor items in de geselecteerde afspeellijst." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -285,7 +297,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Update Autoconfiguratie Profielen" + "Controllerprofielen Bijwerken" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -421,6 +433,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Vereist" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "De Geïnstalleerde Core Vergrendelen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Voorkom wijziging van de huidige geïnstalleerde core. Kan worden gebruikt om ongewenste updates te voorkomen wanneer inhoud een specifieke core-versie vereist (bijv. Arcade ROM-sets)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Verwijder core" @@ -429,6 +449,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Verwijder deze core permanent." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Back-up Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Maak een gearchiveerde back-up van de momenteel geïnstalleerde core." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Back-up Herstellen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Installeer een eerdere versie van de core uit een lijst met gearchiveerde back-ups." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Back-up Verwijderen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Verwijder een bestand uit de lijst met gearchiveerde back-ups." + ) /* Main Menu > Information > System Information */ @@ -506,7 +550,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Network Gamepad ondersteuning" + "Ondersteuning voor Netwerkcontrollers" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -554,7 +598,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_THREADING_SUPPORT, - "Threading ondersteuning" + "Draad-ondersteuning" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_KMS_SUPPORT, @@ -1039,11 +1083,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Invoersstuurprogramma om te gebruiken. Afhankelijk van het videostuurprogramma, kan het een ander Invoersstuurprogramma afdwingen." + "Invoersstuurprogramma om te gebruiken. Sommige videostuurprogramma's dwingen een ander ingangsstuurprogramma af." ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Joypad-stuurprogramma om te gebruiken." + "Controllerstuurprogramma om te gebruiken." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DRIVER, @@ -1150,11 +1194,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_THREADED, - "Boomstructuur Video" + "Bedrade Video" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_THREADED, - "Verbetert prestaties ten kosten van latentie en meer video stotteringen. Gebruik dit enkel als het niet mogelijk is om full speed te bereiken zonder dit te activeren." + "Verbetert de prestaties ten koste van latentie en meer video-stotteren. Alleen gebruiken als u anders niet op volle snelheid kunt komen." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, @@ -1162,7 +1206,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Voegt een zwart frame tussen de frames in. Handig voor gebruikers met 120Hz-schermen die 60Hz-content willen afspelen om ghosting te elimineren." + "Voegt een zwart frame tussen frames in. Handig op sommige schermen met een hoge verversingssnelheid om het spookbeeld te elimineren." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1256,7 +1300,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE, - "Verticale refresh rate van je scherm. Wordt gebruikt om een toepasselijke audio input rate te calculeren. LET OP: Deze optie wordt genegeerd als 'Threaded Video' is ingeschakeld." + "Verticale verversingssnelheid van uw scherm. Wordt gebruikt om een geschikte audio-ingangssnelheid te berekenen.\nLET OP: Dit wordt genegeerd als 'Bedrade Video' is ingeschakeld." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, @@ -1389,7 +1433,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Aangepaste viewport offset gebruikt voor het definiëren van de X-as positie van de viewport. Deze worden genegeerd als 'Integer Schaal' is ingeschakeld. Het wordt dan automatisch gecentreerd." + "Aangepaste viewport offset gebruikt voor het definiëren van de X-as positie van de viewport. Deze worden genegeerd als 'Integer Schaal' is ingeschakeld." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1397,7 +1441,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Aangepaste viewport offset gebruikt voor het definiëren van de Y-as positie van de viewport. Deze worden genegeerd als 'Integer Schaal' is ingeschakeld. Het wordt dan automatisch gecentreerd." + "Aangepaste viewport offset gebruikt voor het definiëren van de Y-as positie van de viewport. Deze worden genegeerd als 'Integer Schaal' is ingeschakeld." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1421,7 +1465,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Snijdt een paar pixels af langs de randen van de afbeelding die gewoonlijk leeg zijn gelaten door ontwikkelaars die soms ook afvalpixels bevatten." + "Snijdt een paar pixels af langs de randen van de afbeelding die gewoonlijk leeg zijn gelaten door ontwikkelaars die soms ook afvalpixels bevatten. (Herstart Vereist)" ) /* Settings > Video > Synchronization */ @@ -1448,23 +1492,63 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "V-Sync is ingeschakeld totdat de prestaties onder de doelvernieuwingsfrequentie komen.\nDit kan stotteren tot een minimum beperken wanneer de prestaties onder realtime vallen en kan energiezuiniger zijn." + "V-Sync is ingeschakeld totdat de prestaties onder de doelvernieuwingsfrequentie komen. Kan stotteren minimaliseren wanneer de prestaties onder realtime vallen en kan energiezuiniger zijn." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "Frame Vertraging" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, + "Vermindert de latentie ten koste van een hoger risico op stotteren van video. Voegt een vertraging toe na V-Sync (in ms)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC, "Harde GPU Synchronisatie" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC, + "Hard-synchronisatie van de CPU en GPU. Vermindert latentie ten koste van prestaties." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC_FRAMES, + "Harde GPU Sync Frames" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_HARD_SYNC_FRAMES, + "Stelt in hoeveel frames de CPU voor de GPU kan lopen bij gebruik van 'Hard GPU Sync'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, + "Synchroniseer met Exacte Content Framerate (G-Sync, FreeSync)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, + "Geen afwijking van de core gevraagde timing. Gebruik voor schermen met Variabele Verversingsfrequentie (G-Sync, FreeSync, HDMI 2.1 VRR)." + ) /* Settings > Audio */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_SETTINGS, + "Uitvoer" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_SETTINGS, + "Instellingen voor audio-uitvoer wijzigen." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_SETTINGS, + "Instellingen voor audio-resampler wijzigen." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_SYNCHRONIZATION_SETTINGS, "Audio Synchronizatie" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_SYNCHRONIZATION_SETTINGS, + "Audio-synchronisatie instellingen wijzigen." + ) MSG_HASH( MENU_ENUM_SUBLABEL_MIDI_SETTINGS, "MIDI instellingen wijzigen." @@ -1473,6 +1557,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, "Mixer Instellingen" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, + "Instellingen voor de audio-mixer wijzigen." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUNDS, "Menu Geluiden" @@ -1481,10 +1569,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MUTE, "Geluid uitzetten" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MUTE, + "Audio demping aan/uit." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_MUTE, + "Mixer Dempen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MIXER_MUTE, + "Dempen mixer audio aan/uit." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_FASTFORWARD_MUTE, + "Dempen bij Vooruitspoelen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_FASTFORWARD_MUTE, + "Audio automatisch dempen bij gebruik van Vooruitspoelen." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_VOLUME, "Audio Uitgangsniveau (dB)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_VOLUME, + "Audiovolume (in dB). 0 dB is normaal volume en er wordt geen versterking toegepast." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, "Audio Mixer Volume Niveau (dB)" @@ -1497,18 +1609,34 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DSP_PLUGIN, "Audio DSP Plugin" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_DSP_PLUGIN, + "Audio DSP-plug-in die audio verwerkt voordat het naar het stuurprogramma wordt verzonden." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_EXCLUSIVE_MODE, "WASAPI Exclusieve mode" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, + "Geef het WASAPI-stuurprogramma de exclusieve controle over het audioapparaat. Indien uitgeschakeld, gebruikt het in plaats daarvan de gedeelde modus." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT, "WASAPI Float formaat" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT, + "Gebruik float formaat voor de WASAPI-stuurprogramma, indien ondersteund door uw audioapparaat." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH, "WASAPI Gedeelde bufferlengte" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH, + "De tussenliggende bufferlengte (in frames) bij gebruik van de WASAPI-stuurprogramma in de gedeelde modus." + ) /* Settings > Audio > Output */ @@ -1516,14 +1644,26 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE, "Audio Activeren" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_ENABLE, + "Bepaalt of audio wordt uitgevoerd." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE, "Audio Apparaat" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_DEVICE, + "Overschrijf het standaard audioapparaat dat het audiostuurprogramma gebruikt. Dit is afhankelijk van de stuurprogramma." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_LATENCY, "Audio Latentie (ms)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_LATENCY, + "Gewenste audio-vertraging in milliseconden. Wordt mogelijk niet gehonoreerd als het audiostuurprogramma geen bepaalde vertraging kan bieden." + ) /* Settings > Audio > Resampler */ @@ -1531,10 +1671,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY, "Audio Resampler Kwaliteit" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY, + "Verlaag deze waarde om prestaties/lagere vertraging te verkiezen boven audiokwaliteit, verhoog als u een betere audiokwaliteit wilt ten koste van prestaties/lagere vertraging." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_OUTPUT_RATE, "Audio Uitvoer Frequentie (Hz)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_OUTPUT_RATE, + "Samplefrequentie audio-uitvoer." + ) /* Settings > Audio > Synchronization */ @@ -1550,10 +1698,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, "Audio Maximale Timing Onevenredigheid" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_MAX_TIMING_SKEW, + "De maximale verandering in de audio-invoersnelheid. Door dit te vergroten, worden zeer grote veranderingen in timing mogelijk ten koste van een onnauwkeurige audiopitch (bijv., het uitvoeren van PAL-cores op NTSC-schermen)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_RATE_CONTROL_DELTA, "Dynamische Audio Rate Control" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_RATE_CONTROL_DELTA, + "Helpt bij het synchroniseren van onvolkomenheden in timing bij het synchroniseren van audio en video. Houd er rekening mee dat, indien uitgeschakeld, een goede synchronisatie bijna onmogelijk te verkrijgen is." + ) /* Settings > Audio > MIDI */ @@ -1561,6 +1717,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MIDI_INPUT, "Invoer" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIDI_INPUT, + "Selecteer het invoerapparaat." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MIDI_OUTPUT, + "Uitvoer" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIDI_OUTPUT, + "Selecteer het uitvoerapparaat." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIDI_VOLUME, + "Stel het uitvoervolume in (%)." + ) /* Settings > Audio > Mixer Settings > Mixer Stream */ @@ -1568,21 +1740,69 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY, "Afspelen" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY, + "Start het afspelen van de audiostream. Eenmaal voltooid, wordt de huidige audiostream uit het geheugen verwijderd." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_LOOPED, "Afspelen (Loop)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_LOOPED, + "Start het afspelen van de audiostream. Eenmaal voltooid, zal het vanaf het begin een lus maken en de track opnieuw afspelen." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_PLAY_SEQUENTIAL, "Afspelen (Sequentieel)" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL, + "Start het afspelen van de audiostream. Eenmaal voltooid, springt het in volgorde naar de volgende audiostream en herhaalt dit gedrag. Handig als afspeelmodus voor albums." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, + "Stoppen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, + "Hiermee wordt het afspelen van de audiostream gestopt, maar niet uit het geheugen verwijderd. Je kunt het opnieuw spelen door 'Play' te selecteren." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, "Verwijderen" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE, + "Dit stopt het afspelen van de audiostream en verwijdert deze volledig uit het geheugen." + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MIXER_ACTION_VOLUME, + "Pas het volume van de audiostream aan." + ) /* Settings > Audio > Menu Sounds */ +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, + "Speel gelijktijdige audiostreams af, zelfs in het menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, + "Activeer 'OK' Geluid" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, + "Activeer 'Annuleren' Geluid" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, + "Activeer 'Notificatie' Geluid" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, + "Activeer 'BGM' Geluid" + ) /* Settings > Input */ @@ -1596,49 +1816,253 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Poll Type Gedrag" + "Polling-gedrag" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, + "Beïnvloed hoe invoer-polling binnen RetroArch wordt gedaan. Als u deze instelt op 'Vroeg' of 'Laat', kan dit leiden tot minder latentie, afhankelijk van uw configuratie." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Remap Binds Activeren" + "Remap de Bedieningen voor Deze Core" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, + "Overschrijft de invoerbindingen met de opnieuw toegewezen koppelingen die zijn ingesteld voor de huidige core." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Autoconfiguratie Activeren" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, + "Automatisch controllers configureren die een profiel, Plug-and-Play stijl hebben." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, + "Invoerknop Axis Drempel" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BUTTON_AXIS_THRESHOLD, + "Hoe ver een as moet worden gekanteld om te resulteren in een druk op de knop." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_DEADZONE, + "Analoge Deadzone" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_SENSITIVITY, + "Analoge Gevoeligheid" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, + "Binding-Timeout" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BIND_TIMEOUT, + "Aantal seconden om te wachten tot je doorgaat naar de volgende binding." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_BIND_HOLD, + "Binding-Houd" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_BIND_HOLD, + "Aantal seconden om een invoer vast te houden om deze te binden." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, + "Turbo Periode" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, + "De periode (in frames) wanneer turbo-ingeschakelde knoppen zijn ingeschakeld." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, + "Arbeidscyclus" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE, + "Beschrijft hoe lang de periode van een turbo-geactiveerde knop moet zijn. Nummers worden beschreven in frames." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_MODE, + "Turbo Modus" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_TURBO_MODE, + "Selecteert het algemene gedrag van de turbo modus." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_TURBO_DEFAULT_BUTTON, + "Turbo Standaardknop" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON, + "Standaard actieve knop voor Turbo Modus 'Enkele Knop'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "Haptische Feedback/Vibratie (Trilsignaal)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS, + "Haptische feedback en trillingsinstellingen wijzigen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MENU_SETTINGS, + "Menubediening" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, + "Wijzig de instellingen voor menubediening." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Invoer Hotkey Binds" + "Sneltoetsen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, + "Configureer sneltoetsinstellingen." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Poort %u Binds" + "Poort %u Besturingselementen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, + "Configureer bedieningselementen voor deze poort." ) /* Settings > Input > Haptic Feedback/Vibration */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIBRATE_ON_KEYPRESS, + "Trillen bij indrukken knop" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION, + "Toestel trillen inschakelen (voor ondersteunde Cores)" + ) /* Settings > Input > Menu Controls */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_UNIFIED_MENU_CONTROLS, + "Uniforme Menubediening" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, + "Gebruik dezelfde bedieningselementen voor zowel het menu als het spel. Geldt voor het toetsenbord." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, + "Menu Wissel OK en Annuleer Knoppen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, + "Verwissel knoppen voor OK/Annuleren. Uitgeschakeld is de Japanse knoporiëntatie, ingeschakeld is de westerse oriëntatie." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ALL_USERS_CONTROL_MENU, + "Alle Gebruikers kunnen de Menu Bedienen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_ALL_USERS_CONTROL_MENU, + "Hiermee kan elke gebruiker het menu bedienen. Indien uitgeschakeld, kan alleen Gebruiker 1 het menu bedienen." + ) /* Settings > Input > Hotkey Binds */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, + "Afsluiten Bevestigen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, + "Vereist dat de Afsluit-sneltoets tweemaal wordt ingedrukt om RetroArch af te sluiten." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Menu Schakelaar Gamepad Combo" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Gamepad knoppencombination to toggle menu." + "Knopcombinatie om het menu te openen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Sneltoets Vertraging Inschakelen (Frames)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Voegt een vertraging in frames toe voordat de normale invoer wordt geblokkeerd na het indrukken (en behouden) van de toegewezen 'Sneltoets Inschakelen'-toets. Hiermee kan normale invoer van de 'Sneltoets Inschakelen'-toets worden vastgelegd wanneer deze wordt toegewezen aan een andere actie (bijv. RetroPad 'Select')." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, + "Vooruitspoelen (Wisselen)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Schakelt tussen snel-vooruit en normale snelheid." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Vooruitspoelen (Vasthouden)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Maakt vooruitspoelen mogelijk wanneer het knop is vastgehouden. Inhoud wordt op normale snelheid uitgevoerd wanneer de sleutel wordt losgelaten." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, + "Slow-Motion (Wisselen)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Schakelt tussen slow-motion en normale snelheid." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, + "Slow-Motion (Vasthouden)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "Maakt slow-motion mogelijk wanneer het knop is vastgehouden. Inhoud wordt op normale snelheid uitgevoerd wanneer de sleutel wordt losgelaten." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, + "Status Laden" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, + "Status Opslaan" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Sluit RetroArch" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, + "Status Opslaan Slot +" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, + "Status Opslaan Slot -" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Terugspoelen" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, + "Frame-vooruitgang" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, + "Spel Opnieuw Instellen" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Volgende shader" @@ -1651,12 +2075,32 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Schermafdruk maken" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, + "Stuur Foutopsporings-info (Debug Info)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, + "Schakel Disc Eject in/uit" + ) /* Settings > Input > Port # Binds */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Autoconfig Opslaan" + MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_TYPE, + "Apparaattype" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ADC_TYPE, + "Analoog naar Digitaal Type" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, + "Apparaatindex" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, + "Muisindex" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, @@ -1674,10 +2118,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "Start knop" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Rechter D-pad" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "A knop (right)" @@ -1710,9 +2150,101 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, "R3 knop (thumb)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, + "Linker Analoog X+ (Rechts)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, + "Linker Analoog X- (Links)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, + "Linker Analoog Y+ (Omlaag)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, + "Linker Analoog Y- (Omhoog)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, + "Rechter Analoog X+ (Rechts)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, + "Rechter Analoog X- (Links)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, + "Rechter Analoog Y+ (Omlaag)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, + "Rechter Analoog Y- (Omhoog)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, + "Wapen Trigger" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, + "Wapen Reload" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, + "Wapen Aux A" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, + "Wapen Aux B" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, + "Wapen Aux C" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, + "Wapen Start" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, + "Wapen Selectie" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, + "Wapen D-Pad Omhoog" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, + "Wapen D-Pad Omlaag" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, + "Wapen D-Pad Links" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, + "Wapen D-Pad Rechts" + ) /* Settings > Latency */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_ENABLED, + "Run-Ahead om de Vertraging te Verminderen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_ENABLED, + "Voer core-logica één of meer frames vooruit uit en laad de status terug om de waargenomen invoervertraging te verminderen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RUN_AHEAD_FRAMES, + "Aantal Frames om Vooruit te Lopen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, + "Het aantal frames dat vooruit moet lopen. Veroorzaakt gameplay-problemen zoals jitter als je het aantal interne lagframes in het spel overschrijdt." + ) /* Settings > Core */ @@ -1720,6 +2252,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHARED_CONTEXT, "Activeer Gedeelde Hardware Context" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SHARED_CONTEXT, + "Geef hardware-gerenderde cores hun eigen privé-context. Voorkomt dat er tussen de frames hardwarestatuswijzigingen moeten worden aangenomen." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "Dummy Laden Tijdens Afsluiten" @@ -1728,6 +2264,8 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "Automatisch core opstarten" ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Rotatie toestaan" @@ -1735,10 +2273,6 @@ MSG_HASH( /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Configuratie Opslaan Tijdens Afsluiten" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTO_OVERRIDES_ENABLE, "Laad Override Bestanden Automatisch" @@ -1754,14 +2288,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Saves Sorteren In Map" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Savestates Sorteren In Map" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, "SaveRAM niet overschrijven tijdens laden van savestate" @@ -1770,18 +2296,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "Periodiek SaveRAM Autosaven" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Save State Automatische Index" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Automatisch State Saven" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Automatisch State Loaden" - ) /* Settings > Logging */ @@ -1820,50 +2338,82 @@ MSG_HASH( "Terugspoelen" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Maximale afspeelsnelheid" + MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, + "Beperk de Vernieuwingsfrequentie in het Menu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_ENUM_THROTTLE_FRAMERATE, + "Zorgt ervoor dat de framerate wordt beperkt in het menu." ) /* Settings > Frame Throttle > Rewind */ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, - "Rewind Activeren" + "Terugspoelen Activeren" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Rewind Granulariteit" + MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, + "Terugspoelen Buffergrootte (MB)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE, + "De hoeveelheid geheugen (in MB) die moet worden gereserveerd voor de terugspoelbuffer. Als u dit verhoogt, neemt de hoeveelheid terugspoelgeschiedenis toe." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE_STEP, + "Terugspoelen Buffergrootte-Stap (MB)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_REWIND_BUFFER_SIZE_STEP, + "Elke keer dat u de waarde van de terugspoelbuffergrootte via deze gebruikersinterface verhoogt of verlaagt, verandert deze met dit bedrag" ) /* Settings > Frame Throttle > Frame Time Counter */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, + "Reset na Snel-Vooruitspoelen" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_FASTFORWARDING, + "Stel de frametijdteller opnieuw in na snel-vooruitspoelen." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, + "Reset na Laden Status" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_LOAD_STATE, + "Reset de frametijdteller na het laden van een status." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, + "Reset na Status Opslaan" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_RESET_AFTER_SAVE_STATE, + "Reset de frametijdteller nadat u een status hebt opgeslagen." + ) /* Settings > Recording */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "Opname Kwaliteit" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Laad Opname Configuratie..." + MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, + "Draden Opnemen" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, "Post Filter Opname Activeren" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_POST_FILTER_RECORD, + "Leg de afbeelding vast nadat filters (maar niet shaders) zijn toegepast. Je video ziet er net zo mooi uit als wat u op uw scherm ziet." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_RECORD, "GPU Opname Activeren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Stream Kwaliteit" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Titel van Stream" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, "UDP Stream Poort" @@ -1919,6 +2469,8 @@ MSG_HASH( "Schalering van alle UI elements van de overlay." ) + + /* Settings > On-Screen Display > Video Layout */ @@ -1932,10 +2484,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Framerate weergeven" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Geheugen Details meenemen" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Onscreen Berichten Font" @@ -1971,10 +2519,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_WRAPAROUND, "Navigatie Wrap-Around" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pauseer als menu op voorgrond is" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Muis Ondersteuning" @@ -1985,20 +2529,12 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, - "Threaded taken" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Laat niet in achtergrond draaien" + "Bedrade Taken" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DISABLE_COMPOSITION, "Desktop Compositie Deactiveren" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "UI Companion Start Tijdens Boot" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Menubalk" @@ -2010,10 +2546,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Snelmenu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Toon/verberg elementen op the Snelmenu scherm." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Toon Core Laden" @@ -2199,10 +2731,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Menu schaalfactor" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Achtergrond" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Achtergrond doorzichtigheid" @@ -2265,14 +2793,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Netwerk Commando Poort" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Netwerk Gamepad" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Netwerk Remote Base Port" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "stdin Commandos" @@ -2287,10 +2807,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Geschiedenislijst Activeren" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Enable or disable recent playlist for games, images, music, and videos." @@ -2303,10 +2819,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, "Sta het verwijderen van items toe" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Speeltijd:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "Laatst Gespeeld:" @@ -2337,10 +2849,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Taal" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Stel de taal in van de gebruikersinterface." - ) /* Settings > User > Privacy */ @@ -2447,10 +2955,6 @@ MSG_HASH( /* Netplay */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Room Lijst Vernieuwen" - ) /* Netplay > Host */ @@ -2505,10 +3009,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Huidige core" - ) /* Playlist Item > Information */ @@ -2817,10 +3317,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_CHARGING, "Opladen" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Geen bron" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "" @@ -3017,10 +3513,6 @@ MSG_HASH( /* XMB: Settings Options */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Ribbon (vereenvoudigd)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Simpel Sneeuw" @@ -3250,11 +3742,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_HIDE_UNBOUND, - "Verbergen Niet-gemapte Core Input Descripties" + "Verberg Ongebonden Core-invoeromschrijvers" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DESCRIPTOR_LABEL_SHOW, - "Descriptie Labels Weergeven" + "Invoerbeschrijving Labels Weergeven" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY, @@ -3288,10 +3780,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Gebruiker" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Gebruik ingebouwde afbeeldingsweergave" - ) /* Unused (Only Exist in Translation Files) */ @@ -3351,10 +3839,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Audio/Video Raadpleging" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Virtuele Gamepad Overlay Veranderen" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Hoe Laad je Content?" @@ -3508,10 +3992,6 @@ MSG_HASH( MSG_UPNP_FAILED, "Poorttoewijzing mislukt" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Geen argumenten geleverd en geen menu ingebouwd, hulp weergeven..." - ) MSG_HASH( MSG_WAITING_FOR_CLIENT, "Wachten op client ..." diff --git a/intl/msg_hash_pl.h b/intl/msg_hash_pl.h index 41681c2271..bfb276e69c 100644 --- a/intl/msg_hash_pl.h +++ b/intl/msg_hash_pl.h @@ -26,7 +26,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Obraz" + "Obrazy" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, @@ -34,7 +34,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Wideo" + "Filmy" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Załaduj fizyczny dysk z mediami. Najpierw wybierz rdzeń (Załaduj Rdzeń), którego zamierzasz używać z dyskiem." + "Załaduj fizyczny dysk. Najpierw wybierz rdzeń (Załaduj Rdzeń), aby użyć go z dyskiem." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -101,7 +101,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Skanuj zawartość i dodaj do bazy danych." + "Zeskanuj zawartość i dodaj do bazy danych." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, @@ -109,7 +109,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Otwiera menu pulpitu, jeśli jest zamknięte." + "Otwiera tradycyjne menu pulpitu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Wyłącz tryb kiosku. Ponowne uruchomienie jest wymagane, aby zmiana mogła w pełni działać." + "Wyłącza tryb kiosku. (Wymagany restart)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -200,7 +200,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Zainstaluj lub przywróć rdzeń z katalogu pobranych plików." + "Zainstaluj lub przywróć rdzeń z katalogu \"Pobrane\"." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -238,7 +238,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "Treści, które dodałeś do \"Ulubionych\" pojawią się tutaj." + "Zawartość dodana do \"Ulubionych\" pojawi się tutaj." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -248,18 +248,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_MUSIC, "Tutaj pojawi się muzyka, która została wcześniej odtworzona." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Obraz" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Tutaj pojawią się obrazy, które wcześniej były oglądane." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Wideo" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Tutaj będą wyświetlane filmy, które zostały wcześniej odtworzone." @@ -291,10 +283,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PL_THUMBNAILS_UPDATER_LIST, "Aktualizator miniatur list odtwarzania" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Pobierz pojedyncze miniatury dla każdego wpisu wybranej playlisty." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, "Program do pobierania treści" @@ -307,10 +295,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, "Zaktualizuj zasoby" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Zaktualizuj profile joypad" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Zaktualizuj kody" @@ -540,10 +524,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, "Obsługa interfejsu dowodzenia sieciowego" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Obsługa sieciowego gamepada" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, "Wsparcie Cocoa" @@ -990,10 +970,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Przeglądarka plików" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Dostosowuje ustawienia przeglądarki plików." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, "Manipulacja klatek" @@ -1097,18 +1073,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "Sterownik wejściowy" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Wprowadź sterownik, którego chcesz użyć. W zależności od sterownika wideo może wymusić inny sterownik wejściowy." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Sterownik joypada" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Sterownik joypad do użycia." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, "Sterownik wideo" @@ -1145,10 +1109,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Sterownik Wi-Fi" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Sterownik WiFi do użycia." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, "Sterownik lokalizacji" @@ -1252,10 +1212,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "Wstawianie czarnej klatki" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Wstawia czarną klatkę między klatkami. Przydatny dla użytkowników z ekranami 120Hz, którzy chcą odtwarzać zawartość 60 Hz, aby wyeliminować efekt duchów." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, "Włącz zrzut ekranu GPU" @@ -1491,18 +1447,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "Niestandardowy współczynnik kształtu X Poz." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Niestandardowe przesunięcie wyświetlania używane do definiowania położenia osi X. Są one ignorowane, jeśli włączona jest opcja 'Integer Scale'. Zostanie wtedy automatycznie wyśrodkowany." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, "Niestandardowy współczynnik kształtu Y Poz." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Niestandardowe przesunięcie wyświetlania używane do definiowania położenia osi Y. Są one ignorowane, jeśli włączona jest opcja 'Integer Scale'. Zostanie wtedy automatycznie wyśrodkowany." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Niestandardowy współczynnik proporcji Szerokość" @@ -1523,10 +1471,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Przytnij Overscan (Przeładuj)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Odcina kilka pikseli wokół krawędzi obrazu, zwykle pozostawionych pustych przez programistów, które czasami zawierają także piksele śmieci." - ) /* Settings > Video > Synchronization */ @@ -1550,10 +1494,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "Adaptacyjny Vsync" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "V-Sync jest włączona, dopóki wydajność nie spadnie poniżej docelowej częstotliwości odświeżania.\nTo może zminimalizować jąkanie, gdy wydajność spada poniżej czasu rzeczywistego i może być bardziej energooszczędna." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "Opóźnienie klatki" @@ -1582,10 +1522,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, "Synchronizuj z dokładną liczbą klatek na sekundę (G-Sync, FreeSync)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Brak odchylenia od żądanego czasu rdzenia. Użyj dla ekranów o zmiennej częstotliwości odświeżania, G-Sync, FreeSync." - ) /* Settings > Audio */ @@ -1859,22 +1795,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, "Włącz lub wyłącz dźwięk menu." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "Włącz dźwięk OK" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "Włącz anuluj dźwięk" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "Włącz dźwięk powiadomienia" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "Włącz dźwięk BGM" - ) /* Settings > Input */ @@ -1886,30 +1806,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Maksymalna liczba użytkowników obsługiwanych przez RetroArch." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Zachowanie typu ankiety" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Sprawdź, w jaki sposób odbywa się odpytywanie wejścia wewnątrz RetroArch. Ustawienie na 'Wcześnie' lub 'Późno' może spowodować mniejsze opóźnienie, w zależności od konfiguracji." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Przemapuj powiązania dla tego rdzenia" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Jeśli włączone, nadpisuje dane wejściowe powiązane z przemapowaniem powiązań ustawionych dla bieżącego rdzenia." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Włącz autoconfig" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Włącz automatyczne wykrywanie wejścia. Spróbuje skonfigurować joypad, styl Plug-and-Play." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, "Wprowadź próg osi przycisku" @@ -1946,10 +1846,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Okres turbo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Opisuje okres, w którym przełączane są przyciski z włączoną funkcją turbo. Liczby są opisane w klatkach." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Cykl zapisu" @@ -1990,18 +1886,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_SETTINGS, "Zmień ustawienia sterowania menu." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Wejściowe powiązania skrótów" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "Skonfiguruj ustawienia skrótu." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Powiązania portu %u" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, "Skonfiguruj ustawienia dla tego portu." @@ -2028,10 +1916,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Użyj tych samych elementów sterujących zarówno do menu, jak i do gry. Dotyczy klawiatury." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Zamień przyciski menu ok i anuluj" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, "Zamień przyciski na OK/Anuluj. Wyłączone to orientacja japońskiego przycisku, włączona jest orientacja zachodnia." @@ -2047,38 +1931,10 @@ MSG_HASH( /* Settings > Input > Hotkey Binds */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Naciśnij dwukrotnie wyjście" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Naciśnij dwukrotnie klawisz skrótu, aby wyjść z RetroArch." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Menu przełączenia gamepad combo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Kombinacja przycisków gamepada do przełączania menu." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Szybkie przewijanie do przodu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Szybkie zatrzymanie do przodu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Przełącznik spowolnienia" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Zwolnione tempo" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Wczytaj zapis" @@ -2087,10 +1943,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Zapisz stan" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Przełączanie pełnoekranowe" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Zamknij RetroArch" @@ -2107,14 +1959,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Przewijanie do tyłu" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Przełącznik nagrywania filmu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Wstrzymaj przełącznik" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Zaawansowane klatki" @@ -2131,98 +1975,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Poprzedni moduł cieniujący" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Indeks kodów +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Indeks kodów -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Włącz kody" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Zrób zrzut ekranu" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Przełącznik wyciszania dźwięku" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Przełączanie klawiatury ekranowej" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "Przełącznik FPS" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Wyślij informacje o debugowaniu" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "Przełącznik hostingu gry sieciowej" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Gra online przełącza tryb gracz/widz" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Włącz klawisze skrótów" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Głośność +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Głośność -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "Nakładka next" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Przełącznik wysuwania dysku" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Następny dysk" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "Poprzedni dysk" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Sprawdź przełącznik myszy" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Przełącznik ostrości gry" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Przełącznik menu pulpitu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Przełączanie menu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Przełącznik nagrywania" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Przełącznik strumieniowania" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "Usługa SI" @@ -2242,18 +2006,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "Indeks urządzeń" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Powiąż wszystko" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Wszystkie domyślne powiązania" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Zapisz Autoconfig" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, "Indeks myszy" @@ -2274,22 +2026,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "Przycisk Start" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Do góry D-pad" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "W dół D-pad" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Lewy D-pad" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Prawy D-pad" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "Przycisk (po prawej)" @@ -2421,22 +2157,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, "Liczba klatek do uruchomienia. Powoduje problemy z grą, takie jak drganie, jeśli przekroczysz liczbę klatek wystąpią opóźnienia wewnętrzne w grze." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "RunAhead Użyj drugiej instancji" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "Zastosuj drugą instancję rdzenia RetroArch, aby uruchomić z wyprzedzeniem. Zapobiega problemom z dźwiękiem ze względu na stan ładowania." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "Ukryj ostrzeżenia RunAhead" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "Ukrywa komunikat ostrzegawczy, który pojawia się podczas korzystania z RunAhead, a rdzeń nie obsługuje stanów składowania." - ) /* Settings > Core */ @@ -2452,18 +2172,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DRIVER_SWITCH_ENABLE, "Pozwól rdzeniom przełączyć sterownik wideo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Pozwól rdzeniom wymusić przełączenie na inny sterownik wideo niż aktualnie załadowany." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "Atrapa rdzenia przy zatrzymaniu rdzenia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Niektóre rdzenie mogą mieć funkcję wyłączania. Jeśli jest włączona, uniemożliwi rdzeniu wyłączenie RetroArch. Zamiast tego ładuje fałszywy rdzeń." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "Rozpocznij rdzeń automatycznie" @@ -2476,25 +2188,15 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Przed próbą załadowania zawartości sprawdź, czy wszystkie wymagane oprogramowanie układowe jest obecne." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Pozwól na rotacje" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Pozwól rdzeniom ustawić rotację. Po wyłączeniu żądania obrotu są ignorowane. Przydatny w przypadku konfiguracji, w których ręcznie obraca się ekran." - ) /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Zapisz konfigurację przy wyjściu" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Zapisuje zmiany w pliku konfiguracyjnym przy wyjściu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Automatycznie ładuj zależne od zawartości opcje rdzenia" @@ -2534,18 +2236,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Sortuj zapisy w folderach" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Sortuj pliki zapisu w folderach nazwanych po używanym rdzeniu." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Sortuj zapis w folderach" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "Sortuj stany zachowywania w folderach nazwanych po używanym rdzeniu." @@ -2562,30 +2252,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "Autozapis SaveRAM" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Automatyczne zapisywanie nieulotnej pamięci RAM w regularnych odstępach czasu. Jest to domyślnie wyłączone, chyba że ustawiono inaczej. Odstęp mierzony jest w sekundach. Wartość 0 wyłącza automatyczne zapisywanie." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Zapisz indeks auto stanu" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Podczas zapisywania stanu, wskaźnik stanu zapisu jest automatycznie zwiększany przed zapisaniem. Podczas ładowania zawartości indeks zostanie ustawiony na najwyższy istniejący indeks." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Automatyczne zapisanie stanu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Automatycznie tworzy stan zapisywania na końcu środowiska wykonawczego RetroArch. RetroArch automatycznie załaduje ten stan zapisu Auto Load State jest włączony." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Automatyczne załadowanie stanu" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, "Automatycznie ładuj stan automatycznego zapisywania podczas uruchamiania." @@ -2594,10 +2264,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, "Zapisz miniatury" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Pokaż miniatury stanów zapisu w menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, "Kompresja SaveRAM" @@ -2693,29 +2359,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "Liczniki wydajności" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "Liczniki wydajności dla RetroArch (i rdzeni).\nDane z liczników mogą pomóc w określeniu wąskich gardeł systemowych, dokładnego dostrojenia systemu oraz wydajności aplikacji" - ) /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Pokaż ukryte pliki i foldery" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Pokaż ukryte pliki/katalogi w przeglądarce plików." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "Filtruj nieznane rozszerzenia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Filtruj pliki wyświetlane w przeglądarce plików według obsługiwanych rozszerzeń." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "Użyj wbudowanego odtwarzacza multimedialnego" @@ -2743,22 +2393,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_TIME_COUNTER_SETTINGS, "Dostosuj ustawienia wpływające na licznik czasu klatek (aktywne tylko, gdy wątkowe wideo jest wyłączone)." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Mnożnik prędkości" - ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, "Maksymalna prędkość odtwarzania zawartości przy użyciu przyśpieszenia (np. 5.0x przy zawartości 60 klatek na sekundę = 300 klatek na sekundę). Ustawienie na 0.0x oznacza brak limitu." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Współczynnik spowolnienia" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "W zwolnionym tempie zawartość spowalnia o określony/ustawiony współczynnik." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, "Menu obrotowe przepustnicy częstotliwości wyświetlania klatek" @@ -2774,18 +2412,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "Włącz przewianie do tyłu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Zrobiłeś błąd? Przewiń i spróbuj ponownie.\nUważaj, powoduje to chwilowy spadek wydajności podczas gry." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Przewijanie granularności" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Podczas przewijania określonej liczby klatek można przewijać kilka klatek na raz, zwiększając prędkość przewijania do tyłu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, "Rozmiar bufora przewijania (MB)" @@ -2832,14 +2458,6 @@ MSG_HASH( /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_QUALITY, - "Jakość rekordu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Załaduj konfigurację nagrywania..." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, "Nagrywanie wątków" @@ -2864,22 +2482,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_MODE, "Tryb przesyłania strumieniowego" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_STREAM_QUALITY, - "Jakość strumienia" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, - "Niestandardowa konfiguracja strumienia" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Tytuł strumienia" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "URL strumieniowania" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, "Port Strumienia UDP" @@ -2995,6 +2597,8 @@ MSG_HASH( "Skala wszystkich elementów interfejsu nakładki." ) + + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -3036,14 +2640,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, "Widżety graficzne" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Używaj nowocześnie udekorowanych animacji, powiadomień, wskaźników i kontrolek zamiast starego systemu opartego tylko na tekście." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Automatycznie skaluj widżety grafiki" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, "Automatycznie zmień rozmiar udekorowanych powiadomień, wskaźników i kontrolek na podstawie aktualnej skali menu." @@ -3052,26 +2648,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, "Nadpisanie skali widżetów graficznych (Pełny ekran)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Zastosuj ręczny współczynnik skalowania podczas rysowania widżetów w trybie pełnoekranowym. Ma zastosowanie tylko wtedy, gdy 'Automatyczne skalowanie widżetów graficznych' jest wyłączone. Może być użyty do zwiększenia lub zmniejszenia rozmiaru udekorowanych powiadomień, wskaźników i kontrolek niezależnie od samego menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, "Nadpisanie skali widżetów graficznych (Tryb okienkowy)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "Zastosuj ręczny współczynnik skalowania podczas rysowania widżetów w trybie okienkowym. Ma zastosowanie tylko wtedy, gdy 'Automatyczne skalowanie widżetów graficznych' jest wyłączone. Może być użyty do zwiększenia lub zmniejszenia rozmiaru udekorowanych powiadomień, wskaźników i kontrolek niezależnie od samego menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Wyświetl ilość klatek na sekundę" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Wyświetla bieżącą liczbę klatek na sekundę na ekranie." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, "Interwał aktualizacji klatek na sekundę (w klatkach)" @@ -3096,22 +2680,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Pokaż techniczne statystyki na ekranie." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Dołącz szczegóły pamięci" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Obejmuje bieżące użycie pamięci/sumę na ekranie z FPS/klatek." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Czcionka powiadomienia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Wybierz inną czcionkę dla powiadomień na ekranie." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "Rozmiar powiadomienia" @@ -3171,14 +2743,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Widok" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Pokaż lub ukryj elementy na ekranie menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Wygląd" @@ -3191,10 +2755,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "Pokaż ustawienia zaawansowane" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Pokaż zaawansowane ustawienia dla zaawansowanych użytkowników (domyślnie ukryty)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "Włącz tryb kiosku" @@ -3219,10 +2779,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "Przewijanie do początku i/lub końca, jeśli granica listy jest osiągnięta poziomo lub pionowo." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Wstrzymaj przy włączonym menu" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Jeśli wyłączone, zawartość będzie nadal działać w tle, gdy menu RetroArch jest przełączane." @@ -3231,34 +2787,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, "Wznów zawartość po użyciu stanów zapisu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Automatyczne zamykanie menu i wznawianie bieżącej zawartości po wybraniu „Zapisz stan” lub „Wczytaj stan” z Szybkiego menu. Wyłączenie tego może poprawić wydajność stanu zapisywania na bardzo wolnych urządzeniach." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, "Wznów zawartość po zmianie dysków" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "Automatycznie zamknij menu i wznów bieżącą zawartość po wybraniu 'Włóż dysk' lub 'Załaduj nowy dysk' z menu sterowania dyskami." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Obsługa myszy" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Włącz kontrolki myszy w menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Obsługa dotyku" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Włącz sterowanie dotykowe w menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "Zadania z wątkami" @@ -3267,10 +2807,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "Wykonuj zadania w oddzielnym wątku." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Nie pracuj w tle" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Wstrzymaj grę, gdy RetroArch nie jest aktywnym oknem." @@ -3295,22 +2831,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "Włącz Companion UI" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Uruchom Companion UI przy włączeniu" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Pasek menu" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Włącz menu okienkowe (wymagany restar)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Uruchom menu okienkowe przy włączeniu" - ) /* Settings > User Interface > Views */ @@ -3318,18 +2842,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Szybkie menu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Pokaż lub ukryj elementy na ekranie szybkiego menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "Ustawienia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Pokaż/ukryj elementy na ekranie Ustawień." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Pokaż ładowanie rdzenia" @@ -3434,10 +2950,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Pokaż kartę Ustawień w menu głównym." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Ustaw hasło dla włączania karty Ustawienia" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "Podanie hasła podczas ukrywania karty ustawień pozwala później przywrócić ją z menu, przechodząc do karty Menu główne, wybierając opcję Włącz kartę Ustawienia i wprowadzając hasło." @@ -3542,10 +3054,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "Pokaż podpowiedzi menu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Pokazuje dodatkowe informacje dla aktualnie wybranego wpisu menu." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "Wyświetl ekran startowy" @@ -3911,26 +3419,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Współczynnik skali menu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Stosuje globalny współczynnik skalowania podczas rysowania menu. Może być użyty do zwiększenia lub zmniejszenia rozmiaru interfejsu użytkownika." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Tło" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Wybierz zdjęcie, aby ustawić jako tapetę menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Nieprzezroczystość tła" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Zmodyfikuj krycie tapety w tle." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Nieprzezroczysty bufor klatki" @@ -3967,26 +3459,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, "Animacja paska tekstu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "Wybierz metodę przewijania poziomego używaną do wyświetlania długich tekstów menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, "Szybkość paska tekstu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "Szybkość animacji podczas przewijania długich ciągów tekstowych menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, "Gładki tekst paska" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "Użyj płynnej animacji przewijania podczas wyświetlania długich tekstów menu. Ma mały wpływ na wydajność." - ) /* Settings > AI Service */ @@ -4014,10 +3494,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, "Włącz usługę AI, aby była uruchamiana po naciśnięciu klawisza skrótu usługi AI." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "Przełącznik pauzy usługi SI" - ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, "Wstrzymuje rdzeń podczas tłumaczenia ekranu." @@ -4045,18 +3521,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, "Dostępność włączona" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "Włącz/Wyłącz narratora dostępności dla nawigacji menu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Prędkość mowy narratora" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Ustaw prędkość mowy dla narratora, od szybkiego do powolnego" - ) /* Settings > Power Management */ @@ -4066,10 +3530,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "Włącz osiągnięcia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "Rywalizuj, aby osiągnąć uszyte na miarę osiągnięcia w klasycznych grach.\nAby uzyskać więcej informacji odwiedź http://retroachievements.org" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "Osiągnięcia trybu hardcore" @@ -4082,10 +3542,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "Tabele wyników" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "Tabele wyników dla poszczególnych gier.\nNie ma wpływu, jeśli tryb Hardcore jest wyłączony." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, "Tryb Rich Presence" @@ -4122,10 +3578,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, "Automatyczny zrzut ekranu osiągnięć" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "Automatycznie wykonuj zrzut ekranu po uruchomieniu osiągnięcia." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, "Uruchom aktywny" @@ -4181,58 +3633,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "Hasło serwera" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Hasło do połączenia z hostem netplay. Używane tylko w trybie hosta." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "Hasło spontaniczne serwera" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Hasło do połączenia z hostem netplay z tylko uprawnieniami obserwatora. Używane tylko w trybie hosta." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "Tryb widza gry online" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Czy rozpocząć netplay w trybie obserwatora." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "Zezwalaj na klientów w trybie slave" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Określa, czy zezwalać na połączenia w trybie slave. Klienty w trybie slave wymagają bardzo małej mocy obliczeniowej po każdej ze stron, ale znacznie ucierpią z powodu opóźnień sieci." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "Odmów klientów w trybie innym niż slave" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Określa, czy nie zezwalać na połączenia nie w trybie slave. Niezalecane, z wyjątkiem bardzo szybkich sieci z bardzo słabymi maszynami." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "Tryb bezstanowej gry online" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Czy uruchomić netplay w trybie niewymagającym stanów zapisu. Jeśli jest ustawiona na wartość true, wymagana jest bardzo szybka sieć, ale nie jest wykonywane przewijanie, więc nie będzie jittera." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "Sprawdź klatki gry online" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Częstotliwość w klatkach, w których netplay będzie weryfikować, czy host i klient są zsynchronizowane." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "Wejściowe klatki opóźnień" @@ -4277,18 +3701,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Port poleceń sieciowych" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Gamepad sieciowy" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Port zdalnej sieci" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Użytkownik %d Zdalny Włącz" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "Polecenia STDIN" @@ -4301,10 +3713,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "Pobieranie miniatur na żądanie" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "Automatycznie pobieraj brakujące miniatury podczas przeglądania list odtwarzania. Ma poważny wpływ na wydajność." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "Aktualizacja" @@ -4343,10 +3751,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Włącz listę historii" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Włącz lub wyłącz listę najnowszych odtwarzanych, zdjęć, muzyki i filmów." @@ -4359,10 +3763,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Ogranicz liczbę wpisów na liście odtwarzania dla gier, zdjęć, muzyki i filmów." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Rozmiar listy ulubionych" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, "Ogranicz liczbę wpisów na liście odtwarzania ulubionych. Po osiągnięciu limitu nowe dodatki będą blokowane, dopóki stare wpisy nie zostaną usunięte. Ustawienie wartości -1 pozwala na „nieograniczoną” liczbę (99999) wpisów. OSTRZEŻENIE: Zmniejszenie wartości spowoduje usunięcie istniejących wpisów!" @@ -4387,18 +3787,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, "Sortuj listy alfabetycznie" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "Sortuje playlisty zawartości w porządku alfabetycznym. Pamiętaj, że playlisty historii ostatnio używanych gier, obrazów, muzyki i filmów są wykluczone." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, "Zapisz playlisty w starym formacie" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, - "Zapisywanie playlisty przy użyciu przestarzałego formatu zwykłego tekstu. Gdy wyłączone, playlisty są sformatowane przy użyciu JSON." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, "Kompresuj playlisty" @@ -4427,10 +3819,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "Rdzeń:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Czas w grze:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "Ostatnia gra:" @@ -4443,14 +3831,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, "Wybiera typ rekordu dziennika środowiska wykonawczego, który ma być wyświetlany na podtytułach playlisty. (Należy pamiętać, że odpowiedni dziennik środowiska wykonawczego musi być włączony za pomocą menu opcji „Zapisywanie”)" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Format uruchomieniowy podtytułu playlisty 'ostatnio odtwarzany'" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Wybiera styl formatowania daty / godziny używany podczas wyświetlania informacji o znaczniku czasu „ostatnio odtwarzane” w rejestrze wykonawczym. Uwaga: opcje „(AM / PM)” będą miały niewielki wpływ na wydajność na niektórych platformach." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, "Dopasowanie rozmycia archiwum" @@ -4467,14 +3847,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, "Po wyłączeniu zawartość jest dodawana tylko do playlisty, jeśli zainstalowany jest rdzeń, który obsługuje jej rozszerzenie. Włączając to, niezależnie od tego doda do playlisty. W ten sposób możesz zainstalować rdzeń, którego potrzebujesz później po skanowaniu." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Zarządzanie listami odtwarzania" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Wykonuj zadania konserwacyjne na wybranej liście odtwarzania (np. Ustaw/przywróć domyślne skojarzenia rdzenia)." - ) /* Settings > Playlists > Playlist Management */ @@ -4506,18 +3878,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE, "Metoda sortowania" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Zmień sposób sortowania wpisów na tej playliście." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, "Wyczyść playlistę" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Usuń niepoprawne/zduplikowane wpisy i zweryfikuj powiązania rdzeni." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "Usuń listę odtwarzania" @@ -4557,10 +3921,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Język" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Ustaw język interfejsu." - ) /* Settings > User > Privacy */ @@ -4595,10 +3955,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, "Retro osiągnięcia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Usługa RetroAchievements. Aby uzyskać więcej informacji, odwiedź http://retroachievements.org" - ) /* Settings > User > Accounts > RetroAchievements */ @@ -4606,10 +3962,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "Nazwa Użytkownika" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Wprowadź nazwę użytkownika swojego konta RetroAchievements." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "Hasło" @@ -4651,10 +4003,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "Assety" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Ta lokalizacja jest domyślnie sprawdzana, gdy interfejsy menu próbują znaleźć ładowalne zasoby itp." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "Dynamiczne tła" @@ -4675,10 +4023,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "Przeglądarka plików" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Ustawia katalog startowy dla przeglądarki plików." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "Konfiguracja" @@ -4763,18 +4107,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "Konfig. Nagrywania" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Tutaj będą przechowywane konfiguracje nagrywania." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Nakładka" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Definiuje katalog, w którym nakładki są przechowywane dla łatwego dostępu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, "Układ wideo" @@ -4795,18 +4131,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "Wprowadź autoconfig" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Jeśli joypad jest podłączony, to zostanie automatycznie skonfigurowany, jeśli plik konfiguracyjny odpowiadający mu jest obecny w tym katalogu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "Przemapowanie wejścia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Zapisz wszystkie przemapowane ustawienia sterujące do tego katalogu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "Playlisty" @@ -4895,14 +4223,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Odłącz aktywne połączenie gry online." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Odśwież listę pokoi" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Zeskanuj nowe pokoje." - ) /* Netplay > Host */ @@ -4987,10 +4307,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SYSTEM_NAME_CUSTOM, "Ręcznie określ 'nazwę systemu' dla zeskanowanych treści. Używane tylko wtedy, gdy 'Nazwa systemu' jest ustawiona na ''." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Rdzeń" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, "Wybierz domyślny rdzeń do użycia podczas uruchamiania zeskanowanych treści." @@ -4999,10 +4315,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_FILE_EXTS, "Rozszerzenia pliku" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "Oddzielona spacjami lista typów plików uwzględniana podczas skanowania. Jeśli puste, zawiera wszystkie pliki - lub jeśli określony jest rdzeń, wszystkie pliki obsługiwane przez rdzeń." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, "Skanuj wewnątrz archiwów" @@ -5105,10 +4417,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Obecny rdzeń" - ) /* Playlist Item > Information */ @@ -5387,18 +4695,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_SAVE_AS, "Zapisz bieżące kody jako plik składowania." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "Dodaj nowy kod do góry" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "Dodaj nowy kod do dołu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "Usuń wszystkie kody" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, "Automatyczne stosowanie cheatów podczas ładowania gry" @@ -5442,18 +4738,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, "Big Endian (grubokońcowość)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "Wielki endian : 258 = 0x0102,\nMały endian : 258 = 0x0201" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "Wyszukaj wartość w pamięci" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Lewo/Prawo by zmienić wartość" - ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, "Równa się %u (%X)" @@ -5619,26 +4907,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_COUNT, "Liczba Iteracji" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "Liczba zastosowań cheat-u.\nUżyj pozostałych dwóch opcji Iteracji, aby wpłynąć na duże obszary pamięci." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, "Adres zwiększa każdą iterację" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "Po każdym 'Liczba Iteracji' adres pamięci zostanie zwiększony o tę liczbę razy \"Rozmiar wyszukiwania w pamięci\"." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, "Wartość zwiększa każdą iterację" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "Po każdej 'liczbie Iteracji' wartość zostanie zwiększona o tę ilość." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, "Wibruj, gdy pamięć" @@ -5687,10 +4963,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_COPY_BEFORE, "Skopiuj ten cheat przed" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "Usuń to cheat" - ) /* Quick Menu > Disc Control */ @@ -5698,18 +4970,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, "Wysuń dysk" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Otwiera wirtualną tackę dysków i usuwa aktualnie załadowany dysk. UWAGA: Jeśli RetroArch jest skonfigurowany do wstrzymania podczas gdy menu jest aktywne, niektóre rdzenie mogą nie rejestrować zmian, chyba że zawartość zostanie wznowiona na kilka sekund po każdej akcji sterowania dyskiem." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "Włóż dysk" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Wkłada dysk odpowiadający 'bieżącemu indeksowi dysków' i zamyka wirtualną tackę. UWAGA: Jeśli RetroArch jest skonfigurowany do wstrzymania podczas gdy menu jest aktywne, niektóre rdzenie mogą nie rejestrować zmian, chyba że zawartość zostanie wznowiona na kilka sekund po każdej akcji sterowania dyskiem." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, "Załaduj nowy dysk" @@ -5737,10 +5001,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "Oglądaj pliki modułu cieniującego w poszukiwaniu zmian" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "Automatycznie zastosuj zmiany wprowadzone w plikach modułu cieniującego na dysku." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "Załaduj ustawienia Shader" @@ -5785,10 +5045,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "Przepustka Shadera" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Zwiększ lub zmniejsz ilość przejść potoku cieniującego. Możesz powiązać osobny moduł cieniujący z każdym przebiegiem potoku i skonfigurować jego skalę i filtrowanie." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "Cieniowanie" @@ -5824,18 +5080,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "Zapis ustawienia podstawowe rdzenia" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Zapisz bieżące ustawienia modułu cieniującego jako ustawienia domyślne dla tej aplikacji/rdzenia." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "Zapisz ustawienie zawartości katalogu" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Zapisz bieżące ustawienia modułu cieniującego jako ustawienia domyślne dla wszystkich plików w bieżącym katalogu zawartości." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "Zapisz ustawienie gry" @@ -6141,10 +5389,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "Rozładowywanie" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Brak źródła" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "" @@ -6169,10 +5413,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD, "Retro pad" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "Retro pad w/Analog" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NONE, "Brak" @@ -6465,22 +5705,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "Mysz 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Kółko do góry" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Kółko do dołu" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Kółko w lewo" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Kółko w prawo" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "Wcześnie" @@ -7010,10 +6234,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_SHADOWS_ENABLE, "Włącz cienie ikony" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Narysuj padające cienie dla wszystkich ikon.\nTo będzie mały wpływ na wydajność." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, "Animowany efekt tłą" @@ -7050,10 +6270,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Włącz kartę Ustawienia" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Włącza kartę Ustawienia. Wymagane jest ponowne uruchomienie karty." - ) /* XMB: Settings Options */ @@ -7061,10 +6277,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "Wstążka" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Wstążka (uproszczona)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Prosty śnieg" @@ -7200,10 +6412,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME, "Przytnij nazwy playlist" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "Gdy włączone, usunie nazwy systemów z list odtwarzania. Na przykład, wyświetlone zostanie 'PlayStation' zamiast 'Sony - PlayStation'. Zmiany wymagają ponownego uruchomienia, aby odnieść efekt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "Kolor menu" @@ -7228,10 +6436,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS_OZONE, "Druga miniatura" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, - "Zastąp panel metadanych treści przez inną miniaturę." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, "Użyj paska tekstu dla metadanych zawartości" @@ -7267,10 +6471,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_SHOW_NAV_BAR, "Wyświetlaj stałe skróty nawigacji na ekranie. Umożliwia szybkie przełączanie pomiędzy kategoriami menu. Zalecane dla urządzeń ekranu dotykowego." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, - "Automatycznie obracaj pasek nawigacji" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, "Automatycznie przesuń pasek nawigacyjny na prawą stronę ekranu, gdy używasz orientacji wyświetlania poziomego." @@ -7311,10 +6511,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, "Pokaż drugorzędną miniaturę na liście widoków" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "Włącza wyświetlanie drugorzędnych miniatur, gdy używasz trybu widoku typu 'Lista' playlisty. Pamiętaj, że to ustawienie ma zastosowanie tylko wtedy, gdy ekran ma wystarczającą fizyczną szerokość, aby pokazać dwie miniatury." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, "Rysuj tła miniatur" @@ -8128,10 +7324,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Użytkownik" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Użyj wbudowanej przeglądarki zdjęć" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "Maksymalne obrazy swapchain" @@ -8179,10 +7371,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "Auto. Współczynnik proporcji" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Przezwisko (lan): %s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_BGM_ENABLE, "Włącz System BGM" @@ -8283,10 +7471,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Rozwiązywanie problemów audio/wideo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Zmiana nakładki wirtualnego gamepada" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Ładowanie zawartości" @@ -8652,10 +7836,6 @@ MSG_HASH( MSG_UPNP_FAILED, "Mapowanie portu nie powiodło się" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Brak argumentów i brak wbudowanego menu, wyświetlanie pomocy..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "Ustawianie dysku w zasobniku" @@ -10010,10 +9190,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR, "Nadpisanie skali widżetów graficznych" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "Zastosuj ręczny współczynnik skalowania podczas rysowania widżetów. Ma zastosowanie tylko wtedy, gdy 'Automatyczne skalowanie widżetów graficznych' jest wyłączone. Może być użyty do zwiększenia lub zmniejszenia rozmiaru udekorowanych powiadomień, wskaźników i kontrolek niezależnie od samego menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, "Rozdzielczość ekranu" @@ -10102,14 +9278,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "Włącz dotyk" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Włączanie mapowania gamepada klawiatury" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Typ odwzorowania klawiatury gamepada" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "Włącz małą klawiaturę" diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index d5feae9716..f865242b22 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -26,7 +26,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Imagem" + "Imagens" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, @@ -34,15 +34,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Vídeo" + "Vídeos" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, - "Salas de jogo em rede" + "Jogo em rede" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TAB, - "Importar o conteúdo" + "Importar conteúdo" ) /* Main Menu */ @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Carregar um disco de mídia físico. Você deve primeiro selecionar o núcleo (Carregar núcleo) que pretende usar com o disco." + "Carrega um disco de mídia físico. Primeiro selecione o núcleo (Carregar núcleo) que pretende usar com o disco." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -93,35 +93,35 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLISTS_TAB, - "O conteúdo escaneado correspondente ao banco de dados aparecerá aqui." + "O conteúdo analisado correspondente ao banco de dados aparecerá aqui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, - "Escanear conteúdo" + "Analisar conteúdo" ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Escanear o conteúdo e adiciona na base de dados." + "Analisa o conteúdo e adiciona na base de dados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, - "Exibir Menu Desktop" + "Mostrar menu de desktop" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Abre o menu desktop se estiver fechado." + "Abre o menu tradicional do desktop." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, - "Desabilitar o modo quiosque" + "Desabilitar modo quiosque" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Desabilita o modo quiosque. É necessária uma reinicialização para que a mudança tenha total efeito." + "Desabilita o modo quiosque. (requer reinício)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, - "Atualizador On-line" + "Atualizador on-line" ) MSG_HASH( MENU_ENUM_SUBLABEL_ONLINE_UPDATER, @@ -129,7 +129,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY, - "Jogo em Rede" + "Jogo em rede" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY, @@ -188,7 +188,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, - "Baixar um núcleo..." + "Baixar um núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, @@ -196,11 +196,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, - "Instalar ou Restaurar um Núcleo" + "Instalar ou restaurar um núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Instala ou restaura um núcleo do diretório de downloads." + "Instala ou restaura um núcleo a partir do diretório 'Downloads'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -208,18 +208,18 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD, - "Iniciar RetroPad Remoto" + "Iniciar RetroPad remoto" ) /* Main Menu > Load Content */ MSG_HASH( MENU_ENUM_LABEL_VALUE_FAVORITES, - "Diretório Inicial" + "Diretório inicial" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OPEN_ARCHIVE, - "Procurar arquivo" + "Explorar arquivo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_ARCHIVE, @@ -234,15 +234,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "O Conteúdo que você adicionar aos 'Favoritos' aparecerá aqui." + "O conteúdo adicionado aos 'Favoritos' aparecerá aqui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, - "Músicas" + "Música" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_MUSIC, - "Músicas que foram reproduzidas aparecem aqui." + "As músicas que foram tocadas anteriormente aparecerá aqui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, @@ -250,7 +250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, - "Imagens que foram exibidas aparecem aqui." + "As imagens que foram visualizadas anteriormente aparecerão aqui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, @@ -258,14 +258,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, - "Vídeos que foram reproduzidos aparecem aqui." + "Os vídeos que foram reproduzidos anteriormente aparecerão aqui." ) /* Main Menu > Online Updater */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST, - "Baixador de núcleo" + "Download de núcleo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_INSTALLED_CORES, @@ -289,7 +289,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Baixe miniaturas individuais para cada entrada da lista de reprodução selecionada." + "Baixe miniaturas para entradas da lista de reprodução selecionada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -305,7 +305,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Atualizar perfis de auto configuração" + "Atualizar perfis de controle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -313,7 +313,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_DATABASES, - "Atualizar Bases de Dados" + "Atualizar bases de dados" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS, @@ -336,7 +336,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFORMATION, - "Informação do Núcleo" + "Informação do núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_INFORMATION, @@ -356,7 +356,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_INFORMATION, - "Exibe as interfaces de rede e endereços de IP associados." + "Mostra as interfaces de rede e endereços de IP associados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFORMATION, @@ -364,11 +364,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, - "Exibe informações específicas do dispositivo." + "Mostra informações específicas do dispositivo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DATABASE_MANAGER, - "Gerenciar Base de Dados" + "Gerenciar base de dados" ) MSG_HASH( MENU_ENUM_SUBLABEL_DATABASE_MANAGER, @@ -387,7 +387,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_NAME, - "Nome do Núcleo" + "Nome do núcleo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_LABEL, @@ -395,11 +395,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_NAME, - "Nome do Sistema" + "Nome do sistema" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_MANUFACTURER, - "Fabricante do Sistema" + "Fabricante do sistema" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_CATEGORIES, @@ -419,11 +419,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_SUPPORTED_EXTENSIONS, - "Extensões Compatíveis" + "Extensões compatíveis" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_INFO_REQUIRED_HW_API, - "API Gráficas Necessárias" + "API gráficas necessárias" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MISSING, @@ -441,14 +441,50 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Obrigatório" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Bloquear núcleo instalado" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Impede a alteração atual do núcleo instalado. Pode ser usado para evitar atualizações indesejadas quando o conteúdo necessitar de uma versão específica do núcleo (por exemplo, conjuntos de ROMs de Arcade)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, - "Excluir o Núcleo" + "Excluir núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Remove este núcleo do disco." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Fazer cópia de segurança do núcleo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Cria uma cópia de segurança do arquivado de núcleo atualmente instalado." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Restaurar cópia de segurança" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Instale uma versão anterior do núcleo a partir de uma lista de cópias de segurança arquivadas." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Excluir cópia de segurança" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Remove um arquivo da lista de cópias de segurança arquivadas." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[Automático]" + ) /* Main Menu > Information > System Information */ @@ -478,15 +514,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CPU_CORES, - "Cores da CPU:" + "Núcleos da CPU:" ) MSG_HASH( MENU_ENUM_SUBLABEL_CPU_CORES, - "Quantidade de Cores que a CPU possui." + "Quantidade de núcleos que a CPU possui." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER, - "Identificador da Interface" + "Identificador da interface" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_OS, @@ -498,19 +534,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE, - "Fonte de Energia" + "Fonte de energia" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_VIDEO_CONTEXT_DRIVER, - "Controlador de Contexto do vídeo" + "Driver de contexto de vídeo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_WIDTH, - "Largura da Tela (milímetros)" + "Exibir largura (milímetros)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_HEIGHT, - "Altura da Tela (milímetros)" + "Exibir altura (milímetros)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_DPI, @@ -518,11 +554,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LIBRETRODB_SUPPORT, - "Compatibilidade com o LibretroDB" + "Suporte a LibretroDB" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OVERLAY_SUPPORT, - "Compatibilidade com Sobreposição" + "Suporte à sobreposições" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COMMAND_IFACE_SUPPORT, @@ -534,7 +570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Suporte a gamepad em rede" + "Suporte a controle em rede" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -906,10 +942,6 @@ MSG_HASH( /* Settings */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS, - "Driver" - ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, "Altera os drivers utilizados pelo sistema." @@ -936,7 +968,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_SETTINGS, - "Altera as configurações de Joypad, Teclado e Mouse." + "Altera as configurações de joypad, teclado e mouse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LATENCY_SETTINGS, @@ -980,11 +1012,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, - "Explorador de arquivos" + "Navegador de arquivos" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Ajusta as definições do navegador de arquivos." + "Ajusta as configurações do navegador de arquivos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, @@ -992,7 +1024,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, - "Altera as configurações de Rebobinamento, Avanço rápido e Câmera lenta." + "Altera as configurações de rebobinamento, avanço rápido e câmera lenta." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, @@ -1091,7 +1123,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Driver de entrada a ser utilizado. Dependendo do driver de vídeo, pode forçar um driver de entrada diferente." + "Driver de entrada a ser utilizado. Alguns drivers de vídeo forçam um driver de entrada diferente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, @@ -1099,7 +1131,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Driver do joypad a ser utilizado." + "Driver de controle a ser utilizado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1133,9 +1165,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Driver de câmera a ser utilizado." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "O Driver Bluetooth que será utilizado." + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Driver de WiFi a ser utilizado." + "Driver de Wi-Fi a ser utilizado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1234,7 +1270,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Insere um quadro opaco entre os quadros. Útil para usuários com telas de 120Hz que desejam jogar conteúdos em 60Hz para eliminar efeito de fantasma." + "Insere um quadro preto entre os quadros. Útil em algumas telas de alta taxa de atualização para eliminar efeito fantasma." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1344,7 +1380,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_REFRESH_RATE_AUTO, - "Taxa de quadros estimada da tela" + "Taxa de atualização estimada da tela" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_REFRESH_RATE_AUTO, @@ -1418,7 +1454,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS, - "Exibir botões em janela" + "Mostrar botões em janela" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SAVE_POSITION, @@ -1453,7 +1489,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SCALE_INTEGER, - "Apenas dimensiona o vídeo em valores inteiros. O tamanho de base depende da geometria relatada pelo sistema e da proporção de tela. Se 'Forçar proporção' não estiver definido, X / Y serão dimensionados independentemente em valores inteiros." + "Apenas dimensiona o vídeo em valores inteiros. O tamanho de base depende da geometria relatada pelo sistema e da proporção de tela. Se 'Forçar proporção da tela' não estiver definido, X / Y serão dimensionados independentemente em valores inteiros." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_INDEX, @@ -1473,7 +1509,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Deslocamento personalizado no eixo-X da janela de exibição. Será ignorado se a 'Escala com valores inteiros' estiver habilitada. Neste caso ela será centralizada automaticamente." + "Deslocamento personalizado no eixo-X da janela de exibição. Será ignorado se a 'Escala com valores inteiros' estiver habilitada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1481,7 +1517,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Deslocamento personalizado no eixo-Y da janela de exibição. Será ignorado se a 'Escala com valores inteiros' estiver habilitada. Neste caso ela será centralizada automaticamente." + "Deslocamento personalizado no eixo-Y da janela de exibição. Será ignorado se a 'Escala com valores inteiros' estiver habilitada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1501,18 +1537,18 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, - "Cortar overscan (reiniciar)" + "Cortar overscan (recarregar)" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Corta alguns pixels ao redor das bordas da imagem habitualmente deixada em branco por desenvolvedores, que por vezes também contêm pixels de lixo." + "Corta alguns pixels nas bordas da imagem normalmente deixados em branco por desenvolvedores, que por vezes também contêm pixels de lixo. (requer reinício)" ) /* Settings > Video > Synchronization */ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VSYNC, - "Sincronização vertical (V-Sync)" + "Sincronização vertical (Vsync)" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VSYNC, @@ -1520,11 +1556,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SWAP_INTERVAL, - "Intervalo de troca da sincronização vertical (V-Sync)" + "Intervalo de troca da sincronização vertical (Vsync)" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, - "Usa um intervalo de troca personalizado para V-Sync. Defina para reduzir efetivamente a taxa de atualização do monitor pela metade." + "Usa um intervalo de troca personalizado para Vsync. Defina para reduzir efetivamente a taxa de atualização do monitor pela metade." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, @@ -1532,7 +1568,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "O V-Sync é ativado até o desempenho ficar abaixo da taxa de atualização desejada.\nPode minimizar as travadas quando o desempenho cai abaixo do tempo real e pode ser mais eficiente em termos energéticos." + "A sincronização vertical está habilitado até que o desempenho caia abaixo da taxa de atualização alvo. Pode minimizar travamentos quando o desempenho cai abaixo do tempo real e ser mais eficiente em termos de energia." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1564,7 +1600,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Não desvia dos tempos solicitados pelo núcleo. Use com telas de Taxa de Atualização Variável, G-Sync, FreeSync." + "Não desvia dos tempos solicitados pelo núcleo. Use com telas de Taxa de Atualização Variável (G-Sync, FreeSync, HDMI 2.1 VRR)." ) /* Settings > Audio */ @@ -1682,15 +1718,15 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE, - "Habilitar áudio" + "Áudio" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE, - "Habilita a saída de áudio." + "Determina se o áudio é emitido." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_DEVICE, - "Dispositivo de áudio" + "Dispositivo" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_DEVICE, @@ -1728,7 +1764,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_SYNC, - "Sincronizar áudio" + "Sincronização" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, @@ -1823,29 +1859,25 @@ MSG_HASH( /* Settings > Audio > Menu Sounds */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, - "Mixer de áudio" - ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, "Reproduz várias faixas de áudio de uma só vez, mesmo dentro do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "Ativar som de OK" + "Ativar som de 'OK'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, - "Ativar som de cancelamento" + "Ativar som de 'Cancelamento'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_NOTICE, - "Ativar som de aviso" + "Ativar som de 'Aviso'" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "Ativar música de fundo" + "Ativar 'Música de fundo'" ) /* Settings > Input */ @@ -1868,19 +1900,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Remapear vínculos para este núcleo" + "Remapear controles para este núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Se ativado, substitui os vínculos de entrada com as associações remapeadas definidas para o núcleo atual." + "Substitui os vínculos de entrada com as associações remapeadas definidas para o núcleo atual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, - "Habilitar auto configuração" + "Auto configuração" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Habilita a detecção automática de entrada. Tentará configurar automaticamente joypads, estilo Plug-and-Play." + "Configura automaticamente os controles que possuem um perfil, estilo Plug-and-Play." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, @@ -1920,7 +1952,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Descreve o período quando os botões com turbo habilitado são alternados. Os números são descritos em quadros." + "O período (em quadros) em que os botões habilitados com turbo são alternados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1964,7 +1996,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Vínculos das teclas de atalho da entrada" + "Teclas de atalho" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1972,7 +2004,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Vínculos de entrada do usuário %u" + "Controles da porta %u" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -2002,7 +2034,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Inverter botões OK e cancelar do menu" + "Inverter botões OK e Cancelar do menu" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, @@ -2021,176 +2053,356 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Pressione Sair duas vezes" + "Confirmar saída" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Pressione a tecla de atalho Sair duas vezes para sair do RetroArch." + "Requer que a tecla de atalho 'Sair' seja pressionada duas vezes para sair do RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Combinação do gamepad para alternar o menu" + "Combinação do controle para alternar o menu" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Combinação de botões do Gamepad para alternar o menu." + "Combinação de botões do controle para alternar o menu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Atraso da tecla de atalho (quadros)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Adiciona um atraso nos quadros antes que a entrada normal seja bloqueada após pressionar (e segurar) a 'Tecla de atalho' atribuída. Permite que a entrada normal da 'Tecla de atalho' seja capturada quando mapeada para outra ação (por exemplo, RetroPad 'Selecionar')." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Alternar avanço rápido" + "Avanço rápido (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Alterna entre avanço rápido e velocidade normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Manter avanço rápido" + "Avanço rápido (segurar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Habilita o avanço rápido enquanto a tecla é pressionada. O conteúdo é executado na velocidade normal quando a tecla é liberada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Alternar câmera lenta" + "Câmera lenta (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Alterna entre câmera lenta e velocidade normal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Manter câmera lenta" + "Câmera lenta (segurar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "Habilita a câmera lenta enquanto a tecla é pressionada. O conteúdo é executado na velocidade normal quando a tecla é liberada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Carregar jogo salvo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "Carrega um jogo salvo do compartimento atualmente selecionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Salvar jogo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Salva um jogo no compartimento atualmente selecionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Alternar tela cheia" + "Tela cheia (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Alterna entre os modos de exibição em tela cheia e em janela." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Sair do RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "Fecha o RetroArch, garantindo que todos os dados salvos e arquivos de configuração sejam liberados para o disco." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "Compartimento de jogo salvo +" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "Aumenta o índice do compartimento de jogo salvo atualmente selecionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "Compartimento de jogo salvo -" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "Diminui o índice do compartimento de jogo salvo atualmente selecionado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Rebobinar" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "Rebobina o conteúdo atual enquanto a tecla é pressionada. Nota: 'Suporte à rebobinagem' deve estar habilitado." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Alternar gravação de filme" + "Gravar replay de entrada (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "Alterna entre ligada/desligada as entradas da gravação de jogos no formato .bsv." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Alternar pausa" + "Pausa (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "Alterna entre os estados pausado ​​e não pausado do conteúdo em execução." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Avanço de quadro" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "Quando pausado, avança o conteúdo em um quadro." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Reiniciar jogo" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "Reinicia o conteúdo atual desde o início." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Próximo shader" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "Carrega e aplica o próximo arquivo de predefinição de shader na raiz do diretório de 'Shader de vídeo'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Shader anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "Carrega e aplica o arquivo de predefinição de shader anterior na raiz do diretório de 'Shader de vídeo'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Índice de trapaça +" + "Próximo índice de trapaça" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "Aumenta o índice de trapaça selecionado atualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Índice de trapaça -" + "Índice de trapaça anterior" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "Diminui o índice de trapaça selecionado atualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Alternar trapaça" + "Trapaças (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "Alterna entre ligada e desligada a trapaça atualmente selecionada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Capturar tela" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "Captura uma imagem do conteúdo atual." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Alternar áudio mudo" + "Áudio mudo (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "Alterna a saída de áudio entre ligada e desligada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Alternar teclado virtual" + "Teclado virtual (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Alterna o teclado virtual entre ligado e desligado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "Alternar FPS" + "Mostrar FPS (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "Alterna o indicador de estado dos 'quadros por segundo' entre ligado e desligado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Enviar informações de depuração" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Envia informações de diagnóstico sobre o seu dispositivo e a configuração do RetroArch aos nossos servidores para análise." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "Alternar hospedagem de jogo em rede" + "Hospedagem de jogo em rede (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "Alterna a hospedagem de jogo em rede entre ligada e desligada." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Alternar modo jogador/espectador do jogo em rede" + "Modo jogador/espectador do jogo em rede (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "Alterna a sessão atual de jogo entre os modos 'jogador' e 'espectador'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Habilitar teclas de atalho" + "Ativar tecla de atalho" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "Quando atribuída, a 'Tecla de atalho' deve ser pressionada (e mantida) antes que outras teclas de atalho sejam reconhecidas. Permite que os botões do controle sejam mapeados para as funções de teclas de atalho sem afetar a entrada normal." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, + "Aumentar volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Aumenta o nível do volume da saída de áudio." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, + "Diminuir volume" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "Diminui o nível do volume da saída de áudio." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, "Próxima sobreposição" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT, + "Muda para o próximo esquema disponível da sobreposição atualmente ativa na tela." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Alternar ejeção de disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "Se a bandeja de disco virtual estiver fechada, ela abre e remove o disco carregado. Caso contrário, insere o disco atualmente selecionado e fecha a bandeja." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, "Próximo disco" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "Incrementa o índice de disco selecionado atualmente. Nota: A bandeja de disco virtual deve estar aberta." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, "Disco anterior" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "Diminui o índice de disco selecionado atualmente. Nota: A bandeja de disco virtual deve estar aberta." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Alternar captura do mouse" + "Captura do mouse (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GRAB_MOUSE_TOGGLE, + "Captura ou libera o mouse. Quando capturado, o cursor do sistema fica oculto e confinado à janela de exibição do RetroArch, melhorando a entrada relativa do mouse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Alternar foco do jogo" + "Foco do jogo (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GAME_FOCUS_TOGGLE, + "Habilita ou desabilita o modo 'Foco do jogo'. Quando o conteúdo está focado, as teclas de atalho são desabilitadas (a entrada completa do teclado é passada para o núcleo em execução) e o mouse é capturado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Alternar menu de desktop" + "Menu do desktop (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_UI_COMPANION_TOGGLE, + "Abre a interface do usuário de desktop WIMP (janelas, ícones, menus, ponteiro)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Alternar menu" + "Menu (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MENU_TOGGLE, + "Alterna a exibição atual entre menu e conteúdo em execução." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Alternar gravação" + "Gravação (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "Inicia ou interrompe a gravação da sessão atual em um arquivo de vídeo local." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Alternar transmissão" + "Transmissão (alternar)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "Inicia ou interrompe o transmissão da sessão atual para uma plataforma de vídeo online." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "Serviço de IA" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "Captura uma imagem do conteúdo atual e depois traduz e/ou lê em voz alta qualquer texto na tela. Nota: o 'Serviço de IA' deve estar habilitado e configurado." + ) /* Settings > Input > Port # Binds */ @@ -2208,15 +2420,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Vincular todos" + "Definir todos os controles" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Vincular todos pelo padrão" + "Restaurar controles padrão" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Salvar auto configuração" + "Salvar perfil de controle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2240,19 +2452,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Direcional para cima" + "Direcional digital para cima" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "Direcional para baixo" + "Direcional digital para baixo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Direcional esquerdo" + "Direcional digital esquerdo" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Direcional direito" + "Direcional digital direito" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2348,23 +2560,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, - "D-pad cima da pistola" + "Direcional digital cima da pistola" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, - "D-pad baixo da pistola" + "Direcional digital baixo da pistola" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, - "D-pad esquerdo da pistola" + "Direcional digital esquerdo da pistola" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, - "D-pad direito da pistola" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, - "Habilitar turbo" + "Direcional digital direito da pistola" ) /* Settings > Latency */ @@ -2379,7 +2587,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_FRAMES, - "Número de quadros para antecipar" + "Número de quadros para a execução antecipada" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_FRAMES, @@ -2387,7 +2595,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "A antecipação de quadro usará uma segunda instância" + "Usar segunda instância para a antecipação de quadro" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, @@ -2418,15 +2626,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Permite que os núcleos forcem um driver de vídeo diferente do que está em uso." + "Permite que os núcleos alternem para um driver de vídeo diferente do que o usado atualmente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, - "Carregar vazio ao fechar o núcleo" + "Ao fechar o núcleo, carregar um núcleo falso" ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Alguns núcleos podem ter um recurso de desligamento. Se habilitado, impedirá que o núcleo feche o RetroArch. Em vez disto, carrega um núcleo vazio." + "Alguns núcleos têm um recurso de desligamento. Ao carregar um núcleo falso impedirá o RetroArch de desligar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2440,13 +2648,31 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Verifica se todos os firmwares necessários estão presentes antes de tentar carregar conteúdo." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Sempre recarregar o núcleo na execução de conteúdo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Reinicie o RetroArch ao iniciar o conteúdo, mesmo que o núcleo já esteja carregado. Isto pode melhorar a estabilidade do sistema, ao custo do aumento do tempo de carregamento." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Permitir rotação" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Permite que os núcleos definam a rotação. Quando desabilitado, as requisições de rotação são ignoradas. Útil para configurações onde se rotaciona manualmente a tela." + "Permite que os núcleos definam a rotação. Quando desabilitado, as requisições de rotação são ignoradas. Útil para configurações que giram manualmente a tela." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Gerenciar núcleos" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Executa tarefas de manutenção offline nos núcleos instalados (cópia de segurança, restauração, exclusão etc.) e visualiza as informações principais." ) /* Settings > Configuration */ @@ -2528,15 +2754,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Salva automaticamente o SaveRAM não-volátil em um intervalo regular. Isso está desabilitado por padrão, a menos que seja definido de outra forma. O intervalo é medido em segundos. Um valor de 0 desativa o salvamento automático." + "Salva automaticamente o SaveRAM não volátil em um intervalo regular (em segundos)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Índice automático de jogo salvo" + "Aumentar índice de jogos salvos automaticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Ao criar um jogo salvo, o índice do jogo salvo é aumentado automaticamente antes de ser salvo. Ao carregar um conteúdo, o índice será definido para o índice mais alto existente." + "Antes de criar um jogo salvo, o índice do do salvamento é aumentado automaticamente. Ao carregar o conteúdo, o índice será definido como o índice mais alto existente." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2544,7 +2770,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Cria automaticamente um jogo salvo ao encerrar o RetroArch. Ele carregará automaticamente se a função 'Carregar automaticamente jogo salvo' estiver habilitada." + "Cria automaticamente um jogo salvo quando o conteúdo é fechado. O RetroArch carregará automaticamente esse jogo salvo se 'Carregar automaticamente jogo salvo' estiver ativado." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, @@ -2560,7 +2786,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Mostrar miniaturas de estados salvos dentro do menu." + "Mostra miniaturas de estados salvos no menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, @@ -2659,18 +2885,18 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "Contadores de desempenho para o RetroArch (e núcleos).\nOs dados obtidos podem ser úteis em definir gargalos e ajustar o desempenho do sistema e do aplicativo" + "Contadores de desempenho para o RetroArch e núcleos. Os dados obtidos podem ser úteis em definir gargalos e ajustar o desempenho do sistema e do aplicativo." ) /* Settings > File Browser */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Exibir arquivos e pastas ocultas" + "Mostrar arquivos e pastas ocultas" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Exibe arquivos e diretórios ocultos no navegador de arquivos." + "Mostra arquivos e diretórios ocultos no navegador de arquivos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2678,7 +2904,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Filtra os arquivos em exibição no explorador de arquivos por extensões suportadas." + "Filtra os arquivos em exibição no navegador de arquivos por extensões suportadas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2709,7 +2935,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Velocidade máxima de execução" + "Taxa de avanço rápido" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, @@ -2721,7 +2947,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "Quando está em Câmera Lenta, o conteúdo será diminuído pelo fator especificado/definido." + "A taxa que o conteúdo será reproduzido ao usar a câmera lenta." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2736,19 +2962,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, - "Habilitar rebobinagem" + "Suporte à rebobinagem" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Cometeu um erro? Rebobine e tente novamente.\nCuidado pois isso causa um impacto no desempenho ao jogar." + "Retorne ao ponto anterior na partida atual. Isso causa um grande impacto no desempenho ao jogar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Níveis do rebobinamento" + "Rebobinar quadros" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Ao definir um número de quadros para o rebobinamento, você pode retroceder vários quadros de uma só vez, aumentando a velocidade da função." + "O número de quadros rebobinados por vez, valores mais altos aumentam a velocidade de rebobinamento." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2802,7 +3028,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Carregar configuração de gravação..." + "Configuração de gravação personalizada" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, @@ -2880,11 +3106,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_ENABLE, - "Mostrar sobreposição" + "Exibir sobreposição" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_ENABLE, - "As Sobreposições são usadas para bordas e controles na tela" + "As sobreposições são usadas para bordas e controles na tela" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_HIDE_IN_MENU, @@ -2896,23 +3122,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, - "Exibir comandos na sobreposição" + "Mostrar comandos na sobreposição" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS, - "Exibe comandos de teclado/controle na sobreposição." + "Mostra comandos de teclado/controle na sobreposição." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, - "Porta de escuta para as entradas " + "Mostrar portas receptoras de entrada" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_PHYSICAL_INPUTS_PORT, - "Seleciona a porta para a sobreposição escutar se 'Exibir comandos na sobreposição' estiver habilitado." + "Selecione a porta que a sobreposição ouvirá se a opção 'Mostrar comandos na sobreposição' estiver ativa." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, - "Exibir cursor do mouse na sobreposição" + "Mostrar cursor do mouse na sobreposição" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, @@ -2959,6 +3185,24 @@ MSG_HASH( "Escala de todos os elementos de interface da sobreposição." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "Deslocamento X da sobreposição" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "Deslocamento X de todos os elementos da interface do usuário da sobreposição." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Deslocamento Y da sobreposição" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "Deslocamento Y de todos os elementos da interface do usuário da sobreposição." + ) + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -2994,7 +3238,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_ENABLE, - "Exibe as mensagens na tela." + "Mostra as mensagens na tela." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, @@ -3002,11 +3246,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Usa animações decoradas modernas, notificações, indicadores e controles em vez do sistema antigo de texto." + "Usa animações decoradas, notificações, indicadores e controles." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Escala automática nos widgets gráficos" + "Dimensionar widgets gráficos automaticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, @@ -3018,7 +3262,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Aplica uma substituição manual da escala ao desenhar os widgets na tela no modo de tela cheia. Aplica-se apenas quando 'Escala automática nos widgets gráficos' está desativado. Pode ser usado para aumentar ou diminuir o tamanho das notificações, indicadores e controles decorados independentemente do próprio menu." + "Aplica uma substituição manual da escala ao desenhar os widgets na tela. Aplica-se apenas quando 'Dimensionar widgets gráficos automaticamente' está desativado. Pode ser usado para aumentar ou diminuir o tamanho das notificações, indicadores e controles decorados independentemente do próprio menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, @@ -3046,7 +3290,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW, - "Exibir contagem de quadros na tela FPS" + "Exibir contagem de quadros" ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAMECOUNT_SHOW, @@ -3058,15 +3302,23 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, - "Exibe estatísticas técnicas na tela." + "Mostra estatísticas técnicas na tela." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Incluir detalhes da memória" + "Exibir uso da memória" ) MSG_HASH( MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Inclui o uso de memória atual/total na tela com FPS/Quadros." + "Exibe a quantidade total e utilizada de memória no sistema." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Notificação ao iniciar o carregamento de conteúdo" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Mostra uma breve animação como retorno ao carregar um conteúdo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, @@ -3074,7 +3326,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Seleciona uma fonte diferente para as notificações na tela." + "Seleciona a fonte para as notificações na tela." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -3137,11 +3389,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Visualizações" + "Visibilidade dos itens do menu" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Exibe elementos na tela de menu." + "Alterna a visibilidade dos itens do menu no RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -3153,11 +3405,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, - "Exibir configurações avançadas" + "Mostrar configurações avançadas" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Exibe as configurações avançadas para usuários experientes (oculto por padrão)." + "Mostra as configurações avançadas para usuários experientes." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3185,7 +3437,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausar quando o menu for ativado" + "Pausar conteúdo quando o menu estiver ativado" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, @@ -3197,7 +3449,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Fecha automaticamente o menu e continue o conteúdo atual depois de selecionar 'Salvar jogo' ou 'Carregar jogo salvo' no menu rápido. Desativar isso pode melhorar o desempenho ao salvar um jogo em dispositivos muito lentos." + "Fecha automaticamente o menu e continua o conteúdo atual após salvar ou carregar um jogo salvo. Desativar isso pode melhorar o desempenho ao salvar um jogo em dispositivos muito lentos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, @@ -3213,7 +3465,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Habilita o controle por mouse dentro do menu." + "Permite que o menu seja controlado com um mouse." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -3221,7 +3473,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Habilita o controle por toque dentro do menu." + "Permite que o menu seja controlado com uma tela sensível ao toque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, @@ -3233,7 +3485,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Não rodar em segundo plano" + "Pausar o conteúdo quando não estiver ativo" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -3261,7 +3513,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Executar o assistente de interface na inicialização" + "Iniciar o assistente de interface na inicialização" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, @@ -3269,11 +3521,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Habilitar menu de desktop (reiniciar)" + "Habilitar menu de desktop (requer reinício)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Mostrar menu de desktop na inicialização" + "Abrir o menu de desktop na inicialização" ) /* Settings > User Interface > Views */ @@ -3284,7 +3536,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Exibe ou oculta elementos na tela de menu rápido." + "Alterne a visibilidade dos itens do menu no 'Menu rápido'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, @@ -3292,115 +3544,115 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Exibe ou oculta elementos na tela de Configurações." + "Alterna a visibilidade dos itens de menu nas 'Configurações'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, - "Exibir 'Carregar núcleo'" + "Mostrar 'Carregar núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CORE, - "Exibe ou oculta a opção 'Carregar núcleo'." + "Mostra ou oculta a opção 'Carregar núcleo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, - "Exibir 'Carregar conteúdo'" + "Mostrar 'Carregar conteúdo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, - "Exibe ou oculta a opção 'Carregar conteúdo'." + "Mostra ou oculta a opção 'Carregar conteúdo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_DISC, - "Exibir 'Carregar disco'" + "Mostrar 'Carregar disco'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_DISC, - "Exibe ou oculta a opção 'Carregar disco'." + "Mostra ou oculta a opção 'Carregar disco'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_DUMP_DISC, - "Exibir 'Criar cópia do disco'" + "Mostrar 'Criar cópia do disco'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_DUMP_DISC, - "Exibe ou oculta a opção 'Criar cópia do disco'." + "Mostra ou oculta a opção 'Criar cópia do disco'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_ONLINE_UPDATER, - "Exibir 'Atualizador on-line'" + "Mostrar 'Atualizador on-line'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER, - "Exibi ou oculta a opção 'Atualizador on-line'." + "Mostra ou oculta a opção 'Atualizador on-line'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER, - "Mostrar o baixador de núcleo" + "Mostrar 'Download de núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, - "Exibi ou oculta a opção de atualizar núcleos (e arquivos de informação de núcleo)." + "Mostra ou oculta a opção de atualizar núcleos (e arquivos de informação de núcleo)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, - "Exibir o antigo atualizador de miniaturas" + "Mostrar o antigo atualizador de miniaturas" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, - "Mostrar ou ocultar a capacidade de baixar o antigo pacote de miniaturas." + "Mostra ou oculta a capacidade de baixar o antigo pacote de miniaturas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, - "Exibir 'Informação'" + "Mostrar 'Informação'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_INFORMATION, - "Exibi ou oculta a opção 'Informação'." + "Mostra ou oculta a opção 'Informação'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_CONFIGURATIONS, - "Exibir 'Arquivo de configuração'" + "Mostrar 'Arquivo de configuração'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CONFIGURATIONS, - "Exibe ou oculta a opção 'Arquivo de configuração'." + "Mostra ou oculta a opção 'Arquivo de configuração'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_HELP, - "Exibir 'Ajuda'" + "Mostrar 'Ajuda'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_HELP, - "Exibe ou oculta a opção 'Ajuda'." + "Mostra ou oculta a opção 'Ajuda'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_QUIT_RETROARCH, - "Exibir 'Sair do RetroArch'" + "Mostrar 'Sair do RetroArch'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_QUIT_RETROARCH, - "Exibe ou oculta a opção 'Sair do RetroArch'." + "Mostra ou oculta a opção 'Sair do RetroArch'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_RESTART_RETROARCH, - "Exibir 'Reiniciar o RetroArch'" + "Mostrar 'Reiniciar o RetroArch'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_RESTART_RETROARCH, - "Exibe ou oculta a opção 'Reiniciar o RetroArch'" + "Mostra ou oculta a opção 'Reiniciar o RetroArch'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS, - "Exibir aba 'Configurações'" + "Mostrar aba 'Configurações'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, - "Exibe a aba de configurações dentro do menu principal." + "Mostra a aba de 'Configurações' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Definir senha para habilitar aba de configurações" + "Definir senha para habilitar a aba 'Configurações'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, @@ -3408,75 +3660,75 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_FAVORITES, - "Exibir aba 'Favoritos'" + "Mostrar aba 'Favoritos'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_FAVORITES, - "Exibe a aba de favoritos dentro do menu principal." + "Mostra a aba 'Favoritos' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_IMAGES, - "Exibir aba 'Imagem'" + "Mostrar aba 'Imagens'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_IMAGES, - "Exibe a aba de imagem dentro do menu principal." + "Mostra a aba 'Imagens' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_MUSIC, - "Exibir aba 'Música'" + "Mostrar aba 'Música'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_MUSIC, - "Exibe a aba de música dentro do menu principal." + "Mostra a aba 'Música' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO, - "Exibir aba 'Vídeo'" + "Mostrar aba 'Vídeos'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO, - "Exibe a aba de vídeo dentro do menu principal." + "Mostra a aba 'Vídeos' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_NETPLAY, - "Exibir aba 'Jogo em rede'" + "Mostrar aba 'Jogo em rede'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_NETPLAY, - "Exibe a aba de jogo em rede dentro do menu principal." + "Mostra a aba 'Jogo em rede' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_HISTORY, - "Exibir aba 'Histórico'" + "Mostrar aba 'Histórico'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_HISTORY, - "Exibe a aba de histórico recente dentro do menu principal." + "Mostra a aba 'Histórico' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_ADD, - "Exibir aba 'Importar conteúdo'" + "Mostrar aba 'Importar conteúdo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_ADD, - "Exibe a aba de importação de conteúdo dentro do menu principal." + "Mostra a aba 'Importar conteúdo' dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_PLAYLISTS, - "Exibir aba de lista de reprodução" + "Mostrar aba de lista de reprodução" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_PLAYLISTS, - "Exibe abas da lista de reprodução dentro do menu principal." + "Mostra abas de lista de reprodução dentro do menu principal." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_ENABLE, - "Exibir data e hora" + "Mostrar data e hora" ) MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE, - "Exibe data e/ou hora atuais dentro do menu." + "Mostra data e/ou hora atuais dentro do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_STYLE, @@ -3488,27 +3740,27 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_DATE_SEPARATOR, - "Separador de Data" + "Separador de data" ) MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_DATE_SEPARATOR, - "Especifica o caractere a ser usado como um separador entre componentes de ano/mês/dia quando a data atual é mostrada dentro do menu." + "Especifica o caractere a ser usado como um separador entre os componentes dia/mês/ano quando a data atual é mostrada dentro do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE, - "Exibir nível de bateria" + "Mostrar nível de bateria" ) MSG_HASH( MENU_ENUM_SUBLABEL_BATTERY_LEVEL_ENABLE, - "Exibe o nível de bateria atual dentro do menu." + "Mostra o nível de bateria atual dentro do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_ENABLE, - "Exibir nome do núcleo" + "Mostrar nome do núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_ENABLE, - "Exibe o nome do núcleo atual dentro do menu." + "Mostra o nome do núcleo atual dentro do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, @@ -3516,162 +3768,162 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Mostra informações adicionais para a entrada de menu atualmente selecionada." + "Fornece informações adicionais para os itens do menu." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, - "Mostrar Tela Inicial" + "Exibir tela inicial" ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN, - "Exibe a tela inicial no menu. É automaticamente definido como falso após o programa iniciar pela primeira vez." + "Mostra a tela inicial no menu. É automaticamente definido como falso após o programa iniciar pela primeira vez." ) /* Settings > User Interface > Views > Quick Menu */ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESUME_CONTENT, - "Exibir 'Continuar conteúdo'" + "Mostrar 'Continuar conteúdo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESUME_CONTENT, - "Exibe ou oculta a opção 'Continuar conteúdo'." + "Mostra ou oculta a opção 'Continuar conteúdo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESTART_CONTENT, - "Exibir 'Reiniciar conteúdo'" + "Mostrar 'Reiniciar conteúdo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESTART_CONTENT, - "Exibe ou oculta a opção 'Reiniciar conteúdo'." + "Mostra ou oculta a opção 'Reiniciar conteúdo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CLOSE_CONTENT, - "Exibir 'Fechar conteúdo'" + "Mostrar 'Fechar conteúdo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CLOSE_CONTENT, - "Exibe ou oculta a opção 'Fechar conteúdo'." + "Mostra ou oculta a opção 'Fechar conteúdo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, - "Exibir 'Captura de tela'" + "Mostrar 'Captura de tela'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_TAKE_SCREENSHOT, - "Exibe ou oculta a opção 'Captura de tela'." + "Mostra ou oculta a opção 'Captura de tela'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_LOAD_STATE, - "Exibir 'Salvar/Carregar jogo salvo'" + "Mostrar 'Salvar/Carregar jogo salvo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_LOAD_STATE, - "Exibe ou oculta as opções para salvar/carregar jogos salvos." + "Mostra ou oculta as opções para salvar/carregar jogos salvos." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, - "Exibir 'Desfazer salvamento/carregamento de jogo salvo'" + "Mostrar 'Desfazer salvamento/carregamento de jogo salvo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_UNDO_SAVE_LOAD_STATE, - "Exibe ou oculta as opções para desfazer o salvar/carregar jogo salvo." + "Mostra ou oculta as opções para desfazer o salvar/carregar jogo salvo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_ADD_TO_FAVORITES, - "Exibir 'Adicionar aos favoritos'" + "Mostrar 'Adicionar aos favoritos'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_ADD_TO_FAVORITES, - "Exibe ou oculta a opção 'Adicionar aos favoritos'." + "Mostra ou oculta a opção 'Adicionar aos favoritos'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_RECORDING, - "Exibir 'Iniciar gravação'" + "Mostrar 'Iniciar gravação'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_RECORDING, - "Exibe ou oculta a opção 'Iniciar gravação'." + "Mostra ou oculta a opção 'Iniciar gravação'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_START_STREAMING, - "Exibir 'Iniciar transmissão'" + "Mostrar 'Iniciar transmissão'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_START_STREAMING, - "Exibe ou oculta a opção 'Iniciar transmissão'." + "Mostra ou oculta a opção 'Iniciar transmissão'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, - "Exibir 'Definir associação do núcleo'" + "Mostrar 'Definir associação do núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SET_CORE_ASSOCIATION, - "Exibe ou oculta a opção 'Definir associação do núcleo'." + "Mostra ou oculta a opção 'Definir associação do núcleo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, - "Exibir 'Redefinir associação do núcleo'" + "Mostrar 'Redefinir associação do núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESET_CORE_ASSOCIATION, - "Exibe ou oculta a opção 'Redefinir associação do núcleo'." + "Mostra ou oculta a opção 'Redefinir associação do núcleo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_OPTIONS, - "Exibir 'Opções'" + "Mostrar 'Opções'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_OPTIONS, - "Exibe ou oculta a opção 'Opções'." + "Mostra ou oculta a opção 'Opções'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CONTROLS, - "Exibir 'Controles'" + "Mostrar 'Controles'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CONTROLS, - "Exibe ou oculta a opção 'Controles'." + "Mostra ou oculta a opção 'Controles'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CHEATS, - "Exibir 'Trapaças'" + "Mostrar 'Trapaças'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CHEATS, - "Exibe ou oculta a opção 'Trapaças'." + "Mostra ou oculta a opção 'Trapaças'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SHADERS, - "Exibir 'Shaders'" + "Mostrar 'Shaders'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SHADERS, - "Exibe ou oculta a opção 'Shaders'." + "Mostra ou oculta a opção 'Shaders'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_REWIND, - "Exibir configurações de rebobinamento" + "Mostrar configurações de rebobinamento" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_REWIND, - "Exibe ou oculta as opções de rebobinamento." + "Mostra ou oculta as opções de rebobinamento." ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_LATENCY, - "Exibe ou oculta as opções de latência." + "Mostra ou oculta as opções de latência." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_LATENCY, - "Exibir configurações de latência" + "Mostrar configurações de latência" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_OVERLAYS, - "Exibe ou oculta as opções de sobreposição." + "Mostra ou oculta as opções de sobreposição." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_OVERLAYS, - "Exibir configurações de sobreposição" + "Mostrar configurações de sobreposição" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_VIDEO_LAYOUT, @@ -3679,202 +3931,202 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_VIDEO_LAYOUT, - "Mostrar ou ocultar opções de esquema de vídeo." + "Mostra ou ocultar opções de esquema de vídeo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, - "Exibir 'Salvar personalização de núcleo'" + "Mostrar 'Salvar personalização de núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_CORE_OVERRIDES, - "Exibe ou oculta a opção 'Salvar personalização de núcleo'." + "Mostra ou oculta a opção 'Salvar personalização de núcleo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, - "Exibir 'Salvar personalização de jogo'" + "Mostrar 'Salvar personalização de jogo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_SAVE_GAME_OVERRIDES, - "Exibe ou oculta a opção 'Salvar personalização de jogo'." + "Mostra ou oculta a opção 'Salvar personalização de jogo'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION, - "Exibir 'Informação'" + "Mostrar 'Informação'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION, - "Exibe ou oculta a opção 'Informação'." + "Mostra ou oculta a opção 'Informação'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_DOWNLOAD_THUMBNAILS, - "Exibir 'Baixar miniaturas'" + "Mostrar 'Baixar miniaturas'" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_DOWNLOAD_THUMBNAILS, - "Exibe ou oculta a opção 'Baixar miniaturas'." + "Mostra ou oculta a opção 'Baixar miniaturas'." ) /* Settings > User Interface > Views > Settings */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DRIVERS, - "Exibir 'Driver'" + "Mostrar 'Drivers'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DRIVERS, - "Exibe ou oculta a opção 'Driver' na tela de Configurações." + "Mostra ou oculta a opção 'Driver' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_VIDEO, - "Exibir 'Vídeo'" + "Mostrar 'Vídeo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_VIDEO, - "Exibe ou oculta a opção 'Vídeo' na tela de Configurações." + "Mostra ou oculta a opção 'Vídeo' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AUDIO, - "Exibir 'Áudio'" + "Mostrar 'Áudio'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AUDIO, - "Exibe ou oculta a opção 'Áudio' na tela de Configurações." + "Mostra ou oculta a opção 'Áudio' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_INPUT, - "Exibir 'Entrada'" + "Mostrar 'Entrada'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_INPUT, - "Exibe ou oculta a opção 'Entrada' na tela de Configurações." + "Mostra ou oculta a opção 'Entrada' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LATENCY, - "Exibir 'Latência'" + "Mostrar 'Latência'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LATENCY, - "Exibe ou oculta a opção 'Latência' na tela de Configurações." + "Mostra ou oculta a opção 'Latência' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CORE, - "Exibir 'Núcleo'" + "Mostrar 'Núcleo'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CORE, - "Exibe ou oculta a opção 'Núcleo' na tela de Configurações." + "Mostra ou oculta a opção 'Núcleo' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_CONFIGURATION, - "Exibir 'Configuração'" + "Mostrar 'Configuração'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_CONFIGURATION, - "Exibe ou oculta a opção 'Configuração' na tela de Configurações." + "Mostra ou oculta a opção 'Configuração' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_SAVING, - "Exibir 'Salvamento'" + "Mostrar 'Salvamento'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_SAVING, - "Exibe ou oculta a opção 'Salvamento' na tela de Configurações." + "Mostra ou oculta a opção 'Salvamento' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_LOGGING, - "Exibir 'Registro de eventos'" + "Mostrar 'Registro de eventos'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_LOGGING, - "Exibe ou oculta a opção 'Registro de eventos' na tela de Configurações." + "Mostra ou oculta a opção 'Registro de eventos' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_FRAME_THROTTLE, - "Exibir 'Controle de quadros'" + "Mostrar 'Controle de quadros'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_FRAME_THROTTLE, - "Exibe ou oculta a opção 'Controle de quadros' na tela de Configurações." + "Mostra ou oculta a opção 'Controle de quadros' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_RECORDING, - "Exibir 'Gravação'" + "Mostrar 'Gravação'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_RECORDING, - "Exibe ou oculta a opção 'Gravação' na tela de Configurações." + "Mostra ou oculta a opção 'Gravação' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ONSCREEN_DISPLAY, - "Exibir 'Exibição na tela'" + "Mostrar 'Exibição na tela'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ONSCREEN_DISPLAY, - "Exibe ou oculta a opção 'Exibição na tela' na tela de Configurações." + "Mostra ou oculta a opção 'Exibição na tela' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER_INTERFACE, - "Exibir 'Interface de usuário'" + "Mostrar 'Interface de usuário'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER_INTERFACE, - "Exibe ou oculta a opção 'Interface de usuário' na tela de Configurações." + "Mostra ou oculta a opção 'Interface de usuário' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_AI_SERVICE, - "Exibir 'Serviço de IA'" + "Mostrar 'Serviço de IA'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_AI_SERVICE, - "Exibe ou oculta a opção 'Serviço de IA' na tela de Configurações." + "Mostra ou oculta a opção 'Serviço de IA' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_POWER_MANAGEMENT, - "Exibir 'Gerenciamento de energia'" + "Mostrar 'Gerenciamento de energia'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_POWER_MANAGEMENT, - "Exibe ou oculta a opção 'Gerenciamento de energia' na tela de Configurações." + "Mostra ou oculta a opção 'Gerenciamento de energia' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_ACHIEVEMENTS, - "Exibir 'Conquistas'" + "Mostrar 'Conquistas'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_ACHIEVEMENTS, - "Exibe ou oculta a opção 'Conquistas' na tela de Configurações." + "Mostra ou oculta a opção 'Conquistas' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_NETWORK, - "Exibir 'Rede'" + "Mostrar 'Rede'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_NETWORK, - "Exibe ou oculta a opção 'Rede' na tela de Configurações." + "Mostra ou oculta a opção 'Rede' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_PLAYLISTS, - "Exibir 'Listas de reprodução'" + "Mostrar 'Listas de reprodução'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_PLAYLISTS, - "Exibe ou oculta a opção 'Listas de reprodução' na tela de Configurações." + "Mostra ou oculta a opção 'Listas de reprodução' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_USER, - "Exibir 'Usuário'" + "Mostrar 'Usuário'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_USER, - "Exibe ou oculta a opção 'Usuário' na tela de Configurações." + "Mostra ou oculta a opção 'Usuário' na tela de Configurações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_SHOW_DIRECTORY, - "Exibir 'Diretório'" + "Mostrar 'Diretório'" ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_SHOW_DIRECTORY, - "Exibe ou oculta a opção 'Diretório' na tela de Configurações." + "Mostra ou oculta a opção 'Diretório' na tela de Configurações." ) /* Settings > User Interface > Appearance */ @@ -3885,11 +4137,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Aplica um valor global na escala do menu. Pode ser usado para aumentar ou diminuir o tamanho da interface do usuário." + "Redimensiona o tamanho dos elementos da interface do usuário no menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Plano de fundo" + "Imagem de fundo" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, @@ -3941,7 +4193,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "Seleciona o método de rolagem horizontal usado para exibir as sequências de textos longos do menu." + "Seleciona o método de rolagem horizontal usado para exibir longos textos do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, @@ -3957,7 +4209,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "Use animação de rolagem suave ao exibir longas sequências de texto de menu. Tem um pequeno impacto no desempenho." + "Use animação de rolagem suave ao exibir longos textos de menu. Tem um pequeno impacto no desempenho." ) /* Settings > AI Service */ @@ -3968,7 +4220,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, - "Interrompe o jogo durante a tradução (modo Imagem) ou continua em execução (modo Fala)" + "Mostra a tradução como uma sobreposição de texto (modo imagem) ou reproduzir como conversão de texto em fala (modo de fala)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_URL, @@ -3988,7 +4240,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "Alternar pausa do serviço de IA" + "Pausar durante a tradução" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, @@ -4019,15 +4271,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "Habilita ou desabilita o narrador de acessibilidade para a navegação no menu" + "Habilita o narrador de acessibilidade para a navegação no menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Velocidade da fala do narrador" + "Velocidade do narrador" ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Define a velocidade da fala para o narrador, de rápida à lenta" + "Define a velocidade da voz do narrador." ) /* Settings > Power Management */ @@ -4040,7 +4292,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "Compita para ganhar conquistas personalizadas em jogos clássicos.\nPara mais informações, visite http://retroachievements.org" + "Ganhe conquistas em jogos clássicos. Para mais informações, visite https://retroachievements.org" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, @@ -4056,7 +4308,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "Tabelas de classificação específicas do jogo.\nNão tem efeito se o modo Hardcore estiver desativado." + "Tabelas de classificação específicas do jogo. Não tem efeito se o modo Hardcore estiver desativado." ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_RICHPRESENCE_ENABLE, @@ -4078,17 +4330,25 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Habilita ou desabilita conquistas não oficiais e/ou recursos beta para fins de teste." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Som de desbloqueio" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Reproduz um som quando uma conquista é desbloqueada." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, "Modo detalhado das conquistas" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, - "Habilita ou desabilita detalhes das conquistas na tela." + "Mostra mais informação nas notificações." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT, - "Capturar conquistas automaticamente" + "Capturar tela automaticamente" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, @@ -4151,7 +4411,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Senha para conectar ao anfitrião de jogo em rede. Utilizado apenas no modo anfitrião." + "A senha usada pelos clientes que se conectam ao anfitrião." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -4159,7 +4419,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Senha para conectar ao anfitrião de jogo em rede apenas com privilégios de espectador. Utilizado apenas no modo anfitrião." + "A senha usada pelos clientes que se conectam ao anfitrião como espectador." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, @@ -4167,7 +4427,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Define se o jogo em rede deve iniciar em modo espectador." + "Iniciar jogo em rede no modo espectador." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -4175,7 +4435,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Define se conexões em modo escravo são permitidas. Clientes em modo escravo requerem muito pouco poder de processamento em ambos os lados, mas irão sofrer significamente da latência de rede." + "Permite conexões em modo escravo. Os clientes no modo escravo exigem muito pouco poder de processamento em ambos os lados, mas sofrem significativamente com a latência da rede." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -4183,7 +4443,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Define se conexões que não estão em modo escravo são proibidas. Não recomendado, exceto para redes muito rápidas com máquinas muito lentas." + "Não permitir conexões fora do modo escravo. Não recomendado, exceto em redes muito rápidas com máquinas muito lentas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, @@ -4191,7 +4451,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Define se deve executar o jogo em rede em modo que não utilize jogos salvos. Se definido como verdadeiro, uma rede muito rápida é necessária, mas nenhum rebobinamento é realizado, portanto, não haverá instabilidade no jogo em rede." + "Inicia o jogo em rede em um modo que não exija salvamento de jogos. É necessária uma rede muito rápida, mas nenhuma rebobinagem é realizada, portanto, não haverá tremulação no jogo em rede." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, @@ -4199,7 +4459,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Frequência em quadros no qual o jogo em rede verificará se o anfitrião e o cliente estão sincronizados." + "A frequência (em quadros) com que o jogo em rede verificará se o anfitrião e o cliente estão sincronizados." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, @@ -4247,15 +4507,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Gamepad em rede" + "RetroPad de rede" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Porta de base remota de rede" + "Porta de base de RetroPad em rede" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Usuário remoto %d ativado" + "RetroPad em rede usuário %d" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -4271,7 +4531,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "Faz o download automático de imagens em miniatura ausentes ao navegar pelas listas de reprodução. Tem um grande impacto no desempenho." + "Faz o download automático de miniatura ausentes ao navegar pelas listas de reprodução. Tem um grande impacto no desempenho." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, @@ -4306,18 +4566,34 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, - "Mostrar Núcleos Experimentais" + "Mostrar núcleos experimentais" ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, - "Incluir os núcleos 'experimentais' na lista do Gerenciador de Núcleos. Normalmente estes são apenas para fins de desenvolvimento/teste e não são recomendados para uso geral." + "Inclui os núcleos 'experimentais' na lista de Download de núcleo. Normalmente, são apenas para fins de desenvolvimento ou testes e não são recomendados para o uso geral." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "Fazer cópia dos núcleos ao atualizar" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP, + "Cria automaticamente uma cópia de segurança de qualquer núcleo instalado ao executar uma atualização online. Permite uma fácil reversão para um núcleo funcional se uma atualização introduzir uma regressão." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Tamanho do histórico da cópia de segurança" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Especifica quantas cópias de segurança geradas automaticamente devem ser mantidos para cada núcleo instalado. Quando esse limite é atingido, a criação de uma nova cópia por meio de uma atualização online excluirá a cópia mais antiga. Nota: As cópias de segurança principais manuais não são afetadas por esta configuração." ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Habilitar lista de histórico" + "Histórico" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -4333,7 +4609,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Tamanho da lista de favoritos" + "Tamanho dos favoritos" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, @@ -4361,7 +4637,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "Ordena as listas de reprodução de conteúdo em ordem alfabética. Observe que listas de reprodução de 'histórico' de jogos, imagens, músicas e vídeos usados ​​recentemente são excluídos." + "Ordena as listas de reprodução de conteúdo em ordem alfabética, excluindo as listas de reprodução 'Histórico', 'Imagens', 'Música' e 'Vídeos'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, @@ -4401,7 +4677,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Tempo de jogo:" + "Tempo de execução:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, @@ -4417,11 +4693,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Formato da 'Última partida' em sub-etiquetas de listas" + "Estilo da data e hora da 'Última partida'" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Seleciona o formato de data e hora da último partida, mostrando o registro de execução. NOTA: As opções AM/PM afetam ligeiramente o desempenho em algumas plataformas." + "Define o estilo da data e hora exibidas nas informações da 'Última partida'. NOTA: as opções '(AM/PM)' terão um pequeno impacto de desempenho em algumas plataformas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, @@ -4433,19 +4709,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, - "Verificar sem correspondência do núcleo" + "Analisar sem correspondência do núcleo" ) MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, - "Quando desativado, o conteúdo só é adicionado às listas de reprodução se você tiver um núcleo instalado que suporte sua extensão. Ao ativar isso, ele será adicionado à lista de reprodução independentemente. Desta forma, você pode instalar o núcleo que você precisa mais tarde, após a digitalização." + "Quando desativado, o conteúdo só é adicionado às listas de reprodução se você tiver um núcleo instalado que suporte sua extensão. Ao ativar isso, ele será adicionado à lista de reprodução independentemente. Desta forma, você pode instalar o núcleo que você precisa mais tarde, após a análise." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Gerenciamento de listas de reprodução" + "Gerenciar listas de reprodução" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Executa tarefas de manutenção na lista de reprodução selecionada (ex: definir/restaurar associações padrões do núcleo)." + "Executa tarefas de manutenção em listas de reprodução." ) /* Settings > Playlists > Playlist Management */ @@ -4480,7 +4756,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Altera o modo como as entradas nesta lista de reprodução são ordenadas." + "Determina como as entradas são classificadas nesta lista de reprodução." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, @@ -4488,7 +4764,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Remove entradas inválidas ou duplicadas e valida as associações de núcleo." + "Valida associações do núcleo e remove entradas inválidas e duplicadas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, @@ -4563,13 +4839,9 @@ MSG_HASH( /* Settings > User > Accounts */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, - "ConquistasRetro" - ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Serviço RetroAchievements. Para mais informações, visite http://retroachievements.org (em inglês)" + "Ganhe conquistas em jogos clássicos. Para mais informações, visite http://retroachievements.org" ) /* Settings > User > Accounts > RetroAchievements */ @@ -4580,7 +4852,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Insira o nome de usuário de sua conta RetroAchievements." + "Insira o nome de usuário da conta RetroAchievements." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, @@ -4629,7 +4901,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Esta localização é consultada por padrão quando a interface do menu tenta procurar por recursos carregáveis, etc." + "Os ativos do menu usados pelo RetroArch são armazenados neste diretório." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -4649,7 +4921,7 @@ MSG_HASH( ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, - "Navegador de Arquivos" + "Navegador de arquivos" ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, @@ -4737,7 +5009,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "As configurações de gravação serão mantidas aqui." + "As configurações de gravação são armazenadas neste diretório." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, @@ -4745,7 +5017,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Define um diretório onde as sobreposições são mantidas para facilitar o acesso." + "As sobreposições são armazenadas neste diretório." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, @@ -4769,7 +5041,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Se um joypad estiver conectado, o mesmo será configurado automaticamente se um arquivo de configuração correspondente estiver presente dento deste diretório." + "Os perfis de controles usados para configurá-los automaticamente são armazenados neste diretório." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, @@ -4777,7 +5049,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Salva todos os controles remapeados neste diretório." + "Os remapeamentos de entrada são armazenados neste diretório." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, @@ -4869,11 +5141,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Atualizar lista de salas" + "Atualizar lista de anfitriões de jogo em rede" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Analisa novas salas." + "Faz uma busca por anfitriões de jogo em rede." ) /* Netplay > Host */ @@ -4961,7 +5233,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Núcleo" + "Núcleo padrão" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, @@ -4973,7 +5245,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "Uma lista separada por espaços dos tipos de arquivo que serão incluídos na análise. No caso de estar em branco, será incluído todos os arquivos; se indicado um núcleo, será incluído todos os arquivos compatíveis com o núcleo." + "Lista de tipos de arquivos a serem incluídos na análise, separados por espaços. Se vazio, inclui todos os tipos de arquivo ou, se um núcleo for especificado, todos os arquivos suportados pelo núcleo." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Análise recursiva" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Quando habilitado, todos os subdiretórios do 'Diretório de conteúdo' especificado serão incluídos na análise." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, @@ -5255,10 +5535,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISK_OPTIONS, "Gerenciamento de imagem de disco." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_OPTIONS, - "Sombreamento" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SHADER_OPTIONS, "Configura o shader para realçar a aparência da imagem." @@ -5333,7 +5609,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_FILE_LOAD, - "Carregar arquivo de trapaça" + "Carregar arquivo de trapaça (substituir)" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_FILE_LOAD, @@ -5361,11 +5637,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "Adicionar novo código no início" + "Adicionar nova trapaça no início" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "Adicionar novo código no final" + "Adicionar nova trapaça no final" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, @@ -5416,7 +5692,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Esquerda/Direita para alterar o valor" + "Pressione esquerda ou direita para alterar o valor" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, @@ -5585,7 +5861,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "O número de vezes que a trapaça será aplicada.\nUse com as outras duas opções de iteração para afetar grandes áreas da memória." + "O número de vezes que a trapaça será aplicada. Use com as outras duas opções de iteração para afetar grandes áreas da memória." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, @@ -5593,7 +5869,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "Após cada 'Número de iterações', o endereço de memória será aumentado pelo número de vezes do 'Tamanho da memória de pesquisa'." + "Após cada iteração, o 'Endereço da memória' aumentará esse número vezes o 'Tamanho da memória de pesquisa'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, @@ -5653,7 +5929,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "Excluir esta trapaça" + "Remover esta trapaça" ) /* Quick Menu > Disc Control */ @@ -5664,7 +5940,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Abre a bandeja de disco virtual e remove o disco carregado atualmente. NOTA: Se o RetroArch estiver configurado para pausar enquanto o menu estiver ativo, alguns núcleos podem não registrar alterações a menos que o conteúdo seja retomado por alguns segundos após cada ação de controle de disco." + "Abre a bandeja de disco virtual e remove o disco atualmente carregado. Se a opção 'Pausar o conteúdo quando não estiver ativo' estiver habilitada, alguns núcleos poderão não registrar alterações, a menos que o conteúdo seja retomado por alguns segundos após cada ação de controle do disco." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, @@ -5672,7 +5948,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Insere o disco correspondente ao 'Índice atual do disco' e fecha a bandeja do disco virtual. NOTA: Se o RetroArch estiver configurado para pausar enquanto o menu estiver ativo, alguns núcleos poderão não registrar alterações, a menos que o conteúdo seja retomado por alguns segundos após cada ação de controle de disco." + "Abre a bandeja de disco virtual e remove o disco atualmente carregado. Se a opção 'Pausar o conteúdo quando não estiver ativo' estiver habilitada, alguns núcleos poderão não registrar alterações, a menos que o conteúdo seja retomado por alguns segundos após cada ação de controle do disco." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, @@ -5682,6 +5958,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, "Ejete o disco atual, selecione um novo disco no sistema de arquivos e, em seguida, insira-o e feche a bandeja de disco virtual. NOTA: Este é um recurso legado. Em vez disso, recomenda-se carregar títulos de vários discos através de listas de reprodução M3U, que permitem a seleção de disco usando as opções 'Ejetar/Inserir Disco' e 'Índice Atual do Disco'." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND_TRAY_OPEN, + "Selecione um novo disco no sistema de arquivos e insira-o sem fechar a bandeja do disco virtual. NOTA: Esse é um recurso herdado. Em vez disso, é recomendável carregar títulos de vários discos por meio da listas de reprodução M3U, que permite a seleção de discos usando a opção 'Índice atual do disco'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, "Índice atual do disco" @@ -5751,7 +6031,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Aumentar ou diminuir a quantidade de estágios do shader. Você pode adicionar um shader separado para cada estágio do pipeline e configurar sua escala e filtro." + "Aumenta ou diminui a quantidade de estágios do shader. Os shaders separados podem ser ligados a cada estágio e configurados sua escala e filtragem." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, @@ -5790,7 +6070,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Salvar as definições de shader atuais como a definição padrão para esta aplicação/núcleo." + "Salva as configurações atuais do shader como padrão para este núcleo." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, @@ -5798,7 +6078,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Salve as configurações atuais do shader como as configurações padrão para todos os arquivos no diretório de conteúdo atual." + "Salve as configurações atuais do shader como padrão para todos os arquivos no diretório de conteúdo atual." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, @@ -5917,7 +6197,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RDB_ENTRY_DETAIL, - "Exibir informações da base de dados do conteúdo atual" + "Mostrar informações da base de dados do conteúdo atual" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ENTRIES_TO_DISPLAY, @@ -5938,6 +6218,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "Não há informação de núcleo disponível." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "Nenhuma cópia de segurança do núcleo disponível" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "Não há favoritos disponíveis." @@ -5970,6 +6254,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Nenhuma configuração encontrada." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Nenhum dispositivo Bluetooth foi encontrado" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Nenhuma rede encontrada." @@ -6125,14 +6413,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_LABEL_VALUE_RETROKEYBOARD, - "TecladoRetro" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD, - "ControleRetro" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, "RetroPad com analógico" @@ -6147,7 +6427,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, - "Segurar Start (2 segundos)" + "Manter pressionado Start (2 segundos)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "Manter pressionado Select (2 segundos)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWN_SELECT, @@ -6502,7 +6786,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_BACKGROUND_FILLER_THICKNESS_ENABLE, - "Aumentar a grossura do padrão xadrez de fundo do menu" + "Aumentar a grossura do padrão xadrez de fundo do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_BORDER_FILLER_ENABLE, @@ -6514,11 +6798,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_THICKNESS_ENABLE, - "Aumentar a grossura do padrão xadrez da borda do menu" + "Aumenta a grossura do padrão xadrez da borda do menu." ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_RGUI_BORDER_FILLER_ENABLE, - "Exibir borda do menu." + "Exibe a borda do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_RGUI_FULL_WIDTH_LAYOUT, @@ -6697,7 +6981,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_ASPECT_RATIO_LOCK_FILL_SCREEN, - "Preenchimento de tela (Esticada)" + "Preenchimento de tela (esticada)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME_CUSTOM, @@ -6952,7 +7236,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Habilita as sombras para todos os ícones.\nIsto terá um pequeno impacto no desempenho." + "Habilita as sombras para todos os ícones. Isto terá um pequeno impacto no desempenho." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, @@ -6992,7 +7276,7 @@ MSG_HASH( /* FIXME Unused? */ ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Habilita a aba de configurações. É necessário reiniciar para que a aba apareça." + "Habilita a aba 'Configurações'. (requer reinício)" ) /* XMB: Settings Options */ @@ -7021,10 +7305,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_CUSTOM, "Personalizado" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_FLATUI, - "Cores planas" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_MONOCHROME, "Monocromático" @@ -7037,26 +7317,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_SYSTEMATIC, "Sistemático" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_NEOACTIVE, - "Ativo e moderno" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_PIXEL, - "Píxel" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_RETROACTIVE, - "Retroativo" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_RETROSYSTEM, - "Sistema retro" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_DOTART, - "Arte de pontos" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_ICON_THEME_AUTOMATIC, "Automático" @@ -7158,15 +7418,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "Quando ativado, remove os nomes do sistema das listas de reprodução. Por exemplo, exibe 'PlayStation' em vez de 'Sony - PlayStation'. As alterações exigem uma reinicialização para entrar em vigor." + "Remove os nomes do sistema das listas de reprodução. Por exemplo, 'Sony - PlayStation' se torna 'PlayStation'. (requer reinício)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Ordenar Playlists Após Truncação de Nome" + "Ordenar listas de reprodução após o truncamento de nomes" ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Quando ativado, as playlists serão re-ordenadas em ordem alfabética depois de remover o componente 'sistema' dos seus nomes. As alterações requerem uma reinicialização para que tenham efeito." + "As listas de reprodução serão reorganizadas em ordem alfabética após remover o componente do fabricante de seus nomes. (requer reinício)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, @@ -7217,7 +7477,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_ICONS_ENABLE, - "Exibe ícones à esquerda das entradas do menu." + "Mostra ícones à esquerda das entradas do menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION, @@ -7229,11 +7489,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_SHOW_NAV_BAR, - "Exibir barra de navegação" + "Mostrar barra de navegação" ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_SHOW_NAV_BAR, - "Exibe atalhos fixos de navegação do menu na tela. Permite a troca rápida entre as categorias de menu. Recomendado para telas de toque." + "Exibe atalhos de navegação permanentes no menu da tela. Permite alternar rapidamente entre as categorias de menu. Recomendado para dispositivos com tela sensível ao toque." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, @@ -7277,11 +7537,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "Exibir miniatura secundária nas listas" + "Mostrar miniatura secundária nas listas" ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "Exibe uma miniatura secundária ao usar formatos de lista de miniaturas nas listas de reprodução. Observe que essa configuração só terá efeito quando a tela for larga o suficiente para exibir duas miniaturas." + "Exibe uma miniatura secundária ao usar formatos de lista de miniaturas nas listas de reprodução. Observe que essa configuração só terá efeito se a tela tiver largura o suficiente para exibir duas miniaturas." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, @@ -7338,10 +7598,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_YELLOW, "Amarelo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_MATERIALUI, - "Material-UI" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_MATERIALUI_DARK, "Material UI (escuro)" @@ -7390,10 +7646,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_CUTIE_RED, "Cutie vermelho" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_COLOR_THEME_VIRTUAL_BOY, - "Menino Virtual" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_TRANSITION_ANIM_AUTO, "Automáticas" @@ -7442,10 +7694,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_LIST_LARGE, "Lista (grande)" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_VIEW_LANDSCAPE_DESKTOP, - "Área de Trabalho" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_LANDSCAPE_LAYOUT_OPTIMIZATION_DISABLED, "DESLIGADO" @@ -8020,10 +8268,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_TURBO_DEADZONE_LIST, "Turbo/zona-morta" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CHEEVOS_SETTINGS, - "ConquistasRetro" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_COUNTERS, "Contadores do núcleo" @@ -8080,6 +8324,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "Não há listas de reprodução." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Conectado" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "On-line" @@ -8177,7 +8425,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Apelido (lan): %s" + "Apelido (REDE): %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -8285,7 +8533,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Alterando a sobreposição do gamepad virtual" + "Alterando a sobreposição do controle virtual" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, @@ -8836,6 +9084,14 @@ MSG_HASH( MSG_NUM_CORES_UPDATED, "núcleos atualizados: " ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "núcleos ignorados: " + ) +MSG_HASH( + MSG_CORE_UPDATE_DISABLED, + "A atualização do núcleo foi desativada - o núcleo está bloqueado: " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "Restaurando núcleos: " @@ -9552,10 +9808,6 @@ MSG_HASH( MSG_SEVERAL_PATCHES_ARE_EXPLICITLY_DEFINED, "Várias modificações de conteúdo estão explicitamente definidas, ignorando todas..." ) -MSG_HASH( - MSG_SHADER, - "Sombreamento" - ) MSG_HASH( MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, "Predefinição de shader salva com sucesso." @@ -9712,10 +9964,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "não configurado, usando reserva" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "A busca Bluetooth foi concluída." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Análise de Wi-Fi completa." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Escaneando por dispositivos bluetooth..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Analisando redes sem fio..." @@ -9874,11 +10134,11 @@ MSG_HASH( ) MSG_HASH( MSG_CHEEVOS_HARDCORE_MODE_DISABLED, - "Um estado do jogo foi carregado. Conquistas no Modo Hardcore foram desabilitados para a sessão atual." + "Um jogo salvo foi carregado. Conquistas no Modo Hardcore foram desativadas para a sessão atual." ) MSG_HASH( MSG_CHEEVOS_HARDCORE_MODE_DISABLED_CHEAT, - "Uma trapaça foi ativada. Conquistas no Modo Hardcore foram desabilitados para a sessão atual." + "Uma trapaça foi ativada. As conquistas no Modo Hardcore estão desativadas para a sessão atual." ) MSG_HASH( MSG_RESAMPLER_QUALITY_LOWEST, @@ -9962,12 +10222,92 @@ MSG_HASH( ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_M3U_CLEANUP, - "Limpando entradas M3U:" + "Limpando entradas M3U: " ) MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "Análise completa: " ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "Analisando núcleo: " + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "Já existe uma cópia de segurança do núcleo instalado: " + ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "Fazendo cópia de segurança do núcleo: " + ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "Removendo cópias de segurança obsoletas: " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Cópia de segurança do núcleo completa: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "Cópia de segurança do núcleo selecionado já está instalada: " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "Restaurando núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "Restauração do núcleo completa: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "O arquivo do núcleo selecionado já está instalado: " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "Instalando núcleo: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "Instalação do núcleo completa: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "Arquivo de núcleo selecionado é inválido: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Falha ao fazer cópia de segurança do núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "Falha na restauração do núcleo: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Falha na instalação do núcleo: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "A restauração do núcleo foi desativada - o núcleo está bloqueado: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "A instalação do núcleo foi desativada - o núcleo está bloqueado: " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "Houve uma falha ao fazer o bloqueio do núcleo: " + ) +MSG_HASH( + MSG_CORE_UNLOCK_FAILED, + "Houve uma falha ao fazer o desbloqueio do núcleo: " + ) +MSG_HASH( + MSG_CORE_DELETE_DISABLED, + "A exclusão do núcleo foi desativada - o núcleo está bloqueado: " + ) /* Lakka */ @@ -10004,7 +10344,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "Aplica uma substituição manual da escala ao desenhar os widgets na tela. Aplica-se apenas quando 'Escala automática nos widgets gráficos' está desativado. Pode ser usado para aumentar ou diminuir o tamanho das notificações, indicadores e controles decorados independentemente do próprio menu." + "Aplica uma substituição manual da escala ao desenhar os widgets na tela. Aplica-se apenas quando 'Escalar automaticamente os widgets gráficos' está desativado. Pode ser usado para aumentar ou diminuir o tamanho das notificações, indicadores e controles decorados independentemente do próprio menu." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, @@ -10042,6 +10382,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Habilitar filtro de suavização" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Procura por dispositivos bluetooth e os conecta." + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "Analisa redes sem fio e estabelecer uma conexão." @@ -10082,6 +10426,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "Reiniciar o RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "Sai e reinicia o RetroArch. Necessário para a ativação de determinadas configurações de menu (por exemplo, ao alterar o driver do menu)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, "Bloquear quadros" @@ -10096,11 +10444,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Habilitar mapeamento de gamepad no teclado" + "Habilitar mapeamento de controle no teclado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Tipo de mapeamento para gamepad no teclado" + "Tipo de mapeamento para controle no teclado" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, @@ -10116,19 +10464,31 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_REBOOT, - "Exibir 'Reiniciar'" + "Mostrar 'Reiniciar'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_REBOOT, - "Exibe ou oculta a opção 'Reiniciar'." + "Mostra ou oculta a opção 'Reiniciar'." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SHUTDOWN, - "Exibir 'Desligar'" + "Mostrar 'Desligar'" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, - "Exibe ou oculta a opção 'Desligar'." + "Mostra ou oculta a opção 'Desligar'." + ) +MSG_HASH( + MSG_INTERNET_RELAY, + "Internet (retransmitir)" + ) +MSG_HASH( + MSG_READ_WRITE, + "Leitura e escrita" + ) +MSG_HASH( + MSG_READ_ONLY, + "Somente leitura" ) #ifdef HAVE_LAKKA_SWITCH @@ -10281,11 +10641,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_400X240, - "2D (Efeito Grade de Pixel)" + "2D (efeito grade de pixel)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CTR_VIDEO_MODE_2D_800X240, - "2D (Alta Resolução)" + "2D (alta resolução)" ) #endif #ifdef HAVE_QT diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index dfd8307893..a582bc5a49 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -24,18 +24,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "Histórico" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Imagem" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Música" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_VIDEO_TAB, - "Vídeo" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, "Ativar Netplay" @@ -75,10 +67,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_DISC, "Carregar Disco" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_LOAD_DISC, - "Carregar um disco de mídia física. Você deve primeiro selecionar o núcleo (Load Core) que você pretende usar com o disco." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, "Despejo de disco" @@ -99,26 +87,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, "Procurar conteúdo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Procurar por conteúdo e adicionar à base de dados." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, "Mostrar Menu do Ambiente de trabalho" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Abre o menu da área de trabalho se estiver fechado." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, "Desativar 'Modo quiosque'" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Desativa o 'Modo quiosque'. É necessário um reinício para que as alterações surtam efeito." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, "Atualizador online" @@ -194,10 +170,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, "Instalar ou Restaurar um núcleo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "Instalar ou restaurar um núcleo a partir do diretório de transferências." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, "Iniciar processador de vídeo" @@ -232,10 +204,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, "Favoritos" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "O conteúdo que foi adicionado aos 'Favoritos' irá aparecer aqui." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Música" @@ -244,18 +212,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_MUSIC, "As músicas que foram tocadas anteriormente irão aparecer aqui." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Imagem" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "As imagens que foram pré-visualizadas anteriormente irão aparecer aqui." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, - "Vídeo" - ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Os vídeos que foram reproduzidos anteriormente irão aparecer aqui." @@ -283,10 +243,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PL_THUMBNAILS_UPDATER_LIST, "Atualizador Miniaturas das listas de reprodução" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Baixar miniaturas individuais para cada entrada da lista de reprodução selecionada." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, "Descarregador de conteúdo" @@ -299,10 +255,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, "Atualizar recursos" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Atualizar perfis de auto-configuração" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Atualizar batotas" @@ -528,10 +480,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, "Suporte de interface de comandos de rede" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Suporte de jogos através de ligações remotas em rede" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, "Suporte de Cocoa" @@ -974,10 +922,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, "Explorador de ficheiros" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Alterar definições do explorador de ficheiros." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, "Aceleração de fotogramas" @@ -1081,18 +1025,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, "Controlador de entrada" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Controlador de entrada. Dependendo do controlador de vídeo, pode forçá-lo a um controlador de entrada diferente." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Controlador de comandos" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Controlador de comandos." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, "Controlador de vídeo" @@ -1129,10 +1061,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Controlador de redes sem fios" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Controlador de redes sem fios." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, "Controlador de localização" @@ -1232,10 +1160,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_BLACK_FRAME_INSERTION, "Inserção de fotograma preto" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Inserir um fotograma negro entre fotogramas. Útil para utilizadores ecrãs de 120Hz que queiram jogar conteúdos de 60Hz para eliminar os fantasmas gráficos." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, "Ativar captura de ecrã na GPU" @@ -1447,18 +1371,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "Proporção personalizada do ecrã na posição X" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Personalizar o deslocamento da janela de exibição usada para definir o eixo-X da janela de exibição. Esta definição será ignorada caso a opção 'Escala Inteira' esteja ativa. Então, ele será centrado automaticamente." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, "Proporção personalizada do ecrã na posição Y" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Personalizar o deslocamento da janela de exibição usada para definir o eixo-Y da janela de exibição. Esta definição será ignorada caso a opção 'Escala Inteira' esteja ativa. Então, ele será centrado automaticamente." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Proporção personalizada da largura do ecrã" @@ -1479,10 +1395,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Cortar sobreexploração (recarregar)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Corta alguns pixeis em torno das bordas da imagem, habitualmente deixada em branco por estúdios de desenvolvimento e que, por vezes, contêm pixeis de lixo." - ) /* Settings > Video > Synchronization */ @@ -1682,30 +1594,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Número máximo de utilizadores suportados pelo RetroArch." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Comportamento do polling de entrada" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Comportamento de procura de periféricos de entrada no RetroArch. Se o valor for 'Cedo' ou 'Tarde', poder obter menos latência, dependendo da sua configuração." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Ativar remapeamento de teclas" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Quando ativada, esta definição faz com que as associações de entrada sejam substituídas pelas associações remapeadas do núcleo selecionado." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Ativar auto-configuração de teclas" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Ativa a deteção automática de perifricos de entrada. Isto fará com que se configure automaticamente os comandos do tipo 'Plug and Play'." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_TIMEOUT, "Tempo limite para associação de teclas" @@ -1718,10 +1610,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Período do turbo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Indica o período em que os botões de turbo alternam entre si. A unidade utilizada são fotogramas." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Ciclo de trabalho" @@ -1730,18 +1618,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE, "Indica o tempo necessário para a ativação do botão turbo. A unidade utilizada são fotogramas." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Associação de tecla de atalho" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, "Configurar teclas de atalho." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Associar as teclas do porta %u" - ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, "Configurar as teclas para este porta." @@ -1760,10 +1640,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_UNIFIED_MENU_CONTROLS, "Usar as mesmas teclas para o menu e para o jogo. Aplica-se ao teclado." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_INPUT_SWAP_OK_CANCEL, - "Menu trocar botões OK e Cancelar" - ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL, "Muda os botões para OK/Cancelar. Esta opção encontra-se desativada na orientação de botão em japonês e ativado na orientação ocidental." @@ -1783,22 +1659,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, "Mostrar/esconder menu de controlo do comando" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Combinação do botão do comando para mostrar/esconder o menu." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Ativar/desativar função de avanço-rápido" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Aguardar pela função de avanço-rápido" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Função de câmera-lenta" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Carregar estado" @@ -1807,10 +1667,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Gravação de estado" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Ativar/desativar ecrã completo" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Sair do RetroArch" @@ -1827,14 +1683,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Função de retrocedimento de tempo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Iniciar/parar gravação de filme" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Ativar/desativar pausa" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Salto de fotogramas" @@ -1851,66 +1699,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Shader anterior" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Índice de batota +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Índice de batota -" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Ativar/desativar batota" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Captura de ecrã" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Silenciar som/remover silêncio" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Mostrar/esconder teclado no ecrã" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Ativar/desativar modo jogar/olhar no Netplay" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Ativar tecla de atalho" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, - "Próximo overlay" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Ejetar/recolher disco" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Próximo disco" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, - "Disco anterior" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Alterar ponteiro do rato" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Ganhar/perder o foco do jogo" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Mostrar/esconder menu" - ) /* Settings > Input > Port # Binds */ @@ -1926,18 +1722,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "Índice do dispositivo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Associar todas as teclas" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Associar todas as teclas pré-definidas" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Guardar auto-configuração" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, "Botão B (baixo)" @@ -1954,22 +1738,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, "Botão Start" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Botão direcional (cima)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "Botão direcional (baixo)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Botão direcional (esquerda)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Botão direcional (direito)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, "Botão A (direita)" @@ -2100,10 +1868,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, "Carregar conteúdo vazio no encerramento do núcleo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Alguns núcleos podem ter uma funcionalidade de encerramento. Caso esteja ativa, esta definição irá impedir que o núcleo termine o RetroArch. Em vez disso, será carregado um núcleo fictício." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "Iniciar um núcleo automaticamente" @@ -2116,25 +1880,15 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Verifica se todo o firmware necessário está presentes antes de tentar carregar conteúdo." ) +#ifndef HAVE_DYNAMIC +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Permitir rotação" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Permite que os núcleos definam a rotação. Quando desativada, esta opção faz com que as requisições de rotação sejam ignoradas. Útil para configurações onde a imagem apresentada no ecrã entra em rotação, de forma manual." - ) /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Guardar configuração ao sair" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Guardar as alterações nos ficheiros de configuração ao sair." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Carregar opções específicas de conteúdos de núcleos automaticamente" @@ -2166,18 +1920,6 @@ MSG_HASH( /* Settings > Saving */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Ordenação de gravação em pastas" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Ordenar ficheiros guardados pelo nome da pasta do núcleo utilizado." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Ordenação de gravação de estado em pastas" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, "Ordenar gravação de estados pelo nome da pasta do núcleo utilizado." @@ -2194,30 +1936,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_AUTOSAVE_INTERVAL, "Intervalo de auto-gravação de SaveRAM" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Guarda automaticamente o Save RAM não volátil num intervalo regular. Esta opção encontra-se desativada por omissão. O intervalo é medido em segundos. Um valor de 0 desativa a gravação automática." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Índice de gravação de estado automático" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Quando for feita uma gravação de estado, o índice de gravação do estado é aumentado automaticamente antes de ser guardado. Quando for carregado conteúdo, o índice será alterado para o índice mais alto existente." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, "Guardar estado automaticamente" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Cria automaticamente uma gravação de estado no final da execução do RetroArch. O RetroArch irá carregar automaticamente este estado se a função 'Carregar estado automaticamente' estiver ativada." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Carregar estado automaticamente" - ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, "Carregar automaticamente o último estado automático guardado no arranque do RetroArch." @@ -2226,10 +1948,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, "Miniaturas de gravação de estado" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Mostrar miniaturas dos estados guardados no menu." - ) /* Settings > Logging */ @@ -2256,22 +1974,10 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Mostrar ficheiros e pastas ocultas" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Mostrar ficheiros/pastas escondidos no explorador de ficheiros." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, "Extensões de filtro desconhecidas" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Filtra os ficheiros apresentados no explorador de ficheiros pelas extenções suportadas." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, "Usar o reprodutor multimédia integrado" @@ -2291,22 +1997,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_META_REWIND, "Gerir as definições da função 'Rebobinar'." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Executar em velocidade máxima" - ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, "A taxa máxima na qual o conteúdo será executado quando for utilizada a função de avanço-rápido (ex: 5.0x para conteúdos em 60fps, existir um limite de 300 fotogramas p/ segundo). Se for definida como 0.0x, a taxa de avanço-rápido é ilimitada (sem limite de fotogramas p/ segundo)." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Rácio da função de câmera-lenta" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "Quando está em câmera-lenta, o conteúdo será diminuído pelo fator especificado/definido." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, "Acelerar taxa de fotogramas do menu" @@ -2322,24 +2016,12 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_ENABLE, "Ativar função de retrocedimento do tempo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Granularidade da função de retrocedimento do tempo" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Ao retroceder o tempo durante um número definido de fotogramas, você poderá retroceder vários fotogramas de cada vez, aumentando a velocidade da função." - ) /* Settings > Frame Throttle > Frame Time Counter */ /* Settings > Recording */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Carregar configuração de gravação..." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_POST_FILTER_RECORD, "Utilizar gravação pós-filtro" @@ -2419,6 +2101,8 @@ MSG_HASH( "Escala de todos os elementos da camada sobreposta." ) + + /* Settings > On-Screen Display > Video Layout */ @@ -2436,18 +2120,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Mostrar taxa de fotogramas" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Mostrar a taxa de fotogramas atuais por segundo, no ecrã." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Tipo de letra das notificações no ecrã" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Selecione uma fonte diferente para as notificações no ecrã." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, "Tamanho das notificações no ecrã" @@ -2487,10 +2163,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_ADVANCED_SETTINGS, "Mostrar definições avançadas" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Mostrar as definições avançadas (pré-definição: desativado)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, "Ativar 'Modo quiosque'" @@ -2515,10 +2187,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "Envolver o início e/ou o final, caso o limite da lista seja alcançado horizontal ou verticalmente." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Pausar quando o menu for exibido" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Quando desativado, o conteúdo continuará a ser executado em segundo plano quando se apresenta ou se esconde o menu do RetroArch." @@ -2527,18 +2195,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Suporte de rato" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Ativar controlo do rato no menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Suporte de ponteiros" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Ativar controlo de toque no menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, "Tarefas segmentadas" @@ -2547,10 +2207,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "Executar tarefas numa thread independente." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Não executar em segundo plano" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Pausar o jogo quando a janela do RetroArch não estiver ativa." @@ -2567,10 +2223,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "Ativar assistente de interface do utilizador" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Assistente de interface do utilizador arranca na inicialização da aplicação" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Barra de menu" @@ -2582,10 +2234,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Menu rápido" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Mostrar ou esconder elementos no 'Menu rápido'." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Mostrar 'Carregar núcleo'" @@ -2650,10 +2298,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Mostrar o separador de definições dentro do menu principal." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Introduza uma palavra-passe para ativar o separador 'Definições'" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "Fornecer uma palavra-passe durante a ocultação do separador das definições faz com que seja possível restaurá-lo mais tarde a partir do menu, através do separador Menu principal, selecionando o separador Ativar definições e introduzindo a palavra-passe." @@ -2831,22 +2475,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Fator de escala do menu" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Fundo" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Seleciona uma imagem para definir como fundo do menu." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Opacidade da imagem de fundo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Modificar a opacidade da imagem de fundo." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Opacidade do buffer de fotogramas" @@ -2929,34 +2561,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "Palavra-passe do servidor" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Palavra-passe para ligação ao anfitrião de Netplay. Utilizada apenas em modo hospedeiro." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "Palavra-passe do servidor para espectador" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Palavra-passe de ligação ao anfitrião de netplay, apenas com privilégios de espectador. Usada apenas no modo anfitrião." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "Modo sem estado" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Executa o Netplay num modo onde não existe gravação de estados. Quando ativada, esta opção faz com que uma rede muito rápida seja necessária, mas nenhuma função Rebobinar poderá ser executada, tornando a sessão de Neyplay mais estável." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "Verificação dos fotogramas de Netplay" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Frequência em fotogramas na qual o Netplay irá verificar se o anfitrião e o cliente estão sincronizados." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "Latência de entrada dos fotogramas" @@ -2985,18 +2601,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Porta de comando de rede" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Jogo em rede" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Porta de rede remota" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Permitir utilizador remoto %d" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "Comandos stdin" @@ -3039,10 +2643,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Ativar histórico" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Ativar ou desativar a lista de reprodução recente para jogos, imagens, música e vídeos." @@ -3113,10 +2713,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Idioma" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Definir o idioma da interface." - ) /* Settings > User > Privacy */ @@ -3143,10 +2739,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_RETRO_ACHIEVEMENTS, "Conquistas Retro" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Serviço 'Retro Achievements'. Para mais informações, visite http://retroachievements.org (em inglês)" - ) /* Settings > User > Accounts > RetroAchievements */ @@ -3154,10 +2746,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_USERNAME, "Nome de utilizador" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Introduza o nome de utilizador da sua conta Retro Achievements." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, "Palavra-passe" @@ -3195,10 +2783,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "Recursos" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Esta localização é verificada por padrão quando a aplicação tenta procurar por recursos carregáveis, etc." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "Fundos dinâmicos" @@ -3219,10 +2803,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "Explorador de ficheiros" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Define a pasta inicial para o explorador de ficheiros." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "Configuração" @@ -3303,18 +2883,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "Pasta de armazenamento das configuração de gravação" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "As configurações de gravação serão armazenadas aqui." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Pasta do overlay" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Define um pasta para armazenamento de sobreposições, para acesso fácil." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, "Captura de ecrã" @@ -3327,18 +2899,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "Entrada de auto-configuração" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Se um comando estiver conectado, o mesmo será configurado automaticamente se o ficheiro de configuração correspondente estiver presente nesta pasta." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "Pasta de mapeamento de entrada" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Guardar todos as teclas remapeadas nesta pasta." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "Pasta de listas de reprodução" @@ -3395,14 +2959,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Terminar uma ligação de Netplay ativa." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Atualizar" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Verificar por novas ROMs." - ) /* Netplay > Host */ @@ -3451,10 +3007,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Núcleo" - ) /* Playlist > Playlist Item */ @@ -3741,10 +3293,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "Número de passagens de shader" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Aumentar ou diminuir a quantidade de passagens do canal do shader. Você pode adicionar um sombreamento separado para cada passagem do canal e configurar a sua escala e filtro." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "Sombreamento" @@ -3772,10 +3320,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "Guardar pré-definição de núcleo" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Guardar as definições de shader atuais como definições padrão para esta aplicação/núcleo." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "Guardar pré-definição de jogo" @@ -3913,10 +3457,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "Descarregando" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Não foi encontrada uma fonte de energia" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "" @@ -3933,10 +3473,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "RetroPad com analógico" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS, "Capas dos títulos publicados" @@ -4033,22 +3569,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "Rato 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Roda do rato (cima)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Roda do rato (baixo)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Roda do rato horizontal (esquerda)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Roda do rato horizontal (direita)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "Mais cedo" @@ -4182,10 +3702,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Ativar o separador Definições" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Ativar o separador 'Definições'. Um reinício é necessrio para que as alterações surtam efeito." - ) /* XMB: Settings Options */ @@ -4193,10 +3709,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "Fita" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Fita (simplificada)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Neve simples" @@ -4532,10 +4044,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Utilizador" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Usar o visualizador de imagens integrado" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "Número máximo de trocas de imagem encadeadas" @@ -4579,10 +4087,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "Proporção automática do ecrã" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Alcunha (lan): %s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "Estado" @@ -4659,10 +4163,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Solução de problemas de som/vídeo" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Modificando a sobreposição do comando virtual" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Carregando Conteúdo" @@ -4912,10 +4412,6 @@ MSG_HASH( MSG_PUBLIC_ADDRESS, "Endereço público" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Não foi fornecido qualquer argumento e nenhum menu está contido. Mostrando ajuda..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "Colocando o disco na área de notificação" @@ -5894,14 +5390,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "Ativar função tátil" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Ativar mapeamento do comando no teclado" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Tipo de mapeamento do comando no Teclado" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "Ativar teclado pequeno" diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index 7b1e5607d8..5007c85e6a 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -77,7 +77,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_DISC, - "Загрузить физический диск. Сначала необходимо выбрать ядро, которое вы собираетесь использовать для диска." + "Загрузить физический диск. Сначала выберите ядро для использования с диском." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMP_DISC, @@ -101,7 +101,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Сканировать содержимое и добавить в базу данных." + "Сканировать контент и добавить в базу данных." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_WIMP, @@ -109,7 +109,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Открывает меню рабочего стола, если оно закрыто." + "Открывает традиционное меню для рабочего стола." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -117,7 +117,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Отключает режим киоска. Для вступления изменений в силу необходим перезапуск." + "Отключает режим киоска (требуется перезапуск)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -238,7 +238,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "В этом разделе отображается контент, добавленный в «Избранное»." + "Здесь будет отображён контент, добавленный в «Избранное»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -250,7 +250,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Фотографии" + "Изображения" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, @@ -293,7 +293,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Скачать миниатюры для каждого пункта выбранного плейлиста." + "Скачать миниатюры для записей в выбранном плейлисте." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -309,7 +309,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Обновить профили геймпадов" + "Обновить профили контроллеров" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -449,6 +449,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Необходимые" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Защитить ядро от изменений" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Предотвращать изменение установленного ядра. Может использоваться во избежание нежелательных обновлений, если контенту требуется определенная версия ядра (например, сеты аркадных ромов)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Удалить ядро" @@ -457,6 +465,30 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Удаление ядра с устройства." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Создать резервную копию ядра" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Создать архив с резервной копией установленного ядра." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Восстановить резервную копию" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Установить предыдущую версию ядра из списка архивных резервных копий." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Удалить резервную копию" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Удалить архив из списка резервных копий." + ) /* Main Menu > Information > System Information */ @@ -540,10 +572,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, "Поддержка сетевого командного интерфейса" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Поддержка сетевого геймпада" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, "Поддержка Cocoa" @@ -992,7 +1020,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, - "Задает настройки файлового менеджера." + "Настройка параметров файлового браузера." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, @@ -1000,7 +1028,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, - "Измените настройки перемотки, быстрой перемотки и замедленного воспроизведения." + "Настройка параметров перемотки, ускоренной перемотки и замедления." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, @@ -1103,11 +1131,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Драйвер геймпада" + "Контроллер" ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Используемый драйвер геймпада." + "Используемый драйвер контроллера." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_DRIVER, @@ -1141,6 +1169,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Используемый драйвер камеры." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Использовать драйвер Bluetooth." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Драйвер Wi-Fi" @@ -1216,10 +1248,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SCALING_SETTINGS, "Масштабирование" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SCALING_SETTINGS, + "Изменить настройки масштабирования видео." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SYNCHRONIZATION_SETTINGS, "Синхронизация" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SYNCHRONIZATION_SETTINGS, + "Изменить настройки синхронизации видео." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SUSPEND_SCREENSAVER_ENABLE, "Заблокировать скринсейвер" @@ -1242,7 +1282,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Вставляет черную рамку между кадрами. Полезно для пользователей с экранами с частотой 120 Гц, которые хотят проигрывать материал с частотой 60 Гц с устраненным ореолом." + "Вставляет чёрный кадр между кадрами. Полезно на некоторых экранах высокой скорости обновления для исключения остаточного изображения." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1258,7 +1298,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SMOOTH, - "Добавляет небольшое смазывание к изображению, чтобы избавиться от острых пикселей. Эта настройка мало влияет на производительность." + "Добавляет небольшое размытие к изображению для сглаживания пикселей. Данная настройка практически не влияет на производительность." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_DELAY, @@ -1272,9 +1312,17 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FILTER, "Видеофильтр" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_FILTER, + "Применить видеофильтр, обрабатываемый процессором.\nПРИМЕЧАНИЕ: Может причинить сильный ущерб производительности. Некоторые видеофильтры могут работать только для ядер, использующих 32-битный или 16-битный цвет." + ) /* Settings > Video > CRT SwitchRes */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CRT_SWITCH_RESOLUTION, + "Настройка разрешения ЭЛТ" + ) MSG_HASH( MENU_ENUM_SUBLABEL_CRT_SWITCH_RESOLUTION, "Только для CRT-дисплеев. Пытаться использовать точное разрешение и частоту обновления ядра/игры." @@ -1471,18 +1519,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, "Пользовательский видовой экран X Поз." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Смещение окна экрана для определения положения оси X окна просмотра. Она игнорируются, если включена функция «Целочисленная шкала». Оно будет автоматически центрирован." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, "Пользовательский видовой экран Y Поз." ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Настройка смещения окна экрана для определения положения оси Y окна просмотра. Она игнорируются, если включена функция «Целочисленное масштабирование». Он будет автоматически центрирован." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, "Пользовательская ширина видового экрана" @@ -1503,10 +1543,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, "Обрезка обрезки (перезагрузка)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Отрезает несколько пикселей вокруг краев экрана, обычно оставленными пустыми разработчиками, которые иногда содержат лишь мусор." - ) /* Settings > Video > Synchronization */ @@ -1530,10 +1566,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, "Адаптивный Vsync" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "Vsync будет выключен в случае если частота обновления упадет ниже целевой.\nЭто поможет минимизировать заикание при пониженой производительности когда скорость эмуляции медленнее реального времени, а так же увеличить энергоэффективность." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, "Задержка кадра" @@ -1562,10 +1594,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VRR_RUNLOOP_ENABLE, "Синхронизировать с частотой кадров, установленной контентом (G-Sync, Freesync)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Нет отклонений от тайминга ядра. Применяется для экранов с переменной частотой обновления, G-Sync, FreeSync." - ) /* Settings > Audio */ @@ -1857,7 +1885,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "Включить звук на фоне" + "Фоновая музыка" ) /* Settings > Input */ @@ -1870,30 +1898,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MAX_USERS, "Максимальное количество пользователей, поддерживаемых RetroArch." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Задержка опроса устройств" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Изменение скорости опроса устройств. Значения «Ранняя» или «Поздняя» могут привести к меньшей задержке в зависимости от конфигурации." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Включить замену привязок" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Если включено, перезаписывает привязки ввода переназначенными для текущего ядра." + "Изменить управление для этого ядра" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Автоматическая настройка включена" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Включить автоматическое обнаружение ввода. Будет производена попытка автоматической настройки геймпадов Plug-and-Play." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, "Отклонение оси для нажатия кнопки" @@ -1930,10 +1942,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_PERIOD, "Период турборежима" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Описывает период, в котором переключаются турбокнопки. Значение описывается в кадрах." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, "Рабочий цикл" @@ -1964,7 +1972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Привязка горячих клавиш" + "Горячие клавиши" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1972,7 +1980,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Привязки ввода порт %u" + "Раскладка порта %u" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -2021,11 +2029,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Двойное нажатие кнопки выхода" + "Подтверждать выход" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "Двойное нажатие горячей клавиши для подтверждения выхода из RetroArch." + "Двойное нажатие горячей клавиши для выхода из RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2033,23 +2041,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Комбинация кнопок геймпада для переключения меню." + "Комбинация кнопок контроллера для вызова меню." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Включить перемотку вперед" + "Перемотка (переключатель)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Перемотка удержанием" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Включить замедленное движение" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Замедлить" + "Перемотка (удержание)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, @@ -2059,10 +2059,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Сохранить игру" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "На весь экран" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Выйти из RetroArch" @@ -2079,14 +2075,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Реверс" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Записать видео" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Пауза" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Дополнительные фреймы" @@ -2103,53 +2091,49 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Предыдущий шейдер" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Индекс чита +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Индекс чита -" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Переключить читы" + "Включить чит-коды" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Сделать скриншот" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Заглушить звук" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Показать экранную клавиатуру" + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Включить экранную клавиатуру" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "Переключение FPS" + "Показывать частоту кадров" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "Включить индикатор частоты кадров в секунду" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Отправить Отладочную Информацию" ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Переключить режим игры/наблюдателя Netplay" + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Отправляет диагностическую информацию о вашем устройстве и конфигурацию RetroArch на наши серверы для анализа." ) MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Включить горячие клавиши" + MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, + "Включить хостинг NetPlay" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Громкость +" + "Увеличить громкость" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Увеличивает громкость выходного сигнала" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Громкость -" + "Уменьшить громкость" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, @@ -2159,38 +2143,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Извлечь диск" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, - "Следующий диск" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, "Предыдущий диск" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Захват мыши" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Переключить игровой фокус" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Включить меню рабочего стола" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Отобразить меню" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Включение записи" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Включение трансляции" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "AI-сервис" @@ -2210,17 +2166,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DEVICE_INDEX, "Индекс устройства" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Привязать всё" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Привязать всё по умолчанию" + "Сброс к настройкам по умолчанию" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Сохранить автоматическую настройку" + "Сохранить профиль контроллера" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2244,19 +2196,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Крестовина ВВЕРХ" + "Крестовина вверх" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "Крестовина ВНИЗ" + "Крестовина вниз" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Крестовина ВЛЕВО" + "Крестовина влево" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Крестовина ВПРАВО" + "Крестовина вправо" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2391,19 +2343,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "Использовать вторую инстанцию для обгона" + "Использовать второй инстанс для обгона" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "Запускать вторую копию RetroArch для обгона. Исправляет проблемы со звуком во время загрузки." + "Использовать для обгона второй экземпляр RetroArch. Устраняет проблемы со звуком при загрузке сохранений." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "Убрать уведомления об обгоне" + "Скрывать предупреждения Run-Ahead" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "Скрывает предупреждение при использовании обгона когда ядро не поддерживает сохранения." + "Не показывать предупреждение, появляющееся если используется функция обгона и ядро не поддерживает сохранения." ) /* Settings > Core */ @@ -2422,15 +2374,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Разрешить ядру принудительно переключаться на другой видеодрайвер, отличный от текущего." + "Разрешать ядрам переключаться на другой видеодрайвер." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, - "Загрузка заглушки при выключении ядра" + "Загрузка заглушки при остановке ядра" ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Некоторые ядра могут иметь функцию отключения. Если она включена, это предотвратит остановку RetroArch, вместо этого он загрузит фиктивное ядро." + "Некоторые ядра имеют функцию остановки. Загрузка фиктивного ядра не позволит прекратить работу RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2444,24 +2396,42 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Перед загрузкой контента проверьте, все ли необходимые микропрограммы присутствуют." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Всегда перезагружать ядро при запуске контента" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Перезапустите RetroArch при запуске контента, даже если запрошенное ядро уже загружено. Это может улучшить стабильность системы, за счет увеличения времени загрузки." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Разрешить вращение" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Разрешить или запретить ядрам поворачивать экран. Полезно когда экран поворачивается вручную." + "Разрешить ядрам поворот изображения. Если выкл., запросы на вращение игнорируются. Полезно для конфигураций с ручной установкой поворота экрана." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Управление ядрами" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Выполнять задачи оффлайн обслуживания на установленных ядрах (резервное копирование, восстановление, удаление и т.д.) и просматривать информацию о ядре." ) /* Settings > Configuration */ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Сохранить конфигурацию и выйти" + "Сохранять конфигурацию при выходе" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Сохраняет изменения в файле конфигурации при выходе." + "При выходе сохранять изменения в файл конфигурации." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2504,19 +2474,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Сохранить сортировку в папках" + "Сортировка сохранений по папкам" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Сортировать карты памяти в каталогах, названные после использования ядра." + "Сортировать файлы сохранений в папки по имени используемого ядра." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Сортировать сохранения в папках" + "Сортировка сохранений состояния по папкам" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, - "Сортировать файлы сохранений в каталогах, названные после использования ядра." + "Сортировать сохранения состояний в папки по имени используемого ядра." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, @@ -2532,15 +2502,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Автоматически сохраняет состояние через заданный промежуток времени. Интервал измеряется в секундах. Значение 0 отключает автосохранение." + "Автоматическое сохранение SRAM с заданным интервалом (в секундах)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Сохранить индекс автосостояния" + "Автоматически повышать слот сохранения" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Сохранение производится в следующий индекс. Загрузка будет произведена из сохранения с высшим индексом." + "Номер слота автоматически повышается при сохранении. При загрузке контента устанавливается высший номер слота." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2548,11 +2518,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "Автоматически сохранять игру при выходе. RetroArch загрузит это сохранение, если включена 'Автозагрузка'." + "Автоматически создавать сохранение при выгрузке контента. RetroArch автоматически загрузит это сохранение, если включена «Автозагрузка сохранений»." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Автозагрузка" + "Автозагрузка сохранений" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, @@ -2564,7 +2534,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Показывать миниатюры файлов сохранений в меню." + "Показывать миниатюры сохранений в меню." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, @@ -2657,20 +2627,16 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PERFCNT_ENABLE, "Счетчики производительности" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "Счётчики производительности для RetroArch (и ядер).\nДанные счётчиков позволяют определять ограничения системы, производить тонкую настройку системы и производительности приложения." - ) /* Settings > File Browser */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Показать скрытые файлы и директории" + "Показывать скрытые файлы и папки" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Показывать скрытые файлы/каталоги внутри файлового менеджера." + "Отображать в браузере скрытые файлы и папки." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2678,7 +2644,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Фильтровать файлы в файловом менеджере по поддерживаемым расширениям." + "Фильтровать файлы в браузере по поддерживаемым расширениям." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2709,7 +2675,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Максимальная рабочая скорость" + "Частота перемотки" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, @@ -2717,11 +2683,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Коэффициент замедленного движения" + "Частота замедления" ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "При снижении скорости контент будет замедляться в соответствии с заданными факторами/настройками." + "Скорость контента при использовании функции замедления." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2740,15 +2706,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Ошиблись? Отмотайте и попробуйте снова.\nПомните, что включение данной опции снижает производительность." + "Возврат к предыдущей точке игрового процесса. Существенно влияет на производительность." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Гранулярность перемотки" + "Кадры перемотки" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "При перемотке на определенное количество кадров, вы можете перематывать несколько кадров сразу, увеличивая скорость перемотки." + "Количество кадров, перематываемых за один шаг. Большие значения увеличивают скорость перемотки." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2802,7 +2768,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORD_CONFIG, - "Загрузка конфигурации записи..." + "Пользовательская конфигурация записи" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_RECORD_THREADS, @@ -2834,15 +2800,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAM_CONFIG, - "Пользовательские настройки стрима" + "Пользовательская конфигурация стрима" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_TITLE, - "Заголовок потока" + "Заголовок стрима" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STREAMING_URL, - "URL-адрес стриминга" + "URL стрима" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UDP_STREAM_PORT, @@ -2947,6 +2913,12 @@ MSG_HASH( "Масштаб всех элементов пользовательского интерфейса наложения." ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Отсека оверлея по оси Y" + ) + /* Settings > On-Screen Display > Video Layout */ MSG_HASH( @@ -2968,13 +2940,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGETS_ENABLE, "Графические виджеты" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Использовать современную анимацию, уведомления, индикаторы и элементы управления вместо старого текстового режима." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Автомасштабирование графических виджетов" + "Автоматически масштабировать виджеты" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, @@ -2984,26 +2952,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, "Масштаб графических виджетов (полноэкранный режим)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Применяет заданный вручную коэффициент масштабирования для виджетов в полноэкранном режиме. Действует только если выкл. 'Автомасштабирование графических виджетов'. Позволяет увеличить или уменьшить размеры уведомлений, индикаторов и элементов управления независимо от[...]" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, "Масштаб графических виджетов (оконный режим)" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "Применяет заданный вручную коэффициент масштабирования для виджетов в оконном режиме. Действует только если выкл. 'Автомасштабирование графических виджетов'. Позволяет увеличить или уменьшить размеры уведомлений, индикаторов и элементов управления независимо от настр[...]" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, "Вывести значение FPS на экран" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Отображает текущую частоту кадров в секунду на экране." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, "Интервал обновления счётчика FPS (в кадрах)" @@ -3028,21 +2984,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_STATISTICS_SHOW, "Отображать на экране техническую статистику." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Включить детализацию памяти" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Отображать вместе с FPS/кадрами соотношение используемого/доступного объёма памяти." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, - "Шрифт экранного уведомления" + "Шрифт уведомлений" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Выберите шрифт для красивого отображения оповещений." + "Выбор шрифта для отображения уведомлений." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -3103,14 +3051,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Элементы главного экрана" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Показать или скрыть элементы на экране меню." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, "Меню" @@ -3125,7 +3065,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Показывать расширенные настройки для опытных пользователей (скрыто по умолчанию)." + "Показывать расширенные настройки для опытных пользователей." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3151,10 +3091,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, "Переход к началу и/или концу списка, если достигнута горизонтальная или вертикальная граница списка." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Пауза при активации меню" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, "Если включено, контент будет запущен в фоне при включении меню RetroArch." @@ -3163,33 +3099,21 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SAVESTATE_RESUME, "Восстановить контент после сохранения состояния" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Автоматически закрывать быстрое меню и продолжать выполнение контента при сохранении или загрузке состояния. Отключение настройки может ускорить сохранение на слабых устройствах." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, "Восстановить контент после смены диска" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "Автоматически закрывать быстрое меню и продолжать выполнение контента если через меню 'Управление дисками' был вставлен или загружен новый диск." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, "Поддержка мыши" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Включить поддержку мыши в главном меню." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, "Поддержка Touch" ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Включить поддержку touch в главном меню." + "Включить поддержку тач в меню" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, @@ -3199,10 +3123,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THREADED_DATA_RUNLOOP_ENABLE, "Выполнять задачи в отдельном потоке." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Не работать в фоновом режиме" - ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, "Ставить на паузу, когда окно теряет фокус." @@ -3227,22 +3147,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_ENABLE, "UI Companion включён" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Включить UI Companion при загрузке" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, "Строка меню" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Отображать меню на рабочем столе (перезапуск)" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Отображать меню на рабочем столе при запуске" - ) /* Settings > User Interface > Views */ @@ -3250,18 +3158,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_VIEWS_SETTINGS, "Быстрое меню" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Показать/скрыть элементы на экране быстрого меню." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, "Настройки" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Видимые элементы меню Настроек." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, "Показать Загрузить ядро" @@ -3310,6 +3210,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_CORE_UPDATER, "Показать/скрыть возможность обновлять ядра (и информационные файлы ядер)." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, + "Показывать 'Обновление пакетов миниатюр'" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LEGACY_THUMBNAIL_UPDATER, + "Показывать или скрывать меню с возможностью скачивания пакетов миниатюр." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_INFORMATION, "Показать Информация" @@ -3358,10 +3266,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS, "Показать вкладку Настройка в главном меню." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Задать пароль для включения вкладки Настройки" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, "Применение пароля при скрытии вкладки Настройки может позже восстановить ее из меню. Для этого нужно перейти на вкладку Главное меню, выбрать Включить вкладку Настройки и ввести пароль." @@ -3474,10 +3378,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_SUBLABELS, "Подписи к элементам меню" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Показывать описание выбранного элемента меню." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, "Показ приветствия" @@ -3489,6 +3389,30 @@ MSG_HASH( /* FIXME Not RGUI specific */ /* Settings > User Interface > Views > Quick Menu */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESUME_CONTENT, + "Показывать 'Продолжить контент'" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESUME_CONTENT, + "Показывать или скрывать пункт меню 'Продолжить контент'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_RESTART_CONTENT, + "Показывать 'Перезапустить контент'" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_RESTART_CONTENT, + "Показывать или скрывать пункт меню 'Перезапустить контент'." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_CLOSE_CONTENT, + "Показывать 'Закрыть контент'" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_CLOSE_CONTENT, + "Показывать или скрывать пункт меню 'Закрыть контент'." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_TAKE_SCREENSHOT, "Показать Сделать скриншот" @@ -3791,26 +3715,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SCALE_FACTOR, "Масштаб в меню" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Глобальный множитель масштабирования, применяемый при отрисовке меню. Используется для изменения размеров пользовательского интерфейса." - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Задний фон" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Выберите изображение для установки в качестве обоев меню." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, "Непрозрачность фона" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Изменить прозрачность обоев интерфейса." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, "Прозрачность кадра" @@ -3835,22 +3743,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS, "Тип миниатюры для отображения." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_TICKER_TYPE, + "Анимация бегущей строки" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, "Скорость бегущей строки" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "Скорость прокрутки длинных строк текста в меню." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, "Сглаживание бегущих строк" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "Использовать гладкую анимацию прокрутки для длинных строк текста в меню. Незначительно снижает производительность." - ) /* Settings > AI Service */ @@ -3898,12 +3802,8 @@ MSG_HASH( /* Settings > Accessibility */ MSG_HASH( - MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Скорость озвучивания" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Настройка темпа речи диктора, от быстрого до медленного." + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_ENABLED, + "Включить специальные возможности" ) /* Settings > Power Management */ @@ -3914,10 +3814,18 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_ENABLE, "Включить достижения" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, + "Открывайте достижения в классических играх. Для дополнительной информации посетите https://retroachievements.org" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, "Достижения в хардкорном режиме" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE, + "Удваивает количество заработанных очков.\nОтключает для всех игр быстрые сохранения, читы, перемотку, паузу и замедление.\nВключение опции во время работы ядра перезапустит игру." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE, "Списки лидеров" @@ -3946,6 +3854,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Включает тестирование неофициальных достижений и/или бета-функций." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Звук разблокировки" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Воспроизвести звук, когда достижение разблокировано." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, "Подробный режим" @@ -3959,8 +3875,8 @@ MSG_HASH( "Автоматический скриншот" ) MSG_HASH( - MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "Автоматически сделать скриншот при получении достижения." + MENU_ENUM_SUBLABEL_CHEEVOS_START_ACTIVE, + "Начать сеанс со всеми доступными достижениями (включая открытые ранее)." ) /* Settings > Network */ @@ -4005,58 +3921,30 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD, "Пароль сервера" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Пароль для подключения к Netplay-хосту. Используется только в режиме хоста." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, "Пароль сервера для режима наблюдателя" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Пароль для подключения к netplay-хосту только в режиме наблюдателя. Используется только в режиме хоста." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, "Режим наблюдателя для Netplay" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Начинать netplay в режиме наблюдателя." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, "Разрешать клиентов в режиме Slave" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Разрешать подключения в режиме slave. Клиенты в режиме slave требуют немного вычислительной мощности со своей стороны, но задержка сети может значительно увеличиться." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, "Запретить клиентов не в режиме Slave" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Запрещать подключения не в режиме slave. Не рекомендуется, за исключением очень быстрых сетей с очень слабыми машинами." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, "Режим без состояния Netplay" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Запускать netplay в режиме, не требующем сохранения. Если включено, потребуется очень быстрая сеть, но netplay будет без заиканий, поскольку нет повторов." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, "Проверка фреймов Netplay" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Частота кадров, с которой netplay будет проверять синхронизацию хоста и клиента." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, "Кадры задержки ввода" @@ -4089,18 +3977,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_CMD_PORT, "Сетевой командный порт" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Сетевой геймпад" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Сетевой удаленный базовый порт" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Включить удаленного пользователя %d" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, "Команды stdin" @@ -4113,10 +3989,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_ON_DEMAND_THUMBNAILS, "Скачивать миниатюры при обращении" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "Автоматически загружать миниатюры при просмотре плейлистов. Существенно влияет на производительность." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, "Настройки обновлений" @@ -4159,10 +4031,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "История запуска" - ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, "Сохранять в плейлист список недавно запущенных игр, изображений, музыки и видео." @@ -4175,10 +4043,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_HISTORY_SIZE, "Предельное количество записей для истории запуска." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Размер списка избранного" - ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, "Количество записей в избранном. При достижении предела, новые записи не будут добавлены до удаления старых. Установка значения -1 даёт 'неограниченное' (99999) количество записей. ВНИМАНИЕ: уменьшение значения приведёт к удалению существующих записей!" @@ -4203,18 +4067,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL, "Сортировка плейлистов по алфавиту" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "Сортировать плейлисты в алфавитном порядке. Не влияет на списки запущенных ранее игр, изображений, музыки и видео." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, "Сохранять плейлисты в старом формате" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, - "Записывать плейлисты в устаревшем текстовом формате. Если выкл., плейлисты будут сохраняться в формате JSON." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, "Сжимать плейлисты" @@ -4243,10 +4099,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "Ядро:" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Время игры:" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, "Последнее время запуска:" @@ -4259,14 +4111,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, "Выбрать, какое время работы будет отображаться в метках плейлиста. Соответствующая опция должна быть включена в настройках 'Сохранений'." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Формат метки времени последнего запуска в плейлисте" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Формат даты/времени, используемый для отображения в плейлисте информации о последнем запуске. ПРИМЕЧАНИЕ: опции '(до/после полудня)' могут незначительно влиять на производительность на некоторых платформах." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCAN_WITHOUT_CORE_MATCH, "Сканирование без привязки к ядру" @@ -4275,14 +4119,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_SCAN_WITHOUT_CORE_MATCH, "Если выкл., контент будет добавлен в плейлист, только если установлено подходящее ядро. Если вкл., контент будет всё равно добавлен в плейлист. Необходимое ядро вы сможете установить позже после сканирования." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Управление плейлистами" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Действия с выбранными плейлистами (установка/сброс привязки ядер и т.д.)." - ) /* Settings > Playlists > Playlist Management */ @@ -4306,18 +4142,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_SORT_MODE, "Порядок сортировки" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Изменить порядок сортировки записей для текущего плейлиста." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, "Очистка плейлиста" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Удалить неверные/двойные записи и проверить привязки ядер." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, "Удалить плейлист" @@ -4353,10 +4181,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER_LANGUAGE, "Язык" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Устанавливает язык интерфейса." - ) /* Settings > User > Privacy */ @@ -4389,7 +4213,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "Сервис RetroAchievements. Для дополнительной информации посетите страницу http://retroachievements.org" + "Открывайте достижения в классических играх. Для дополнительной информации посетите https://retroachievements.org" ) /* Settings > User > Accounts > RetroAchievements */ @@ -4400,7 +4224,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "Введите имя пользователя от вашего аккаунта Retro Achievements." + "Ввод имени пользователя для аккаунта RetroAchievements." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, @@ -4435,10 +4259,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_ASSETS_DIRECTORY, "Ассеты" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Данная папка используется по умолчанию драйверами меню для загрузки ассетов и т.д." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, "Динамические обои" @@ -4459,10 +4279,6 @@ MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, "Браузер файлов" ) -MSG_HASH( /* FIXME Not RGUI specific */ - MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Установить начальный каталог для файлового браузера." - ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, "Конфигурация" @@ -4547,18 +4363,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RECORDING_CONFIG_DIRECTORY, "Конфигурация записи" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Выберите папку, где будут находиться ваши записи конфигураций." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, "Оверлей" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Выберите папку, где будут находиться ваши наложения (Overlays)." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREENSHOT_DIRECTORY, "Скриншот" @@ -4571,18 +4379,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_AUTOCONFIG_DIR, "Преднастроенные контроллеры" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Если игровой джойстик подключен, то джойстик будет автомотически подстроен, если существует подходящий файл автоматической настройки." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, "Переопределение ввода" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Сохранить все переназначенные элементы управления в этой папке." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, "Плейлисты" @@ -4655,14 +4455,6 @@ MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_DISCONNECT, "Отключить активное соединение Netplay." ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Обновить список комнат" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Сканировать для поиска новых комнат." - ) /* Netplay > Host */ @@ -4719,10 +4511,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Ядро" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_DAT_FILE, "Аркадный DAT-файл" @@ -4731,6 +4519,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE, "Выбрать XML DAT-файл Logiqxс или MAME для автоматического переименования добавленного аркадного контента (MAME, FinalBurn Neo и т.д.)." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_DAT_FILE_FILTER, + "При использовании аркадного DAT-файла контент добавляется в плейлист только при совпадении с записями в DAT-файле." + ) /* Playlist > Playlist Item */ @@ -4777,10 +4569,6 @@ MSG_HASH( /* Playlist Item > Set Core Association */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Текущее ядро" - ) /* Playlist Item > Information */ @@ -5046,18 +4834,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_EJECT, "Извлечь диск" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Извлекает виртуальный диск. ПРИМЕЧАНИЕ: Если RetroArch настроен на паузу во время меню, некоторые ядра не могут регистрировать изменения если не возобновлять эмуляцию после действия с диском." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, "Вставить диск" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "Вставляет виртуальный диск в соответствии с текущим индексом диска. ПРИМЕЧАНИЕ: Если RetroArch настроен на паузу во время меню, некоторые ядра не могут регистрировать изменения если не возобновлять эмуляцию после действия с диском." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, "Загрузить новый диск" @@ -5077,10 +4857,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES, "Наблюдать за изменениями шейдеров" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "Автоматически применять изменения внесенные в шейдер." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, "Загрузить предварительную настройку шейдера" @@ -5109,10 +4885,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, "Шейдерные проходы" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Повышайте или уменьшайте кол-во используемых шейдеров pipeline. Вы можете привязать отдельный шейдер к каждому pipeline конвейера и настроить его масштаб и фильтрацию." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, "Шейдер" @@ -5140,18 +4912,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_CORE, "Сохранить предварительную настройку ядра" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Сохраните текущие настройки шейдера как настройки по умолчанию для этого игры/ядра." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, "Сохранить пресет для контента в директории" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Применяет текущие настройки шейдера для всего контента в текущей директории." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, "Сохранить предварительную настройку игры" @@ -5204,6 +4968,22 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_ACHIEVEMENTS_TO_DISPLAY, "Нет доступных достижений" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_PAUSE, + "Приостановить хардкорный режим для достижений" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_PAUSE, + "Приостановить достижения для текущего сеанса (это действие включит быстрые сохранения, читы, перемотку, паузу и замедление)." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_RESUME, + "Возобновить достижения в хардкорном режиме" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACHIEVEMENT_RESUME, + "Возобновить достижения для текущего сеанса (это действие отключит быстрые сохранения, читы, перемотку, паузу и замедление)." + ) /* Quick Menu > Information */ @@ -5230,6 +5010,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "Нет информации о ядре." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "Резервные копии ядра отсутствуют" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "Нет избранного." @@ -5262,6 +5046,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Настройки не найдены." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Не найдено устройств Bluetooth" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Сети не найдены." @@ -5317,10 +5105,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_DISCHARGING, "Разряжается" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Нет источника" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, "<Использовать этот каталог>" @@ -5345,10 +5129,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_RETROPAD, "Ретро-геймпад" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, - "Ретро-геймпад с аналогами" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THUMBNAIL_MODE_BOXARTS, "Бокс-арты" @@ -5457,22 +5237,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5, "Кнопка мыши 5" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Колесо вверх" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Колесо вниз" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Колесо влево" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Колесо вправо" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, "Ранняя" @@ -5604,6 +5368,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_LINEAR_FILTER, "Линейный фильтр меню" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_LINEAR_FILTER, + "Добавляет небольшое размытие в меню для сглаживания пикселей." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RGUI_MENU_COLOR_THEME, "Цветовая тема меню" @@ -5678,6 +5446,18 @@ MSG_HASH( MENU_ENUM_SUBLABEL_XMB_FONT, "Выбрать основной шрифт для меню интерфейса." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_RED, + "Цвет шрифта меню (красный)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_GREEN, + "Цвет шрифта меню (зелёный)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_FONT_COLOR_BLUE, + "Цвет шрифта меню (синий)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_THEME, "Тема значка меню" @@ -5710,10 +5490,6 @@ MSG_HASH( /* FIXME Unused? */ MENU_ENUM_LABEL_VALUE_XMB_MAIN_MENU_ENABLE_SETTINGS, "Включить вкладку Настройки" ) -MSG_HASH( /* FIXME Unused? */ - MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Включает вкладку Настройки. Для появления вкладки требуется перезапуск." - ) /* XMB: Settings Options */ @@ -5721,10 +5497,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON, "Лента" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Лента (упрощённая)" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, "Простой снег" @@ -5804,10 +5576,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, "Сортировка плейлистов после сокращения имён" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Если вкл., после удаления из имени плейлиста компонента 'система' плейлисты будут отсортированы по алфавиту. Необходима перезагрузка для внесения изменений." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, "Цветовая тема меню" @@ -6064,10 +5832,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_USER, "Игрок" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_USE_BUILTIN_IMAGE_VIEWER, - "Использовать встроенный просмотрщик изображений" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_MAX_SWAPCHAIN_IMAGES, "Максимальное количество образов свопчейнов" @@ -6111,10 +5875,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ASPECT_RATIO_AUTO, "Автоотношение сторон" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Имя (lan): %s" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, "Статус" @@ -6191,10 +5951,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_AUDIO_VIDEO_TROUBLESHOOTING, "Устранение проблем с аудио/видео" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Изменение обложки виртуального геймпада" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, "Загрузка содержимого" @@ -6400,10 +6156,6 @@ MSG_HASH( MSG_PUBLIC_ADDRESS, "Публичный адрес" ) -MSG_HASH( - MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Нет аргументов и встроенного меню, отображается справка..." - ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, "Установка диска в привод" @@ -6500,6 +6252,10 @@ MSG_HASH( MSG_SCANNING_CORES, "Сканирование ядрер..." ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "пропущено ядер: " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "Сброс ядер: " @@ -7312,10 +7068,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "Не настроен, используется резервный" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Сканирование Bluetooth завершено." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Сканирование Wi-Fi успешно завершено." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Сканирование устройств Bluetooth..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Сканирование беспроводных сетей..." @@ -7364,6 +7128,14 @@ MSG_HASH( MSG_CHEAT_DELETE_SUCCESS, "Чит удалён." ) +MSG_HASH( + MSG_CHEEVOS_HARDCORE_MODE_DISABLED, + "Загружено быстрое сохранение. Достижения в хардкорном режиме для текущей сессии отключены." + ) +MSG_HASH( + MSG_CHEEVOS_HARDCORE_MODE_DISABLED_CHEAT, + "Активирован чит-код. Достижения в хардкорном режиме для текущей сессии отключены." + ) MSG_HASH( MSG_RESAMPLER_QUALITY_NORMAL, "Нормальная" @@ -7372,6 +7144,26 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_IN_PROGRESS, "Сканирование: " ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "Сканирование ядер: " + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "Резервная копия установленного ядра уже существует: " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Резервное копирование ядра завершено: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "Выбранная резервная копия ядро уже установлена: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Ошибка создания резервной копии ядра: " + ) /* Lakka */ @@ -7438,6 +7230,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VI_WIDTH, "Установить ширину экрана VI" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SUSTAINED_PERFORMANCE_MODE, + "Режим устойчивой производительности" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAL60_ENABLE, "Использовать режим PAL60" @@ -7458,14 +7254,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "Включить касание" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Клавиатура и геймпад включены" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Тип отображения клавиатуры для геймпада" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, "Включить малую клавиатуру" @@ -7557,4 +7345,8 @@ MSG_HASH( ) #endif #ifdef HAVE_QT +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QT_SCAN_FINISHED, + "Сканирование завершено.

\nДля корректного сканирования контента необходимо:\n
  • загрузить совместимое ядро
  • \n
  • обновить инфофайлы ядер
  • \n
  • обновить базы данных
  • \n
  • перезапустите RetroArch, если был выполнен любой из перечисленных пунктов
\nКонтент должен соответствовать записям существующих баз данных по ссылке. Если сканирование всё равно не работает, отправьте отчёт об ошибке." + ) #endif diff --git a/intl/msg_hash_sk.h b/intl/msg_hash_sk.h index 60b76f166e..0c6de10529 100644 --- a/intl/msg_hash_sk.h +++ b/intl/msg_hash_sk.h @@ -12,10 +12,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_TAB, "História" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Obrázok" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, "Hudba" @@ -56,10 +52,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, "Hudba" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Obrázok" - ) /* Main Menu > Online Updater */ @@ -319,14 +311,6 @@ MSG_HASH( /* Settings > Input > Hotkey Binds */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Hlasitosť +" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Hlasitosť -" - ) /* Settings > Input > Port # Binds */ @@ -336,6 +320,8 @@ MSG_HASH( /* Settings > Core */ +#ifndef HAVE_DYNAMIC +#endif /* Settings > Configuration */ @@ -367,6 +353,8 @@ MSG_HASH( /* Settings > On-Screen Display > On-Screen Overlay */ + + /* Settings > On-Screen Display > Video Layout */ @@ -375,10 +363,6 @@ MSG_HASH( /* Settings > User Interface */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Zobrazenie" - ) /* Settings > User Interface > Views */ @@ -411,10 +395,6 @@ MSG_HASH( /* Settings > Playlists */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Veľkosť zoznamu obľúbených" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE, "Jadro:" @@ -495,10 +475,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Jadro" - ) /* Playlist > Playlist Item */ diff --git a/intl/msg_hash_sv.h b/intl/msg_hash_sv.h new file mode 100644 index 0000000000..2dc26515ba --- /dev/null +++ b/intl/msg_hash_sv.h @@ -0,0 +1,364 @@ +#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900) +#if (_MSC_VER >= 1700) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif +#pragma warning(disable:4566) +#endif + +/* Top-Level Menu */ + + +/* Main Menu */ + + +/* Main Menu > Load Core */ + + +/* Main Menu > Load Content */ + + +/* Main Menu > Load Content > Playlists */ + + +/* Main Menu > Online Updater */ + + +/* Main Menu > Information */ + + +/* Main Menu > Information > Core Information */ + + +/* Main Menu > Information > System Information */ + + +/* Main Menu > Information > Database Manager */ + + +/* Main Menu > Information > Database Manager > Information */ + + +/* Main Menu > Configuration File */ + + +/* Main Menu > Help */ + + +/* Main Menu > Help > Basic Menu Controls */ + + +/* Settings */ + + +/* Settings > Drivers */ + + +/* Settings > Video */ + + +/* Settings > Video > CRT SwitchRes */ + + +/* Settings > Video > Output */ + + +/* Settings > Video > Fullscreen Mode */ + + +/* Settings > Video > Windowed Mode */ + + +/* Settings > Video > Scaling */ + + +/* Settings > Video > Synchronization */ + + +/* Settings > Audio */ + + +/* Settings > Audio > Output */ + + +/* Settings > Audio > Resampler */ + + +/* Settings > Audio > Synchronization */ + + +/* Settings > Audio > MIDI */ + + +/* Settings > Audio > Mixer Settings > Mixer Stream */ + + +/* Settings > Audio > Menu Sounds */ + + +/* Settings > Input */ + + +/* Settings > Input > Haptic Feedback/Vibration */ + + +/* Settings > Input > Menu Controls */ + + +/* Settings > Input > Hotkey Binds */ + + +/* Settings > Input > Port # Binds */ + + +/* Settings > Latency */ + + +/* Settings > Core */ + +#ifndef HAVE_DYNAMIC +#endif + +/* Settings > Configuration */ + + +/* Settings > Saving */ + + +/* Settings > Logging */ + + +/* Settings > File Browser */ + + +/* Settings > Frame Throttle */ + + +/* Settings > Frame Throttle > Rewind */ + + +/* Settings > Frame Throttle > Frame Time Counter */ + + +/* Settings > Recording */ + + +/* Settings > On-Screen Display */ + + +/* Settings > On-Screen Display > On-Screen Overlay */ + + + + +/* Settings > On-Screen Display > Video Layout */ + + +/* Settings > On-Screen Display > On-Screen Notifications */ + + +/* Settings > User Interface */ + + +/* Settings > User Interface > Views */ + + +/* Settings > User Interface > Views > Quick Menu */ + + +/* Settings > User Interface > Views > Settings */ + + +/* Settings > User Interface > Appearance */ + + +/* Settings > AI Service */ + + +/* Settings > Accessibility */ + + +/* Settings > Power Management */ + +/* Settings > Achievements */ + + +/* Settings > Network */ + + +/* Settings > Network > Updater */ + + +/* Settings > Playlists */ + + +/* Settings > Playlists > Playlist Management */ + + +/* Settings > User */ + + +/* Settings > User > Privacy */ + + +/* Settings > User > Accounts */ + + +/* Settings > User > Accounts > RetroAchievements */ + + +/* Settings > User > Accounts > YouTube */ + + +/* Settings > User > Accounts > Twitch */ + + +/* Settings > Directory */ + + +/* Music */ + +/* Music > Quick Menu */ + + +/* Netplay */ + + +/* Netplay > Host */ + + +/* Import content */ + + +/* Import content > Scan File */ + + +/* Import content > Manual Scan */ + + +/* Playlist > Playlist Item */ + + +/* Playlist Item > Set Core Association */ + + +/* Playlist Item > Information */ + + +/* Quick Menu */ + + +/* Quick Menu > Options */ + + +/* Quick Menu > Controls */ + + +/* Quick Menu > Controls > Load Remap File */ + + +/* Quick Menu > Cheats */ + + +/* Quick Menu > Cheats > Start or Continue Cheat Search */ + + +/* Quick Menu > Cheats > Load Cheat File (Replace) */ + + +/* Quick Menu > Cheats > Load Cheat File (Append) */ + + +/* Quick Menu > Cheats > Cheat Details */ + + +/* Quick Menu > Disc Control */ + + +/* Quick Menu > Shaders */ + + +/* Quick Menu > Shaders > Save */ + + +/* Quick Menu > Shaders > Remove */ + + +/* Quick Menu > Shaders > Shader Parameters */ + + +/* Quick Menu > Overrides */ + + +/* Quick Menu > Achievements */ + + +/* Quick Menu > Information */ + + +/* Miscellaneous UI Items */ + + +/* Settings Options */ + + +/* RGUI: Settings > User Interface > Appearance */ + + +/* RGUI: Settings Options */ + + +/* XMB: Settings > User Interface > Appearance */ + + +/* XMB: Settings Options */ + + +/* Ozone: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings Options */ + + +/* Qt (Desktop Menu) */ + + +/* Unsorted */ + + +/* Unused (Only Exist in Translation Files) */ + + +/* Unused (Needs Confirmation) */ + + +/* Discord Status */ + + +/* Notifications */ + + +/* Lakka */ + + +/* Environment Specific Settings */ + + +#ifdef HAVE_LAKKA_SWITCH +#endif +#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) +#endif +#ifdef HAVE_LAKKA +#endif +#ifdef GEKKO +#endif +#ifdef HAVE_ODROIDGO2 +#else +#endif +#if defined(_3DS) +#endif +#ifdef HAVE_QT +#endif diff --git a/intl/msg_hash_tr.h b/intl/msg_hash_tr.h index 5f62704210..50f9c17c9b 100644 --- a/intl/msg_hash_tr.h +++ b/intl/msg_hash_tr.h @@ -26,7 +26,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_IMAGES_TAB, - "Görüntüler" + "Resimler" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MUSIC_TAB, @@ -105,7 +105,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_WIMP, - "Kapalıysa masaüstü menüsünü açar." + "Geleneksel masaüstü menüsünü açar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, @@ -113,7 +113,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, - "Kiosk kipini devre dışı bırak. Değişikliğin tam etkili olması için yeniden başlatma gerekir." + "Kiosk kipini devre dışı bırak. (Yeniden Başlatılmalı)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, @@ -125,7 +125,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY, - "Netplay oturumun kur veya katıl." + "Netplay oturumu kur veya katıl." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS, @@ -192,7 +192,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, - "İndirilen dizinden bir çekirdek kur ya da geri yükle." + "'İndirilenler' dizinden Çekirdeği kur ya da geri yükle." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, @@ -230,7 +230,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_FAVORITES, - "'Sık Kullanılanlara' eklediğiniz içerik burada görünecektir." + "'Sık Kullanılanlar' kısmına eklediğiniz içerik burada görünecektir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, @@ -242,12 +242,16 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, - "Resim" + "Resimler" ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_IMAGES, "Daha önce görüntülenen resimler burada görünecek." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, + "Videolar" + ) MSG_HASH( MENU_ENUM_SUBLABEL_GOTO_VIDEO, "Daha önce oynatılmış olan videolar burada görünecektir." @@ -281,7 +285,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, - "Seçilen oynatma listesinin her girişi için ayrı ayrı küçük resimler indirin." + "Seçilen oynatma listesindeki girişler için küçük resimleri indirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, @@ -297,7 +301,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Joypad Profillerini Güncelle" + "Kontroller Profillerini Güncelle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, @@ -437,6 +441,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_REQUIRED, "Gerekli" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Kurulu Çekirdeği Kilitle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Kurulu olan çekirdeğin değiştirilmesini önle. İçerik belirli bir çekirdek sürüm gerektirdiğinde istenmeyen güncellemeleri önlemek için kullanılabilir (örn. Arcade ROM setleri)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_DELETE, "Çekirdeği Sil" @@ -445,6 +457,34 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CORE_DELETE, "Bu çekirdeği diskten kaldır." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Çekirdeği Yedekle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Kurulu olan çekirdeğin arşivlenmiş bir yedeğini oluşturun." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Yedeği Geri Yükle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Arşivlenen yedeklemeler listesinden çekirdeğin önceki bir sürümünü kurun." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Yedeği Sil" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Arşivlenen yedeklemeler listesinden bir dosyayı kaldırın." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[Otomatik]" + ) /* Main Menu > Information > System Information */ @@ -530,7 +570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, - "Ağ Oyun Kolu Desteği" + "Ağ Kontroller Desteği" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, @@ -1083,15 +1123,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_DRIVER, - "Kullanılacak giriş sürücüsü. Video sürücüsüne bağlı olarak, farklı bir giriş sürücüsünü zorlayabilir." + "Kullanılacak giriş sürücüsü. Bazı video sürücüleri farklı bir giriş sürücüsünü zorlar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_JOYPAD_DRIVER, - "Oyun kolu" + "Kontroller" ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_DRIVER, - "Kullanılacak oyun kolu sürücüsü." + "Kullanılacak kontroller sürücüsü." ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_DRIVER, @@ -1121,9 +1161,13 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Kullanılacak kamera sürücüsü." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Kullanılacak Bluetooth sürücüsü." + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_DRIVER, - "Kullanılacak WiFi sürücüsü." + "Kullanılacak Wi-Fi sürücüsü." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOCATION_DRIVER, @@ -1222,7 +1266,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_BLACK_FRAME_INSERTION, - "Karelerin arasına siyah bir çerçeve ekler. Gölgelenmeyi önlemek için 60Hz içerik oynatmak isteyen 120Hz ekranlı kullanıcılar için kullanışlıdır." + "Kareler arasına siyah bir kare ekler. Bazı yüksek yenileme hızlı ekranlarda gölgelenmeyi ortadan kaldırmak için kullanışlıdır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_GPU_SCREENSHOT, @@ -1453,7 +1497,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ASPECT_RATIO, - "En boy oranı 'Yapılandırma' olarak ayarlanmışsa, video boy oranı için kayan nokta değeri (genişlik / yükseklik)." + "En Boy Oranı 'Özel En Boy Oranı' olarak ayarlanmışsa, video en boy oranı (genişlik / yükseklik) için kayan nokta değeri kullanılır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_X, @@ -1461,7 +1505,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_X, - "Özel görünüm alanı ofseti, görünümün X ekseni konumunu tanımlamak için kullanılır. 'Tamsayı Ölçeği' etkinse bunlar dikkate alınmaz. Daha sonra otomatik olarak ortalanacaktır." + "Görünüm penceresinin X ekseni konumunu tanımlamak için kullanılan özel görünüm alanı ofseti. 'Tam sayı Ölçeği' etkinse bunlar yok sayılır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_Y, @@ -1469,7 +1513,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_Y, - "Özel görünüm alanı ofseti, görünümün Y ekseni konumunu tanımlamak için kullanılır. 'Tamsayı Ölçeği' etkinse bunlar dikkate alınmaz. Daha sonra otomatik olarak ortalanacaktır." + "Görünüm penceresinin Y ekseni konumunu tanımlamak için kullanılan özel görünüm alanı ofseti. 'Tam sayı Ölçeği' etkinse bunlar yok sayılır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_WIDTH, @@ -1477,7 +1521,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_WIDTH, - "En Boy Oranı 'Özel' olarak ayarlanmışsa kullanılan özel görünüm genişliği." + "En Boy Oranı 'Özel En Boy Oranı' olarak ayarlanmışsa kullanılan özel görünüm alanı genişliği." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_VIEWPORT_CUSTOM_HEIGHT, @@ -1485,7 +1529,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_VIEWPORT_CUSTOM_HEIGHT, - "En Boy Oranı 'Özel' olarak ayarlandıysa kullanılan özel görünüm yüksekliği." + "En Boy Oranı 'Özel En Boy Oranı' olarak ayarlanmışsa kullanılan özel görünüm alanı yüksekliği." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_CROP_OVERSCAN, @@ -1493,7 +1537,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_CROP_OVERSCAN, - "Görüntünün kenarları etrafındaki birkaç pikseli, bazen de çöp pikselleri de içeren geliştiriciler tarafından geleneksel olarak boş bırakılır." + "Görüntünün kenarları etrafında, bazen çöp pikselleri de içeren geliştiriciler tarafından boş bırakılan birkaç piksel keser. (Yeniden Başlatılmalı)" ) /* Settings > Video > Synchronization */ @@ -1512,7 +1556,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SWAP_INTERVAL, - " Vsync için özel bir takas aralığı kullanır. Monitör yenileme hızını etkili bir şekilde yarıya indirmek için bunu ayarla." + "Vsync için özel bir takas aralığı kullanır. Monitör yenileme hızını etkili bir şekilde yarıya indirmek için bunu ayarla." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ADAPTIVE_VSYNC, @@ -1520,7 +1564,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC, - "Dikey eşitleme, performans hedef yenileme hızının altına düşene kadar etkinleştirilir.\nBu, performansın gerçek zamanın altına düştüğünde tıkanıklığı en aza indirebilir ve daha fazla enerji tasarrufu sağlayabilir." + "V-Sync, performans hedef yenileme hızının altına düşene kadar etkinleştirilir. Performans gerçek zamanlıın altına düştüğünde aksaklığı en aza indirebilir ve daha enerji tasarruflu olabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FRAME_DELAY, @@ -1528,7 +1572,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FRAME_DELAY, - "Daha fazla video takılma riski pahasına gecikmeyi azaltır. V-Sync'ten sonra gecikme ekler (ms cinsinden)." + "Daha fazla video takılma riski pahasına gecikmeyi azaltır. V-Sync'den sonra gecikme ekler (ms cinsinden)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_HARD_SYNC, @@ -1552,7 +1596,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VRR_RUNLOOP_ENABLE, - "Çekirdekten sapmama zamanlaması istenir. Değişken Yenileme Hızına sahip ekranlar, G-Sync ve FreeSync için kullanın." + "Çekirdek talep edilen zamanlamadan sapma yok. Değişken Yenileme Hızı ekranları (G-Sync, FreeSync, HDMI 2.1 VRR) için kullanın." ) /* Settings > Audio */ @@ -1587,7 +1631,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_SETTINGS, - "Mikser" + "Karıştırıcı" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_SETTINGS, @@ -1607,11 +1651,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_MUTE, - "Mixer'i Sustur" + "Karıştırıcıyı Sustur" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_MUTE, - "Mikser sesini kapatın/açın." + "Karıştırıcı sesini kapat/aç." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_FASTFORWARD_MUTE, @@ -1631,7 +1675,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MIXER_VOLUME, - "Mikser Ses Kazancı (dB)" + "Karıştırıcı Ses Kazancı (dB)" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_MIXER_VOLUME, @@ -1651,7 +1695,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_EXCLUSIVE_MODE, - "WASAPI sürücüsünün ses cihazının kontrolünü tamamen ele geçirmesine izin verin. Devre dışı bırakılırsa, bunun yerine paylaşılan modu kullanır." + "WASAPI sürücüsünün ses cihazının kontrolünü tamamen ele geçirmesine izin verin. Devre dışı bırakılırsa, bunun yerine paylaşılan kipi kullanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_FLOAT_FORMAT, @@ -1659,7 +1703,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_FLOAT_FORMAT, - "Ses cihazınız tarafından destekleniyorsa, WASAPI sürücüsü için kayan nokta biçimini kullanın." + "Ses cihazınız tarafından destekleniyorsa, WASAPI sürücüsü için kayan nokta biçimini kullanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_WASAPI_SH_BUFFER_LENGTH, @@ -1667,7 +1711,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_WASAPI_SH_BUFFER_LENGTH, - "WASAPI sürücüsünü paylaşılan modda kullanırken ara arabellek uzunluğu (karelerde)." + "WASAPI sürücüsünü paylaşılan kipte kullanırken ara arabellek uzunluğu (karelerde)." ) /* Settings > Audio > Output */ @@ -1694,7 +1738,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_LATENCY, - "Milisaniye cinsinden istenen ses gecikmesi. Ses sürücüsü verilen gecikmeyi sağlayamıyorsa onur duyulmayabilir." + "Mili saniye cinsinden istenen ses gecikmesi. Ses sürücüsü verilen gecikmeyi sağlayamıyorsa ses duyulmayabilir." ) /* Settings > Audio > Resampler */ @@ -1724,7 +1768,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_SYNC, - "Sesi eşitle. Tavsiye edilen." + "Sesi eşitle. Tavsiye edilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_MAX_TIMING_SKEW, @@ -1794,7 +1838,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_PLAY_SEQUENTIAL, - "Ses akışının oynatılmasını başlatır. Tamamlandığında, sıralı sırayla bir sonraki ses akışına atlar ve bu davranışı tekrarlar. Albüm çalma modu olarak kullanışlıdır." + "Ses akışının oynatılmasını başlatır. Tamamlandığında, sıralı sırayla bir sonraki ses akışına atlar ve bu davranışı tekrarlar. Albüm oynatma kipi olarak kullanışlıdır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_STOP, @@ -1802,7 +1846,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_STOP, - "Ses akışının çalınmasını durdurur, ancak bellekten çıkarmaz. 'Oynat' seçeneğini seçerek tekrar oynamaya başlayabilirsiniz." + "Ses akışının oynatılmasını durdurur, ancak bellekten çıkarmaz. 'Oynat' seçeneğini seçerek tekrar oynamaya başlayabilirsiniz." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_REMOVE, @@ -1810,7 +1854,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MIXER_ACTION_REMOVE, - "Ses akışının çalınmasını durdurur ve tamamen bellekten kaldırır." + "Ses akışının oynatılmasını durdurur ve tamamen bellekten kaldırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MIXER_ACTION_VOLUME, @@ -1825,7 +1869,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_ENABLE_MENU, - "Mikser" + "Karıştırıcı" ) MSG_HASH( MENU_ENUM_SUBLABEL_AUDIO_ENABLE_MENU, @@ -1833,7 +1877,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_OK, - "Tamam sesini etkinleştir" + "Tamam Sesini Etkinleştir" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_CANCEL, @@ -1845,7 +1889,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SOUND_BGM, - "BGM Sesini Etkinleştir" + "Arkaplan Sesini Etkinleştir" ) /* Settings > Input */ @@ -1860,19 +1904,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR, - "Sorgu Türü Davranışı" + "Yoklama Davranışı" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_POLL_TYPE_BEHAVIOR, - "Giriş yoklama işleminin RetroArch içinde yapılmasının etkisi. 'Erken' veya 'Geç' olarak ayarlamak, yapılandırmanıza bağlı olarak daha az gecikmeyle sonuçlanabilir." + "RetroArch'da girdi yoklamanın nasıl yapıldığını etkileyin. 'Erken' veya 'Geç' olarak ayarlamak, yapılandırmanıza bağlı olarak daha az gecikmeye neden olabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Bu Çekirdek Eşleşmesini Yeniden Yapılandır" + "Bu Çekirdek için Yeniden Kontroller" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE, - "Etkinleştirilirse, giriş, geçerli çekirdek için ayarlanan yeniden birleştirilen ciltlerle geçersiz kılınır." + "Mevcut çekirdek için ayarlanmış yeniden eşlenen bağlarla giriş bağlarını geçersiz kılar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, @@ -1880,7 +1924,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE, - "Etkinleştirildiğinde denetleyicileri(gamepadler) otomatik yapılandırmaya geçer, Tak ve Kullan stili." + "Profili Tak ve Çalıştır şeklinde olan kontrolleri otomatik olarak yapılandırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BUTTON_AXIS_THRESHOLD, @@ -1920,7 +1964,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_TURBO_PERIOD, - "Turbo etkin düğmelerin değiştirildiği süreyi açıklar. Sayılar çerçevelerde açıklanmıştır." + "Turbo özellikli düğmeler arasında geçiş yapılan süre (kare cinsinden)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_DUTY_CYCLE, @@ -1964,7 +2008,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BINDS, - "Kısayol Tuş Atamaları" + "Kısayollar" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BINDS, @@ -1972,7 +2016,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_USER_BINDS, - "Port %u Atamaları" + "Port %u Denetimleri" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_USER_BINDS, @@ -2021,11 +2065,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_PRESS_TWICE, - "Çıkış İçin İki Defa Bas" + "Çıkışı Onayla" ) MSG_HASH( MENU_ENUM_SUBLABEL_QUIT_PRESS_TWICE, - "RetroArch'tan çıkmak için çıkış kısayol tuşuna iki kez bas." + "RetroArch'dan çıkmak için Çık kısayol tuşuna iki kez basılmasını gerektirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, @@ -2033,172 +2077,344 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Geçiş menüsüne Gamepad düğme kombinasyonu." + "Geçiş menüsüne kontroller düğmesi kombinasyonu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_HOTKEY_BLOCK_DELAY, + "Kısayol Tuşu Etkinleştirme Gecikmesi (Çerçeveler)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_HOTKEY_BLOCK_DELAY, + "Atanan 'Kısayol Tuşu Etkinleştirme' tuşuna basıldıktan (ve basılı tutulduktan) sonra normal giriş engellenmeden önce karelere gecikme ekler. 'Kısayol Tuşu Etkinleştir' tuşundan normal girişin başka bir eyleme eşlendiğinde yakalanmasına izin verir (örn. RetroPad 'Seç')." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, - "Hızlı İleri Sarmayı Aç/Kapa" + "Hızlı İleri Sar (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_KEY, + "Hızlı ileri ve normal hız arasında geçiş yapar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY, - "Basılı Tutarak Hızlı İleri Sar" + "Hızlı İleri Sar (Basılı Tutarak)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FAST_FORWARD_HOLD_KEY, + "Basılı tutulduğunda hızlı ileri sarmayı sağlar. Anahtar bırakıldığında içerik normal hızda çalışır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_KEY, - "Ağır Çekim Aç/Kapa" + "Ağır Çekim (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_KEY, + "Ağır çekim ve normal hız arasında geçiş yapar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION_HOLD_KEY, - "Ağır Çekim İçin Basılı Tut" + "Ağır Çekim (Basılı Tutarak)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SLOWMOTION_HOLD_KEY, + "Basılı tutulduğunda ağır çekim sağlar. Anahtar bırakıldığında içerik normal hızda çalışır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Durum Yükle" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_LOAD_STATE_KEY, + "Seçili olan yuvadan kaydedilmiş bir durumu yükler." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, "Durum Kaydet" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SAVE_STATE_KEY, + "Halihazırda seçili olan yuvaya bir durum kaydeder." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Tam Ekran Aç/Kapa" + "Tam Ekran (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FULLSCREEN_TOGGLE_KEY, + "Tam ekran ve pencereli ekran kipleri arasında geçiş yapar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "RetroArch'dan Çıkış" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_QUIT_KEY, + "Tüm kayıt verilerinin ve yapılandırma dosyalarının diske temizlendiğinden emin olarak RetroArch'ı kapatır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, "Durum Kaydı Yuvası +" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_PLUS, + "Seçili olan kaydetme durumu yuva dizinini artırır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, "Durum Kaydı Yuvası -" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STATE_SLOT_MINUS, + "Seçili olan kaydetme durumu yuva dizinini azaltır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, "Geri sar" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_REWIND_HOTKEY, + "Tuş basılı tutulurken geçerli içeriği geri sarar. Not: 'Geri Sarma Desteği' etkinleştirilmiş olmalıdır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_BSV_RECORD_TOGGLE, - "Tekrar Oynatma Film Kaydı Geçişi" + "Kayıt Girişi Tekrar Oynatma (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_BSV_RECORD_TOGGLE, + "Oynanış girişlerinin .bsv biçiminde kaydedilmesini açar/kapatır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, - "Duraklat Aç/Kapa" + "Duraklat (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_PAUSE_TOGGLE, + "Çalışan içeriği duraklatılmış ve duraklatılmamış durumlar arasında değiştirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, "Kare ilerlemesi" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FRAMEADVANCE, + "Duraklatıldığında içeriği bir kare ilerletir." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, "Oyunu Sıfırla" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESET, + "Mevcut içeriği baştan başlatır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, "Sonraki Gölgelendirici" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_NEXT, + "'Video Gölgelendirici' dizininin kökündeki sonraki gölgelendirici hazır ayar dosyasını yükler ve uygular." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, "Önceki Gölgelendirici" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SHADER_PREV, + "'Video Gölgelendirici' dizininin köküne önceki gölgelendirici hazır ayar dosyasını yükler ve uygular." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, - "Hile İndeksi +" + "Sonraki Hile Dizini" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_PLUS, + "Seçili olan hile dizinini artırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, - "Hile İndeksi -" + "Önceki Hile Dizini" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_INDEX_MINUS, + "Seçili olan hile dizinini azaltır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, - "Hile Aç/Kapa" + "Hileler (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_CHEAT_TOGGLE, + "Seçili hileyi açar/kapatır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Ekran Görüntüsü Al" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SCREENSHOT, + "Mevcut içeriğin bir görüntüsünü yakalar." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Sesi Sustur Aç/Kapa" + "Sesi Sustur (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MUTE, + "Ses çıkışını açar/kapatır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, - "Ekran Klavyesi Aç/Kapa" + "Ekran Klavyesi (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OSK, + "Ekran klavyesini açar/kapatır" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_FPS_TOGGLE, - "FPS Aç/Kapa" + "FPS Göster (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_FPS_TOGGLE, + "'Saniyedeki kare' durum göstergesini açar/kapatır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SEND_DEBUG_INFO, "Hata Ayıklama Bilgisi Gönder" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_SEND_DEBUG_INFO, + "Cihazınız ve RetroArch yapılandırması hakkındaki teşhis bilgilerini analiz için sunucularımıza gönderir." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_HOST_TOGGLE, - "Netplay Sunucu Aç/Kapa" + "Netplay Sunucu (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_HOST_TOGGLE, + "Netplay barındırma özelliğini açar/kapatır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, - "Netplay Oyna/İzle Kipini Değiştir" + "Netplay Oyuncu/İzleyici Kipi (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_NETPLAY_GAME_WATCH, + "Mevcut netplay oturumunu 'oyuncu' ve 'izleyici' kipleri arasında değiştirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Kısayol tuşları" + "Kısayol Tuşu Etkinleştir" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_ENABLE_HOTKEY, + "Atandığında, diğer kısayol tuşlarının tanınabilmesi için 'Kısayol Tuşu Etkinleştir' tuşuna basılmalı (ve basılı tutulmalıdır). Denetleyici düğmelerinin, normal girişi etkilemeden kısayol tuşu işlevleriyle eşlenmesini sağlar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, - "Ses +" + "Sesi Yükselt" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_UP, + "Çıkış ses seviyesi seviyesini artırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, - "Ses -" + "Sesi Azalt" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_VOLUME_DOWN, + "Çıkış ses seviyesi seviyesini düşürür." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, "Sonraki Kaplama" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_OVERLAY_NEXT, + "O anda etkin olan ekran üstü bindirmenin bir sonraki kullanılabilir düzenine geçer." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, "Diski Çıkar Aç/Kapa" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_EJECT_TOGGLE, + "Sanal disk tepsisi kapalıysa, tepsiyi açar ve yüklenen diski kaldırır. Aksi takdirde, seçili olan diski yerleştirir ve tepsiyi kapatır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, "Sonraki Disk" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_NEXT, + "Seçili olan disk dizinini artırır. Not: Sanal disk tepsisi açık olmalıdır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, "Önceki Disk" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_DISK_PREV, + "Seçili olan disk dizinini azaltır. Not: Sanal disk tepsisi açık olmalıdır." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, - "Fareyi Yakala Aç/Kapa" + "Fareyi Yakala (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GRAB_MOUSE_TOGGLE, + "Fareyi yakalar veya serbest bırakır. Yakalandığında, sistem imleci gizlenir ve RetroArch görüntüleme penceresiyle sınırlandırılarak göreceli fare girişi iyileştirilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, - "Oyun Odaklaması Aç/Kapa" + "Oyun Odağı (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_GAME_FOCUS_TOGGLE, + "'Oyun Odağı' kipini etkinleştirir veya devre dışı bırakır. İçerik odaklandığında kısayol tuşları devre dışı bırakılır (tam klavye girişi çalışan çekirdeğe geçirilir) ve fare yakalanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_UI_COMPANION_TOGGLE, - "Masaüstü Menüsü Aç/Kapa" + "Masaüstü Menüsü (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_UI_COMPANION_TOGGLE, + "Tamamlayıcı PSMİ (Pencere, Simgeler, Menüler, İşaretçi) masaüstü kullanıcı arayüzünü açar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, - "Menü Aç/Kapa" + "Menü (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_MENU_TOGGLE, + "Mevcut ekranı menü ve çalışan içerik arasında değiştirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RECORDING_TOGGLE, - "Kayıt Aç/Kapa" + "Kayıt (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RECORDING_TOGGLE, + "Mevcut oturumun yerel bir video dosyasına kaydını başlatır/durdurur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_STREAMING_TOGGLE, - "Yayın Aç/Kapa" + "Akış (Aç/Kapa)" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_STREAMING_TOGGLE, + "Mevcut oturumun çevrimiçi bir video platformuna akışını başlatır/durdurur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_AI_SERVICE, "AI Servisi" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_AI_SERVICE, + "Mevcut içeriğin bir görüntüsünü yakalar, ardından ekrandaki metni çevirir ve/veya yüksek sesle okur. Not: 'Çeviri Servisi' Etkinleştirilmeli ve yapılandırılmalıdır." + ) /* Settings > Input > Port # Binds */ @@ -2216,15 +2432,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_ALL, - "Tümünü Bağla" + "Tüm Kontrolleri Ayarla" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_BIND_DEFAULT_ALL, - "Tümünü Varsayılana Bağla" + "Varsayılan Kontrollere Sıfırla" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Otomatik Yapılandırmayı Kaydet" + "Kontroller Profilini Kaydet" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_INDEX, @@ -2248,19 +2464,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, - "Yukarı D-Pad" + "D-Pad Yukarı" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, - "Aşağı D-Pad" + "D-Pad Aşağı" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, - "Sol D-Pad" + "D-Pad Sol" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, - "Sağ D-Pad" + "D-Pad Sağ" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, @@ -2391,19 +2607,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_SECONDARY_INSTANCE, - "Önden Gidici İkinci Örneği Kullan" + "Ön Koşucu için İkinci Örneği Kullan" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_SECONDARY_INSTANCE, - "Devam etmek için RetroArch Çekirdeğin ikinci bir örneğini kullanır. Yükleme durumu nedeniyle ses sorunlarını önler." + "İlerlemek için RetroArch çekirdeğinin ikinci bir örneğini kullanın. Yükleme durumu nedeniyle ses sorunlarını önler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RUN_AHEAD_HIDE_WARNINGS, - "Önden Gidici Uyarılarını Gizle" + "Ön Koşucu Uyarılarını Gizle" ) MSG_HASH( MENU_ENUM_SUBLABEL_RUN_AHEAD_HIDE_WARNINGS, - "Ön-Koşucu kullanırken ortaya çıkan uyarı mesajını gizler ve çekirdek durum kaydediciyi desteklemez." + "Ön-Koşucu kullanırken görüntülenen uyarı mesajını gizleyin ve çekirdek durum kaydetmeyi desteklemez." ) /* Settings > Core */ @@ -2422,7 +2638,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DRIVER_SWITCH_ENABLE, - "Çekirdeklerin, yüklü olanlardan farklı bir video sürücüsüne geçiş yapmasını sağlayın." + "Çekirdeklerin şu anda yüklü olandan farklı bir video sürücüsüne geçmesine izin verin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DUMMY_ON_CORE_SHUTDOWN, @@ -2430,7 +2646,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DUMMY_ON_CORE_SHUTDOWN, - "Bazı çekirdeklerin kapatma özelliği olabilir. Etkinleştirildiğinde, çekirdeğin RetroArch'ı kapatmasını engeller. Bunun yerine, kukla bir çekirdek yükler." + "Bazı çekirdeklerin bir kapatma özelliği vardır, sahte bir çekirdek yüklemek RetroArch'ın kapanmasını önler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, @@ -2444,13 +2660,31 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "İçerik yüklemeyi denemeden önce gerekli tüm üretici yazılımının olup olmadığını kontrol edin." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Her Çalıştırmada İçerik Çekirdeğini Yeniden Yükle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Gerekli çekirdek yüklü olduğu halde, içerik başlatılırken RetroArch'ı yeniden başlat. Bu, yükleme süresinin uzaması uğruna, sistem kararlılığını arttırabilir." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Döndürmeye İzin Ver" ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE, - "Çekirdeklerin ekranı ayarlamasına izin ver. Devre dışı bırakıldığında, döndürme istekleri yok sayılır. Ekranı el ile döndüren ayarlarda kullanışlıdır." + "Çekirdeklerin dönüş ayarlamasına izin verin. Devre dışı bırakıldığında, döndürme istekleri yok sayılır. Ekranı el ile döndüren kurulumlar için kullanışlıdır." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_MANAGER_LIST, + "Çekirdekleri Yönet" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_MANAGER_LIST, + "Kurulu çekirdeklerde (yedekleme, geri yükleme, silme vb.) Çevrimdışı bakım görevlerini gerçekleştirin ve temel bilgileri görüntüleyin." ) /* Settings > Configuration */ @@ -2461,7 +2695,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Çıkışta yapılandırma dosyasındaki değişiklikleri kaydet." + "Çıkışta yapılandırma dosyasındaki değişiklikleri kaydeder." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, @@ -2504,15 +2738,15 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE, - "Klasördeki Kayıtları Sırala" + "Kayıtları Klasörlere Göre Sırala" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE, - "Kullanılan Çekirdeğin adını taşıyan klasörlerde kaydetme dosyalarını sıralayın." + "Kayıt dosyalarını kullanılan çekirdeğin adını taşıyan klasörlere göre sıralayın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE, - "Klasörlerdeki Durum Kayıtlarını Sırala" + "Durum Kayıtlarını Klasörlere Göre Sırala" ) MSG_HASH( MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE, @@ -2532,15 +2766,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL, - "Geçici olmayan SaveRAM'ı düzenli aralıklarla otomatik olarak kaydeder. Aksi belirtilmedikçe bu varsayılan olarak devre dışıdır. Aralık saniye cinsinden ölçülür. 0 değeri otomatik kaydetmeyi devre dışı bırakır." + "Geçici olmayan SaveRAM'i düzenli aralıklarla (saniye cinsinden) otomatik olarak kaydeder." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_INDEX, - "Durumu Dizine Otomatik Kaydet" + "Durum Kaydı Dizini'ni Otomatik Olarak Artır" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_INDEX, - "Bir kayıt işlemi yaparken, kaydetme durumu indeksi, kaydedilmeden önce otomatik olarak artırılır. İçerik yüklenirken, dizin mevcut en yüksek dizine ayarlanacaktır." + "Bir durum kaydı yapmadan önce, durum kaydı dizini otomatik olarak artar. İçerik yüklerken, dizin mevcut en yüksek dizine ayarlanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_SAVE, @@ -2548,15 +2782,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE, - "RetroArch'ın çalışma zamanının sonunda otomatik olarak bir kayıt ekranı oluşturur. 'Otomatik Yükleme Durumu' etkinse, RetroArch otomatik olarak bu ekranı yükleyecektir." + "İçerik kapatıldığında otomatik olarak durum kaydı oluşturur. 'Durumu Otomatik Olarak Yükle' etkinse RetroArch bu durum kaydını otomatik olarak yükler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Otomatik Durum Yükle" + "Durumu Otomatik Olarak Yükle" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD, - "Otomatik kaydetme durumunu başlangıçta otomatik olarak yükle." + "Otomatik durum kaydını başlangıçta otomatik olarak yükle." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVESTATE_THUMBNAIL_ENABLE, @@ -2564,11 +2798,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE, - "Menü içindeki kaydetme durumlarının küçük resimlerini göster." + "Menüde durum kayıtlarının küçük resimlerini göster." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVE_FILE_COMPRESSION, - "RAMKaydı Sıkıştırması" + "SaveRAM Sıkıştırması" ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_FILE_COMPRESSION, @@ -2604,7 +2838,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_RUNTIME_LOG, - "Her bir içerik öğesinin ne kadar süre çalıştığını, kayıtlar Çekirdeğe ayrılmış olarak izler." + "Her bir içerik ögesinin ne kadar süre çalıştığını, kayıtlar Çekirdeğe ayrılmış olarak izler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_RUNTIME_LOG_AGGREGATE, @@ -2627,7 +2861,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FRONTEND_LOG_LEVEL, - "Frontend Günlük Seviyesi" + "Ön Uç Kayıt Seviyesi" ) MSG_HASH( MENU_ENUM_SUBLABEL_FRONTEND_LOG_LEVEL, @@ -2663,18 +2897,18 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PERFCNT_ENABLE, - "RetroArch (ve çekirdekler) için performans sayaçları.\nSayaç verileri sistem darboğazlarının belirlenmesine ve sistem ve uygulama performansının ince ayarına yardımcı olabilir" + "RetroArch ve çekirdekler için performans sayaçları. Sayaç verileri, sistem darboğazlarının belirlenmesine ve performansın ince ayarının yapılmasına yardımcı olabilir." ) /* Settings > File Browser */ MSG_HASH( MENU_ENUM_LABEL_VALUE_SHOW_HIDDEN_FILES, - "Gizli Dosya ve Klasörleri Göster" + "Gizli Dosya ve Dizinleri Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Dosya tarayıcısının içindeki gizli dosyaları/dizinleri göster." + "Dosya tarayıcıda gizli dosyaları ve dizinleri gösterin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, @@ -2682,7 +2916,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE, - "Dosya gezgininde desteklenen uzantılarla gösterilen dosyaları filtrele." + "Dosya tarayıcısında gösterilen dosyaları desteklenen uzantılara göre süzgeçle." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_BUILTIN_PLAYER, @@ -2713,7 +2947,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FASTFORWARD_RATIO, - "Azami Çalışma Hızı" + "Hızlı İleri Sarma Oranı" ) MSG_HASH( MENU_ENUM_SUBLABEL_FASTFORWARD_RATIO, @@ -2721,11 +2955,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SLOWMOTION_RATIO, - "Ağır Çekim Oranı" + "Ağır-Çekim Oranı" ) MSG_HASH( MENU_ENUM_SUBLABEL_SLOWMOTION_RATIO, - "Ağır çekimde, içerik belirtilen/ayarlanan aşamaya göre yavaşlar." + "Ağır çekim kullanılırken içeriğin oynatılma oranı." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENUM_THROTTLE_FRAMERATE, @@ -2744,15 +2978,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_ENABLE, - "Bir hata yaptım? Geri sar ve tekrar dene.\nBunun, performans düşüşüne neden olduğuna dikkat edin." + "Son oynanışta önceki bir noktaya dön. Bu, oynarken ciddi bir performans düşüşüne neden olur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_GRANULARITY, - "Geri Sarma Öge Boyu" + "Kareleri Geri Sar" ) MSG_HASH( MENU_ENUM_SUBLABEL_REWIND_GRANULARITY, - "Tanımlanmış sayıda kare geri alırken, bir defada birkaç kare geri sararak geri sarma hızını artırabilirsiniz." + "Adım başına geri sarılacak kare sayısı, daha yüksek değerler geri sarma hızını artırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_REWIND_BUFFER_SIZE, @@ -2916,7 +3150,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, - "Fare İmlecini Bindirmeli Göster" + "Fare İmlecini Kaplamalı Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_OVERLAY_SHOW_MOUSE_CURSOR, @@ -2944,7 +3178,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_OPACITY, - "Kaplamanın Kullanıcı Arayüzündeki elementlerin opaklığı." + "Kaplamanın tüm arayüz elementlerin şeffaflığı." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_PRESET, @@ -2960,7 +3194,25 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_SCALE, - "Kaplamanın Kullanıcı Arayüzündeki elementlerin boyutu." + "Kaplamanın tüm arayüz elementlerin boyutu." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_X, + "Kaplama Dengesi X" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_X, + "Kaplama tüm Arayüz ögelerinin X dengesi." + ) + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OVERLAY_CENTER_Y, + "Kaplama Dengesi Y" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_OVERLAY_CENTER_Y, + "Kaplama tüm Arayüz ögelerinin Y dengesi." ) /* Settings > On-Screen Display > Video Layout */ @@ -3006,11 +3258,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGETS_ENABLE, - "Yalnızca eski metin sistemi yerine modern dekore edilmiş animasyonları, bildirimleri, göstergeleri ve kontrolleri kullanın." + "Süslü animasyonlar, bildirimler, göstergeler ve kontroller kullanın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_AUTO, - "Grafik Gereçlerini Otomatik Ölçekle" + "Grafik Pencere Ögelerini Otomatik Olarak Ölçeklendir" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_AUTO, @@ -3022,7 +3274,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_FULLSCREEN, - "Tam ekran kipinde ekran gereçlerini çizerken el ile ölçeklendirme aşamasını geçersiz kılar. Yalnızca 'Grafik Gereçlerini Otomatik Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." + "Tam ekran kipinde ekran gereçleri çizerken el ile ölçeklendirme etkeni geçersiz kılınır. Yalnızca 'Grafik Pencere Ögelerini Otomatik Olarak Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WIDGET_SCALE_FACTOR_WINDOWED, @@ -3030,7 +3282,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR_WINDOWED, - "Pencereli ekran kipinde ekran gereçlerini çizerken el ile ölçeklendirme aşamasını geçersiz kılar. Yalnızca 'Grafik Gereçlerini Otomatik Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." + "Pencereli ekran kipinde ekran gereçleri çizerken el ile ölçeklendirme etkeni geçersiz kılınır. Yalnızca 'Grafik Pencere Ögelerini Otomatik Olarak Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_SHOW, @@ -3038,7 +3290,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_FPS_SHOW, - "Ekrandaki saniye başına mevcut kare hızını görüntüle." + "Saniyedeki mevcut kareleri görüntüler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_FPS_UPDATE_INTERVAL, @@ -3066,11 +3318,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MEMORY_SHOW, - "Bellek Ayrıntılarını Dahil Et" + "Bellek Kullanımını Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_MEMORY_SHOW, - "Mevcut bellek kullanımı/toplamı ekrandaki FPS/Kare sayısını içerir." + "Sistemde kullanılan ve toplam bellek miktarını görüntüler." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "\"İçerik Yükle\" Başlangıç ​​Bildirimi" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "İçerik yüklerken kısa bir tanıtım geri bildirimi animasyonu gösterin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, @@ -3078,7 +3338,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_FONT_PATH, - "Ekrandaki bildirimler için farklı bir yazı tipi seçin." + "Ekrandaki bildirimler için yazı tipini seçin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_SIZE, @@ -3141,11 +3401,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS, - "Görünümler" + "Menü Ögesi Görünürlüğü" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Menü ekranındaki ögeleri göster veya gizle." + "RetroArch'ta görünürlük menüsü ögelerine geçiş yapın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -3161,7 +3421,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHOW_ADVANCED_SETTINGS, - "Uzman kullanıcılar için gelişmiş ayarları göster (varsayılan olarak gizli)." + "Uzman kullanıcılar için gelişmiş ayarları göster." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_ENABLE_KIOSK_MODE, @@ -3169,7 +3429,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_ENABLE_KIOSK_MODE, - "Konfigürasyonla ilgili tüm ayarları gizleyerek kurulumu korur." + "Yapılandırmayla ilgili tüm ayarları gizleyerek kurulumu korur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_KIOSK_MODE_PASSWORD, @@ -3177,7 +3437,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_KIOSK_MODE_PASSWORD, - "Kiosk modunu etkinleştirirken bir parola girilir, Ana Menü'ye gidip Kiosk Modunu Devre Dışı Bırak'ı seçip parolayı girerek daha sonra menüden devre dışı bırakmayı mümkün kılar." + "Kiosk kipini etkinleştirirken bir parola girilir, Ana Menü'ye gidip Kiosk Kipini Devre Dışı Bırak'ı seçip parolayı girerek daha sonra menüden devre dışı bırakmayı mümkün kılar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NAVIGATION_WRAPAROUND, @@ -3185,11 +3445,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NAVIGATION_WRAPAROUND, - "Liste sınırına yatay veya dikey olarak ulaşılırsa, baştan sona ve / veya sona doğru kaydırın." + "Liste sınırına yatay veya dikey olarak ulaşılırsa, baştan sona veya sona doğru kaydırın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_LIBRETRO, - "Menü Etkinleştirildiğinde Duraklat" + "Menü Etkinken İçeriği Duraklat" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO, @@ -3201,7 +3461,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SAVESTATE_RESUME, - "Hızlı Menüden 'Durumu Kaydet' veya 'Durumu Yükle' seçtikten sonra menüyü otomatik olarak kapat ve mevcut içeriği devam ettir. Bunu devre dışı bırakmak, çok yavaş cihazlarda tasarruf durumu performansını artırabilir." + "Bir durumu kaydettikten veya yükledikten sonra menüyü otomatik olarak kapatın ve içeriği sürdürün. Bunu devre dışı bırakmak, çok yavaş cihazlarda durum kaydı performansını artırabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_INSERT_DISK_RESUME, @@ -3209,7 +3469,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_INSERT_DISK_RESUME, - "Disk Kontrolü menüsünden 'Disk Ekle' veya 'Yeni Disk Yükle' seçtikten sonra menüyü otomatik olarak kapat ve mevcut içeriğe devam et." + "Yeni bir disk aktardıktan veya taktıktan sonra menüyü otomatik olarak kapatın ve içeriği sürdürün." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MOUSE_ENABLE, @@ -3217,7 +3477,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MOUSE_ENABLE, - "Menünün fare ile kontrol edilmesini sağla." + "Menünün bir fare ile kontrol edilmesini sağlar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_POINTER_ENABLE, @@ -3225,7 +3485,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_POINTER_ENABLE, - "Menünün ekran dokunuşlarıyla kontrol edilmesini sağla." + "Menünün dokunmatik ekranla kontrol edilmesini sağlar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE, @@ -3237,7 +3497,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PAUSE_NONACTIVE, - "Arka Planda Çalıştırma" + "Etkin Değilken İçeriği Duraklat" ) MSG_HASH( MENU_ENUM_SUBLABEL_PAUSE_NONACTIVE, @@ -3265,7 +3525,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_START_ON_BOOT, - "Açılışta Arayüz Yardımcısını Başlat" + "Önyüklemede Arayüz Yardımcısını Başlat" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_MENUBAR_ENABLE, @@ -3273,11 +3533,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DESKTOP_MENU_ENABLE, - "Masaüstü Menüsü (Yeniden Başlat)" + "Masaüstü Menüsü (Yeniden Başlatılmalı)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UI_COMPANION_TOGGLE, - "Başlangıçta Masaüstü Menüsünü Göster" + "Başlangıçta Masaüstü Menüsünü Aç" ) /* Settings > User Interface > Views */ @@ -3288,7 +3548,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS, - "Hızlı Menü ekranındaki öğeleri göster veya gizle." + "Hızlı Menü'deki menü ögelerinin görünürlüğünü değiştirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_VIEWS_SETTINGS, @@ -3296,7 +3556,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SETTINGS_VIEWS_SETTINGS, - "Ayarlar ekranındaki ögeleri göster veya gizle." + "Ayarlar menüsünde menü ögelerinin görünürlüğünü değiştirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE, @@ -3308,7 +3568,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT, - "İçerik Yükle'yi Göster" + "İçerik Yükle Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT, @@ -3316,7 +3576,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_DISC, - "Disk Yükle'yi Göster" + "Disk Yükle Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_DISC, @@ -3324,7 +3584,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SHOW_DUMP_DISC, - "Diskten Aktarı Göster" + "Diskten Aktar Göster" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_DUMP_DISC, @@ -3404,7 +3664,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_SETTINGS_PASSWORD, - "Ayarları Etkinleştirmek için Şifreyi Ayarla Sekmesi" + "'Ayarlar' Sekmesini Etkinleştirmek için Parola Ayarla" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_SETTINGS_PASSWORD, @@ -3448,7 +3708,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_SHOW_NETPLAY, - "Ana menünün içindeki netplay sekmesini göster." + "Ana menü içindeki netplay sekmesini göster." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_HISTORY, @@ -3496,7 +3756,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_TIMEDATE_DATE_SEPARATOR, - "Mevcut tarih menünün içinde görüntülendiğinde yıl/ay/ gün bileşenleri arasında ayırıcı olarak kullanılacak karakteri belirtir." + "Mevcut tarih menünün içinde görüntülendiğinde yıl/ay/gün bileşenleri arasında ayırıcı olarak kullanılacak karakteri belirtir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_BATTERY_LEVEL_ENABLE, @@ -3520,7 +3780,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SUBLABELS, - "Seçili olan menü girişi için ek bilgi gösterir." + "Menü ögeleri için ek bilgi sağlar." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_SHOW_START_SCREEN, @@ -3528,7 +3788,7 @@ MSG_HASH( /* FIXME Not RGUI specific */ ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_SHOW_START_SCREEN, - "Menüde başlangıç ekranını göster. Bu program ilk kez başladıktan sonra otomatik olarak false değerine ayarlanır." + "Menüde başlangıç ekranını göster. Bu program ilk kez başladıktan sonra otomatik olarak kapalı değerine ayarlanır." ) /* Settings > User Interface > Views > Quick Menu */ @@ -3889,15 +4149,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SCALE_FACTOR, - "Menüyü çizerken genel bir ölçeklendirme aşaması uygular. Kullanıcı arayüzünün boyutunu artırmak veya azaltmak için kullanılabilir." + "Menüdeki kullanıcı arayüzü ögelerinin boyutunu ölçeklendirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER, - "Arkaplan" + "Arkaplan Resmi" ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER, - "Menü duvar kağıdı olarak ayarlamak için bir resim seç." + "Menü arka planı olarak ayarlamak için bir resim seçin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_WALLPAPER_OPACITY, @@ -3905,7 +4165,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY, - "Arka plan duvar kağıdının opaklığını değiştirin." + "Arka plan resminin şeffaflığını değiştirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY, @@ -3945,7 +4205,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_TYPE, - "Uzun menü metin dizelerini görüntülemek için kullanılan yatay kaydırma yöntemini seçin." + "Uzun menü metnini görüntülemek için kullanılan yatay kaydırma yöntemini seçin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SPEED, @@ -3953,7 +4213,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_SPEED, - "Uzun menü metni dizelerinde gezinirken animasyon hızı." + "Uzun menü metnini kaydırırken animasyon hızı." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_TICKER_SMOOTH, @@ -3961,14 +4221,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_TICKER_SMOOTH, - "Uzun menü metin dizelerini görüntülerken yumuşak kaydırma animasyonu kullanın. Küçük bir performans etkisi var." + "Uzun menü metnini görüntülerken yumuşak kaydırma animasyonunu kullanın. Küçük bir eksi performans etkisi vardır." ) /* Settings > AI Service */ MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_MODE, - "Çeviri Servisi Çıkış" + "Çeviri Servisi Çıkışı" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_MODE, @@ -3988,11 +4248,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_ENABLE, - "Çeviri Servisi kısayol tuşuna basıldığında çalışacak Çeviri Servisi etkinleştir." + "Çeviri Servisi kısayol tuşuna basıldığında Çeviri Servisini etkinleştir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AI_SERVICE_PAUSE, - "Çeviri Servisini Duraklat Aç/Kapa" + "Çeviri Sırasında Duraklat" ) MSG_HASH( MENU_ENUM_SUBLABEL_AI_SERVICE_PAUSE, @@ -4023,15 +4283,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_ENABLED, - "Menüde gezinme için erişilebilirlik öğreticisi aç/kapat" + "Menü gezintisine yardımcı olmak için Metin-Konuşma özelliğini etkinleştirir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Ekran Okuyucusu Konuşma Hızı" + "Metin Okuma Hızı" ) MSG_HASH( MENU_ENUM_SUBLABEL_ACCESSIBILITY_NARRATOR_SPEECH_SPEED, - "Öğretici için konuşma hızını hızlıdan yavaşa ayarlayın" + "Metin-Konuşma sesi için hız." ) /* Settings > Power Management */ @@ -4044,7 +4304,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_ENABLE, - "Klasik oyunlarda özel başarılar kazanmak için yarışın.\nDaha fazla bilgi için, ziyaret et http://retroachievements.org" + "Klasik oyunlarda başarılar kazanın. Daha fazla bilgi için https://retroachievements.org adresini ziyaret edin" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE, @@ -4060,7 +4320,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE, - "Oyuna özel skor tabloları.\nZorlu kip devre dışı bırakıldığında hiçbir etkisi yoktur." + "Oyuna özel skor tabloları. 'Zorlu Kip' devre dışı bırakıldığında hiçbir etkisi yoktur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_RICHPRESENCE_ENABLE, @@ -4086,9 +4346,17 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Test amaçlı resmi olmayan başarıları veya deneme özelliklerini kullan." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Sesin Kilidini Aç" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Bir başarının kilidi açıldığında bir ses çalar." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, - "Verbose Kipi" + "Ayrıntılı Kip" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE, @@ -4100,7 +4368,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT, - "Bir başarı kazanıldığında otomatik olarak ekran görüntüsü al." + "Bir başarı kazanıldığında otomatik olarak bir ekran görüntüsü alın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_START_ACTIVE, @@ -4119,11 +4387,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PUBLIC_ANNOUNCE, - "Netplay oyunlarının kamuya duyurulup duyulmayacağı. Ayarlanmamışsa, istemciler genel lobiyi kullanmak yerine el ile bağlanmalıdır." + "Netplay oyunlarının herkese duyurulup duyulmayacağı. Ayarlanmamışsa, istemciler genel lobiyi kullanmak yerine el ile bağlanmalıdır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER, - "Aktarma Sunucusunu Kullan" + "Aktarma Sunucusu Kullan" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER, @@ -4159,7 +4427,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_PASSWORD, - "Netplay ana bilgisayarına bağlanmak için parola. Yalnızca ana bilgisayar kipinde kullanılır." + "Ana bilgisayara bağlanan istemciler tarafından kullanılan parola." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SPECTATE_PASSWORD, @@ -4167,7 +4435,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_SPECTATE_PASSWORD, - "Yalnızca izleyici ayrıcalıklarıyla netplay ana bilgisayarına bağlanmak için parola. Yalnızca ana bilgisayar modunda kullanılır." + "Ana bilgisayara izleyici olarak bağlanan istemciler tarafından kullanılan parola." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR, @@ -4175,7 +4443,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_START_AS_SPECTATOR, - "Seyirci modunda netplay başlatılıp başlatılmayacağı." + "Netplay'i izleyici kipinde başlat." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ALLOW_SLAVES, @@ -4183,7 +4451,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_ALLOW_SLAVES, - "Bağımlı modda bağlantılara izin verilip verilmeyeceği. Köle modu istemciler her iki tarafta çok az işlem gücü gerektirir, ancak ağ gecikmesinden önemli ölçüde zarar görecektir." + "Bağımlı kipte bağlantılara izin ver. Bağımlı kip istemcileri her iki tarafta çok az işlem gücü gerektirir, ancak ağ gecikmesinden önemli ölçüde etkilenir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES, @@ -4191,15 +4459,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REQUIRE_SLAVES, - "Bağımlı modda olmayan bağlantılara izin verilmemesi. Çok zayıf makineleri olan çok hızlı ağlar dışında önerilmez." + "Bağımlı kipte olmayan bağlantılara izin verme. Çok zayıf makineleri olan çok hızlı ağlar dışında önerilmez." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_STATELESS_MODE, - "Netplay Ülkesiz Kip" + "Netplay Bölgesiz Kip" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_STATELESS_MODE, - "Netplay'i kaydetme durumları gerektirmeyen bir modda çalıştırıp çalıştırmamak. True olarak ayarlanırsa, çok hızlı bir ağ gereklidir, ancak geri sarma işlemi yapılmaz, bu yüzden net bir titreme olmaz." + "Netplay'i durum kaydı gerektirmeyen bir kipte başlatın. Çok hızlı bir ağ gereklidir, ancak geri sarma yapılmaz, bu nedenle netplay titremesi olmaz." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_CHECK_FRAMES, @@ -4207,7 +4475,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_CHECK_FRAMES, - "Netplay öğesinin ana bilgisayar ve istemcinin senkronize olduğunu doğrulayacağı karelerdeki sıklık." + "Netplay'in ana bilgisayar ve istemcinin eşit olduğunu doğrulayacağı frekans (kare cinsinden)." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_MIN, @@ -4215,7 +4483,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_MIN, - "Ağ gecikmesini gizlemek için netplay için kullanılacak giriş gecikmesi karelerinin sayısı. Jitteri azaltır ve gözle görülür giriş gecikmesi pahasına netçeyi daha az CPU-yoğunlaştırır." + "Ağ gecikmesini gizlemek için ve netplay için kullanılacak giriş gecikmesi karelerinin sayısı. Belirgin giriş gecikmesi pahasına titreşimi azaltır ve netplay'i daha az CPU kullanımına yoğunlaştırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, @@ -4223,7 +4491,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_INPUT_LATENCY_FRAMES_RANGE, - "Ağ gecikmesini gizlemek için kullanılabilecek giriş gecikmesi çerçevelerinin aralığı. Jitteri azaltır ve tahmin edilemeyen girdi gecikmesi pahasına netçeyi daha az CPU yoğun yapar." + "Ağ gecikmesini gizlemek için ve netplay için kullanılacak giriş gecikmesi karelerinin oranı. Belirgin giriş gecikmesi pahasına titreşimi azaltır ve netplay'i daha az CPU kullanımına yoğunlaştırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_NAT_TRAVERSAL, @@ -4231,7 +4499,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_NAT_TRAVERSAL, - "Barındırırken, LAN'lardan kaçan UPnP veya benzeri teknolojiler kullanarak, genel İnternetten bağlantıları dinlemeye çalışır." + "Barındırırken, LAN'lardan kaçmak için UPnP veya benzeri teknolojileri kullanarak genel İnternet'ten bağlantıları dinlemeye çalışın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL, @@ -4255,15 +4523,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_ENABLE, - "Ağ Oyun Kolu" + "Ağ RetroPad" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_REMOTE_PORT, - "Uzak Ağ Temel Port" + "Ağ RetroPad Temel Port" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETWORK_USER_REMOTE_ENABLE, - "Kullanıcı %d Uzak" + "Kullanıcı %d Ağ RetroPad" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STDIN_CMD_ENABLE, @@ -4279,7 +4547,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_NETWORK_ON_DEMAND_THUMBNAILS, - "Oynatma listelerine göz atarken eksik küçük resimleri otomatik olarak indirin. Performansa olumsuz etkisi olabilir." + "Oynatma listelerine göz atarken eksik küçük resimleri otomatik olarak indir. Ciddi bir eksi performans etkisi vardır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATER_SETTINGS, @@ -4318,14 +4586,30 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CORE_UPDATER_SHOW_EXPERIMENTAL_CORES, - "Öekirdek İndirici listesine 'deneysel' çekirdekler ekle. Bunlar genellikle geliştirme/test amaçlıdır ve genel kullanım için önerilmez." + "Çekirdek İndirici listesine 'deneysel' çekirdekler ekle. Bunlar genellikle geliştirme/test amaçlıdır ve genel kullanım için önerilmez." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP, + "Güncellemede Çekirdekleri Yedekle" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP, + "Çevrimiçi güncelleme yaparken kurulu çekirdeklerin otomatik olarak bir yedeğini oluşturun. Bir güncelleme bir gerileme getiriyorsa, çalışan bir çekirdeğe kolayca geri dönmeyi sağlar." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Çekirdek Yedeği Geçmiş Boyutu" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_UPDATER_AUTO_BACKUP_HISTORY_SIZE, + "Kurulu her çekirdek için kaç tane otomatik olarak oluşturulan yedek tutulacağını belirtir. Bu sınıra ulaşıldığında, çevrimiçi güncelleme yoluyla yeni bir yedekleme oluşturmak en eski yedeği siler. Not: El ile çekirdek yedeklemek bu ayardan etkilenmez." ) /* Settings > Playlists */ MSG_HASH( MENU_ENUM_LABEL_VALUE_HISTORY_LIST_ENABLE, - "Geçmiş Listesi" + "Geçmiş" ) MSG_HASH( MENU_ENUM_SUBLABEL_HISTORY_LIST_ENABLE, @@ -4341,7 +4625,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_FAVORITES_SIZE, - "Sık Kullanılanlar Listesi Boyutu" + "Sık Kullanılanlar Boyutu" ) MSG_HASH( MENU_ENUM_SUBLABEL_CONTENT_FAVORITES_SIZE, @@ -4369,7 +4653,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SORT_ALPHABETICAL, - "İçerik çalma listelerini alfabetik sıraya göre sıralar. Son kullanılan oyunların, resimlerin, müziklerin ve videoların 'geçmiş' oynatma listelerinin hariç tutulduğunu unutmayın." + "'Geçmiş', 'Görüntüler', 'Müzik' ve 'Videolar' oynatma listeleri hariç, içerik oynatma listelerini alfabetik sırayla sıralar." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_USE_OLD_FORMAT, @@ -4377,7 +4661,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_USE_OLD_FORMAT, - "İndirgenmiş düz metin biçimini kullanarak oynatma listeleri yazın. Devre dışı bırakıldığında çalma listeleri JSON kullanılarak biçimlendirilir." + "Düz metin biçimini kullanarak oynatma listeleri yazın. Devre dışı bırakıldığında, oynatma listeleri JSON kullanılarak biçimlendirilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_COMPRESSION, @@ -4409,7 +4693,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME, - "Oyun Süresi:" + "Çalışma süresi:" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED, @@ -4425,11 +4709,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Oynatma Listesi Alt Etiket Çalışma Zamanı 'Son Oynatılan' Biçimi" + "'Son Oynanan' Tarih ve Saat Biçimi" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE, - "Çalışma zamanı günlük kaydı 'son oynatılan' zaman damgası bilgilerini görüntülerken kullanılan tarih/saat biçimlendirme seklini seçer. Not: '(ÖÖ/ÖS)' seçeneklerinin bazı platformlar üzerinde küçük bir eksi performans etkisi olacaktır." + "'Son Oynanan' zaman damgası bilgileri için görüntülenen tarih ve saatin şeklini ayarlar. NOT: '(ÖÖ/ÖS)' seçeneklerinin bazı platformlar üzerinde küçük bir eksi performans etkisi olacaktır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_FUZZY_ARCHIVE_MATCH, @@ -4449,11 +4733,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_LIST, - "Oynatma Listesi Yönetimi" + "Oynatma Listelerini Yönet" ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_LIST, - "Seçili oynatma listesinde bakım görevleri gerçekleştirin (örneğin, varsayılan çekirdek ilişkilerini ayarla/sıfırla)." + "Oynatma listelerinde bakım görevleri gerçekleştirin." ) /* Settings > Playlists > Playlist Management */ @@ -4488,7 +4772,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_SORT_MODE, - "Bu oynatma listesindeki girdilerin nasıl sıralanacağını değiştirin." + "Bu oynatma listesindeki girişlerin nasıl sıralanacağını belirler." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_MANAGER_CLEAN_PLAYLIST, @@ -4496,7 +4780,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_PLAYLIST_MANAGER_CLEAN_PLAYLIST, - "Geçersiz/yinelenen girdileri kaldır ve çekirdek ilişkilendirmeleri doğrula." + "Çekirdek ilişkilendirmeleri doğrular ve geçersiz ve yinelenen girişleri kaldırır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DELETE_PLAYLIST, @@ -4539,7 +4823,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Arayüzün dilini ayarlar." + "Kullanıcı arayüzünün dilini ayarlar." ) /* Settings > User > Privacy */ @@ -4566,14 +4850,14 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOCATION_ALLOW, - "Konum servislerinin Çekirdek tarafından erişimine izin ver veya verme." + "Konum servislerinin çekirdekler tarafından erişimine izin ver veya verme." ) /* Settings > User > Accounts */ MSG_HASH( MENU_ENUM_SUBLABEL_ACCOUNTS_RETRO_ACHIEVEMENTS, - "RetroAchievements hizmeti. Daha fazla bilgi için http://retroachievements.org adresini ziyaret edin." + "Klasik oyunlarda başarılar kazanın. Daha fazla bilgi için http://retroachievements.org adresini ziyaret edin" ) /* Settings > User > Accounts > RetroAchievements */ @@ -4584,7 +4868,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_USERNAME, - "RetroAchievements hesabınızın kullanıcı adını girin." + "RetroAchievements hesabı kullanıcı adını girin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ACCOUNTS_CHEEVOS_PASSWORD, @@ -4633,7 +4917,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_ASSETS_DIRECTORY, - "Menü arayüzleri yüklenebilir varlıklar vb. Aramaya çalıştığında bu konum varsayılan olarak sorgulanır." + "RetroArch tarafından kullanılan menü varlıkları bu dizinde saklanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY, @@ -4649,15 +4933,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_THUMBNAILS_DIRECTORY, - "İlave küçük resimler (kutu resimleri / çeşitli görüntüler vb.) Burada saklanır." + "İlave küçük resimler (kutu resimleri/çeşitli görüntüler vb.) burada saklanır." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_BROWSER_DIRECTORY, - "Dosya Yöneticisi" + "Dosya Tarayıcısı" ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_SUBLABEL_RGUI_BROWSER_DIRECTORY, - "Dosya Gezgini için başlangıç dizinini ayarlar." + "Dosya tarayıcısının başlangıç ​​dizinini ayarlar." ) MSG_HASH( /* FIXME Not RGUI specific */ MENU_ENUM_LABEL_VALUE_RGUI_CONFIG_DIRECTORY, @@ -4745,7 +5029,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RECORDING_CONFIG_DIRECTORY, - "Kayıt yapılandırmaları burada tutulur." + "Kayıt yapılandırmaları bu dizinde saklanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OVERLAY_DIRECTORY, @@ -4753,7 +5037,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OVERLAY_DIRECTORY, - "Kolay erişim için kaplamaların tutulduğu bir dizini tanımlar." + "Kaplamalar bu dizinde saklanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_LAYOUT_DIRECTORY, @@ -4777,7 +5061,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_JOYPAD_AUTOCONFIG_DIR, - "Bir oyun kolu takılıysa, bu dizinde dosyaya karşılık gelen bir yapılandırma dosyası varsa, o oyun kolu otomatik olarak yapılandırılır." + "Denetleyicileri otomatik olarak yapılandırmak için kullanılan denetleyici profilleri bu dizinde depolanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY, @@ -4785,7 +5069,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_INPUT_REMAPPING_DIRECTORY, - "Tüm yeniden yapılandırılan kontrolleri bu dizine kaydeder." + "Girdi eşlemeleri bu dizinde saklanır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLIST_DIRECTORY, @@ -4801,7 +5085,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_RUNTIME_LOG_DIRECTORY, - "Oynatma zamanı günlük dosyalarını bu dizine kaydet." + "Çalışma zamanı günlük dosyalarını bu dizine kaydet." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY, @@ -4842,19 +5126,19 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER, - "Miksere Ekle" + "Karıştırıcıya Ekle" ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER, - "Ses parçasını kullanılabilir bir ses akışı yuvasına ekleyin. Şu anda mevcut slot bulunmuyorsa, dikkate alınmaz." + "Ses parçasını kullanılabilir bir ses akışı yuvasına ekleyin. Şu anda mevcut yuva bulunmuyorsa, dikkate alınmaz." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_PLAY, - "Miksere Ekle ve Oynat" + "Karıştırıcıya Ekle ve Oynat" ) MSG_HASH( MENU_ENUM_SUBLABEL_ADD_TO_MIXER_AND_PLAY, - "Ses parçasını kullanılabilir bir ses akışı yuvasına ekleyin ve oynatın. Şu anda mevcut slot bulunmuyorsa, dikkate alınmaz." + "Ses parçasını kullanılabilir bir ses akışı yuvasına ekleyin ve oynatın. Şu anda mevcut yuva bulunmuyorsa, dikkate alınmaz." ) /* Netplay */ @@ -4881,11 +5165,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_REFRESH_ROOMS, - "Oda Listesini Yenile" + "Netplay Sunucu Listesini Yenile" ) MSG_HASH( MENU_ENUM_SUBLABEL_NETPLAY_REFRESH_ROOMS, - "Yeni odalar için tarayın." + "Netplay sunucularını tarayın." ) /* Netplay > Host */ @@ -4938,11 +5222,11 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_COLLECTION, - "Miksere Ekle" + "Karıştırıcıya Ekle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER_AND_COLLECTION_AND_PLAY, - "Miksere Ekle ve Oynat" + "Karıştırıcıya Ekle ve Oynat" ) /* Import content > Manual Scan */ @@ -4973,7 +5257,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Çekirdek" + "Varsayılan Çekirdek" ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_CORE_NAME, @@ -4985,7 +5269,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_FILE_EXTS, - "Taramaya dahil edilecek dosya türlerinin alanla sınırlı listesi. Boşsa, tüm dosyaları içerir - veya bir çekirdek belirtilirse, çekirdek tarafından desteklenen tüm dosyalar geçerli olur." + "Boşluğa ayrılmış olarak taramaya dahil edilecek dosya türlerinin listesi. Boşsa, tüm dosya türlerini içerir veya bir çekirdek belirtilirse, çekirdek tarafından desteklenen tüm dosyalar." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Yinelemeli Tara" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MANUAL_CONTENT_SCAN_SEARCH_RECURSIVELY, + "Etkinleştirildiğinde, belirtilen 'İçerik Dizini' tüm alt dizinleri taramaya dahil edilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_SEARCH_ARCHIVES, @@ -5091,7 +5383,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_DETECT_CORE_LIST_OK_CURRENT_CORE, - "Mevcut çekirdek" + "Mevcut Çekirdek" ) /* Playlist Item > Information */ @@ -5125,7 +5417,7 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_RESUME_CONTENT, - "Devam et" + "Devam" ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME_CONTENT, @@ -5145,7 +5437,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CLOSE_CONTENT, - "Geçerli içeriği kapatır. Kaydedilmemiş değişiklikler kaybolabilir." + "Mevcut içeriği kapatır. Kaydedilmemiş değişiklikler kaybolabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TAKE_SCREENSHOT, @@ -5169,7 +5461,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SAVE_STATE, - "Seçili yuvaya konumu kaydedin." + "Seçili yuvaya durumu kaydedin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_STATE, @@ -5177,11 +5469,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LOAD_STATE, - "Seçili yuvadan kaydedilmiş konumu yükleyin." + "Seçili yuvadan kaydedilmiş durum yükleyin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_LOAD_STATE, - "Yükleme Durumunu Geri Al" + "Yüklü Durumunu Geri Al" ) MSG_HASH( MENU_ENUM_SUBLABEL_UNDO_LOAD_STATE, @@ -5189,11 +5481,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UNDO_SAVE_STATE, - "Durumu Kaydetmeyi Geri Al" + "Durum Kaydını Geri Al" ) MSG_HASH( MENU_ENUM_SUBLABEL_UNDO_SAVE_STATE, - "Bir durumun üzerine yazılmışsa, önceki kaydetme durumuna geri döner." + "Bir durumun üzerine yazılmışsa, önceki durum kaydına geri döner." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES, @@ -5373,15 +5665,15 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_TOP, - "Üste Yeni Kod Ekle" + "En Üste Yeni Hile Ekle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_ADD_NEW_BOTTOM, - "Alta Yeni Kod Ekle" + "En Alta Yeni Hile Ekle" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE_ALL, - "Tüm Kodları Sil" + "Tüm Hileleri Sil" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_APPLY_AFTER_LOAD, @@ -5426,17 +5718,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_BIG_ENDIAN, "Düşük Son Haneli" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CHEAT_BIG_ENDIAN, - "Yüksek son haneli : 258 = 0x0102,\nDüşük son haneli : 258 = 0x0201" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_SEARCH_EXACT, "Bellekte Değerleri Ara" ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_SEARCH_EXACT, - "Değeri değiştirmek için Sol/Sağ yap" + "Değeri değiştirmek için Sol veya Sağ tuşlara bas" ) MSG_HASH( MENU_ENUM_LABEL_CHEAT_SEARCH_EXACT_VAL, @@ -5605,7 +5893,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_COUNT, - "Hilenin kaç kez uygulanacağı.\nGeniş bellek alanlarını etkilemek için diğer iki Yineleme seçeneğiyle birlikte kullanın." + "Hile sayısı. Geniş bellek alanlarını etkilemek için diğer iki 'Yineleme' seçeneğiyle birlikte kullanın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_ADDRESS, @@ -5613,7 +5901,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_ADDRESS, - "Her “Yineleme Sayısı” ndan sonra Hafıza Adresi, bu sayı ile “Hafıza Arama Boyutu” ile artacaktır." + "Her yinelemeden sonra 'Bellek Adresi' bu sayı ile 'Bellek Arama Boyutunun' katı kadar artırılır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_REPEAT_ADD_TO_VALUE, @@ -5621,7 +5909,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_CHEAT_REPEAT_ADD_TO_VALUE, - "Her “İterasyon Sayısı” ndan sonra, Değer bu miktar kadar artacaktır." + "Her yinelemeden sonra 'Değer' bu miktarda artacaktır." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_RUMBLE_TYPE, @@ -5673,7 +5961,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEAT_DELETE, - "Bu Hileyi Sil" + "Bu Hileyi Kaldır" ) /* Quick Menu > Disc Control */ @@ -5684,7 +5972,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_EJECT, - "Sanal disk tepsisini açar ve şu anda yüklü olan diski kaldırır. NOT: RetroArch, menü etkinken duraklatmak üzere yapılandırılmışsa, içerik her disk kontrolü eyleminden sonra birkaç saniye boyunca devam ettirilmedikçe bazı çekirdekler değişiklikleri kaydetmeyebilir." + "Sanal disk tepsisini açar ve şu anda yüklü olan diski kaldırır. 'Menü Etkinken İçeriği Duraklat' etkinleştirilirse, her disk kontrolü işleminden sonra içerik birkaç saniye devam etmediği sürece bazı çekirdekler değişiklikleri kaydetmeyebilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_TRAY_INSERT, @@ -5692,7 +5980,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_DISK_TRAY_INSERT, - "'Mevcut Disk İndeksi'ne karşılık gelen disk ekler ve sanal disk tepsisini kapatır. NOT: RetroArch, menü etkinken duraklatmak üzere yapılandırılmışsa, içerik her disk kontrolü eyleminden sonra birkaç saniye boyunca devam ettirilmedikçe bazı çekirdekler değişiklikleri kaydetmeyebilir." + "'Mevcut Disk Dizini' kısmına karşılık gelen disk yerleştirir ve sanal disk tepsisini kapatır. 'Menü Etkinken İçeriği Duraklat' etkinleştirilirse, her disk kontrolü işleminden sonra içerik birkaç saniye devam etmediği sürece bazı çekirdekler değişiklikleri kaydetmeyebilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_IMAGE_APPEND, @@ -5702,6 +5990,10 @@ MSG_HASH( MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND, "Mevcut diski çıkarın, dosya sisteminden yeni bir disk seçin, sonra takın ve sanal disk tepsisini kapatın. NOT: Bu eski bir özellik. Bunun yerine, 'Diski Çıkar/Tak' ve 'Mevcut Disk İndeksi' seçeneklerini kullanarak disk seçimine izin veren M3U çalma listeleri aracılığıyla çok diskli başlıkların yüklenmesi önerilir." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISK_IMAGE_APPEND_TRAY_OPEN, + "Dosya sisteminden yeni bir disk seçin ve sanal disk tepsisini kapatmadan takın. NOT: Bu eski bir özelliktir. Bunun yerine, 'Mevcut Disk Dizini' seçeneğini kullanarak disk seçimine izin veren M3U çalma listeleri aracılığıyla çok diskli başlıkların yüklenmesi önerilir." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DISK_INDEX, "Mevcut Disk Dizini" @@ -5723,7 +6015,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES, - "Diskteki gölgelendirici dosyalarında yapılan değişiklikleri otomatik uygula." + "Diskteki gölgelendirici dosyalarında yapılan değişiklikleri otomatik olarak uygulayın." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET, @@ -5763,7 +6055,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PARAMETERS, - "Geçerli gölgelendiriciyi doğrudan değiştirir. Değişiklikler önceden ayarlanmış dosyaya kaydedilmeyecek." + "Mevcut gölgelendiriciyi doğrudan değiştirir. Değişiklikler önceden ayarlanmış dosyaya kaydedilmeyecek." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_NUM_PASSES, @@ -5771,7 +6063,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_NUM_PASSES, - "Gölgelendirici hattı geçiş miktarını artırın veya azaltın. Her hat geçişine ayrı bir gölgelendirici bağlayabilir ve ölçeğini ve filtrelemesini yapılandırabilirsiniz." + "Gölgelendirici geçiş miktarını artırın veya azaltın. Ayrı gölgelendiriciler her iş geçişine bağlanabilir ve ölçeğini ve filtrelemesini yapılandırabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER, @@ -5810,7 +6102,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_CORE, - "Geçerli gölgelendirici ayarlarını, uygulama/çekirdek için varsayılan ayarlar olarak kaydedin." + "Mevcut gölgelendirici ayarlarını bu çekirdek için varsayılan olarak kaydedin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_PARENT, @@ -5818,7 +6110,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_VIDEO_SHADER_PRESET_SAVE_PARENT, - "Geçerli gölgelendirici ayarlarını, geçerli içerik dizinindeki tüm dosyalar için varsayılan ayarlar olarak kaydedin." + "Mevcut gölgelendirici ayarlarını mevcut içerik dizinindeki tüm dosyalar için varsayılan olarak kaydedin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_SAVE_GAME, @@ -5933,7 +6225,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DETAIL, - "Veritabanı Girişi" + "Veritabanı Girdisi" ) MSG_HASH( MENU_ENUM_SUBLABEL_RDB_ENTRY_DETAIL, @@ -5958,6 +6250,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_CORE_INFORMATION_AVAILABLE, "Çekirdek Bilgisi Yok" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_CORE_BACKUPS_AVAILABLE, + "Çekirdek Yedeklemesi Yok" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_FAVORITES_AVAILABLE, "Sık Kullanılan Yok" @@ -5990,6 +6286,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "Ayar Bulunamadı" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "Bluetooth Cihazı Bulunamadı" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "Ağ Bulunamadı" @@ -6029,6 +6329,30 @@ MSG_HASH( /* Settings Options */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_IRISH, + "İrlandaca" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_ITALIAN, + "İtalyanca - İtalya" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_LATIN, + "Latince" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_MALAY, + "Malayca" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_MALTESE, + "Maltaca" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_NORWEGIAN, + "Norveçce" + ) MSG_HASH( /* FIXME Should be MENU_LABEL_VALUE */ MSG_UNKNOWN_COMPILER, "Bilinmeyen derleyici" @@ -6131,7 +6455,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE_NO_SOURCE, - "Kaynak yok" + "Kaynak Yok" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_USE_THIS_DIRECTORY, @@ -6149,6 +6473,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE, "" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RETROPAD_WITH_ANALOG, + "Analog ile RetroPad" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NONE, "Yok" @@ -6161,9 +6489,13 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_HOLD_START, "Start'a Basılı Tut (2 saniye)" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HOLD_SELECT, + "Select Tuşuna Basılı Tut (2 saniye)" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWN_SELECT, - "Aşağı + Seç" + "Aşağı + Select" ) MSG_HASH( MENU_ENUM_LABEL_RUMBLE_TYPE_DISABLED, @@ -6447,19 +6779,19 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP, - "Tekerlek Yukarı" + "Fare Tekerleği Yukarı" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN, - "Tekerlek Aşağı" + "Fare Tekerleği Aşağı" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP, - "Tekerlek Sola" + "Fare Tekerleği Sol" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN, - "Tekerlek Sağa" + "Fare Tekerleği Sağ" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_POLL_TYPE_BEHAVIOR_EARLY, @@ -6535,43 +6867,43 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HMS_AMPM, - "YYYY-AA-GG SS:DD:SN (AM/PM)" + "YYYY-AA-GG SS:DD:SN (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_YMD_HM_AMPM, - "YYYY-AA-GG SS:DD (AM/PM)" + "YYYY-AA-GG SS:DD (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HMS_AMPM, - "AA-GG-YYYY SS:DD:SN (AM/PM)" + "AA-GG-YYYY SS:DD:SN (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_MDYYYY_HM_AMPM, - "AA-GG-YYYY SS:DD (AM/PM)" + "AA-GG-YYYY SS:DD (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_MD_HM_AMPM, - "AA-GG SS:DD (AM/PM)" + "AA-GG SS:DD (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HMS_AMPM, - "GG-AA-YYYY SS:DD:SN (AM/PM)" + "GG-AA-YYYY SS:DD:SN (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMMYYYY_HM_AMPM, - "GG-AA-YYYY SS:DD (AM/PM)" + "GG-AA-YYYY SS:DD (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_DDMM_HM_AMPM, - "GG-AA SS:DD (AM/PM)" + "GG-AA SS:DD (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_HMS_AMPM, - "SS:DD:SN (AM/PM)" + "SS:DD:SN (ÖÖ/ÖS)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_TIMEDATE_HM_AMPM, - "SS:DD (AM/PM)" + "SS:DD (ÖÖ/ÖS)" ) /* RGUI: Settings > User Interface > Appearance */ @@ -7020,7 +7352,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_XMB_SHADOWS_ENABLE, - "Tüm simgeler için alt gölgeler çiz.\nPerformansa küçük bir yük bindirir." + "Tüm simgeler için alt gölgeler çizin. Bu küçük bir performans kaybına neden olur." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_XMB_RIBBON_ENABLE, @@ -7060,7 +7392,7 @@ MSG_HASH( /* FIXME Unused? */ ) MSG_HASH( /* FIXME Unused? */ MENU_ENUM_SUBLABEL_XMB_MAIN_MENU_ENABLE_SETTINGS, - "Ayarlar sekmesini etkinleştirir. Sekmenin görünmesi için yeniden başlatma gerekir." + "Ayarlar sekmesini etkinleştirir. (Yeniden Başlatılmalı)" ) /* XMB: Settings Options */ @@ -7071,7 +7403,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_RIBBON_SIMPLIFIED, - "Şerit (basitleştirilmiş)" + "Şerit (Basitleştirilmiş)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SHADER_PIPELINE_SIMPLE_SNOW, @@ -7230,7 +7562,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME, - "Etkinleştirildiğinde, sistem adlarını çalma listelerinden kaldırır. Örneğin, 'Sony - PlayStation' yerine 'PlayStation' yazar. Değişikliklerin etkili olması için yeniden başlatmayı gerektirir" + "Sistem adlarını oynatma listelerinden kaldırır. Örneğin, 'Sony - PlayStation', 'PlayStation' olur. (Yeniden Başlatılmalı)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, @@ -7238,7 +7570,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_OZONE_SORT_AFTER_TRUNCATE_PLAYLIST_NAME, - "Etkinleştirildiğinde, oynatma listeleri adları 'sistem' bileşeni kaldırıldıktan sonra alfabetik olarak yeniden sıralanır. Değişikliklerin geçerli olması için yeniden başlatma gerekir." + "Oynatma listeleri, adlarının üretici bileşeni kaldırıldıktan sonra alfabetik olarak yeniden sıralanacaktır. (Yeniden Başlatılmalı)" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_MENU_COLOR_THEME, @@ -7270,7 +7602,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS_OZONE, - "İçerik meta veri panelini başka bir küçük resim ile değiştirin." + "İçerik üst veri panelini başka bir küçük resimle değiştirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_OZONE_SCROLL_CONTENT_METADATA, @@ -7309,7 +7641,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_AUTO_ROTATE_NAV_BAR, - "Gezinme Çubuğunu Otomatik Döndür" + "Gezinti Çubuğunu Otomatik Döndür" ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_AUTO_ROTATE_NAV_BAR, @@ -7353,7 +7685,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MATERIALUI_DUAL_THUMBNAIL_LIST_VIEW_ENABLE, - "'Liste' türü oynatma listesi küçük resim görüntüleme kipini kullanırken ikincil küçük resmin görüntülenmesini sağlar. Bu ayarın yalnızca ekranda iki küçük resim göstermek için yeterli fiziksel genişliğe sahip olduğunda geçerli olduğunu unutmayın." + "'Liste' türü oynatma listesi küçük resim görüntüleme kiplerini kullanırken ikincil bir küçük resim görüntüler. Bu ayar yalnızca ekranda iki küçük resim göstermek için yeterli fiziksel genişliğe sahip olduğunda geçerlidir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MATERIALUI_THUMBNAIL_BACKGROUND_ENABLE, @@ -8148,6 +8480,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "Oynatma listesi yok." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Bağlandı" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "Çevrimiçi" @@ -8241,7 +8577,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_ROOM_NICKNAME_LAN, - "Kullanıcı Adı (yerel): %s" + "Rumuz (LAN): %s" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_STATUS, @@ -8277,7 +8613,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FORCE_ASPECT, - "En boy oranını zorla" + "En Boy Oranını Zorla" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SELECT_FROM_PLAYLIST, @@ -8285,7 +8621,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RESUME, - "Devam et" + "Devam" ) MSG_HASH( MENU_ENUM_SUBLABEL_RESUME, @@ -8309,7 +8645,7 @@ MSG_HASH( /* FIXME Still exists in a comment about being removed */ ) MSG_HASH( /* FIXME Still exists in a comment about being removed */ MENU_ENUM_SUBLABEL_MATERIALUI_MENU_FOOTER_OPACITY, - "Altbilgi grafiğinin opaklığını değiştirin." + "Alt bilgi grafiğinin şeffaflığını değiştirin." ) MSG_HASH( /* FIXME Still exists in a comment about being removed */ MENU_ENUM_LABEL_VALUE_MATERIALUI_MENU_HEADER_OPACITY, @@ -8317,7 +8653,7 @@ MSG_HASH( /* FIXME Still exists in a comment about being removed */ ) MSG_HASH( /* FIXME Still exists in a comment about being removed */ MENU_ENUM_SUBLABEL_MATERIALUI_MENU_HEADER_OPACITY, - "Başlık grafiğinin opaklığını değiştirin." + "Başlık grafiğinin şeffaflığını değiştirin." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_RDB_ENTRY_START_CONTENT, @@ -8345,7 +8681,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_CHANGE_VIRTUAL_GAMEPAD, - "Sanal Oyun Kolu Yerleşimini Değiştir" + "Sanal Kontroller Bindirmesini Değiştir" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_HELP_LOADING_CONTENT, @@ -8622,7 +8958,7 @@ MSG_HASH( MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_START_WHEN_LOADED, - "Netplay İçerik yüklendiğinde başlayacaktır." + "Netplay içerik yüklendiğinde başlayacaktır." ) MSG_HASH( /* FIXME Should be MSG_ */ MENU_ENUM_LABEL_VALUE_NETPLAY_LOAD_CONTENT_MANUALLY, @@ -8714,7 +9050,7 @@ MSG_HASH( ) MSG_HASH( MSG_NO_ARGUMENTS_SUPPLIED_AND_NO_MENU_BUILTIN, - "Argüman yok ve menü yerleşik değil, yardım görüntüleniyor..." + "Hiçbir argüman sağlanmadı ve menü görüntülenmedi, yardım görüntüleniyor..." ) MSG_HASH( MSG_SETTING_DISK_IN_TRAY, @@ -8896,6 +9232,14 @@ MSG_HASH( MSG_NUM_CORES_UPDATED, "çekirdekler güncellendi: " ) +MSG_HASH( + MSG_NUM_CORES_LOCKED, + "atlanan çekirdekler: " + ) +MSG_HASH( + MSG_CORE_UPDATE_DISABLED, + "Çekirdek güncelleme devre dışı - çekirdek kilitli: " + ) MSG_HASH( MSG_PLAYLIST_MANAGER_RESETTING_CORES, "Çekirdekler sıfırlanıyor: " @@ -9158,7 +9502,7 @@ MSG_HASH( ) MSG_HASH( MSG_FAILED_TO_ACCEPT_INCOMING_SPECTATOR, - "Gelen seyirci kabul edilemedi." + "Gelen izleyici kabul edilemedi." ) MSG_HASH( MSG_FAILED_TO_ALLOCATE_MEMORY_FOR_PATCHED_CONTENT, @@ -9780,10 +10124,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "yapılandırılmamış, geri dönülüyor" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Bluetooth taraması tamamlandı." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Wi-Fi taraması tamamlandı." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Bluetooth cihazları taranıyor..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Kablosuz ağlar taranıyor..." @@ -10036,6 +10388,86 @@ MSG_HASH( MSG_MANUAL_CONTENT_SCAN_END, "Tarama tamamladı: " ) +MSG_HASH( + MSG_CORE_BACKUP_SCANNING_CORE, + "Çekirdek taranıyor: " + ) +MSG_HASH( + MSG_CORE_BACKUP_ALREADY_EXISTS, + "Kurulu çekirdeğin yedeği zaten var: " + ) +MSG_HASH( + MSG_BACKING_UP_CORE, + "Yedek çekirdek: " + ) +MSG_HASH( + MSG_PRUNING_CORE_BACKUP_HISTORY, + "Eski yedekleri kaldır: " + ) +MSG_HASH( + MSG_CORE_BACKUP_COMPLETE, + "Çekirdek yedekleme tamamlandı: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_ALREADY_INSTALLED, + "Seçilen temel yedekleme zaten kurulu: " + ) +MSG_HASH( + MSG_RESTORING_CORE, + "Çekirdek geri yükleniyor: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_COMPLETE, + "Çekirdek geri yüklemesi tamamlandı: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_ALREADY_INSTALLED, + "Seçilen çekirdek dosyası zaten kurulu: " + ) +MSG_HASH( + MSG_INSTALLING_CORE, + "Çekirdek kuruluyor: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_COMPLETE, + "Çekirdek kurulumu tamamlandı: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_INVALID_CONTENT, + "Geçersiz çekirdek dosya seçildi: " + ) +MSG_HASH( + MSG_CORE_BACKUP_FAILED, + "Çekirdek yedekleme başarısız: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_FAILED, + "Çekirdek geri yükleme başarısız: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_FAILED, + "Çekirdek kurulumu başarısız: " + ) +MSG_HASH( + MSG_CORE_RESTORATION_DISABLED, + "Çekirdek geri yükleme devre dışı - çekirdek kilitli: " + ) +MSG_HASH( + MSG_CORE_INSTALLATION_DISABLED, + "Çekirdek kurulumu devre dışı - çekirdek kilitli: " + ) +MSG_HASH( + MSG_CORE_LOCK_FAILED, + "Çekirdek kilitlenemedi: " + ) +MSG_HASH( + MSG_CORE_UNLOCK_FAILED, + "Çekirdek kilidi açılamadı: " + ) +MSG_HASH( + MSG_CORE_DELETE_DISABLED, + "Çekirdek silme devre dışı - çekirdek kilitli: " + ) /* Lakka */ @@ -10068,7 +10500,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_WIDGET_SCALE_FACTOR, - "Ekran gereçlerini çizerken el ile ölçeklendirme işlevini geçersiz kılar. Yalnızca 'Grafik Ölçeklerini Otomatik Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." + "Ekran gereçlerini çizerken el ile ölçeklendirme etkeni geçersiz kılınır. Yalnızca 'Grafik Pencere Ögelerini Otomatik Olarak Ölçeklendir' devre dışı bırakıldığında geçerlidir. Dekore edilmiş bildirimlerin, göstergelerin ve kontrollerin boyutunu menünün kendisinden bağımsız olarak arttırmak veya azaltmak için kullanılabilir." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SCREEN_RESOLUTION, @@ -10106,6 +10538,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Yumuşak Filtre" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Bluetooth cihazlarını tarar ve bağlantı oluşturur." + ) MSG_HASH( MENU_ENUM_SUBLABEL_WIFI_SETTINGS, "Kablosuz ağları tarar ve bağlantı kurar." @@ -10142,6 +10578,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_RESTART_KEY, "RetroArch Yeniden Başlat" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_META_RESTART_KEY, + "Çıkışlar RetroArch'ı yeniden başlatır. Belirli menü ayarlarının etkinleştirilmesi için gereklidir (örneğin, menü sürücüsünü değiştirirken)." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_AUDIO_BLOCK_FRAMES, "Kareleri Engelle" @@ -10156,11 +10596,11 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Klavye Oyun Kolu Eşlemesi" + "Klavye Kontrolleri Eşlemesi" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE, - "Klavye Oyun Kolu Eşleme Türü" + "Klavye Kontrolleri Eşleme Türü" ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_SMALL_KEYBOARD_ENABLE, @@ -10190,6 +10630,26 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MENU_SHOW_SHUTDOWN, "'Kapat' seçeneğini göster/gizle." ) +MSG_HASH( + MSG_INTERNET, + "İnternet" + ) +MSG_HASH( + MSG_INTERNET_RELAY, + "İnternet (Röle)" + ) +MSG_HASH( + MSG_LOCAL, + "Yerel" + ) +MSG_HASH( + MSG_READ_WRITE, + "Okunur/Yazılır" + ) +MSG_HASH( + MSG_READ_ONLY, + "Salt-Okunur" + ) #ifdef HAVE_LAKKA_SWITCH MSG_HASH( diff --git a/intl/msg_hash_uk.h b/intl/msg_hash_uk.h new file mode 100644 index 0000000000..a02b25cc6d --- /dev/null +++ b/intl/msg_hash_uk.h @@ -0,0 +1,1448 @@ +#if defined(_MSC_VER) && !defined(_XBOX) && (_MSC_VER >= 1500 && _MSC_VER < 1900) +#if (_MSC_VER >= 1700) +/* https://support.microsoft.com/en-us/kb/980263 */ +#pragma execution_character_set("utf-8") +#endif +#pragma warning(disable:4566) +#endif + +/* Top-Level Menu */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MAIN_MENU, + "Головне меню" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS_TAB, + "Налаштування" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FAVORITES_TAB, + "Улюблене" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HISTORY_TAB, + "Історія" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_IMAGES_TAB, + "Зображення" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MUSIC_TAB, + "Музика" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_TAB, + "Відео" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, + "Мережева гра" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ADD_TAB, + "Імпорт вмісту" + ) + +/* Main Menu */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, + "Швидке меню" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, + "Швидкий доступ до усіх налаштувань, що пов'язані з грою." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LIST, + "Завантажити ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LIST, + "Виберіть ядро для використання." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST, + "Завантажити вміст" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, + "Виберіть вміст для запуску." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOAD_DISC, + "Завантажити диск" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_DISC, + "Завантажити фізичний диск. Спочатку вам потрібно вибрати ядро (Завантажити ядро), яке ви збираєтесь використовувати з диском." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DUMP_DISC, + "Зберегти диск" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DUMP_DISC, + "Зберегти фізичний диск у локальному сховищі. Він буде збережений, як файл образу." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB, + "Списки відтворення" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLISTS_TAB, + "Тут буде відображатися просканований вміст, що співпав із записами у базі даних." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, + "Сканувати вміст" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, + "Просканувати вміст та додати до бази даних." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SHOW_WIMP, + "Показати меню стільниці" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SHOW_WIMP, + "Відкриває традиційне меню робочого столу." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE, + "Вимкнути режим кіоску" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_DISABLE_KIOSK_MODE, + "Вимкнути режим терміналів (потрібен перезапуск)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, + "Оновлення з мережі" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONLINE_UPDATER, + "Завантажити додатки, компоненти та вміст для RetroArch." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETPLAY, + "Мережева гра" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETPLAY, + "Приєднатися до гри або створити нову мережеву гру." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SETTINGS, + "Налаштування" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS, + "Налаштувати програму." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, + "Інформація" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, + "Показати інформацію про систему." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, + "Файл налаштувань" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONFIGURATIONS_LIST, + "Керування або створення файлу налаштувань." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HELP_LIST, + "Довідка" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_HELP_LIST, + "Дізнатися більше про те, як працює програма." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESTART_RETROARCH, + "Перезапустити RetroArch" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESTART_RETROARCH, + "Перезапустити програму." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, + "Вихід з RetroArch" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUIT_RETROARCH, + "Вийти з програми." + ) + +/* Main Menu > Load Core */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, + "Завантажити ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, + "Завантажити ядро з мережі та встановити." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SIDELOAD_CORE_LIST, + "Встановити або відновити ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SIDELOAD_CORE_LIST, + "Встановити або відновити ядро з каталогу завантажень." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_START_VIDEO_PROCESSOR, + "Запустити відео процесор" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_START_NET_RETROPAD, + "Запустити віддалений ретро-контролер" + ) + +/* Main Menu > Load Content */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FAVORITES, + "Початкова директорія" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST, + "Завантаження" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OPEN_ARCHIVE, + "Перегляд архіву" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOAD_ARCHIVE, + "Завантажити архів" + ) + +/* Main Menu > Load Content > Playlists */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES, + "Улюблене" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_FAVORITES, + "Тут показується вміст, який було додано до «Улюблене»." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_MUSIC, + "Музика" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_MUSIC, + "Тут показується музика, яка була прослухана." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_IMAGES, + "Зображення" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_IMAGES, + "Тут показуються зображення, які були переглянуті." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_GOTO_VIDEO, + "Відео" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_GOTO_VIDEO, + "Тут показується відео, яке було переглянуто." + ) + +/* Main Menu > Online Updater */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_UPDATER_LIST, + "Завантажити ядро" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_INSTALLED_CORES, + "Оновити встановлені ядра" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_UPDATE_INSTALLED_CORES, + "Оновити усі встановлені ядра до найновіших версій." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST, + "Оновлення ескізів" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_THUMBNAILS_UPDATER_LIST, + "Завантажити повний пакунок ескізів для обраної системи." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PL_THUMBNAILS_UPDATER_LIST, + "Оновити ескізи списків" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PL_THUMBNAILS_UPDATER_LIST, + "Завантажити ескізи для записів у вибраному списку відтворення." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE_CONTENT, + "Завантажити вміст" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_CORE_INFO_FILES, + "Оновити інформаційні файли ядер" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, + "Оновити додатки" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, + "Оновити профілі контролера" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, + "Оновити коди" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_DATABASES, + "Оновити бази даних" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_OVERLAYS, + "Оновити накладки" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_GLSL_SHADERS, + "Оновити GLSL шейдери" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_CG_SHADERS, + "Оновити Cg шейдери" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_UPDATE_SLANG_SHADERS, + "Оновити Slang шейдери" + ) + +/* Main Menu > Information */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFORMATION, + "Інформація про ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_INFORMATION, + "Переглянути інформацію про програму / ядро." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DISC_INFORMATION, + "Інформація про диск" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DISC_INFORMATION, + "Переглянути інформацію про вставлений диск." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETWORK_INFORMATION, + "Інформація про мережу" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETWORK_INFORMATION, + "Переглянути мережеві інтерфейси та пов'язані ІР адреси." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFORMATION, + "Інформація про систему" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SYSTEM_INFORMATION, + "Переглянути інформацію про пристрій." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DATABASE_MANAGER, + "Керування базами даних" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DATABASE_MANAGER, + "Перегляд баз даних." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CURSOR_MANAGER, + "Керування курсором" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CURSOR_MANAGER, + "Перегляд попередніх запитів." + ) + +/* Main Menu > Information > Core Information */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_NAME, + "Назва ядра" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_CORE_LABEL, + "Мітка ядра" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_NAME, + "Назва системи" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_SYSTEM_MANUFACTURER, + "Виробник системи" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_CATEGORIES, + "Категорії" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_AUTHORS, + "Автор" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_PERMISSIONS, + "Дозволи" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_LICENSES, + "Ліцензія" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_SUPPORTED_EXTENSIONS, + "Підтримка розширень" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_REQUIRED_HW_API, + "Необхідні графічні API" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_INFO_FIRMWARE, + "Прошивка(и)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MISSING, + "Відсутнє" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PRESENT, + "Присутнє" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_OPTIONAL, + "Вибіркове" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_REQUIRED, + "Необхідне" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_LOCK, + "Блокувати встановлене ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LOCK, + "Запобігти внесенню змін до встановлених ядер. Може використовуватися для блокування оновлень, якщо вміст вимагає специфічної версії ядра для роботи (наприклад набори аркадних ROM)." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE, + "Видалити ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE, + "Видалити це ядро з диску." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_CREATE_BACKUP, + "Резервне копіювання ядра" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_CREATE_BACKUP, + "Створити архівовану резервну копію поточного ядра." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_RESTORE_BACKUP_LIST, + "Відновлення з резервної копії" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_RESTORE_BACKUP_LIST, + "Встановити попередню версію ядра зі списку архівованих резервних копій." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_DELETE_BACKUP_LIST, + "Видалити резервну копію" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_DELETE_BACKUP_LIST, + "Видалити файл зі списку архівованих резервних копій." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_BACKUP_MODE_AUTO, + "[Авто]" + ) + +/* Main Menu > Information > System Information */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_BUILD_DATE, + "Дата збірки" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_GIT_VERSION, + "Git-версія" + ) +MSG_HASH( /* FIXME Should be MENU_LABEL_VALUE */ + MSG_COMPILER, + "Компілятор" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_CPU_MODEL, + "Модель ЦП" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_CPU_FEATURES, + "Можливості ЦП" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CPU_ARCHITECTURE, + "Архітектура ЦП:" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CPU_CORES, + "Ядра ЦП:" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CPU_CORES, + "Кількість ядер процесора." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_IDENTIFIER, + "Ідентифікатор зовнішнього інтерфейсу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FRONTEND_OS, + "Операційна система" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RETRORATING_LEVEL, + "Рівень на RetroRating" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_POWER_SOURCE, + "Джерело живлення" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_VIDEO_CONTEXT_DRIVER, + "Контекстний відеодрайвер" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_WIDTH, + "Ширина дисплею (мм)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_MM_HEIGHT, + "Висота дисплею (мм)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DISPLAY_METRIC_DPI, + "Точок на дюйм" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LIBRETRODB_SUPPORT, + "Підтримка LibretroDB" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OVERLAY_SUPPORT, + "Підтримка накладання" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COMMAND_IFACE_SUPPORT, + "Підтримка командного інтерфейсу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_COMMAND_IFACE_SUPPORT, + "Підтримка мережевого командного інтерфейсу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETWORK_REMOTE_SUPPORT, + "Підтримка мережевого контролера" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COCOA_SUPPORT, + "Підтримка Cocoa" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RPNG_SUPPORT, + "Підтримка PNG (RPNG)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RJPEG_SUPPORT, + "Підтримка JPEG (RJPEG)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RBMP_SUPPORT, + "Підтримка BMP (RBMP)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RTGA_SUPPORT, + "Підтримка TGA (RTGA)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SDL_SUPPORT, + "Підтримка SDL 1.2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SDL2_SUPPORT, + "Підтримка SDL 2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_VULKAN_SUPPORT, + "Підтримка Vulkan" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_METAL_SUPPORT, + "Підтримка Metal" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENGL_SUPPORT, + "Підтримка OpenGL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENGLES_SUPPORT, + "Підтримка OpenGL ES" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_THREADING_SUPPORT, + "Підтримка багатопотоковості" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_KMS_SUPPORT, + "Підтримка KMS/EGL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_UDEV_SUPPORT, + "Підтримка udev" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENVG_SUPPORT, + "Підтримка OpenVG" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_EGL_SUPPORT, + "Підтримка KMS/EGL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_X11_SUPPORT, + "Підтримка X11" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_WAYLAND_SUPPORT, + "Підтримка Wayland" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_XVIDEO_SUPPORT, + "Підтримка XVideo" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_ALSA_SUPPORT, + "Підтримка ALSA" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OSS_SUPPORT, + "Підтримка OSS" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENAL_SUPPORT, + "Підтримка OpenAL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_OPENSL_SUPPORT, + "Підтримка OpenSL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_RSOUND_SUPPORT, + "Підтримка RSound" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_ROARAUDIO_SUPPORT, + "Підтримка RoarAudio" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_JACK_SUPPORT, + "Підтримка JACK" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_PULSEAUDIO_SUPPORT, + "Підтримка PulseAudio" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COREAUDIO_SUPPORT, + "Підтримка CoreAudio" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_COREAUDIO3_SUPPORT, + "Підтримка CoreAudio V3" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DSOUND_SUPPORT, + "Підтримка DirectSound" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_WASAPI_SUPPORT, + "Підтримка WASAPI" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_XAUDIO2_SUPPORT, + "Підтримка XAudio2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_ZLIB_SUPPORT, + "Підтримка zlib" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_7ZIP_SUPPORT, + "Підтримка 7zip" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DYLIB_SUPPORT, + "Підтримка динамічних бібліотек" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_DYNAMIC_SUPPORT, + "Динамічне завантаження бібліотек на вимогу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_CG_SUPPORT, + "Підтримка Cg" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_GLSL_SUPPORT, + "Підтримка GLSL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_HLSL_SUPPORT, + "Підтримка HLSL" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_SDL_IMAGE_SUPPORT, + "Підтримка SDL зображень" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FFMPEG_SUPPORT, + "Підтримка FFmpeg" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_MPV_SUPPORT, + "Підтримка mpv" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_CORETEXT_SUPPORT, + "Підтримка CoreText" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_FREETYPE_SUPPORT, + "Підтримка FreeType" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_STB_TRUETYPE_SUPPORT, + "Підтримка STB TrueType" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_NETPLAY_SUPPORT, + "Підтримка мережевої гри (однорангова)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_PYTHON_SUPPORT, + "Підтримка Python (підтримка скриптів у шейдерах)" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_V4L2_SUPPORT, + "Підтримка Video4Linux2" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SYSTEM_INFO_LIBUSB_SUPPORT, + "Підтримка libusb" + ) + +/* Main Menu > Information > Database Manager */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DATABASE_SELECTION, + "Вибір бази даних" + ) + +/* Main Menu > Information > Database Manager > Information */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_NAME, + "Ім'я" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DESCRIPTION, + "Опис" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_GENRE, + "Жанр" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_PUBLISHER, + "Видавець" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_DEVELOPER, + "Розробник" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ORIGIN, + "Походження" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_FRANCHISE, + "Франшиза" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_TGDB_RATING, + "Рейтинг TGDB" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_FAMITSU_MAGAZINE_RATING, + "Рейтинг журналу Famitsu" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_EDGE_MAGAZINE_REVIEW, + "Огляд журналу Edge" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_EDGE_MAGAZINE_RATING, + "Рейтинг журналу Edge" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_EDGE_MAGAZINE_ISSUE, + "Номер видання журналу Edge" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RELEASE_MONTH, + "Місяць виходу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RELEASE_YEAR, + "Рік виходу" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_BBFC_RATING, + "Рейтинг BBFC" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ESRB_RATING, + "Рейтинг ESRB" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ELSPA_RATING, + "Рейтинг ELSPA" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_PEGI_RATING, + "Рейтинг PEGI" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ENHANCEMENT_HW, + "Додаткове обладнання" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_CERO_RATING, + "Рейтинг CERO" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_SERIAL, + "Серійний номер" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_ANALOG, + "Аналогова підтримка" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_RUMBLE, + "Підтримка вібрації" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RDB_ENTRY_COOP, + "Підтримка кооперативу" + ) + +/* Main Menu > Configuration File */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONFIGURATIONS, + "Завантажити конфігурацію" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RESET_TO_DEFAULT_CONFIG, + "Відновити стандартну конфігурацію" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESET_TO_DEFAULT_CONFIG, + "Скидання поточної конфігурації до стандартних значень." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVE_CURRENT_CONFIG, + "Зберегти поточну конфігурацію" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVE_NEW_CONFIG, + "Зберегти нову конфігурацію" + ) + +/* Main Menu > Help */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HELP_CONTROLS, + "Базове керування в меню" + ) + +/* Main Menu > Help > Basic Menu Controls */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_UP, + "Прокрутка вгору" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_SCROLL_DOWN, + "Прокрутка вниз" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_CONFIRM, + "Підтвердження" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_INFO, + "Інформація" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_START, + "Старт" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_MENU, + "Перемикач меню" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_QUIT, + "Вихід" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BASIC_MENU_CONTROLS_TOGGLE_KEYBOARD, + "Перемикач клавіатури" + ) + +/* Settings */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DRIVER_SETTINGS, + "Драйвери" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DRIVER_SETTINGS, + "Зміна драйвера, що використовується системою." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_SETTINGS, + "Відео" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_VIDEO_SETTINGS, + "Зміна налаштувань виводу відео." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AUDIO_SETTINGS, + "Звук" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AUDIO_SETTINGS, + "Зміна налаштувань аудіовиходу." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS, + "Ввід" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INPUT_SETTINGS, + "Зміна налаштувань контролера, клавіатури або миші." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LATENCY_SETTINGS, + "Затримка" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LATENCY_SETTINGS, + "Зміна налаштувань, пов'язаних з затримкою відео, аудіо та введенням." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CORE_SETTINGS, + "Ядро" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_SETTINGS, + "Зміна налаштувань ядра." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONFIGURATION_SETTINGS, + "Конфігурація" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONFIGURATION_SETTINGS, + "Зміна стандартних налаштувань для файлів конфігурації." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS, + "Збереження" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SAVING_SETTINGS, + "Зміна налаштувань збереження." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOGGING_SETTINGS, + "Журналювання" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOGGING_SETTINGS, + "Зміна налаштувань журналювання." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS, + "Файловий браузер" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_FILE_BROWSER_SETTINGS, + "Зміна налаштувань браузера файлів." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FRAME_THROTTLE_SETTINGS, + "Керування кадрами" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_FRAME_THROTTLE_SETTINGS, + "Зміна налаштувань перемотки вперед/назад, сповільнення." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RECORDING_SETTINGS, + "Запис" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RECORDING_SETTINGS, + "Зміна налаштувань запису." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONSCREEN_DISPLAY_SETTINGS, + "Зображення на екрані" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_DISPLAY_SETTINGS, + "Зміна налаштувань накладок екрану, клавіатури та екранних повідомлень." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_USER_INTERFACE_SETTINGS, + "Інтерфейс користувача" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_USER_INTERFACE_SETTINGS, + "Зміна налаштувань інтерфейсу користувача." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_AI_SERVICE_SETTINGS, + "Служба AI" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_AI_SERVICE_SETTINGS, + "Зміна налаштувань служби AI (Переклад/Читання)." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ACCESSIBILITY_SETTINGS, + "Спеціальні можливості" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ACCESSIBILITY_SETTINGS, + "Зміна налаштувань диктора програми." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_POWER_MANAGEMENT_SETTINGS, + "Керування живленням" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_POWER_MANAGEMENT_SETTINGS, + "Зміна налаштувань керування живленням." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_RETRO_ACHIEVEMENTS_SETTINGS, + "Досягнення" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RETRO_ACHIEVEMENTS_SETTINGS, + "Зміна налаштувань досягнень." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NETWORK_SETTINGS, + "Мережа" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NETWORK_SETTINGS, + "Налаштування параметрів сервера та мережі." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_PLAYLIST_SETTINGS, + "Списки відтворення" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLIST_SETTINGS, + "Зміна налаштувань списків відтворення." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_USER_SETTINGS, + "Користувач" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_USER_SETTINGS, + "Зміна налаштувань облікового запису, користувача або мови." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DIRECTORY_SETTINGS, + "Директорії" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DIRECTORY_SETTINGS, + "Зміна стандартних директорій, в яких розташовані файли." + ) + +/* Settings > Drivers */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INPUT_DRIVER, + "Драйвер вводу" + ) + +/* Settings > Video */ + + +/* Settings > Video > CRT SwitchRes */ + + +/* Settings > Video > Output */ + + +/* Settings > Video > Fullscreen Mode */ + + +/* Settings > Video > Windowed Mode */ + + +/* Settings > Video > Scaling */ + + +/* Settings > Video > Synchronization */ + + +/* Settings > Audio */ + + +/* Settings > Audio > Output */ + + +/* Settings > Audio > Resampler */ + + +/* Settings > Audio > Synchronization */ + + +/* Settings > Audio > MIDI */ + + +/* Settings > Audio > Mixer Settings > Mixer Stream */ + + +/* Settings > Audio > Menu Sounds */ + + +/* Settings > Input */ + + +/* Settings > Input > Haptic Feedback/Vibration */ + + +/* Settings > Input > Menu Controls */ + + +/* Settings > Input > Hotkey Binds */ + + +/* Settings > Input > Port # Binds */ + + +/* Settings > Latency */ + + +/* Settings > Core */ + +#ifndef HAVE_DYNAMIC +#endif + +/* Settings > Configuration */ + + +/* Settings > Saving */ + + +/* Settings > Logging */ + + +/* Settings > File Browser */ + + +/* Settings > Frame Throttle */ + + +/* Settings > Frame Throttle > Rewind */ + + +/* Settings > Frame Throttle > Frame Time Counter */ + + +/* Settings > Recording */ + + +/* Settings > On-Screen Display */ + + +/* Settings > On-Screen Display > On-Screen Overlay */ + + + + +/* Settings > On-Screen Display > Video Layout */ + + +/* Settings > On-Screen Display > On-Screen Notifications */ + + +/* Settings > User Interface */ + + +/* Settings > User Interface > Views */ + + +/* Settings > User Interface > Views > Quick Menu */ + + +/* Settings > User Interface > Views > Settings */ + + +/* Settings > User Interface > Appearance */ + + +/* Settings > AI Service */ + + +/* Settings > Accessibility */ + + +/* Settings > Power Management */ + +/* Settings > Achievements */ + + +/* Settings > Network */ + + +/* Settings > Network > Updater */ + + +/* Settings > Playlists */ + + +/* Settings > Playlists > Playlist Management */ + + +/* Settings > User */ + + +/* Settings > User > Privacy */ + + +/* Settings > User > Accounts */ + + +/* Settings > User > Accounts > RetroAchievements */ + + +/* Settings > User > Accounts > YouTube */ + + +/* Settings > User > Accounts > Twitch */ + + +/* Settings > Directory */ + + +/* Music */ + +/* Music > Quick Menu */ + + +/* Netplay */ + + +/* Netplay > Host */ + + +/* Import content */ + + +/* Import content > Scan File */ + + +/* Import content > Manual Scan */ + + +/* Playlist > Playlist Item */ + + +/* Playlist Item > Set Core Association */ + + +/* Playlist Item > Information */ + + +/* Quick Menu */ + + +/* Quick Menu > Options */ + + +/* Quick Menu > Controls */ + + +/* Quick Menu > Controls > Load Remap File */ + + +/* Quick Menu > Cheats */ + + +/* Quick Menu > Cheats > Start or Continue Cheat Search */ + + +/* Quick Menu > Cheats > Load Cheat File (Replace) */ + + +/* Quick Menu > Cheats > Load Cheat File (Append) */ + + +/* Quick Menu > Cheats > Cheat Details */ + + +/* Quick Menu > Disc Control */ + + +/* Quick Menu > Shaders */ + + +/* Quick Menu > Shaders > Save */ + + +/* Quick Menu > Shaders > Remove */ + + +/* Quick Menu > Shaders > Shader Parameters */ + + +/* Quick Menu > Overrides */ + + +/* Quick Menu > Achievements */ + + +/* Quick Menu > Information */ + + +/* Miscellaneous UI Items */ + + +/* Settings Options */ + +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LANG_UKRAINIAN, + "Ukrainian - Українська" + ) + +/* RGUI: Settings > User Interface > Appearance */ + + +/* RGUI: Settings Options */ + + +/* XMB: Settings > User Interface > Appearance */ + + +/* XMB: Settings Options */ + + +/* Ozone: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings > User Interface > Appearance */ + + +/* MaterialUI: Settings Options */ + + +/* Qt (Desktop Menu) */ + + +/* Unsorted */ + + +/* Unused (Only Exist in Translation Files) */ + + +/* Unused (Needs Confirmation) */ + + +/* Discord Status */ + + +/* Notifications */ + + +/* Lakka */ + + +/* Environment Specific Settings */ + + +#ifdef HAVE_LAKKA_SWITCH +#endif +#if defined(HAVE_LAKKA_SWITCH) || defined(HAVE_LIBNX) +#endif +#ifdef HAVE_LAKKA +#endif +#ifdef GEKKO +#endif +#ifdef HAVE_ODROIDGO2 +#else +#endif +#if defined(_3DS) +#endif +#ifdef HAVE_QT +#endif diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 6da74bfc35..7f478bef0f 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -1193,6 +1193,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CAMERA_DRIVER, "Camera driver to use." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_DRIVER, + "Bluetooth" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_DRIVER, + "Bluetooth driver to use." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_DRIVER, "Wi-Fi" @@ -2708,6 +2716,16 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE, "Check if all the required firmware is present before attempting to load content." ) +#ifndef HAVE_DYNAMIC +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Always Reload Core on Run Content" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT, + "Restart RetroArch when launching content, even when the requested core is already loaded. This may improve system stability, at the expense of increased loading times." + ) +#endif MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_ALLOW_ROTATE, "Allow Rotation" @@ -3151,6 +3169,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_SETTINGS, "Adjust On-Screen Notifications" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS, + "Notification Visibility" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_ONSCREEN_NOTIFICATIONS_VIEWS_SETTINGS, + "Toggle the visibility of specific types of notification." + ) /* Settings > On-Screen Display > On-Screen Overlay */ @@ -3362,6 +3388,62 @@ MSG_HASH( MENU_ENUM_SUBLABEL_MEMORY_SHOW, "Displays the used and total amount of memory on the system." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "\"Load Content\" Startup Notification" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_MENU_SHOW_LOAD_CONTENT_ANIMATION, + "Show a brief launch feedback animation when loading content." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_AUTOCONFIG, + "Input (Autoconfig) Connection Notifications" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_CHEATS_APPLIED, + "Cheat Code Notifications" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_CHEATS_APPLIED, + "Display an on-screen message when cheat codes are applied" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_AUTOCONFIG, + "Display an on-screen message when connecting/disconnecting input devices." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_REMAP_LOAD, + "Input Remap Loaded Notifications" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_REMAP_LOAD, + "Display an on-screen message when loading input remap files." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, + "Config Override Loaded Notifications" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_CONFIG_OVERRIDE_LOAD, + "Display an on-screen message when loading configuration override files." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_SET_INITIAL_DISK, + "Initial Disc Restored Notifications" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_SET_INITIAL_DISK, + "Display an on-screen message when automatically restoring at launch the last used disc of multi-disc content loaded via M3U playlists." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NOTIFICATION_SHOW_FAST_FORWARD, + "Fast-Forward Notifications" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_NOTIFICATION_SHOW_FAST_FORWARD, + "Display an on-screen indicator when fast-forwarding content." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_FONT_PATH, "Notification Font" @@ -3435,7 +3517,7 @@ MSG_HASH( ) MSG_HASH( MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS, - "Toggle the visibility menu items in RetroArch." + "Toggle the visibility of menu items in RetroArch." ) MSG_HASH( MENU_ENUM_LABEL_VALUE_MENU_SETTINGS, @@ -4376,6 +4458,14 @@ MSG_HASH( MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL, "Use unofficial achievements and/or beta features for testing purposes." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Unlock Sound" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CHEEVOS_UNLOCK_SOUND_ENABLE, + "Plays a sound when an achievement is unlocked." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE, "Verbose Mode" @@ -6372,6 +6462,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_SETTINGS_FOUND, "No Settings Found" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_NO_BT_DEVICES_FOUND, + "No Bluetooth Devices Found" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_NETWORKS_FOUND, "No Networks Found" @@ -8962,6 +9056,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NO_PLAYLISTS, "No playlists." ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BT_CONNECTED, + "Connected" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ONLINE, "Online" @@ -10630,10 +10728,18 @@ MSG_HASH( MSG_DEVICE_NOT_CONFIGURED_FALLBACK, "not configured, using fallback" ) +MSG_HASH( + MSG_BLUETOOTH_SCAN_COMPLETE, + "Bluetooth scan complete." + ) MSG_HASH( MSG_WIFI_SCAN_COMPLETE, "Wi-Fi scan complete." ) +MSG_HASH( + MSG_SCANNING_BLUETOOTH_DEVICES, + "Scanning bluetooth devices..." + ) MSG_HASH( MSG_SCANNING_WIRELESS_NETWORKS, "Scanning wireless networks..." @@ -11044,6 +11150,14 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_VIDEO_SOFT_FILTER, "Soft Filter" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_BLUETOOTH_SETTINGS, + "Bluetooth" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_BLUETOOTH_SETTINGS, + "Scans for bluetooth devices and connects them." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_WIFI_SETTINGS, "Wi-Fi" diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index 723e4cbffc..c9e745329d 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -8,10 +8,34 @@ /* Top-Level Menu */ +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MAIN_MENU, + "Trình đơn chính" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS_TAB, "Thiết lập" ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_FAVORITES_TAB, + "Ưa thích" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HISTORY_TAB, + "Lịch sử" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_IMAGES_TAB, + "Hình ảnh" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_MUSIC_TAB, + "Âm nhạc" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_VIDEO_TAB, + "Video" + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_TAB, "Kích hoạt Netplay" @@ -27,25 +51,57 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, "Trình đơn lẹ" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CONTENT_SETTINGS, + "Truy xuất nhanh mọi cài đặt trong các trò chơi liên quan." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_LIST, "Tải Core" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_CORE_LIST, + "Chọn nhân nào sẽ dùng." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_LIST, "Tải Content" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_CONTENT_LIST, + "Chọn nội dung nào sẽ bắt đầu." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_LOAD_DISC, + "Mở đĩa" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_LOAD_DISC, + "Mở đĩa phương tiện vật lý. Đầu tiên là chọn nhân (Nạp nhân) để dùng với đĩa." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_DUMP_DISC, + "Dump đĩa" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DUMP_DISC, + "Dump đĩa vật lý ra bộ nhớ trong. Điều này sẽ tiến hành lưu là dạng tệp ảnh." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB, "Playlists Danh mục" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_PLAYLISTS_TAB, + "Đã quét nội dung khớp với Csdl và hiển thị tại đây." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST, "Thêm nội dung" ) MSG_HASH( - MENU_ENUM_SUBLABEL_ADD_CONTENT_LIST, - "Tải/quét nội dung và thêm vào bộ sưu tập." + MENU_ENUM_LABEL_VALUE_ONLINE_UPDATER, + "Cập nhật trực tuyến" ) MSG_HASH( MENU_ENUM_SUBLABEL_ONLINE_UPDATER, @@ -63,10 +119,38 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_SETTINGS, "Thiết lập" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_SETTINGS, + "Cấu hình chương trình." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_INFORMATION_LIST, + "Thông tin" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_INFORMATION_LIST_LIST, + "Hiển thị thông tin hệ thống." + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_CONFIGURATIONS_LIST, + "Tệp cấu hình" + ) +MSG_HASH( + MENU_ENUM_LABEL_VALUE_HELP_LIST, + "Trợ giúp" + ) +MSG_HASH( + MENU_ENUM_SUBLABEL_RESTART_RETROARCH, + "Khởi động lại chương trình." + ) MSG_HASH( MENU_ENUM_LABEL_VALUE_QUIT_RETROARCH, "Thoát RetroArch" ) +MSG_HASH( + MENU_ENUM_SUBLABEL_QUIT_RETROARCH, + "Thoát khỏi ứng dụng." + ) /* Main Menu > Load Core */ @@ -74,6 +158,10 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_DOWNLOAD_CORE, "Tải về Core..." ) +MSG_HASH( + MENU_ENUM_SUBLABEL_DOWNLOAD_CORE, + "Tải về và cài đặt nhân từ internet." + ) /* Main Menu > Load Content */ @@ -107,10 +195,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_ASSETS, "Cập nhật Assets" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_UPDATE_AUTOCONFIG_PROFILES, - "Cập nhật Autoconfig Profiles" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_UPDATE_CHEATS, "Cập nhật Cheats" @@ -434,10 +518,6 @@ MSG_HASH( /* Settings > Input */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_REMAP_BINDS_ENABLE, - "Kích hoạt Remap Binds" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE, "Kích hoạt Autoconfig" @@ -455,18 +535,10 @@ MSG_HASH( /* Settings > Input > Hotkey Binds */ -MSG_HASH( - MENU_ENUM_SUBLABEL_INPUT_MENU_ENUM_TOGGLE_GAMEPAD_COMBO, - "Kết hợp nút Gamepad để vào menu bật/tắt." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, "Tải state" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY, - "Bật/tắt chế độ toàn màn hình" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, "Thoát RetroArch" @@ -475,21 +547,9 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, "Chụp ảnh màn hình" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, - "Âm thanh mute toggle" - ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, - "Kích hoạt hotkeys" - ) /* Settings > Input > Port # Binds */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_SAVE_AUTOCONFIG, - "Lưu Autoconfig" - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, "Kích hoạt Turbo" @@ -512,17 +572,11 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_CORE_SET_SUPPORTS_NO_CONTENT_ENABLE, "Tự động chạy Core" ) +#ifndef HAVE_DYNAMIC +#endif /* Settings > Configuration */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_CONFIG_SAVE_ON_EXIT, - "Lưu cấu hình khi thoát" - ) -MSG_HASH( - MENU_ENUM_SUBLABEL_CONFIG_SAVE_ON_EXIT, - "Lưu cấu hình khi thoát retroarch." - ) MSG_HASH( MENU_ENUM_LABEL_VALUE_GAME_SPECIFIC_OPTIONS, "Tải Content-Specific Core Options Automatically" @@ -546,10 +600,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_BLOCK_SRAM_OVERWRITE, "Khi tải savestate đừng ghi đè SaveRAM" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_SAVESTATE_AUTO_LOAD, - "Tự động tải State" - ) /* Settings > Logging */ @@ -560,10 +610,6 @@ MSG_HASH( /* Settings > File Browser */ -MSG_HASH( - MENU_ENUM_SUBLABEL_SHOW_HIDDEN_FILES, - "Hiện ra tập tin và thư mục ẩn trong trình duyệt tập tin." - ) /* Settings > Frame Throttle */ @@ -595,15 +641,13 @@ MSG_HASH( "Tự động tải Preferred Overlay" ) + + /* Settings > On-Screen Display > Video Layout */ /* Settings > On-Screen Display > On-Screen Notifications */ -MSG_HASH( - MENU_ENUM_SUBLABEL_FPS_SHOW, - "Hiển thị tốc độ khung hình/giây trên màn hình." - ) /* Settings > User Interface */ @@ -721,10 +765,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_NETPLAY_NICKNAME, "Tên truy nhập" ) -MSG_HASH( - MENU_ENUM_SUBLABEL_USER_LANGUAGE, - "Thiết lập ngôn ngữ của giao diện." - ) /* Settings > User > Privacy */ @@ -859,10 +899,6 @@ MSG_HASH( /* Import content > Manual Scan */ -MSG_HASH( - MENU_ENUM_LABEL_VALUE_MANUAL_CONTENT_SCAN_CORE_NAME, - "Core Danh mục" - ) /* Playlist > Playlist Item */ @@ -1406,10 +1442,6 @@ MSG_HASH( MENU_ENUM_LABEL_VALUE_INPUT_TOUCH_ENABLE, "Kích hoạt Touch" ) -MSG_HASH( - MENU_ENUM_LABEL_VALUE_INPUT_ICADE_ENABLE, - "Kích hoạt Keyboard Gamepad Mapping" - ) #ifdef HAVE_LAKKA_SWITCH #endif diff --git a/intl/progress.h b/intl/progress.h index 977e5b8571..8d4faca16e 100644 --- a/intl/progress.h +++ b/intl/progress.h @@ -1,37 +1,45 @@ /* Arabic */ -#define LANGUAGE_PROGRESS_ARABIC_TRANSLATED 100 +#define LANGUAGE_PROGRESS_ARABIC_TRANSLATED 78 #define LANGUAGE_PROGRESS_ARABIC_APPROVED 0 /* Asturian */ -#define LANGUAGE_PROGRESS_ASTURIAN_TRANSLATED 4 -#define LANGUAGE_PROGRESS_ASTURIAN_APPROVED 4 +#define LANGUAGE_PROGRESS_ASTURIAN_TRANSLATED 15 +#define LANGUAGE_PROGRESS_ASTURIAN_APPROVED 15 /* Chinese Simplified */ -#define LANGUAGE_PROGRESS_CHINESE_SIMPLIFIED_TRANSLATED 81 -#define LANGUAGE_PROGRESS_CHINESE_SIMPLIFIED_APPROVED 38 +#define LANGUAGE_PROGRESS_CHINESE_SIMPLIFIED_TRANSLATED 69 +#define LANGUAGE_PROGRESS_CHINESE_SIMPLIFIED_APPROVED 35 /* Chinese Traditional */ -#define LANGUAGE_PROGRESS_CHINESE_TRADITIONAL_TRANSLATED 33 +#define LANGUAGE_PROGRESS_CHINESE_TRADITIONAL_TRANSLATED 32 #define LANGUAGE_PROGRESS_CHINESE_TRADITIONAL_APPROVED 0 +/* Danish */ +#define LANGUAGE_PROGRESS_DANISH_TRANSLATED 0 +#define LANGUAGE_PROGRESS_DANISH_APPROVED 0 + /* Dutch */ -#define LANGUAGE_PROGRESS_DUTCH_TRANSLATED 24 +#define LANGUAGE_PROGRESS_DUTCH_TRANSLATED 27 #define LANGUAGE_PROGRESS_DUTCH_APPROVED 0 /* Esperanto */ #define LANGUAGE_PROGRESS_ESPERANTO_TRANSLATED 0 #define LANGUAGE_PROGRESS_ESPERANTO_APPROVED 0 +/* Finnish */ +#define LANGUAGE_PROGRESS_FINNISH_TRANSLATED 0 +#define LANGUAGE_PROGRESS_FINNISH_APPROVED 0 + /* French */ #define LANGUAGE_PROGRESS_FRENCH_TRANSLATED 100 #define LANGUAGE_PROGRESS_FRENCH_APPROVED 100 /* German */ -#define LANGUAGE_PROGRESS_GERMAN_TRANSLATED 51 +#define LANGUAGE_PROGRESS_GERMAN_TRANSLATED 37 #define LANGUAGE_PROGRESS_GERMAN_APPROVED 0 /* Greek */ -#define LANGUAGE_PROGRESS_GREEK_TRANSLATED 36 +#define LANGUAGE_PROGRESS_GREEK_TRANSLATED 29 #define LANGUAGE_PROGRESS_GREEK_APPROVED 0 /* Hebrew */ @@ -39,7 +47,7 @@ #define LANGUAGE_PROGRESS_HEBREW_APPROVED 0 /* Italian */ -#define LANGUAGE_PROGRESS_ITALIAN_TRANSLATED 61 +#define LANGUAGE_PROGRESS_ITALIAN_TRANSLATED 93 #define LANGUAGE_PROGRESS_ITALIAN_APPROVED 0 /* Japanese */ @@ -47,7 +55,7 @@ #define LANGUAGE_PROGRESS_JAPANESE_APPROVED 0 /* Korean */ -#define LANGUAGE_PROGRESS_KOREAN_TRANSLATED 85 +#define LANGUAGE_PROGRESS_KOREAN_TRANSLATED 73 #define LANGUAGE_PROGRESS_KOREAN_APPROVED 0 /* Persian */ @@ -55,19 +63,19 @@ #define LANGUAGE_PROGRESS_PERSIAN_APPROVED 0 /* Polish */ -#define LANGUAGE_PROGRESS_POLISH_TRANSLATED 99 +#define LANGUAGE_PROGRESS_POLISH_TRANSLATED 72 #define LANGUAGE_PROGRESS_POLISH_APPROVED 0 /* Portuguese */ -#define LANGUAGE_PROGRESS_PORTUGUESE_TRANSLATED 48 +#define LANGUAGE_PROGRESS_PORTUGUESE_TRANSLATED 35 #define LANGUAGE_PROGRESS_PORTUGUESE_APPROVED 0 /* Portuguese, Brazilian */ #define LANGUAGE_PROGRESS_PORTUGUESE_BRAZILIAN_TRANSLATED 100 -#define LANGUAGE_PROGRESS_PORTUGUESE_BRAZILIAN_APPROVED 0 +#define LANGUAGE_PROGRESS_PORTUGUESE_BRAZILIAN_APPROVED 5 /* Russian */ -#define LANGUAGE_PROGRESS_RUSSIAN_TRANSLATED 70 +#define LANGUAGE_PROGRESS_RUSSIAN_TRANSLATED 56 #define LANGUAGE_PROGRESS_RUSSIAN_APPROVED 0 /* Slovak */ @@ -76,13 +84,21 @@ /* Spanish */ #define LANGUAGE_PROGRESS_SPANISH_TRANSLATED 100 -#define LANGUAGE_PROGRESS_SPANISH_APPROVED 0 +#define LANGUAGE_PROGRESS_SPANISH_APPROVED 91 + +/* Swedish */ +#define LANGUAGE_PROGRESS_SWEDISH_TRANSLATED 0 +#define LANGUAGE_PROGRESS_SWEDISH_APPROVED 0 /* Turkish */ #define LANGUAGE_PROGRESS_TURKISH_TRANSLATED 100 -#define LANGUAGE_PROGRESS_TURKISH_APPROVED 30 +#define LANGUAGE_PROGRESS_TURKISH_APPROVED 69 + +/* Ukrainian */ +#define LANGUAGE_PROGRESS_UKRAINIAN_TRANSLATED 5 +#define LANGUAGE_PROGRESS_UKRAINIAN_APPROVED 0 /* Vietnamese */ -#define LANGUAGE_PROGRESS_VIETNAMESE_TRANSLATED 5 +#define LANGUAGE_PROGRESS_VIETNAMESE_TRANSLATED 4 #define LANGUAGE_PROGRESS_VIETNAMESE_APPROVED 0 diff --git a/intl/steam_ar.json b/intl/steam_ar.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_ar.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_ast.json b/intl/steam_ast.json new file mode 100644 index 0000000000..52059dcf2c --- /dev/null +++ b/intl/steam_ast.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nKronos ye una biforcación moderna del emulador UoYabause qu'al empar ye otra biforcación del venerable Yabause. Esti DLC apurre'l nucleu Kronos-libretro pa usalu na interfaz multimedia y de xuegos RetroArch, permitiendo a los usuarios cargar software que seya compatible col emulador.\n\nEsti nucleu usa les funciones modernes d'OpenGL pa fornir una variedá de carauterístiques gráfiques adicionales como una resolución interna mayor, polo que s'aconseya una GPU moderna y potente.\n\nTamién sofita la carga de xuegos dende milenta formatos estremaos, incluyendo ISO, BIN/CUE y el formatu comprimíu CHD. Amás, ríquese que los ficheros de BIOS (saturn_bios.bin y stvbios.zip) se pongan na carpeta «system» de RetroArch o xunto al software que se cargue pa que too funcione correutamente.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBA ye un emulador rápidu y precisu d'una de les consoles portátiles más populares y queríes, y ye compatible con una biblioteca escomanada de xuegos en 8 y 16 bits. Amás del compromisu d'ufrir una reproducción fiel, mGBA tamién tien munches ameyores, incluyendo'l sofitu pa paletes personalizaes en xuegos qu'orixinalmente s'amosaben n'escala de buxos, y berbesos pa xuegos que los incluyíen.\n\nEsti DLC permite que mGBA s'execute pente Retroarch lo que va permitir amestar toles sos ameyores y carauterístiques qu'ínclúin: rebobináu en tiempu real, asolombradores de posprocesamientu y entrada de llatencia baxa p'apurrir una esperiencia de xuegu moderna nos títulos clásicos.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStella ye un emulador de códigu abiertu y gratuitu d'una de les consoles más influyentes y populares de los 70 y 80. Esti emulador desendolcóse orixinalmente pal sistema operativu GNU/Linux pero col tiempu portóse a munches plataformes estremaes, incluyendo a libretro, que-y permite xugar pente'l sistema multimedia y de xuegos Retroarch.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nAlredor de los últimos años, l'equipu de desendolcu de Stella consiguió superar munchos pilancos a la hora d'imitar el hardware qu'emula Stella, faciéndolu compatible con homebrew, demos y munchos xuegos difíciles d'emular.\n\nPente RetroArch, vas poder dar un toque modernu a esti emulador clásicu con sofitu pa rebobináu en tiempu real y RetroAchievements, amás de los meyores asolombradores de RetroArch pa la emulación de pantalles CRT, y muncho más.", + "requirements": "CPU: Intel Pentium 4 y meyor (ríquese una CPU coles instrucciones SSE2) \nCPU aconseyada:Serie Intel Core o l'equivalente n'AMD \nGPU: Cualesquier GPU compatible con OpenGL 2.x o Direct3D11. Pa que funcionen afayadizamente los asolombradores, deberíen sofitar polo menos Shader Model 2.0. \nGPU aconseyada: Intel: Ríquese polo menos Intel HD 4K pa OpenGL, cualesquier GPU compatible con D3D11 pa Direct3D 11. Debería sofitar polo menos Shader Model 3.0 y/o 4.0. \nNotes adicionales: Pa OpenGL: Intel HD 2K/3K GPUs en Windows 10 van usar un controlador pa OpenGL 1.1.", + "legal-limits": "RetroArch ye software llibre y gratuitu, disponible so la llicencia GNU GPL 3.0. \nNun contién nengún material de terceros que contenga copyright, tamién ta a la escontra de la piratería en toles sos formes" +} diff --git a/intl/steam_chs.json b/intl/steam_chs.json new file mode 100644 index 0000000000..4453828c1f --- /dev/null +++ b/intl/steam_chs.json @@ -0,0 +1,14 @@ +{ + "main-desc": "全能模拟器是一款开源跨平台的模拟器和游戏引擎前端框架。\n\n它可以在统一的界面运行您最喜欢的各种上个时代游戏机和计算机上的经典游戏,但它的功能不止于此。它统一了模拟器核心设置,只要配置一次就可以畅玩所有游戏。\n\n除此之外,您将很快可以在全能模拟器中运行原生游戏光盘。我们致力于帮助您保存视频游戏,让您能够在 PC 上运行很久前购买的游戏。\n\n全能模拟器还有很多高级功能,比如着色器,联机,回溯,下一帧响应时间,超前运行等!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_cht.json b/intl/steam_cht.json new file mode 100644 index 0000000000..0107b6558f --- /dev/null +++ b/intl/steam_cht.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU:Intel Pentium 4及更高版本(需要具有SSE2指令的CPU)\nCPU推薦:Intel Core系列或與AMD相容的產品\n圖形:任何相容的OpenGL 2.x或Direct3D11 GPU。 為了使著色器正常工作,至少應支援Shader Model 2.0。\n推薦使用圖形:英特爾:OpenGL至少需要Intel HD 4K,Direct3D 11的任何相容D3D11 GPU至少都應支援Shader Model 3.0和/或4.0。\n附加說明:對於OpenGL:Windows 10上的Intel HD 2K / 3K GPU 必須回退到 OpenGL 1.1 驅動。", + "legal-limits": "RetroArch 是免費/開放原始碼軟體,基於GNU GPL 3.0許可。\n它不包含任何第三方的受版權保護的資料。 RetroArch 無法容忍任何方式和形式的盜版。" +} diff --git a/intl/steam_da.json b/intl/steam_da.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_da.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_de.json b/intl/steam_de.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_de.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_el.json b/intl/steam_el.json new file mode 100644 index 0000000000..5735bbf51a --- /dev/null +++ b/intl/steam_el.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "Επεξεργαστής: Intel Pentium 4 ή ανώτερος (Απαιτείται η υποστήριξη SSE2 εντολών)\nΣυνιστώμενος επεξεργαστής: Σειρά Intel Core ή αντίστοιχος AMD \nΓραφικά: Οποιαδήποτε συμβατή OpenGL 2.x ή Direct3D11 κάρτα γραφικών. Για να δουλέψουν σωστά οι σκιάσεις, ο επεξεργαστής γραφικών θα πρέπει να υποστηρίζει τουλάχιστον Shader Model 2.0.\nΣυνιστώμενα γραφικά: Intel: Απαιτέιται τουλάχιστον Intel HD 4K για OpenGL ή οποιοσδήποτε συμβατός επεξεργαστής γραφικών με D3D11. Συνιστάται η υποστήριξη τουλάχιστον Shader Model 3.0 και/ή 4.0.\nΠρόσθετες σημειώσεις: Για χρήση οδηγού OpenGL με επεξεργαστές γραφικών Intel HD 2K/3K σε περιβάλλον Windows 10, θα πρέπει να χρησιμοποιηθεί η έκδοση OpenGL 1.1.", + "legal-limits": "Το RetroArch ειναι ένα ελεύθερο/ανοιχτού κώδικα λογισμικό, το οποίο διατίθεται με την άδεια GNU GPL 3.0 και δεν περιέχει υλικό που προστατεύεται από πνευματικά δικαιώματα τρίτων. Το RetroArch δεν συναινεί στην πειρατεία με οποιονδήποτε τρόπο ή μορφή." +} diff --git a/intl/steam_es.json b/intl/steam_es.json new file mode 100644 index 0000000000..2dbf168322 --- /dev/null +++ b/intl/steam_es.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch es una plataforma y un «frontend» multiplataforma de código abierto para emuladores, motores de juegos, reproductores de medios y otras aplicaciones.\n\nAunque puede hacer muchas más cosas, es más conocida por ejecutar juegos clásicos en todo tipo de ordenadores y consolas a través de una interfaz gráfica elegante. La configuración también está unificada, así que solo hay que configurar RetroArch una vez.\n\nTambién podrás ejecutar próximamente discos de juego originales (CDs) desde RetroArch. Nos tomamos la preservación de videojuegos en serio y queremos poder garantizarte que puedas ejecutar tus contenidos originales y comprados en ordenadores modernos.\n\nRetroArch tiene muchas características avanzadas, como shaders, juego en red, rebobinado, tiempos de respuesta de un fotograma, reducción predictiva de latencia, ¡y mucho más!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\n\nFinal Burn Neo (también conocido como FBNeo) es la nueva rama oficial del emulador Final Burn Alpha, compatible con cientos de juegos recreativos y de consola. El núcleo libretro de FBNeo ofrece su catálogo de juegos compatibles a RetroArch, y su estrecha integración con la API libretro le permite utilizar las características avanzadas de alteración temporal de RetroArch, como el juego en red y la reducción predictiva de latencia. También incluye configuraciones de entrada para asignar botones automáticamente a diversos juegos, por ejemplo, para controlar juegos de lucha con dispositivos estilo arcade, tanto modernos como clásicos (es decir, joysticks especializados de lucha o «fightsticks»).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\n\nGenesis Plus GX empezó siendo una conversión casera del emulador Genesis Plus para consolas modificadas antes de ser convertido a libretro. Ideado para conseguir velocidad, precisión y portabilidad, ahora Genesis Plus GX aparece en todo tipo de plataformas y «frontends» y es conocido como uno de los emuladores más completos y compatibles para las consolas que soporta, siendo compatible tanto con juegos en cartucho como en formato CD-ROM. También funciona bien con muchas de las características avanzadas de RetroArch, como el rebobinado en tiempo real, la reducción predictiva de latencia, los trucos y los logros de RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nKronos es una bifurcación moderna del emulador UoYabause, que es a su vez una bifurcación del venerable emulador Yabause. Este contenido descargable ofrece el núcleo Kronos-libretro para la interfaz de juegos y multimedia RetroArch, permitiendo a los usuarios cargar software compatible con el emulador Kronos.\n\nKronos utiliza las últimas prestaciones de OpenGL para dar una miríada de características gráficas adicionales, como una mayor resolución interna, así que se recomienda tener una GPU moderna y de cierta potencia.\n\nKronos puede cargar juegos a partir de diversos formatos, que incluyen ISO, BIN/CUE y el formato comprimido CHD, y necesita archivos adicionales de la BIOS (saturn_bios.bin y stvbios.zip) en la carpeta «system» de RetroArch o junto al software objetivo para poder funcionar.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\n\nMesen es un emulador muy preciso y completo compatible con todo tipo de asignadores de cartuchos (incluso los que se utilizan en los cartuchos más raros y sin autorización), paletas de color personalizadas y paquetes de contenidos en HD. Como núcleo libretro, Mesen es compatible con muchas características avanzadas, como el parcheado al vuelo y los logros (a través del servicio RetroAchievements).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nMesen S es un emulador de consolas de 16 bits muy preciso y completo. Tiene un alto nivel de compatibilidad y rendimiento, y es compatible con los chips adicionales utilizados en muchos juegos de la época. Como núcleo libretro, Mesen S es compatible con muchas características avanzadas, como el parcheado al vuelo y los logros (a través del servicio RetroAchievements).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBA es un emulador rápido y preciso de una de las consolas portátiles más populares y queridas, compatible con un enorme catálogo de juegos de 8 y 16 bits. Además de estar pensado para ser rápido y fiel, mGBA también tiene muchas grandes mejoras, como el soporte de paletas personalizadas para juegos que originalmente se mostraban en escala de grises y la compatibilidad con los bordes que incluyen ciertos juegos.\n\nEste contenido descargable permite ejecutar mGBA a través de RetroArch, que añade todas sus características y mejoras, incluyendo el rebobinado en tiempo real, shaders de posprocesado extensos y una entrada de baja latencia para dar una experiencia moderna de juego hasta en los títulos más clásicos.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nPCSX ReARMed forma parte de un largo linaje de emuladores que incluye a PCSX-Reloaded, PCSX-df y, por supuesto, el PCSX original. Esta bifurcación en concreto fue optimizada originalmente para dispositivos con CPUs ARM y de ahí viene su nombre, pero hemos recuperado bastantes cosas para que también pueda funcionar bien en el hardware habitual de un ordenador.\n\nComo núcleo libretro, este contenido descargable necesita la interfaz RetroArch, donde podrá ser cargado como un núcleo capaz de ejecutar juegos y software compatible con el emulador PCSX ReARMed. Este núcleo necesita que haya una imagen de la BIOS (no incluida) de cada región de software dentro de la carpeta «system» de RetroArch para poder funcionar.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\nSameBoy es un emulador muy preciso conocido por poder ejecutar ciertos juegos que dan problemas en otros emuladores. Además de esta precisión, SameBoy también presenta otras características interesantes, como la posibilidad de elegir el modelo de sistema a emular sin importar el modelo para el que estuviera designado el juego, paletas de color a gusto del usuario, una BIOS HLE integrada y la capacidad de mostrar bordes en juegos compatibles con los mismos.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStella es un emulador gratuito y de código abierto para una de las consolas domésticas más populares e influyentes de las décadas de 1970 y 1980. Este emulador fue diseñado originalmente para el sistema operativo GNU/Linux, pero con el tiempo ha sido convertido a muchas plataformas, entre ellas libretro, que permite jugar mediante el sistema de juegos y multimedia RetroArch.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nEn los últimos años, el equipo de desarrollo de Stella ha hecho grandes avances para replicar las diversas peculiaridades de la consola objetivo de Stella, haciendo que sea compatible con muchos juegos, aplicaciones caseras y demos difíciles de emular.\n\nGracias a RetroArch, podrás darle un toque moderno a este emulador clásico con el soporte para rebobinado en tiempo real, logros RetroAchievements, los mejores shaders de RetroArch para emular monitores CRT, y mucho más.", + "requirements": "CPU: Intel Pentium 4 o superior (es necesaria una CPU con instrucciones SSE2) \nCPU-recommended:Serie Core de Intel o equivalente de AMD \nGraphics: Cualquier GPU compatible con OpenGL 2.x o Direct3D11. Es necesaria la compatibilidad con el Shader Model 2.0 para que los shaders funcionen con normalidad. \nGraphics-recommended: Intel: Intel HD 4K mínimo para OpenGL, cualquier GPU compatible con D3D11 para Direct3D 11. Deberían ser compatibles con el Shader Model 3.0 o 4.0 mínimo. \nAdditional notes: Para OpenGL: Las GPU Intel HD 2K/3K en Windows 10 tendrán que utilizar un controlador OpenGL 1.1.", + "legal-limits": "RetroArch es un software gratuito y de código abierto publicado bajo la licencia GPL 3.0 del GNU. \nNo contiene ningún material con derechos de autor de terceros. RetroArch está en contra de la piratería en todas sus formas." +} diff --git a/intl/steam_fa.json b/intl/steam_fa.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_fa.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_fi.json b/intl/steam_fi.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_fi.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_fr.json b/intl/steam_fr.json new file mode 100644 index 0000000000..7f7a95e127 --- /dev/null +++ b/intl/steam_fr.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch est une interface/structure open source et multi-plateforme pour des émulateurs, moteurs de jeux, jeux vidéo, lecteurs multimédia et autres applications.\n\nBien qu'il puisse faire beaucoup de choses en plus de cela, il est le plus connu pour vous permettre de faire tourner des jeux classiques sur une large gamme d'ordinateurs et de consoles à travers une interface graphique astucieuse. Les paramètres sont également unifiés de sorte que la configuration est faite une fois pour toutes.\n\nEn plus de cela, vous pourrez bientôt exécuter des disques de jeu originaux (CDs) depuis RetroArch. Nous prenons la préservation des jeux vidéo au sérieux et voulons vous assurer de pouvoir exécuter votre contenu acheté d'origine sur des PC modernes.\n\nRetroArch a des fonctionnalités avancées telles que les shaders, le jeu en réseau, le rembobinage, un temps de réponse immédiat, l'éxécution en avance, et plus encore !", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\n\nFinal Burn Neo (alias FBNeo) est la nouvelle branche officielle de l'émulateur Final Burn Alpha, qui est compatible avec des centaines de jeux d'arcade et de console. Le cœur libretro de FBNeo apporte sa bibliothèque de titres compatibles à RetroArch, où l'intégration étroite du cœur avec l'API de libretro lui permet de fonctionner avec les fonctions de précision avancées de RetroArch, telles que le jeu en réseau basé sur le rembobinage et l'exécution en avance pour la réduction de latence. Il comprend des préréglages de manettes pour le mappage automatique des touches pour différents jeux, incluant des dispositions pour les jeux de combat avec les manettes modernes et les sticks d'arcade à l'ancienne (alias fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\n\nGenesis Plus GX a débuté en tant que portage homebrew de l'émulateur Genesis Plus pour une console piratée avant d'être porté sur libretro. En se concentrant sur la vitesse, la précision et la portabilité, Genesis Plus GX apparaît maintenant sur une variété de plates-formes et de structures, et est connu comme l'un des émulateurs les plus capables et compatibles pour les consoles qu'il supporte, avec une prise en charge des jeux sur cartouches et CD-ROM. Il fonctionne également bien avec de nombreuses fonctionnalités avancées de RetroArch, telles que le rembobinage en temps réel, la réduction de la latence par éxécution en avance, les cheats et les RetroSuccès (RetroAchievements).", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nKronos est une fork moderne de l'émulateur uoYabause, qui est elle-même une fork du vénérable émulateur Yabause. Ce DLC fournit le cœur Kronos-libretro à utiliser avec l'interface de jeu et multimédia RetroArch, permettant aux utilisateurs de charger des logiciels compatibles avec l'émulateur Kronos.\n\nKronos utilise des capacités modernes d'OpenGL pour fournir une variété de fonctionnalités graphiques supplémentaires, comme une résolution interne accrue, il est donc recommandé de disposer d'un processeur graphique récent et raisonnablement puissant.\n\nKronos supporte le chargement de jeux à partir de différents formats, y compris ISO, BIN/CUE et le format CHD compressé, et il nécessite des fichiers BIOS externes (saturn_bios.bin et stvbios.zip) placés soit dans le dossier \"system\" de RetroArch, soit avec le logiciel cible afin de fonctionner correctement.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\n\nMesen est un émulateur très précis et rempli de fonctionnalités avec le support d'une tonne de mappers cartouche (même ceux utilisés par des jeux étranges et non autorisés), des palettes de couleurs personnalisées et des packs de ressources HD. En tant que cœur de libretro, Mesen prend en charge de nombreuses fonctionnalités avancées, telles que le patching logiciel et les succès (grâce au service RetroAchievements).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nMesen S est un émulateur de console 16bit très précis et rempli de fonctionnalités. Il a une grande compatibilité, avec le support des processeurs additionnels utilisés dans de nombreux jeux de l'époque, tout en maintenant également des performances élevées. En tant que cœur libretro, Mesen S prend en charge de nombreuses fonctionnalités avancées, telles que le patching logiciel et les succès (grâce au service RetroAchievements).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBA est un émulateur rapide et précis pour l'une des consoles de poche les plus populaires et les plus appréciées, et il est compatible avec une grande bibliothèque de jeux du style 8 et 16 bits. En plus de l'engagement en faveur de la vitesse et de la reproduction fidèle, mGBA a également une tonne de fonctionnalités d'amélioration y compris le support de palettes personnalisées pour les jeux qui étaient à l'origine en niveaux de gris et l'affichage de bordures pour les jeux qui les incluent.\n\nCe DLC permet à mGBA de passer par RetroArch, qui ajoute toutes ses améliorations et fonctionnalités, y compris le rembobinage en temps réel, des shaders de post-traitement et une faible latence des entrées de touches pour fournir une expérience de jeu moderne, même avec des titres classiques.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nPCSX ReARMed fait partie d'une longue lignée d'émulateurs qui inclut PCSX-Reloaded, PCSX-df et, bien sûr, le PCSX original. Ce fork particulier a été initialement fortement optimisé pour les périphériques avec des processeurs ARM, d'où le nom, mais nous avons rajouté un bon nombre de choses pour le faire fonctionner correctement sur du matériel PC typique.\n\nEn tant que cœur libretro, ce DLC nécessite l'interface de RetroArch, où il peut être chargé en tant que cœur pour exécuter des jeux et logiciels compatibles avec l'émulateur PCSX ReARMed. Ce cœur nécessite une image BIOS (non incluse) pour chaque région du logiciel à placer dans le répertoire \"system\" de RetroArch afin de fonctionner correctement.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\n\nSameBoy est un émulateur très précis connu pour avoir réussi à faire tourner quelques jeux qui posent problème à d'autres émulateurs. En plus de cette haute précision, SameBoy a également quelques belles fonctionnalités comme la possibilité de choisir le modèle de l'appareil à émuler, quel que soit le modèle pour lequel le jeu est conçu, des palettes de colorisation sélectionnables par l'utilisateur, un BIOS HLE intégré et la possibilité de charger les bordures des jeux qui les supportent.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStella est un émulateur gratuit et open-source pour l'une des consoles de jeux vidéo les plus populaires et influentes des années 70 et 80. Cet émulateur a été développé à l'origine pour être utilisé sur le système d'exploitation GNU/Linux, mais a au fil du temps a été porté sur de nombreuses plates-formes, y compris libretro, ce qui lui permet d'être joué au travers du système de jeu et multimédia RetroArch.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nAu cours des quelques dernières années, l'équipe de développement de Stella a fait de grands progrès en imitant les nombreuses bizarreries de la console cible de Stella, le rendant compatible avec de nombreux jeux difficiles à émuler, des logiciels homebrew et des démos.\n\nGrâce à RetroArch, vous pouvez apporter une touche moderne à cet émulateur classique, avec le support du rembobinage en temps réel et des RetroSuccès (RetroAchievements), ainsi que des meilleurs shaders de la classe pour l'émulation d'un écran à tube cathodique (CRT) et plus encore.", + "requirements": "Processeur : Intel Pentium 4 et supérieur (CPU avec les instructions SSE2 requis) \nProcesseur recommandé : Intel Core series ou équivalent AMD \nCarte graphique : N'importe quel GPU compatible OpenGL 2.x ou Direct3D11. Pour que les shaders fonctionnent correctement, le GPU devrait prendre en charge au moins le Shader Model 2.0. \nCarte graphique recommandée : Intel : Au moins Intel HD 4K requis pour OpenGL, tout GPU conforme D3D11 pour Direct3D 11. Doit supporter au moins le Shader Model 3.0 et/ou 4.0. \nRemarques supplémentaires : Pour OpenGL : les GPU Intel HD 2K/3K sous Windows 10 devront avoir recourt à un pilote OpenGL 1.1.", + "legal-limits": "RetroArch est un logiciel libre/open source, disponible sous la licence GNU GPL 3.0. \nIl ne contient aucun matériel protégé par des tiers. RetroArch n'autorise en aucun cas le piratage de quelque manière que ce soit." +} diff --git a/intl/steam_he.json b/intl/steam_he.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_he.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_it.json b/intl/steam_it.json new file mode 100644 index 0000000000..5a4b4108e5 --- /dev/null +++ b/intl/steam_it.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2. ng[/img]\n\nFinal Burn Neo (aka FBNeo) è la nuova sede ufficiale dell'emulatore Final Burn Alpha, che è compatibile con centinaia di giochi arcade e console. Il core libretro di FBNeo porta la sua biblioteca di titoli compatibili a RetroArch, dove la stretta integrazione del nucleo con l'API libretro gli permette di lavorare con le funzionalità avanzate di piegatura temporale di RetroArch, come la reticolatura basata su rollback e la riduzione della latenza di runhead. Include preset di input per la mappatura automatica dei pulsanti per diversi giochi, compresi i layout di gioco di combattimento sia per i controlli arcade moderni e di vecchia scuola (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone). ng[/img]\n\nGenesis Plus GX è iniziato come porta homebrew dell'emulatore Genesis Plus per una console hackerata prima di essere portato su libretro. Con particolare attenzione alla velocità, precisione e portabilità, Genesis Plus GX appare ora su una varietà di piattaforme e frontend, ed è conosciuto come uno degli emulatori più capaci e compatibili per le console che copre, con supporto sia per i giochi a testina che per quelli a CD-ROM. Funziona bene anche con molte delle funzionalità avanzate di RetroArch, come il rewind in tempo reale, la riduzione della latenza in anticipo, i trucchi e i RetroAchievions.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main. ng[/img]\n\nKronos è una forchetta moderna dell'emulatore UoYabause, che è essa stessa una forchetta del venerabile emulatore Yabause. Questo DLC fornisce il core Kronos-libretro per l'uso con il RetroArch gaming e l'interfaccia multimediale, permettendo agli utenti di caricare software compatibile con l'emulatore Kronos.\n\nKronos utilizza moderne funzionalità OpenGL per fornire una varietà di funzionalità grafiche extra, come una maggiore risoluzione interna, quindi si raccomanda una GPU aggiornata e ragionevolmente potente.\n\nKronos supporta il caricamento di giochi da molti formati diversi, tra cui ISO, BIN/CUE e il formato di CHD compresso, e richiede file BIOS esterni (saturn_bios. in e stvbios.zip) posizionati nella cartella \"system\" di RetroArch, o accanto al software di destinazione per funzionare correttamente.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2. ng[/img]\n\nMesen è un emulatore altamente accurato e pieno di funzionalità con supporto per tonnellate di cartucce mapper (anche quelle usate per strane, carrelli non autorizzati), tavolozze di colori personalizzate e pacchetti di risorse HD. Come un core libretro, Mesen supporta molte funzionalità avanzate, come softpatching e successi (attraverso il servizio RetroAchievements).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nMesen S è un emulatore di console a 16 bit altamente accurato e pieno di funzionalità. Ha un'elevata compatibilità, con il supporto per i chip add-on utilizzati in molti giochi dell'epoca, mantenendo al contempo alte prestazioni. Come un core libretro, Mesen S supporta molte funzionalità avanzate, come softpatching e realizzazioni (attraverso il servizio RetroAchievements).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBA è un emulatore rapido e preciso per una delle console palmare più popolari e molto amate, e ha compatibilità con la grande libreria di amati giochi in stile a 8 e 16 bit. In aggiunta all'impegno per la velocità e la riproduzione fedele, mGBA ha anche una tonnellata di grandi caratteristiche di miglioramento, compreso il supporto per tavolozze personalizzate per giochi originariamente in scala di grigi e la visualizzazione di bordi per giochi che li includono.\n\nQuesto DLC permette a mGBA di correre attraverso RetroArch, che aggiunge tutti i suoi miglioramenti e funzionalità, tra cui rewind in tempo reale, ampie ombre post-elaborazione e input a bassa latenza per fornire un'esperienza di gioco moderna anche con titoli classici.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nPCSX ReARMed fa parte di una lunga linea di emulatori che include PCSX-Reloaded, PCSX-df e, naturalmente, il PCSX originale. Questo particolare fork è stato originariamente pesantemente ottimizzato per dispositivi con CPU ARM, da cui il nome, ma abbiamo aggiunto di nuovo in un bel paio di cose per farlo funzionare bene sul tipico hardware del PC, pure.\n\nCome core libretro, questo DLC richiede l'interfaccia RetroArch, dove può essere caricato come nucleo per eseguire giochi e software compatibili con l'emulatore PCSX ReARMed. Questo nucleo richiede che un'immagine BIOS (non inclusa) per ogni regione del software sia posizionata nella directory \"system\" di RetroArch, al fine di funzionare correttamente.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\nSameBoy è un emulatore altamente accurato noto per aver eseguito con successo alcuni giochi che causano altri emulatori a inciampare. Oltre a questa alta precisione, SameBoy sport anche alcune caratteristiche piacevoli come la capacità di scegliere quale modello di dispositivo emulare indipendentemente da quale modello il gioco è progettato per, tavolozze di colorazione selezionabili dall'utente, BIOS HLE integrato e la capacità di caricare bordi sui giochi che li supportano.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStella è gratuita, emulatore open source per una delle console di videogiochi a casa più popolari e influenti degli anni '70 e '80. Questo emulatore è stato originariamente sviluppato per l'uso sul sistema operativo GNU/Linux, ma ha, nel tempo, è stato portato su molte piattaforme diverse, tra cui libretro, che gli permette di giocare attraverso il RetroArch gioco e sistema multimediale.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nNegli ultimi due anni, il team di sviluppo Stella ha fatto grandi passi avanti nel imitare le tante stranezze della console target di Stella, renderlo compatibile con molti giochi difficili da emulare, software homebrew e demos.\n\nAttraverso RetroArch, puoi portare un tocco moderno a questo emulatore classico, con il supporto per rewind in tempo reale e RetroAchievements, così come le ombre migliori di RetroArchs per l'emulazione CRT display e altro ancora.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2. o Direct3D11 GPU. Per le ombre di funzionare correttamente, dovrebbe supportare almeno Shader Model 2.0. \nGrafica consigliata: Intel: Almeno Intel HD 4K richiesto per OpenGL, qualsiasi GPU D3D11 conforme per Direct3D 11. Dovrebbe supportare almeno Shader Model 3. e/o 4.0. \nNote aggiuntive: Per OpenGL: Intel HD 2K/3K GPU su Windows 10 dovrà tornare a un driver OpenGL 1.1.", + "legal-limits": "RetroArch è un software libero/open source, disponibile sotto la licenza GNU GPL 3.0. \nNon contiene materiale protetto da copyright di terze parti. RetroArch non conviene la pirateria in alcun modo, forma o forma." +} diff --git a/intl/steam_ja.json b/intl/steam_ja.json new file mode 100644 index 0000000000..c9d8d5efd8 --- /dev/null +++ b/intl/steam_ja.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch は、エミュレータ、ゲームエンジン、ビデオゲーム、メディアプレイヤー、その他のアプリケーションのためのオープンソースでクロスプラットフォームなフロントエンド/フレームワークです。\n\nこれ以外にも多くのことができますが、最も広く知られているのは、洗練されたグラフィカルなインターフェイスを通じて、さまざまなコンピュータやコンソール上でクラシックなゲームを実行できるようにすることです。設定も統一されているので、設定はすべて一度で完了します。\n\nこれに加えて、RetroArchのオリジナルゲームディスク(CD)も間もなく起動できるようになります。私たちはビデオゲームの保存に真剣に取り組んでおり、購入したオリジナルコンテンツを現代のPCで実行できるようにしたいと考えています。\n\nRetroArchには、シェーダー、ネットプレイ、巻き戻し、次のフレームの応答時間、ランヘッドなどの高度な機能が搭載されています。", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\n\nFinal Burn Neo (別名 FBNeo) は、何百ものアーケードゲームやコンソールゲームと互換性のある Final Burn Alpha エミュレータの新しい公式ブランチです。FBNeo の libretro コアは、互換性のあるタイトルのライブラリを RetroArch にもたらし、コアが libretro API と緊密に統合されているため、ロールバックベースのネットプレイやランヘッドのレイテンシ削減など、RetroArch の高度なタイムベンディング機能と連携することができます。また、さまざまなゲーム用のボタンを自動的にマッピングするための入力プリセットも用意されており、現代的なものと昔ながらのアーケード コントロール (別名ファイトスティック) 用の格闘ゲーム レイアウトなども用意されています。", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\n\nGenesis Plus GXは、libretroに移植される前に、ハックされたコンソール用のGenesis Plusエミュレータの自作移植として始まりました。スピード、正確さ、移植性を重視した Genesis Plus GX は、現在ではさまざまなプラットフォームやフロントエンドで使用されており、カートリッジと CD-ROM ゲームの両方をサポートしており、カバーしているコンソール用の最も有能で互換性のあるエミュレータのひとつとして知られています。また、リアルタイム巻き戻し、ランヘッドレイテンシーの低減、チート、RetroAchievementsなど、RetroArchの高度な機能の多くと相性が良いです。", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nKronosは、それ自体が由緒あるYabauseエミュレータのフォークであるUoYabauseエミュレータの現代的なフォークです。このDLCは、RetroArchのゲームおよびマルチメディアインターフェイスで使用するためのKronos-libretroコアを提供し、ユーザーがKronosエミュレータと互換性のあるソフトウェアをロードすることを可能にします。\n\nKronosは最新のOpenGL機能を利用して、内部解像度の向上など、さまざまな追加のグラフィカル機能を提供します。\n\nKronosは、ISO、BIN/CUE、圧縮されたCHDフォーマットを含む多くの異なるフォーマットからのゲームのロードをサポートしており、正しく機能するためには、RetroArchの \"system \"フォルダ内またはターゲットソフトウェアと一緒に置かれた外部BIOSファイル(saturn_bios.binとstvbios.zip)が必要です。", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\n\nMesen は高精度で機能満載のエミュレータで、膨大な数のカートリッジマッパー (奇妙で非公認のカートに使われているものも)、カスタムカラーパレットや HD アセットパックをサポートしています。Libretroのコアとして、Mesen はソフトパッチやアチーブメント (RetroAchievements サービスを通して) のような多くの高度な機能をサポートしています。", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nMesen Sは、高精度で機能満載の16bitコンソールエミュレータです。高い性能を維持しつつ、当時の多くのゲームで使用されていたアドオンチップをサポートするなど、高い互換性を持っています。LibretroコアであるMesen Sは、ソフトパッチやアチーブメント(RetroAchievementsサービスによる)など、多くの高度な機能をサポートしています。", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBAは、最も人気があり愛されている携帯ゲーム機の1つである高速で正確なエミュレータであり、人気の高い8ビットおよび16ビットスタイルのゲームの膨大なライブラリと互換性があります。スピードと忠実な再現性へのこだわりに加えて、mGBAは、もともとグレースケールだったゲームのカスタムパレットのサポートや、それを含むゲームのボーダー表示など、多くの素晴らしい拡張機能を備えています。\n\nこのDLCにより、mGBAはRetroArchを介して動作し、リアルタイム巻き戻し、広範なポスト処理シェーダー、低レイテンシー入力など、すべての機能強化と機能が追加され、クラシックタイトルでもモダンなゲーム体験を提供することができます。", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nPCSX ReARMed は、PCSX-Reloaded、PCSX-df、そしてもちろんオリジナルの PCSX を含む長いエミュレータのラインの一部です。この特定のフォークは、もともと ARM CPU を搭載したデバイス向けに大きく最適化されていたため、その名が付いていますが、一般的な PC ハードウェアでも動作するように、かなりの数のものを追加しました。\n\nLibretroコアとして、この DLC は RetroArch インターフェイスを必要とし、PCSX ReARMed エミュレータと互換性のあるゲームやソフトウェアを実行するためのコアとしてロードすることができます。このコアが正常に機能するためには、ソフトウェアの各リージョンに対応したBIOSイメージ(同梱されていない)をRetroArchの「システム」ディレクトリに配置する必要があります。", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\n\nSameBoyは、他のエミュレータがつまずく原因となるいくつかのゲームの実行に成功したことで知られている高精度エミュレータです。この高精度に加えて、SameBoyは、ゲームがどのモデル用に設計されているかに関係なくエミュレートするデバイスモデルを選択できる機能、ユーザーが選択可能なカラー化パレット、内蔵のHLE BIOS、そしてそれらをサポートするゲームにボーダーをロードする機能など、いくつかの優れた機能を備えています。", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStellaは、1970年代から80年代にかけて最も人気があり、影響力のあった家庭用ゲーム機の一つであるStella用のフリーのオープンソースエミュレータです。このエミュレータはもともと GNU/Linux オペレーティングシステム用に開発されましたが、時を経て libretro を含む多くの異なるプラットフォームに移植され、RetroArch ゲームやマルチメディアシステムでプレイできるようになりました。\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nここ数年、Stella開発チームはStellaのターゲットコンソールの多くの特徴を模倣し、エミュレートが困難なゲームや自作ソフトウェア、デモとの互換性を実現するために大きな進歩を遂げてきました。\n\nRetroArchを使えば、リアルタイム巻き戻しやRetroAchievements、CRTディスプレイエミュレーション用のRetroArchのクラス最高のシェーダーなどをサポートし、このクラシックなエミュレータに現代的なタッチを加えることができます。", + "requirements": "CPU: Intel Pentium 4以上(SSE2の指示が必要なCPU) \n推奨CPU: Intel CoreシリーズまたはAMDと同等のもの\nグラフィックス: OpenGL 2.xまたはDirect3D11に準拠したGPU。シェーダーが正しく動作するためには、少なくともシェーダーモデル2.0をサポートしている必要があります。\n推奨グラフィックス: Intel: OpenGLには少なくともIntel HD 4Kが必要で、Direct3D 11の利用にはD3D11に準拠したGPUが必要です。シェーダーモデル3.0および/または4.0以上をサポートしている必要があります。\nその他の注意事項: OpenGLの場合:Windows 10上のIntel HD 2K/3K GPUは、OpenGL 1.1ドライバにフォールバックする必要があります。", + "legal-limits": "RetroArchはフリー/オープンソース・ソフトウェアで、GNU GPL 3.0ライセンスで利用可能です。\nサードパーティによる著作権で保護されたものは一切含まれていません。RetroArch は、いかなる形であれ海賊行為を容認するものではありません。" +} diff --git a/intl/steam_ko.json b/intl/steam_ko.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_ko.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_nl.json b/intl/steam_nl.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_nl.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_pl.json b/intl/steam_pl.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_pl.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_pt_br.json b/intl/steam_pt_br.json new file mode 100644 index 0000000000..aae8b42a1c --- /dev/null +++ b/intl/steam_pt_br.json @@ -0,0 +1,14 @@ +{ + "main-desc": "O RetroArch é uma interface de código aberto e multiplataforma para emuladores, motores dos jogos, videogames, reprodutores de mídia e para outros aplicativos.\n\nEmbora possa fazer muitas coisas além disso, é amplamente conhecido por permitir que você execute jogos clássicos em uma ampla variedade de computadores e consoles por meio de uma interface gráfica. As configurações também são unificadas para que ela seja feita apenas uma vez em todos os sistemas.\n\nAlém disso, em breve, será possível executar os discos originais (CDs) dos jogos através do RetroArch. Levamos a sério a preservação dos videogames e queremos garantir que você possa executar o conteúdo comprado originalmente nos PCs modernos.\n\nO RetroArch possui recursos avançados como shaders, jogo em rede, rebobinagem, baixo tempo de resposta do próximo quadro, execução antecipada e muito mais!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\n\nFinal Burn Neo (também conhecido como FBNeo) é o novo ramo oficial do emulador Final Burn Alpha, compatível com centenas de jogos arcade e console. O núcleo libretro do FBNeo traz em sua biblioteca títulos compatíveis para o RetroArch, onde a forte integração do núcleo com a API libretro permite trabalhar com os recursos avançados de alteração temporal do RetroArch, como jogo em rede e redução de latência com a execução antecipada. Também inclui configurações de entrada para o mapeamento automático dos botões para jogos diferentes, incluindo esquemas dos jogos de luta para controles de fliperama modernos e antigos (também conhecido como fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\n\nO Genesis Plus GX começou como uma conversão caseira do emulador Genesis Plus para um console modificado antes de ser convertido em um núcleo libreto. Projetado para obter velocidade, precisão e portabilidade, agora o Genesis Plus GX aparece em todos os tipos de plataformas e interfaces, e é conhecido como um dos emuladores mais completos e compatíveis para os consoles aos quais se destina, sendo compatível tanto com jogos em cartucho como no formato CD-ROM. Também funciona bem com muitos dos recursos avançados do RetroArch, como rebobinagem em tempo real, redução de latência com a execução antecipada, trapaças e conquistas do RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nO Kronos é uma bifurcação moderna do emulador UoYabause, que é uma bifurcação do venerável emulador Yabause. Este conteúdo para download fornece o núcleo Kronos-libretro para a interface de jogos e multimídia RetroArch, permitindo que os usuários carreguem softwares compatíveis com o emulador Kronos.\n\nO Kronos utiliza os recursos mais recentes do OpenGL para fornecer uma infinidade de recursos gráficos adicionais, como maior resolução interna, por isso é recomendável ter uma GPU moderna e poderosa.\n\nO Kronos pode carregar jogos de vários formatos, incluindo ISO, BIN/CUE e o formato CHD compactado, e requer arquivos de BIOS adicionais (saturn_bios.bin e stvbios.zip) na pasta «system» do RetroArch ou ao lado do software de destino para funcionar corretamente.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\n\nO Mesen é um emulador altamente preciso e cheio de recursos, com suporte para muitos mapeadores de cartuchos (mesmo aqueles usados por cartuchos não autorizados), paletas de cores personalizadas e pacotes de textura em HD. Como um núcleo libretro, o Mesen é compatível com muitos recursos avançados, como correções dinâmicas e conquistas (por meio do serviço RetroAchievements).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nO Mesen S é um emulador de console 16 bits altamente preciso e cheio de recursos. Possui alta compatibilidade, compatível com os chips adicionais usados em muitos jogos da época, além de manter o alto desempenho. Como um núcleo libretro, o Mesen S suporta muitos recursos avançados, como correções dinâmicas e conquistas (através do serviço RetroAchievements).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nO mGBA é um emulador rápido e preciso para um dos consoles portáteis mais populares e amados, e tem compatibilidade com uma enorme biblioteca de jogos adorados no estilo de 8 e 16 bits. Além do compromisso com a velocidade e a reprodução fiel, o mGBA também possui vários recursos de aprimoramento, incluindo suporte para paletas personalizadas para jogos que eram originalmente em escala de cinza e exibindo bordas para jogos que as incluem.\n\nEste conteúdo para download permite executar o mGBA no RetroArch, adicionando todos os seus aprimoramentos e recursos, incluindo rebobinagem em tempo real, shaders de pós-processamento extensivos e entrada de baixa latência para fornecer uma experiência de jogo moderna, mesmo com títulos clássicos.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nO PCSX ReARMed faz parte de uma longa linhagem de emuladores que inclui PCSX-Reloaded, PCSX-df e, é claro, o PCSX original. Essa bifurcação específica foi originalmente otimizada para dispositivos com CPUs ARM, daí o nome, mas recuperamos algumas coisas para que ela também possa ter um bom desempenho em hardware de computador comum.\n\nComo um núcleo libretro, esse conteúdo para download requer a interface RetroArch, onde pode ser carregado como um núcleo capaz de executar jogos e softwares compatíveis com o emulador PCSX ReARMed. Este núcleo requer uma imagem da BIOS (não incluída) para cada região de software na pasta «system» do RetroArch para funcionar.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\nO SameBoy é um emulador muito preciso, conhecido por poder executar certos jogos que causam problemas em outros emuladores. Além de ter essa precisão, o SameBoy também apresenta outros recursos interessantes, como a possibilidade de escolher o modelo do sistema a ser emulado, independentemente do modelo para o qual o jogo foi designado, paletas de cores adequadas ao usuário, uma BIOS HLE integrada e o capacidade de exibir bordas em jogos compatíveis com elas.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nO Stella é um emulador gratuito e de código aberto para um dos consoles domésticos mais populares e influentes das décadas de 1970 e 1980. Este emulador foi originalmente projetado para o sistema operacional GNU/Linux, mas com o tempo foi convertido para várias plataformas, incluindo elas a libretro, que permite que você jogue através do sistema de jogos e multimídia RetroArch.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nNos últimos anos, a equipe de desenvolvimento do Stella fez grandes progressos para replicar as várias peculiaridades do console de destino do Stella, tornando-o compatível com muitos jogos, aplicativos domésticos e demonstrações difíceis de emular.\n\nGraças ao RetroArch, você poderá dar a este emulador clássico um toque moderno com suporte para rebobinar em tempo real, conquistas do RetroAchievements, os melhores shaders do RetroArch para emular os monitores CRT e muito mais.", + "requirements": "CPU: Intel Pentium 4 e superior (é necessária uma CPU com instruções SSE2)\nCPU recomendada:Série Intel Core ou equivalente AMD\nGráficos: Qualquer GPU compatível com OpenGL 2.x ou Direct3D11. Para que os shaders funcionem corretamente, deve suportar pelo menos o Shader Model 2.0.\nPlaca gráfica recomendada: Intel: Intel HD 4K pelo menos para OpenGL, qualquer GPU compatível com D3D11 para Direct3D 11. Deve suportar pelo menos o Shader Model 3.0 e/ou 4.0.\nNotas adicionais: Para OpenGL: As GPUs Intel HD 2K/3K no Windows 10 precisarão usar para um driver OpenGL 1.1.", + "legal-limits": "O RetroArch é um software de código aberto/gratuito, disponível na licença GNU GPL 3.0.\nNão contém nenhum material protegido por direitos autorais de terceiros. O RetroArch não tolera pirataria de forma alguma." +} diff --git a/intl/steam_pt_pt.json b/intl/steam_pt_pt.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_pt_pt.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_ru.json b/intl/steam_ru.json new file mode 100644 index 0000000000..ecaa5307a9 --- /dev/null +++ b/intl/steam_ru.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch — бесплатная программа с открытым исходным кодом, доступная под лицензией GNU GPL 3.0. \nНе содержит никаких материалов, охраняемых авторскими правами, третьими лицами. RetroArch никоим образом не поддерживает пиратство, ни в каком виде." +} diff --git a/intl/steam_sk.json b/intl/steam_sk.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_sk.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_sv.json b/intl/steam_sv.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_sv.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_tr.json b/intl/steam_tr.json new file mode 100644 index 0000000000..976c7de2c5 --- /dev/null +++ b/intl/steam_tr.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch, emülatörler, oyun motorları, video oyunları, medya oynatıcılar ve diğer uygulamalar için açık kaynaklı ve çapraz platform ön uç/çerçevesidir.\n\nBunun yanı sıra birçok şey yapabilmesine rağmen, akışkan bir grafik arayüzü ile çok çeşitli bilgisayarlarda ve konsollarda klasik oyunları çalıştırmanıza izin verdiği için en yaygın olarak bilinir. Ayarlar da birleştirilir, böylece yapılandırma bir kez ve herkes için yapılır.\n\nBuna ek olarak, yakında RetroArch'tan orijinal oyun disklerini (CD'ler) çalıştırabileceksiniz. Video oyunu korumasını ciddiye alıyoruz ve ilk satın aldığınız içeriği modern PC'lerde çalıştırabilmenizi istiyoruz.\n\nRetroArch, gölgelendiriciler, netplay, geri sarma, sonraki kare, yanıt süreleri, ön uç ve daha fazlası gibi gelişmiş özelliklere sahiptir!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\n\nFinal Burn Nero (bilinen adıyla Fbneo), yüzlerce arcade ve konsol oyunuyla uyumlu olan Final Burn Alpha emülatörünün yeni resmi şubesidir. FBNeo'nun libretro çekirdeği, uyumlu başlık kitaplığını RetroArch'a getiriyor; burada çekirdeğin libretro API ile sıkı bütünleşmesi, RetroArch'ın geri alma tabanlı netplay ve ön koşucu gecikme azaltımı gibi gelişmiş zaman bükme özellikleriyle çalışmasına izin veriyor. Hem modern hem de eski okul arcade kontrolleri (bilinen adıyla Dövüş çubuğu) için dövüş oyunu düzenleri de dahil olmak üzere farklı oyunlar için düğmelerin otomatik haritalanması için giriş ön ayarlarını içerir.", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\n\nGenesis Plus GX, Libretro'ya taşınmadan önce konsol için Genesis Plus emülatörünün ön ucu olarak başladı. Hız, doğruluk ve taşınabilirliğe odaklanan Genesis Plus GX şimdi çeşitli platformlarda ve ön uçlarda görünüyor ve hem kartuş hem de CD-ROM desteği ile kapsadığı konsollar için en yetenekli ve uyumlu emülatörlerden biri olarak biliniyor. Ayrıca, RetroArch'ın gerçek zamanlı geri sarma, ön koşucu gecikme azaltımı, hileler ve RetroAchievements gibi gelişmiş özelliklerinin çoğuyla iyi çalışır.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\n\nKronos, saygıdeğer Yabause emülatörünün bir çatalı olan UoYabause emülatörünün modern bir çataldır. Bu DLC, RetroArch oyun ve çoklu ortam arayüzü ile kullanım için Kronos-libretro çekirdeğini sağlar ve kullanıcıların Kronos emülatörüyle uyumlu yazılım yüklemelerine izin verir.\n\nKronos, artırılmış dahili çözünürlük gibi çeşitli fazladan grafik özellikler sağlamak için modern OpenGL yeteneklerini kullanır, bu nedenle güncel ve makul derecede güçlü bir GPU önerilir.\n\nKronos, ISO, BIN/CUE ve sıkıştırılmış CHD biçimi dahil olmak üzere birçok farklı biçimden oyun kurulumunu destekler ve RetroArch'ın \"sistem\" klasörüne veya hedef yazılımın yanına yerleştirilmiş harici BIOS dosyaları (saturn_bios.bin ve stvbios.zip) gerektirir. düzgün çalışması için.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\n\nMesen, tonlarca kartuş haritalayıcı (garip, yetkisiz kartlar için kullanılanlar bile), özel renk paletleri ve HD varlık paketleri için desteği olan son derece hassas ve özellik dolu bir emülatördür. Bir libretro çekirdeği olarak Mesen, yumuşak eşleştirme ve başarılar (RetroAchievements servisi aracılığıyla) gibi birçok gelişmiş özelliği destekler.", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\n\nMesen S, son derece hassas ve özellik dolu bir 16bit konsol emülatörüdür. Dönemin birçok oyunda kullanılan eklenti yongaları ile yüksek uyumluluk sağlarken, aynı zamanda yüksek performansı da korur. Bir libretro çekirdek olarak Mesen S, yumuşak eşleştirme ve başarılar (RetroAchievements hizmeti aracılığıyla) gibi birçok gelişmiş özelliği destekler.", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\n\nmGBA, en bilinen ve sevilen el konsollarından biri için hızlı, doğru bir emülatördür ve sevdiğimiz 8 ve 16 bit şeklindeki oyunların büyük kütüphanesiyle uyumluluğa sahiptir. Hız ve sadık reprodüksiyon taahhüdünün yanı sıra, mGBA ayrıca orijinal olarak gri tonlamalı oyunlar için özel paletler için destek ve bunları içeren oyunlar için sınırlar görüntüleme de dahil olmak üzere bir ton harika geliştirme özelliğine sahiptir.\n\nBu DLC, mGBA'nın, klasik başlıklarla bile modern bir oyun deneyimi sağlamak için gerçek zamanlı geri sarma, kapsamlı işlem sonrası gölgelendiriciler ve düşük gecikme girişi dahil olmak üzere tüm geliştirmelerini ve özelliklerini ekleyen RetroArch ile çalışmasına izin verir.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\n\nPCSX ReARMed, PCSX-Reloaded, PCSX-df ve tabii ki orijinal PCSX'i içeren uzun bir emülatör serisinin bir parçasıdır. Bu özel çatal aslında ARM CPU'lu cihazlar için yoğun bir şekilde uyumluluğu sağlandı, ve tipik PC donanımında da iyi çalışması için birkaç şey ekledik.\n\nBir libretro çekirdeği olarak, bu DLC, PCSX ReARMed emülatörüyle uyumlu oyunları ve yazılımı çalıştırmak için bir çekirdek olarak yüklenebileceği RetroArch arabirimini gerektirir. Bu çekirdek, düzgün çalışması için yazılımın her bölgesi için RetroArch'ın \"sistem\" dizinine yerleştirilmek üzere bir BIOS görüntüsü (dahil değildir) gerektirir.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\n\nSameBoy, diğer emülatörlerin tökezlemesine neden olan birkaç oyunu başarıyla çalıştırdığı bilinen son derece hassas bir emülatördür. Bu yüksek doğruluğa ek olarak SameBoy, oyunun hangi model için tasarlandığına bakılmaksızın hangi cihaz modelini taklit edeceğini seçme yeteneği, kullanıcı tarafından seçilebilir renklendirme paletleri, dahili HLE BIOS'u ve sınırları yükleme yeteneği gibi bazı güzel özelliklere de sahiptir, bu özellikleri destekleyen oyunlarda iyi bir iş çıkarır.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\n\nStella, 1970'lerin ve 80'lerin en bilinen ve etkili ev video oyun konsollarından biri için ücretsiz, açık kaynaklı bir emülatördür. Bu emülatör başlangıçta GNU/Linux işletim sisteminde kullanılmak üzere geliştirildi, ancak zaman içinde RetroArch oyun ve çoklu ortam sistemi üzerinden oynamasına izin veren libretro da dahil olmak üzere birçok farklı platforma taşındı.\n\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\n\nSon birkaç yıl içinde, Stella geliştirme ekibi, Stella'nın hedef konsolunun birçok tuhaflığını taklit etmek için büyük adımlar attı ve bu da taklit edilmesi zor birçok oyun, ev tipi yazılımı ve tanıtımlarla uyumlu hale geldi.\n\nRetroArch ile, gerçek zamanlı geri sarma ve RetroAchievements desteğinin yanı sıra RetroArch'ın CRT ekran emülasyonu ve daha fazlası için sınıfının en iyi gölgelendiricileri ile bu klasik emülatöre modern bir dokunuş getirebilirsiniz.", + "requirements": "İşlemci: Intel Pentium 4 ve üzeri (SSE2 komut setini destekleyen işlemci gereklidir) \nÖnerilen işlemci: Intel Core serisi veya AMD eşdeğeri \nGörüntü işlemcisi: OpenGL 2.x veya Direct3D11 uyumlu herhangi bir görüntü işlemcisi. Gölgelendiricilerin düzgün çalışması için, en düşük Shader Model 2.0 desteklemeli. \nÖnerilen görüntü işlemcisi: Intel: OpenGL için en az Intel HD 4K gereklidir, Direct3D 11 için herangi uyumlu bir D3D11 görüntü işlemcisi. En düşük Shader Model 3.0 and/or 4.0 desteklemeli. \nEk notlar: OpenGL için: Windows 10'da Intel HD 2K/3K görüntü işlemcileri OpenGL 1.1 sürücüsüne düşmek zorundalar.", + "legal-limits": "RetroArch, GNU GPL 3.0 lisansı altında bulunan ücretsiz/açık kaynaklı bir yazılımdır. \nÜçüncü taraflarca telif hakkıyla korunan materyal içermez. RetroArch korsanlığı hiçbir yolla, şekilde veya biçimde desteklemez." +} diff --git a/intl/steam_uk.json b/intl/steam_uk.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_uk.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_us.json b/intl/steam_us.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_us.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/intl/steam_vn.json b/intl/steam_vn.json new file mode 100644 index 0000000000..cccdecb8a6 --- /dev/null +++ b/intl/steam_vn.json @@ -0,0 +1,14 @@ +{ + "main-desc": "RetroArch is an open source and cross platform frontend/framework for emulators, game engines, video games, media players and other applications.\n\nWhile it can do many things besides this, it is most widely known for enabling you to run classic games on a wide range of computers and consoles through a slick graphical interface. Settings are also unified so configuration is done once and for all.\n\nIn addition to this, you will soon be able to run original game discs (CDs) from RetroArch. We take videogame preservation seriously and want to ensure you can run your originally bought content on modern day PCs.\n\nRetroArch has advanced features like shaders, netplay, rewinding, next-frame response times, runahead, and more!", + "final-burn-neo-desc": "[img]{STEAM_APP_IMAGE}/extras/FBN_a2.png[/img]\r\n\r\nFinal Burn Neo (aka FBNeo) is the new official branch of the Final Burn Alpha emulator, which is compatible with hundreds of arcade and console games. The libretro core of FBNeo brings its library of compatible titles to RetroArch, where the core's tight integration with the libretro API allows it to work with RetroArch's advanced time-bending features like rollback-based netplay and runahead latency reduction. It includes input presets for automatic mapping of buttons for different games, including fighting game layouts for both modern and old-school arcade controls (aka fightsticks).", + "genesis-plus-gx-desc": "[img]{STEAM_APP_IMAGE}/extras/Genesis_Plus_GX_(Phone).png[/img]\r\n\r\nGenesis Plus GX began as a homebrew port of the Genesis Plus emulator for a hacked console before being ported to libretro. With a focus on speed, accuracy and portability, Genesis Plus GX now appears on a variety of platforms and frontends, and is known as one of the most capable and compatible emulators for the consoles it covers, with support for both cartridge and CD-ROM games. It also works well with many of RetroArch's advanced features, such as real-time rewind, runahead latency reduction, cheats and RetroAchievements.", + "kronos-desc": "[img]{STEAM_APP_IMAGE}/extras/main.png[/img]\r\n\r\nKronos is a modern fork of the UoYabause emulator, which is itself a fork of the venerable Yabause emulator. This DLC provides the Kronos-libretro core for use with the RetroArch gaming and multimedia interface, allowing users to load software that is compatible with the Kronos emulator.\r\n\r\nKronos utilizes modern OpenGL capabilities to provide a variety of extra graphical features, such as increased internal resolution, so an up-to-date and reasonably powerful GPU is recommended.\r\n\r\nKronos supports loading games from many different formats, including ISO, BIN/CUE and the compressed CHD format, and it requires external BIOS files (saturn_bios.bin and stvbios.zip) placed either in RetroArch's \"system\" folder or alongside the target software in order to function correctly.", + "mesen-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img]\r\n\r\nMesen is a highly accurate and feature-filled emulator with support for tons of cartridge mappers (even ones used for weird, unauthorized carts), custom color palettes and HD asset packs. As a libretro core, Mesen supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mesen-s-desc": "[img]{STEAM_APP_IMAGE}/extras/mesen2.png[/img][img]{STEAM_APP_IMAGE}/extras/-S2.png[/img]\r\n\r\nMesen S is a highly accurate and feature-filled 16bit console emulator. It has high compatibility, with support for the add-on chips used in many games of the era, while also maintaining high performance. As a libretro core, Mesen S supports many advanced features, like softpatching and achievements (through the RetroAchievements service).", + "mgba-desc": "[img]{STEAM_APP_IMAGE}/extras/mgba.png[/img]\r\n\r\nmGBA is a fast, accurate emulator for one of the most popular and well-loved handheld consoles, and it has compatibility with huge library of beloved 8- and 16-bit style games. On top of the commitment to speed and faithful reproduction, mGBA also has a ton of great enhancement features, including support for custom palettes for games that were originally grayscale and displaying borders for games that include them.\r\n\r\nThis DLC allows mGBA to run through RetroArch, which adds all of its enhancements and features, including real-time rewind, extensive post-processing shaders and low-latency input to provide a modern gaming experience even with classic titles.", + "pcsx-rearmed-desc": "[img]{STEAM_APP_IMAGE}/extras/PCSX.png[/img]\r\n\r\nPCSX ReARMed is part of a long line of emulators that includes PCSX-Reloaded, PCSX-df and, of course, the original PCSX. This particular fork was originally heavily optimized for devices with ARM CPUs, hence the name, but we've added back in quite a few things to make it work well on typical PC hardware, as well.\r\n\r\nAs a libretro core, this DLC requires the RetroArch interface, where it can be loaded as a core to run games and software that are compatible with the PCSX ReARMed emulator. This core requires a BIOS image (not included) for each region of the software to be placed in RetroArch's \"system\" directory in order to function properly.", + "sameboy-desc": "[img]{STEAM_APP_IMAGE}/extras/SAMEBOY_(Phone).png[/img]\r\nSameBoy is a highly accurate emulator known for successfully running a few games that cause other emulators to stumble. In addition to this high accuracy, SameBoy also sports some nice features like the ability to pick which device model to emulate regardless of what model the game is designed for, user-selectable colorization palettes, built-in HLE BIOS and the ability to load borders on the games that support them.", + "stella-desc": "[img]{STEAM_APP_IMAGE}/extras/stealla.png[/img]\r\n\r\nStella is a free, open-source emulator for one of the most popular and influential home video game consoles of the 1970s and '80s. This emulator was originally developed for use on the GNU/Linux operating system but has, over time, been ported to many different platforms, including libretro, which allows it to play through the RetroArch gaming and multimedia system.\r\n\r\n[img]{STEAM_APP_IMAGE}/extras/2600.png[/img]\r\n\r\nOver the past couple of years, the Stella development team has made great strides in mimicking the many quirks of Stella's target console, making it compatible with many difficult-to-emulate games, homebrew software and demos.\r\n\r\nThrough RetroArch, you can bring a modern touch to this classic emulator, with support for real-time rewind and RetroAchievements, as well as RetroArch's best-in-class shaders for CRT display emulation and more.", + "requirements": "CPU: Intel Pentium 4 and up (CPU with SSE2 instructions required) \nCPU-recommended:Intel Core series or AMD equivalent \nGraphics: Any compliant OpenGL 2.x or Direct3D11 GPU. For shaders to work properly, should support at least Shader Model 2.0. \nGraphics-recommended: Intel: At least Intel HD 4K required for OpenGL, any compliant D3D11 GPU for Direct3D 11. Should support at least Shader Model 3.0 and/or 4.0. \nAdditional notes: For OpenGL: Intel HD 2K/3K GPUs on Windows 10 will have to fall back to an OpenGL 1.1 driver.", + "legal-limits": "RetroArch is free/open source software, available under the GNU GPL 3.0 license. \nIt does not contain any copyrighted material by third parties. RetroArch does not condone piracy in any way, shape or form." +} diff --git a/libretro-common/audio/audio_mix.c b/libretro-common/audio/audio_mix.c index 023b141522..74dad087ee 100644 --- a/libretro-common/audio/audio_mix.c +++ b/libretro-common/audio/audio_mix.c @@ -82,12 +82,14 @@ void audio_mix_free_chunk(audio_chunk_t *chunk) if (!chunk) return; +#ifdef HAVE_RWAV if (chunk->rwav && chunk->rwav->samples) { /* rwav_free only frees the samples */ rwav_free(chunk->rwav); free(chunk->rwav); } +#endif if (chunk->buf) free(chunk->buf); @@ -112,24 +114,44 @@ void audio_mix_free_chunk(audio_chunk_t *chunk) audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) { +#ifdef HAVE_RWAV int sample_size; - int64_t len = 0; - void *buf = NULL; - audio_chunk_t *chunk = (audio_chunk_t*)calloc(1, sizeof(*chunk)); + int64_t len = 0; + void *buf = NULL; + audio_chunk_t *chunk = (audio_chunk_t*)malloc(sizeof(*chunk)); if (!chunk) return NULL; + chunk->buf = NULL; + chunk->upsample_buf = NULL; + chunk->float_buf = NULL; + chunk->float_resample_buf = NULL; + chunk->resample_buf = NULL; + chunk->len = 0; + chunk->resample_len = 0; + chunk->rwav = (rwav_t*)malloc(sizeof(rwav_t)); + chunk->sample_rate = sample_rate; + chunk->resample = false; + chunk->resampler = NULL; + chunk->resampler_data = NULL; + chunk->ratio = 0.00f; + + chunk->rwav->bitspersample = 0; + chunk->rwav->numchannels = 0; + chunk->rwav->samplerate = 0; + chunk->rwav->numsamples = 0; + chunk->rwav->subchunk2size = 0; + chunk->rwav->samples = NULL; + if (!filestream_read_file(path, &buf, &len)) { printf("Could not open WAV file for reading.\n"); goto error; } - chunk->sample_rate = sample_rate; - chunk->buf = buf; - chunk->len = len; - chunk->rwav = (rwav_t*)malloc(sizeof(rwav_t)); + chunk->buf = buf; + chunk->len = len; if (rwav_load(chunk->rwav, chunk->buf, chunk->len) == RWAV_ITERATE_ERROR) { @@ -139,28 +161,42 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) /* numsamples does not know or care about * multiple channels, but we need space for 2 */ - chunk->upsample_buf = (int16_t*)memalign_alloc(128, + chunk->upsample_buf = (int16_t*)memalign_alloc(128, chunk->rwav->numsamples * 2 * sizeof(int16_t)); - sample_size = chunk->rwav->bitspersample / 8; + sample_size = chunk->rwav->bitspersample / 8; if (sample_size == 1) { unsigned i; - for (i = 0; i < chunk->rwav->numsamples; i++) - { - uint8_t *sample = ( - (uint8_t*)chunk->rwav->samples) + - (i * chunk->rwav->numchannels); + if (chunk->rwav->numchannels == 1) + { + for (i = 0; i < chunk->rwav->numsamples; i++) + { + uint8_t *sample = ( + (uint8_t*)chunk->rwav->samples) + i; - chunk->upsample_buf[i * 2] = (int16_t)((sample[0] - 128) << 8); + chunk->upsample_buf[i * 2] = + (int16_t)((sample[0] - 128) << 8); + chunk->upsample_buf[(i * 2) + 1] = + (int16_t)((sample[0] - 128) << 8); + } + } + else if (chunk->rwav->numchannels == 2) + { + for (i = 0; i < chunk->rwav->numsamples; i++) + { + uint8_t *sample = ( + (uint8_t*)chunk->rwav->samples) + + (i * 2); - if (chunk->rwav->numchannels == 1) - chunk->upsample_buf[(i * 2) + 1] = (int16_t)((sample[0] - 128) << 8); - else if (chunk->rwav->numchannels == 2) - chunk->upsample_buf[(i * 2) + 1] = (int16_t)((sample[1] - 128) << 8); - } + chunk->upsample_buf[i * 2] = + (int16_t)((sample[0] - 128) << 8); + chunk->upsample_buf[(i * 2) + 1] = + (int16_t)((sample[1] - 128) << 8); + } + } } else if (sample_size == 2) { @@ -170,14 +206,16 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) for (i = 0; i < chunk->rwav->numsamples; i++) { - int16_t sample = ((int16_t*)chunk->rwav->samples)[i]; + int16_t sample = ((int16_t*) + chunk->rwav->samples)[i]; chunk->upsample_buf[i * 2] = sample; chunk->upsample_buf[(i * 2) + 1] = sample; } } else if (chunk->rwav->numchannels == 2) - memcpy(chunk->upsample_buf, chunk->rwav->samples, chunk->rwav->subchunk2size); + memcpy(chunk->upsample_buf, chunk->rwav->samples, + chunk->rwav->subchunk2size); } else if (sample_size != 2) { @@ -189,7 +227,7 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) if (sample_rate != (int)chunk->rwav->samplerate) { chunk->resample = true; - chunk->ratio = (double)sample_rate / chunk->rwav->samplerate; + chunk->ratio = (double)sample_rate / chunk->rwav->samplerate; retro_resampler_realloc(&chunk->resampler_data, &chunk->resampler, @@ -201,12 +239,18 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) { struct resampler_data info; - chunk->float_buf = (float*)memalign_alloc(128, chunk->rwav->numsamples * 2 * chunk->ratio * sizeof(float)); + chunk->float_buf = (float*)memalign_alloc(128, + chunk->rwav->numsamples * 2 * + chunk->ratio * sizeof(float)); - /* why is *3 needed instead of just *2? does the sinc driver require more space than we know about? */ - chunk->float_resample_buf = (float*)memalign_alloc(128, chunk->rwav->numsamples * 3 * chunk->ratio * sizeof(float)); + /* why is *3 needed instead of just *2? Does the + * sinc driver require more space than we know about? */ + chunk->float_resample_buf = (float*)memalign_alloc(128, + chunk->rwav->numsamples * 3 * + chunk->ratio * sizeof(float)); - convert_s16_to_float(chunk->float_buf, chunk->upsample_buf, chunk->rwav->numsamples * 2, 1.0); + convert_s16_to_float(chunk->float_buf, + chunk->upsample_buf, chunk->rwav->numsamples * 2, 1.0); info.data_in = (const float*)chunk->float_buf; info.data_out = chunk->float_resample_buf; @@ -218,10 +262,13 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) chunk->resampler->process(chunk->resampler_data, &info); - /* number of output_frames does not increase with multiple channels, but assume we need space for 2 */ - chunk->resample_buf = (int16_t*)memalign_alloc(128, info.output_frames * 2 * sizeof(int16_t)); + /* number of output_frames does not increase with + * multiple channels, but assume we need space for 2 */ + chunk->resample_buf = (int16_t*)memalign_alloc(128, + info.output_frames * 2 * sizeof(int16_t)); chunk->resample_len = info.output_frames; - convert_float_to_s16(chunk->resample_buf, chunk->float_resample_buf, info.output_frames * 2); + convert_float_to_s16(chunk->resample_buf, + chunk->float_resample_buf, info.output_frames * 2); } } @@ -229,6 +276,7 @@ audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate) error: audio_mix_free_chunk(chunk); +#endif return NULL; } @@ -237,12 +285,14 @@ size_t audio_mix_get_chunk_num_samples(audio_chunk_t *chunk) if (!chunk) return 0; +#ifdef HAVE_RWAV if (chunk->rwav) { if (chunk->resample) return chunk->resample_len; return chunk->rwav->numsamples; } +#endif /* no other filetypes supported yet */ return 0; @@ -258,11 +308,13 @@ size_t audio_mix_get_chunk_num_samples(audio_chunk_t *chunk) * * Returns: A signed 16-bit audio sample. **/ -int16_t audio_mix_get_chunk_sample(audio_chunk_t *chunk, unsigned channel, size_t index) +int16_t audio_mix_get_chunk_sample(audio_chunk_t *chunk, + unsigned channel, size_t index) { if (!chunk) return 0; +#ifdef HAVE_RWAV if (chunk->rwav) { int sample_size = chunk->rwav->bitspersample / 8; @@ -273,15 +325,18 @@ int16_t audio_mix_get_chunk_sample(audio_chunk_t *chunk, unsigned channel, size_ if (chunk->resample) sample = (uint8_t*)chunk->resample_buf + - (sample_size * index * chunk->rwav->numchannels) + (channel * sample_size); + (sample_size * index * chunk->rwav->numchannels) + + (channel * sample_size); else sample = (uint8_t*)chunk->upsample_buf + - (sample_size * index * chunk->rwav->numchannels) + (channel * sample_size); + (sample_size * index * chunk->rwav->numchannels) + + (channel * sample_size); sample_out = (int16_t)*sample; return sample_out; } +#endif /* no other filetypes supported yet */ return 0; @@ -292,6 +347,7 @@ int16_t* audio_mix_get_chunk_samples(audio_chunk_t *chunk) if (!chunk) return 0; +#ifdef HAVE_RWAV if (chunk->rwav) { int16_t *sample; @@ -303,6 +359,7 @@ int16_t* audio_mix_get_chunk_samples(audio_chunk_t *chunk) return sample; } +#endif return NULL; } @@ -312,8 +369,10 @@ int audio_mix_get_chunk_num_channels(audio_chunk_t *chunk) if (!chunk) return 0; +#ifdef HAVE_RWAV if (chunk->rwav) return chunk->rwav->numchannels; +#endif /* don't support other formats yet */ return 0; diff --git a/libretro-common/audio/audio_mixer.c b/libretro-common/audio/audio_mixer.c index 54c0119bfa..1f07e434a9 100644 --- a/libretro-common/audio/audio_mixer.c +++ b/libretro-common/audio/audio_mixer.c @@ -23,7 +23,9 @@ #include