mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-14 06:18:34 +00:00
Merge branch 'master' into gblues/hid
This commit is contained in:
commit
fb5b31faf3
4
.vscode/c_cpp_properties.json
vendored
4
.vscode/c_cpp_properties.json
vendored
@ -66,7 +66,9 @@
|
||||
],
|
||||
"limitSymbolsToIncludedHeaders": true,
|
||||
"databaseFilename": ""
|
||||
}
|
||||
},
|
||||
"cStandard": "c11",
|
||||
"cppStandard": "c++17"
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32",
|
||||
|
21
.vscode/launch.json
vendored
21
.vscode/launch.json
vendored
@ -5,15 +5,15 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "msys2-mingw64 debug",
|
||||
"name": "(gdb) Launch",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"args": [],
|
||||
"args": ["-v"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
@ -25,17 +25,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "msys2-mingw32 debug",
|
||||
"name": "(gdb) Attach",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"request": "attach",
|
||||
"program": "${workspaceFolder}/retroarch.exe",
|
||||
"args": [],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}",
|
||||
"environment": [],
|
||||
"externalConsole": true,
|
||||
"processId": "${command:pickProcess}",
|
||||
"MIMode": "gdb",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw32\\bin\\gdb.exe",
|
||||
"miDebuggerPath": "c:\\msys64\\mingw64\\bin\\gdb.exe",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
@ -43,6 +39,7 @@
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
]
|
||||
}
|
1
.vscode/settings.json
vendored
1
.vscode/settings.json
vendored
@ -14,4 +14,5 @@
|
||||
"*.in": "c",
|
||||
"*.rh": "c"
|
||||
},
|
||||
"C_Cpp.dimInactiveRegions": false,
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
# 1.7.2 (future)
|
||||
- ANDROID/OPENSL: Prevent crashes when setting audio latency too low (buffer count can never be lower than 2 now).
|
||||
- COMMON: Hide the 'Core delete' option if the 'Core updater' is also hidden.
|
||||
- COMMON: Add way to reset core association for playlist entry.
|
||||
- COMMON: Fix invalid long command line options causing infinite loop on Windows
|
||||
- COMMON: Add OSD statistics for video/audio/core.
|
||||
@ -77,9 +78,8 @@
|
||||
- LOCALIZATION: Update Spanish translation.
|
||||
- NETPLAY: Add menu option to select different MITM (relay) server locations.
|
||||
- OSX: Modify HID buttons detection algorithm.
|
||||
- QB: Added --datarootdir.
|
||||
- QB: Added --bindir and --mandir and deprecated --with-bin_dir and --with-man_dir.
|
||||
- QB: Added --docdir.
|
||||
- QB: Added --datarootdir, --sysconfdir, --bindir, --docdir and --mandir.
|
||||
- QB: Deprecated --global-config-dir, --with-bin_dir and --with-man_dir.
|
||||
- SHADERS: Allow saving of shader presets based on the parent directory (Saving one for */foo/bar/mario.sfc* would result in *shaders/presets/corename/bar.ext*). We decided it's safer to still isolate the presets to a single core because different cores may treat video output differently.
|
||||
- SHADERS: Don't save the path to the current preset to the main config. This was causing weird behavior, instead it will try to load *currentconfig.ext* and it will save a preset with that name when select *apply shader preset*. The resulting shader will restore properly after restarting and even after core/parent/game specific presets are loaded
|
||||
- SOLARIS: Initial port.
|
||||
|
4
Makefile
4
Makefile
@ -46,7 +46,7 @@ endif
|
||||
include Makefile.common
|
||||
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang"),1)
|
||||
DEFINES += -Wno-invalid-source-encoding
|
||||
DEFINES += -Wno-invalid-source-encoding -Wno-incompatible-ms-struct
|
||||
endif
|
||||
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep -c "tcc"),1)
|
||||
@ -133,7 +133,7 @@ RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
ifneq ($(X86),)
|
||||
CFLAGS += -m32
|
||||
CXXLAGS += -m32
|
||||
CXXFLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
endif
|
||||
|
||||
|
@ -199,6 +199,7 @@ OBJ += frontend/frontend.o \
|
||||
audio/audio_driver.o \
|
||||
$(LIBRETRO_COMM_DIR)/audio/audio_mixer.o \
|
||||
input/input_driver.o \
|
||||
input/input_mapper.o \
|
||||
led/led_driver.o \
|
||||
led/drivers/led_null.o \
|
||||
gfx/video_coord_array.o \
|
||||
@ -1472,7 +1473,7 @@ ifeq ($(HAVE_ZLIB), 1)
|
||||
ifeq ($(HAVE_BUILTINZLIB), 1)
|
||||
OBJ += $(DEPS_DIR)/libz/adler32.o \
|
||||
$(DEPS_DIR)/libz/compress.o \
|
||||
$(DEPS_DIR)/libz/crc32.o \
|
||||
$(DEPS_DIR)/libz/libz-crc32.o \
|
||||
$(DEPS_DIR)/libz/deflate.o \
|
||||
$(DEPS_DIR)/libz/gzclose.o \
|
||||
$(DEPS_DIR)/libz/gzlib.o \
|
||||
@ -1605,10 +1606,6 @@ ifeq ($(HAVE_NETWORKING), 1)
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_KEYMAPPER), 1)
|
||||
OBJ += input/input_mapper.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_NETWORKGAMEPAD), 1)
|
||||
OBJ += input/input_remote.o \
|
||||
cores/libretro-net-retropad/net_retropad_core.o
|
||||
|
@ -178,6 +178,7 @@ else ifeq ($(libogc_platform), 1)
|
||||
|
||||
CFLAGS += -DGEKKO -U__INT32_TYPE__ -U __UINT32_TYPE__ -D__INT32_TYPE__=int
|
||||
|
||||
HAVE_RUNAHEAD := 1
|
||||
HAVE_FILTERS_BUILTIN := 1
|
||||
HAVE_THREADS := 1
|
||||
HAVE_RPNG := 1
|
||||
@ -840,6 +841,10 @@ ifeq ($(HAVE_IMAGEVIEWER), 1)
|
||||
CFLAGS += -DHAVE_IMAGEVIEWER
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD), 1)
|
||||
CFLAGS += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_7ZIP), 1)
|
||||
CFLAGS += -DHAVE_7ZIP
|
||||
endif
|
||||
|
@ -53,7 +53,6 @@ HAVE_NETWORK_CMD := 1
|
||||
HAVE_OVERLAY := 1
|
||||
HAVE_LANGEXTRA := 1
|
||||
HAVE_CHEEVOS := 1
|
||||
HAVE_KEYMAPPER := 1
|
||||
HAVE_SHADERPIPELINE := 1
|
||||
HAVE_IMAGEVIEWER := 1
|
||||
|
||||
|
@ -4,7 +4,7 @@ include version.all
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
CELL_PSGL_VERSION = opt
|
||||
|
||||
ASSETS_DIR := media/assets
|
||||
|
||||
@ -63,7 +63,7 @@ endif
|
||||
|
||||
PPU_SRCS = griffin/griffin.c
|
||||
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT
|
||||
DEFINES += -DHAVE_MENU -DHAVE_RGUI -DHAVE_XMB -DHAVE_LIBRETRODB -DHAVE_MATERIALUI -DHAVE_SHADERPIPELINE -DRARCH_INTERNAL -DMSB_FIRST -DHAVE_OVERLAY -DHAVE_CC_RESAMPLER -DHAVE_STB_VORBIS -DHAVE_STB_FONT -DHAVE_RUNAHEAD
|
||||
|
||||
ifeq ($(DEX_BUILD), 1)
|
||||
DEFINES += -DDEX_BUILD
|
||||
@ -119,7 +119,7 @@ DEFINES += -DHAVE_THREADS -DRARCH_CONSOLE -DHAVE_OPENGL -DHAVE_HEADSET -DHAVE_LA
|
||||
ifeq ($(DEBUG), 1)
|
||||
PPU_OPTIMIZE_LV := -O0 -g
|
||||
else
|
||||
PPU_OPTIMIZE_LV := -O3 -g
|
||||
PPU_OPTIMIZE_LV := -O2 -g
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_LOGGER), 1)
|
||||
|
@ -2,7 +2,7 @@ include version.all
|
||||
|
||||
#which compiler to build with - GCC or SNC
|
||||
#set to GCC for debug builds for use with debugger
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_GPU_TYPE = RSX
|
||||
CELL_PSGL_VERSION = ultra-opt
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
CELL_BUILD_TOOLS = SNC
|
||||
CELL_BUILD_TOOLS = GCC
|
||||
CELL_SDK ?= /usr/local/cell
|
||||
HAVE_LOGGER = 0
|
||||
CELL_MK_DIR ?= $(CELL_SDK)/samples/mk
|
||||
|
@ -16,7 +16,7 @@ DEFINES :=
|
||||
ifeq ($(GRIFFIN_BUILD), 1)
|
||||
OBJ += griffin/griffin.o
|
||||
DEFINES += -DHAVE_GRIFFIN=1
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB
|
||||
DEFINES += -DHAVE_NEON -DHAVE_MENU -DHAVE_XMB -DHAVE_MATERIALUI -DHAVE_LIBRETRODB DEFINES -DHAVE_KEYMAPPER
|
||||
DEFINES += -DHAVE_ZLIB -DHAVE_RPNG -DHAVE_RJPEG -DHAVE_RBMP -DHAVE_RTGA -DWANT_ZLIB -DHAVE_CC_RESAMPLER
|
||||
ifeq ($(DEBUG), 1)
|
||||
DEFINES += -DHAVE_NETLOGGER
|
||||
|
@ -7,6 +7,7 @@ GRIFFIN_BUILD = 0
|
||||
SALAMANDER_BUILD = 0
|
||||
WHOLE_ARCHIVE_LINK = 0
|
||||
WIIU_HID = 1
|
||||
HAVE_RUNAHEAD = 1
|
||||
WIIU_LOG_RPX = 0
|
||||
BUILD_DIR = objs/wiiu
|
||||
PC_DEVELOPMENT_IP_ADDRESS ?=
|
||||
@ -94,6 +95,10 @@ else
|
||||
DEFINES += -DHAVE_SLANG
|
||||
DEFINES += -DHAVE_SHADERPIPELINE
|
||||
|
||||
ifeq ($(HAVE_RUNAHEAD),1)
|
||||
DEFINES += -DHAVE_RUNAHEAD
|
||||
endif
|
||||
|
||||
OBJ += wiiu/system/missing_libc_functions.o
|
||||
OBJ += wiiu/shader_utils.o
|
||||
OBJ += gfx/drivers/gx2_shaders/tex.o
|
||||
@ -126,7 +131,6 @@ else
|
||||
HAVE_ZLIB = 1
|
||||
HAVE_7ZIP = 1
|
||||
HAVE_BUILTINZLIB = 1
|
||||
HAVE_KEYMAPPER = 1
|
||||
HAVE_LIBRETRODB = 1
|
||||
HAVE_ZARCH = 0
|
||||
HAVE_MATERIALUI = 1
|
||||
|
@ -213,7 +213,7 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
||||
if (!stats || samples < 3)
|
||||
return false;
|
||||
|
||||
stats->samples = audio_driver_free_samples_count;
|
||||
stats->samples = (unsigned)audio_driver_free_samples_count;
|
||||
|
||||
#ifdef WARPUP
|
||||
/* uint64 to double not implemented, fair chance
|
||||
|
@ -1334,12 +1334,10 @@ static int cheevos_new_lboard(cheevos_readud_t *ud)
|
||||
|
||||
if (!ldb || !ud)
|
||||
return -1;
|
||||
|
||||
lboard = ldb + ud->lboard_count++;
|
||||
|
||||
if (!lboard)
|
||||
return -1;
|
||||
|
||||
lboard->id = strtol(ud->id.string, NULL, 10);
|
||||
lboard->id = (unsigned)strtol(ud->id.string, NULL, 10);
|
||||
lboard->format = cheevos_parse_format(&ud->format);
|
||||
lboard->title = cheevos_dupstr(&ud->title);
|
||||
lboard->description = cheevos_dupstr(&ud->desc);
|
||||
@ -3468,7 +3466,7 @@ found:
|
||||
if ((void*)coro->json)
|
||||
free((void*)coro->json);
|
||||
RARCH_LOG("[CHEEVOS]: got game id %s.\n", gameid);
|
||||
coro->gameid = strtol(gameid, NULL, 10);
|
||||
coro->gameid = (unsigned)strtol(gameid, NULL, 10);
|
||||
CORO_RET();
|
||||
}
|
||||
|
||||
@ -3733,7 +3731,7 @@ found:
|
||||
coro->json[length] = 0;
|
||||
}
|
||||
|
||||
coro->k = length;
|
||||
coro->k = (unsigned)length;
|
||||
net_http_delete(coro->http);
|
||||
net_http_connection_free(coro->conn);
|
||||
CORO_RET();
|
||||
|
21
command.c
21
command.c
@ -1708,14 +1708,8 @@ void command_playlist_update_write(
|
||||
const char *db_name)
|
||||
{
|
||||
playlist_t *plist = (playlist_t*)data;
|
||||
playlist_t *playlist = NULL;
|
||||
playlist_t *playlist = plist ? plist : playlist_get_cached();
|
||||
|
||||
if (plist)
|
||||
playlist = plist;
|
||||
#ifdef HAVE_MENU
|
||||
else
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
||||
#endif
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
@ -2202,11 +2196,22 @@ TODO: Add a setting for these tweaks */
|
||||
break;
|
||||
case CMD_EVENT_CORE_INFO_INIT:
|
||||
{
|
||||
char ext_name[255];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
ext_name[0] = '\0';
|
||||
|
||||
command_event(CMD_EVENT_CORE_INFO_DEINIT, NULL);
|
||||
|
||||
if (!frontend_driver_get_core_extension(ext_name, sizeof(ext_name)))
|
||||
return false;
|
||||
|
||||
if (!string_is_empty(settings->paths.directory_libretro))
|
||||
core_info_init_list();
|
||||
core_info_init_list(settings->paths.path_libretro_info,
|
||||
settings->paths.directory_libretro,
|
||||
ext_name,
|
||||
settings->bools.show_hidden_files
|
||||
);
|
||||
}
|
||||
break;
|
||||
case CMD_EVENT_CORE_DEINIT:
|
||||
|
@ -654,6 +654,8 @@ static const unsigned menu_thumbnails_default = 3;
|
||||
|
||||
static const unsigned menu_left_thumbnails_default = 0;
|
||||
|
||||
static const bool xmb_vertical_thumbnails = false;
|
||||
|
||||
#ifdef IOS
|
||||
static const bool ui_companion_start_on_boot = false;
|
||||
#else
|
||||
|
@ -1331,6 +1331,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#endif
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_BOOL("xmb_shadows_enable", &settings->bools.menu_xmb_shadows_enable, true, xmb_shadows_enable, false);
|
||||
SETTING_BOOL("xmb_vertical_thumbnails", &settings->bools.menu_xmb_vertical_thumbnails, true, xmb_vertical_thumbnails, false);
|
||||
#endif
|
||||
#endif
|
||||
#ifdef HAVE_CHEEVOS
|
||||
@ -1357,9 +1358,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
SETTING_BOOL("network_remote_enable", &settings->bools.network_remote_enable, false, false /* TODO */, false);
|
||||
#endif
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
SETTING_BOOL("keymapper_enable", &settings->bools.keymapper_enable, true, true /* TODO */, false);
|
||||
#endif
|
||||
#ifdef HAVE_NETWORKING
|
||||
SETTING_BOOL("netplay_nat_traversal", &settings->bools.netplay_nat_traversal, true, true, false);
|
||||
#endif
|
||||
@ -1464,9 +1462,6 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
SETTING_UINT("network_remote_base_port", &settings->uints.network_remote_base_port, true, network_remote_base_port, false);
|
||||
#endif
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
SETTING_UINT("keymapper_port", &settings->uints.keymapper_port, true, 0, false);
|
||||
#endif
|
||||
#ifdef GEKKO
|
||||
SETTING_UINT("video_viwidth", &settings->uints.video_viwidth, true, video_viwidth, false);
|
||||
#endif
|
||||
|
@ -148,6 +148,7 @@ typedef struct settings
|
||||
bool menu_show_reboot;
|
||||
bool menu_materialui_icons_enable;
|
||||
bool menu_xmb_shadows_enable;
|
||||
bool menu_xmb_vertical_thumbnails;
|
||||
bool menu_content_show_settings;
|
||||
bool menu_content_show_favorites;
|
||||
bool menu_content_show_images;
|
||||
@ -378,7 +379,7 @@ typedef struct settings
|
||||
unsigned input_libretro_device[MAX_USERS];
|
||||
unsigned input_analog_dpad_mode[MAX_USERS];
|
||||
|
||||
unsigned input_keymapper_ids[RARCH_CUSTOM_BIND_LIST_END];
|
||||
unsigned input_keymapper_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
unsigned input_remap_ids[MAX_USERS][RARCH_CUSTOM_BIND_LIST_END];
|
||||
|
||||
|
63
core_info.c
63
core_info.c
@ -17,6 +17,7 @@
|
||||
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <file/config_file.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <file/archive_file.h>
|
||||
@ -26,14 +27,10 @@
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include "retroarch.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
#include "config.def.h"
|
||||
#include "core_info.h"
|
||||
#include "configuration.h"
|
||||
#include "file_path_special.h"
|
||||
#include "list_special.h"
|
||||
|
||||
static const char *core_info_tmp_path = NULL;
|
||||
static const struct string_list *core_info_tmp_list = NULL;
|
||||
@ -224,21 +221,23 @@ static bool core_info_list_iterate(
|
||||
return true;
|
||||
}
|
||||
|
||||
static core_info_list_t *core_info_list_new(const char *path)
|
||||
static core_info_list_t *core_info_list_new(const char *path,
|
||||
const char *libretro_info_dir,
|
||||
const char *exts,
|
||||
bool show_hidden_files)
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *core_info = NULL;
|
||||
core_info_list_t *core_info_list = NULL;
|
||||
struct string_list *contents = dir_list_new_special(
|
||||
path, DIR_LIST_CORES, NULL);
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *path_basedir = !string_is_empty(settings->paths.path_libretro_info) ?
|
||||
settings->paths.path_libretro_info : settings->paths.directory_libretro;
|
||||
|
||||
const char *path_basedir = libretro_info_dir;
|
||||
struct string_list *contents = dir_list_new(
|
||||
path, exts,
|
||||
false,
|
||||
show_hidden_files,
|
||||
false, false);
|
||||
if (!contents)
|
||||
return NULL;
|
||||
|
||||
|
||||
core_info_list = (core_info_list_t*)calloc(1, sizeof(*core_info_list));
|
||||
if (!core_info_list)
|
||||
goto error;
|
||||
@ -518,7 +517,8 @@ static core_info_t *core_info_find_internal(
|
||||
static bool core_info_list_update_missing_firmware_internal(
|
||||
core_info_list_t *core_info_list,
|
||||
const char *core,
|
||||
const char *systemdir)
|
||||
const char *systemdir,
|
||||
bool *set_missing_bios)
|
||||
{
|
||||
size_t i;
|
||||
core_info_t *info = NULL;
|
||||
@ -535,7 +535,6 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
|
||||
path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
path[0] = '\0';
|
||||
rarch_ctl(RARCH_CTL_UNSET_MISSING_BIOS, NULL);
|
||||
|
||||
for (i = 0; i < info->firmware_count; i++)
|
||||
{
|
||||
@ -547,7 +546,7 @@ static bool core_info_list_update_missing_firmware_internal(
|
||||
info->firmware[i].missing = !filestream_exists(path);
|
||||
if (info->firmware[i].missing && !info->firmware[i].optional)
|
||||
{
|
||||
rarch_ctl(RARCH_CTL_SET_MISSING_BIOS, NULL);
|
||||
*set_missing_bios = true;
|
||||
RARCH_WARN("Firmware missing: %s\n", info->firmware[i].path);
|
||||
}
|
||||
}
|
||||
@ -635,14 +634,13 @@ void core_info_deinit_list(void)
|
||||
core_info_curr_list = NULL;
|
||||
}
|
||||
|
||||
bool core_info_init_list(void)
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings)
|
||||
core_info_curr_list = core_info_list_new(settings->paths.directory_libretro);
|
||||
|
||||
if (!core_info_curr_list)
|
||||
if (!(core_info_curr_list = core_info_list_new(dir_cores,
|
||||
!string_is_empty(path_info) ? path_info : dir_cores,
|
||||
exts,
|
||||
show_hidden_files)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@ -655,13 +653,15 @@ bool core_info_get_list(core_info_list_t **core)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info)
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool *set_missing_bios)
|
||||
{
|
||||
if (!info)
|
||||
return false;
|
||||
return core_info_list_update_missing_firmware_internal(
|
||||
core_info_curr_list,
|
||||
info->path, info->directory.system);
|
||||
info->path, info->directory.system,
|
||||
set_missing_bios);
|
||||
}
|
||||
|
||||
bool core_info_load(core_info_ctx_find_t *info)
|
||||
@ -751,16 +751,15 @@ void core_info_list_get_supported_cores(core_info_list_t *core_info_list,
|
||||
*num_infos = supported;
|
||||
}
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len)
|
||||
void core_info_get_name(const char *path, char *s, size_t len,
|
||||
const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files)
|
||||
{
|
||||
size_t i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
struct string_list *contents = dir_list_new_special(
|
||||
settings->paths.directory_libretro,
|
||||
DIR_LIST_CORES, NULL);
|
||||
const char *path_basedir = !string_is_empty(settings->paths.path_libretro_info) ?
|
||||
settings->paths.path_libretro_info : settings->paths.directory_libretro;
|
||||
|
||||
const char *path_basedir = !string_is_empty(path_info) ?
|
||||
path_info : dir_cores;
|
||||
struct string_list *contents = dir_list_new(
|
||||
dir_cores, exts, false, show_hidden_files, false, false);
|
||||
if (!contents)
|
||||
return;
|
||||
|
||||
|
10
core_info.h
10
core_info.h
@ -97,7 +97,9 @@ bool core_info_list_get_display_name(core_info_list_t *list,
|
||||
|
||||
bool core_info_get_display_name(const char *path, char *s, size_t len);
|
||||
|
||||
void core_info_get_name(const char *path, char *s, size_t len);
|
||||
void core_info_get_name(const char *path, char *s, size_t len,
|
||||
const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files);
|
||||
|
||||
core_info_t *core_info_get(core_info_list_t *list, size_t i);
|
||||
|
||||
@ -109,11 +111,13 @@ bool core_info_get_current_core(core_info_t **core);
|
||||
|
||||
void core_info_deinit_list(void);
|
||||
|
||||
bool core_info_init_list(void);
|
||||
bool core_info_init_list(const char *path_info, const char *dir_cores,
|
||||
const char *exts, bool show_hidden_files);
|
||||
|
||||
bool core_info_get_list(core_info_list_t **core);
|
||||
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info);
|
||||
bool core_info_list_update_missing_firmware(core_info_ctx_firmware_t *info,
|
||||
bool *set_missing_bios);
|
||||
|
||||
bool core_info_find(core_info_ctx_find_t *info, const char *name);
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#include <3ds.h>
|
||||
#include <sys/iosupport.h>
|
||||
#include <3ds/services/apt.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
@ -21,11 +21,13 @@
|
||||
#include <compat/strl.h>
|
||||
#include <retro_endianness.h>
|
||||
#include <file/file_path.h>
|
||||
#include <lists/string_list.h>
|
||||
#include <lists/dir_list.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "libretro-db/libretrodb.h"
|
||||
|
||||
#include "list_special.h"
|
||||
#include "core_info.h"
|
||||
#include "database_info.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
@ -366,8 +368,10 @@ static void dir_list_prioritize(struct string_list *list)
|
||||
}
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type, retro_task_t *task)
|
||||
enum database_type type, retro_task_t *task,
|
||||
bool show_hidden_files)
|
||||
{
|
||||
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));
|
||||
@ -375,7 +379,11 @@ database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
if (!db)
|
||||
return NULL;
|
||||
|
||||
list = dir_list_new_special(dir, DIR_LIST_RECURSIVE, NULL);
|
||||
core_info_get_list(&core_info_list);
|
||||
|
||||
list = dir_list_new(dir, core_info_list->all_ext,
|
||||
false, show_hidden_files,
|
||||
false, true);
|
||||
|
||||
if (!list)
|
||||
{
|
||||
|
@ -126,7 +126,8 @@ database_info_list_t *database_info_list_new(const char *rdb_path,
|
||||
void database_info_list_free(database_info_list_t *list);
|
||||
|
||||
database_info_handle_t *database_info_dir_init(const char *dir,
|
||||
enum database_type type, retro_task_t *task);
|
||||
enum database_type type, retro_task_t *task,
|
||||
bool show_hidden_files);
|
||||
|
||||
database_info_handle_t *database_info_file_init(const char *path,
|
||||
enum database_type type, retro_task_t *task);
|
||||
|
4
deps/miniupnpc/minissdpc.c
vendored
4
deps/miniupnpc/minissdpc.c
vendored
@ -145,7 +145,7 @@ getDevicesFromMiniSSDPD(const char * devtype, const char * socketpath, int * err
|
||||
if(n<=0) break; \
|
||||
bufferindex = 0; \
|
||||
} \
|
||||
lcopy = MIN(l, (n - bufferindex)); \
|
||||
lcopy = (unsigned int)MIN(l, (n - bufferindex)); \
|
||||
memcpy(p, buffer + bufferindex, lcopy); \
|
||||
l -= lcopy; \
|
||||
p += lcopy; \
|
||||
@ -584,7 +584,7 @@ ssdpDiscoverDevices(const char * const deviceTypes[],
|
||||
struct in_addr mc_if;
|
||||
memset(&mc_if, 0, sizeof(mc_if));
|
||||
mc_if.s_addr = pIPAddrTable->table[i].dwAddr;
|
||||
setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_IF, (const char *)&mc_if, sizeof(mc_if)) < 0;
|
||||
setsockopt(sudp, IPPROTO_IP, IP_MULTICAST_IF, (const char *)&mc_if, sizeof(mc_if));
|
||||
((struct sockaddr_in *)&sockudp_r)->sin_addr.s_addr = pIPAddrTable->table[i].dwAddr;
|
||||
#ifndef DEBUG
|
||||
break;
|
||||
|
5
deps/stb/stb_rect_pack.h
vendored
5
deps/stb/stb_rect_pack.h
vendored
@ -528,12 +528,7 @@ STBRP_DEF void stbrp_pack_rects(stbrp_context *context, stbrp_rect *rects, int n
|
||||
|
||||
/* we use the 'was_packed' field internally to allow sorting/unsorting */
|
||||
for (i=0; i < num_rects; ++i)
|
||||
{
|
||||
rects[i].was_packed = i;
|
||||
#ifndef STBRP_LARGE_RECTS
|
||||
STBRP_ASSERT(rects[i].w <= 0xffff && rects[i].h <= 0xffff);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* sort according to heuristic */
|
||||
STBRP_SORT(rects, num_rects, sizeof(rects[0]), rect_height_compare);
|
||||
|
2
deps/stb/stb_vorbis.h
vendored
2
deps/stb/stb_vorbis.h
vendored
@ -3278,7 +3278,7 @@ static stb_vorbis * vorbis_alloc(stb_vorbis *f)
|
||||
|
||||
unsigned int stb_vorbis_get_file_offset(stb_vorbis *f)
|
||||
{
|
||||
return f->stream - f->stream_start;
|
||||
return (unsigned int)(f->stream - f->stream_start);
|
||||
}
|
||||
|
||||
#ifndef STB_VORBIS_NO_PULLDATA_API
|
||||
|
@ -922,6 +922,7 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_D3D9) || defined(HAVE_D3D11)
|
||||
case RETRO_HW_CONTEXT_DIRECT3D:
|
||||
switch (major)
|
||||
{
|
||||
@ -936,11 +937,12 @@ static bool dynamic_request_hw_context(enum retro_hw_context_type type,
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
goto unknown;
|
||||
RARCH_LOG("Requesting unknown context.\n");
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
unknown:
|
||||
default:
|
||||
RARCH_LOG("Requesting unknown context.\n");
|
||||
return false;
|
||||
|
@ -155,7 +155,7 @@ static void frontend_win32_get_os(char *s, size_t len, int *major, int *minor)
|
||||
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
|
||||
/* Windows 2000 and later */
|
||||
SYSTEM_INFO si = {0};
|
||||
SYSTEM_INFO si = {{0}};
|
||||
OSVERSIONINFOEX vi = {0};
|
||||
vi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
|
||||
@ -359,7 +359,7 @@ enum frontend_architecture frontend_win32_get_architecture(void)
|
||||
{
|
||||
#if defined(_WIN32_WINNT) && _WIN32_WINNT >= 0x0500
|
||||
/* Windows 2000 and later */
|
||||
SYSTEM_INFO si = {0};
|
||||
SYSTEM_INFO si = {{0}};
|
||||
|
||||
GetSystemInfo(&si);
|
||||
|
||||
|
@ -206,10 +206,14 @@ bool d3d12_init_queue(d3d12_video_t* d3d12)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, HWND hwnd)
|
||||
bool d3d12_init_swapchain(d3d12_video_t* d3d12,
|
||||
int width, int height, HWND hwnd)
|
||||
{
|
||||
{
|
||||
DXGI_SWAP_CHAIN_DESC desc = { 0 };
|
||||
unsigned i;
|
||||
DXGI_SWAP_CHAIN_DESC desc;
|
||||
|
||||
memset(&desc, 0, sizeof(DXGI_SWAP_CHAIN_DESC));
|
||||
|
||||
desc.BufferCount = countof(d3d12->chain.renderTargets);
|
||||
desc.BufferDesc.Width = width;
|
||||
desc.BufferDesc.Height = height;
|
||||
@ -229,13 +233,12 @@ bool d3d12_init_swapchain(d3d12_video_t* d3d12, int width, int height, HWND hwnd
|
||||
desc.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
|
||||
#endif
|
||||
DXGICreateSwapChain(d3d12->factory, d3d12->queue.handle, &desc, &d3d12->chain.handle);
|
||||
}
|
||||
|
||||
DXGIMakeWindowAssociation(d3d12->factory, hwnd, DXGI_MWA_NO_ALT_ENTER);
|
||||
|
||||
d3d12->chain.frame_index = DXGIGetCurrentBackBufferIndex(d3d12->chain.handle);
|
||||
|
||||
for (int i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
for (i = 0; i < countof(d3d12->chain.renderTargets); i++)
|
||||
{
|
||||
DXGIGetSwapChainBuffer(d3d12->chain.handle, i, &d3d12->chain.renderTargets[i]);
|
||||
D3D12CreateRenderTargetView(
|
||||
|
@ -948,8 +948,9 @@ bool win32_suppress_screensaver(void *data, bool enable)
|
||||
#ifndef _XBOX
|
||||
if(enable)
|
||||
{
|
||||
int major, minor;
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
int major = 0;
|
||||
int minor = 0;
|
||||
const frontend_ctx_driver_t *frontend = frontend_get_ptr();
|
||||
|
||||
if (!frontend)
|
||||
|
@ -62,8 +62,6 @@ void create_gdi_context(HWND hwnd, bool *quit);
|
||||
|
||||
bool gdi_has_menu_frame(void);
|
||||
|
||||
bool win32_shader_dlg_init(void);
|
||||
void shader_dlg_show(HWND parent_hwnd);
|
||||
void shader_dlg_params_reload(void);
|
||||
#endif
|
||||
|
||||
|
@ -117,9 +117,10 @@ static void d3d11_overlay_set_alpha(void* data, unsigned index, float mod)
|
||||
|
||||
static bool d3d11_overlay_load(void* data, const void* image_data, unsigned num_images)
|
||||
{
|
||||
D3D11_BUFFER_DESC desc;
|
||||
D3D11_MAPPED_SUBRESOURCE mapped_vbo;
|
||||
int i;
|
||||
d3d11_sprite_t* sprites;
|
||||
D3D11_MAPPED_SUBRESOURCE mapped_vbo;
|
||||
d3d11_video_t* d3d11 = (d3d11_video_t*)data;
|
||||
const struct texture_image* images = (const struct texture_image*)image_data;
|
||||
|
||||
@ -128,16 +129,16 @@ static bool d3d11_overlay_load(void* data, const void* image_data, unsigned num_
|
||||
|
||||
d3d11_free_overlays(d3d11);
|
||||
d3d11->overlays.count = num_images;
|
||||
d3d11->overlays.textures = (d3d11_texture_t*)calloc(num_images, sizeof(d3d11_texture_t));
|
||||
d3d11->overlays.textures = (d3d11_texture_t*)calloc(
|
||||
num_images, sizeof(d3d11_texture_t));
|
||||
|
||||
{
|
||||
D3D11_BUFFER_DESC desc = { sizeof(d3d11_sprite_t) * num_images };
|
||||
desc.ByteWidth = sizeof(d3d11_sprite_t) * num_images;
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
|
||||
desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
desc.MiscFlags = 0;
|
||||
desc.StructureByteStride = 0;
|
||||
D3D11CreateBuffer(d3d11->device, &desc, NULL, &d3d11->overlays.vbo);
|
||||
}
|
||||
|
||||
D3D11MapBuffer(d3d11->context, d3d11->overlays.vbo, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped_vbo);
|
||||
sprites = (d3d11_sprite_t*)mapped_vbo.pData;
|
||||
@ -152,7 +153,8 @@ static bool d3d11_overlay_load(void* data, const void* image_data, unsigned num_
|
||||
d3d11_init_texture(d3d11->device, &d3d11->overlays.textures[i]);
|
||||
|
||||
d3d11_update_texture(
|
||||
d3d11->context, images[i].width, images[i].height, 0, DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
d3d11->context, images[i].width,
|
||||
images[i].height, 0, DXGI_FORMAT_B8G8R8A8_UNORM,
|
||||
images[i].pixels, &d3d11->overlays.textures[i]);
|
||||
|
||||
sprites[i].pos.x = 0.0f;
|
||||
@ -752,20 +754,23 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
d3d11_set_filtering(d3d11, 0, video->smooth);
|
||||
|
||||
{
|
||||
D3D11_BUFFER_DESC desc;
|
||||
d3d11_vertex_t vertices[] = {
|
||||
{ { 0.0f, 0.0f }, { 0.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f } },
|
||||
{ { 0.0f, 1.0f }, { 0.0f, 0.0f }, { 1.0f, 1.0f, 1.0f, 1.0f } },
|
||||
{ { 1.0f, 0.0f }, { 1.0f, 1.0f }, { 1.0f, 1.0f, 1.0f, 1.0f } },
|
||||
{ { 1.0f, 1.0f }, { 1.0f, 0.0f }, { 1.0f, 1.0f, 1.0f, 1.0f } },
|
||||
};
|
||||
D3D11_SUBRESOURCE_DATA
|
||||
vertexData = { vertices };
|
||||
|
||||
{
|
||||
D3D11_BUFFER_DESC desc = { 0 };
|
||||
desc.Usage = D3D11_USAGE_IMMUTABLE;
|
||||
desc.ByteWidth = sizeof(vertices);
|
||||
desc.Usage = D3D11_USAGE_IMMUTABLE;
|
||||
desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
|
||||
desc.CPUAccessFlags = 0;
|
||||
desc.MiscFlags = 0;
|
||||
desc.StructureByteStride = 0;
|
||||
|
||||
D3D11_SUBRESOURCE_DATA vertexData = { vertices };
|
||||
D3D11CreateBuffer(d3d11->device, &desc, &vertexData, &d3d11->frame.vbo);
|
||||
desc.Usage = D3D11_USAGE_DYNAMIC;
|
||||
desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
|
||||
@ -775,7 +780,6 @@ d3d11_gfx_init(const video_info_t* video, const input_driver_t** input, void** i
|
||||
desc.ByteWidth = sizeof(d3d11_sprite_t) * d3d11->sprites.capacity;
|
||||
D3D11CreateBuffer(d3d11->device, &desc, NULL, &d3d11->sprites.vbo);
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
D3D11_INPUT_ELEMENT_DESC desc[] = {
|
||||
|
@ -747,7 +747,7 @@ static void gl_render_osd_background(
|
||||
float *verts = (float*)malloc(2 * vertices_total * sizeof(float));
|
||||
settings_t *settings = config_get_ptr();
|
||||
int msg_width =
|
||||
font_driver_get_message_width(NULL, msg, strlen(msg), 1.0f);
|
||||
font_driver_get_message_width(NULL, msg, (unsigned)strlen(msg), 1.0f);
|
||||
|
||||
/* shader driver expects vertex coords as 0..1 */
|
||||
float x = video_info->font_msg_pos_x;
|
||||
|
@ -201,8 +201,7 @@ static void vulkan_init_pipeline_layout(
|
||||
&layout_info, NULL, &vk->pipelines.layout);
|
||||
}
|
||||
|
||||
static void vulkan_init_pipelines(
|
||||
vk_t *vk)
|
||||
static void vulkan_init_pipelines(vk_t *vk)
|
||||
{
|
||||
static const uint32_t alpha_blend_vert[] =
|
||||
#include "vulkan_shaders/alpha_blend.vert.inc"
|
||||
@ -834,7 +833,11 @@ static bool vulkan_init_filter_chain(vk_t *vk)
|
||||
|
||||
static void vulkan_init_resources(vk_t *vk)
|
||||
{
|
||||
if (!vk)
|
||||
return;
|
||||
|
||||
vk->num_swapchain_images = vk->context->num_swapchain_images;
|
||||
|
||||
vulkan_init_framebuffers(vk);
|
||||
vulkan_init_pipelines(vk);
|
||||
vulkan_init_descriptor_pool(vk);
|
||||
|
@ -423,7 +423,6 @@ static void *xv_init(const video_info_t *video,
|
||||
unsigned i;
|
||||
int ret;
|
||||
XWindowAttributes target;
|
||||
char buf[128] = {0};
|
||||
char title[128] = {0};
|
||||
XSetWindowAttributes attributes = {0};
|
||||
XVisualInfo visualtemplate = {0};
|
||||
|
@ -44,7 +44,7 @@ bool glslang_read_shader_file(const char *path, vector<string> *output, bool roo
|
||||
char tmp[PATH_MAX_LENGTH];
|
||||
char *ptr = NULL;
|
||||
char *buf = nullptr;
|
||||
ssize_t len = 0;
|
||||
int64_t len = 0;
|
||||
const char *basename = path_basename(path);
|
||||
|
||||
include_path[0] = tmp[0] = '\0';
|
||||
|
@ -1053,10 +1053,50 @@ static void gl_cg_set_program_attributes(void *data, unsigned i)
|
||||
}
|
||||
}
|
||||
|
||||
static void gl_cg_init_menu_shaders(void *data)
|
||||
{
|
||||
struct shader_program_info shader_prog_info;
|
||||
cg_shader_data_t *cg = (cg_shader_data_t*)data;
|
||||
|
||||
if (!cg)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
shader_prog_info.combined = stock_xmb_ribbon_simple;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU,
|
||||
&cg->prg[VIDEO_SHADER_MENU],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU);
|
||||
|
||||
shader_prog_info.combined = stock_xmb_ribbon_simple;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU_2,
|
||||
&cg->prg[VIDEO_SHADER_MENU_2],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU_2);
|
||||
|
||||
shader_prog_info.combined = stock_xmb_snow;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU_3,
|
||||
&cg->prg[VIDEO_SHADER_MENU_3],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU_3);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *gl_cg_init(void *data, const char *path)
|
||||
{
|
||||
unsigned i;
|
||||
struct shader_program_info shader_prog_info;
|
||||
cg_shader_data_t *cg = (cg_shader_data_t*)
|
||||
calloc(1, sizeof(cg_shader_data_t));
|
||||
|
||||
@ -1129,37 +1169,6 @@ static void *gl_cg_init(void *data, const char *path)
|
||||
|
||||
gl_cg_set_shaders(cg->prg[1].fprg, cg->prg[1].vprg);
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
shader_prog_info.combined = stock_xmb_ribbon_simple;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU,
|
||||
&cg->prg[VIDEO_SHADER_MENU],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU);
|
||||
|
||||
shader_prog_info.combined = stock_xmb_ribbon_simple;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU_2,
|
||||
&cg->prg[VIDEO_SHADER_MENU_2],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU_2);
|
||||
|
||||
shader_prog_info.combined = stock_xmb_snow;
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_cg_compile_program(
|
||||
cg,
|
||||
VIDEO_SHADER_MENU_3,
|
||||
&cg->prg[VIDEO_SHADER_MENU_3],
|
||||
&shader_prog_info);
|
||||
gl_cg_set_program_base_attrib(cg, VIDEO_SHADER_MENU_3);
|
||||
#endif
|
||||
|
||||
gl_cg_reset_attrib(cg);
|
||||
|
||||
@ -1271,6 +1280,7 @@ static struct video_shader *gl_cg_get_current_shader(void *data)
|
||||
|
||||
const shader_backend_t gl_cg_backend = {
|
||||
gl_cg_init,
|
||||
gl_cg_init_menu_shaders,
|
||||
gl_cg_deinit,
|
||||
gl_cg_set_params,
|
||||
gl_cg_set_uniform_parameter,
|
||||
|
@ -493,8 +493,8 @@ static void gl_glsl_strip_parameter_pragmas(char *source)
|
||||
static bool gl_glsl_load_source_path(struct video_shader_pass *pass,
|
||||
const char *path)
|
||||
{
|
||||
ssize_t len;
|
||||
int nitems = pass ? filestream_read_file(path,
|
||||
int64_t len = 0;
|
||||
int64_t nitems = pass ? filestream_read_file(path,
|
||||
(void**)&pass->source.string.vertex, &len) : 0;
|
||||
|
||||
if (nitems <= 0 || len <= 0)
|
||||
@ -790,6 +790,113 @@ static void gl_glsl_deinit(void *data)
|
||||
free(glsl);
|
||||
}
|
||||
|
||||
static void gl_glsl_init_menu_shaders(void *data)
|
||||
{
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
struct shader_program_info shader_prog_info;
|
||||
glsl_shader_data_t *glsl = (glsl_shader_data_t*)data;
|
||||
|
||||
if (!glsl)
|
||||
return;
|
||||
|
||||
#ifdef HAVE_OPENGLES
|
||||
if (gl_query_extension("GL_OES_standard_derivatives"))
|
||||
{
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_ribbon_modern : stock_vertex_xmb_ribbon_legacy;
|
||||
shader_prog_info.fragment = glsl_core ? core_stock_fragment_xmb : stock_fragment_xmb;
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_prog_info.vertex = stock_vertex_xmb_ribbon_simple_legacy;
|
||||
shader_prog_info.fragment = stock_fragment_xmb_ribbon_simple;
|
||||
}
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_ribbon_modern : stock_vertex_xmb_ribbon_legacy;
|
||||
shader_prog_info.fragment = glsl_core ? core_stock_fragment_xmb : stock_fragment_xmb;
|
||||
#endif
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU,
|
||||
&glsl->prg[VIDEO_SHADER_MENU],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU]);
|
||||
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_simple_modern : stock_vertex_xmb_ribbon_simple_legacy;
|
||||
shader_prog_info.fragment = stock_fragment_xmb_ribbon_simple;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_2,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_2],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_2].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_2]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_simple_snow;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_3,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_3],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_3].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_3]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_snow;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_4,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_4],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_4].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_4]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_bokeh;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_5,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_5],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_5].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_5]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_snowflake;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_6,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_6],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_6].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_6]);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void *gl_glsl_init(void *data, const char *path)
|
||||
{
|
||||
unsigned i;
|
||||
@ -1015,104 +1122,6 @@ static void *gl_glsl_init(void *data, const char *path)
|
||||
glsl->uniforms[VIDEO_SHADER_STOCK_BLEND] = glsl->uniforms[0];
|
||||
}
|
||||
|
||||
#ifdef HAVE_SHADERPIPELINE
|
||||
#ifdef HAVE_OPENGLES
|
||||
if (gl_query_extension("GL_OES_standard_derivatives"))
|
||||
{
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_ribbon_modern : stock_vertex_xmb_ribbon_legacy;
|
||||
shader_prog_info.fragment = glsl_core ? core_stock_fragment_xmb : stock_fragment_xmb;
|
||||
}
|
||||
else
|
||||
{
|
||||
shader_prog_info.vertex = stock_vertex_xmb_ribbon_simple_legacy;
|
||||
shader_prog_info.fragment = stock_fragment_xmb_ribbon_simple;
|
||||
}
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_ribbon_modern : stock_vertex_xmb_ribbon_legacy;
|
||||
shader_prog_info.fragment = glsl_core ? core_stock_fragment_xmb : stock_fragment_xmb;
|
||||
#endif
|
||||
shader_prog_info.is_file = false;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU,
|
||||
&glsl->prg[VIDEO_SHADER_MENU],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU]);
|
||||
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_simple_modern : stock_vertex_xmb_ribbon_simple_legacy;
|
||||
shader_prog_info.fragment = stock_fragment_xmb_ribbon_simple;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_2,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_2],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_2].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_2]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_simple_snow;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_3,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_3],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_3].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_3]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_snow;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_4,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_4],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_4].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_4]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_bokeh;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_5,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_5],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_5].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_5]);
|
||||
|
||||
#if defined(HAVE_OPENGLES)
|
||||
shader_prog_info.vertex = stock_vertex_xmb_snow_modern;
|
||||
#else
|
||||
shader_prog_info.vertex = glsl_core ? stock_vertex_xmb_snow_modern : stock_vertex_xmb_snow_legacy;
|
||||
#endif
|
||||
shader_prog_info.fragment = stock_fragment_xmb_snowflake;
|
||||
|
||||
gl_glsl_compile_program(
|
||||
glsl,
|
||||
VIDEO_SHADER_MENU_6,
|
||||
&glsl->prg[VIDEO_SHADER_MENU_6],
|
||||
&shader_prog_info);
|
||||
gl_glsl_find_uniforms(glsl, 0, glsl->prg[VIDEO_SHADER_MENU_6].id,
|
||||
&glsl->uniforms[VIDEO_SHADER_MENU_6]);
|
||||
#endif
|
||||
|
||||
gl_glsl_reset_attrib(glsl);
|
||||
|
||||
for (i = 0; i < GFX_MAX_SHADERS; i++)
|
||||
@ -1486,9 +1495,9 @@ static bool gl_glsl_set_mvp(void *data, void *shader_data, const void *mat_data)
|
||||
|
||||
#define gl_glsl_set_coord_array(attribs, coord1, coord2, coords, size, multiplier) \
|
||||
unsigned y; \
|
||||
attribs[attribs_size].loc = coord1; \
|
||||
attribs[attribs_size].size = multiplier; \
|
||||
attribs[attribs_size].offset = size * sizeof(GLfloat); \
|
||||
attribs[attribs_size].loc = (GLint)coord1; \
|
||||
attribs[attribs_size].size = (GLsizei)multiplier; \
|
||||
attribs[attribs_size].offset = (GLsizei)(size * sizeof(GLfloat)); \
|
||||
for (y = 0; y < (multiplier * coords->vertices); y++) \
|
||||
buffer[y + size] = coord2[y]; \
|
||||
size += multiplier * coords->vertices; \
|
||||
@ -1688,6 +1697,7 @@ void gl_glsl_set_context_type(bool core_profile,
|
||||
|
||||
const shader_backend_t gl_glsl_backend = {
|
||||
gl_glsl_init,
|
||||
gl_glsl_init_menu_shaders,
|
||||
gl_glsl_deinit,
|
||||
gl_glsl_set_params,
|
||||
gl_glsl_set_uniform_parameter,
|
||||
|
@ -592,6 +592,7 @@ static struct video_shader *hlsl_get_current_shader(void *data)
|
||||
|
||||
const shader_backend_t hlsl_backend = {
|
||||
hlsl_init,
|
||||
NULL, /* hlsl_init_menu_shaders */
|
||||
hlsl_deinit,
|
||||
hlsl_set_params,
|
||||
hlsl_set_uniform_parameter,
|
||||
|
@ -77,6 +77,7 @@ static bool shader_null_compile_program(
|
||||
|
||||
const shader_backend_t shader_null_backend = {
|
||||
shader_null_init,
|
||||
NULL,
|
||||
shader_null_deinit,
|
||||
NULL,
|
||||
shader_null_set_uniform_parameter,
|
||||
|
@ -693,9 +693,9 @@ static INLINE unsigned font_get_replacement(const char* src, const char* start)
|
||||
static char* font_driver_reshape_msg(const char* msg)
|
||||
{
|
||||
/* worst case transformations are 2 bytes to 4 bytes */
|
||||
char* buffer = (char*)malloc((strlen(msg) * 2) + 1);
|
||||
const char* src = msg;
|
||||
char* dst = buffer;
|
||||
unsigned char* buffer = (unsigned char*)malloc((strlen(msg) * 2) + 1);
|
||||
const unsigned char* src = (const unsigned char*)msg;
|
||||
unsigned char* dst = (unsigned char*)buffer;
|
||||
bool reverse = false;
|
||||
|
||||
while (*src || reverse)
|
||||
@ -708,7 +708,7 @@ static char* font_driver_reshape_msg(const char* msg)
|
||||
|
||||
if (IS_RTL(src) || IS_DIR_NEUTRAL(src))
|
||||
{
|
||||
unsigned replacement = font_get_replacement(src, msg);
|
||||
unsigned replacement = font_get_replacement((const char*)src, msg);
|
||||
if (replacement)
|
||||
{
|
||||
if (replacement < 0x80)
|
||||
@ -770,7 +770,7 @@ static char* font_driver_reshape_msg(const char* msg)
|
||||
|
||||
*dst = '\0';
|
||||
|
||||
return buffer;
|
||||
return (char*)buffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1012,6 +1012,7 @@ static bool video_driver_init_internal(bool *video_is_threaded)
|
||||
video.rgb32 = video_driver_state_filter ?
|
||||
video_driver_state_out_rgb32 :
|
||||
(video_driver_pix_fmt == RETRO_PIXEL_FORMAT_XRGB8888);
|
||||
video.parent = 0;
|
||||
|
||||
/* Reset video frame count */
|
||||
video_driver_frame_count = 0;
|
||||
@ -3545,6 +3546,7 @@ bool video_shader_driver_init_first(void)
|
||||
bool video_shader_driver_init(video_shader_ctx_init_t *init)
|
||||
{
|
||||
void *tmp = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!init->shader || !init->shader->init)
|
||||
{
|
||||
@ -3559,6 +3561,10 @@ bool video_shader_driver_init(video_shader_ctx_init_t *init)
|
||||
if (!tmp)
|
||||
return false;
|
||||
|
||||
if (string_is_equal(settings->arrays.menu_driver, "xmb")
|
||||
&& init->shader->init_menu_shaders)
|
||||
init->shader->init_menu_shaders(tmp);
|
||||
|
||||
current_shader_data = tmp;
|
||||
current_shader = (shader_backend_t*)init->shader;
|
||||
video_shader_driver_reset_to_defaults();
|
||||
|
@ -200,6 +200,7 @@ struct uniform_info
|
||||
typedef struct shader_backend
|
||||
{
|
||||
void *(*init)(void *data, const char *path);
|
||||
void (*init_menu_shaders)(void *data);
|
||||
void (*deinit)(void *data);
|
||||
|
||||
/* Set shader parameters. */
|
||||
|
@ -1242,9 +1242,7 @@ MENU
|
||||
#include "../cores/libretro-net-retropad/net_retropad_core.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
#include "../input/input_mapper.c"
|
||||
#endif
|
||||
|
||||
#include "../command.c"
|
||||
|
||||
@ -1267,7 +1265,7 @@ DEPENDENCIES
|
||||
#ifdef WANT_ZLIB
|
||||
#include "../deps/libz/adler32.c"
|
||||
#include "../deps/libz/compress.c"
|
||||
#include "../deps/libz/crc32.c"
|
||||
#include "../deps/libz/libz-crc32.c"
|
||||
#include "../deps/libz/deflate.c"
|
||||
#include "../deps/libz/gzclose.c"
|
||||
#include "../deps/libz/gzlib.c"
|
||||
|
@ -59,7 +59,7 @@ static void hidpad_nesusb_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_nesusb_get_buttons(void *data, retro_bits_t* state)
|
||||
static void hidpad_nesusb_get_buttons(void *data, input_bits_t* state)
|
||||
{
|
||||
struct hidpad_nesusb_data *device = (struct hidpad_nesusb_data*)data;
|
||||
if (device)
|
||||
|
@ -59,9 +59,11 @@ static void hidpad_ps2adapter_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_ps2adapter_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_ps2adapter_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_ps2adapter_data *device = (struct hidpad_ps2adapter_data*)data;
|
||||
struct hidpad_ps2adapter_data *device = (struct hidpad_ps2adapter_data*)
|
||||
data;
|
||||
|
||||
if (device)
|
||||
{
|
||||
BITS_COPY16_PTR(state, device->buttons);
|
||||
|
@ -131,7 +131,7 @@ static void hidpad_ps3_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_ps3_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_ps3_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_ps3_data *device = (struct hidpad_ps3_data*)data;
|
||||
if ( device )
|
||||
|
@ -186,7 +186,7 @@ static bool hidpad_ps4_check_dpad(struct ps4 *rpt, unsigned id)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void hidpad_ps4_get_buttons(void *data, retro_bits_t* state)
|
||||
static void hidpad_ps4_get_buttons(void *data, input_bits_t* state)
|
||||
{
|
||||
struct hidpad_ps4_data *device = (struct hidpad_ps4_data*)data;
|
||||
struct ps4 *rpt = device ?
|
||||
|
@ -59,9 +59,11 @@ static void hidpad_psxadapter_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_psxadapter_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_psxadapter_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_psxadapter_data *device = (struct hidpad_psxadapter_data*)data;
|
||||
struct hidpad_psxadapter_data *device = (struct hidpad_psxadapter_data*)
|
||||
data;
|
||||
|
||||
if (device)
|
||||
{
|
||||
BITS_COPY16_PTR(state, device->buttons);
|
||||
|
@ -60,7 +60,7 @@ static void hidpad_snesusb_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_snesusb_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_snesusb_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_snesusb_data *device = (struct hidpad_snesusb_data*)data;
|
||||
if (device)
|
||||
|
@ -673,7 +673,7 @@ static int16_t hidpad_wii_get_axis(void *data, unsigned axis)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void hidpad_wii_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_wii_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct connect_wii_wiimote_t* device = (struct connect_wii_wiimote_t*)data;
|
||||
if ( device )
|
||||
|
@ -69,7 +69,7 @@ static void hidpad_wiiugca_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_wiiugca_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_wiiugca_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_wiiugca_data *device = (struct hidpad_wiiugca_data*)data;
|
||||
if (device)
|
||||
|
@ -119,7 +119,7 @@ static void hidpad_wiiupro_deinit(void *data)
|
||||
free(device);
|
||||
}
|
||||
|
||||
static void hidpad_wiiupro_get_buttons(void *data, retro_bits_t *state)
|
||||
static void hidpad_wiiupro_get_buttons(void *data, input_bits_t *state)
|
||||
{
|
||||
struct hidpad_wiiupro_data *device = (struct hidpad_wiiupro_data*)data;
|
||||
struct wiiupro *rpt = device ?
|
||||
|
@ -228,7 +228,8 @@ void pad_connection_packet(joypad_connection_t *joyconn, uint32_t pad,
|
||||
joyconn->iface->packet_handler(joyconn->data, data, length);
|
||||
}
|
||||
|
||||
void pad_connection_get_buttons(joypad_connection_t *joyconn, unsigned pad, retro_bits_t* state)
|
||||
void pad_connection_get_buttons(joypad_connection_t *joyconn,
|
||||
unsigned pad, input_bits_t *state)
|
||||
{
|
||||
if (joyconn && joyconn->iface)
|
||||
joyconn->iface->get_buttons(joyconn->data, state);
|
||||
|
@ -58,7 +58,7 @@ typedef struct pad_connection_interface
|
||||
void (*packet_handler)(void* device, uint8_t *packet, uint16_t size);
|
||||
void (*set_rumble)(void* device, enum retro_rumble_effect effect,
|
||||
uint16_t strength);
|
||||
void (*get_buttons)(void *data, retro_bits_t *state);
|
||||
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);
|
||||
@ -91,7 +91,7 @@ void pad_connection_packet(joypad_connection_t *joyconn,
|
||||
uint32_t idx, uint8_t* data, uint32_t length);
|
||||
|
||||
void pad_connection_get_buttons(joypad_connection_t *joyconn,
|
||||
unsigned idx, retro_bits_t* state);
|
||||
unsigned idx, input_bits_t* state);
|
||||
|
||||
int16_t pad_connection_get_axis(joypad_connection_t *joyconn,
|
||||
unsigned idx, unsigned i);
|
||||
|
@ -53,7 +53,7 @@ int32_t cocoa_input_find_any_key(void)
|
||||
}
|
||||
|
||||
static int cocoa_input_find_any_button_ret(cocoa_input_data_t *apple,
|
||||
retro_bits_t * state, unsigned port)
|
||||
input_bits_t * state, unsigned port)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
@ -78,7 +78,7 @@ int32_t cocoa_input_find_any_button(uint32_t port)
|
||||
|
||||
if (apple->joypad->get_buttons)
|
||||
{
|
||||
retro_bits_t state;
|
||||
input_bits_t state;
|
||||
apple->joypad->get_buttons(port,&state);
|
||||
ret = cocoa_input_find_any_button_ret(apple, &state, port);
|
||||
}
|
||||
@ -93,7 +93,7 @@ int32_t cocoa_input_find_any_button(uint32_t port)
|
||||
|
||||
if (apple->sec_joypad->get_buttons)
|
||||
{
|
||||
retro_bits_t state;
|
||||
input_bits_t state;
|
||||
apple->sec_joypad->poll();
|
||||
apple->sec_joypad->get_buttons(port,&state);
|
||||
ret = cocoa_input_find_any_button_ret(apple, &state, port);
|
||||
|
@ -104,7 +104,7 @@ static int16_t wiiu_pointer_device_state(wiiu_input_t* wiiu, unsigned id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_POINTER_PRESSED:
|
||||
{
|
||||
retro_bits_t state;
|
||||
input_bits_t state;
|
||||
wiiu->joypad->get_buttons(0, &state);
|
||||
return BIT256_GET(state, VPAD_BUTTON_TOUCH_BIT) ? 1 : 0;
|
||||
}
|
||||
|
@ -1364,7 +1364,8 @@ static const char *btstack_hid_joypad_name(void *data, unsigned pad)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void btstack_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
static void btstack_hid_joypad_get_buttons(void *data, unsigned port,
|
||||
input_bits_t *state)
|
||||
{
|
||||
btstack_hid_t *hid = (btstack_hid_t*)data;
|
||||
if (hid)
|
||||
@ -1373,9 +1374,10 @@ static void btstack_hid_joypad_get_buttons(void *data, unsigned port, retro_bits
|
||||
BIT256_CLEAR_ALL_PTR(state);
|
||||
}
|
||||
|
||||
static bool btstack_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||
static bool btstack_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
input_bits_t buttons;
|
||||
btstack_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
/* Check hat. */
|
||||
|
@ -133,7 +133,8 @@ static const char *iohidmanager_hid_joypad_name(void *data, unsigned pad)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
static void iohidmanager_hid_joypad_get_buttons(void *data,
|
||||
unsigned port, input_bits_t *state)
|
||||
{
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
if (hid)
|
||||
@ -145,7 +146,7 @@ static void iohidmanager_hid_joypad_get_buttons(void *data, unsigned port, retro
|
||||
static bool iohidmanager_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
input_bits_t buttons;
|
||||
iohidmanager_hid_t *hid = (iohidmanager_hid_t*)data;
|
||||
unsigned hat_dir = GET_HAT_DIR(joykey);
|
||||
|
||||
|
@ -443,7 +443,8 @@ static const char *libusb_hid_joypad_name(void *data, unsigned pad)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void libusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
static void libusb_hid_joypad_get_buttons(void *data, unsigned port,
|
||||
input_bits_t *state)
|
||||
{
|
||||
libusb_hid_t *hid = (libusb_hid_t*)data;
|
||||
if (hid)
|
||||
@ -458,7 +459,7 @@ static void libusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_
|
||||
static bool libusb_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
input_bits_t buttons;
|
||||
libusb_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
/* Check hat. */
|
||||
|
@ -39,7 +39,8 @@ static const char *null_hid_joypad_name(void *data, unsigned pad)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void null_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
static void null_hid_joypad_get_buttons(void *data,
|
||||
unsigned port, input_bits_t *state)
|
||||
{
|
||||
(void)data;
|
||||
(void)port;
|
||||
|
@ -478,7 +478,8 @@ static bool wiiusb_hid_joypad_query(void *data, unsigned pad)
|
||||
return pad < MAX_USERS;
|
||||
}
|
||||
|
||||
static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_t *state)
|
||||
static void wiiusb_hid_joypad_get_buttons(void *data,
|
||||
unsigned port, input_bits_t *state)
|
||||
{
|
||||
wiiusb_hid_t *hid = (wiiusb_hid_t*)data;
|
||||
if (hid)
|
||||
@ -489,9 +490,10 @@ static void wiiusb_hid_joypad_get_buttons(void *data, unsigned port, retro_bits_
|
||||
BIT256_CLEAR_ALL_PTR(state);
|
||||
}
|
||||
|
||||
static bool wiiusb_hid_joypad_button(void *data, unsigned port, uint16_t joykey)
|
||||
static bool wiiusb_hid_joypad_button(void *data,
|
||||
unsigned port, uint16_t joykey)
|
||||
{
|
||||
retro_bits_t buttons;
|
||||
input_bits_t buttons;
|
||||
|
||||
wiiusb_hid_joypad_get_buttons(data, port, &buttons);
|
||||
|
||||
|
@ -70,7 +70,7 @@ static bool ctr_joypad_button(unsigned port_num, uint16_t key)
|
||||
return (pad_state & (1 << key));
|
||||
}
|
||||
|
||||
static void ctr_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void ctr_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
if ( port_num < MAX_PADS )
|
||||
{
|
||||
|
@ -162,7 +162,7 @@ static bool gx_joypad_button(unsigned port, uint16_t key)
|
||||
return (pad_state[port] & (UINT64_C(1) << key));
|
||||
}
|
||||
|
||||
static void gx_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void gx_joypad_get_buttons(unsigned port, input_bits_t *state)
|
||||
{
|
||||
if (port < MAX_PADS)
|
||||
{
|
||||
|
@ -55,7 +55,7 @@ static bool hid_joypad_button(unsigned port, uint16_t joykey)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void hid_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void hid_joypad_get_buttons(unsigned port, input_bits_t *state)
|
||||
{
|
||||
if (generic_hid && generic_hid->get_buttons)
|
||||
generic_hid->get_buttons((void*)hid_driver_get_data(), port, state);
|
||||
|
@ -326,9 +326,11 @@ static bool linuxraw_joypad_button(unsigned port, uint16_t joykey)
|
||||
return joykey < NUM_BUTTONS && BIT32_GET(pad->buttons, joykey);
|
||||
}
|
||||
|
||||
static void linuxraw_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void linuxraw_joypad_get_buttons(unsigned port, input_bits_t *state)
|
||||
{
|
||||
const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*)&linuxraw_pads[port];
|
||||
const struct linuxraw_joypad *pad = (const struct linuxraw_joypad*)
|
||||
&linuxraw_pads[port];
|
||||
|
||||
if (pad)
|
||||
{
|
||||
BITS_COPY16_PTR(state, pad->buttons);
|
||||
|
@ -221,7 +221,8 @@ static bool apple_gamecontroller_joypad_button(unsigned port, uint16_t joykey)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void apple_gamecontroller_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void apple_gamecontroller_joypad_get_buttons(unsigned port,
|
||||
input_bits_t *state)
|
||||
{
|
||||
BITS_COPY16_PTR(state, mfi_buttons[port]);
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ static bool null_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void null_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void null_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
BIT256_CLEAR_ALL_PTR(state);
|
||||
}
|
||||
|
@ -340,9 +340,11 @@ static bool parport_joypad_button(unsigned port, uint16_t joykey)
|
||||
return joykey < PARPORT_NUM_BUTTONS && BIT32_GET(pad->buttons, joykey);
|
||||
}
|
||||
|
||||
static void parport_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void parport_joypad_get_buttons(unsigned port, input_bits_t *state)
|
||||
{
|
||||
const struct parport_joypad *pad = (const struct parport_joypad*)&parport_pads[port];
|
||||
const struct parport_joypad *pad = (const struct parport_joypad*)
|
||||
&parport_pads[port];
|
||||
|
||||
if (pad)
|
||||
{
|
||||
BITS_COPY16_PTR(state, pad->buttons);
|
||||
|
@ -68,7 +68,7 @@ static bool ps3_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
return pad_state[port_num] & (UINT64_C(1) << joykey);
|
||||
}
|
||||
|
||||
static void ps3_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void ps3_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
if (port_num < MAX_PADS)
|
||||
{
|
||||
|
@ -124,7 +124,7 @@ static bool psp_joypad_button(unsigned port_num, uint16_t key)
|
||||
return (pad_state[port_num] & (UINT64_C(1) << key));
|
||||
}
|
||||
|
||||
static void psp_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void psp_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
if (port_num < PSP_MAX_PADS)
|
||||
{
|
||||
|
@ -130,12 +130,11 @@ static bool rwebpad_joypad_button(unsigned port_num, uint16_t joykey)
|
||||
return false;
|
||||
}
|
||||
|
||||
static void rwebpad_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void rwebpad_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
EmscriptenGamepadEvent gamepad_state;
|
||||
EMSCRIPTEN_RESULT r;
|
||||
|
||||
r = emscripten_get_gamepad_status(port_num, &gamepad_state);
|
||||
EMSCRIPTEN_RESULT r = emscripten_get_gamepad_status(
|
||||
port_num, &gamepad_state);
|
||||
|
||||
if (r == EMSCRIPTEN_RESULT_SUCCESS)
|
||||
{
|
||||
|
@ -60,7 +60,7 @@ static bool switch_joypad_button(unsigned port_num, uint16_t key)
|
||||
return (pad_state[port_num] & (1 << key));
|
||||
}
|
||||
|
||||
static void switch_joypad_get_buttons(unsigned port_num, retro_bits_t *state)
|
||||
static void switch_joypad_get_buttons(unsigned port_num, input_bits_t *state)
|
||||
{
|
||||
if(port_num < MAX_PADS)
|
||||
{
|
||||
|
@ -637,9 +637,11 @@ static bool udev_joypad_button(unsigned port, uint16_t joykey)
|
||||
return joykey < UDEV_NUM_BUTTONS && BIT64_GET(pad->buttons, joykey);
|
||||
}
|
||||
|
||||
static void udev_joypad_get_buttons(unsigned port, retro_bits_t *state)
|
||||
static void udev_joypad_get_buttons(unsigned port, input_bits_t *state)
|
||||
{
|
||||
const struct udev_joypad *pad = (const struct udev_joypad*)&udev_pads[port];
|
||||
const struct udev_joypad *pad = (const struct udev_joypad*)
|
||||
&udev_pads[port];
|
||||
|
||||
if (pad)
|
||||
{
|
||||
BITS_COPY16_PTR( state, pad->buttons );
|
||||
|
@ -28,7 +28,7 @@ static bool wiiu_joypad_init(void *data);
|
||||
static bool wiiu_joypad_query_pad(unsigned pad);
|
||||
static void wiiu_joypad_destroy(void);
|
||||
static bool wiiu_joypad_button(unsigned pad, uint16_t button);
|
||||
static void wiiu_joypad_get_buttons(unsigned pad, retro_bits_t *state);
|
||||
static void wiiu_joypad_get_buttons(unsigned pad, input_bits_t *state);
|
||||
static int16_t wiiu_joypad_axis(unsigned pad, uint32_t axis);
|
||||
static void wiiu_joypad_poll(void);
|
||||
static const char *wiiu_joypad_name(unsigned pad);
|
||||
@ -78,7 +78,7 @@ static bool wiiu_joypad_button(unsigned pad, uint16_t key)
|
||||
return pad_drivers[pad]->button(pad, key);
|
||||
}
|
||||
|
||||
static void wiiu_joypad_get_buttons(unsigned pad, retro_bits_t *state)
|
||||
static void wiiu_joypad_get_buttons(unsigned pad, input_bits_t *state)
|
||||
{
|
||||
if(!wiiu_joypad_query_pad(pad))
|
||||
return;
|
||||
|
@ -28,11 +28,15 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
#define MAX_INPUT_DEVICES 16
|
||||
|
||||
#define RARCH_MAX_KEYS 136
|
||||
|
||||
#define RARCH_FIRST_CUSTOM_BIND 16
|
||||
#define RARCH_FIRST_LIGHTGUN_BIND RARCH_ANALOG_BIND_LIST_END
|
||||
#define RARCH_FIRST_MISC_CUSTOM_BIND RARCH_LIGHTGUN_BIND_LIST_END
|
||||
#define RARCH_FIRST_META_KEY RARCH_CUSTOM_BIND_LIST_END
|
||||
|
||||
#define RARCH_UNMAPPED 1024
|
||||
|
||||
/* RetroArch specific bind IDs. */
|
||||
enum
|
||||
{
|
||||
|
@ -34,9 +34,7 @@
|
||||
#include "input_remote.h"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
#include "input_mapper.h"
|
||||
#endif
|
||||
|
||||
#include "input_driver.h"
|
||||
#include "input_keymaps.h"
|
||||
@ -393,9 +391,7 @@ static command_t *input_driver_command = NULL;
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
static input_remote_t *input_driver_remote = NULL;
|
||||
#endif
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
static input_mapper_t *input_driver_mapper = NULL;
|
||||
#endif
|
||||
static const input_driver_t *current_input = NULL;
|
||||
static void *current_input_data = NULL;
|
||||
static bool input_driver_block_hotkey = false;
|
||||
@ -595,6 +591,8 @@ void input_poll(void)
|
||||
if (input_driver_block_libretro_input)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
for (i = 0; i < max_users; i++)
|
||||
{
|
||||
if (libretro_input_binds[i][RARCH_TURBO_ENABLE].valid)
|
||||
@ -619,6 +617,9 @@ void input_poll(void)
|
||||
input_driver_axis_threshold);
|
||||
#endif
|
||||
|
||||
if (settings->bools.input_remap_binds_enable && input_driver_mapper)
|
||||
input_mapper_poll(input_driver_mapper);
|
||||
|
||||
#ifdef HAVE_COMMAND
|
||||
if (input_driver_command)
|
||||
command_poll(input_driver_command);
|
||||
@ -628,11 +629,6 @@ void input_poll(void)
|
||||
if (input_driver_remote)
|
||||
input_remote_poll(input_driver_remote, max_users);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
if (input_driver_mapper)
|
||||
input_mapper_poll(input_driver_mapper);
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -652,6 +648,10 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
{
|
||||
int16_t res = 0;
|
||||
|
||||
/* used to reset input state of a button when the gamepad mapper
|
||||
is in action for that button*/
|
||||
bool reset_state = false;
|
||||
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
if (bsv_movie_is_playback_on())
|
||||
@ -673,17 +673,17 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
if (id < RARCH_FIRST_CUSTOM_BIND)
|
||||
id = settings->uints.input_remap_ids[port][id];
|
||||
if (id != settings->uints.input_remap_ids[port][id])
|
||||
reset_state = true;
|
||||
break;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
if (idx < 2 && id < 2)
|
||||
{
|
||||
unsigned new_id = RARCH_FIRST_CUSTOM_BIND + (idx * 2 + id);
|
||||
|
||||
new_id = settings->uints.input_remap_ids[port][new_id];
|
||||
idx = (new_id & 2) >> 1;
|
||||
id = new_id & 1;
|
||||
unsigned offset = RARCH_FIRST_CUSTOM_BIND + (idx * 4) + (id * 2);
|
||||
if (settings->uints.input_remap_ids[port][offset] != offset)
|
||||
reset_state = true;
|
||||
if (settings->uints.input_remap_ids[port][offset+1] != (offset+1))
|
||||
reset_state = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -696,16 +696,22 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
if (bind_valid || device == RETRO_DEVICE_KEYBOARD)
|
||||
{
|
||||
rarch_joypad_info_t joypad_info;
|
||||
|
||||
joypad_info.axis_threshold = input_driver_axis_threshold;
|
||||
joypad_info.joy_idx = settings->uints.input_joypad_map[port];
|
||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||
|
||||
if (!reset_state)
|
||||
res = current_input->input_state(
|
||||
current_input_data, joypad_info, libretro_input_binds, port, device, idx, id);
|
||||
else
|
||||
res = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (settings->bools.input_remap_binds_enable && input_driver_mapper)
|
||||
input_mapper_state(input_driver_mapper,
|
||||
&res, port, device, idx, id);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (overlay_ptr)
|
||||
input_state_overlay(overlay_ptr, &res, port, device, idx, id);
|
||||
@ -716,12 +722,6 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
input_remote_state(&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
if (input_driver_mapper)
|
||||
input_mapper_state(input_driver_mapper,
|
||||
&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
/* Don't allow turbo for D-pad. */
|
||||
if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP ||
|
||||
id > RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
@ -821,7 +821,7 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2)
|
||||
}
|
||||
|
||||
static INLINE bool input_keys_pressed_iterate(unsigned i,
|
||||
retro_bits_t* p_new_state)
|
||||
input_bits_t* p_new_state)
|
||||
{
|
||||
if ((i >= RARCH_FIRST_META_KEY) &&
|
||||
BIT64_GET(lifecycle_state, i)
|
||||
@ -866,14 +866,12 @@ static INLINE bool input_keys_pressed_iterate(unsigned i,
|
||||
*
|
||||
* Returns: Input sample containing a mask of all pressed keys.
|
||||
*/
|
||||
void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
void input_menu_keys_pressed(void *data, input_bits_t *p_new_state)
|
||||
{
|
||||
unsigned i, port;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const struct retro_keybind *binds_norm = NULL;
|
||||
const struct retro_keybind *binds_auto = NULL;
|
||||
uint8_t max_users = (uint8_t)input_driver_max_users;
|
||||
uint8_t port_max =
|
||||
settings->bools.input_all_users_control_menu
|
||||
@ -882,8 +880,6 @@ void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
joypad_info.joy_idx = 0;
|
||||
joypad_info.auto_binds = NULL;
|
||||
|
||||
BIT256_CLEAR_ALL_PTR(p_new_state);
|
||||
|
||||
input_driver_block_libretro_input = false;
|
||||
input_driver_block_hotkey = false;
|
||||
|
||||
@ -901,8 +897,8 @@ void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
|
||||
for (port = 0; port < port_max; port++)
|
||||
{
|
||||
binds_norm = &input_config_binds[port][RARCH_ENABLE_HOTKEY];
|
||||
binds_auto = &input_autoconf_binds[port][RARCH_ENABLE_HOTKEY];
|
||||
const struct retro_keybind *binds_norm = &input_config_binds[port][RARCH_ENABLE_HOTKEY];
|
||||
const struct retro_keybind *binds_auto = &input_autoconf_binds[port][RARCH_ENABLE_HOTKEY];
|
||||
|
||||
if (check_input_driver_block_hotkey(binds_norm, binds_auto))
|
||||
{
|
||||
@ -988,7 +984,10 @@ void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
}
|
||||
}
|
||||
|
||||
if (bit_pressed || input_keys_pressed_iterate(i, p_new_state))
|
||||
if (!bit_pressed)
|
||||
bit_pressed = input_keys_pressed_iterate(i, p_new_state);
|
||||
|
||||
if (bit_pressed)
|
||||
{
|
||||
BIT256_SET_PTR(p_new_state, i);
|
||||
}
|
||||
@ -1071,7 +1070,7 @@ int16_t input_driver_input_state(
|
||||
*
|
||||
* Returns: Input sample containing a mask of all pressed keys.
|
||||
*/
|
||||
void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
void input_keys_pressed(void *data, input_bits_t *p_new_state)
|
||||
{
|
||||
unsigned i;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
@ -1080,13 +1079,6 @@ void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
const struct retro_keybind *binds_auto = &input_autoconf_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
const struct retro_keybind *binds_norm = &binds[RARCH_ENABLE_HOTKEY];
|
||||
|
||||
const struct retro_keybind *focus_binds_auto = &input_autoconf_binds[0][RARCH_GAME_FOCUS_TOGGLE];
|
||||
const struct retro_keybind *focus_normal = &binds[RARCH_GAME_FOCUS_TOGGLE];
|
||||
const struct retro_keybind *enable_hotkey = &input_config_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
bool game_focus_toggle_valid = false;
|
||||
|
||||
BIT256_CLEAR_ALL_PTR(p_new_state);
|
||||
|
||||
joypad_info.joy_idx = settings->uints.input_joypad_map[0];
|
||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||
joypad_info.axis_threshold = input_driver_axis_threshold;
|
||||
@ -1100,7 +1092,10 @@ void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
|
||||
if (check_input_driver_block_hotkey(binds_norm, binds_auto))
|
||||
{
|
||||
if ( enable_hotkey->valid
|
||||
const struct retro_keybind *enable_hotkey =
|
||||
&input_config_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
|
||||
if ( enable_hotkey && enable_hotkey->valid
|
||||
&& current_input->input_state(
|
||||
current_input_data, joypad_info, &binds, 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_ENABLE_HOTKEY))
|
||||
@ -1109,17 +1104,23 @@ void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
input_driver_block_hotkey = true;
|
||||
}
|
||||
|
||||
game_focus_toggle_valid = binds[RARCH_GAME_FOCUS_TOGGLE].valid;
|
||||
if (binds[RARCH_GAME_FOCUS_TOGGLE].valid)
|
||||
{
|
||||
const struct retro_keybind *focus_binds_auto =
|
||||
&input_autoconf_binds[0][RARCH_GAME_FOCUS_TOGGLE];
|
||||
const struct retro_keybind *focus_normal =
|
||||
&binds[RARCH_GAME_FOCUS_TOGGLE];
|
||||
|
||||
/* Allows rarch_focus_toggle hotkey to still work
|
||||
* even though every hotkey is blocked */
|
||||
if (check_input_driver_block_hotkey(
|
||||
focus_normal, focus_binds_auto) && game_focus_toggle_valid)
|
||||
focus_normal, focus_binds_auto))
|
||||
{
|
||||
if (current_input->input_state(current_input_data, joypad_info, &binds, 0,
|
||||
RETRO_DEVICE_JOYPAD, 0, RARCH_GAME_FOCUS_TOGGLE))
|
||||
input_driver_block_hotkey = false;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < RARCH_BIND_LIST_END; i++)
|
||||
{
|
||||
@ -1133,14 +1134,55 @@ void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
0, RETRO_DEVICE_JOYPAD, 0, i)
|
||||
)
|
||||
bit_pressed = true;
|
||||
else if (input_keys_pressed_iterate(i, p_new_state))
|
||||
bit_pressed = true;
|
||||
|
||||
if (bit_pressed || input_keys_pressed_iterate(i, p_new_state))
|
||||
if (bit_pressed)
|
||||
{
|
||||
BIT256_SET_PTR(p_new_state, i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void input_get_state_for_port(void *data, unsigned port, input_bits_t *p_new_state)
|
||||
{
|
||||
unsigned i, j;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const input_device_driver_t *joypad_driver = input_driver_get_joypad_driver();
|
||||
|
||||
joypad_info.joy_idx = settings->uints.input_joypad_map[port];
|
||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||
joypad_info.axis_threshold = input_driver_axis_threshold;
|
||||
|
||||
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
|
||||
{
|
||||
bool bit_pressed = false;
|
||||
|
||||
if (input_driver_input_state(joypad_info, libretro_input_binds,
|
||||
port, RETRO_DEVICE_JOYPAD, 0, i) != 0)
|
||||
bit_pressed = true;
|
||||
|
||||
if (bit_pressed)
|
||||
BIT256_SET_PTR(p_new_state, i);
|
||||
}
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
{
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
unsigned offset = 0 + (i * 4) + (j * 2);
|
||||
int16_t val = input_joypad_analog(joypad_driver,
|
||||
joypad_info, port, i, j, libretro_input_binds[port]);
|
||||
|
||||
if (val >= 0)
|
||||
p_new_state->analogs[offset] = val;
|
||||
else
|
||||
p_new_state->analogs[offset+1] = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void *input_driver_get_data(void)
|
||||
{
|
||||
return current_input_data;
|
||||
@ -1359,11 +1401,9 @@ void input_driver_deinit_remote(void)
|
||||
|
||||
void input_driver_deinit_mapper(void)
|
||||
{
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
if (input_driver_mapper)
|
||||
input_mapper_free(input_driver_mapper);
|
||||
input_driver_mapper = NULL;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool input_driver_init_remote(void)
|
||||
@ -1388,20 +1428,17 @@ bool input_driver_init_remote(void)
|
||||
|
||||
bool input_driver_init_mapper(void)
|
||||
{
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (!settings->bools.keymapper_enable)
|
||||
if (!settings->bools.input_remap_binds_enable)
|
||||
return false;
|
||||
|
||||
input_driver_mapper = input_mapper_new(
|
||||
settings->uints.keymapper_port);
|
||||
input_driver_mapper = input_mapper_new();
|
||||
|
||||
if (input_driver_mapper)
|
||||
return true;
|
||||
|
||||
RARCH_ERR("Failed to initialize input mapper.\n");
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -2567,7 +2604,7 @@ static void input_config_get_bind_string_joykey(
|
||||
{
|
||||
if (bind->joykey_label &&
|
||||
!string_is_empty(bind->joykey_label) && label_show)
|
||||
snprintf(buf, size, "%s %s ", prefix, bind->joykey_label);
|
||||
snprintf(buf, size, "%s %s (hat)", prefix, bind->joykey_label);
|
||||
else
|
||||
{
|
||||
const char *dir = "?";
|
||||
|
@ -42,6 +42,19 @@
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct
|
||||
{
|
||||
uint32_t data[8];
|
||||
uint16_t analogs[8];
|
||||
} input_bits_t;
|
||||
|
||||
typedef struct rarch_joypad_driver input_device_driver_t;
|
||||
|
||||
typedef struct hid_driver hid_driver_t;
|
||||
|
||||
/* Keyboard line reader. Handles textual input in a direct fashion. */
|
||||
typedef struct input_keyboard_line input_keyboard_line_t;
|
||||
|
||||
enum input_device_type
|
||||
{
|
||||
INPUT_DEVICE_TYPE_NONE = 0,
|
||||
@ -169,7 +182,7 @@ struct rarch_joypad_driver
|
||||
bool (*query_pad)(unsigned);
|
||||
void (*destroy)(void);
|
||||
bool (*button)(unsigned, uint16_t);
|
||||
void (*get_buttons)(unsigned, retro_bits_t *);
|
||||
void (*get_buttons)(unsigned, input_bits_t *);
|
||||
int16_t (*axis)(unsigned, uint32_t);
|
||||
void (*poll)(void);
|
||||
bool (*set_rumble)(unsigned, enum retro_rumble_effect, uint16_t);
|
||||
@ -313,14 +326,16 @@ void input_poll(void);
|
||||
int16_t input_state(unsigned port, unsigned device,
|
||||
unsigned idx, unsigned id);
|
||||
|
||||
void input_keys_pressed(void *data, retro_bits_t* new_state);
|
||||
void input_keys_pressed(void *data, input_bits_t* new_state);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void input_menu_keys_pressed(void *data, retro_bits_t* new_state);
|
||||
void input_menu_keys_pressed(void *data, input_bits_t* new_state);
|
||||
#endif
|
||||
|
||||
void *input_driver_get_data(void);
|
||||
|
||||
void input_get_state_for_port(void *data, unsigned port, input_bits_t *p_new_state);
|
||||
|
||||
const input_driver_t *input_get_ptr(void);
|
||||
|
||||
void *input_get_data(void);
|
||||
|
@ -50,17 +50,20 @@
|
||||
|
||||
struct input_mapper
|
||||
{
|
||||
/* The controller port that will be polled*/
|
||||
uint8_t port;
|
||||
/* Left X, Left Y, Right X, Right Y */
|
||||
int16_t analog[4];
|
||||
int16_t analog_value[MAX_USERS][8];
|
||||
/* the whole keyboard state */
|
||||
uint32_t keys[RETROK_LAST / 32 + 1];
|
||||
/* This is a bitmask of (1 << key_bind_id). */
|
||||
uint64_t buttons;
|
||||
input_bits_t buttons[MAX_USERS];
|
||||
};
|
||||
|
||||
input_mapper_t *input_mapper_new(uint16_t port)
|
||||
static bool input_mapper_button_pressed(input_mapper_t *handle, unsigned port, unsigned id)
|
||||
{
|
||||
return BIT256_GET(handle->buttons[port], id);
|
||||
}
|
||||
|
||||
input_mapper_t *input_mapper_new(void)
|
||||
{
|
||||
input_mapper_t* handle = (input_mapper_t*)
|
||||
calloc(1, sizeof(*handle));
|
||||
@ -68,8 +71,6 @@ input_mapper_t *input_mapper_new(uint16_t port)
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
handle->port = port;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
@ -82,41 +83,148 @@ void input_mapper_free(input_mapper_t *handle)
|
||||
|
||||
void input_mapper_poll(input_mapper_t *handle)
|
||||
{
|
||||
int i;
|
||||
unsigned i, j;
|
||||
input_bits_t current_input;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned device = settings->uints.input_libretro_device[handle->port];
|
||||
#ifdef HAVE_MENU
|
||||
bool menu_is_alive = menu_driver_is_alive();
|
||||
#endif
|
||||
unsigned max_users =
|
||||
*(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
|
||||
bool key_event[RARCH_CUSTOM_BIND_LIST_END] = { false };
|
||||
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
/* for now we only handle keyboard inputs */
|
||||
if (device != RETRO_DEVICE_KEYBOARD)
|
||||
return;
|
||||
#ifdef HAVE_MENU
|
||||
if (menu_is_alive)
|
||||
if (menu_driver_is_alive())
|
||||
return;
|
||||
#endif
|
||||
|
||||
memset(handle->keys, 0, sizeof(handle->keys));
|
||||
|
||||
for (i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++)
|
||||
for (i = 0; i < max_users; i++)
|
||||
{
|
||||
if (i < RETROK_LAST)
|
||||
unsigned device = settings->uints.input_libretro_device[i];
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
switch (device)
|
||||
{
|
||||
if (input_state(handle->port, RETRO_DEVICE_JOYPAD, 0, i))
|
||||
/* keyboard to gamepad remapping */
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
BIT256_CLEAR_ALL_PTR(¤t_input);
|
||||
input_get_state_for_port(settings, i, ¤t_input);
|
||||
for (j = 0; j < RARCH_CUSTOM_BIND_LIST_END; j++)
|
||||
{
|
||||
unsigned remap_button =
|
||||
settings->uints.input_keymapper_ids[i][j];
|
||||
bool remap_valid = remap_button != RETROK_UNKNOWN;
|
||||
|
||||
if (remap_valid)
|
||||
{
|
||||
unsigned current_button_value = BIT256_GET(current_input, j);
|
||||
|
||||
if ((current_button_value == 1) && (j != remap_button))
|
||||
{
|
||||
MAPPER_SET_KEY (handle,
|
||||
settings->uints.input_keymapper_ids[i]);
|
||||
remap_button);
|
||||
input_keyboard_event(true,
|
||||
settings->uints.input_keymapper_ids[i],
|
||||
remap_button,
|
||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
key_event[j] = true;
|
||||
}
|
||||
/* key_event tracks if a key is pressed for ANY PLAYER, so we must check
|
||||
if the key was used by any player before releasing */
|
||||
else if (!key_event[j])
|
||||
{
|
||||
input_keyboard_event(false,
|
||||
remap_button,
|
||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
/* gamepad remapping */
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
/* this loop iterates on all users and all buttons,
|
||||
* and checks if a pressed button is assigned to any
|
||||
* other button than the default one, then it sets
|
||||
* the bit on the mapper input bitmap, later on the
|
||||
* original input is cleared in input_state */
|
||||
BIT256_CLEAR_ALL(handle->buttons[i]);
|
||||
BIT256_CLEAR_ALL_PTR(¤t_input);
|
||||
|
||||
for (j = 0; j < 8; j++)
|
||||
handle->analog_value[i][j] = 0;
|
||||
|
||||
input_get_state_for_port(settings, i, ¤t_input);
|
||||
|
||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
||||
{
|
||||
unsigned current_button_value = BIT256_GET(current_input, j);
|
||||
unsigned remap_button =
|
||||
settings->uints.input_remap_ids[i][j];
|
||||
bool remap_valid = (current_button_value == 1) &&
|
||||
(j != remap_button) && (remap_button != RARCH_UNMAPPED);
|
||||
|
||||
if (remap_valid)
|
||||
{
|
||||
if (remap_button < RARCH_FIRST_CUSTOM_BIND)
|
||||
{
|
||||
BIT256_SET(handle->buttons[i], remap_button);
|
||||
}
|
||||
else if (remap_button >= RARCH_FIRST_CUSTOM_BIND)
|
||||
{
|
||||
int invert = 1;
|
||||
|
||||
if (remap_button % 2 != 0)
|
||||
invert = -1;
|
||||
|
||||
handle->analog_value[i][
|
||||
remap_button - RARCH_FIRST_CUSTOM_BIND] =
|
||||
32767 * invert;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (j = 0; j < 8; j++)
|
||||
{
|
||||
unsigned k = j + RARCH_FIRST_CUSTOM_BIND;
|
||||
int16_t current_axis_value = current_input.analogs[j];
|
||||
unsigned remap_axis =
|
||||
settings->uints.input_remap_ids[i][k];
|
||||
|
||||
if (
|
||||
(current_axis_value != 0) &&
|
||||
(k != remap_axis) &&
|
||||
(remap_axis != RARCH_UNMAPPED)
|
||||
)
|
||||
{
|
||||
if (remap_axis < RARCH_FIRST_CUSTOM_BIND)
|
||||
{
|
||||
BIT256_SET(handle->buttons[i], remap_axis);
|
||||
}
|
||||
else
|
||||
input_keyboard_event(false,
|
||||
settings->uints.input_keymapper_ids[i],
|
||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
{
|
||||
int invert = 1;
|
||||
|
||||
if ( (k % 2 == 0 && remap_axis % 2 != 0) ||
|
||||
(k % 2 != 0 && remap_axis % 2 == 0)
|
||||
)
|
||||
invert = -1;
|
||||
|
||||
handle->analog_value[i][
|
||||
remap_axis - RARCH_FIRST_CUSTOM_BIND] =
|
||||
current_axis_value * invert;
|
||||
#if 0
|
||||
RARCH_LOG("axis %d(%d) remapped to axis %d val %d\n",
|
||||
j, k,
|
||||
remap_axis - RARCH_FIRST_CUSTOM_BIND,
|
||||
current_axis_value);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -134,22 +242,34 @@ void input_mapper_state(
|
||||
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
if (input_mapper_button_pressed(handle, port, id))
|
||||
*ret = 1;
|
||||
break;
|
||||
case RETRO_DEVICE_ANALOG:
|
||||
if (idx < 2 && id < 2)
|
||||
{
|
||||
int val = 0;
|
||||
unsigned offset = 0 + (idx * 4) + (id * 2);
|
||||
int val1 = handle->analog_value[port][offset];
|
||||
int val2 = handle->analog_value[port][offset+1];
|
||||
|
||||
if (val1)
|
||||
val = val1;
|
||||
else if (val2)
|
||||
val = val2;
|
||||
|
||||
if (val1 || val2)
|
||||
*ret |= val;
|
||||
}
|
||||
break;
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
if (id < RETROK_LAST)
|
||||
{
|
||||
/*
|
||||
RARCH_LOG("State: UDLR %u %u %u %u\n",
|
||||
MAPPER_GET_KEY(handle, RETROK_UP),
|
||||
MAPPER_GET_KEY(handle, RETROK_DOWN),
|
||||
MAPPER_GET_KEY(handle, RETROK_LEFT),
|
||||
MAPPER_GET_KEY(handle, RETROK_RIGHT)
|
||||
);*/
|
||||
|
||||
if (MAPPER_GET_KEY(handle, id))
|
||||
*ret |= 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -31,13 +31,13 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct input_mapper input_mapper_t;
|
||||
|
||||
input_mapper_t *input_mapper_new(uint16_t port);
|
||||
input_mapper_t *input_mapper_new(void);
|
||||
|
||||
void input_mapper_free(input_mapper_t *handle);
|
||||
|
||||
void input_mapper_poll(input_mapper_t *handle);
|
||||
|
||||
bool input_mapper_key_pressed(int key);
|
||||
bool input_mapper_key_pressed(input_mapper_t *handle, int key);
|
||||
|
||||
void input_mapper_state(
|
||||
input_mapper_t *handle,
|
||||
|
@ -46,7 +46,7 @@ typedef struct input_overlay_state
|
||||
int16_t analog[4];
|
||||
uint32_t keys[RETROK_LAST / 32 + 1];
|
||||
/* This is a bitmask of (1 << key_bind_id). */
|
||||
retro_bits_t buttons;
|
||||
input_bits_t buttons;
|
||||
} input_overlay_state_t;
|
||||
|
||||
struct input_overlay
|
||||
@ -105,20 +105,16 @@ static bool input_overlay_add_inputs_inner(overlay_desc_t *desc,
|
||||
if (bank_mask & 1)
|
||||
{
|
||||
/* Light up the button if pressed */
|
||||
if (input_state(port, RETRO_DEVICE_JOYPAD, 0, id))
|
||||
if (!input_state(port, RETRO_DEVICE_JOYPAD, 0, id))
|
||||
{
|
||||
all_buttons_pressed = true;
|
||||
desc->updated = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*we need ALL of the inputs to be active*/
|
||||
all_buttons_pressed = false;
|
||||
/* We need ALL of the inputs to be active,
|
||||
* abort. */
|
||||
desc->updated = false;
|
||||
|
||||
/*abort*/
|
||||
return false;
|
||||
}
|
||||
|
||||
all_buttons_pressed = true;
|
||||
desc->updated = true;
|
||||
}
|
||||
|
||||
bank_mask >>= 1;
|
||||
|
@ -177,7 +177,7 @@ struct overlay_desc
|
||||
unsigned retro_key_idx;
|
||||
|
||||
/* This is a bit mask of all input binds to set with this overlay control */
|
||||
retro_bits_t button_mask;
|
||||
input_bits_t button_mask;
|
||||
|
||||
char next_index_name[64];
|
||||
|
||||
|
@ -39,7 +39,7 @@ static unsigned old_libretro_device[MAX_USERS];
|
||||
**/
|
||||
bool input_remapping_load_file(void *data, const char *path)
|
||||
{
|
||||
unsigned i, j;
|
||||
unsigned i, j, k;
|
||||
config_file_t *conf = (config_file_t*)data;
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
@ -53,69 +53,77 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char s1[64], s2[64];
|
||||
char key_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
||||
char keymapper_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
||||
char key_strings[RARCH_FIRST_CUSTOM_BIND + 4][128] =
|
||||
{ "b", "y", "select", "start",
|
||||
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_y", "r_x", "r_y" };
|
||||
"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", i + 1);
|
||||
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 + 4; j++)
|
||||
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(key_ident[j], s1,
|
||||
key_strings[j], '_', sizeof(key_ident[j]));
|
||||
fill_pathname_join_delim(keymapper_ident[j], s2,
|
||||
key_strings[j], '_', sizeof(key_ident[j]));
|
||||
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, key_ident[j], &key_remap)
|
||||
&& key_remap < RARCH_FIRST_CUSTOM_BIND)
|
||||
settings->uints.input_remap_ids[i][j] = key_remap;
|
||||
if (config_get_int(conf, btn_ident[j], &btn_remap)
|
||||
&& btn_remap != -1)
|
||||
settings->uints.input_remap_ids[i][j] = btn_remap;
|
||||
else if (config_get_int(conf, btn_ident[j], &btn_remap)
|
||||
&& btn_remap == -1)
|
||||
settings->uints.input_remap_ids[i][j] = RARCH_UNMAPPED;
|
||||
/* else do nothing, important */
|
||||
|
||||
key_remap = -1;
|
||||
|
||||
if (settings->uints.keymapper_port == i)
|
||||
{
|
||||
if (config_get_int(conf, keymapper_ident[j], &key_remap))
|
||||
{
|
||||
settings->uints.input_keymapper_ids[j] = key_remap;
|
||||
#if 0
|
||||
RARCH_LOG ("%s: %u\n", keymapper_ident[j], settings->uints.input_keymapper_ids[j]);
|
||||
#endif
|
||||
if (config_get_int(conf, key_ident[j], &key_remap))
|
||||
settings->uints.input_keymapper_ids[i][j] = key_remap;
|
||||
else
|
||||
settings->uints.input_keymapper_ids[i][j] = RETROK_UNKNOWN;
|
||||
}
|
||||
else
|
||||
settings->uints.input_keymapper_ids[j] = RETROK_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
for (j = 0; j < 4; j++)
|
||||
{
|
||||
int key_remap = -1;
|
||||
int stk_remap = -1;
|
||||
k = j - RARCH_FIRST_CUSTOM_BIND;
|
||||
|
||||
snprintf(key_ident[RARCH_FIRST_CUSTOM_BIND + j],
|
||||
sizeof(key_ident[RARCH_FIRST_CUSTOM_BIND + j]),
|
||||
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",
|
||||
s1,
|
||||
key_strings[RARCH_FIRST_CUSTOM_BIND + j]);
|
||||
s3,
|
||||
key_strings[j]);
|
||||
|
||||
if (config_get_int(conf, key_ident[RARCH_FIRST_CUSTOM_BIND + j],
|
||||
&key_remap) && (key_remap < 4))
|
||||
settings->uints.input_remap_ids[i][RARCH_FIRST_CUSTOM_BIND + j] =
|
||||
key_remap;
|
||||
/* RARCH_LOG("pre_ident: %s:%d\n", stk_ident[j], settings->uints.input_remap_ids[i][j]); */
|
||||
|
||||
if (config_get_int(conf, stk_ident[k], &stk_remap) && stk_remap != -1)
|
||||
settings->uints.input_remap_ids[i][j] = stk_remap;
|
||||
else if (config_get_int(conf, stk_ident[k], &stk_remap) && stk_remap == -1)
|
||||
settings->uints.input_remap_ids[i][j] = RARCH_UNMAPPED;
|
||||
/* else do nothing, important */
|
||||
|
||||
/*RARCH_LOG("stk_ident: %s:%d\n", stk_ident[j], settings->uints.input_remap_ids[i][j]);*/
|
||||
}
|
||||
}
|
||||
|
||||
snprintf(s1, sizeof(s1), "input_player%u_analog_dpad_mode", i + 1);
|
||||
@ -141,7 +149,7 @@ bool input_remapping_load_file(void *data, const char *path)
|
||||
bool input_remapping_save_file(const char *path)
|
||||
{
|
||||
bool ret;
|
||||
unsigned i, j;
|
||||
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));
|
||||
@ -172,46 +180,64 @@ bool input_remapping_save_file(const char *path)
|
||||
|
||||
for (i = 0; i < max_users; i++)
|
||||
{
|
||||
char s1[64], s2[64];
|
||||
char key_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
||||
char keymapper_ident[RARCH_FIRST_CUSTOM_BIND + 4][128] = {{0}};
|
||||
char key_strings[RARCH_FIRST_CUSTOM_BIND + 4][128] = {
|
||||
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_y", "r_x", "r_y" };
|
||||
"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", i + 1);
|
||||
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 + 4; j++)
|
||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND + 8; j++)
|
||||
{
|
||||
fill_pathname_join_delim(key_ident[j], s1,
|
||||
key_strings[j], '_', sizeof(key_ident[j]));
|
||||
fill_pathname_join_delim(keymapper_ident[j], s2,
|
||||
key_strings[j], '_', sizeof(key_ident[j]));
|
||||
|
||||
/* only save values that have been modified */
|
||||
if(j < RARCH_FIRST_CUSTOM_BIND)
|
||||
{
|
||||
if(settings->uints.input_remap_ids[i][j] != j)
|
||||
config_set_int(conf, key_ident[j], settings->uints.input_remap_ids[i][j]);
|
||||
else
|
||||
config_unset(conf,key_ident[j]);
|
||||
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(settings->uints.input_remap_ids[i][j] != j &&
|
||||
settings->uints.input_remap_ids[i][j] != RARCH_UNMAPPED)
|
||||
config_set_int(conf, btn_ident[j], settings->uints.input_remap_ids[i][j]);
|
||||
else if (settings->uints.input_remap_ids[i][j] != j &&
|
||||
settings->uints.input_remap_ids[i][j] == RARCH_UNMAPPED)
|
||||
config_set_int(conf, btn_ident[j], -1);
|
||||
else
|
||||
config_unset(conf,btn_ident[j]);
|
||||
|
||||
if (settings->uints.input_keymapper_ids[i][j] != RETROK_UNKNOWN)
|
||||
config_set_int(conf, key_ident[j],
|
||||
settings->uints.input_keymapper_ids[i][j]);
|
||||
|
||||
if (settings->uints.keymapper_port == i &&
|
||||
settings->uints.input_keymapper_ids[j] != RETROK_UNKNOWN)
|
||||
config_set_int(conf, keymapper_ident[j], settings->uints.input_keymapper_ids[j]);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(settings->uints.input_remap_ids[i][j] != j - RARCH_FIRST_CUSTOM_BIND)
|
||||
config_set_int(conf, key_ident[j], settings->uints.input_remap_ids[i][j]);
|
||||
k = j - RARCH_FIRST_CUSTOM_BIND;
|
||||
fill_pathname_join_delim(stk_ident[k], s3,
|
||||
key_strings[j], '_', sizeof(stk_ident[k]));
|
||||
if(settings->uints.input_remap_ids[i][j] != j &&
|
||||
settings->uints.input_remap_ids[i][j] != RARCH_UNMAPPED)
|
||||
config_set_int(conf, stk_ident[k],
|
||||
settings->uints.input_remap_ids[i][j]);
|
||||
else if(settings->uints.input_remap_ids[i][j] != j &&
|
||||
settings->uints.input_remap_ids[i][j] == RARCH_UNMAPPED)
|
||||
config_set_int(conf, stk_ident[k],
|
||||
-1);
|
||||
else
|
||||
config_unset(conf,key_ident[j]);
|
||||
config_unset(conf,btn_ident[j]);
|
||||
}
|
||||
}
|
||||
snprintf(s1, sizeof(s1), "input_libretro_device_p%u", i + 1);
|
||||
@ -268,16 +294,18 @@ void input_remapping_set_defaults(bool deinit)
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
||||
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)
|
||||
settings->uints.input_remap_ids[i][j] = keybind->id;
|
||||
settings->uints.input_keymapper_ids[j] = RETROK_UNKNOWN;
|
||||
|
||||
settings->uints.input_keymapper_ids[i][j] = RETROK_UNKNOWN;
|
||||
}
|
||||
else
|
||||
settings->uints.input_remap_ids[i][j] = j;
|
||||
}
|
||||
for (j = 0; j < 4; j++)
|
||||
settings->uints.input_remap_ids[i][RARCH_FIRST_CUSTOM_BIND + j] = j;
|
||||
|
||||
if (old_analog_dpad_mode[i])
|
||||
settings->uints.input_analog_dpad_mode[i] = old_analog_dpad_mode[i];
|
||||
|
@ -1037,6 +1037,8 @@ MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS,
|
||||
"thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_LEFT_THUMBNAILS,
|
||||
"left thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_XMB_VERTICAL_THUMBNAILS,
|
||||
"xmb_vertical_thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_DIRECTORY,
|
||||
"thumbnails_directory")
|
||||
MSG_HASH(MENU_ENUM_LABEL_THUMBNAILS_UPDATER_LIST,
|
||||
|
@ -1,4 +1,4 @@
|
||||
MSG_HASH(MSG_COMPILER,
|
||||
MSG_HASH(MSG_COMPILER,
|
||||
"Compilador"
|
||||
)
|
||||
MSG_HASH(MSG_UNKNOWN_COMPILER,
|
||||
@ -37,6 +37,42 @@ MSG_HASH(MSG_NETPLAY_YOU_HAVE_LEFT_THE_GAME,
|
||||
MSG_HASH(MSG_NETPLAY_YOU_HAVE_JOINED_AS_PLAYER_N,
|
||||
"Você se juntou como jogador %u"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_YOU_HAVE_JOINED_WITH_INPUT_DEVICES_S,
|
||||
"Você se juntou aos dispositivos de entrada %.*s"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_PLAYER_S_LEFT,
|
||||
"O jogador %.*s deixou o jogo"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_S_HAS_JOINED_AS_PLAYER_N,
|
||||
"%.*s se juntou como jogador %u"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_S_HAS_JOINED_WITH_INPUT_DEVICES_S,
|
||||
"%.*s juntou-se a dispositivos de entrada %.*s"
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_NOT_RETROARCH,
|
||||
"Uma tentativa de conexão com o netplay falhou porque o par não está executando o RetroArch ou está executando uma versão antiga do RetroArch."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_OUT_OF_DATE,
|
||||
"O par netplay está executando uma versão antiga do RetroArch. Não pode conectar."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_DIFFERENT_VERSIONS,
|
||||
"ATENÇÃO: Um par de Netplay está executando uma versão diferente do RetroArch. Se ocorrerem problemas, use a mesma versão."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_DIFFERENT_CORES,
|
||||
"Um par de netplay está executando um núcleo diferente. Não pode conectar."
|
||||
)
|
||||
MSG_HASH(
|
||||
MSG_NETPLAY_DIFFERENT_CORE_VERSIONS,
|
||||
"ATENÇÃO: Um par de Netplay está executando uma versão diferente do núcleo. Se ocorrerem problemas, use a mesma versão."
|
||||
)
|
||||
MSG_HASH(MSG_NETPLAY_ENDIAN_DEPENDENT,
|
||||
"Este núcleo não suporta Netplay inter-arquitetura entre estes sistemas"
|
||||
)
|
||||
@ -316,6 +352,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_DESCRIPTION,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_HARDCORE_MODE_ENABLE,
|
||||
"Conquistas no Modo Hardcore"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
"Tabelas de Classificação"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE,
|
||||
"Insígnias de Conquistas"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
"Conquistas Bloqueadas:"
|
||||
)
|
||||
@ -328,16 +372,26 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_SETTINGS,
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_TEST_UNOFFICIAL,
|
||||
"Testar Conquistas Não Oficiais"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Modo Detalhado das Conquistas"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
||||
"Conquistas Desbloqueadas:"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY,
|
||||
"Desbloqueada"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT,
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE,
|
||||
"Hardcore"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Conquistas Modo Verboso"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_AUTO_SCREENSHOT,
|
||||
"Captura de Conquistas Automática"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CLOSE_CONTENT,
|
||||
"Fechar Conteúdo"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_CONFIG,
|
||||
@ -1189,14 +1243,32 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PASSWORD,
|
||||
"Senha do Servidor"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_PUBLIC_ANNOUNCE,
|
||||
"Anunciar Netplay Publicamente"
|
||||
)
|
||||
"Anunciar Netplay Publicamente")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_REQUEST_DEVICE_I,
|
||||
"Solicitar Dispositivo %u")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_REQUIRE_SLAVES,
|
||||
"Não Permitir Clientes em Modo Não Escravo"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SETTINGS,
|
||||
"Configurações do Netplay"
|
||||
)
|
||||
"Configurações do Netplay")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG,
|
||||
"Compartilhamento de Entrada Analógica")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_MAX,
|
||||
"Máximo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_ANALOG_AVERAGE,
|
||||
"Médio")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL,
|
||||
"Compartilhamento de Entrada Digital")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_OR,
|
||||
"Compartilhar")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_XOR,
|
||||
"Agarrar")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_DIGITAL_VOTE,
|
||||
"Eleger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NONE,
|
||||
"Nenhum")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_SHARE_NO_PREFERENCE,
|
||||
"Sem preferência")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_START_AS_SPECTATOR,
|
||||
"Modo Espectador do Netplay"
|
||||
)
|
||||
@ -1933,8 +2005,9 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THREADED_DATA_RUNLOOP_ENABLE,
|
||||
"Paralelismo de tarefas"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS,
|
||||
"Miniaturas"
|
||||
)
|
||||
"Miniaturas")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS,
|
||||
"Miniaturas à esquerda")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
|
||||
"Miniaturas"
|
||||
)
|
||||
@ -2335,11 +2408,15 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL,
|
||||
"Habilitar ou desabilitar conquistas não oficiais e/ou recursos beta para fins de teste."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
|
||||
"Habilitar ou desabilitar Estado de Jogo, Trapaças, Voltar Atrás, Avanço Rápido, Pausa e Câmera Lenta para todos os jogos."
|
||||
)
|
||||
"Habilitar ou desabilitar Estado de Jogo, Trapaças, Voltar Atrás, Avanço Rápido, Pausa e Câmera Lenta para todos os jogos.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
"Ativar ou desativar tabelas de classificação no jogo. Não tem efeito se o modo Hardcore estiver desativado.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE,
|
||||
"Ativar ou desativar a exibição de insígnia na Lista de Conquistas.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Habilitar ou desabilitar detalhes das conquistas na tela."
|
||||
)
|
||||
"Habilitar ou desabilitar detalhes das conquistas na tela.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_AUTO_SCREENSHOT,
|
||||
"Obter automaticamente uma captura de tela quando uma conquista é acionada.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS,
|
||||
"Alterar os drivers utilizados pelo sistema."
|
||||
)
|
||||
@ -2748,6 +2825,46 @@ MSG_HASH(MSG_FAILED_TO_UNDO_LOAD_STATE,
|
||||
MSG_HASH(MSG_FAILED_TO_UNDO_SAVE_STATE,
|
||||
"Falha em desfazer o salvamento de Estado de Jogo."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE,
|
||||
"Mostrar miniaturas de estados salvos dentro do menu."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL,
|
||||
"Salvar automaticamente o Save RAM 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."
|
||||
)
|
||||
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."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE,
|
||||
"Ativa a detecção automática de entrada. Tentará autoconfigurar joypads, estilo Plug-and-Play."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
"Troca de botões para OK/Cancelar. Desabilitado é o estilo de botão japonês, habilitada é oestilo ocidental."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO,
|
||||
"Se desabilitado, o conteúdo continuará sendo executado em segundo plano quando o menu do RetroArch for alternado."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_VIDEO_DRIVER,
|
||||
"Driver de vídeo para usar."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_AUDIO_DRIVER,
|
||||
"Driver de áudio para usar."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_INPUT_DRIVER,
|
||||
"Driver de entrada para usar. Dependendo do driver de vídeo, pode forçar um driver de entrada diferente."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_JOYPAD_DRIVER,
|
||||
"Driver do Joypad para usar."
|
||||
)
|
||||
MSG_HASH(MSG_FAILED_TO_UNMUTE_AUDIO,
|
||||
"Falha em desativar o áudio mudo."
|
||||
)
|
||||
@ -3414,36 +3531,6 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_SAVE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_SAVESTATE_AUTO_LOAD,
|
||||
"Autocarrega o último Estado de Jogo autosalvo na inicialização do RetroArch."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_SAVESTATE_THUMBNAIL_ENABLE,
|
||||
"Exibe miniaturas dos Estados de Jogo salvos dentro do menu."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUTOSAVE_INTERVAL,
|
||||
"Salva automaticamente a SRAM não volátil em um intervalo regular. Isto é desativado por padrão a menos que seja definido de outra forma. O intervalo é medido em segundos. O valor 0 desativa o salvamento automático."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_REMAP_BINDS_ENABLE,
|
||||
"Se habilitado, substitui os vínculos de entrada com os vínculos remapeados definidos pelo núcleo atual."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_INPUT_AUTODETECT_ENABLE,
|
||||
"Habilita a detecção automática de entrada. Isto tentará configurar automaticamente Joypads no estilo 'Plug-and-Play'."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_INPUT_SWAP_OK_CANCEL,
|
||||
"Inverte os botões para OK/Cancelar. Desabilitado é o estilo japonês, habilitado é o estilo ocidental."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_PAUSE_LIBRETRO,
|
||||
"Se desabilitado, o conteúdo continuará rodando em segundo plano quando o menu do RetroArch é alternado."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_VIDEO_DRIVER,
|
||||
"Driver de vídeo a ser utilizado."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_DRIVER,
|
||||
"Driver de áudio a ser utilizado."
|
||||
)
|
||||
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."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_JOYPAD_DRIVER,
|
||||
"Driver de Joypad a ser utilizado."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_DRIVER,
|
||||
"Driver de reamostragem de áudio a ser utilizado."
|
||||
)
|
||||
@ -3537,6 +3624,10 @@ MSG_HASH(MENU_ENUM_SUBLABEL_POINTER_ENABLE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_THUMBNAILS,
|
||||
"Tipo de miniatura a ser exibida."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS,
|
||||
"Tipo de miniatura para exibir à esquerda."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE,
|
||||
"Exibir data e/ou hora atuais dentro do menu."
|
||||
)
|
||||
@ -3570,6 +3661,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_SORT_SAVEFILES_ENABLE,
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_SORT_SAVESTATES_ENABLE,
|
||||
"Ordenar os Estados de Jogo em pastas com o nome do núcleo utilizado."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_REQUEST_DEVICE_I,
|
||||
"Solicitar jogar com o dispositivo de entrada dado.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CORE_UPDATER_BUILDBOT_URL,
|
||||
"URL para o diretório de atualização de núcleos no buildbot do Libreto."
|
||||
)
|
||||
@ -3907,8 +4000,11 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_USE_MITM_SERVER,
|
||||
"Utilizar Servidor MITM"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_USE_MITM_SERVER,
|
||||
"Encaminhar conexões do Netplay através de um servidor 'homem no meio' (MITM). Útil se o hospedeiro estiver atrás de um firewall ou tiver problemas de NAT/UPnP."
|
||||
)
|
||||
"Encaminhar conexões do Netplay através de um servidor 'homem no meio' (MITM). Útil se o hospedeiro estiver atrás de um firewall ou tiver problemas de NAT/UPnP.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_NETPLAY_MITM_SERVER,
|
||||
"Localização do Servidor de Retransmissão")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_NETPLAY_MITM_SERVER,
|
||||
"Escolha um servidor de retransmissão específico para usar. Locais geograficamente mais próximos tendem a ter menor latência.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_MIXER,
|
||||
"Adicionar ao mixer"
|
||||
)
|
||||
@ -3940,9 +4036,9 @@ MSG_HASH(MENU_ENUM_SUBLABEL_MENU_SHOW_ONLINE_UPDATER,
|
||||
"Exibir a opção 'Atualizador Online'."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_VIEWS_SETTINGS,
|
||||
"Visualizações"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS,
|
||||
"Visualizações")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS,
|
||||
"Exibir elementos na tela de menu."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_CORE_UPDATER,
|
||||
@ -3958,14 +4054,7 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_DELETE,
|
||||
"Remover núcleo"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CORE_DELETE,
|
||||
"Remover este núcleo do disco."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_RENAME_ENTRY,
|
||||
"Renomear o título do item."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY,
|
||||
"Renomear"
|
||||
)
|
||||
"Remover este núcleo do disco.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_FRAMEBUFFER_OPACITY,
|
||||
"Opacidade do Framebuffer"
|
||||
)
|
||||
@ -4027,8 +4116,11 @@ MSG_HASH(MENU_ENUM_SUBLABEL_PLAYLIST_ENTRY_RENAME,
|
||||
"Permita que o usuário renomeie as entradas nas coleções."
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME,
|
||||
"Permitir renomear entradas"
|
||||
)
|
||||
"Permitir renomear entradas" )
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_RENAME_ENTRY,
|
||||
"Renomear o título da entrada.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RENAME_ENTRY,
|
||||
"Renomear")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_SHOW_LOAD_CORE,
|
||||
"Exibir Carregar Núcleo"
|
||||
)
|
||||
@ -4141,8 +4233,17 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_QUICK_MENU_SHOW_INFORMATION,
|
||||
"Exibir Informação"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_QUICK_MENU_SHOW_INFORMATION,
|
||||
"Exibir/ocultar a opção 'Informação'."
|
||||
)
|
||||
"Exibir/ocultar a opção 'Informação'.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_ENABLE,
|
||||
"Ativar Notificação de Fundo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_RED,
|
||||
"Notificação de Fundo em Cor Vermelha")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_GREEN,
|
||||
"Notificação de Fundo em Cor Verde")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_BLUE,
|
||||
"Notificação de Fundo em Cor Azul")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_BGCOLOR_OPACITY,
|
||||
"Opacidade da Notificação de Fundo")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_MENU_DISABLE_KIOSK_MODE,
|
||||
"Desabilitar o Modo Quiosque"
|
||||
)
|
||||
@ -4168,19 +4269,40 @@ MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_OK,
|
||||
"Senha correta."
|
||||
)
|
||||
MSG_HASH(MSG_INPUT_KIOSK_MODE_PASSWORD_NOK,
|
||||
"Senha incorreta."
|
||||
)
|
||||
"Senha incorreta.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_RED,
|
||||
"Notificação em Cor Vermelha")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_GREEN,
|
||||
"Notificação em Cor Verde")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_MESSAGE_COLOR_BLUE,
|
||||
"Notificação em Cor Azul")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_FRAMECOUNT_SHOW,
|
||||
"Mostrar contagem de quadros na tela FPS")
|
||||
MSG_HASH(MSG_CONFIG_OVERRIDE_LOADED,
|
||||
"Substituição de configuração carregada.")
|
||||
MSG_HASH(MSG_GAME_REMAP_FILE_LOADED,
|
||||
"Arquivo de remapeamento do jogo carregado.")
|
||||
MSG_HASH(MSG_CORE_REMAP_FILE_LOADED,
|
||||
"Arquivo de remapeamento principal carregado.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
|
||||
"Adicione automaticamente conteúdo à lista de reprodução")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUTOMATICALLY_ADD_CONTENT_TO_PLAYLIST,
|
||||
"Verifica automaticamente o conteúdo carregado para que eles apareçam dentro das listas de reprodução.")
|
||||
MSG_HASH(MSG_SCANNING_OF_FILE_FINISHED,
|
||||
"Verificação do arquivo terminado")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_OPACITY,
|
||||
"Opacidade da Janela")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_AUDIO_RESAMPLER_QUALITY,
|
||||
"Qualidade da Reamostragem do Áudio")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_AUDIO_RESAMPLER_QUALITY,
|
||||
"Abaixe esse valor para favorecer o desempenho/baixa latência em relação à qualidade de áudio, aumente se desejar melhor qualidade de áudio à custa do desempenho/baixa latência.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SHADER_WATCH_FOR_CHANGES,
|
||||
"Ver arquivos de shader para mudanças")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_SHADER_WATCH_FOR_CHANGES,
|
||||
"Aplicar automaticamente as alterações feitas nos arquivos de shader no disco.")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_VIDEO_WINDOW_SHOW_DECORATIONS,
|
||||
"Mostrar Decorações da Janela")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_STATISTICS_SHOW,
|
||||
"Display Statistics")
|
||||
"Exibir estatísticas")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_STATISTICS_SHOW,
|
||||
"Show onscreen technical statistics.")
|
||||
"Mostrar estatísticas técnicas na tela.")
|
||||
|
@ -22,9 +22,11 @@
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../msg_hash.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#ifdef RARCH_INTERNAL
|
||||
#include "../configuration.h"
|
||||
|
||||
int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -2029,6 +2031,7 @@ int menu_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
static const char *menu_hash_to_str_us_label_enum(enum msg_hash_enums msg)
|
||||
|
@ -1633,6 +1633,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS,
|
||||
"Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_LEFT_THUMBNAILS,
|
||||
"Left Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_XMB_VERTICAL_THUMBNAILS,
|
||||
"Thumbnails Vertical Disposition")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_DIRECTORY,
|
||||
"Thumbnails")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_THUMBNAILS_UPDATER_LIST,
|
||||
@ -2932,6 +2934,9 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_LEFT_THUMBNAILS,
|
||||
"Type of thumbnail to display at the left."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_XMB_VERTICAL_THUMBNAILS,
|
||||
"Display the left thumbnail under the right one, on the right side of the screen.")
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_TIMEDATE_ENABLE,
|
||||
"Shows current date and/or time inside the menu."
|
||||
|
@ -111,7 +111,7 @@ void audio_mix_free_chunk(audio_chunk_t *chunk)
|
||||
audio_chunk_t* audio_mix_load_wav_file(const char *path, int sample_rate)
|
||||
{
|
||||
int sample_size;
|
||||
ssize_t len = 0;
|
||||
int64_t len = 0;
|
||||
void *buf = NULL;
|
||||
audio_chunk_t *chunk = (audio_chunk_t*)calloc(1, sizeof(*chunk));
|
||||
|
||||
|
@ -667,7 +667,7 @@ static void audio_mixer_mix_ogg(float* buffer, size_t num_frames,
|
||||
int i;
|
||||
struct resampler_data info;
|
||||
float temp_buffer[AUDIO_MIXER_TEMP_OGG_BUFFER];
|
||||
unsigned buf_free = num_frames * 2;
|
||||
unsigned buf_free = (unsigned)(num_frames * 2);
|
||||
unsigned temp_samples = 0;
|
||||
float* pcm = NULL;
|
||||
|
||||
@ -740,7 +740,7 @@ static void audio_mixer_mix_mod(float* buffer, size_t num_frames,
|
||||
float samplef = 0.0f;
|
||||
int samplei = 0;
|
||||
unsigned temp_samples = 0;
|
||||
unsigned buf_free = num_frames * 2;
|
||||
unsigned buf_free = (unsigned)(num_frames * 2);
|
||||
int* pcm = NULL;
|
||||
|
||||
if (voice->types.mod.position == voice->types.mod.samples)
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include <retro_common.h>
|
||||
|
||||
#include <stdio.h> /* added for _vsnprintf_s and _vscprintf on VS2015 and VS2017 */
|
||||
#include <stdarg.h>
|
||||
|
||||
#if _MSC_VER < 1800
|
||||
|
@ -129,7 +129,7 @@ static void file_archive_free(file_archive_file_data_t *data)
|
||||
|
||||
static file_archive_file_data_t* file_archive_open(const char *path)
|
||||
{
|
||||
ssize_t ret = -1;
|
||||
int64_t ret = -1;
|
||||
bool read_from_file = false;
|
||||
file_archive_file_data_t *data = (file_archive_file_data_t*)
|
||||
calloc(1, sizeof(*data));
|
||||
@ -722,7 +722,7 @@ error:
|
||||
*/
|
||||
int file_archive_compressed_read(
|
||||
const char * path, void **buf,
|
||||
const char* optional_filename, ssize_t *length)
|
||||
const char* optional_filename, int64_t *length)
|
||||
{
|
||||
const struct file_archive_file_backend *backend = NULL;
|
||||
int ret = 0;
|
||||
|
@ -106,8 +106,14 @@ struct RDIR *retro_opendir(const char *name)
|
||||
wchar_t *path_wide = NULL;
|
||||
unsigned path_len;
|
||||
#endif
|
||||
struct RDIR *rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
||||
struct RDIR *rdir;
|
||||
|
||||
/*Reject null or empty string paths*/
|
||||
if (!name||(*name==0))
|
||||
return NULL;
|
||||
|
||||
/*Allocate RDIR struct. Tidied later with retro_closedir*/
|
||||
rdir = (struct RDIR*)calloc(1, sizeof(*rdir));
|
||||
if (!rdir)
|
||||
return NULL;
|
||||
|
||||
|
@ -405,9 +405,10 @@ void *lzma_fast_alloc(void *p, size_t size)
|
||||
}
|
||||
|
||||
/* alloc a new one and put it into the list */
|
||||
addr = (uint32_t *)malloc(sizeof(uint8_t) * (size + sizeof(uint32_t)));
|
||||
if (addr==NULL)
|
||||
addr = (uint32_t *)malloc(sizeof(uint32_t) * (size + sizeof(uint32_t)));
|
||||
if (!addr)
|
||||
return NULL;
|
||||
|
||||
for (scan = 0; scan < MAX_LZMA_ALLOCS; scan++)
|
||||
{
|
||||
if (codec->allocptr[scan] == NULL)
|
||||
|
@ -2207,7 +2207,7 @@ static bool glsm_state_ctx_init(void *data)
|
||||
#ifdef CORE
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||
hw_render.version_major = 3;
|
||||
hw_render.version_minor = 1;
|
||||
hw_render.version_minor = 3;
|
||||
#else
|
||||
hw_render.context_type = RETRO_HW_CONTEXT_OPENGL;
|
||||
#endif
|
||||
|
@ -187,7 +187,7 @@ bool file_archive_perform_mode(const char *name, const char *valid_exts,
|
||||
|
||||
int file_archive_compressed_read(
|
||||
const char* path, void **buf,
|
||||
const char* optional_filename, ssize_t *length);
|
||||
const char* optional_filename, int64_t *length);
|
||||
|
||||
const struct file_archive_file_backend* file_archive_get_zlib_file_backend(void);
|
||||
const struct file_archive_file_backend* file_archive_get_7z_file_backend(void);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/* Copyright (C) 2010-2016 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this libretro API header (libretro_vulkan.h)
|
||||
* The following license statement only applies to this libretro API header (libretro_d3d.h)
|
||||
* ---------------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
|
@ -32,6 +32,16 @@ RETRO_BEGIN_DECLS
|
||||
|
||||
typedef struct RDIR RDIR;
|
||||
|
||||
/**
|
||||
*
|
||||
* retro_opendir:
|
||||
* @name : path to the directory to open.
|
||||
*
|
||||
* Opens a directory for reading. Tidy up with retro_closedir.
|
||||
*
|
||||
* Returns: RDIR pointer on success, NULL if name is not a
|
||||
* valid directory, null itself or the empty string.
|
||||
*/
|
||||
struct RDIR *retro_opendir(const char *name);
|
||||
|
||||
int retro_readdir(struct RDIR *rdir);
|
||||
|
@ -49,11 +49,11 @@ int chdstream_getc(chdstream_t *stream);
|
||||
|
||||
char *chdstream_gets(chdstream_t *stream, char *buffer, size_t len);
|
||||
|
||||
size_t chdstream_tell(chdstream_t *stream);
|
||||
uint64_t chdstream_tell(chdstream_t *stream);
|
||||
|
||||
void chdstream_rewind(chdstream_t *stream);
|
||||
|
||||
int chdstream_seek(chdstream_t *stream, ssize_t offset, int whence);
|
||||
int64_t chdstream_seek(chdstream_t *stream, int64_t offset, int whence);
|
||||
|
||||
ssize_t chdstream_get_size(chdstream_t *stream);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user