Merge branch 'master' into cheevos_loaded
|
@ -95,8 +95,6 @@ pkg/apple/iOS/modules/
|
|||
obj-unix/
|
||||
.vagrant/
|
||||
|
||||
.MAKEFILE_DEFINES
|
||||
.CONFIG_DEFINES
|
||||
/pkg/msvc/Release Cg/*.exe
|
||||
/pkg/msvc/Release Cg/*.iobj
|
||||
/pkg/msvc/Release Cg/*.ipdb
|
||||
|
|
|
@ -1,4 +1,9 @@
|
|||
# 1.6.9 (future)
|
||||
# 1.7.0 (future)
|
||||
- CHEEVOS: Add badges
|
||||
|
||||
# 1.6.9
|
||||
- COMMON: Small memory leak.
|
||||
- NETPLAY: Fix network command only working once.
|
||||
|
||||
# 1.6.8
|
||||
- Audio: Fix the Audio DSP picker
|
||||
|
@ -51,6 +56,7 @@
|
|||
- SCANNER: Support CHD files.
|
||||
- SCANNER: Support Gamecube ISO scanning.
|
||||
- SCANNER: Use primary data track of disc images for CRC lookups rather than cue files. This is slower but finds matches more reliably, and is necessary for CHD files to work at all. Update your databases!
|
||||
- SCANNER: Fall back on looking inside archives when matching MAME/FBA content (most recent cores only). If you had difficulty with content being detected before, you may have better luck now. Update your databases and core info!
|
||||
|
||||
# 1.6.7
|
||||
- SCANNER: Fix directory scanning.
|
||||
|
|
12
Makefile
|
@ -119,10 +119,16 @@ endif
|
|||
|
||||
RARCH_OBJ := $(addprefix $(OBJDIR)/,$(OBJ))
|
||||
|
||||
ifneq ($(X86),)
|
||||
CFLAGS += -m32
|
||||
CXXLAGS += -m32
|
||||
LDFLAGS += -m32
|
||||
endif
|
||||
|
||||
ifneq ($(SANITIZER),)
|
||||
CFLAGS := -fsanitize=$(SANITIZER) $(CFLAGS)
|
||||
CXXFLAGS := -fsanitize=$(SANITIZER) $(CXXFLAGS)
|
||||
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
||||
CFLAGS := -fsanitize=$(SANITIZER) $(CFLAGS)
|
||||
CXXFLAGS := -fsanitize=$(SANITIZER) $(CXXFLAGS)
|
||||
LDFLAGS := -fsanitize=$(SANITIZER) $(LDFLAGS)
|
||||
endif
|
||||
|
||||
ifneq ($(findstring $(GPERFTOOLS),profiler),)
|
||||
|
|
|
@ -184,6 +184,10 @@ OBJ += frontend/frontend.o \
|
|||
setting_list.o \
|
||||
list_special.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_linux.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_unixmmap.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_windowsmmap.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_intf.o \
|
||||
$(LIBRETRO_COMM_DIR)/file/file_path.o \
|
||||
file_path_special.o \
|
||||
file_path_str.o \
|
||||
|
@ -318,7 +322,7 @@ endif
|
|||
endif
|
||||
|
||||
ifeq ($(HAVE_SSA),1)
|
||||
LIBS += -lass
|
||||
LIBS += $(SSA_LIBS)
|
||||
endif
|
||||
|
||||
# LibretroDB
|
||||
|
@ -597,7 +601,7 @@ ifeq ($(HAVE_AL), 1)
|
|||
ifeq ($(OSX),1)
|
||||
LIBS += -framework OpenAL
|
||||
else
|
||||
LIBS += -lopenal
|
||||
LIBS += $(AL_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -808,7 +812,7 @@ ifeq ($(HAVE_THREADS), 1)
|
|||
audio/audio_thread_wrapper.o
|
||||
DEFINES += -DHAVE_THREADS
|
||||
ifeq ($(findstring Haiku,$(OS)),)
|
||||
LIBS += -lpthread
|
||||
LIBS += $(THREADS_LIBS)
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -1062,7 +1066,7 @@ endif
|
|||
else
|
||||
DEFINES += -DHAVE_GL_SYNC
|
||||
OBJ += $(LIBRETRO_COMM_DIR)/glsym/glsym_gl.o
|
||||
GL_LIBS := -lGL
|
||||
GL_LIBS := $(OPENGL_LIBS)
|
||||
ifeq ($(OSX), 1)
|
||||
GL_LIBS := -framework OpenGL
|
||||
OBJ += gfx/drivers_context/cgl_ctx.o
|
||||
|
@ -1476,6 +1480,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
|||
OBJ += cheevos/cheevos.o \
|
||||
cheevos/var.o \
|
||||
cheevos/cond.o \
|
||||
cheevos/badges.o \
|
||||
$(LIBRETRO_COMM_DIR)/utils/md5.o
|
||||
endif
|
||||
|
||||
|
@ -1507,7 +1512,7 @@ ifeq ($(HAVE_NETWORKING), 1)
|
|||
$(DEPS_DIR)/miniupnpc/minixml.o \
|
||||
$(DEPS_DIR)/miniupnpc/minisoap.o
|
||||
else
|
||||
LIBS += -lminiupnpc
|
||||
LIBS += $(MINIUPNPC_LIBS)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
|
28
Makefile.ctr
|
@ -14,16 +14,16 @@ APP_DESCRIPTION = Retroarch 3DS
|
|||
APP_AUTHOR = Team Libretro
|
||||
APP_PRODUCT_CODE = RETROARCH-3DS
|
||||
APP_UNIQUE_ID = 0xBAC00
|
||||
APP_ICON = ctr/assets/default.png
|
||||
APP_BANNER = ctr/assets/libretro_banner.png
|
||||
APP_AUDIO = ctr/assets/silent.wav
|
||||
APP_RSF = ctr/tools/template.rsf
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
APP_AUDIO = pkg/ctr/assets/silent.wav
|
||||
APP_RSF = pkg/ctr/tools/template.rsf
|
||||
APP_SYSTEM_MODE = 64MB
|
||||
APP_SYSTEM_MODE_EXT = 124MB
|
||||
APP_BIG_TEXT_SECTION = 0
|
||||
APP_USE_SVCHAX = 0
|
||||
|
||||
include ctr/Makefile.cores
|
||||
include pkg/ctr/Makefile.cores
|
||||
|
||||
OBJ :=
|
||||
OBJ += gfx/drivers/ctr_shaders/ctr_sprite.o
|
||||
|
@ -190,14 +190,14 @@ NM := $(PREFIX)nm
|
|||
LD := $(CXX)
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
MAKEROM = ctr/tools/makerom-linux
|
||||
BANNERTOOL = ctr/tools/bannertool-linux
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
MAKEROM = ctr/tools/makerom-mac
|
||||
BANNERTOOL = ctr/tools/bannertool-mac
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
else
|
||||
MAKEROM = ctr/tools/makerom.exe
|
||||
BANNERTOOL = ctr/tools/bannertool.exe
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
|
@ -228,15 +228,15 @@ endif
|
|||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
cp ctr/big_text_section.xml $(TARGET).xml
|
||||
cp pkg/ctr/big_text_section.xml $(TARGET).xml
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
-3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
$(DEVKITPRO)/devkitARM/bin/3dsxtool $< $@ $(_3DSXFLAGS)
|
||||
|
||||
$(TARGET).elf: ctr/3dsx_custom_crt0.o
|
||||
$(LD) $(LDFLAGS) $(OBJ) $(LIBDIRS) $(LIBS) -o $@
|
||||
|
|
|
@ -11,10 +11,10 @@ APP_DESCRIPTION = Retroarch 3DS
|
|||
APP_AUTHOR = Team Libretro
|
||||
APP_PRODUCT_CODE = RETROARCH-3DS
|
||||
APP_UNIQUE_ID = 0xBAC00
|
||||
APP_ICON = ctr/assets/default.png
|
||||
APP_BANNER = ctr/assets/libretro_banner.png
|
||||
APP_AUDIO = ctr/assets/silent.wav
|
||||
APP_RSF = ctr/tools/template.rsf
|
||||
APP_ICON = pkg/ctr/assets/default.png
|
||||
APP_BANNER = pkg/ctr/assets/libretro_banner.png
|
||||
APP_AUDIO = pkg/ctr/assets/silent.wav
|
||||
APP_RSF = pkg/ctr/tools/template.rsf
|
||||
APP_SYSTEM_MODE = 64MB
|
||||
APP_SYSTEM_MODE_EXT = 124MB
|
||||
|
||||
|
@ -44,7 +44,7 @@ ifeq ($(strip $(DEVKITPRO)),)
|
|||
endif
|
||||
|
||||
ifeq ($(strip $(CTRULIB)),)
|
||||
CTRULIB = $(DEVKITPRO)/ctrulib
|
||||
CTRULIB = $(DEVKITPRO)/libctru
|
||||
endif
|
||||
|
||||
APP_TITLE := $(shell echo "$(APP_TITLE)" | cut -c1-128)
|
||||
|
@ -122,14 +122,14 @@ NM := $(PREFIX)nm
|
|||
LD := $(CXX)
|
||||
|
||||
ifneq ($(findstring Linux,$(shell uname -a)),)
|
||||
MAKEROM = ctr/tools/makerom-linux
|
||||
BANNERTOOL = ctr/tools/bannertool-linux
|
||||
MAKEROM = pkg/ctr/tools/makerom-linux
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-linux
|
||||
else ifneq ($(findstring Darwin,$(shell uname -a)),)
|
||||
MAKEROM = ctr/tools/makerom-mac
|
||||
BANNERTOOL = ctr/tools/bannertool-mac
|
||||
MAKEROM = pkg/ctr/tools/makerom-mac
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool-mac
|
||||
else
|
||||
MAKEROM = ctr/tools/makerom.exe
|
||||
BANNERTOOL = ctr/tools/bannertool.exe
|
||||
MAKEROM = pkg/ctr/tools/makerom.exe
|
||||
BANNERTOOL = pkg/ctr/tools/bannertool.exe
|
||||
endif
|
||||
|
||||
%.o: %.vsh %.gsh
|
||||
|
@ -160,11 +160,11 @@ endif
|
|||
%.vsh:
|
||||
|
||||
$(TARGET).smdh: $(APP_ICON)
|
||||
smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
$(DEVKITPRO)/devkitARM/bin/smdhtool --create "$(APP_TITLE)" "$(APP_DESCRIPTION)" "$(APP_AUTHOR)" $(APP_ICON) $@
|
||||
|
||||
$(TARGET).3dsx: $(TARGET).elf
|
||||
ifeq ($(APP_BIG_TEXT_SECTION), 1)
|
||||
cp ctr/big_text_section.xml $(TARGET).xml
|
||||
cp pkg/ctr/big_text_section.xml $(TARGET).xml
|
||||
else
|
||||
rm -f $(TARGET).xml
|
||||
endif
|
||||
|
|
|
@ -0,0 +1,54 @@
|
|||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <streams/file_stream.h>
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../configuration.h"
|
||||
#include "../verbosity.h"
|
||||
#include "../network/net_http_special.h"
|
||||
|
||||
#include "badges.h"
|
||||
|
||||
badges_ctx_t badges_ctx;
|
||||
|
||||
bool badge_exists(const char* filepath)
|
||||
{
|
||||
if(path_file_exists(filepath))
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i)
|
||||
{
|
||||
const char * locked_suffix = (badges->badge_locked[i] == true) ? "_lock.png" : ".png";
|
||||
|
||||
unsigned int bufferSize = 16;
|
||||
char badge_file[bufferSize];
|
||||
|
||||
snprintf(badge_file, bufferSize, "%s", badges->badge_id_list[i]);
|
||||
strcat(badge_file, locked_suffix);
|
||||
|
||||
char fullpath[PATH_MAX_LENGTH];
|
||||
fill_pathname_application_special(fullpath,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
menu_display_reset_textures_list(badge_file, fullpath, &badges->menu_texture_list[i],TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||
}
|
||||
|
||||
void set_badge_info (badges_ctx_t *badge_struct, int id, const char *badge_id, bool active)
|
||||
{
|
||||
badge_struct->badge_id_list[id] = badge_id;
|
||||
badge_struct->badge_locked[id] = active;
|
||||
set_badge_menu_texture(badge_struct, id);
|
||||
}
|
||||
|
||||
menu_texture_item get_badge_texture (int id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!settings->bools.cheevos_badges_enable)
|
||||
return (menu_texture_item)NULL;
|
||||
|
||||
return badges_ctx.menu_texture_list[id];
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef __RARCH_BADGE_H
|
||||
#define __RARCH_BADGE_H
|
||||
|
||||
#include "../menu/menu_driver.h"
|
||||
|
||||
#include <retro_common_api.h>
|
||||
|
||||
RETRO_BEGIN_DECLS
|
||||
|
||||
#define CHEEVOS_BADGE_LIMIT 256
|
||||
|
||||
typedef struct
|
||||
{
|
||||
bool badge_locked[CHEEVOS_BADGE_LIMIT];
|
||||
const char * badge_id_list[CHEEVOS_BADGE_LIMIT];
|
||||
menu_texture_item menu_texture_list[CHEEVOS_BADGE_LIMIT];
|
||||
} badges_ctx_t;
|
||||
|
||||
bool badge_exists(const char* filepath);
|
||||
void set_badge_menu_texture(badges_ctx_t * badges, int i);
|
||||
extern void set_badge_info (badges_ctx_t *badge_struct, int id, const char *badge_id, bool active);
|
||||
extern menu_texture_item get_badge_texture(int id);
|
||||
|
||||
extern badges_ctx_t badges_ctx;
|
||||
static badges_ctx_t new_badges_ctx;
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
|
@ -16,6 +16,8 @@
|
|||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
#include <formats/jsonsax.h>
|
||||
#include <streams/file_stream.h>
|
||||
#include <features/features_cpu.h>
|
||||
|
@ -35,10 +37,12 @@
|
|||
#include "../menu/menu_entries.h"
|
||||
#endif
|
||||
|
||||
#include "badges.h"
|
||||
#include "cheevos.h"
|
||||
#include "var.h"
|
||||
#include "cond.h"
|
||||
|
||||
#include "../file_path_special.h"
|
||||
#include "../command.h"
|
||||
#include "../dynamic.h"
|
||||
#include "../configuration.h"
|
||||
|
@ -76,6 +80,9 @@
|
|||
* THE USER'S PASSWORD, TAKE CARE! */
|
||||
#undef CHEEVOS_LOG_PASSWORD
|
||||
|
||||
/* Define this macro to log downloaded badge images. */
|
||||
#undef CHEEVOS_LOG_BADGES
|
||||
|
||||
/* C89 wants only int values in enums. */
|
||||
#define CHEEVOS_JSON_KEY_GAMEID 0xb4960eecU
|
||||
#define CHEEVOS_JSON_KEY_ACHIEVEMENTS 0x69749ae1U
|
||||
|
@ -498,6 +505,8 @@ static void cheevos_add_var(const cheevos_var_t* var, char** memaddr,
|
|||
{
|
||||
if (var->type == CHEEVOS_VAR_TYPE_DELTA_MEM)
|
||||
cheevos_add_char(memaddr, left, 'd');
|
||||
else if (var->is_bcd)
|
||||
cheevos_add_char(memaddr, left, 'b');
|
||||
|
||||
cheevos_add_string(memaddr, left, "0x");
|
||||
cheevos_add_var_size(memaddr, left, var);
|
||||
|
@ -840,24 +849,27 @@ static unsigned cheevos_count_cond_sets(const char *memaddr)
|
|||
|
||||
static int cheevos_parse_condition(cheevos_condition_t *condition, const char* memaddr)
|
||||
{
|
||||
if (!condition)
|
||||
return 0;
|
||||
|
||||
condition->count = cheevos_count_cond_sets(memaddr);
|
||||
|
||||
if (condition->count)
|
||||
{
|
||||
unsigned set = 0;
|
||||
cheevos_condset_t *condset = NULL;
|
||||
cheevos_condset_t *conds = NULL;
|
||||
const cheevos_condset_t* end = NULL;
|
||||
cheevos_condset_t *conds = NULL;
|
||||
cheevos_condset_t *condset = NULL;
|
||||
cheevos_condset_t *condsets = (cheevos_condset_t*)
|
||||
calloc(condition->count, sizeof(cheevos_condset_t));
|
||||
|
||||
(void)conds;
|
||||
|
||||
condition->condsets = (cheevos_condset_t*)
|
||||
calloc(condition->count, sizeof(cheevos_condset_t));
|
||||
|
||||
if (!condition->condsets)
|
||||
if (!condsets)
|
||||
return -1;
|
||||
|
||||
end = condition->condsets + condition->count;
|
||||
condition->condsets = condsets;
|
||||
end = condition->condsets + condition->count;
|
||||
|
||||
for (condset = condition->condsets; condset < end; condset++, set++)
|
||||
{
|
||||
|
@ -930,8 +942,12 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
|
|||
expr->count = 1;
|
||||
expr->compare_count = 1;
|
||||
|
||||
for (aux = mem; *aux != '"'; aux++)
|
||||
for (aux = mem;; aux++)
|
||||
{
|
||||
if(*aux == '"' || *aux == ':')
|
||||
break;
|
||||
expr->count += *aux == '_';
|
||||
}
|
||||
|
||||
expr->terms = (cheevos_term_t*)calloc(expr->count, sizeof(cheevos_term_t));
|
||||
|
||||
|
@ -1005,10 +1021,10 @@ static int cheevos_parse_expression(cheevos_expr_t *expr, const char* mem)
|
|||
|
||||
static int cheevos_parse_mem(cheevos_leaderboard_t *lb, const char* mem)
|
||||
{
|
||||
lb->start.condsets = NULL;
|
||||
lb->start.condsets = NULL;
|
||||
lb->cancel.condsets = NULL;
|
||||
lb->submit.condsets = NULL;
|
||||
lb->value.terms = NULL;
|
||||
lb->value.terms = NULL;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
|
@ -1032,8 +1048,6 @@ static int cheevos_parse_mem(cheevos_leaderboard_t *lb, const char* mem)
|
|||
if (cheevos_parse_expression(&lb->value, mem + 4))
|
||||
goto error;
|
||||
}
|
||||
else
|
||||
goto error;
|
||||
|
||||
for (mem += 4;; mem++)
|
||||
{
|
||||
|
@ -2098,7 +2112,7 @@ void cheevos_reset_game(void)
|
|||
cheevo->last = 1;
|
||||
}
|
||||
|
||||
void cheevos_populate_menu(void *data, bool hardcore)
|
||||
void cheevos_populate_menu(void *data)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
unsigned i;
|
||||
|
@ -2111,39 +2125,30 @@ void cheevos_populate_menu(void *data, bool hardcore)
|
|||
|
||||
for (i = 0; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (!hardcore)
|
||||
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_HARDCORE))
|
||||
{
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_SOFTCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY_HARDCORE,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_HARDCORE));
|
||||
}
|
||||
else if (!(cheevo->active & CHEEVOS_ACTIVE_SOFTCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_SOFTCORE));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_HARDCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_SOFTCORE));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2155,39 +2160,29 @@ void cheevos_populate_menu(void *data, bool hardcore)
|
|||
|
||||
for (i = cheevos_locals.core.count; cheevo < end; i++, cheevo++)
|
||||
{
|
||||
if (!hardcore)
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_HARDCORE))
|
||||
{
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_SOFTCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY_HARDCORE,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_HARDCORE));
|
||||
}
|
||||
else if (!(cheevo->active & CHEEVOS_ACTIVE_SOFTCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_SOFTCORE));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(cheevo->active & CHEEVOS_ACTIVE_HARDCORE))
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
else
|
||||
{
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
}
|
||||
menu_entries_append_enum(info->list, cheevo->title,
|
||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
||||
items_found++;
|
||||
set_badge_info(&badges_ctx, i, cheevo->badge, (cheevo->active & CHEEVOS_ACTIVE_SOFTCORE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2479,37 +2474,47 @@ typedef struct
|
|||
char url[256]; \
|
||||
struct http_connection_t *conn; \
|
||||
struct http_t *http; \
|
||||
retro_time_t t0;
|
||||
retro_time_t t0; \
|
||||
char badge_basepath[PATH_MAX_LENGTH]; \
|
||||
char badge_fullpath[PATH_MAX_LENGTH]; \
|
||||
char badge_name[16]; \
|
||||
cheevo_t *cheevo; \
|
||||
const cheevo_t *cheevo_end;
|
||||
|
||||
#include "coro.h"
|
||||
|
||||
#define CHEEVOS_VAR_INFO CORO_VAR(info)
|
||||
#define CHEEVOS_VAR_DATA CORO_VAR(data)
|
||||
#define CHEEVOS_VAR_LEN CORO_VAR(len)
|
||||
#define CHEEVOS_VAR_PATH CORO_VAR(path)
|
||||
#define CHEEVOS_VAR_SETTINGS CORO_VAR(settings)
|
||||
#define CHEEVOS_VAR_SYSINFO CORO_VAR(sysinfo)
|
||||
#define CHEEVOS_VAR_I CORO_VAR(i)
|
||||
#define CHEEVOS_VAR_J CORO_VAR(j)
|
||||
#define CHEEVOS_VAR_K CORO_VAR(k)
|
||||
#define CHEEVOS_VAR_EXT CORO_VAR(ext)
|
||||
#define CHEEVOS_VAR_MD5 CORO_VAR(md5)
|
||||
#define CHEEVOS_VAR_HASH CORO_VAR(hash)
|
||||
#define CHEEVOS_VAR_GAMEID CORO_VAR(gameid)
|
||||
#define CHEEVOS_VAR_JSON CORO_VAR(json)
|
||||
#define CHEEVOS_VAR_COUNT CORO_VAR(count)
|
||||
#define CHEEVOS_VAR_OFFSET CORO_VAR(offset)
|
||||
#define CHEEVOS_VAR_HEADER CORO_VAR(header)
|
||||
#define CHEEVOS_VAR_ROMSIZE CORO_VAR(romsize)
|
||||
#define CHEEVOS_VAR_BYTES CORO_VAR(bytes)
|
||||
#define CHEEVOS_VAR_MAPPER CORO_VAR(mapper)
|
||||
#define CHEEVOS_VAR_ROUND CORO_VAR(round)
|
||||
#define CHEEVOS_VAR_STREAM CORO_VAR(stream)
|
||||
#define CHEEVOS_VAR_SIZE CORO_VAR(size)
|
||||
#define CHEEVOS_VAR_URL CORO_VAR(url)
|
||||
#define CHEEVOS_VAR_CONN CORO_VAR(conn)
|
||||
#define CHEEVOS_VAR_HTTP CORO_VAR(http)
|
||||
#define CHEEVOS_VAR_T0 CORO_VAR(t0)
|
||||
#define CHEEVOS_VAR_INFO CORO_VAR(info)
|
||||
#define CHEEVOS_VAR_DATA CORO_VAR(data)
|
||||
#define CHEEVOS_VAR_LEN CORO_VAR(len)
|
||||
#define CHEEVOS_VAR_PATH CORO_VAR(path)
|
||||
#define CHEEVOS_VAR_SETTINGS CORO_VAR(settings)
|
||||
#define CHEEVOS_VAR_SYSINFO CORO_VAR(sysinfo)
|
||||
#define CHEEVOS_VAR_I CORO_VAR(i)
|
||||
#define CHEEVOS_VAR_J CORO_VAR(j)
|
||||
#define CHEEVOS_VAR_K CORO_VAR(k)
|
||||
#define CHEEVOS_VAR_EXT CORO_VAR(ext)
|
||||
#define CHEEVOS_VAR_MD5 CORO_VAR(md5)
|
||||
#define CHEEVOS_VAR_HASH CORO_VAR(hash)
|
||||
#define CHEEVOS_VAR_GAMEID CORO_VAR(gameid)
|
||||
#define CHEEVOS_VAR_JSON CORO_VAR(json)
|
||||
#define CHEEVOS_VAR_COUNT CORO_VAR(count)
|
||||
#define CHEEVOS_VAR_OFFSET CORO_VAR(offset)
|
||||
#define CHEEVOS_VAR_HEADER CORO_VAR(header)
|
||||
#define CHEEVOS_VAR_ROMSIZE CORO_VAR(romsize)
|
||||
#define CHEEVOS_VAR_BYTES CORO_VAR(bytes)
|
||||
#define CHEEVOS_VAR_MAPPER CORO_VAR(mapper)
|
||||
#define CHEEVOS_VAR_ROUND CORO_VAR(round)
|
||||
#define CHEEVOS_VAR_STREAM CORO_VAR(stream)
|
||||
#define CHEEVOS_VAR_SIZE CORO_VAR(size)
|
||||
#define CHEEVOS_VAR_URL CORO_VAR(url)
|
||||
#define CHEEVOS_VAR_CONN CORO_VAR(conn)
|
||||
#define CHEEVOS_VAR_HTTP CORO_VAR(http)
|
||||
#define CHEEVOS_VAR_T0 CORO_VAR(t0)
|
||||
#define CHEEVOS_VAR_BADGE_PATH CORO_VAR(badge_fullpath)
|
||||
#define CHEEVOS_VAR_BADGE_BASE_PATH CORO_VAR(badge_fullpath)
|
||||
#define CHEEVOS_VAR_BADGE_NAME CORO_VAR(badge_name)
|
||||
#define CHEEVOS_VAR_CHEEVO_CURR CORO_VAR(cheevo)
|
||||
#define CHEEVOS_VAR_CHEEVO_END CORO_VAR(cheevo_end)
|
||||
|
||||
static int cheevos_iterate(coro_t* coro)
|
||||
{
|
||||
|
@ -2530,11 +2535,12 @@ static int cheevos_iterate(coro_t* coro)
|
|||
FILL_MD5 = -7,
|
||||
GET_GAMEID = -8,
|
||||
GET_CHEEVOS = -9,
|
||||
LOGIN = -10,
|
||||
HTTP_GET = -11,
|
||||
DEACTIVATE = -12,
|
||||
PLAYING = -13,
|
||||
DELAY = -14
|
||||
GET_BADGES = -10,
|
||||
LOGIN = -11,
|
||||
HTTP_GET = -12,
|
||||
DEACTIVATE = -13,
|
||||
PLAYING = -14,
|
||||
DELAY = -15
|
||||
};
|
||||
|
||||
static const uint32_t genesis_exts[] =
|
||||
|
@ -2774,6 +2780,7 @@ static int cheevos_iterate(coro_t* coro)
|
|||
|
||||
if ((void*)CHEEVOS_VAR_JSON)
|
||||
free((void*)CHEEVOS_VAR_JSON);
|
||||
|
||||
cheevos_loaded = true;
|
||||
|
||||
/*
|
||||
|
@ -2790,25 +2797,31 @@ static int cheevos_iterate(coro_t* coro)
|
|||
|
||||
if(CHEEVOS_VAR_SETTINGS->bools.cheevos_verbose_enable)
|
||||
{
|
||||
const cheevo_t* cheevo = cheevos_locals.core.cheevos;
|
||||
const cheevo_t* end = cheevo + cheevos_locals.core.count;
|
||||
int number_of_unlocked = cheevos_locals.core.count;
|
||||
int mode;
|
||||
char msg[256];
|
||||
if(cheevos_locals.core.count > 0)
|
||||
{
|
||||
const cheevo_t* cheevo = cheevos_locals.core.cheevos;
|
||||
const cheevo_t* end = cheevo + cheevos_locals.core.count;
|
||||
int number_of_unlocked = cheevos_locals.core.count;
|
||||
int mode;
|
||||
char msg[256];
|
||||
|
||||
if(CHEEVOS_VAR_SETTINGS->bools.cheevos_hardcore_mode_enable)
|
||||
mode = CHEEVOS_ACTIVE_HARDCORE;
|
||||
if(CHEEVOS_VAR_SETTINGS->bools.cheevos_hardcore_mode_enable)
|
||||
mode = CHEEVOS_ACTIVE_HARDCORE;
|
||||
else
|
||||
mode = CHEEVOS_ACTIVE_SOFTCORE;
|
||||
|
||||
for(; cheevo < end; cheevo++)
|
||||
if(cheevo->active & mode)
|
||||
number_of_unlocked--;
|
||||
|
||||
snprintf(msg, sizeof(msg), "You have %d of %d achievements unlocked.",
|
||||
number_of_unlocked, cheevos_locals.core.count);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 6 * 60, false);
|
||||
}
|
||||
else
|
||||
mode = CHEEVOS_ACTIVE_SOFTCORE;
|
||||
runloop_msg_queue_push("This game has no achievements.", 0, 5 * 60, false);
|
||||
|
||||
for(; cheevo < end; cheevo++)
|
||||
if(cheevo->active & mode)
|
||||
number_of_unlocked--;
|
||||
|
||||
snprintf(msg, sizeof(msg), "You have %d of %d achievements unlocked.",
|
||||
number_of_unlocked, cheevos_locals.core.count);
|
||||
msg[sizeof(msg) - 1] = 0;
|
||||
runloop_msg_queue_push(msg, 0, 6 * 60, false);
|
||||
}
|
||||
|
||||
if ( cheevos_locals.core.count == 0
|
||||
|
@ -3089,14 +3102,12 @@ static int cheevos_iterate(coro_t* coro)
|
|||
*************************************************************************/
|
||||
CORO_SUB(GET_CHEEVOS)
|
||||
|
||||
CORO_GOSUB(LOGIN);
|
||||
CORO_GOSUB(LOGIN);
|
||||
|
||||
snprintf(
|
||||
CHEEVOS_VAR_URL, sizeof(CHEEVOS_VAR_URL),
|
||||
"http://retroachievements.org/dorequest.php?r=patch&u=%s&g=%u&f=3&l=1&t=%s",
|
||||
CHEEVOS_VAR_SETTINGS->arrays.cheevos_username,
|
||||
CHEEVOS_VAR_GAMEID, cheevos_locals.token
|
||||
);
|
||||
snprintf(CHEEVOS_VAR_URL, sizeof(CHEEVOS_VAR_URL),
|
||||
"http://retroachievements.org/dorequest.php?r=patch&u=%s&g=%u&f=3&l=1&t=%s",
|
||||
CHEEVOS_VAR_SETTINGS->arrays.cheevos_username,
|
||||
CHEEVOS_VAR_GAMEID, cheevos_locals.token);
|
||||
|
||||
CHEEVOS_VAR_URL[sizeof(CHEEVOS_VAR_URL) - 1] = 0;
|
||||
|
||||
|
@ -3115,6 +3126,62 @@ static int cheevos_iterate(coro_t* coro)
|
|||
RARCH_LOG("[CHEEVOS]: got achievements for game id %u.\n", CHEEVOS_VAR_GAMEID);
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Gets the achievements from Retro Achievements
|
||||
* Inputs CHEEVOS_VAR_GAMEID
|
||||
* Outputs CHEEVOS_VAR_JSON
|
||||
*************************************************************************/
|
||||
CORO_SUB(GET_BADGES)
|
||||
|
||||
badges_ctx = new_badges_ctx;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (!string_is_equal(settings->arrays.menu_driver, "xmb") ||
|
||||
!settings->bools.cheevos_badges_enable)
|
||||
CORO_RET();
|
||||
|
||||
CHEEVOS_VAR_CHEEVO_CURR = cheevos_locals.core.cheevos;
|
||||
CHEEVOS_VAR_CHEEVO_END = cheevos_locals.core.cheevos + cheevos_locals.core.count;
|
||||
|
||||
for (; CHEEVOS_VAR_CHEEVO_CURR < CHEEVOS_VAR_CHEEVO_END ; CHEEVOS_VAR_CHEEVO_CURR++)
|
||||
{
|
||||
for (CHEEVOS_VAR_J = 0 ; CHEEVOS_VAR_J < 2; CHEEVOS_VAR_J++)
|
||||
{
|
||||
CHEEVOS_VAR_BADGE_PATH[0] = '\0';
|
||||
fill_pathname_application_special(CHEEVOS_VAR_BADGE_BASE_PATH, sizeof(CHEEVOS_VAR_BADGE_BASE_PATH),
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES);
|
||||
|
||||
if (!path_is_directory(CHEEVOS_VAR_BADGE_BASE_PATH))
|
||||
path_mkdir(CHEEVOS_VAR_BADGE_BASE_PATH);
|
||||
CORO_YIELD();
|
||||
if (CHEEVOS_VAR_J == 0)
|
||||
snprintf(CHEEVOS_VAR_BADGE_NAME, sizeof(CHEEVOS_VAR_BADGE_NAME), "%s.png", CHEEVOS_VAR_CHEEVO_CURR->badge);
|
||||
else
|
||||
snprintf(CHEEVOS_VAR_BADGE_NAME, sizeof(CHEEVOS_VAR_BADGE_NAME), "%s_lock.png", CHEEVOS_VAR_CHEEVO_CURR->badge);
|
||||
|
||||
fill_pathname_join(CHEEVOS_VAR_BADGE_PATH, CHEEVOS_VAR_BADGE_BASE_PATH, CHEEVOS_VAR_BADGE_NAME, sizeof(CHEEVOS_VAR_BADGE_PATH));
|
||||
|
||||
if (!badge_exists(CHEEVOS_VAR_BADGE_PATH))
|
||||
{
|
||||
#ifdef CHEEVOS_LOG_BADGES
|
||||
RARCH_LOG("[CHEEVOS]: downloading badge %s\n", CHEEVOS_VAR_BADGE_PATH);
|
||||
#endif
|
||||
snprintf(CHEEVOS_VAR_URL, sizeof(CHEEVOS_VAR_URL), "http://i.retroachievements.org/Badge/%s", CHEEVOS_VAR_BADGE_NAME);
|
||||
|
||||
CORO_GOSUB(HTTP_GET);
|
||||
if (CHEEVOS_VAR_JSON != NULL)
|
||||
{
|
||||
if (!filestream_write_file(CHEEVOS_VAR_BADGE_PATH, CHEEVOS_VAR_JSON, CHEEVOS_VAR_K))
|
||||
RARCH_ERR("[CHEEVOS]: error writing badge %s\n", CHEEVOS_VAR_BADGE_PATH);
|
||||
else
|
||||
free(CHEEVOS_VAR_JSON);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CORO_RET();
|
||||
|
||||
/**************************************************************************
|
||||
* Info Logs in the user at Retro Achievements
|
||||
*************************************************************************/
|
||||
|
@ -3256,6 +3323,7 @@ static int cheevos_iterate(coro_t* coro)
|
|||
CHEEVOS_VAR_JSON[length] = 0;
|
||||
}
|
||||
|
||||
CHEEVOS_VAR_K = length;
|
||||
net_http_delete(CHEEVOS_VAR_HTTP);
|
||||
net_http_connection_free(CHEEVOS_VAR_CONN);
|
||||
CORO_RET();
|
||||
|
|
|
@ -117,7 +117,7 @@ bool cheevos_load(const void *data);
|
|||
|
||||
void cheevos_reset_game(void);
|
||||
|
||||
void cheevos_populate_menu(void *data, bool hardcore);
|
||||
void cheevos_populate_menu(void *data);
|
||||
|
||||
bool cheevos_get_description(cheevos_ctx_desc_t *desc);
|
||||
|
||||
|
|
|
@ -119,12 +119,21 @@ void cheevos_var_parse(cheevos_var_t* var, const char** memaddr)
|
|||
const char *str = *memaddr;
|
||||
unsigned base = 16;
|
||||
|
||||
var->is_bcd = false;
|
||||
|
||||
if (toupper((unsigned char)*str) == 'D' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* d0x + 4 hex digits */
|
||||
str += 3;
|
||||
var->type = CHEEVOS_VAR_TYPE_DELTA_MEM;
|
||||
}
|
||||
else if (toupper((unsigned char)*str) == 'B' && str[1] == '0' && toupper((unsigned char)str[2]) == 'X')
|
||||
{
|
||||
/* b0x (binary-coded decimal) */
|
||||
str += 3;
|
||||
var->is_bcd = true;
|
||||
var->type = CHEEVOS_VAR_TYPE_ADDRESS;
|
||||
}
|
||||
else if (*str == '0' && toupper((unsigned char)str[1]) == 'X')
|
||||
{
|
||||
/* 0x + 4 hex digits */
|
||||
|
@ -406,5 +415,8 @@ unsigned cheevos_var_get_value(cheevos_var_t* var)
|
|||
break;
|
||||
}
|
||||
|
||||
return value;
|
||||
if(var->is_bcd)
|
||||
return (((value >> 4) & 0xf) * 10) + (value & 0xf);
|
||||
else
|
||||
return value;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef struct
|
|||
cheevos_var_size_t size;
|
||||
cheevos_var_type_t type;
|
||||
int bank_id;
|
||||
bool is_bcd;
|
||||
unsigned value;
|
||||
unsigned previous;
|
||||
} cheevos_var_t;
|
||||
|
|
170
command.c
|
@ -641,6 +641,7 @@ static void command_stdin_poll(command_t *handle)
|
|||
|
||||
bool command_poll(command_t *handle)
|
||||
{
|
||||
memset(handle->state, 0, sizeof(handle->state));
|
||||
#if defined(HAVE_NETWORKING) && defined(HAVE_NETWORK_CMD) && defined(HAVE_COMMAND)
|
||||
command_network_poll(handle);
|
||||
#endif
|
||||
|
@ -1101,7 +1102,7 @@ static void command_event_load_auto_state(void)
|
|||
#endif
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
|
@ -1307,14 +1308,18 @@ static void command_event_restore_default_shader_preset(void)
|
|||
if (!path_is_empty(RARCH_PATH_DEFAULT_SHADER_PRESET))
|
||||
{
|
||||
/* auto shader preset: reload the original shader */
|
||||
settings_t *settings = config_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
const char *shader_preset = path_get(RARCH_PATH_DEFAULT_SHADER_PRESET);
|
||||
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO),
|
||||
path_get(RARCH_PATH_DEFAULT_SHADER_PRESET));
|
||||
strlcpy(settings->paths.path_shader,
|
||||
path_get(RARCH_PATH_DEFAULT_SHADER_PRESET),
|
||||
sizeof(settings->paths.path_shader));
|
||||
if (!string_is_empty(shader_preset))
|
||||
{
|
||||
RARCH_LOG("%s %s\n",
|
||||
msg_hash_to_str(MSG_RESTORING_DEFAULT_SHADER_PRESET_TO),
|
||||
shader_preset);
|
||||
strlcpy(settings->paths.path_shader,
|
||||
shader_preset,
|
||||
sizeof(settings->paths.path_shader));
|
||||
}
|
||||
}
|
||||
|
||||
path_clear(RARCH_PATH_DEFAULT_SHADER_PRESET);
|
||||
|
@ -1351,7 +1356,7 @@ static bool command_event_save_auto_state(void)
|
|||
goto error;
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
goto error;
|
||||
#endif
|
||||
|
||||
|
@ -1373,24 +1378,32 @@ error:
|
|||
return false;
|
||||
}
|
||||
|
||||
static bool command_event_save_config(const char *config_path,
|
||||
static bool command_event_save_config(
|
||||
const char *config_path,
|
||||
char *s, size_t len)
|
||||
{
|
||||
if (string_is_empty(config_path) || !config_save_file(config_path))
|
||||
bool path_exists = !string_is_empty(config_path);
|
||||
const char *str = path_exists ? config_path :
|
||||
path_get(RARCH_PATH_CONFIG);
|
||||
|
||||
if (path_exists && config_save_file(config_path))
|
||||
{
|
||||
snprintf(s, len, "[Config]: %s \"%s\".",
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
config_path);
|
||||
RARCH_LOG("%s\n", s);
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!string_is_empty(str))
|
||||
{
|
||||
snprintf(s, len, "%s \"%s\".",
|
||||
msg_hash_to_str(MSG_FAILED_SAVING_CONFIG_TO),
|
||||
path_get(RARCH_PATH_CONFIG));
|
||||
str);
|
||||
RARCH_ERR("%s\n", s);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
snprintf(s, len, "[Config]: %s \"%s\".",
|
||||
msg_hash_to_str(MSG_SAVED_NEW_CONFIG_TO),
|
||||
path_get(RARCH_PATH_CONFIG));
|
||||
RARCH_LOG("%s\n", s);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1407,6 +1420,7 @@ static bool command_event_save_core_config(void)
|
|||
bool ret = false;
|
||||
bool found_path = false;
|
||||
bool overrides_active = false;
|
||||
const char *core_path = NULL;
|
||||
char *config_dir = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *config_name = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *config_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
|
@ -1429,8 +1443,10 @@ static bool command_event_save_core_config(void)
|
|||
goto error;
|
||||
}
|
||||
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
|
||||
/* Infer file name based on libretro core. */
|
||||
if (!string_is_empty(path_get(RARCH_PATH_CORE)) && path_file_exists(path_get(RARCH_PATH_CORE)))
|
||||
if (!string_is_empty(core_path) && path_file_exists(core_path))
|
||||
{
|
||||
unsigned i;
|
||||
RARCH_LOG("%s\n", msg_hash_to_str(MSG_USING_CORE_NAME_FOR_NEW_CONFIG));
|
||||
|
@ -1442,7 +1458,7 @@ static bool command_event_save_core_config(void)
|
|||
|
||||
fill_pathname_base_noext(
|
||||
config_name,
|
||||
path_get(RARCH_PATH_CORE),
|
||||
core_path,
|
||||
config_size);
|
||||
|
||||
fill_pathname_join(config_path, config_dir, config_name,
|
||||
|
@ -1489,7 +1505,8 @@ static bool command_event_save_core_config(void)
|
|||
|
||||
command_event_save_config(config_path, msg, sizeof(msg));
|
||||
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
if (!string_is_empty(msg))
|
||||
runloop_msg_queue_push(msg, 1, 180, true);
|
||||
|
||||
if (overrides_active)
|
||||
rarch_ctl(RARCH_CTL_SET_OVERRIDES_ACTIVE, NULL);
|
||||
|
@ -1685,6 +1702,62 @@ static bool command_event_resize_windowed_scale(void)
|
|||
return true;
|
||||
}
|
||||
|
||||
void command_playlist_push_write(
|
||||
void *data,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name)
|
||||
{
|
||||
playlist_t *playlist = (playlist_t*)data;
|
||||
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
if (playlist_push(
|
||||
playlist,
|
||||
path,
|
||||
label,
|
||||
core_path,
|
||||
core_name,
|
||||
NULL,
|
||||
NULL
|
||||
))
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
size_t idx,
|
||||
const char *core_display_name,
|
||||
const char *label,
|
||||
const char *path)
|
||||
{
|
||||
playlist_t *plist = (playlist_t*)data;
|
||||
playlist_t *playlist = NULL;
|
||||
|
||||
if (plist)
|
||||
playlist = plist;
|
||||
#ifdef HAVE_MENU
|
||||
else
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
||||
#endif
|
||||
if (!playlist)
|
||||
return;
|
||||
|
||||
playlist_update(
|
||||
playlist,
|
||||
idx,
|
||||
label,
|
||||
NULL,
|
||||
path,
|
||||
core_display_name,
|
||||
NULL,
|
||||
NULL);
|
||||
|
||||
playlist_write_file(playlist);
|
||||
}
|
||||
|
||||
/**
|
||||
* command_event:
|
||||
* @cmd : Event command index.
|
||||
|
@ -1733,18 +1806,25 @@ bool command_event(enum event_command cmd, void *data)
|
|||
{
|
||||
#ifdef HAVE_MENU
|
||||
core_info_ctx_find_t info_find;
|
||||
rarch_system_info_t *system_info = runloop_get_system_info();
|
||||
struct retro_system_info *system = &system_info->info;
|
||||
rarch_system_info_t *system_info = NULL;
|
||||
struct retro_system_info *system = NULL;
|
||||
const char *core_path = NULL;
|
||||
|
||||
path_clear(RARCH_PATH_BASENAME);
|
||||
system_info = runloop_get_system_info();
|
||||
system = &system_info->info;
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
|
||||
#if defined(HAVE_DYNAMIC)
|
||||
if (string_is_empty(path_get(RARCH_PATH_CORE)))
|
||||
if (string_is_empty(core_path))
|
||||
return false;
|
||||
#endif
|
||||
|
||||
libretro_get_system_info(
|
||||
path_get(RARCH_PATH_CORE),
|
||||
core_path,
|
||||
system,
|
||||
&system_info->load_no_content);
|
||||
info_find.path = path_get(RARCH_PATH_CORE);
|
||||
info_find.path = core_path;
|
||||
|
||||
if (!core_info_load(&info_find))
|
||||
{
|
||||
|
@ -1770,7 +1850,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||
#ifdef HAVE_CHEEVOS
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
@ -1812,7 +1892,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
|
@ -1903,7 +1983,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||
{
|
||||
#ifdef HAVE_CHEEVOS
|
||||
settings_t *settings = config_get_ptr();
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
#endif
|
||||
|
||||
|
@ -1914,7 +1994,7 @@ bool command_event(enum event_command cmd, void *data)
|
|||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (settings->bools.cheevos_hardcore_mode_enable)
|
||||
if (cheevos_loaded && settings->bools.cheevos_hardcore_mode_enable)
|
||||
return false;
|
||||
#endif
|
||||
if (settings->bools.rewind_enable)
|
||||
|
@ -2237,18 +2317,32 @@ TODO: Add a setting for these tweaks */
|
|||
ui_companion_driver_toggle();
|
||||
break;
|
||||
case CMD_EVENT_ADD_TO_FAVORITES:
|
||||
playlist_push(
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
rarch_system_info_t *sys_info = runloop_get_system_info();
|
||||
const char *core_name = NULL;
|
||||
const char *core_path = NULL;
|
||||
const char *label = NULL;
|
||||
|
||||
if (sys_info)
|
||||
{
|
||||
core_name = sys_info->info.library_name;
|
||||
core_path = path_get(RARCH_PATH_CORE);
|
||||
}
|
||||
|
||||
if (!string_is_empty(global->name.label))
|
||||
label = global->name.label;
|
||||
|
||||
command_playlist_push_write(
|
||||
g_defaults.content_favorites,
|
||||
(const char*)data,
|
||||
NULL,
|
||||
file_path_str(FILE_PATH_DETECT),
|
||||
file_path_str(FILE_PATH_DETECT),
|
||||
NULL,
|
||||
NULL
|
||||
label,
|
||||
core_path,
|
||||
core_name
|
||||
);
|
||||
playlist_write_file(g_defaults.content_favorites);
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_ADDED_TO_FAVORITES), 1, 180, true);
|
||||
break;
|
||||
}
|
||||
case CMD_EVENT_RESTART_RETROARCH:
|
||||
if (!frontend_driver_set_fork(FRONTEND_FORK_RESTART))
|
||||
return false;
|
||||
|
|
14
command.h
|
@ -259,6 +259,20 @@ bool command_free(command_t *handle);
|
|||
**/
|
||||
bool command_event(enum event_command action, void *data);
|
||||
|
||||
void command_playlist_push_write(
|
||||
void *data,
|
||||
const char *path,
|
||||
const char *label,
|
||||
const char *core_path,
|
||||
const char *core_name);
|
||||
|
||||
void command_playlist_update_write(
|
||||
void *data,
|
||||
size_t idx,
|
||||
const char *core_display_name,
|
||||
const char *label,
|
||||
const char *path);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -528,7 +528,7 @@ static const bool netplay_nat_traversal = false;
|
|||
|
||||
static const unsigned netplay_delay_frames = 16;
|
||||
|
||||
static const int netplay_check_frames = 30;
|
||||
static const int netplay_check_frames = 600;
|
||||
|
||||
static const bool netplay_use_mitm_server = false;
|
||||
|
||||
|
|
|
@ -22,163 +22,202 @@
|
|||
|
||||
/* User 1 */
|
||||
static const struct retro_keybind retro_keybinds_1[] = {
|
||||
/* | RetroPad button | enum | keyboard key | js btn | js axis | */
|
||||
/* | RetroPad button | enum | keyboard key | m-btn | js btn | js axis | */
|
||||
#ifdef __QNX__
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_k, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_i, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_v, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_b, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_e, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_s, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_w, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_d, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_l, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_o, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_f, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_j, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_r, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_u, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_g, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_h, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_v, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_b, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_d, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_j, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_g, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#else
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_RSHIFT, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_RETURN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UP, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_DOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_LEFT, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_RIGHT, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_x, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_s, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_q, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_w, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_z, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_a, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_RSHIFT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_RETURN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UP, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_DOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_LEFT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_RIGHT, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_x, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_s, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_q, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_w, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_l, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_F4, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_F2, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_f, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_ESCAPE, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_F7, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_F6, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_r, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_o, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_p, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_k, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_h, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_m, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_n, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_y, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_t, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_u, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, RETROK_e, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_KP_MINUS,NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_F11, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY, RETROK_SPACE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FAST_FORWARD_HOLD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_HOLD_KEY,RETROK_l, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LOAD_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_LOAD_STATE_KEY, RETROK_F4, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SAVE_STATE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_SAVE_STATE_KEY, RETROK_F2, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FULLSCREEN_TOGGLE_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FULLSCREEN_TOGGLE_KEY,RETROK_f, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_QUIT_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_QUIT_KEY, RETROK_ESCAPE, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_PLUS, RETROK_F7, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_STATE_SLOT_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_STATE_SLOT_MINUS, RETROK_F6, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_REWIND, MENU_ENUM_LABEL_VALUE_INPUT_META_REWIND, RETROK_r, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MOVIE_RECORD_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MOVIE_RECORD_TOGGLE, RETROK_o, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_PAUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_PAUSE_TOGGLE, RETROK_p, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_FRAMEADVANCE, MENU_ENUM_LABEL_VALUE_INPUT_META_FRAMEADVANCE, RETROK_k, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_RESET, MENU_ENUM_LABEL_VALUE_INPUT_META_RESET, RETROK_h, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_NEXT, RETROK_m, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SHADER_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_SHADER_PREV, RETROK_n, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_PLUS, RETROK_y, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_INDEX_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_INDEX_MINUS, RETROK_t, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_CHEAT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_CHEAT_TOGGLE, RETROK_u, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SCREENSHOT, MENU_ENUM_LABEL_VALUE_INPUT_META_SCREENSHOT, RETROK_F8, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MUTE, MENU_ENUM_LABEL_VALUE_INPUT_META_MUTE, RETROK_F9, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OSK, MENU_ENUM_LABEL_VALUE_INPUT_META_OSK, RETROK_F12, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_FLIP, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_FLIP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_NETPLAY_GAME_WATCH, MENU_ENUM_LABEL_VALUE_INPUT_META_NETPLAY_GAME_WATCH, RETROK_i, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_SLOWMOTION, MENU_ENUM_LABEL_VALUE_INPUT_META_SLOWMOTION, RETROK_e, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ENABLE_HOTKEY, MENU_ENUM_LABEL_VALUE_INPUT_META_ENABLE_HOTKEY, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_UP, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_UP, RETROK_KP_PLUS, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_VOLUME_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_META_VOLUME_DOWN, RETROK_KP_MINUS,NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_OVERLAY_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_OVERLAY_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_EJECT_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_EJECT_TOGGLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_NEXT, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_NEXT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_DISK_PREV, MENU_ENUM_LABEL_VALUE_INPUT_META_DISK_PREV, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GRAB_MOUSE_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GRAB_MOUSE_TOGGLE, RETROK_F11, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_GAME_FOCUS_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_GAME_FOCUS_TOGGLE, RETROK_SCROLLOCK, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_MENU_TOGGLE, MENU_ENUM_LABEL_VALUE_INPUT_META_MENU_TOGGLE, RETROK_F1, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
#endif
|
||||
};
|
||||
|
||||
/* Users 2 to MAX_USERS */
|
||||
static const struct retro_keybind retro_keybinds_rest[] = {
|
||||
/* | RetroPad button | desc | keyboard key | js btn | js axis | */
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
/* | RetroPad button | desc | keyboard key | js btn | js axis | */
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_B, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_Y, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_START, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_A, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_X, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_X, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R2, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R2, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_L3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RETRO_DEVICE_ID_JOYPAD_R3, MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_LEFT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_X_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
{ true, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
|
||||
{ true, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE, RETROK_UNKNOWN, NO_BTN, NO_BTN, 0, AXIS_NONE },
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1255,6 +1255,9 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
|||
SETTING_BOOL("cheevos_test_unofficial", &settings->bools.cheevos_test_unofficial, true, false, false);
|
||||
SETTING_BOOL("cheevos_hardcore_mode_enable", &settings->bools.cheevos_hardcore_mode_enable, true, false, false);
|
||||
SETTING_BOOL("cheevos_leaderboards_enable", &settings->bools.cheevos_leaderboards_enable, true, false, false);
|
||||
#ifdef HAVE_XMB
|
||||
SETTING_BOOL("cheevos_badges_enable", &settings->bools.cheevos_badges_enable, true, false, false);
|
||||
#endif
|
||||
SETTING_BOOL("cheevos_verbose_enable", &settings->bools.cheevos_verbose_enable, true, false, false);
|
||||
#endif
|
||||
#ifdef HAVE_OVERLAY
|
||||
|
@ -1864,7 +1867,7 @@ static void config_set_defaults(void)
|
|||
temp_str[0] = '\0';
|
||||
|
||||
fill_pathname_expand_special(temp_str,
|
||||
g_defaults.path.config,
|
||||
g_defaults.path.config,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
path_set(RARCH_PATH_CONFIG, temp_str);
|
||||
free(temp_str);
|
||||
|
@ -2140,6 +2143,24 @@ static void read_keybinds_axis(config_file_t *conf, unsigned user,
|
|||
input_config_bind_map_get_base(idx), bind);
|
||||
}
|
||||
|
||||
static void read_keybinds_mbutton(config_file_t *conf, unsigned user,
|
||||
unsigned idx, struct retro_keybind *bind)
|
||||
{
|
||||
const char *prefix = NULL;
|
||||
|
||||
if (!input_config_bind_map_get_valid(idx))
|
||||
return;
|
||||
if (!input_config_bind_map_get_base(idx))
|
||||
return;
|
||||
|
||||
prefix = input_config_get_prefix(user,
|
||||
input_config_bind_map_get_meta(idx));
|
||||
|
||||
if (prefix)
|
||||
input_config_parse_mouse_button(conf, prefix,
|
||||
input_config_bind_map_get_base(idx), bind);
|
||||
}
|
||||
|
||||
static void read_keybinds_user(config_file_t *conf, unsigned user)
|
||||
{
|
||||
unsigned i;
|
||||
|
@ -2154,6 +2175,7 @@ static void read_keybinds_user(config_file_t *conf, unsigned user)
|
|||
read_keybinds_keyboard(conf, user, i, bind);
|
||||
read_keybinds_button(conf, user, i, bind);
|
||||
read_keybinds_axis(conf, user, i, bind);
|
||||
read_keybinds_mbutton(conf, user, i, bind);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2262,6 +2284,8 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
#ifdef HAVE_NETWORKING
|
||||
char *override_netplay_ip_address = NULL;
|
||||
#endif
|
||||
const char *path_core = NULL;
|
||||
const char *path_config = NULL;
|
||||
int bool_settings_size = sizeof(settings->bools) / sizeof(settings->bools.placeholder);
|
||||
int float_settings_size = sizeof(settings->floats) / sizeof(settings->floats.placeholder);
|
||||
int int_settings_size = sizeof(settings->ints) / sizeof(settings->ints.placeholder);
|
||||
|
@ -2534,13 +2558,16 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
audio_set_float(AUDIO_ACTION_VOLUME_GAIN, settings->floats.audio_volume);
|
||||
audio_set_float(AUDIO_ACTION_MIXER_VOLUME_GAIN, settings->floats.audio_mixer_volume);
|
||||
|
||||
path_config = path_get(RARCH_PATH_CONFIG);
|
||||
path_core = path_get(RARCH_PATH_CORE);
|
||||
|
||||
if (string_is_empty(settings->paths.path_content_history))
|
||||
{
|
||||
if (string_is_empty(settings->paths.directory_content_history))
|
||||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->paths.path_content_history,
|
||||
path_get(RARCH_PATH_CONFIG),
|
||||
path_config,
|
||||
file_path_str(FILE_PATH_CONTENT_HISTORY),
|
||||
sizeof(settings->paths.path_content_history));
|
||||
}
|
||||
|
@ -2559,7 +2586,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->paths.path_content_favorites,
|
||||
path_get(RARCH_PATH_CONFIG),
|
||||
path_config,
|
||||
file_path_str(FILE_PATH_CONTENT_FAVORITES),
|
||||
sizeof(settings->paths.path_content_favorites));
|
||||
}
|
||||
|
@ -2578,7 +2605,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->paths.path_content_music_history,
|
||||
path_get(RARCH_PATH_CONFIG),
|
||||
path_config,
|
||||
file_path_str(FILE_PATH_CONTENT_MUSIC_HISTORY),
|
||||
sizeof(settings->paths.path_content_music_history));
|
||||
}
|
||||
|
@ -2597,7 +2624,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->paths.path_content_video_history,
|
||||
path_get(RARCH_PATH_CONFIG),
|
||||
path_config,
|
||||
file_path_str(FILE_PATH_CONTENT_VIDEO_HISTORY),
|
||||
sizeof(settings->paths.path_content_video_history));
|
||||
}
|
||||
|
@ -2616,7 +2643,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
{
|
||||
fill_pathname_resolve_relative(
|
||||
settings->paths.path_content_image_history,
|
||||
path_get(RARCH_PATH_CONFIG),
|
||||
path_config,
|
||||
file_path_str(FILE_PATH_CONTENT_IMAGE_HISTORY),
|
||||
sizeof(settings->paths.path_content_image_history));
|
||||
}
|
||||
|
@ -2642,14 +2669,14 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
}
|
||||
|
||||
#ifdef RARCH_CONSOLE
|
||||
if (!string_is_empty(path_get(RARCH_PATH_CORE)))
|
||||
if (!string_is_empty(path_core))
|
||||
{
|
||||
#endif
|
||||
/* Safe-guard against older behavior. */
|
||||
if (path_is_directory(path_get(RARCH_PATH_CORE)))
|
||||
if (path_is_directory(path_core))
|
||||
{
|
||||
RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n");
|
||||
strlcpy(settings->paths.directory_libretro, path_get(RARCH_PATH_CORE),
|
||||
strlcpy(settings->paths.directory_libretro, path_core,
|
||||
sizeof(settings->paths.directory_libretro));
|
||||
path_clear(RARCH_PATH_CORE);
|
||||
}
|
||||
|
@ -2690,9 +2717,7 @@ static bool config_load_file(const char *path, bool set_defaults,
|
|||
*settings->paths.directory_system = '\0';
|
||||
|
||||
if (settings->floats.slowmotion_ratio < 1.0f)
|
||||
{
|
||||
configuration_set_float(settings, settings->floats.slowmotion_ratio, 1.0f);
|
||||
}
|
||||
|
||||
/* Sanitize fastforward_ratio value - previously range was -1
|
||||
* and up (with 0 being skipped) */
|
||||
|
@ -3343,6 +3368,38 @@ static void save_keybind_axis(config_file_t *conf, const char *prefix,
|
|||
}
|
||||
}
|
||||
|
||||
static void save_keybind_mbutton(config_file_t *conf, const char *prefix,
|
||||
const char *base, const struct retro_keybind *bind, bool save_empty)
|
||||
{
|
||||
char key[64];
|
||||
|
||||
key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim_concat(key, prefix,
|
||||
base, '_', "_mbtn", sizeof(key));
|
||||
|
||||
switch ( bind->mbutton )
|
||||
{
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT: config_set_uint64(conf, key, 1); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT: config_set_uint64(conf, key, 2); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE: config_set_uint64(conf, key, 3); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4: config_set_uint64(conf, key, 4); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5: config_set_uint64(conf, key, 5); break;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP: config_set_string(conf, key, "wu"); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN: config_set_string(conf, key, "wd"); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP: config_set_string(conf, key, "whu"); break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN: config_set_string(conf, key, "whd"); break;
|
||||
|
||||
default:
|
||||
if ( save_empty ) {
|
||||
config_set_string(conf, key, file_path_str(FILE_PATH_NUL));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* save_keybind:
|
||||
* @conf : pointer to config file object
|
||||
|
@ -3363,6 +3420,7 @@ static void save_keybind(config_file_t *conf, const char *prefix,
|
|||
save_keybind_key(conf, prefix, base, bind);
|
||||
save_keybind_joykey(conf, prefix, base, bind, save_empty);
|
||||
save_keybind_axis(conf, prefix, base, bind, save_empty);
|
||||
save_keybind_mbutton(conf, prefix, base, bind, save_empty);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -3543,8 +3601,7 @@ bool config_save_autoconf_profile(const char *path, unsigned user)
|
|||
config_file_free(conf);
|
||||
free(buf);
|
||||
free(autoconf_file);
|
||||
if (path_new)
|
||||
free(path_new);
|
||||
free(path_new);
|
||||
return ret;
|
||||
|
||||
error:
|
||||
|
|
|
@ -184,6 +184,7 @@ typedef struct settings
|
|||
bool cheevos_test_unofficial;
|
||||
bool cheevos_hardcore_mode_enable;
|
||||
bool cheevos_leaderboards_enable;
|
||||
bool cheevos_badges_enable;
|
||||
bool cheevos_verbose_enable;
|
||||
|
||||
/* Camera */
|
||||
|
|
44
core_info.c
|
@ -389,6 +389,10 @@ static core_info_list_t *core_info_list_new(const char *path)
|
|||
&tmp_bool))
|
||||
core_info[i].supports_no_game = tmp_bool;
|
||||
|
||||
if (config_get_bool(conf, "database_match_archive_member",
|
||||
&tmp_bool))
|
||||
core_info[i].database_match_archive_member = tmp_bool;
|
||||
|
||||
core_info[i].config_data = conf;
|
||||
}
|
||||
else
|
||||
|
@ -823,6 +827,46 @@ size_t core_info_list_num_info_files(core_info_list_t *core_info_list)
|
|||
return num;
|
||||
}
|
||||
|
||||
bool core_info_database_match_archive_member(const char *database_path)
|
||||
{
|
||||
char *database = NULL;
|
||||
const char *new_path = path_basename(database_path);
|
||||
|
||||
if (string_is_empty(new_path))
|
||||
return false;
|
||||
|
||||
database = strdup(new_path);
|
||||
|
||||
if (string_is_empty(database))
|
||||
goto error;
|
||||
|
||||
path_remove_extension(database);
|
||||
|
||||
if (core_info_curr_list)
|
||||
{
|
||||
size_t i;
|
||||
|
||||
for (i = 0; i < core_info_curr_list->count; i++)
|
||||
{
|
||||
const core_info_t *info = &core_info_curr_list->list[i];
|
||||
|
||||
if (!info->database_match_archive_member)
|
||||
continue;
|
||||
|
||||
if (!string_list_find_elem(info->databases_list, database))
|
||||
continue;
|
||||
|
||||
free(database);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
error:
|
||||
if (database)
|
||||
free(database);
|
||||
return false;
|
||||
}
|
||||
|
||||
bool core_info_database_supports_content_path(const char *database_path, const char *path)
|
||||
{
|
||||
char *database = NULL;
|
||||
|
|
|
@ -38,6 +38,7 @@ typedef struct
|
|||
typedef struct
|
||||
{
|
||||
bool supports_no_game;
|
||||
bool database_match_archive_member;
|
||||
size_t firmware_count;
|
||||
char *path;
|
||||
void *config_data;
|
||||
|
@ -120,6 +121,8 @@ bool core_info_load(core_info_ctx_find_t *info);
|
|||
|
||||
bool core_info_database_supports_content_path(const char *database_path, const char *path);
|
||||
|
||||
bool core_info_database_match_archive_member(const char *database_path);
|
||||
|
||||
bool core_info_unsupported_content_path(const char *path);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2011-2017 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
|
@ -28,6 +28,10 @@
|
|||
#include <libgen.h>
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <kernel/image.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <boolean.h>
|
||||
#include <string.h>
|
||||
|
@ -119,7 +123,7 @@ void fill_pathname_abbreviate_special(char *out_path,
|
|||
* Keep application dir in front of home, moving app dir to a
|
||||
* new location inside home would break otherwise. */
|
||||
|
||||
/* ugly hack - use application_dir pointer
|
||||
/* ugly hack - use application_dir pointer
|
||||
* before filling it in. C89 reasons */
|
||||
candidates[0] = application_dir;
|
||||
candidates[1] = home;
|
||||
|
@ -129,23 +133,23 @@ void fill_pathname_abbreviate_special(char *out_path,
|
|||
notations [1] = "~";
|
||||
notations [2] = NULL;
|
||||
|
||||
fill_pathname_application_path(application_dir,
|
||||
fill_pathname_application_path(application_dir,
|
||||
PATH_MAX_LENGTH * sizeof(char));
|
||||
path_basedir_wrapper(application_dir);
|
||||
|
||||
|
||||
for (i = 0; candidates[i]; i++)
|
||||
{
|
||||
if (!string_is_empty(candidates[i]) &&
|
||||
if (!string_is_empty(candidates[i]) &&
|
||||
strstr(in_path, candidates[i]) == in_path)
|
||||
{
|
||||
size_t src_size = strlcpy(out_path, notations[i], size);
|
||||
|
||||
retro_assert(src_size < size);
|
||||
|
||||
|
||||
out_path += src_size;
|
||||
size -= src_size;
|
||||
in_path += strlen(candidates[i]);
|
||||
|
||||
|
||||
if (!path_char_is_slash(*in_path))
|
||||
{
|
||||
retro_assert(strlcpy(out_path,
|
||||
|
@ -242,7 +246,7 @@ void fill_pathname_application_path(char *s, size_t len)
|
|||
CFStringGetCString(bundle_path, s, len, kCFStringEncodingUTF8);
|
||||
CFRelease(bundle_path);
|
||||
CFRelease(bundle_url);
|
||||
|
||||
|
||||
retro_assert(strlcat(s, "nobin", len) < len);
|
||||
return;
|
||||
}
|
||||
|
@ -269,7 +273,7 @@ void fill_pathname_application_path(char *s, size_t len)
|
|||
char link_path[255];
|
||||
|
||||
link_path[0] = *s = '\0';
|
||||
pid = getpid();
|
||||
pid = getpid();
|
||||
|
||||
/* Linux, BSD and Solaris paths. Not standardized. */
|
||||
for (i = 0; i < ARRAY_SIZE(exts); i++)
|
||||
|
@ -287,7 +291,7 @@ void fill_pathname_application_path(char *s, size_t len)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
RARCH_ERR("Cannot resolve application path! This should not happen.\n");
|
||||
#endif
|
||||
}
|
||||
|
@ -335,7 +339,7 @@ void fill_pathname_application_special(char *s,
|
|||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
s1[0] = '\0';
|
||||
|
||||
fill_pathname_application_special(s1,
|
||||
fill_pathname_application_special(s1,
|
||||
PATH_MAX_LENGTH * sizeof(char),
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH);
|
||||
fill_pathname_join(s,
|
||||
|
@ -349,7 +353,7 @@ void fill_pathname_application_special(char *s,
|
|||
#ifdef HAVE_ZARCH
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
fill_pathname_join(s,
|
||||
fill_pathname_join(s,
|
||||
settings->paths.directory_assets,
|
||||
"zarch",
|
||||
len);
|
||||
|
@ -501,6 +505,31 @@ void fill_pathname_application_special(char *s,
|
|||
}
|
||||
#endif
|
||||
break;
|
||||
case APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES:
|
||||
{
|
||||
char *s1 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *s2 = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
s1[0] = s2[0] = '\0';
|
||||
|
||||
fill_pathname_join(s1,
|
||||
settings->paths.directory_thumbnails,
|
||||
"cheevos",
|
||||
len);
|
||||
fill_pathname_join(s2,
|
||||
s1, "badges",
|
||||
PATH_MAX_LENGTH * sizeof(char)
|
||||
);
|
||||
fill_pathname_slash(s2,
|
||||
PATH_MAX_LENGTH * sizeof(char)
|
||||
);
|
||||
strlcpy(s, s2, len);
|
||||
free(s1);
|
||||
free(s2);
|
||||
}
|
||||
break;
|
||||
|
||||
case APPLICATION_SPECIAL_NONE:
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* RetroArch - A frontend for libretro.
|
||||
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
|
||||
* Copyright (C) 2011-2016 - Daniel De Matteis
|
||||
*
|
||||
*
|
||||
* RetroArch is free software: you can redistribute it and/or modify it under the terms
|
||||
* of the GNU General Public License as published by the Free Software Found-
|
||||
* ation, either version 3 of the License, or (at your option) any later version.
|
||||
|
@ -104,7 +104,8 @@ enum application_special_type
|
|||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_XMB_FONT,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_FONT,
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS
|
||||
APPLICATION_SPECIAL_DIRECTORY_ASSETS_ZARCH_ICONS,
|
||||
APPLICATION_SPECIAL_DIRECTORY_THUMBNAILS_CHEEVOS_BADGES
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
#include <boolean.h>
|
||||
#include <compat/apple_compat.h>
|
||||
#include <retro_assert.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
#include <file/file_path.h>
|
||||
#include <rhash.h>
|
||||
|
@ -335,6 +336,15 @@ static void frontend_darwin_get_environment_settings(int *argc, char *argv[],
|
|||
CFSearchPathForDirectoriesInDomains(CFDocumentDirectory,
|
||||
CFUserDomainMask, 1, home_dir_buf, sizeof(home_dir_buf));
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
char resolved_home_dir_buf[PATH_MAX_LENGTH] = {0};
|
||||
if (realpath(home_dir_buf, resolved_home_dir_buf)) {
|
||||
retro_assert(strlcpy(home_dir_buf,
|
||||
resolved_home_dir_buf,
|
||||
sizeof(home_dir_buf)) < sizeof(home_dir_buf));
|
||||
}
|
||||
#endif
|
||||
|
||||
strlcat(home_dir_buf, "/RetroArch", sizeof(home_dir_buf));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SHADER],
|
||||
home_dir_buf, "shaders_glsl",
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#include <sys/types.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <X11/Xatom.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
|
@ -155,9 +157,27 @@ static void x11_set_window_class(Display *dpy, Window win)
|
|||
XSetClassHint(dpy, win, &hint);
|
||||
}
|
||||
|
||||
static void x11_set_window_pid(Display *dpy, Window win)
|
||||
{
|
||||
pid_t pid = getpid();
|
||||
char hostname[HOST_NAME_MAX + 1];
|
||||
|
||||
XChangeProperty(dpy, win, XInternAtom(dpy, "_NET_WM_PID", False),
|
||||
XA_CARDINAL, 32, PropModeReplace, (unsigned char *)&pid, 1);
|
||||
|
||||
if(gethostname(hostname, HOST_NAME_MAX + 1) == -1)
|
||||
RARCH_WARN("Failed to get hostname.\n");
|
||||
else
|
||||
{
|
||||
XChangeProperty(dpy, win, XA_WM_CLIENT_MACHINE, XA_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)hostname, strlen(hostname));
|
||||
}
|
||||
}
|
||||
|
||||
void x11_set_window_attr(Display *dpy, Window win)
|
||||
{
|
||||
x11_set_window_class(dpy, win);
|
||||
x11_set_window_pid(dpy, win);
|
||||
}
|
||||
|
||||
static void xdg_screensaver_inhibit(Window wnd)
|
||||
|
|
|
@ -113,6 +113,53 @@ static enum gfx_ctx_api x_api = GFX_CTX_NONE;
|
|||
|
||||
static gfx_ctx_x_data_t *current_context_data = NULL;
|
||||
|
||||
const unsigned long retroarch_icon_data[] = {
|
||||
16, 16,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff,
|
||||
0xffffffff, 0xffffffff, 0x000000ff, 0xffffffff, 0xffffffff, 0x00000000,
|
||||
0xffffffff, 0xffffffff, 0x000000ff, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x000000ff, 0xffffffff,
|
||||
0xffffffff, 0x000000ff, 0xffffffff, 0xffffffff, 0xffffffff, 0x000000ff,
|
||||
0xffffffff, 0xffffffff, 0x000000ff, 0xffffffff, 0x00000000, 0x00000000,
|
||||
0x00000000, 0xffffffff, 0x000000ff, 0xffffffff, 0x000000ff, 0x000000ff,
|
||||
0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0xffffffff,
|
||||
0x000000ff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff,
|
||||
0x000000ff, 0x000000ff, 0x000000ff, 0xffffffff, 0x000000ff, 0x000000ff,
|
||||
0x000000ff, 0xffffffff, 0x000000ff, 0x000000ff, 0x000000ff, 0xffffffff,
|
||||
0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x000000ff, 0x000000ff,
|
||||
0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,
|
||||
0x000000ff, 0x000000ff, 0x000000ff, 0xffffffff, 0x00000000, 0x00000000,
|
||||
0x00000000, 0xffffffff, 0xffffffff, 0x000000ff, 0x000000ff, 0x000000ff,
|
||||
0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff, 0x000000ff,
|
||||
0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0xffffffff, 0xffffffff, 0x000000ff, 0xffffffff, 0xffffffff, 0xffffffff,
|
||||
0xffffffff, 0xffffffff, 0x000000ff, 0xffffffff, 0xffffffff, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0x000000ff,
|
||||
0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0xffffffff,
|
||||
0xffffffff, 0x000000ff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0xffffffff, 0xffffffff, 0xffffffff, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0xffffffff, 0xffffffff,
|
||||
0xffffffff, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
|
||||
0x00000000, 0x00000000, 0x00000000, 0x00000000
|
||||
};
|
||||
|
||||
#ifdef HAVE_OPENGL
|
||||
static PFNGLXCREATECONTEXTATTRIBSARBPROC glx_create_context_attribs;
|
||||
|
||||
|
@ -574,6 +621,8 @@ static bool gfx_ctx_x_set_video_mode(void *data,
|
|||
XSetWindowAttributes swa = {0};
|
||||
int (*old_handler)(Display*, XErrorEvent*) = NULL;
|
||||
gfx_ctx_x_data_t *x = (gfx_ctx_x_data_t*)data;
|
||||
Atom net_wm_icon = XInternAtom(g_x11_dpy, "_NET_WM_ICON", False);
|
||||
Atom cardinal = XInternAtom(g_x11_dpy, "CARDINAL", False);
|
||||
|
||||
frontend_driver_install_signal_handler();
|
||||
|
||||
|
@ -661,6 +710,8 @@ static bool gfx_ctx_x_set_video_mode(void *data,
|
|||
(true_full ? CWOverrideRedirect : 0), &swa);
|
||||
XSetWindowBackground(g_x11_dpy, g_x11_win, 0);
|
||||
|
||||
XChangeProperty(g_x11_dpy, g_x11_win, net_wm_icon, cardinal, 32, PropModeReplace, (const unsigned char*)retroarch_icon_data, sizeof(retroarch_icon_data) / sizeof(*retroarch_icon_data));
|
||||
|
||||
switch (x_api)
|
||||
{
|
||||
case GFX_CTX_OPENGL_API:
|
||||
|
@ -1137,4 +1188,3 @@ const gfx_ctx_driver_t gfx_ctx_x = {
|
|||
#endif
|
||||
gfx_ctx_x_make_current
|
||||
};
|
||||
|
||||
|
|
|
@ -497,10 +497,12 @@ const char* config_get_video_driver_options(void)
|
|||
return char_list_new_special(STRING_LIST_VIDEO_DRIVERS, NULL);
|
||||
}
|
||||
|
||||
#ifdef HAVE_VULKAN
|
||||
static bool hw_render_context_is_vulkan(enum retro_hw_context_type type)
|
||||
{
|
||||
return type == RETRO_HW_CONTEXT_VULKAN;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool hw_render_context_is_gl(enum retro_hw_context_type type)
|
||||
{
|
||||
|
@ -2407,7 +2409,7 @@ void video_driver_frame(const void *data, unsigned width,
|
|||
|
||||
video_driver_frame_count++;
|
||||
|
||||
// Display the FPS, with a higher priority.
|
||||
/* Display the FPS, with a higher priority. */
|
||||
if (video_info.fps_show)
|
||||
runloop_msg_queue_push(video_info.fps_text, 2, 1, true);
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@ ACHIEVEMENTS
|
|||
#include "../libretro-common/formats/json/jsonsax.c"
|
||||
#include "../network/net_http_special.c"
|
||||
#include "../cheevos/cheevos.c"
|
||||
#include "../cheevos/badges.c"
|
||||
#include "../cheevos/var.c"
|
||||
#include "../cheevos/cond.c"
|
||||
#endif
|
||||
|
@ -821,6 +822,10 @@ FILE
|
|||
#include "../list_special.c"
|
||||
#include "../libretro-common/string/stdstring.c"
|
||||
#include "../libretro-common/file/nbio/nbio_stdio.c"
|
||||
#include "../libretro-common/file/nbio/nbio_linux.c"
|
||||
#include "../libretro-common/file/nbio/nbio_unixmmap.c"
|
||||
#include "../libretro-common/file/nbio/nbio_windowsmmap.c"
|
||||
#include "../libretro-common/file/nbio/nbio_intf.c"
|
||||
|
||||
/*============================================================
|
||||
MESSAGE
|
||||
|
|
|
@ -49,6 +49,7 @@
|
|||
|
||||
#include "../../gfx/video_driver.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
/* Keep track of which pad indexes are 360 controllers.
|
||||
|
@ -267,6 +268,58 @@ static bool dinput_keyboard_pressed(struct dinput_input *di, unsigned key)
|
|||
return di->state[sym] & 0x80;
|
||||
}
|
||||
|
||||
static bool dinput_mbutton_pressed(struct dinput_input *di, unsigned port, unsigned key)
|
||||
{
|
||||
bool result;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (port >= MAX_USERS)
|
||||
return false;
|
||||
|
||||
/* the driver only supports one mouse */
|
||||
if ( settings->uints.input_mouse_index[ port ] != 0 ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch ( key )
|
||||
{
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
return di->mouse_l;
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||
return di->mouse_r;
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
return di->mouse_m;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||
return di->mouse_b4;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
||||
return di->mouse_b5;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
result = di->mouse_wu;
|
||||
di->mouse_wu = false;
|
||||
return result;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
result = di->mouse_wd;
|
||||
di->mouse_wd = false;
|
||||
return result;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
result = di->mouse_hwu;
|
||||
di->mouse_hwu = false;
|
||||
return result;
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
result = di->mouse_hwd;
|
||||
di->mouse_hwd = false;
|
||||
return result;
|
||||
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool dinput_is_pressed(struct dinput_input *di,
|
||||
rarch_joypad_info_t joypad_info,
|
||||
const struct retro_keybind *binds,
|
||||
|
@ -276,8 +329,13 @@ static bool dinput_is_pressed(struct dinput_input *di,
|
|||
|
||||
if (!di->blocked && (bind->key < RETROK_LAST) && dinput_keyboard_pressed(di, bind->key))
|
||||
return true;
|
||||
if (binds && binds[id].valid && input_joypad_pressed(di->joypad, joypad_info, port, binds, id))
|
||||
return true;
|
||||
if (binds && binds[id].valid)
|
||||
{
|
||||
if (dinput_mbutton_pressed(di, port, bind->mbutton))
|
||||
return true;
|
||||
if (input_joypad_pressed(di->joypad, joypad_info, port, binds, id))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -311,33 +369,83 @@ static bool dinput_meta_key_pressed(void *data, int key)
|
|||
return false;
|
||||
}
|
||||
|
||||
static int16_t dinput_lightgun_state(struct dinput_input *di, unsigned id)
|
||||
static int16_t dinput_lightgun_aiming_state( struct dinput_input *di, unsigned idx, unsigned id )
|
||||
{
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_X:
|
||||
return di->mouse_rel_x;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_Y:
|
||||
return di->mouse_rel_y;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER:
|
||||
return di->mouse_l;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_CURSOR:
|
||||
return di->mouse_m;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_TURBO:
|
||||
return di->mouse_r;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_START:
|
||||
return di->mouse_m && di->mouse_r;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_PAUSE:
|
||||
return di->mouse_m && di->mouse_l;
|
||||
}
|
||||
const int edge_detect = 32700;
|
||||
struct video_viewport vp;
|
||||
bool inside = false;
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
int16_t res_x = 0;
|
||||
int16_t res_y = 0;
|
||||
int16_t res_screen_x = 0;
|
||||
int16_t res_screen_y = 0;
|
||||
unsigned num = 0;
|
||||
|
||||
return 0;
|
||||
struct pointer_status* check_pos = di->pointer_head.next;
|
||||
|
||||
vp.x = 0;
|
||||
vp.y = 0;
|
||||
vp.width = 0;
|
||||
vp.height = 0;
|
||||
vp.full_width = 0;
|
||||
vp.full_height = 0;
|
||||
|
||||
while ( check_pos && num < idx )
|
||||
{
|
||||
num++;
|
||||
check_pos = check_pos->next;
|
||||
}
|
||||
|
||||
if ( !check_pos && idx > 0 ) /* idx = 0 has mouse fallback. */
|
||||
return 0;
|
||||
|
||||
x = di->mouse_x;
|
||||
y = di->mouse_y;
|
||||
|
||||
if ( check_pos )
|
||||
{
|
||||
x = check_pos->pointer_x;
|
||||
y = check_pos->pointer_y;
|
||||
}
|
||||
|
||||
if ( !( video_driver_translate_coord_viewport_wrap(
|
||||
&vp, x, y, &res_x, &res_y, &res_screen_x, &res_screen_y ) ) )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
inside = (res_x >= -edge_detect) && (res_y >= -edge_detect) && (res_x <= edge_detect) && (res_y <= edge_detect);
|
||||
|
||||
switch ( id )
|
||||
{
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X:
|
||||
return inside ? res_x : 0;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y:
|
||||
return inside ? res_y : 0;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN:
|
||||
return !inside;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int16_t dinput_mouse_state(struct dinput_input *di, unsigned id)
|
||||
static int16_t dinput_mouse_state(struct dinput_input *di, unsigned port, unsigned id)
|
||||
{
|
||||
int16_t state = 0;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (port >= MAX_USERS)
|
||||
return false;
|
||||
|
||||
/* the driver only supports one mouse */
|
||||
if ( settings->uints.input_mouse_index[ port ] != 0 ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_X:
|
||||
|
@ -379,8 +487,18 @@ static int16_t dinput_mouse_state(struct dinput_input *di, unsigned id)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int16_t dinput_mouse_state_screen(struct dinput_input *di, unsigned id)
|
||||
static int16_t dinput_mouse_state_screen(struct dinput_input *di, unsigned port, unsigned id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (port >= MAX_USERS)
|
||||
return false;
|
||||
|
||||
/* the driver only supports one mouse */
|
||||
if ( settings->uints.input_mouse_index[ port ] != 0 ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_X:
|
||||
|
@ -391,7 +509,7 @@ static int16_t dinput_mouse_state_screen(struct dinput_input *di, unsigned id)
|
|||
break;
|
||||
}
|
||||
|
||||
return dinput_mouse_state(di, id);
|
||||
return dinput_mouse_state(di, port, id);
|
||||
}
|
||||
|
||||
static int16_t dinput_pointer_state(struct dinput_input *di,
|
||||
|
@ -494,10 +612,10 @@ static int16_t dinput_input_state(void *data,
|
|||
return 0;
|
||||
|
||||
case RETRO_DEVICE_MOUSE:
|
||||
return dinput_mouse_state(di, id);
|
||||
return dinput_mouse_state(di, port, id);
|
||||
|
||||
case RARCH_DEVICE_MOUSE_SCREEN:
|
||||
return dinput_mouse_state_screen(di, id);
|
||||
return dinput_mouse_state_screen(di, port, id);
|
||||
|
||||
case RETRO_DEVICE_POINTER:
|
||||
case RARCH_DEVICE_POINTER_SCREEN:
|
||||
|
@ -505,7 +623,48 @@ static int16_t dinput_input_state(void *data,
|
|||
device == RARCH_DEVICE_POINTER_SCREEN);
|
||||
|
||||
case RETRO_DEVICE_LIGHTGUN:
|
||||
return dinput_lightgun_state(di, id);
|
||||
switch ( id )
|
||||
{
|
||||
/*aiming*/
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X:
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y:
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN:
|
||||
return dinput_lightgun_aiming_state( di, idx, id );
|
||||
|
||||
/*buttons*/
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_TRIGGER:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_TRIGGER);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_RELOAD:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_RELOAD);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_A:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_A);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_B:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_B);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_AUX_C:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_AUX_C);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_START:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_START);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_SELECT:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_SELECT);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_UP);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_DOWN);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_LEFT);
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_DPAD_RIGHT);
|
||||
|
||||
/*deprecated*/
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_X:
|
||||
return di->mouse_rel_x;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_Y:
|
||||
return di->mouse_rel_y;
|
||||
case RETRO_DEVICE_ID_LIGHTGUN_PAUSE:
|
||||
return dinput_is_pressed(di, joypad_info, binds[port], port, RARCH_LIGHTGUN_START);
|
||||
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -212,33 +212,33 @@ static void wiiu_joypad_poll(void)
|
|||
if (vpad.tpNormal.touched && vpad.tpNormal.validity == VPAD_VALID) {
|
||||
struct video_viewport vp = {0};
|
||||
video_driver_get_viewport_info(&vp);
|
||||
VPADTouchData cal = {0};
|
||||
VPADTouchData cal720p = {0};
|
||||
/* Calibrates data to a 720p screen, seems to clamp outer 12px */
|
||||
VPADGetTPCalibratedPoint(0, &cal, &(vpad.tpNormal));
|
||||
VPADGetTPCalibratedPoint(0, &cal720p, &(vpad.tpNormal));
|
||||
/* Recalibrate to match video driver's coordinate system */
|
||||
VPADTouchData calNative = {0};
|
||||
calNative.x = scaleTP(12, 1268, 0, vp.full_width, cal720p.x);
|
||||
calNative.y = scaleTP(12, 708, 0, vp.full_height, cal720p.y);
|
||||
/* Clamp to actual game image */
|
||||
VPADTouchData calClamped = calNative;
|
||||
bool touchClamped = false;
|
||||
if (cal.x < vp.x) {
|
||||
cal.x = vp.x;
|
||||
if (calClamped.x < vp.x) {
|
||||
calClamped.x = vp.x;
|
||||
touchClamped = true;
|
||||
} else if (cal.x > vp.x + vp.width) {
|
||||
cal.x = vp.x + vp.width;
|
||||
} else if (calClamped.x > vp.x + vp.width) {
|
||||
calClamped.x = vp.x + vp.width;
|
||||
touchClamped = true;
|
||||
}
|
||||
if (cal.y < vp.y) {
|
||||
cal.y = vp.y;
|
||||
if (calClamped.y < vp.y) {
|
||||
calClamped.y = vp.y;
|
||||
touchClamped = true;
|
||||
} else if (cal.y > vp.y + vp.height) {
|
||||
cal.y = vp.y + vp.height;
|
||||
} else if (calClamped.y > vp.y + vp.height) {
|
||||
calClamped.y = vp.y + vp.height;
|
||||
touchClamped = true;
|
||||
}
|
||||
/* Account for 12px clamp on VPADGetTPCalibratedPoint */
|
||||
if (vp.x < 12) vp.x = 12;
|
||||
if (vp.y < 12) vp.y = 12;
|
||||
if (vp.x + vp.width > 1268) vp.width = 1268 - vp.x;
|
||||
if (vp.y + vp.height > 708) vp.height = 708 - vp.y;
|
||||
/* Calibrate to libretro spec and save as axis 2 (idx 4,5) */
|
||||
analog_state[0][2][0] = scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, cal.x);
|
||||
analog_state[0][2][1] = scaleTP(vp.y, vp.y + vp.height, -0x7fff, 0x7fff, cal.y);
|
||||
analog_state[0][2][0] = scaleTP(vp.x, vp.x + vp.width, -0x7fff, 0x7fff, calClamped.x);
|
||||
analog_state[0][2][1] = scaleTP(vp.y, vp.y + vp.height, -0x7fff, 0x7fff, calClamped.y);
|
||||
|
||||
/* Emulating a button (#19) for touch; lets people assign it to menu
|
||||
for that traditional RetroArch Wii U feel */
|
||||
|
|
|
@ -26,6 +26,8 @@ RETRO_BEGIN_DECLS
|
|||
#define MAX_USERS 16
|
||||
|
||||
#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
|
||||
|
||||
/* RetroArch specific bind IDs. */
|
||||
|
@ -42,9 +44,24 @@ enum
|
|||
RARCH_ANALOG_RIGHT_X_MINUS,
|
||||
RARCH_ANALOG_RIGHT_Y_PLUS,
|
||||
RARCH_ANALOG_RIGHT_Y_MINUS,
|
||||
RARCH_ANALOG_BIND_LIST_END,
|
||||
|
||||
/* Lightgun */
|
||||
RARCH_LIGHTGUN_TRIGGER = RARCH_FIRST_LIGHTGUN_BIND,
|
||||
RARCH_LIGHTGUN_RELOAD,
|
||||
RARCH_LIGHTGUN_AUX_A,
|
||||
RARCH_LIGHTGUN_AUX_B,
|
||||
RARCH_LIGHTGUN_AUX_C,
|
||||
RARCH_LIGHTGUN_START,
|
||||
RARCH_LIGHTGUN_SELECT,
|
||||
RARCH_LIGHTGUN_DPAD_UP,
|
||||
RARCH_LIGHTGUN_DPAD_DOWN,
|
||||
RARCH_LIGHTGUN_DPAD_LEFT,
|
||||
RARCH_LIGHTGUN_DPAD_RIGHT,
|
||||
RARCH_LIGHTGUN_BIND_LIST_END,
|
||||
|
||||
/* Turbo */
|
||||
RARCH_TURBO_ENABLE,
|
||||
RARCH_TURBO_ENABLE = RARCH_FIRST_MISC_CUSTOM_BIND,
|
||||
|
||||
RARCH_CUSTOM_BIND_LIST_END,
|
||||
|
||||
|
|
|
@ -267,6 +267,18 @@ const struct input_bind_map input_config_bind_map[RARCH_BIND_LIST_END_NULL] = {
|
|||
DECLARE_BIND(r_y_plus, RARCH_ANALOG_RIGHT_Y_PLUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS),
|
||||
DECLARE_BIND(r_y_minus, RARCH_ANALOG_RIGHT_Y_MINUS, MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS),
|
||||
|
||||
DECLARE_BIND( gun_trigger, RARCH_LIGHTGUN_TRIGGER, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER ),
|
||||
DECLARE_BIND( gun_offscreen_shot, RARCH_LIGHTGUN_RELOAD, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD ),
|
||||
DECLARE_BIND( gun_aux_a, RARCH_LIGHTGUN_AUX_A, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A ),
|
||||
DECLARE_BIND( gun_aux_b, RARCH_LIGHTGUN_AUX_B, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B ),
|
||||
DECLARE_BIND( gun_aux_c, RARCH_LIGHTGUN_AUX_C, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C ),
|
||||
DECLARE_BIND( gun_start, RARCH_LIGHTGUN_START, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START ),
|
||||
DECLARE_BIND( gun_select, RARCH_LIGHTGUN_SELECT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT ),
|
||||
DECLARE_BIND( gun_dpad_up, RARCH_LIGHTGUN_DPAD_UP, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP ),
|
||||
DECLARE_BIND( gun_dpad_down, RARCH_LIGHTGUN_DPAD_DOWN, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN ),
|
||||
DECLARE_BIND( gun_dpad_left, RARCH_LIGHTGUN_DPAD_LEFT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT ),
|
||||
DECLARE_BIND( gun_dpad_right, RARCH_LIGHTGUN_DPAD_RIGHT, MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT ),
|
||||
|
||||
DECLARE_BIND(turbo, RARCH_TURBO_ENABLE, MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE),
|
||||
|
||||
DECLARE_META_BIND(1, toggle_fast_forward, RARCH_FAST_FORWARD_KEY, MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY),
|
||||
|
@ -381,6 +393,7 @@ static const void *hid_data = NULL;
|
|||
#define check_input_driver_block_hotkey(normal_bind, autoconf_bind) \
|
||||
( \
|
||||
(((normal_bind)->key != RETROK_UNKNOWN) \
|
||||
|| ((normal_bind)->mbutton != NO_BTN) \
|
||||
|| ((normal_bind)->joykey != NO_BTN) \
|
||||
|| ((normal_bind)->joyaxis != AXIS_NONE) \
|
||||
|| ((autoconf_bind)->key != RETROK_UNKNOWN ) \
|
||||
|
@ -669,7 +682,8 @@ int16_t input_state(unsigned port, unsigned device,
|
|||
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
if (input_driver_mapper)
|
||||
input_mapper_state(&res, port, device, idx, id);
|
||||
input_mapper_state(input_driver_mapper,
|
||||
&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
/* Don't allow turbo for D-pad. */
|
||||
|
@ -778,17 +792,12 @@ void state_tracker_update_input(uint16_t *input1, uint16_t *input2)
|
|||
* Grab an input sample for this frame. We exclude
|
||||
* keyboard input here.
|
||||
*
|
||||
* TODO: In case RARCH_BIND_LIST_END starts exceeding 64,
|
||||
* and you need a bitmask of more than 64 entries, reimplement
|
||||
* it to use something like rarch_bits_t.
|
||||
*
|
||||
* Returns: Input sample containing a mask of all pressed keys.
|
||||
*/
|
||||
uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
||||
void input_menu_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
{
|
||||
unsigned i, port;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
uint64_t ret = 0;
|
||||
const struct retro_keybind *binds[MAX_USERS] = {NULL};
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const struct retro_keybind *binds_norm = NULL;
|
||||
|
@ -798,6 +807,8 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
settings->bools.input_all_users_control_menu
|
||||
? max_users : 1;
|
||||
|
||||
RARCH_INPUT_STATE_CLEAR_PTR( p_new_state );
|
||||
|
||||
input_driver_block_libretro_input = false;
|
||||
input_driver_block_hotkey = false;
|
||||
|
||||
|
@ -898,7 +909,7 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
|
||||
if (pressed)
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -908,7 +919,7 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
{
|
||||
if (current_input->meta_key_pressed(current_input_data, i))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -916,7 +927,7 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
#ifdef HAVE_OVERLAY
|
||||
if (overlay_ptr && input_overlay_key_pressed(overlay_ptr, i))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
@ -931,7 +942,7 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
|
||||
if (command_get(&handle))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -940,7 +951,7 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
if (input_driver_remote && input_remote_key_pressed(i, 0))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
@ -995,11 +1006,9 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
{
|
||||
if (current_input->input_state(current_input_data, joypad_info, binds, 0,
|
||||
RETRO_DEVICE_KEYBOARD, 0, ids[i][0]))
|
||||
BIT64_SET(ret, ids[i][1]);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, ids[i][1]);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -1008,17 +1017,12 @@ uint64_t input_menu_keys_pressed(void *data, uint64_t last_input)
|
|||
*
|
||||
* Grab an input sample for this frame.
|
||||
*
|
||||
* TODO: In case RARCH_BIND_LIST_END starts exceeding 64,
|
||||
* and you need a bitmask of more than 64 entries, reimplement
|
||||
* it to use something like rarch_bits_t.
|
||||
*
|
||||
* Returns: Input sample containing a mask of all pressed keys.
|
||||
*/
|
||||
uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
||||
void input_keys_pressed(void *data, retro_bits_t* p_new_state)
|
||||
{
|
||||
unsigned i;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
uint64_t ret = 0;
|
||||
settings_t *settings = (settings_t*)data;
|
||||
const struct retro_keybind *binds = input_config_binds[0];
|
||||
const struct retro_keybind *binds_auto = &input_autoconf_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
|
@ -1029,6 +1033,8 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
const struct retro_keybind *enable_hotkey = &input_config_binds[0][RARCH_ENABLE_HOTKEY];
|
||||
bool game_focus_toggle_valid = false;
|
||||
|
||||
RARCH_INPUT_STATE_CLEAR_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;
|
||||
|
@ -1073,7 +1079,7 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
0, RETRO_DEVICE_JOYPAD, 0, i)
|
||||
)
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1081,7 +1087,7 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
current_input->meta_key_pressed(current_input_data, i)
|
||||
)
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1089,7 +1095,7 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
if (overlay_ptr &&
|
||||
input_overlay_key_pressed(overlay_ptr, i))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
@ -1104,7 +1110,7 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
|
||||
if (command_get(&handle))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
@ -1114,13 +1120,11 @@ uint64_t input_keys_pressed(void *data, uint64_t last_input)
|
|||
if (input_driver_remote &&
|
||||
input_remote_key_pressed(i, 0))
|
||||
{
|
||||
BIT64_SET(ret, i);
|
||||
RARCH_INPUT_STATE_BIT_SET_PTR(p_new_state, i);
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1753,6 +1757,39 @@ bool input_joypad_hat_raw(const input_device_driver_t *drv,
|
|||
return drv->button(port, HAT_MAP(hat, hat_dir));
|
||||
}
|
||||
|
||||
/**
|
||||
* input_mouse_button_raw:
|
||||
* @port : Mouse number.
|
||||
* @button : Identifier of key (libretro mouse constant).
|
||||
*
|
||||
* Checks if key (@button) was being pressed by user
|
||||
* with mouse number @port.
|
||||
*
|
||||
* Returns: true (1) if key was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
bool input_mouse_button_raw(unsigned port, unsigned id)
|
||||
{
|
||||
int16_t res;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/*ignore axes*/
|
||||
if ( id == RETRO_DEVICE_ID_MOUSE_X || id == RETRO_DEVICE_ID_MOUSE_Y )
|
||||
return false;
|
||||
|
||||
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];
|
||||
|
||||
res = current_input->input_state(current_input_data,
|
||||
joypad_info, libretro_input_binds, port, RETRO_DEVICE_MOUSE, 0, id);
|
||||
|
||||
if (res)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* input_conv_analog_id_to_bind_id:
|
||||
* @idx : Analog key index.
|
||||
|
@ -2419,6 +2456,74 @@ void input_config_parse_joy_axis(void *data, const char *prefix,
|
|||
}
|
||||
}
|
||||
|
||||
void input_config_parse_mouse_button(void *data, const char *prefix,
|
||||
const char *btn, struct retro_keybind *bind)
|
||||
{
|
||||
int val;
|
||||
char str[256];
|
||||
char tmp[64];
|
||||
char key[64];
|
||||
config_file_t *conf = (config_file_t*)data;
|
||||
|
||||
str[0] = tmp[0] = key[0] = '\0';
|
||||
|
||||
fill_pathname_join_delim(str, prefix, btn,
|
||||
'_', sizeof(str));
|
||||
fill_pathname_join_delim(key, str,
|
||||
"mbtn", '_', sizeof(key));
|
||||
|
||||
if ( bind && config_get_array(conf, key, tmp, sizeof(tmp)) )
|
||||
{
|
||||
bind->mbutton = NO_BTN;
|
||||
|
||||
if ( tmp[0]=='w' )
|
||||
{
|
||||
switch ( tmp[1] )
|
||||
{
|
||||
case 'u':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_WHEELUP;
|
||||
break;
|
||||
case 'd':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_WHEELDOWN;
|
||||
break;
|
||||
case 'h':
|
||||
switch ( tmp[2] )
|
||||
{
|
||||
case 'u':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP;
|
||||
break;
|
||||
case 'd':
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
val = atoi(tmp);
|
||||
switch ( val )
|
||||
{
|
||||
case 1:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_LEFT;
|
||||
break;
|
||||
case 2:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_RIGHT;
|
||||
break;
|
||||
case 3:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_MIDDLE;
|
||||
break;
|
||||
case 4:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_BUTTON_4;
|
||||
break;
|
||||
case 5:
|
||||
bind->mbutton = RETRO_DEVICE_ID_MOUSE_BUTTON_5;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void input_config_get_bind_string_joykey(
|
||||
char *buf, const char *prefix,
|
||||
const struct retro_keybind *bind, size_t size)
|
||||
|
@ -2461,9 +2566,9 @@ 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 (btn) ", prefix, bind->joykey_label);
|
||||
snprintf(buf, size, "%s%s (btn)", prefix, bind->joykey_label);
|
||||
else
|
||||
snprintf(buf, size, "%s%u (%s) ", prefix, (unsigned)bind->joykey,
|
||||
snprintf(buf, size, "%s%u (%s)", prefix, (unsigned)bind->joykey,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||
}
|
||||
}
|
||||
|
@ -2491,7 +2596,7 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
|
|||
dir = '+';
|
||||
axis = AXIS_POS_GET(bind->joyaxis);
|
||||
}
|
||||
snprintf(buf, size, "%s%c%u (%s) ", prefix, dir, axis,
|
||||
snprintf(buf, size, "%s%c%u (%s)", prefix, dir, axis,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_NOT_AVAILABLE));
|
||||
}
|
||||
}
|
||||
|
@ -2499,6 +2604,7 @@ static void input_config_get_bind_string_joyaxis(char *buf, const char *prefix,
|
|||
void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
|
||||
const struct retro_keybind *auto_bind, size_t size)
|
||||
{
|
||||
int delim = 0;
|
||||
#ifndef RARCH_CONSOLE
|
||||
char key[64];
|
||||
char keybuf[64];
|
||||
|
@ -2516,14 +2622,70 @@ void input_config_get_bind_string(char *buf, const struct retro_keybind *bind,
|
|||
else if (auto_bind && auto_bind->joyaxis != AXIS_NONE)
|
||||
input_config_get_bind_string_joyaxis(buf, "Auto: ", auto_bind, size);
|
||||
|
||||
if (*buf)
|
||||
delim = 1;
|
||||
|
||||
#ifndef RARCH_CONSOLE
|
||||
input_keymaps_translate_rk_to_str(bind->key, key, sizeof(key));
|
||||
if (string_is_equal(key, file_path_str(FILE_PATH_NUL)))
|
||||
*key = '\0';
|
||||
|
||||
snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key);
|
||||
strlcat(buf, keybuf, size);
|
||||
/*empty?*/
|
||||
if (*key != '\0')
|
||||
{
|
||||
if (delim )
|
||||
strlcat(buf, ", ", size);
|
||||
snprintf(keybuf, sizeof(keybuf), msg_hash_to_str(MENU_ENUM_LABEL_VALUE_INPUT_KEY), key);
|
||||
strlcat(buf, keybuf, size);
|
||||
delim = 1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ( bind->mbutton != NO_BTN )
|
||||
{
|
||||
int tag = 0;
|
||||
switch ( bind->mbutton )
|
||||
{
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP;
|
||||
break;
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
tag = MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN;
|
||||
break;
|
||||
} /* switch ( bind->mbutton ) */
|
||||
|
||||
if (tag != 0)
|
||||
{
|
||||
if (delim)
|
||||
strlcat(buf, ", ", size);
|
||||
strlcat(buf, msg_hash_to_str((enum msg_hash_enums)tag), size );
|
||||
delim = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/*completely empty?*/
|
||||
if ( *buf == '\0' )
|
||||
strlcat(buf, "---", size);
|
||||
}
|
||||
|
||||
const char *input_config_get_device_name(unsigned port)
|
||||
|
@ -2536,11 +2698,9 @@ const char *input_config_get_device_name(unsigned port)
|
|||
void input_config_set_device_name(unsigned port, const char *name)
|
||||
{
|
||||
if (!string_is_empty(name))
|
||||
{
|
||||
strlcpy(input_device_names[port],
|
||||
name,
|
||||
sizeof(input_device_names[port]));
|
||||
}
|
||||
}
|
||||
|
||||
void input_config_clear_device_name(unsigned port)
|
||||
|
@ -2580,7 +2740,8 @@ bool input_config_get_bind_idx(unsigned port, unsigned *joy_idx_real)
|
|||
return true;
|
||||
}
|
||||
|
||||
const struct retro_keybind *input_config_get_bind_auto(unsigned port, unsigned id)
|
||||
const struct retro_keybind *input_config_get_bind_auto(
|
||||
unsigned port, unsigned id)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned joy_idx = settings->uints.input_joypad_map[port];
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include <retro_common_api.h>
|
||||
#include <retro_inline.h>
|
||||
#include <libretro.h>
|
||||
#include <retro_miscellaneous.h>
|
||||
|
||||
#include "input_defines.h"
|
||||
|
||||
|
@ -95,6 +96,8 @@ struct retro_keybind
|
|||
enum msg_hash_enums enum_idx;
|
||||
enum retro_key key;
|
||||
|
||||
uint16_t mbutton;
|
||||
|
||||
/* Joypad key. Joypad POV (hats)
|
||||
* are embedded into this key as well. */
|
||||
uint64_t joykey;
|
||||
|
@ -333,10 +336,30 @@ void input_poll(void);
|
|||
int16_t input_state(unsigned port, unsigned device,
|
||||
unsigned idx, unsigned id);
|
||||
|
||||
uint64_t input_keys_pressed(void *data, uint64_t last_input);
|
||||
#define RARCH_INPUT_STATE_BIT_SET(a,bit) ((a).data [((bit) >> 5)] |= (1 << ((bit) & 31)))
|
||||
#define RARCH_INPUT_STATE_BIT_SET_PTR(a,bit) ((a)->data[((bit) >> 5)] |= (1 << ((bit) & 31)))
|
||||
#define RARCH_INPUT_STATE_BIT_GET(a,bit) ((a).data [((bit) >> 5)] & (1 << ((bit) & 31)))
|
||||
#define RARCH_INPUT_STATE_BIT_GET_PTR(a,bit) ((a)->data[((bit) >> 5)] & (1 << ((bit) & 31)))
|
||||
#define RARCH_INPUT_STATE_CLEAR(a) memset(&a, 0, sizeof(a));
|
||||
#define RARCH_INPUT_STATE_CLEAR_PTR(a) memset(a, 0, sizeof(retro_bits_t));
|
||||
#define RARCH_INPUT_STATE_ANY_SET(a) ( ((a).data[0])||((a).data[1])||((a).data[2])||((a).data[3])|| \
|
||||
((a).data[4])||((a).data[5])||((a).data[6])||((a).data[7]) )
|
||||
#define RARCH_INPUT_STATE_ANY_SET_PTR(a) ( ((a)->data[0])||((a)->data[1])||((a)->data[2])||((a)->data[3])|| \
|
||||
((a)->data[4])||((a)->data[5])||((a)->data[6])||((a)->data[7]) )
|
||||
#define RARCH_INPUT_STATE_CLEAR_BITS(a,b) \
|
||||
((a).data[0])&=(~((b).data[0])); \
|
||||
((a).data[1])&=(~((b).data[1])); \
|
||||
((a).data[2])&=(~((b).data[2])); \
|
||||
((a).data[3])&=(~((b).data[3])); \
|
||||
((a).data[4])&=(~((b).data[4])); \
|
||||
((a).data[5])&=(~((b).data[5])); \
|
||||
((a).data[6])&=(~((b).data[6])); \
|
||||
((a).data[7])&=(~((b).data[7]));
|
||||
|
||||
void input_keys_pressed(void *data, retro_bits_t* new_state);
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
uint64_t input_menu_keys_pressed(void *data, uint64_t last_input);
|
||||
void input_menu_keys_pressed(void *data, retro_bits_t* new_state);
|
||||
#endif
|
||||
|
||||
void *input_driver_get_data(void);
|
||||
|
@ -585,7 +608,20 @@ bool input_joypad_hat_raw(const input_device_driver_t *driver,
|
|||
unsigned joypad, unsigned hat_dir, unsigned hat);
|
||||
|
||||
/**
|
||||
* input_joypad_name:
|
||||
* input_mouse_button_raw:
|
||||
* @port : Mouse number.
|
||||
* @button : Identifier of key (libretro mouse constant).
|
||||
*
|
||||
* Checks if key (@button) was being pressed by user
|
||||
* with mouse number @port.
|
||||
*
|
||||
* Returns: true (1) if key was pressed, otherwise
|
||||
* false (0).
|
||||
**/
|
||||
bool input_mouse_button_raw(unsigned port, unsigned button);
|
||||
|
||||
/**
|
||||
* input_joypad_name:
|
||||
* @drv : Input device driver handle.
|
||||
* @port : Joystick number.
|
||||
*
|
||||
|
@ -738,6 +774,9 @@ void input_config_parse_joy_button(void *data, const char *prefix,
|
|||
void input_config_parse_joy_axis(void *data, const char *prefix,
|
||||
const char *axis, struct retro_keybind *bind);
|
||||
|
||||
void input_config_parse_mouse_button(void *data, const char *prefix,
|
||||
const char *btn, struct retro_keybind *bind);
|
||||
|
||||
void input_config_set_device_name(unsigned port, const char *name);
|
||||
|
||||
void input_config_clear_device_name(unsigned port);
|
||||
|
|
|
@ -56,82 +56,89 @@ struct input_mapper
|
|||
uint64_t buttons;
|
||||
};
|
||||
|
||||
static input_mapper_t *mapper_ptr;
|
||||
|
||||
input_mapper_t *input_mapper_new(uint16_t port)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
input_mapper_t* handle = (input_mapper_t*)
|
||||
calloc(1, sizeof(*handle));
|
||||
|
||||
if (!handle)
|
||||
return NULL;
|
||||
|
||||
handle->port = port;
|
||||
mapper_ptr = handle;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
void input_mapper_free(input_mapper_t *handle)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
free (handle);
|
||||
}
|
||||
|
||||
void input_mapper_poll(input_mapper_t *handle)
|
||||
{
|
||||
int i;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned device = settings->uints.input_libretro_device[handle->port];
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
unsigned device = settings->uints.input_libretro_device[handle->port];
|
||||
|
||||
device &= RETRO_DEVICE_MASK;
|
||||
|
||||
/* for now we only handle keyboard inputs */
|
||||
if (device == RETRO_DEVICE_KEYBOARD)
|
||||
{
|
||||
int i;
|
||||
memset(handle->keys, 0, sizeof(handle->keys));
|
||||
if (device != RETRO_DEVICE_KEYBOARD)
|
||||
return;
|
||||
|
||||
for (i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++)
|
||||
memset(handle->keys, 0, sizeof(handle->keys));
|
||||
|
||||
for (i = 0; i < RARCH_CUSTOM_BIND_LIST_END; i++)
|
||||
{
|
||||
if (i < RETROK_LAST)
|
||||
{
|
||||
if (i < RETROK_LAST)
|
||||
if (input_state(handle->port, RETRO_DEVICE_JOYPAD, 0, i))
|
||||
{
|
||||
if (input_state(handle->port, RETRO_DEVICE_JOYPAD, 0, i))
|
||||
{
|
||||
MAPPER_SET_KEY (handle, settings->uints.input_keymapper_ids[i]);
|
||||
input_keyboard_event(true, settings->uints.input_keymapper_ids[i], 0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
else
|
||||
input_keyboard_event(false, settings->uints.input_keymapper_ids[i], 0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
MAPPER_SET_KEY (handle,
|
||||
settings->uints.input_keymapper_ids[i]);
|
||||
input_keyboard_event(true,
|
||||
settings->uints.input_keymapper_ids[i],
|
||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
else
|
||||
input_keyboard_event(false,
|
||||
settings->uints.input_keymapper_ids[i],
|
||||
0, 0, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void input_mapper_state(
|
||||
input_mapper_t *handle,
|
||||
int16_t *ret,
|
||||
unsigned port,
|
||||
unsigned device,
|
||||
unsigned idx,
|
||||
unsigned id)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
settings_t *settings = config_get_ptr();
|
||||
switch (device)
|
||||
{
|
||||
case RETRO_DEVICE_KEYBOARD:
|
||||
if (id < RETROK_LAST)
|
||||
{
|
||||
/*
|
||||
RARCH_LOG("State: UDLR %u %u %u %u\n",
|
||||
MAPPER_GET_KEY(mapper_ptr, RETROK_UP),
|
||||
MAPPER_GET_KEY(mapper_ptr, RETROK_DOWN),
|
||||
MAPPER_GET_KEY(mapper_ptr, RETROK_LEFT),
|
||||
MAPPER_GET_KEY(mapper_ptr, RETROK_RIGHT)
|
||||
);*/
|
||||
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(mapper_ptr, id))
|
||||
if (MAPPER_GET_KEY(handle, id))
|
||||
*ret |= 1;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@ void input_mapper_poll(input_mapper_t *handle);
|
|||
bool input_mapper_key_pressed(int key);
|
||||
|
||||
void input_mapper_state(
|
||||
input_mapper_t *handle,
|
||||
int16_t *ret,
|
||||
unsigned port,
|
||||
unsigned device,
|
||||
|
|
|
@ -682,6 +682,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"右摇杆Y- (上)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"右摇杆Y+ (下)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"启用自动配置")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -744,6 +766,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y键(左侧)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(键: %s)") /*FIXME:"(Key: %s)"*/
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"键盘控制器映射类型")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -682,6 +682,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"右搖桿Y- (上)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"右搖桿Y+ (下)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"啟用自動設定")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -744,6 +766,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y鍵(左側)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(鍵: %s)") /*FIXME:"(Key: %s)"*/
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"鍵盤控制器映射類型")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -687,6 +687,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Rechter Analogstick Y- (nach oben)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Rechter Analogstick Y+ (nach unten)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Automatische Konfiguration aktivieren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -751,6 +773,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y-Knopf (links)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Taste: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Typ der Keyboard-Controller-Abbildung")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -598,6 +598,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Right analog Y- (up)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Right analog Y+ (down)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Autoconfig Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -660,6 +682,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y button (left)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Key: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Keyboard Gamepad Mapping Type")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -681,6 +681,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Analogique droit Y- (haut)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Analogique droit Y+ (bas)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Activer l'autoconfiguration")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -745,6 +767,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Bouton Y (gauche)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Touche : %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Type de mappage manette/clavier")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -687,6 +687,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Analogico Destro Y- (su)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Analogico Destro Y+ (giù)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Abilita Autoconfigurazione")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -751,6 +773,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Pulsante Y (sinistro)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Tasto: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Tipo di mappatura del gamepad della tastiera")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
@ -2228,7 +2268,7 @@ MSG_HASH(MSG_SKIPPING_SRAM_LOAD,
|
|||
MSG_HASH(MSG_SLOW_MOTION,
|
||||
"Slow motion.")
|
||||
MSG_HASH(MSG_FAST_FORWARD,
|
||||
"Avanti veloce.")
|
||||
"Avanzamento rapido.")
|
||||
MSG_HASH(MSG_SLOW_MOTION_REWIND,
|
||||
"Riavvolgimento lento.")
|
||||
MSG_HASH(MSG_SRAM_WILL_NOT_BE_SAVED,
|
||||
|
|
|
@ -705,6 +705,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"右アナログY- (上)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"右アナログY+ (下)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"自動コンフィグを有効")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -769,6 +791,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Yボタン(左)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(キー: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"キーボードのゲームパッドマッピング式")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -669,6 +669,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"우 아날로그 Y- (상)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"우 아날로그 Y+ (하)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"자동설정 사용")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -731,6 +753,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y 버튼 (좌)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(키: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"키보드 게임패드 설정 형식")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -136,6 +136,8 @@ MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
|
|||
"cheevos_hardcore_mode_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
"cheevos_leaderboards_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE,
|
||||
"cheevos_badges_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
"cheevos_locked_achievements")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||
|
@ -148,6 +150,8 @@ MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ACHIEVEMENTS,
|
|||
"cheevos_unlocked_achievements")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||
"cheevos_unlocked_entry")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY_HARDCORE,
|
||||
"cheevos_unlocked_entry_hardcore")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_USERNAME,
|
||||
"cheevos_username")
|
||||
MSG_HASH(MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||
|
|
|
@ -598,6 +598,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Right analog Y- (up)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Right analog Y+ (down)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Autoconfiguratie Activeren")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -660,6 +682,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y knop (left)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Key: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Keyboard Gamepad Mapping Type")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -661,6 +661,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Analógico Direito Y+ (baixo)"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Habilitar Autoconfiguração"
|
||||
)
|
||||
|
@ -757,6 +779,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Tecla: %s)"
|
||||
)
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Tipo de Mapeamento para Gamepad no Teclado"
|
||||
)
|
||||
|
|
|
@ -669,6 +669,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Analógico Direito Y- (cima)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Analógico Direito Y+ (baixo)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Habilitar Auto-configuração")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -731,6 +753,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Botão Y (esquerda)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Tecla: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Tipo de Mapeamento do Gamepad no Teclado")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -434,6 +434,10 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VALUE_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
"Leaderboards"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE,
|
||||
"Achievement Badges"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_LOCKED_ACHIEVEMENTS,
|
||||
"Locked Achievements:"
|
||||
|
@ -458,6 +462,10 @@ MSG_HASH(
|
|||
MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY,
|
||||
"Unlocked"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE,
|
||||
"Hardcore"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Achievements Verbose Mode"
|
||||
|
@ -691,6 +699,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Right analog Y- (up)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Right analog Y+ (down)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Autoconfig Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -755,6 +785,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y button (left)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Key: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Keyboard Gamepad Mapping Type")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
@ -1791,6 +1839,8 @@ MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE,
|
|||
"Enable or disable savestates, cheats, rewind, fast-forward, pause, and slow-motion for all games.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
"Enable or disable in-game leaderboards. Has no effect if Hardcore Mode is disabled.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE,
|
||||
"Enable or disable badge display in Achievement List.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE,
|
||||
"Enable or disable OSD verbosity for achievements.")
|
||||
MSG_HASH(MENU_ENUM_SUBLABEL_DRIVER_SETTINGS,
|
||||
|
|
|
@ -681,6 +681,28 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
|||
"Right analog Y- (up)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
"Right analog Y+ (down)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
"Gun Trigger")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
"Gun Reload")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
"Gun Aux A")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
"Gun Aux B")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
"Gun Aux C")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
"Gun Start")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
"Gun Select")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
"Gun D-pad Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
"Gun D-pad Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
"Gun D-pad Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
"Gun D-pad Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AUTODETECT_ENABLE,
|
||||
"Kích hoạt Autoconfig")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_AXIS_THRESHOLD,
|
||||
|
@ -743,6 +765,24 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_Y,
|
|||
"Y button (left)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
"(Key: %s)")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
"Mouse 1")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
"Mouse 2")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
"Mouse 3")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
"Mouse 4")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
"Mouse 5")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
"Wheel Up")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
"Wheel Down")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
"Wheel Left")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
"Wheel Right")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_KEYBOARD_GAMEPAD_MAPPING_TYPE,
|
||||
"Keyboard Gamepad Mapping Type")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_INPUT_MAX_USERS,
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
@ -60,3 +61,10 @@ size_t strlcat(char *dest, const char *source, size_t size)
|
|||
return len + strlcpy(dest, source, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
char *strldup(const char *s, size_t n)
|
||||
{
|
||||
char *dst = (char*)malloc(sizeof(char) * (n + 1));
|
||||
strlcpy(dst, s, n);
|
||||
return dst;
|
||||
}
|
||||
|
|
|
@ -72,10 +72,6 @@
|
|||
#include <pspkernel.h>
|
||||
#endif
|
||||
|
||||
#ifdef __HAIKU__
|
||||
#include <kernel/image.h>
|
||||
#endif
|
||||
|
||||
#if defined(__CELLOS_LV2__)
|
||||
#include <cell/cell_fs.h>
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio_intf.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#include <file/nbio.h>
|
||||
|
||||
extern nbio_intf_t nbio_linux;
|
||||
extern nbio_intf_t nbio_mmap_unix;
|
||||
extern nbio_intf_t nbio_mmap_win32;
|
||||
extern nbio_intf_t nbio_stdio;
|
||||
|
||||
#if defined(_linux__)
|
||||
static nbio_intf_t *internal_nbio = &nbio_linux;
|
||||
#elif defined(HAVE_MMAP) && defined(BSD)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_unix;
|
||||
#elif defined(_WIN32) && !defined(_XBOX)
|
||||
static nbio_intf_t *internal_nbio = &nbio_mmap_win32;
|
||||
#else
|
||||
static nbio_intf_t *internal_nbio = &nbio_stdio;
|
||||
#endif
|
||||
|
||||
void *nbio_open(const char * filename, unsigned mode)
|
||||
{
|
||||
return internal_nbio->open(filename, mode);
|
||||
}
|
||||
|
||||
void nbio_begin_read(void *data)
|
||||
{
|
||||
internal_nbio->begin_read(data);
|
||||
}
|
||||
|
||||
void nbio_begin_write(void *data)
|
||||
{
|
||||
internal_nbio->begin_write(data);
|
||||
}
|
||||
|
||||
bool nbio_iterate(void *data)
|
||||
{
|
||||
return internal_nbio->iterate(data);
|
||||
}
|
||||
|
||||
void nbio_resize(void *data, size_t len)
|
||||
{
|
||||
internal_nbio->resize(data, len);
|
||||
}
|
||||
|
||||
void *nbio_get_ptr(void *data, size_t* len)
|
||||
{
|
||||
return internal_nbio->get_ptr(data, len);
|
||||
}
|
||||
|
||||
void nbio_cancel(void *data)
|
||||
{
|
||||
internal_nbio->cancel(data);
|
||||
}
|
||||
|
||||
void nbio_free(void *data)
|
||||
{
|
||||
internal_nbio->free(data);
|
||||
}
|
|
@ -0,0 +1,243 @@
|
|||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio_linux.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <file/nbio.h>
|
||||
|
||||
#if defined(__linux__)
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
#include <unistd.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <linux/aio_abi.h>
|
||||
|
||||
struct nbio_linux_t
|
||||
{
|
||||
int fd;
|
||||
bool busy;
|
||||
|
||||
aio_context_t ctx;
|
||||
struct iocb cb;
|
||||
|
||||
void* ptr;
|
||||
size_t len;
|
||||
};
|
||||
|
||||
/* there's also a Unix AIO thingy, but it's not in glibc
|
||||
* and we don't want more dependencies */
|
||||
|
||||
static int io_setup(unsigned nr, aio_context_t * ctxp)
|
||||
{
|
||||
return syscall(__NR_io_setup, nr, ctxp);
|
||||
}
|
||||
|
||||
static int io_destroy(aio_context_t ctx)
|
||||
{
|
||||
return syscall(__NR_io_destroy, ctx);
|
||||
}
|
||||
|
||||
static int io_submit(aio_context_t ctx, long nr, struct iocb ** cbp)
|
||||
{
|
||||
return syscall(__NR_io_submit, ctx, nr, cbp);
|
||||
}
|
||||
|
||||
static int io_cancel(aio_context_t ctx, struct iocb * iocb, struct io_event * result)
|
||||
{
|
||||
return syscall(__NR_io_cancel, ctx, iocb, result);
|
||||
}
|
||||
|
||||
static int io_getevents(aio_context_t ctx, long min_nr, long nr,
|
||||
struct io_event * events, struct timespec * timeout)
|
||||
{
|
||||
return syscall(__NR_io_getevents, ctx, min_nr, nr, events, timeout);
|
||||
}
|
||||
|
||||
static void nbio_begin_op(struct nbio_linux_t* handle, uint16_t op)
|
||||
{
|
||||
struct iocb * cbp = &handle->cb;
|
||||
|
||||
memset(&handle->cb, 0, sizeof(handle->cb));
|
||||
|
||||
handle->cb.aio_fildes = handle->fd;
|
||||
handle->cb.aio_lio_opcode = op;
|
||||
|
||||
handle->cb.aio_buf = (uint64_t)(uintptr_t)handle->ptr;
|
||||
handle->cb.aio_offset = 0;
|
||||
handle->cb.aio_nbytes = handle->len;
|
||||
|
||||
if (io_submit(handle->ctx, 1, &cbp) != 1)
|
||||
{
|
||||
puts("ERROR - io_submit() failed");
|
||||
abort();
|
||||
}
|
||||
|
||||
handle->busy = true;
|
||||
}
|
||||
|
||||
static void *nbio_linux_open(const char * filename, unsigned mode)
|
||||
{
|
||||
static const int o_flags[] = { O_RDONLY, O_RDWR|O_CREAT|O_TRUNC, O_RDWR, O_RDONLY, O_RDWR|O_CREAT|O_TRUNC };
|
||||
|
||||
aio_context_t ctx = 0;
|
||||
struct nbio_linux_t* handle = NULL;
|
||||
int fd = open(filename, o_flags[mode]|O_CLOEXEC, 0644);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
if (io_setup(128, &ctx) < 0)
|
||||
{
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
handle = malloc(sizeof(struct nbio_linux_t));
|
||||
handle->fd = fd;
|
||||
handle->ctx = ctx;
|
||||
handle->len = lseek(fd, 0, SEEK_END);
|
||||
handle->ptr = malloc(handle->len);
|
||||
handle->busy = false;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
static void nbio_linux_begin_read(void *data)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (handle)
|
||||
nbio_begin_op(handle, IOCB_CMD_PREAD);
|
||||
}
|
||||
|
||||
static void nbio_linux_begin_write(void *data)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (handle)
|
||||
nbio_begin_op(handle, IOCB_CMD_PWRITE);
|
||||
}
|
||||
|
||||
static bool nbio_linux_iterate(void *data)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (!handle)
|
||||
return false;
|
||||
if (handle->busy)
|
||||
{
|
||||
struct io_event ev;
|
||||
if (io_getevents(handle->ctx, 0, 1, &ev, NULL) == 1)
|
||||
handle->busy = false;
|
||||
}
|
||||
return !handle->busy;
|
||||
}
|
||||
|
||||
static void nbio_linux_resize(void *data, size_t len)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (len < handle->len)
|
||||
{
|
||||
/* this works perfectly fine if this check is removed, but it
|
||||
* won't work on other nbio implementations */
|
||||
/* therefore, it's blocked so nobody accidentally relies on it */
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
|
||||
if (ftruncate(handle->fd, len) != 0)
|
||||
{
|
||||
puts("ERROR - couldn't resize file (ftruncate)");
|
||||
abort(); /* this one returns void and I can't find any other way
|
||||
for it to report failure */
|
||||
}
|
||||
handle->ptr = realloc(handle->ptr, len);
|
||||
handle->len = len;
|
||||
}
|
||||
|
||||
static void *nbio_linux_get_ptr(void *data, size_t* len)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (!handle)
|
||||
return NULL;
|
||||
if (len)
|
||||
*len = handle->len;
|
||||
if (!handle->busy)
|
||||
return handle->ptr;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void nbio_linux_cancel(void *data)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->busy)
|
||||
{
|
||||
struct io_event ev;
|
||||
io_cancel(handle->ctx, &handle->cb, &ev);
|
||||
handle->busy = false;
|
||||
}
|
||||
}
|
||||
|
||||
static void nbio_linux_free(void *data)
|
||||
{
|
||||
struct nbio_linux_t* handle = (struct nbio_linux_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
io_destroy(handle->ctx);
|
||||
close(handle->fd);
|
||||
free(handle->ptr);
|
||||
free(handle);
|
||||
}
|
||||
|
||||
nbio_intf_t nbio_linux = {
|
||||
nbio_linux_open,
|
||||
nbio_linux_begin_read,
|
||||
nbio_linux_begin_write,
|
||||
nbio_linux_iterate,
|
||||
nbio_linux_resize,
|
||||
nbio_linux_get_ptr,
|
||||
nbio_linux_cancel,
|
||||
nbio_linux_free,
|
||||
"nbio_linux",
|
||||
};
|
||||
#else
|
||||
nbio_intf_t nbio_linux = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"nbio_linux",
|
||||
};
|
||||
|
||||
#endif
|
|
@ -1,227 +1,268 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <file/nbio.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
/* Assume W-functions do not work below VC2005 and Xbox platforms */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||
|
||||
#ifndef LEGACY_WIN32
|
||||
#define LEGACY_WIN32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
struct nbio_t
|
||||
{
|
||||
FILE* f;
|
||||
void* data;
|
||||
size_t progress;
|
||||
size_t len;
|
||||
/*
|
||||
* possible values:
|
||||
* NBIO_READ, NBIO_WRITE - obvious
|
||||
* -1 - currently doing nothing
|
||||
* -2 - the pointer was reallocated since the last operation
|
||||
*/
|
||||
signed char op;
|
||||
signed char mode;
|
||||
};
|
||||
|
||||
#if !defined(_WIN32) || defined(LEGACY_WIN32)
|
||||
static const char * modes[]={ "rb", "wb", "r+b", "rb", "wb", "r+b" };
|
||||
#else
|
||||
static const wchar_t * modes[]={ L"rb", L"wb", L"r+b", L"rb", L"wb", L"r+b" };
|
||||
#endif
|
||||
|
||||
struct nbio_t* nbio_open(const char * filename, unsigned mode)
|
||||
{
|
||||
void *buf = NULL;
|
||||
struct nbio_t* handle = NULL;
|
||||
size_t len = 0;
|
||||
#if !defined(_WIN32) || defined(LEGACY_WIN32)
|
||||
FILE* f = fopen(filename, modes[mode]);
|
||||
#else
|
||||
wchar_t *filename_wide = utf8_to_utf16_string_alloc(filename);
|
||||
FILE* f = _wfopen(filename_wide, modes[mode]);
|
||||
|
||||
if (filename_wide)
|
||||
free(filename_wide);
|
||||
#endif
|
||||
if (!f)
|
||||
return NULL;
|
||||
|
||||
handle = (struct nbio_t*)malloc(sizeof(struct nbio_t));
|
||||
|
||||
if (!handle)
|
||||
goto error;
|
||||
|
||||
handle->f = f;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case NBIO_WRITE:
|
||||
case BIO_WRITE:
|
||||
break;
|
||||
default:
|
||||
fseek(handle->f, 0, SEEK_END);
|
||||
len = ftell(handle->f);
|
||||
break;
|
||||
}
|
||||
|
||||
handle->mode = mode;
|
||||
|
||||
if (len)
|
||||
buf = malloc(len);
|
||||
|
||||
if (!buf)
|
||||
goto error;
|
||||
|
||||
handle->data = buf;
|
||||
handle->len = len;
|
||||
handle->progress = handle->len;
|
||||
handle->op = -2;
|
||||
|
||||
return handle;
|
||||
|
||||
error:
|
||||
if (handle)
|
||||
free(handle);
|
||||
fclose(f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void nbio_begin_read(struct nbio_t* handle)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file read operation while busy");
|
||||
abort();
|
||||
}
|
||||
|
||||
fseek(handle->f, 0, SEEK_SET);
|
||||
|
||||
handle->op = NBIO_READ;
|
||||
handle->progress = 0;
|
||||
}
|
||||
|
||||
void nbio_begin_write(struct nbio_t* handle)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file write operation while busy");
|
||||
abort();
|
||||
}
|
||||
|
||||
fseek(handle->f, 0, SEEK_SET);
|
||||
handle->op = NBIO_WRITE;
|
||||
handle->progress = 0;
|
||||
}
|
||||
|
||||
bool nbio_iterate(struct nbio_t* handle)
|
||||
{
|
||||
size_t amount = 65536;
|
||||
|
||||
if (!handle)
|
||||
return false;
|
||||
|
||||
if (amount > handle->len - handle->progress)
|
||||
amount = handle->len - handle->progress;
|
||||
|
||||
switch (handle->op)
|
||||
{
|
||||
case NBIO_READ:
|
||||
if (handle->mode == BIO_READ)
|
||||
{
|
||||
amount = handle->len;
|
||||
fread((char*)handle->data, 1, amount, handle->f);
|
||||
}
|
||||
else
|
||||
fread((char*)handle->data + handle->progress, 1, amount, handle->f);
|
||||
break;
|
||||
case NBIO_WRITE:
|
||||
if (handle->mode == BIO_WRITE)
|
||||
{
|
||||
size_t written = 0;
|
||||
amount = handle->len;
|
||||
written = fwrite((char*)handle->data, 1, amount, handle->f);
|
||||
if (written != amount)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
fwrite((char*)handle->data + handle->progress, 1, amount, handle->f);
|
||||
break;
|
||||
}
|
||||
|
||||
handle->progress += amount;
|
||||
|
||||
if (handle->progress == handle->len)
|
||||
handle->op = -1;
|
||||
return (handle->op < 0);
|
||||
}
|
||||
|
||||
void nbio_resize(struct nbio_t* handle, size_t len)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file resize operation while busy");
|
||||
abort();
|
||||
}
|
||||
if (len < handle->len)
|
||||
{
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
|
||||
handle->len = len;
|
||||
handle->data = realloc(handle->data, handle->len);
|
||||
handle->op = -1;
|
||||
handle->progress = handle->len;
|
||||
}
|
||||
|
||||
void* nbio_get_ptr(struct nbio_t* handle, size_t* len)
|
||||
{
|
||||
if (!handle)
|
||||
return NULL;
|
||||
if (len)
|
||||
*len = handle->len;
|
||||
if (handle->op == -1)
|
||||
return handle->data;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void nbio_cancel(struct nbio_t* handle)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
handle->op = -1;
|
||||
handle->progress = handle->len;
|
||||
}
|
||||
|
||||
void nbio_free(struct nbio_t* handle)
|
||||
{
|
||||
if (!handle)
|
||||
return;
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted free() while busy");
|
||||
abort();
|
||||
}
|
||||
fclose(handle->f);
|
||||
free(handle->data);
|
||||
|
||||
handle->f = NULL;
|
||||
handle->data = NULL;
|
||||
free(handle);
|
||||
}
|
||||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio_stdio.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <file/nbio.h>
|
||||
#include <encodings/utf.h>
|
||||
|
||||
/* Assume W-functions do not work below VC2005 and Xbox platforms */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||
|
||||
#ifndef LEGACY_WIN32
|
||||
#define LEGACY_WIN32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
struct nbio_stdio_t
|
||||
{
|
||||
FILE* f;
|
||||
void* data;
|
||||
size_t progress;
|
||||
size_t len;
|
||||
/*
|
||||
* possible values:
|
||||
* NBIO_READ, NBIO_WRITE - obvious
|
||||
* -1 - currently doing nothing
|
||||
* -2 - the pointer was reallocated since the last operation
|
||||
*/
|
||||
signed char op;
|
||||
signed char mode;
|
||||
};
|
||||
|
||||
#if !defined(_WIN32) || defined(LEGACY_WIN32)
|
||||
static const char *stdio_modes[] = { "rb", "wb", "r+b", "rb", "wb", "r+b" };
|
||||
#else
|
||||
static const wchar_t *stdio_modes[] = { L"rb", L"wb", L"r+b", L"rb", L"wb", L"r+b" };
|
||||
#endif
|
||||
|
||||
static void *nbio_stdio_open(const char * filename, unsigned mode)
|
||||
{
|
||||
void *buf = NULL;
|
||||
struct nbio_stdio_t* handle = NULL;
|
||||
size_t len = 0;
|
||||
#if !defined(_WIN32) || defined(LEGACY_WIN32)
|
||||
FILE* f = fopen(filename, stdio_modes[mode]);
|
||||
#else
|
||||
wchar_t *filename_wide = utf8_to_utf16_string_alloc(filename);
|
||||
FILE* f = _wfopen(filename_wide, stdio_modes[mode]);
|
||||
|
||||
if (filename_wide)
|
||||
free(filename_wide);
|
||||
#endif
|
||||
if (!f)
|
||||
return NULL;
|
||||
|
||||
handle = (struct nbio_stdio_t*)malloc(sizeof(struct nbio_stdio_t));
|
||||
|
||||
if (!handle)
|
||||
goto error;
|
||||
|
||||
handle->f = f;
|
||||
|
||||
switch (mode)
|
||||
{
|
||||
case NBIO_WRITE:
|
||||
case BIO_WRITE:
|
||||
break;
|
||||
default:
|
||||
fseek(handle->f, 0, SEEK_END);
|
||||
len = ftell(handle->f);
|
||||
break;
|
||||
}
|
||||
|
||||
handle->mode = mode;
|
||||
|
||||
if (len)
|
||||
buf = malloc(len);
|
||||
|
||||
if (len && !buf)
|
||||
goto error;
|
||||
|
||||
handle->data = buf;
|
||||
handle->len = len;
|
||||
handle->progress = handle->len;
|
||||
handle->op = -2;
|
||||
|
||||
return handle;
|
||||
|
||||
error:
|
||||
if (handle)
|
||||
free(handle);
|
||||
fclose(f);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void nbio_stdio_begin_read(void *data)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file read operation while busy");
|
||||
abort();
|
||||
}
|
||||
|
||||
fseek(handle->f, 0, SEEK_SET);
|
||||
|
||||
handle->op = NBIO_READ;
|
||||
handle->progress = 0;
|
||||
}
|
||||
|
||||
static void nbio_stdio_begin_write(void *data)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file write operation while busy");
|
||||
abort();
|
||||
}
|
||||
|
||||
fseek(handle->f, 0, SEEK_SET);
|
||||
handle->op = NBIO_WRITE;
|
||||
handle->progress = 0;
|
||||
}
|
||||
|
||||
static bool nbio_stdio_iterate(void *data)
|
||||
{
|
||||
size_t amount = 65536;
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
|
||||
if (!handle)
|
||||
return false;
|
||||
|
||||
if (amount > handle->len - handle->progress)
|
||||
amount = handle->len - handle->progress;
|
||||
|
||||
switch (handle->op)
|
||||
{
|
||||
case NBIO_READ:
|
||||
if (handle->mode == BIO_READ)
|
||||
{
|
||||
amount = handle->len;
|
||||
fread((char*)handle->data, 1, amount, handle->f);
|
||||
}
|
||||
else
|
||||
fread((char*)handle->data + handle->progress, 1, amount, handle->f);
|
||||
break;
|
||||
case NBIO_WRITE:
|
||||
if (handle->mode == BIO_WRITE)
|
||||
{
|
||||
size_t written = 0;
|
||||
amount = handle->len;
|
||||
written = fwrite((char*)handle->data, 1, amount, handle->f);
|
||||
if (written != amount)
|
||||
return false;
|
||||
}
|
||||
else
|
||||
fwrite((char*)handle->data + handle->progress, 1, amount, handle->f);
|
||||
break;
|
||||
}
|
||||
|
||||
handle->progress += amount;
|
||||
|
||||
if (handle->progress == handle->len)
|
||||
handle->op = -1;
|
||||
return (handle->op < 0);
|
||||
}
|
||||
|
||||
static void nbio_stdio_resize(void *data, size_t len)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted file resize operation while busy");
|
||||
abort();
|
||||
}
|
||||
if (len < handle->len)
|
||||
{
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
|
||||
handle->len = len;
|
||||
handle->data = realloc(handle->data, handle->len);
|
||||
handle->op = -1;
|
||||
handle->progress = handle->len;
|
||||
}
|
||||
|
||||
static void *nbio_stdio_get_ptr(void *data, size_t* len)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return NULL;
|
||||
if (len)
|
||||
*len = handle->len;
|
||||
if (handle->op == -1)
|
||||
return handle->data;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void nbio_stdio_cancel(void *data)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
handle->op = -1;
|
||||
handle->progress = handle->len;
|
||||
}
|
||||
|
||||
static void nbio_stdio_free(void *data)
|
||||
{
|
||||
struct nbio_stdio_t *handle = (struct nbio_stdio_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
if (handle->op >= 0)
|
||||
{
|
||||
puts("ERROR - attempted free() while busy");
|
||||
abort();
|
||||
}
|
||||
fclose(handle->f);
|
||||
free(handle->data);
|
||||
|
||||
handle->f = NULL;
|
||||
handle->data = NULL;
|
||||
free(handle);
|
||||
}
|
||||
|
||||
nbio_intf_t nbio_stdio = {
|
||||
nbio_stdio_open,
|
||||
nbio_stdio_begin_read,
|
||||
nbio_stdio_begin_write,
|
||||
nbio_stdio_iterate,
|
||||
nbio_stdio_resize,
|
||||
nbio_stdio_get_ptr,
|
||||
nbio_stdio_cancel,
|
||||
nbio_stdio_free,
|
||||
"nbio_stdio",
|
||||
};
|
||||
|
|
|
@ -0,0 +1,173 @@
|
|||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio_unixmmap.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <file/nbio.h>
|
||||
|
||||
#if defined(HAVE_MMAP) && defined(BSD)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#else
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include <fcntl.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
struct nbio_mmap_unix_t
|
||||
{
|
||||
int fd;
|
||||
int map_flags;
|
||||
size_t len;
|
||||
void* ptr;
|
||||
};
|
||||
|
||||
static void *nbio_mmap_unix_open(const char * filename, unsigned mode)
|
||||
{
|
||||
static const int o_flags[] = { O_RDONLY, O_RDWR|O_CREAT|O_TRUNC, O_RDWR, O_RDONLY, O_RDWR|O_CREAT|O_TRUNC };
|
||||
static const int map_flags[] = { PROT_READ, PROT_WRITE|PROT_READ, PROT_WRITE|PROT_READ, PROT_READ, PROT_WRITE|PROT_READ };
|
||||
|
||||
size_t len;
|
||||
void* ptr = NULL;
|
||||
struct nbio_mmap_unix_t* handle = NULL;
|
||||
int fd = open(filename, o_flags[mode]|O_CLOEXEC, 0644);
|
||||
if (fd < 0)
|
||||
return NULL;
|
||||
|
||||
len = lseek(fd, 0, SEEK_END);
|
||||
if (len != 0)
|
||||
ptr = mmap(NULL, len, map_flags[mode], MAP_SHARED, fd, 0);
|
||||
|
||||
if (ptr == MAP_FAILED)
|
||||
{
|
||||
close(fd);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
handle = malloc(sizeof(struct nbio_mmap_unix_t));
|
||||
handle->fd = fd;
|
||||
handle->map_flags = map_flags[mode];
|
||||
handle->len = len;
|
||||
handle->ptr = ptr;
|
||||
return handle;
|
||||
}
|
||||
|
||||
static void nbio_mmap_unix_begin_read(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void nbio_mmap_unix_begin_write(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static bool nbio_mmap_unix_iterate(void *data)
|
||||
{
|
||||
return true; /* not needed */
|
||||
}
|
||||
|
||||
static void nbio_mmap_unix_resize(void *data, size_t len)
|
||||
{
|
||||
struct nbio_mmap_unix_t* handle = (struct nbio_mmap_unix_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
if (len < handle->len)
|
||||
{
|
||||
/* this works perfectly fine if this check is removed, but it
|
||||
* won't work on other nbio implementations */
|
||||
/* therefore, it's blocked so nobody accidentally relies on it */
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
|
||||
if (ftruncate(handle->fd, len) != 0)
|
||||
{
|
||||
puts("ERROR - couldn't resize file (ftruncate)");
|
||||
abort(); /* this one returns void and I can't find any other
|
||||
way for it to report failure */
|
||||
}
|
||||
|
||||
munmap(handle->ptr, handle->len);
|
||||
|
||||
handle->ptr = mmap(NULL, len, handle->map_flags, MAP_SHARED, handle->fd, 0);
|
||||
handle->len = len;
|
||||
|
||||
if (handle->ptr == MAP_FAILED)
|
||||
{
|
||||
puts("ERROR - couldn't resize file (mmap)");
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
static void *nbio_mmap_unix_get_ptr(void *data, size_t* len)
|
||||
{
|
||||
struct nbio_mmap_unix_t* handle = (struct nbio_mmap_unix_t*)data;
|
||||
if (!handle)
|
||||
return NULL;
|
||||
if (len)
|
||||
*len = handle->len;
|
||||
return handle->ptr;
|
||||
}
|
||||
|
||||
static void nbio_mmap_unix_cancel(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void nbio_mmap_unix_free(void *data)
|
||||
{
|
||||
struct nbio_mmap_unix_t* handle = (struct nbio_mmap_unix_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
close(handle->fd);
|
||||
munmap(handle->ptr, handle->len);
|
||||
free(handle);
|
||||
}
|
||||
|
||||
nbio_intf_t nbio_mmap_unix = {
|
||||
nbio_mmap_unix_open,
|
||||
nbio_mmap_unix_begin_read,
|
||||
nbio_mmap_unix_begin_write,
|
||||
nbio_mmap_unix_iterate,
|
||||
nbio_mmap_unix_resize,
|
||||
nbio_mmap_unix_get_ptr,
|
||||
nbio_mmap_unix_cancel,
|
||||
nbio_mmap_unix_free,
|
||||
"nbio_mmap_unix",
|
||||
};
|
||||
#else
|
||||
nbio_intf_t nbio_mmap_unix = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"nbio_mmap_unix",
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,199 @@
|
|||
/* Copyright (C) 2010-2017 The RetroArch team
|
||||
*
|
||||
* ---------------------------------------------------------------------------------------
|
||||
* The following license statement only applies to this file (nbio_windowsmmap.c).
|
||||
* ---------------------------------------------------------------------------------------
|
||||
*
|
||||
* Permission is hereby granted, free of charge,
|
||||
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <file/nbio.h>
|
||||
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <encodings/utf.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
/* Assume W-functions do not work below VC2005 and Xbox platforms */
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1400 || defined(_XBOX)
|
||||
|
||||
#ifndef LEGACY_WIN32
|
||||
#define LEGACY_WIN32
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef FILE_SHARE_ALL
|
||||
#define FILE_SHARE_ALL (FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE)
|
||||
#endif
|
||||
|
||||
struct nbio_mmap_win32_t
|
||||
{
|
||||
HANDLE file;
|
||||
bool is_write;
|
||||
size_t len;
|
||||
void* ptr;
|
||||
};
|
||||
|
||||
static void *nbio_mmap_win32_open(const char * filename, unsigned mode)
|
||||
{
|
||||
static const DWORD dispositions[] = { OPEN_EXISTING, CREATE_ALWAYS, OPEN_ALWAYS, OPEN_EXISTING, CREATE_ALWAYS };
|
||||
HANDLE mem;
|
||||
LARGE_INTEGER len;
|
||||
struct nbio_mmap_win32_t* handle = NULL;
|
||||
void* ptr = NULL;
|
||||
bool is_write = (mode == NBIO_WRITE || mode == NBIO_UPDATE || mode == BIO_WRITE);
|
||||
DWORD access = (is_write ? GENERIC_READ|GENERIC_WRITE : GENERIC_READ);
|
||||
#if !defined(_WIN32) || defined(LEGACY_WIN32)
|
||||
HANDLE file = CreateFile(filename, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
#else
|
||||
wchar_t *filename_wide = utf8_to_utf16_string_alloc(filename);
|
||||
HANDLE file = CreateFileW(filename_wide, access, FILE_SHARE_ALL, NULL, dispositions[mode], FILE_ATTRIBUTE_NORMAL, NULL);
|
||||
|
||||
if (filename_wide)
|
||||
free(filename_wide);
|
||||
#endif
|
||||
|
||||
if (file == INVALID_HANDLE_VALUE)
|
||||
return NULL;
|
||||
|
||||
GetFileSizeEx(file, &len);
|
||||
|
||||
mem = CreateFileMapping(file, NULL, is_write ? PAGE_READWRITE : PAGE_READONLY, 0, 0, NULL);
|
||||
ptr = MapViewOfFile(mem, is_write ? (FILE_MAP_READ|FILE_MAP_WRITE) : FILE_MAP_READ, 0, 0, len.QuadPart);
|
||||
CloseHandle(mem);
|
||||
|
||||
handle = (struct nbio_mmap_win32_t*)malloc(sizeof(struct nbio_mmap_win32_t));
|
||||
|
||||
handle->file = file;
|
||||
handle->is_write = is_write;
|
||||
handle->len = len.QuadPart;
|
||||
handle->ptr = ptr;
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
static void nbio_mmap_win32_begin_read(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void nbio_mmap_win32_begin_write(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static bool nbio_mmap_win32_iterate(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
return true;
|
||||
}
|
||||
|
||||
static void nbio_mmap_win32_resize(void *data, size_t len)
|
||||
{
|
||||
LARGE_INTEGER len_li;
|
||||
HANDLE mem;
|
||||
struct nbio_mmap_win32_t* handle = (struct nbio_mmap_win32_t*)data;
|
||||
|
||||
if (!handle)
|
||||
return;
|
||||
|
||||
if (len < handle->len)
|
||||
{
|
||||
/* this works perfectly fine if this check is removed,
|
||||
* but it won't work on other nbio implementations */
|
||||
/* therefore, it's blocked so nobody accidentally
|
||||
* relies on it. */
|
||||
puts("ERROR - attempted file shrink operation, not implemented");
|
||||
abort();
|
||||
}
|
||||
|
||||
len_li.QuadPart = len;
|
||||
SetFilePointerEx(handle->file, len_li, NULL, FILE_BEGIN);
|
||||
|
||||
if (!SetEndOfFile(handle->file))
|
||||
{
|
||||
puts("ERROR - couldn't resize file (SetEndOfFile)");
|
||||
abort(); /* this one returns void and I can't find any other way for it to report failure */
|
||||
}
|
||||
handle->len = len;
|
||||
|
||||
UnmapViewOfFile(handle->ptr);
|
||||
mem = CreateFileMapping(handle->file, NULL, handle->is_write ? PAGE_READWRITE : PAGE_READONLY, 0, 0, NULL);
|
||||
handle->ptr = MapViewOfFile(mem, handle->is_write ? (FILE_MAP_READ|FILE_MAP_WRITE) : FILE_MAP_READ, 0, 0, len);
|
||||
CloseHandle(mem);
|
||||
|
||||
if (!handle->ptr)
|
||||
{
|
||||
puts("ERROR - couldn't resize file (MapViewOfFile)");
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
static void *nbio_mmap_win32_get_ptr(void *data, size_t* len)
|
||||
{
|
||||
struct nbio_mmap_win32_t* handle = (struct nbio_mmap_win32_t*)data;
|
||||
if (!handle)
|
||||
return NULL;
|
||||
if (len)
|
||||
*len = handle->len;
|
||||
return handle->ptr;
|
||||
}
|
||||
|
||||
static void nbio_mmap_win32_cancel(void *data)
|
||||
{
|
||||
/* not needed */
|
||||
}
|
||||
|
||||
static void nbio_mmap_win32_free(void *data)
|
||||
{
|
||||
struct nbio_mmap_win32_t* handle = (struct nbio_mmap_win32_t*)data;
|
||||
if (!handle)
|
||||
return;
|
||||
CloseHandle(handle->file);
|
||||
UnmapViewOfFile(handle->ptr);
|
||||
free(handle);
|
||||
}
|
||||
|
||||
nbio_intf_t nbio_mmap_win32 = {
|
||||
nbio_mmap_win32_open,
|
||||
nbio_mmap_win32_begin_read,
|
||||
nbio_mmap_win32_begin_write,
|
||||
nbio_mmap_win32_iterate,
|
||||
nbio_mmap_win32_resize,
|
||||
nbio_mmap_win32_get_ptr,
|
||||
nbio_mmap_win32_cancel,
|
||||
nbio_mmap_win32_free,
|
||||
"nbio_mmap_win32",
|
||||
};
|
||||
#else
|
||||
nbio_intf_t nbio_mmap_win32 = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
"nbio_mmap_win32",
|
||||
};
|
||||
|
||||
#endif
|
|
@ -999,8 +999,6 @@ bool rpng_iterate_image(rpng_t *rpng)
|
|||
if (!read_chunk_header(buf, &chunk))
|
||||
return false;
|
||||
|
||||
*buf += 8;
|
||||
|
||||
#if 0
|
||||
for (i = 0; i < 4; i++)
|
||||
{
|
||||
|
|
|
@ -52,6 +52,8 @@ size_t strlcat(char *dest, const char *source, size_t size);
|
|||
|
||||
#endif
|
||||
|
||||
char *strldup(const char *s, size_t n);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
|
|
@ -42,6 +42,7 @@ RETRO_BEGIN_DECLS
|
|||
#define NBIO_UPDATE 2
|
||||
#endif
|
||||
|
||||
/* these two are blocking; nbio_iterate always returns true, but that operation (or something earlier) may take arbitrarily long */
|
||||
#ifndef BIO_READ
|
||||
#define BIO_READ 3
|
||||
#endif
|
||||
|
@ -50,52 +51,73 @@ RETRO_BEGIN_DECLS
|
|||
#define BIO_WRITE 4
|
||||
#endif
|
||||
|
||||
struct nbio_t;
|
||||
typedef struct nbio_intf
|
||||
{
|
||||
void *(*open)(const char * filename, unsigned mode);
|
||||
|
||||
void (*begin_read)(void *data);
|
||||
|
||||
void (*begin_write)(void *data);
|
||||
|
||||
bool (*iterate)(void *data);
|
||||
|
||||
void (*resize)(void *data, size_t len);
|
||||
|
||||
void *(*get_ptr)(void *data, size_t* len);
|
||||
|
||||
void (*cancel)(void *data);
|
||||
|
||||
void (*free)(void *data);
|
||||
|
||||
/* Human readable string. */
|
||||
const char *ident;
|
||||
} nbio_intf_t;
|
||||
|
||||
/*
|
||||
* Creates an nbio structure for performing the given operation on the given file.
|
||||
* Creates an nbio structure for performing the
|
||||
* given operation on the given file.
|
||||
*/
|
||||
struct nbio_t* nbio_open(const char * filename, unsigned mode);
|
||||
void *nbio_open(const char * filename, unsigned mode);
|
||||
|
||||
/*
|
||||
* Starts reading the given file. When done, it will be available in nbio_get_ptr.
|
||||
* Can not be done if the structure was created with nbio_write.
|
||||
* Can not be done if the structure was created with {N,}BIO_WRITE.
|
||||
*/
|
||||
void nbio_begin_read(struct nbio_t* handle);
|
||||
void nbio_begin_read(void *data);
|
||||
|
||||
/*
|
||||
* Starts writing to the given file. Before this, you should've copied the data to nbio_get_ptr.
|
||||
* Can not be done if the structure was created with nbio_read.
|
||||
* Can not be done if the structure was created with {N,}BIO_READ.
|
||||
*/
|
||||
void nbio_begin_write(struct nbio_t* handle);
|
||||
void nbio_begin_write(void *data);
|
||||
|
||||
/*
|
||||
* Performs part of the requested operation, or checks how it's going.
|
||||
* When it returns true, it's done.
|
||||
*/
|
||||
bool nbio_iterate(struct nbio_t* handle);
|
||||
bool nbio_iterate(void *data);
|
||||
|
||||
/*
|
||||
* Resizes the file up to the given size; cannot shrink.
|
||||
* Can not be done if the structure was created with nbio_read.
|
||||
* Can not be done if the structure was created with {N,}BIO_READ.
|
||||
*/
|
||||
void nbio_resize(struct nbio_t* handle, size_t len);
|
||||
void nbio_resize(void *data, size_t len);
|
||||
|
||||
/*
|
||||
* Returns a pointer to the file data. Writable only if structure was not created with nbio_read.
|
||||
* Returns a pointer to the file data. Writable only if structure was not created with {N,}BIO_READ.
|
||||
* If any operation is in progress, the pointer will be NULL, but len will still be correct.
|
||||
*/
|
||||
void* nbio_get_ptr(struct nbio_t* handle, size_t* len);
|
||||
void* nbio_get_ptr(void *data, size_t* len);
|
||||
|
||||
/*
|
||||
* Stops any pending operation, allowing the object to be freed.
|
||||
*/
|
||||
void nbio_cancel(struct nbio_t* handle);
|
||||
void nbio_cancel(void *data);
|
||||
|
||||
/*
|
||||
* Deletes the nbio structure and its associated pointer.
|
||||
*/
|
||||
void nbio_free(struct nbio_t* handle);
|
||||
void nbio_free(void *data);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
|
|
|
@ -126,8 +126,14 @@ extern "C" {
|
|||
*/
|
||||
#define RETRO_DEVICE_KEYBOARD 3
|
||||
|
||||
/* Lightgun X/Y coordinates are reported relatively to last poll,
|
||||
* similar to mouse. */
|
||||
/* LIGHTGUN device is similar to Guncon-2 for PlayStation 2.
|
||||
* It reports X/Y coordinates in screen space (similar to the pointer)
|
||||
* in the range [-0x8000, 0x7fff] in both axes, with zero being center.
|
||||
* As well as reporting on/off screen state. It features a trigger,
|
||||
* start/select buttons, auxiliary action buttons and a
|
||||
* directional pad. A forced off-screen shot can be requested for
|
||||
* auto-reloading function in some games.
|
||||
*/
|
||||
#define RETRO_DEVICE_LIGHTGUN 4
|
||||
|
||||
/* The ANALOG device is an extension to JOYPAD (RetroPad).
|
||||
|
@ -214,14 +220,27 @@ extern "C" {
|
|||
#define RETRO_DEVICE_ID_MOUSE_BUTTON_4 9
|
||||
#define RETRO_DEVICE_ID_MOUSE_BUTTON_5 10
|
||||
|
||||
/* Id values for LIGHTGUN types. */
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_X 0
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_Y 1
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_TRIGGER 2
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_START 6
|
||||
/* Id values for LIGHTGUN. */
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_X 13 /*Absolute Position*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_SCREEN_Y 14 /*Absolute*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_IS_OFFSCREEN 15 /*Status Check*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_TRIGGER 2
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_RELOAD 16 /*Forced off-screen shot*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_AUX_A 3
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_AUX_B 4
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_START 6
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_SELECT 7
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_AUX_C 8
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_DPAD_UP 9
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_DPAD_DOWN 10
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_DPAD_LEFT 11
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_DPAD_RIGHT 12
|
||||
/* deprecated */
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_X 0 /*Relative Position*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_Y 1 /*Relative*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_CURSOR 3 /*Use Aux:A*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_TURBO 4 /*Use Aux:B*/
|
||||
#define RETRO_DEVICE_ID_LIGHTGUN_PAUSE 5 /*Use Start*/
|
||||
|
||||
/* Id values for POINTER. */
|
||||
#define RETRO_DEVICE_ID_POINTER_X 0
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offset)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags,
|
||||
int fildes, size_t offset)
|
||||
{
|
||||
void *map = (void*)NULL;
|
||||
HANDLE handle = INVALID_HANDLE_VALUE;
|
||||
|
@ -57,36 +58,34 @@ void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offse
|
|||
{
|
||||
case PROT_READ:
|
||||
default:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes), 0, PAGE_READONLY, 0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_READ, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes), 0, PAGE_READONLY, 0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_READ, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
case PROT_WRITE:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_WRITE, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
case PROT_READWRITE:
|
||||
{
|
||||
handle = CreateFileMapping((HANDLE) _get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
handle = CreateFileMapping((HANDLE)
|
||||
_get_osfhandle(fildes),0,PAGE_READWRITE,0,
|
||||
len, 0);
|
||||
if (!handle)
|
||||
break;
|
||||
}
|
||||
map = (void*)MapViewOfFile(handle, FILE_MAP_ALL_ACCESS, 0, 0, len);
|
||||
CloseHandle(handle);
|
||||
break;
|
||||
}
|
||||
|
||||
if (map == (void*)NULL)
|
||||
return((void*)MAP_FAILED);
|
||||
return((void*) ((int8_t*)map + offset));
|
||||
|
@ -110,7 +109,8 @@ int mprotect(void *addr, size_t len, int prot)
|
|||
}
|
||||
|
||||
#elif !defined(HAVE_MMAN)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags, int fildes, size_t offset)
|
||||
void* mmap(void *addr, size_t len, int prot, int flags,
|
||||
int fildes, size_t offset)
|
||||
{
|
||||
return malloc(len);
|
||||
}
|
||||
|
@ -123,7 +123,8 @@ int munmap(void *addr, size_t len)
|
|||
|
||||
int mprotect(void *addr, size_t len, int prot)
|
||||
{
|
||||
/* stub - not really needed at this point since this codepath has no dynarecs */
|
||||
/* stub - not really needed at this point
|
||||
* since this codepath has no dynarecs. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@ static void nbio_write_test(void)
|
|||
bool looped = false;
|
||||
void* ptr = NULL;
|
||||
struct nbio_t* write = nbio_open("test.bin", NBIO_WRITE);
|
||||
if (!write)
|
||||
puts("ERROR: nbio_open failed (1)");
|
||||
|
||||
nbio_resize(write, 1024*1024);
|
||||
|
||||
|
@ -33,6 +35,8 @@ static void nbio_read_test(void)
|
|||
bool looped = false;
|
||||
struct nbio_t* read = nbio_open("test.bin", NBIO_READ);
|
||||
void* ptr = nbio_get_ptr(read, &size);
|
||||
if (!read)
|
||||
puts("ERROR: nbio_open failed (2)");
|
||||
|
||||
if (size != 1024*1024)
|
||||
puts("ERROR: wrong size (2)");
|
||||
|
|
|
@ -18,14 +18,18 @@ SOURCES_C := \
|
|||
$(LIBRETRO_PNG_DIR)/rpng.c \
|
||||
$(LIBRETRO_PNG_DIR)/rpng_encode.c \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_crc32.c \
|
||||
$(LIBRETRO_COMM_DIR)/encodings/encoding_utf.c \
|
||||
$(LIBRETRO_COMM_DIR)/string/stdstring.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_strl.c \
|
||||
$(LIBRETRO_COMM_DIR)/compat/compat_strcasestr.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/nbio/nbio_stdio.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/archive_file.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/archive_file_zlib.c \
|
||||
$(LIBRETRO_COMM_DIR)//file/file_path.c \
|
||||
$(LIBRETRO_COMM_DIR)//file/retro_stat.c \
|
||||
$(LIBRETRO_COMM_DIR)/file/file_path.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/file_stream.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/trans_stream.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/trans_stream_zlib.c \
|
||||
$(LIBRETRO_COMM_DIR)/streams/trans_stream_pipe.c \
|
||||
$(LIBRETRO_COMM_DIR)/lists/string_list.c
|
||||
|
||||
OBJS := $(SOURCES_C:.c=.o)
|
||||
|
|
|
@ -25,6 +25,10 @@
|
|||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
# ifdef _MSC_VER
|
||||
# define setmode _setmode
|
||||
|
|
|
@ -118,7 +118,7 @@ int main(int argc, char ** argv)
|
|||
{
|
||||
if (argc != 4)
|
||||
{
|
||||
printf("Usage: %s <db file> find-name <query expression>\n", argv[0]);
|
||||
printf("Usage: %s <db file> get-names <query expression>\n", argv[0]);
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
|
|
@ -78,11 +78,6 @@ static int deferred_push_achievement_list(menu_displaylist_info_t *info)
|
|||
return deferred_push_dlist(info, DISPLAYLIST_ACHIEVEMENT_LIST);
|
||||
}
|
||||
|
||||
static int deferred_push_achievement_list_hardcore(menu_displaylist_info_t *info)
|
||||
{
|
||||
return deferred_push_dlist(info, DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE);
|
||||
}
|
||||
|
||||
static int deferred_push_rdb_collection(menu_displaylist_info_t *info)
|
||||
{
|
||||
return deferred_push_dlist(info, DISPLAYLIST_PLAYLIST_COLLECTION);
|
||||
|
@ -1533,9 +1528,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
|||
case MENU_ENUM_LABEL_ACHIEVEMENT_LIST:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list_hardcore);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_COUNTERS:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters);
|
||||
break;
|
||||
|
@ -1768,9 +1760,6 @@ static int menu_cbs_init_bind_deferred_push_compare_label(
|
|||
case MENU_LABEL_ACHIEVEMENT_LIST:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list);
|
||||
break;
|
||||
case MENU_LABEL_ACHIEVEMENT_LIST_HARDCORE:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_achievement_list_hardcore);
|
||||
break;
|
||||
case MENU_LABEL_CORE_COUNTERS:
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_core_counters);
|
||||
break;
|
||||
|
|
|
@ -94,6 +94,21 @@ static void menu_action_setting_disp_set_label_cheevos_unlocked_entry(
|
|||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY), len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_cheevos_unlocked_entry_hardcore(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
const char *label,
|
||||
char *s, size_t len,
|
||||
const char *entry_label,
|
||||
const char *path,
|
||||
char *s2, size_t len2)
|
||||
{
|
||||
*w = 19;
|
||||
strlcpy(s2, path, len2);
|
||||
strlcpy(s,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CHEEVOS_UNLOCKED_ENTRY_HARDCORE), len);
|
||||
}
|
||||
|
||||
static void menu_action_setting_disp_set_label_remap_file_load(
|
||||
file_list_t* list,
|
||||
unsigned *w, unsigned type, unsigned i,
|
||||
|
@ -1976,6 +1991,10 @@ int menu_cbs_init_bind_get_string_representation(menu_file_list_cbs_t *cbs,
|
|||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_unlocked_entry);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY_HARDCORE:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_unlocked_entry_hardcore);
|
||||
return 0;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
BIND_ACTION_GET_VALUE(cbs,
|
||||
menu_action_setting_disp_set_label_cheevos_locked_entry);
|
||||
|
|
|
@ -144,6 +144,7 @@ static int action_scan_input_desc(const char *path,
|
|||
target->key = RETROK_UNKNOWN;
|
||||
target->joykey = NO_BTN;
|
||||
target->joyaxis = AXIS_NONE;
|
||||
target->mbutton = NO_BTN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -23,6 +23,12 @@
|
|||
#include "../widgets/menu_entry.h"
|
||||
#include "../menu_cbs.h"
|
||||
#include "../menu_setting.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
#include "../../network/netplay/netplay.h"
|
||||
#include "../../network/netplay/netplay_discovery.h"
|
||||
#endif
|
||||
|
||||
#ifndef BIND_ACTION_SELECT
|
||||
#define BIND_ACTION_SELECT(cbs, name) \
|
||||
|
@ -148,6 +154,53 @@ static int action_select_input_desc_kbd(const char *path, const char *label, uns
|
|||
return action_right_input_desc_kbd(type, label, true);
|
||||
}
|
||||
|
||||
static int action_select_netplay_connect_room(const char *path, const char *label, unsigned type,
|
||||
size_t idx)
|
||||
{
|
||||
#ifdef HAVE_NETWORKING
|
||||
char tmp_hostname[4115];
|
||||
|
||||
tmp_hostname[0] = '\0';
|
||||
|
||||
if (netplay_driver_ctl(RARCH_NETPLAY_CTL_IS_DATA_INITED, NULL))
|
||||
command_event(CMD_EVENT_NETPLAY_DEINIT, NULL);
|
||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_ENABLE_CLIENT, NULL);
|
||||
|
||||
if (netplay_room_list[idx - 3].host_method == NETPLAY_HOST_METHOD_MITM)
|
||||
{
|
||||
snprintf(tmp_hostname,
|
||||
sizeof(tmp_hostname),
|
||||
"%s|%d",
|
||||
netplay_room_list[idx - 3].mitm_address,
|
||||
netplay_room_list[idx - 3].mitm_port);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(tmp_hostname,
|
||||
sizeof(tmp_hostname),
|
||||
"%s|%d",
|
||||
netplay_room_list[idx - 3].address,
|
||||
netplay_room_list[idx - 3].port);
|
||||
}
|
||||
|
||||
#if 0
|
||||
RARCH_LOG("[lobby] connecting to: %s with game: %s/%08x\n",
|
||||
tmp_hostname,
|
||||
netplay_room_list[idx - 3].gamename,
|
||||
netplay_room_list[idx - 3].gamecrc);
|
||||
#endif
|
||||
|
||||
task_push_netplay_crc_scan(netplay_room_list[idx - 3].gamecrc,
|
||||
netplay_room_list[idx - 3].gamename,
|
||||
tmp_hostname, netplay_room_list[idx - 3].corename);
|
||||
|
||||
#else
|
||||
return -1;
|
||||
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int menu_cbs_init_bind_select_compare_type(
|
||||
menu_file_list_cbs_t *cbs, unsigned type)
|
||||
{
|
||||
|
@ -182,6 +235,7 @@ static int menu_cbs_init_bind_select_compare_type(
|
|||
#endif
|
||||
else
|
||||
{
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case FILE_TYPE_USE_DIRECTORY:
|
||||
|
@ -209,6 +263,14 @@ int menu_cbs_init_bind_select(menu_file_list_cbs_t *cbs,
|
|||
|
||||
BIND_ACTION_SELECT(cbs, action_select_default);
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
if (cbs->enum_idx == MENU_ENUM_LABEL_CONNECT_NETPLAY_ROOM)
|
||||
{
|
||||
BIND_ACTION_SELECT(cbs, action_select_netplay_connect_room);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (cbs->setting)
|
||||
{
|
||||
uint64_t flags = cbs->setting->flags;
|
||||
|
|
|
@ -63,6 +63,7 @@ default_sublabel_macro(action_bind_sublabel_cheevos_enable, MENU_
|
|||
default_sublabel_macro(action_bind_sublabel_cheevos_test_unofficial, MENU_ENUM_SUBLABEL_CHEEVOS_TEST_UNOFFICIAL)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_hardcore_mode_enable, MENU_ENUM_SUBLABEL_CHEEVOS_HARDCORE_MODE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_leaderboards_enable, MENU_ENUM_SUBLABEL_CHEEVOS_LEADERBOARDS_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_badges_enable, MENU_ENUM_SUBLABEL_CHEEVOS_BADGES_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_cheevos_verbose_enable, MENU_ENUM_SUBLABEL_CHEEVOS_VERBOSE_ENABLE)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_views_settings_list, MENU_ENUM_SUBLABEL_MENU_VIEWS_SETTINGS)
|
||||
default_sublabel_macro(action_bind_sublabel_quick_menu_views_settings_list, MENU_ENUM_SUBLABEL_QUICK_MENU_VIEWS_SETTINGS)
|
||||
|
@ -1246,6 +1247,7 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_video_shared_context);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY:
|
||||
case MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY_HARDCORE:
|
||||
case MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_entry);
|
||||
break;
|
||||
|
@ -1266,6 +1268,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
|||
case MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_leaderboards_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_badges_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CHEEVOS_VERBOSE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_cheevos_verbose_enable);
|
||||
break;
|
||||
|
|
|
@ -189,7 +189,6 @@ default_fill_title_macro(action_get_title_collection, MENU_ENUM_LABE
|
|||
default_title_copy_macro(action_get_title_help, MENU_ENUM_LABEL_VALUE_HELP_LIST)
|
||||
default_title_copy_macro(action_get_title_input_settings, MENU_ENUM_LABEL_VALUE_INPUT_SETTINGS)
|
||||
default_title_copy_macro(action_get_title_cheevos_list, MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST)
|
||||
default_title_copy_macro(action_get_title_cheevos_list_hardcore, MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE)
|
||||
default_title_copy_macro(action_get_title_video_shader_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PARAMETERS)
|
||||
default_title_copy_macro(action_get_title_video_shader_preset_parameters,MENU_ENUM_LABEL_VALUE_VIDEO_SHADER_PRESET_PARAMETERS)
|
||||
|
||||
|
@ -1018,9 +1017,6 @@ static int menu_cbs_init_bind_title_compare_label(menu_file_list_cbs_t *cbs,
|
|||
case MENU_LABEL_ACHIEVEMENT_LIST:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_cheevos_list);
|
||||
break;
|
||||
case MENU_LABEL_ACHIEVEMENT_LIST_HARDCORE:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_cheevos_list_hardcore);
|
||||
break;
|
||||
case MENU_LABEL_VIDEO_SHADER_PARAMETERS:
|
||||
BIND_ACTION_GET_TITLE(cbs, action_get_title_video_shader_parameters);
|
||||
break;
|
||||
|
|
|
@ -61,6 +61,8 @@
|
|||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "../../cheevos/badges.h"
|
||||
|
||||
#define XMB_RIBBON_ROWS 64
|
||||
#define XMB_RIBBON_COLS 64
|
||||
#define XMB_RIBBON_VERTICES 2*XMB_RIBBON_COLS*XMB_RIBBON_ROWS-2*XMB_RIBBON_COLS
|
||||
|
@ -2102,6 +2104,7 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
|||
case MENU_ENUM_LABEL_NAVIGATION_BROWSER_FILTER_SUPPORTED_EXTENSIONS_ENABLE:
|
||||
return xmb->textures.list[XMB_TEXTURE_CORE_OPTIONS];
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES:
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST:
|
||||
return xmb->textures.list[XMB_TEXTURE_ADD_FAVORITE];
|
||||
case MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
return xmb->textures.list[XMB_TEXTURE_INPUT_REMAPPING_OPTIONS];
|
||||
|
@ -2239,6 +2242,18 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if ((type >= MENU_SETTINGS_CHEEVOS_START) &&
|
||||
(type < MENU_SETTINGS_NETPLAY_ROOMS_START))
|
||||
{
|
||||
int new_id = type - MENU_SETTINGS_CHEEVOS_START;
|
||||
if ( get_badge_texture(new_id) != 0 )
|
||||
return get_badge_texture( new_id );
|
||||
else
|
||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING]; // Should be replaced with placeholder badge icon.
|
||||
}
|
||||
#endif
|
||||
|
||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
||||
}
|
||||
|
||||
|
|
|
@ -1572,7 +1572,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info,
|
|||
free(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
free(path_short);
|
||||
}
|
||||
|
||||
|
@ -2954,11 +2954,6 @@ static int menu_displaylist_parse_load_content_settings(
|
|||
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_LIST),
|
||||
MENU_ENUM_LABEL_ACHIEVEMENT_LIST,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ACHIEVEMENT_LIST_HARDCORE),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE),
|
||||
MENU_ENUM_LABEL_ACHIEVEMENT_LIST_HARDCORE,
|
||||
MENU_SETTING_ACTION, 0, 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -3495,7 +3490,7 @@ static int menu_displaylist_parse_options_remappings(
|
|||
}
|
||||
#ifdef HAVE_KEYMAPPER
|
||||
if (system)
|
||||
{
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
unsigned device = settings->uints.input_libretro_device[settings->uints.keymapper_port];
|
||||
|
@ -3514,13 +3509,13 @@ static int menu_displaylist_parse_options_remappings(
|
|||
keybind = &input_config_binds[settings->uints.keymapper_port][retro_id];
|
||||
auto_bind = (const struct retro_keybind*)
|
||||
input_config_get_bind_auto(settings->uints.keymapper_port, retro_id);
|
||||
|
||||
|
||||
input_config_get_bind_string(descriptor,
|
||||
keybind, auto_bind, sizeof(descriptor));
|
||||
|
||||
if(!strstr(descriptor, "Auto"))
|
||||
{
|
||||
const struct retro_keybind *keyptr =
|
||||
const struct retro_keybind *keyptr =
|
||||
&input_config_binds[settings->uints.keymapper_port][retro_id];
|
||||
|
||||
strlcpy(descriptor, msg_hash_to_str(keyptr->enum_idx), sizeof(descriptor));
|
||||
|
@ -3860,7 +3855,7 @@ static int menu_displaylist_parse_cores(
|
|||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
char *display_name = (char*)
|
||||
malloc(PATH_MAX_LENGTH * sizeof(char));
|
||||
core_path[0] =
|
||||
core_path[0] =
|
||||
display_name[0] = '\0';
|
||||
|
||||
fill_pathname_join(core_path, dir, path,
|
||||
|
@ -4180,7 +4175,7 @@ static void menu_displaylist_parse_playlist_generic(
|
|||
{
|
||||
playlist_t *playlist = NULL;
|
||||
char *path_playlist = NULL;
|
||||
|
||||
|
||||
menu_displaylist_set_new_playlist(menu, playlist_path);
|
||||
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &playlist);
|
||||
|
@ -4740,15 +4735,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||
case DISPLAYLIST_ACHIEVEMENT_LIST:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
cheevos_populate_menu(info, false);
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
#endif
|
||||
break;
|
||||
case DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE:
|
||||
#ifdef HAVE_CHEEVOS
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_CLEAR, info->list);
|
||||
cheevos_populate_menu(info, true);
|
||||
cheevos_populate_menu(info);
|
||||
info->need_push = true;
|
||||
info->need_refresh = true;
|
||||
#endif
|
||||
|
@ -5615,6 +5602,12 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CHEEVOS_LEADERBOARDS_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
if (string_is_equal_fast(settings->arrays.menu_driver, "xmb", 3))
|
||||
{
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
}
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_CHEEVOS_TEST_UNOFFICIAL,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
|
|
@ -108,8 +108,7 @@ enum menu_displaylist_ctl_state
|
|||
DISPLAYLIST_NETWORK_INFO,
|
||||
DISPLAYLIST_SYSTEM_INFO,
|
||||
DISPLAYLIST_ACHIEVEMENT_LIST,
|
||||
DISPLAYLIST_ACHIEVEMENT_LIST_HARDCORE,
|
||||
DISPLAYLIST_USER_BINDS_LIST,
|
||||
DISPLAYLIST_USER_BINDS_LIST,
|
||||
DISPLAYLIST_ACCOUNTS_LIST,
|
||||
DISPLAYLIST_DRIVER_SETTINGS_LIST,
|
||||
DISPLAYLIST_VIDEO_SETTINGS_LIST,
|
||||
|
|
|
@ -243,12 +243,12 @@ enum xmb_icon_theme
|
|||
XMB_ICON_THEME_MONOCHROME = 0,
|
||||
XMB_ICON_THEME_FLATUI,
|
||||
XMB_ICON_THEME_RETROACTIVE,
|
||||
XMB_ICON_THEME_RETROSYSTEM,
|
||||
XMB_ICON_THEME_PIXEL,
|
||||
XMB_ICON_THEME_NEOACTIVE,
|
||||
XMB_ICON_THEME_SYSTEMATIC,
|
||||
XMB_ICON_THEME_DOTART,
|
||||
XMB_ICON_THEME_CUSTOM,
|
||||
XMB_ICON_THEME_RETROSYSTEM,
|
||||
XMB_ICON_THEME_LAST
|
||||
};
|
||||
|
||||
|
|
|
@ -137,7 +137,7 @@ void menu_event_kb_set(bool down, enum retro_key key)
|
|||
* entire button state either but do a separate event per button
|
||||
* state.
|
||||
*/
|
||||
unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
||||
unsigned menu_event(retro_bits_t* p_input, retro_bits_t* p_trigger_input)
|
||||
{
|
||||
menu_animation_ctx_delta_t delta;
|
||||
float delta_time;
|
||||
|
@ -160,12 +160,12 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
unsigned menu_cancel_btn = (!input_swap_override &&
|
||||
settings->bools.input_menu_swap_ok_cancel_buttons) ?
|
||||
RETRO_DEVICE_ID_JOYPAD_A : RETRO_DEVICE_ID_JOYPAD_B;
|
||||
unsigned ok_current = (unsigned)(input & UINT64_C(1) << menu_ok_btn);
|
||||
unsigned ok_current = RARCH_INPUT_STATE_BIT_GET_PTR(p_input, menu_ok_btn );
|
||||
unsigned ok_trigger = ok_current & ~ok_old;
|
||||
|
||||
ok_old = ok_current;
|
||||
|
||||
if (input)
|
||||
if (RARCH_INPUT_STATE_ANY_SET_PTR(p_input))
|
||||
{
|
||||
if (!first_held)
|
||||
{
|
||||
|
@ -179,7 +179,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
|
||||
if (delay_count >= delay_timer)
|
||||
{
|
||||
uint64_t input_repeat = 0;
|
||||
uint32_t input_repeat = 0;
|
||||
BIT32_SET(input_repeat, RETRO_DEVICE_ID_JOYPAD_UP);
|
||||
BIT32_SET(input_repeat, RETRO_DEVICE_ID_JOYPAD_DOWN);
|
||||
BIT32_SET(input_repeat, RETRO_DEVICE_ID_JOYPAD_LEFT);
|
||||
|
@ -189,7 +189,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
|
||||
set_scroll = true;
|
||||
first_held = false;
|
||||
trigger_input |= input & input_repeat;
|
||||
p_trigger_input->data[0] |= p_input->data[0] & input_repeat;
|
||||
|
||||
menu_driver_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL,
|
||||
&new_scroll_accel);
|
||||
|
@ -221,31 +221,31 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
{
|
||||
menu_event_osk_iterate();
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
{
|
||||
if (menu_event_get_osk_ptr() < 33)
|
||||
menu_event_set_osk_ptr(menu_event_get_osk_ptr() + OSK_CHARS_PER_LINE);
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
{
|
||||
if (menu_event_get_osk_ptr() >= OSK_CHARS_PER_LINE)
|
||||
menu_event_set_osk_ptr(menu_event_get_osk_ptr() - OSK_CHARS_PER_LINE);
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
{
|
||||
if (menu_event_get_osk_ptr() < 43)
|
||||
menu_event_set_osk_ptr(menu_event_get_osk_ptr() + 1);
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
{
|
||||
if (menu_event_get_osk_ptr() >= 1)
|
||||
menu_event_set_osk_ptr(menu_event_get_osk_ptr() - 1);
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_L))
|
||||
{
|
||||
if (menu_event_get_osk_idx() > OSK_TYPE_UNKNOWN + 1)
|
||||
menu_event_set_osk_idx((enum osk_type)(menu_event_get_osk_idx() - 1));
|
||||
|
@ -253,7 +253,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
menu_event_set_osk_idx((enum osk_type)(OSK_TYPE_LAST - 1));
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_R))
|
||||
{
|
||||
if (menu_event_get_osk_idx() < OSK_TYPE_LAST - 1)
|
||||
menu_event_set_osk_idx((enum osk_type)(menu_event_get_osk_idx() + 1));
|
||||
|
@ -261,50 +261,50 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
menu_event_set_osk_idx((enum osk_type)(OSK_TYPE_UNKNOWN + 1));
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << menu_ok_btn))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, menu_ok_btn))
|
||||
{
|
||||
if (menu_event_get_osk_ptr() >= 0)
|
||||
menu_event_osk_append(menu_event_get_osk_ptr());
|
||||
}
|
||||
|
||||
if (trigger_input & (UINT64_C(1) << menu_cancel_btn))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, menu_cancel_btn))
|
||||
{
|
||||
input_keyboard_event(true, '\x7f', '\x7f', 0, RETRO_DEVICE_KEYBOARD);
|
||||
}
|
||||
|
||||
/* send return key to close keyboard input window */
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_START))
|
||||
input_keyboard_event(true, '\n', '\n', 0, RETRO_DEVICE_KEYBOARD);
|
||||
|
||||
trigger_input = 0;
|
||||
RARCH_INPUT_STATE_CLEAR_PTR(p_trigger_input);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_UP))
|
||||
ret = MENU_ACTION_UP;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_DOWN))
|
||||
ret = MENU_ACTION_DOWN;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_LEFT))
|
||||
ret = MENU_ACTION_LEFT;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_RIGHT))
|
||||
ret = MENU_ACTION_RIGHT;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_L))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_L))
|
||||
ret = MENU_ACTION_SCROLL_UP;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_R))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_R))
|
||||
ret = MENU_ACTION_SCROLL_DOWN;
|
||||
else if (ok_trigger)
|
||||
ret = MENU_ACTION_OK;
|
||||
else if (trigger_input & (UINT64_C(1) << menu_cancel_btn))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, menu_cancel_btn))
|
||||
ret = MENU_ACTION_CANCEL;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_X))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_X))
|
||||
ret = MENU_ACTION_SEARCH;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_Y))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_Y))
|
||||
ret = MENU_ACTION_SCAN;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_START))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_START))
|
||||
ret = MENU_ACTION_START;
|
||||
else if (trigger_input & (UINT64_C(1) << RETRO_DEVICE_ID_JOYPAD_SELECT))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RETRO_DEVICE_ID_JOYPAD_SELECT))
|
||||
ret = MENU_ACTION_INFO;
|
||||
else if (trigger_input & (UINT64_C(1) << RARCH_MENU_TOGGLE))
|
||||
else if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RARCH_MENU_TOGGLE))
|
||||
ret = MENU_ACTION_TOGGLE;
|
||||
}
|
||||
|
||||
|
@ -314,7 +314,7 @@ unsigned menu_event(uint64_t input, uint64_t trigger_input)
|
|||
menu_event_kb_set_internal(RETROK_F11, 0);
|
||||
}
|
||||
|
||||
if (runloop_cmd_press(trigger_input, RARCH_QUIT_KEY))
|
||||
if (RARCH_INPUT_STATE_BIT_GET_PTR(p_trigger_input, RARCH_QUIT_KEY))
|
||||
return MENU_ACTION_QUIT;
|
||||
|
||||
mouse_enabled = settings->bools.menu_mouse_enable;
|
||||
|
|
|
@ -44,7 +44,7 @@ RETRO_BEGIN_DECLS
|
|||
* entire button state either but do a separate event per button
|
||||
* state.
|
||||
*/
|
||||
unsigned menu_event(uint64_t input, uint64_t trigger_state);
|
||||
unsigned menu_event(retro_bits_t* p_input, retro_bits_t* p_trigger_state);
|
||||
|
||||
/* Set a specific keyboard key.
|
||||
*
|
||||
|
|
|
@ -917,7 +917,7 @@ int menu_setting_set(unsigned type, const char *label,
|
|||
int ret = 0;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
menu_file_list_cbs_t *cbs = selection_buf ?
|
||||
menu_file_list_cbs_t *cbs = selection_buf ?
|
||||
(menu_file_list_cbs_t*)file_list_get_actiondata_at_offset(selection_buf, selection) : NULL;
|
||||
|
||||
if (!cbs)
|
||||
|
@ -1441,12 +1441,13 @@ static int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
|||
target->key = def_binds[i - MENU_SETTINGS_BIND_BEGIN].key;
|
||||
target->joykey = NO_BTN;
|
||||
target->joyaxis = AXIS_NONE;
|
||||
target->mbutton = NO_BTN;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
setting_get_string_representation_st_float_video_refresh_rate_auto(
|
||||
void *data, char *s, size_t len)
|
||||
{
|
||||
|
@ -6461,6 +6462,22 @@ static bool setting_append_list(
|
|||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_badges_enable,
|
||||
MENU_ENUM_LABEL_CHEEVOS_BADGES_ENABLE,
|
||||
MENU_ENUM_LABEL_VALUE_CHEEVOS_BADGES_ENABLE,
|
||||
false,
|
||||
MENU_ENUM_LABEL_VALUE_OFF,
|
||||
MENU_ENUM_LABEL_VALUE_ON,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler,
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.cheevos_verbose_enable,
|
||||
|
|
|
@ -255,6 +255,7 @@ void menu_dialog_push_pending(bool push, enum menu_dialog_type type)
|
|||
void menu_dialog_push(void)
|
||||
{
|
||||
menu_displaylist_info_t info;
|
||||
const char *label;
|
||||
|
||||
if (!menu_dialog_is_push_pending())
|
||||
return;
|
||||
|
@ -263,8 +264,11 @@ void menu_dialog_push(void)
|
|||
|
||||
info.list = menu_entries_get_menu_stack_ptr(0);
|
||||
info.enum_idx = MENU_ENUM_LABEL_HELP;
|
||||
info.label = strdup(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_HELP));
|
||||
|
||||
/* Set the label string, if it exists. */
|
||||
label = msg_hash_to_str(MENU_ENUM_LABEL_HELP);
|
||||
if (label)
|
||||
info.label = strdup(label);
|
||||
|
||||
menu_displaylist_ctl(DISPLAYLIST_HELP, &info);
|
||||
}
|
||||
|
|
|
@ -274,9 +274,10 @@ void filebrowser_parse(void *data, unsigned type_data)
|
|||
}
|
||||
|
||||
end:
|
||||
menu_entries_prepend(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY),
|
||||
path,
|
||||
MENU_ENUM_LABEL_PARENT_DIRECTORY,
|
||||
FILE_TYPE_PARENT_DIRECTORY, 0, 0);
|
||||
if (info)
|
||||
menu_entries_prepend(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PARENT_DIRECTORY),
|
||||
path,
|
||||
MENU_ENUM_LABEL_PARENT_DIRECTORY,
|
||||
FILE_TYPE_PARENT_DIRECTORY, 0, 0);
|
||||
}
|
||||
|
|
|
@ -30,9 +30,11 @@
|
|||
#define MENU_MAX_BUTTONS 219
|
||||
#define MENU_MAX_AXES 32
|
||||
#define MENU_MAX_HATS 4
|
||||
#define MENU_MAX_MBUTTONS 32 /*enough to cover largest libretro constant*/
|
||||
|
||||
struct menu_bind_state_port
|
||||
{
|
||||
bool mbuttons[MENU_MAX_MBUTTONS];
|
||||
bool buttons[MENU_MAX_BUTTONS];
|
||||
int16_t axes[MENU_MAX_AXES];
|
||||
uint16_t hats[MENU_MAX_HATS];
|
||||
|
@ -206,6 +208,7 @@ static void menu_input_key_bind_poll_bind_state(
|
|||
unsigned port,
|
||||
bool timed_out)
|
||||
{
|
||||
unsigned b;
|
||||
rarch_joypad_info_t joypad_info;
|
||||
const input_device_driver_t *joypad =
|
||||
input_driver_get_joypad_driver();
|
||||
|
@ -217,6 +220,11 @@ static void menu_input_key_bind_poll_bind_state(
|
|||
|
||||
memset(state->state, 0, sizeof(state->state));
|
||||
|
||||
/* poll mouse (on the relevant port) */
|
||||
for (b = 0; b < MENU_MAX_MBUTTONS; b++)
|
||||
state->state[port].mbuttons[b] =
|
||||
input_mouse_button_raw(port, b);
|
||||
|
||||
joypad_info.joy_idx = 0;
|
||||
joypad_info.auto_binds = NULL;
|
||||
joypad_info.axis_threshold = 0.0f;
|
||||
|
@ -277,6 +285,30 @@ static bool menu_input_key_bind_poll_find_trigger_pad(
|
|||
const struct menu_bind_state_port *o = (const struct menu_bind_state_port*)
|
||||
&state->state[p];
|
||||
|
||||
for (b = 0; b < MENU_MAX_MBUTTONS; b++)
|
||||
{
|
||||
bool iterate = n->mbuttons[b] && !o->mbuttons[b];
|
||||
|
||||
if (!iterate)
|
||||
continue;
|
||||
|
||||
switch ( b )
|
||||
{
|
||||
|
||||
case RETRO_DEVICE_ID_MOUSE_LEFT:
|
||||
case RETRO_DEVICE_ID_MOUSE_RIGHT:
|
||||
case RETRO_DEVICE_ID_MOUSE_MIDDLE:
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_4:
|
||||
case RETRO_DEVICE_ID_MOUSE_BUTTON_5:
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_WHEELDOWN:
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELUP:
|
||||
case RETRO_DEVICE_ID_MOUSE_HORIZ_WHEELDOWN:
|
||||
state->target->mbutton = b;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
for (b = 0; b < MENU_MAX_BUTTONS; b++)
|
||||
{
|
||||
bool iterate = n->buttons[b] && !o->buttons[b];
|
||||
|
@ -398,7 +430,7 @@ bool menu_input_key_bind_iterate(menu_input_ctx_bind_t *bind)
|
|||
}
|
||||
|
||||
snprintf(bind->s, bind->len,
|
||||
"[%s]\npress keyboard or joypad\n(timeout %d %s)",
|
||||
"[%s]\npress keyboard, mouse or joypad\n(timeout %d %s)",
|
||||
input_config_bind_map_get_desc(
|
||||
menu_input_binds.begin - MENU_SETTINGS_BIND_BEGIN),
|
||||
rarch_timer_get_timeout(&menu_input_binds.timer),
|
||||
|
|
23
msg_hash.h
|
@ -463,6 +463,7 @@ enum msg_hash_enums
|
|||
MENU_ENUM_LABEL_PLAYLIST_COLLECTION_ENTRY,
|
||||
|
||||
MENU_LABEL(CHEEVOS_UNLOCKED_ENTRY),
|
||||
MENU_LABEL(CHEEVOS_UNLOCKED_ENTRY_HARDCORE),
|
||||
MENU_LABEL(CHEEVOS_LOCKED_ENTRY),
|
||||
|
||||
MENU_ENUM_LABEL_SHADER_PARAMETERS_ENTRY,
|
||||
|
@ -546,6 +547,15 @@ enum msg_hash_enums
|
|||
MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_L3,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_JOYPAD_R3,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_KEY,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_LEFT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_RIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_MIDDLE,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON4,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_BUTTON5,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_UP,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_WHEEL_DOWN,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_UP,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_MOUSE_HORIZ_WHEEL_DOWN,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_X,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_LEFT_Y,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X,
|
||||
|
@ -558,6 +568,17 @@ enum msg_hash_enums
|
|||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_X_MINUS,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_PLUS,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_ANALOG_RIGHT_Y_MINUS,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_TRIGGER,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_RELOAD,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_A,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_B,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_AUX_C,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_START,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_SELECT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_UP,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_DOWN,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_LEFT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_LIGHTGUN_DPAD_RIGHT,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_TURBO_ENABLE,
|
||||
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_META_FAST_FORWARD_KEY,
|
||||
|
@ -853,6 +874,7 @@ enum msg_hash_enums
|
|||
MENU_LABEL(ACCOUNTS_CHEEVOS_USERNAME),
|
||||
MENU_LABEL(CHEEVOS_HARDCORE_MODE_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_LEADERBOARDS_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_BADGES_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_TEST_UNOFFICIAL),
|
||||
MENU_LABEL(CHEEVOS_VERBOSE_ENABLE),
|
||||
MENU_LABEL(CHEEVOS_ENABLE),
|
||||
|
@ -1855,7 +1877,6 @@ enum msg_hash_enums
|
|||
#define MENU_LABEL_FRONTEND_COUNTERS 0xe5696877U
|
||||
#define MENU_LABEL_CORE_COUNTERS 0x64cc83e0U
|
||||
#define MENU_LABEL_ACHIEVEMENT_LIST 0x7b90fc49U
|
||||
#define MENU_LABEL_ACHIEVEMENT_LIST_HARDCORE 0x7c632930U
|
||||
#define MENU_LABEL_CORE_INFORMATION 0xb638e0d3U
|
||||
#define MENU_LABEL_CORE_OPTIONS 0xf65e60f9U
|
||||
#define MENU_LABEL_SHADER_OPTIONS 0x1f7d2fc7U
|
||||
|
|
|
@ -123,11 +123,13 @@ void deinit_netplay_discovery(void)
|
|||
}
|
||||
|
||||
/** Discovery control */
|
||||
/* Todo: implement net_ifinfo and ntohs for consoles */
|
||||
bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state, void *data)
|
||||
{
|
||||
#ifndef RARCH_CONSOLE
|
||||
char port_str[6];
|
||||
int k = 0;
|
||||
int ret;
|
||||
unsigned k = 0;
|
||||
|
||||
if (lan_ad_client_fd < 0)
|
||||
return false;
|
||||
|
@ -136,10 +138,9 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
|
|||
{
|
||||
case RARCH_NETPLAY_DISCOVERY_CTL_LAN_SEND_QUERY:
|
||||
{
|
||||
struct addrinfo hints = {0}, *addr;
|
||||
int canBroadcast = 1;
|
||||
|
||||
net_ifinfo_t interfaces;
|
||||
struct addrinfo hints = {0}, *addr;
|
||||
int canBroadcast = 1;
|
||||
|
||||
if (!net_ifinfo_new(&interfaces))
|
||||
return false;
|
||||
|
@ -160,7 +161,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
|
|||
memcpy((void *) &ad_packet_buffer, "RANQ", 4);
|
||||
ad_packet_buffer.protocol_version = htonl(NETPLAY_PROTOCOL_VERSION);
|
||||
|
||||
for (k=0; k < interfaces.size; k++)
|
||||
for (k = 0; k < (unsigned)interfaces.size; k++)
|
||||
{
|
||||
strlcpy(ad_packet_buffer.address, interfaces.entries[k].host,
|
||||
NETPLAY_HOST_STR_LEN);
|
||||
|
@ -169,7 +170,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
|
|||
ret = sendto(lan_ad_client_fd, (const char *) &ad_packet_buffer,
|
||||
sizeof(struct ad_packet), 0, addr->ai_addr, addr->ai_addrlen);
|
||||
if (ret < (ssize_t) (2*sizeof(uint32_t)))
|
||||
RARCH_WARN("[discovery] Failed to send netplay discovery query (error: %d)\n", ret);
|
||||
RARCH_WARN("[discovery] Failed to send netplay discovery query (error: %d)\n", errno);
|
||||
}
|
||||
|
||||
freeaddrinfo_retro(addr);
|
||||
|
@ -191,7 +192,7 @@ bool netplay_discovery_driver_ctl(enum rarch_netplay_discovery_ctl_state state,
|
|||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -228,15 +229,23 @@ error:
|
|||
*/
|
||||
bool netplay_lan_ad_server(netplay_t *netplay)
|
||||
{
|
||||
/* Todo: implement net_ifinfo and ntohs for consoles */
|
||||
#ifndef RARCH_CONSOLE
|
||||
fd_set fds;
|
||||
int ret;
|
||||
struct timeval tmp_tv = {0};
|
||||
struct sockaddr their_addr;
|
||||
socklen_t addr_size;
|
||||
rarch_system_info_t *info = NULL;
|
||||
int ret, k = 0;
|
||||
unsigned k = 0;
|
||||
char reply_addr[NETPLAY_HOST_STR_LEN], port_str[6];
|
||||
struct addrinfo *our_addr, hints = {0};
|
||||
|
||||
net_ifinfo_t interfaces;
|
||||
|
||||
if (!net_ifinfo_new(&interfaces))
|
||||
return false;
|
||||
|
||||
if (lan_ad_server_fd < 0 && !init_lan_ad_server_socket(netplay, RARCH_DEFAULT_PORT))
|
||||
return false;
|
||||
|
||||
|
@ -277,11 +286,6 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||
|
||||
strlcpy(reply_addr, ad_packet_buffer.address, NETPLAY_HOST_STR_LEN);
|
||||
|
||||
net_ifinfo_t interfaces;
|
||||
|
||||
if (!net_ifinfo_new(&interfaces))
|
||||
return false;
|
||||
|
||||
for (k = 0; k < interfaces.size; k++)
|
||||
{
|
||||
char *p;
|
||||
|
@ -334,11 +338,13 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||
snprintf(port_str, 6, "%hu", ntohs(((struct sockaddr_in*)(&their_addr))->sin_port));
|
||||
if (getaddrinfo_retro(reply_addr, port_str, &hints, &our_addr) < 0)
|
||||
continue;
|
||||
|
||||
RARCH_LOG ("[discovery] sending reply to %s \n", reply_addr);
|
||||
|
||||
/* And send it */
|
||||
sendto(lan_ad_server_fd, (const char*)&ad_packet_buffer,
|
||||
sizeof(struct ad_packet), 0, our_addr->ai_addr, our_addr->ai_addrlen);
|
||||
sizeof(struct ad_packet), 0, our_addr->ai_addr, our_addr->ai_addrlen);
|
||||
freeaddrinfo_retro(our_addr);
|
||||
}
|
||||
else
|
||||
continue;
|
||||
|
@ -347,9 +353,9 @@ bool netplay_lan_ad_server(netplay_t *netplay)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
net_ifinfo_free(&interfaces);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -613,9 +613,12 @@ static void netplay_announce(void)
|
|||
char *corename = NULL;
|
||||
char *gamename = NULL;
|
||||
char *coreversion = NULL;
|
||||
char *frontend_ident = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
uint32_t content_crc = content_get_crc();
|
||||
const frontend_ctx_driver_t
|
||||
*frontend = frontend_get_ptr();
|
||||
|
||||
net_http_urlencode_full(&username, settings->paths.username);
|
||||
net_http_urlencode_full(&corename, system->info.library_name);
|
||||
|
@ -623,18 +626,19 @@ static void netplay_announce(void)
|
|||
!string_is_empty(path_basename(path_get(RARCH_PATH_BASENAME))) ?
|
||||
path_basename(path_get(RARCH_PATH_BASENAME)) : "N/A");
|
||||
net_http_urlencode_full(&coreversion, system->info.library_version);
|
||||
net_http_urlencode_full(&frontend_ident, frontend->ident);
|
||||
|
||||
buf[0] = '\0';
|
||||
|
||||
snprintf(buf, sizeof(buf), "username=%s&core_name=%s&core_version=%s&"
|
||||
"game_name=%s&game_crc=%08X&port=%d"
|
||||
"&has_password=%d&has_spectate_password=%d&force_mitm=%d&retroarch_version=%s",
|
||||
"&has_password=%d&has_spectate_password=%d&force_mitm=%d&retroarch_version=%s&frontend=%s",
|
||||
username, corename, coreversion, gamename, content_crc,
|
||||
settings->uints.netplay_port,
|
||||
*settings->paths.netplay_password ? 1 : 0,
|
||||
*settings->paths.netplay_spectate_password ? 1 : 0,
|
||||
settings->bools.netplay_use_mitm_server,
|
||||
PACKAGE_VERSION);
|
||||
PACKAGE_VERSION, frontend_ident);
|
||||
#if 0
|
||||
RARCH_LOG("[netplay] announcement URL: %s\n", buf);
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!-- <!DOCTYPE manifest [ <!ENTITY % versionDTD SYSTEM "../../../version.dtd"> %versionDTD; ]> !-->
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.retroarch"
|
||||
android:versionCode="62"
|
||||
android:versionName="1.6.8"
|
||||
android:versionCode="63"
|
||||
android:versionName="1.6.9"
|
||||
android:installLocation="internalOnly">
|
||||
<uses-feature android:glEsVersion="0x00020000" />
|
||||
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
|
||||
|
|
|
@ -3,79 +3,79 @@ ifeq ($(LIBRETRO), gambatte)
|
|||
APP_TITLE = Gambatte Libretro
|
||||
APP_PRODUCT_CODE = RARCH-GAMBATTE
|
||||
APP_UNIQUE_ID = 0xBAC01
|
||||
APP_ICON = ctr/assets/gambatte.png
|
||||
APP_BANNER = ctr/assets/gambatte_banner.png
|
||||
APP_ICON = pkg/ctr/assets/gambatte.png
|
||||
APP_BANNER = pkg/ctr/assets/gambatte_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), gpsp)
|
||||
APP_TITLE = gpSP Libretro
|
||||
APP_PRODUCT_CODE = RARCH-GPSP
|
||||
APP_UNIQUE_ID = 0xBAC02
|
||||
APP_ICON = ctr/assets/gpsp.png
|
||||
APP_BANNER = ctr/assets/gpsp_banner.png
|
||||
APP_ICON = pkg/ctr/assets/gpsp.png
|
||||
APP_BANNER = pkg/ctr/assets/gpsp_banner.png
|
||||
APP_USE_SVCHAX = 1
|
||||
|
||||
else ifeq ($(LIBRETRO), fceumm)
|
||||
APP_TITLE = FCeumm Libretro
|
||||
APP_PRODUCT_CODE = RARCH-FCEUMM
|
||||
APP_UNIQUE_ID = 0xBAC03
|
||||
APP_ICON = ctr/assets/fceumm.png
|
||||
APP_BANNER = ctr/assets/fceumm_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fceumm.png
|
||||
APP_BANNER = pkg/ctr/assets/fceumm_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), nestopia)
|
||||
APP_TITLE = Nestopia Libretro
|
||||
APP_PRODUCT_CODE = RARCH-NESTOPIA
|
||||
APP_UNIQUE_ID = 0xBAC04
|
||||
APP_ICON = ctr/assets/nestopia.png
|
||||
APP_BANNER = ctr/assets/nestopia_banner.png
|
||||
APP_ICON = pkg/ctr/assets/nestopia.png
|
||||
APP_BANNER = pkg/ctr/assets/nestopia_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), nxengine)
|
||||
APP_TITLE = NXengine Libretro
|
||||
APP_PRODUCT_CODE = RARCH-NXENGINE
|
||||
APP_UNIQUE_ID = 0xBAC05
|
||||
APP_ICON = ctr/assets/nxengine.png
|
||||
APP_BANNER = ctr/assets/nxengine_banner.png
|
||||
APP_ICON = pkg/ctr/assets/nxengine.png
|
||||
APP_BANNER = pkg/ctr/assets/nxengine_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), genesis_plus_gx)
|
||||
APP_TITLE = Genesis Plus GX Libretro
|
||||
APP_PRODUCT_CODE = RARCH-GENPLUSGX
|
||||
APP_UNIQUE_ID = 0xBAC06
|
||||
APP_ICON = ctr/assets/genesis_plus_gx.png
|
||||
APP_BANNER = ctr/assets/genesis_plus_gx_banner.png
|
||||
APP_ICON = pkg/ctr/assets/genesis_plus_gx.png
|
||||
APP_BANNER = pkg/ctr/assets/genesis_plus_gx_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), mednafen_wswan)
|
||||
APP_TITLE = Mednafen wswan Libretro
|
||||
APP_PRODUCT_CODE = RARCH-M-WSWAN
|
||||
APP_UNIQUE_ID = 0xBAC08
|
||||
APP_ICON = ctr/assets/mednafen_wswan.png
|
||||
APP_BANNER = ctr/assets/mednafen_wswan_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mednafen_wswan.png
|
||||
APP_BANNER = pkg/ctr/assets/mednafen_wswan_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), mednafen_vb)
|
||||
APP_TITLE = Mednafen VB Libretro
|
||||
APP_PRODUCT_CODE = RARCH-M-VB
|
||||
APP_UNIQUE_ID = 0xBAC09
|
||||
APP_ICON = ctr/assets/mednafen_vb.png
|
||||
APP_BANNER = ctr/assets/mednafen_vb_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mednafen_vb.png
|
||||
APP_BANNER = pkg/ctr/assets/mednafen_vb_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), mednafen_ngp)
|
||||
APP_TITLE = Mednafen NGP Libretro
|
||||
APP_PRODUCT_CODE = RARCH-M-NGP
|
||||
APP_UNIQUE_ID = 0xBAC0A
|
||||
APP_ICON = ctr/assets/mednafen_ngp.png
|
||||
APP_BANNER = ctr/assets/mednafen_ngp_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mednafen_ngp.png
|
||||
APP_BANNER = pkg/ctr/assets/mednafen_ngp_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), 2048)
|
||||
APP_TITLE = 2048 Libretro
|
||||
APP_PRODUCT_CODE = RARCH-2048
|
||||
APP_UNIQUE_ID = 0xBAC0B
|
||||
APP_ICON = ctr/assets/2048.png
|
||||
APP_BANNER = ctr/assets/2048_banner.png
|
||||
APP_ICON = pkg/ctr/assets/2048.png
|
||||
APP_BANNER = pkg/ctr/assets/2048_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), picodrive)
|
||||
APP_TITLE = Picodrive Libretro
|
||||
APP_PRODUCT_CODE = RARCH-PICODRIVE
|
||||
APP_UNIQUE_ID = 0xBAC0C
|
||||
APP_ICON = ctr/assets/picodrive.png
|
||||
APP_BANNER = ctr/assets/picodrive_banner.png
|
||||
APP_ICON = pkg/ctr/assets/picodrive.png
|
||||
APP_BANNER = pkg/ctr/assets/picodrive_banner.png
|
||||
APP_USE_SVCHAX = 1
|
||||
|
||||
|
||||
|
@ -84,16 +84,16 @@ else ifeq ($(LIBRETRO), mgba)
|
|||
APP_AUTHOR = Jeffrey Pfau
|
||||
APP_PRODUCT_CODE = RARCH-MGBA
|
||||
APP_UNIQUE_ID = 0xBAC0E
|
||||
APP_ICON = ctr/assets/mgba.png
|
||||
APP_BANNER = ctr/assets/mgba_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mgba.png
|
||||
APP_BANNER = pkg/ctr/assets/mgba_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), quicknes)
|
||||
APP_TITLE = QuickNES Libretro
|
||||
APP_AUTHOR = blargg, kode54
|
||||
APP_PRODUCT_CODE = RARCH-QUICKNES
|
||||
APP_UNIQUE_ID = 0xBAC0F
|
||||
APP_ICON = ctr/assets/quicknes.png
|
||||
APP_BANNER = ctr/assets/quicknes_banner.png
|
||||
APP_ICON = pkg/ctr/assets/quicknes.png
|
||||
APP_BANNER = pkg/ctr/assets/quicknes_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012)
|
||||
APP_TITLE = Final Burn Alpha 2012
|
||||
|
@ -101,16 +101,16 @@ else ifeq ($(LIBRETRO), fbalpha2012)
|
|||
APP_PRODUCT_CODE = RARCH-FBA
|
||||
APP_UNIQUE_ID = 0xBAC17
|
||||
APP_BIG_TEXT_SECTION = 1
|
||||
APP_ICON = ctr/assets/fbalpha2012.png
|
||||
APP_BANNER = ctr/assets/fbalpha2012_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_neogeo)
|
||||
APP_TITLE = Final Burn Alpha 2012 - NeoGeo
|
||||
APP_AUTHOR = Team FB Alpha
|
||||
APP_PRODUCT_CODE = RARCH-FBANEOGEO
|
||||
APP_UNIQUE_ID = 0xBAC10
|
||||
APP_ICON = ctr/assets/fbalpha2012_neogeo.png
|
||||
APP_BANNER = ctr/assets/fbalpha2012_neogeo_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012_neogeo.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_neogeo_banner.png
|
||||
APP_SYSTEM_MODE = 80MB
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_cps1)
|
||||
|
@ -118,16 +118,16 @@ else ifeq ($(LIBRETRO), fbalpha2012_cps1)
|
|||
APP_AUTHOR = Team FB Alpha
|
||||
APP_PRODUCT_CODE = RARCH-FBACPS1
|
||||
APP_UNIQUE_ID = 0xBAC11
|
||||
APP_ICON = ctr/assets/fbalpha2012_cps1.png
|
||||
APP_BANNER = ctr/assets/fbalpha2012_cps1_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012_cps1.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_cps1_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fbalpha2012_cps2)
|
||||
APP_TITLE = Final Burn Alpha 2012 - CPS-2
|
||||
APP_AUTHOR = Team FB Alpha
|
||||
APP_PRODUCT_CODE = RARCH-FBACPS2
|
||||
APP_UNIQUE_ID = 0xBAC12
|
||||
APP_ICON = ctr/assets/fbalpha2012_cps2.png
|
||||
APP_BANNER = ctr/assets/fbalpha2012_cps2_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fbalpha2012_cps2.png
|
||||
APP_BANNER = pkg/ctr/assets/fbalpha2012_cps2_banner.png
|
||||
APP_SYSTEM_MODE = 80MB
|
||||
|
||||
|
||||
|
@ -136,16 +136,16 @@ else ifeq ($(LIBRETRO), mednafen_pce_fast)
|
|||
APP_AUTHOR = Ryphecha
|
||||
APP_PRODUCT_CODE = RARCH-M-PCE-FAST
|
||||
APP_UNIQUE_ID = 0xBAC14
|
||||
APP_ICON = ctr/assets/mednafen_pce_fast.png
|
||||
APP_BANNER = ctr/assets/mednafen_pce_fast_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mednafen_pce_fast.png
|
||||
APP_BANNER = pkg/ctr/assets/mednafen_pce_fast_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), pcsx_rearmed)
|
||||
APP_TITLE = PCSX ReARMed
|
||||
APP_AUTHOR = PCSX Team, notaz, Exophase
|
||||
APP_PRODUCT_CODE = RARCH-PCSXRARMD
|
||||
APP_UNIQUE_ID = 0xBAC15
|
||||
APP_ICON = ctr/assets/pcsx_rearmed.png
|
||||
APP_BANNER = ctr/assets/pcsx_rearmed_banner.png
|
||||
APP_ICON = pkg/ctr/assets/pcsx_rearmed.png
|
||||
APP_BANNER = pkg/ctr/assets/pcsx_rearmed_banner.png
|
||||
APP_USE_SVCHAX = 1
|
||||
|
||||
else ifeq ($(LIBRETRO), fmsx)
|
||||
|
@ -153,23 +153,23 @@ else ifeq ($(LIBRETRO), fmsx)
|
|||
APP_AUTHOR = Marat Fayzullin
|
||||
APP_PRODUCT_CODE = RARCH-FMSX
|
||||
APP_UNIQUE_ID = 0xBAC16
|
||||
APP_ICON = ctr/assets/fmsx.png
|
||||
APP_BANNER = ctr/assets/fmsx_banner.png
|
||||
APP_ICON = pkg/ctr/assets/fmsx.png
|
||||
APP_BANNER = pkg/ctr/assets/fmsx_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), mame2000)
|
||||
APP_TITLE = MAME-2000
|
||||
APP_PRODUCT_CODE = RARCH-MAME2000
|
||||
APP_UNIQUE_ID = 0xBAC19
|
||||
APP_ICON = ctr/assets/mame2000.png
|
||||
APP_BANNER = ctr/assets/mame2000_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mame2000.png
|
||||
APP_BANNER = pkg/ctr/assets/mame2000_banner.png
|
||||
APP_BIG_TEXT_SECTION = 1
|
||||
|
||||
else ifeq ($(LIBRETRO), mame2003)
|
||||
APP_TITLE = MAME-2003
|
||||
APP_PRODUCT_CODE = RARCH-MAME2003
|
||||
APP_UNIQUE_ID = 0xBAC18
|
||||
APP_ICON = ctr/assets/mame2003.png
|
||||
APP_BANNER = ctr/assets/mame2003_banner.png
|
||||
APP_ICON = pkg/ctr/assets/mame2003.png
|
||||
APP_BANNER = pkg/ctr/assets/mame2003_banner.png
|
||||
APP_BIG_TEXT_SECTION = 1
|
||||
|
||||
|
||||
|
@ -178,36 +178,68 @@ else ifeq ($(LIBRETRO), snes9x2002)
|
|||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-POCKETSNES
|
||||
APP_UNIQUE_ID = 0xBAC1A
|
||||
APP_ICON = ctr/assets/snes9x2002.png
|
||||
APP_BANNER = ctr/assets/snes9x2002_banner.png
|
||||
APP_ICON = pkg/ctr/assets/snes9x2002.png
|
||||
APP_BANNER = pkg/ctr/assets/snes9x2002_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), snes9x2005)
|
||||
APP_TITLE = Snes9x 2005
|
||||
APP_PRODUCT_CODE = RARCH-CATSFC
|
||||
APP_UNIQUE_ID = 0xBAC07
|
||||
APP_ICON = ctr/assets/snes9x2005.png
|
||||
APP_BANNER = ctr/assets/snes9x2005_banner.png
|
||||
APP_ICON = pkg/ctr/assets/snes9x2005.png
|
||||
APP_BANNER = pkg/ctr/assets/snes9x2005_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), snes9x2005_plus)
|
||||
APP_TITLE = Snes9x 2005 Plus
|
||||
APP_PRODUCT_CODE = RARCH-CATSFCPLUS
|
||||
APP_UNIQUE_ID = 0xBAC13
|
||||
APP_ICON = ctr/assets/snes9x2005_plus.png
|
||||
APP_BANNER = ctr/assets/snes9x2005_plus_banner.png
|
||||
APP_ICON = pkg/ctr/assets/snes9x2005_plus.png
|
||||
APP_BANNER = pkg/ctr/assets/snes9x2005_plus_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), snes9x2010)
|
||||
APP_TITLE = Snes9x 2010
|
||||
APP_PRODUCT_CODE = RARCH-SNES9XNEXT
|
||||
APP_UNIQUE_ID = 0xBAC0D
|
||||
APP_ICON = ctr/assets/snes9x2010.png
|
||||
APP_BANNER = ctr/assets/snes9x2010_banner.png
|
||||
APP_ICON = pkg/ctr/assets/snes9x2010.png
|
||||
APP_BANNER = pkg/ctr/assets/snes9x2010_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), dosbox)
|
||||
APP_TITLE = DosBox
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-DOSBOX
|
||||
APP_UNIQUE_ID = 0xBAC1B
|
||||
APP_ICON = ctr/assets/dosbox.png
|
||||
APP_BANNER = ctr/assets/dosbox_banner.png
|
||||
APP_ICON = pkg/ctr/assets/dosbox.png
|
||||
APP_BANNER = pkg/ctr/assets/dosbox_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), nekop2)
|
||||
APP_TITLE = Neko Project 2
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-NP2
|
||||
APP_UNIQUE_ID = 0xBAC1C
|
||||
APP_ICON = pkg/ctr/assets/nekop2.png
|
||||
APP_BANNER = pkg/ctr/assets/nekop2_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), np2kai)
|
||||
APP_TITLE = Neko Project 2 Kai
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-NP2KAI
|
||||
APP_UNIQUE_ID = 0xBAC1D
|
||||
APP_ICON = pkg/ctr/assets/np2kai.png
|
||||
APP_BANNER = pkg/ctr/assets/np2kai_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), 81)
|
||||
APP_TITLE = lr-81
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-81
|
||||
APP_UNIQUE_ID = 0xBAC1E
|
||||
APP_ICON = pkg/ctr/assets/81.png
|
||||
APP_BANNER = pkg/ctr/assets/81_banner.png
|
||||
|
||||
else ifeq ($(LIBRETRO), fuse)
|
||||
APP_TITLE = Fuse
|
||||
APP_AUTHOR = various
|
||||
APP_PRODUCT_CODE = RARCH-FUSE
|
||||
APP_UNIQUE_ID = 0xBAC1F
|
||||
APP_ICON = pkg/ctr/assets/fuse.png
|
||||
APP_BANNER = pkg/ctr/assets/fuse_banner.png
|
||||
|
||||
endif
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 357 B After Width: | Height: | Size: 357 B |
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 311 B |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |