mirror of
https://github.com/libretro/RetroArch
synced 2025-03-23 19:21:03 +00:00
Merge branch 'master' of https://github.com/libretro/RetroArch
This commit is contained in:
commit
cbc6bc942e
@ -183,7 +183,7 @@ OBJ += frontend/frontend.o \
|
||||
$(LIBRETRO_COMM_DIR)/queues/message_queue.o \
|
||||
managers/state_manager.o \
|
||||
gfx/drivers_font_renderer/bitmapfont.o \
|
||||
input/input_autodetect.o \
|
||||
tasks/task_autodetect.o \
|
||||
input/input_autodetect_builtin.o \
|
||||
input/input_joypad_driver.o \
|
||||
input/input_config.o \
|
||||
|
@ -408,7 +408,7 @@ FONTS
|
||||
/*============================================================
|
||||
INPUT
|
||||
============================================================ */
|
||||
#include "../input/input_autodetect.c"
|
||||
#include "../tasks/task_autodetect.c"
|
||||
#include "../input/input_joypad_driver.c"
|
||||
#include "../input/input_config.c"
|
||||
#include "../input/input_keymaps.c"
|
||||
|
@ -34,7 +34,7 @@
|
||||
#endif
|
||||
|
||||
#include "../../frontend/drivers/platform_linux.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../drivers_keyboard/keyboard_event_android.h"
|
||||
|
@ -48,7 +48,7 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_keymaps.h"
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
|
||||
#define MAX_PADS 8
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
#include <boolean.h>
|
||||
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_keyboard.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_keymaps.h"
|
||||
|
@ -27,7 +27,7 @@
|
||||
#include "../../gfx/video_context_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_keymaps.h"
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "../connect/joypad_connection.h"
|
||||
#include "../input_defines.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_hid_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include "../connect/joypad_connection.h"
|
||||
#include "../input_defines.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../input_hid_driver.h"
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
#include "../input_defines.h"
|
||||
#include "../connect/joypad_connection.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../input_hid_driver.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
|
@ -20,7 +20,9 @@
|
||||
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../input_autodetect.h"
|
||||
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../configuration.h"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_keymaps.h"
|
||||
|
@ -15,15 +15,15 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../input_autodetect.h"
|
||||
|
||||
#include <gccore.h>
|
||||
#include <ogc/pad.h>
|
||||
#ifdef HW_RVL
|
||||
#include <wiiuse/wpad.h>
|
||||
#endif
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#ifdef GEKKO
|
||||
#define WPADInit WPAD_Init
|
||||
#define WPADDisconnect WPAD_Disconnect
|
||||
|
@ -14,7 +14,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_hid_driver.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
|
@ -31,11 +31,11 @@
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../common/epoll_common.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../verbosity.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#define NUM_BUTTONS 32
|
||||
#define NUM_AXES 32
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#include <compat/strl.h>
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../verbosity.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <stdint.h>
|
||||
#include <retro_inline.h>
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../verbosity.h"
|
||||
|
||||
typedef struct _sdl_joypad
|
||||
|
@ -31,7 +31,7 @@
|
||||
#include <compat/strl.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_driver.h"
|
||||
|
||||
#include "../common/udev_common.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "../input_joypad_driver.h"
|
||||
#include "../input_driver.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../configuration.h"
|
||||
#include "../../runloop.h"
|
||||
#include "../../configuration.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../../configuration.h"
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
|
||||
static uint64_t pad_state[MAX_PADS];
|
||||
static int16_t analog_state[MAX_PADS][2][2];
|
||||
|
@ -35,7 +35,7 @@
|
||||
#include "../../config.h"
|
||||
#endif
|
||||
|
||||
#include "../input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../input_config.h"
|
||||
|
||||
#include "../../configuration.h"
|
||||
|
@ -1,38 +0,0 @@
|
||||
/* 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.
|
||||
*
|
||||
* RetroArch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
* PURPOSE. See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with RetroArch.
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef _INPUT_AUTODETECT_H
|
||||
#define _INPUT_AUTODETECT_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boolean.h>
|
||||
|
||||
typedef struct autoconfig_params
|
||||
{
|
||||
char name[255];
|
||||
char driver[255];
|
||||
char display_name[255];
|
||||
unsigned idx;
|
||||
int32_t vid;
|
||||
int32_t pid;
|
||||
} autoconfig_params_t;
|
||||
|
||||
bool input_autoconfigure_connect(autoconfig_params_t *params);
|
||||
|
||||
void input_autoconfigure_disconnect(unsigned i, const char *ident);
|
||||
|
||||
#endif
|
@ -19,7 +19,7 @@
|
||||
#include "../config.h"
|
||||
#endif
|
||||
|
||||
#include "input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "input_config.h"
|
||||
|
||||
#define DECL_BTN(btn, bind) "input_" #btn "_btn = " #bind "\n"
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "../menu_shader.h"
|
||||
#include "../menu_display.h"
|
||||
|
||||
#include "../../input/input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../input/input_config.h"
|
||||
|
||||
#include "../../core.h"
|
||||
|
@ -70,7 +70,7 @@
|
||||
#include "../audio/audio_driver.h"
|
||||
#include "../audio/audio_resampler_driver.h"
|
||||
#include "../input/input_config.h"
|
||||
#include "../input/input_autodetect.h"
|
||||
#include "../tasks/tasks_internal.h"
|
||||
#include "../config.def.h"
|
||||
#include "../ui/ui_companion_driver.h"
|
||||
#include "../performance_counters.h"
|
||||
|
@ -33,7 +33,7 @@
|
||||
#include "../../retroarch.h"
|
||||
#include "../../configuration.h"
|
||||
|
||||
#include "../../input/input_autodetect.h"
|
||||
#include "../../tasks/tasks_internal.h"
|
||||
#include "../../input/input_config.h"
|
||||
|
||||
static bool menu_dialog_pending_push = false;
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include "configuration.h"
|
||||
#include "config.def.h"
|
||||
#include "input/input_config.h"
|
||||
#include "input/input_autodetect.h"
|
||||
#include "tasks/tasks_internal.h"
|
||||
#include "setting_list.h"
|
||||
|
||||
rarch_setting_t setting_terminator_setting(void)
|
||||
|
@ -14,6 +14,8 @@
|
||||
* If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* TODO/FIXME - turn this into actual task */
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
@ -22,16 +24,16 @@
|
||||
#include <file/file_path.h>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
#include "input_config.h"
|
||||
#include "input_autodetect.h"
|
||||
#include "../input/input_config.h"
|
||||
|
||||
#include "../configuration.h"
|
||||
#include "../file_path_special.h"
|
||||
#include "../list_special.h"
|
||||
#include "../msg_hash.h"
|
||||
#include "../runloop.h"
|
||||
#include "../verbosity.h"
|
||||
|
||||
#include "tasks_internal.h"
|
||||
|
||||
extern const char* const input_builtin_autoconfs[];
|
||||
|
||||
/* Adds an index for devices with the same name,
|
||||
@ -78,12 +80,12 @@ static int input_autoconfigure_joypad_try_from_conf(config_file_t *conf,
|
||||
{
|
||||
char ident[256];
|
||||
char input_driver[32];
|
||||
int tmp_int = 0;
|
||||
int input_vid = 0;
|
||||
int input_pid = 0;
|
||||
int score = 0;
|
||||
int tmp_int = 0;
|
||||
int input_vid = 0;
|
||||
int input_pid = 0;
|
||||
int score = 0;
|
||||
|
||||
ident[0] = input_driver[0] = '\0';
|
||||
ident[0] = input_driver[0] = '\0';
|
||||
|
||||
config_get_array(conf, "input_device", ident, sizeof(ident));
|
||||
config_get_array(conf, "input_driver", input_driver, sizeof(input_driver));
|
||||
@ -299,30 +301,31 @@ static bool input_autoconfigure_joypad_init(autoconfig_params_t *params)
|
||||
|
||||
bool input_autoconfigure_connect(autoconfig_params_t *params)
|
||||
{
|
||||
char msg[255];
|
||||
|
||||
msg[0] = '\0';
|
||||
|
||||
if (!input_autoconfigure_joypad_init(params))
|
||||
goto error;
|
||||
return false;
|
||||
|
||||
if (string_is_empty(params->name))
|
||||
goto error;
|
||||
return false;
|
||||
|
||||
if (input_autoconfigure_joypad_from_conf_dir(params))
|
||||
return true;
|
||||
if (input_autoconfigure_joypad_from_conf_internal(params))
|
||||
return true;
|
||||
if ( !input_autoconfigure_joypad_from_conf_dir(params)
|
||||
&& !input_autoconfigure_joypad_from_conf_internal(params))
|
||||
{
|
||||
char msg[255];
|
||||
|
||||
RARCH_LOG("Autodetect: no profiles found for %s (%d/%d).\n",
|
||||
params->name, params->vid, params->pid);
|
||||
snprintf(msg, sizeof(msg), "%s (%ld/%ld) %s.",
|
||||
params->name, (long)params->vid, (long)params->pid,
|
||||
msg_hash_to_str(MSG_DEVICE_NOT_CONFIGURED));
|
||||
runloop_msg_queue_push(msg, 2, 60, false);
|
||||
msg[0] = '\0';
|
||||
|
||||
error:
|
||||
return false;
|
||||
RARCH_LOG("Autodetect: no profiles found for %s (%d/%d).\n",
|
||||
params->name, params->vid, params->pid);
|
||||
|
||||
snprintf(msg, sizeof(msg), "%s (%ld/%ld) %s.",
|
||||
params->name, (long)params->vid, (long)params->pid,
|
||||
msg_hash_to_str(MSG_DEVICE_NOT_CONFIGURED));
|
||||
runloop_msg_queue_push(msg, 2, 60, false);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void input_autoconfigure_disconnect(unsigned i, const char *ident)
|
@ -71,6 +71,15 @@ typedef struct nbio_handle
|
||||
unsigned status;
|
||||
} nbio_handle_t;
|
||||
|
||||
typedef struct autoconfig_params
|
||||
{
|
||||
char name[255];
|
||||
char driver[255];
|
||||
char display_name[255];
|
||||
unsigned idx;
|
||||
int32_t vid;
|
||||
int32_t pid;
|
||||
} autoconfig_params_t;
|
||||
|
||||
#ifdef HAVE_NETWORKING
|
||||
typedef struct
|
||||
@ -158,6 +167,10 @@ void *savefile_ptr_get(void);
|
||||
|
||||
void path_init_savefile_new(void);
|
||||
|
||||
bool input_autoconfigure_connect(autoconfig_params_t *params);
|
||||
|
||||
void input_autoconfigure_disconnect(unsigned i, const char *ident);
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user