mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Rebase 'Add generic rumble gain to input settings' by davidgfnet
This commit is contained in:
parent
8a31b732dd
commit
303d17e2e6
72 changed files with 221 additions and 150 deletions
|
@ -1464,7 +1464,9 @@ static const bool enable_device_vibration = false;
|
||||||
/* Defines the strength of rumble effects
|
/* Defines the strength of rumble effects
|
||||||
* on OpenDingux devices */
|
* on OpenDingux devices */
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
||||||
#define DEFAULT_DINGUX_RUMBLE_GAIN 50
|
#define DEFAULT_RUMBLE_GAIN 50
|
||||||
|
#else
|
||||||
|
#define DEFAULT_RUMBLE_GAIN 100
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_VULKAN
|
#ifdef HAVE_VULKAN
|
||||||
|
|
|
@ -2080,9 +2080,7 @@ static struct config_uint_setting *populate_settings_uint(
|
||||||
SETTING_UINT("input_mouse_scale", &settings->uints.input_mouse_scale, true, DEFAULT_MOUSE_SCALE, false);
|
SETTING_UINT("input_mouse_scale", &settings->uints.input_mouse_scale, true, DEFAULT_MOUSE_SCALE, false);
|
||||||
#endif
|
#endif
|
||||||
SETTING_UINT("input_touch_scale", &settings->uints.input_touch_scale, true, DEFAULT_TOUCH_SCALE, false);
|
SETTING_UINT("input_touch_scale", &settings->uints.input_touch_scale, true, DEFAULT_TOUCH_SCALE, false);
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
SETTING_UINT("input_rumble_gain", &settings->uints.input_rumble_gain, true, DEFAULT_RUMBLE_GAIN, false);
|
||||||
SETTING_UINT("input_dingux_rumble_gain", &settings->uints.input_dingux_rumble_gain, true, DEFAULT_DINGUX_RUMBLE_GAIN, false);
|
|
||||||
#endif
|
|
||||||
SETTING_UINT("input_auto_game_focus", &settings->uints.input_auto_game_focus, true, DEFAULT_INPUT_AUTO_GAME_FOCUS, false);
|
SETTING_UINT("input_auto_game_focus", &settings->uints.input_auto_game_focus, true, DEFAULT_INPUT_AUTO_GAME_FOCUS, false);
|
||||||
SETTING_UINT("audio_latency", &settings->uints.audio_latency, false, 0 /* TODO */, false);
|
SETTING_UINT("audio_latency", &settings->uints.audio_latency, false, 0 /* TODO */, false);
|
||||||
SETTING_UINT("audio_resampler_quality", &settings->uints.audio_resampler_quality, true, audio_resampler_quality_level, false);
|
SETTING_UINT("audio_resampler_quality", &settings->uints.audio_resampler_quality, true, audio_resampler_quality_level, false);
|
||||||
|
|
|
@ -190,7 +190,7 @@ typedef struct settings
|
||||||
unsigned input_menu_toggle_gamepad_combo;
|
unsigned input_menu_toggle_gamepad_combo;
|
||||||
unsigned input_keyboard_gamepad_mapping_type;
|
unsigned input_keyboard_gamepad_mapping_type;
|
||||||
unsigned input_poll_type_behavior;
|
unsigned input_poll_type_behavior;
|
||||||
unsigned input_dingux_rumble_gain;
|
unsigned input_rumble_gain;
|
||||||
unsigned input_auto_game_focus;
|
unsigned input_auto_game_focus;
|
||||||
unsigned input_max_users;
|
unsigned input_max_users;
|
||||||
|
|
||||||
|
|
|
@ -550,6 +550,7 @@ input_device_driver_t ps3_joypad = {
|
||||||
ps3_joypad_axis,
|
ps3_joypad_axis,
|
||||||
ps3_joypad_poll,
|
ps3_joypad_poll,
|
||||||
ps3_joypad_rumble,
|
ps3_joypad_rumble,
|
||||||
|
NULL,
|
||||||
ps3_joypad_name,
|
ps3_joypad_name,
|
||||||
"ps3",
|
"ps3",
|
||||||
};
|
};
|
||||||
|
|
|
@ -253,6 +253,7 @@ input_device_driver_t android_joypad = {
|
||||||
android_joypad_axis,
|
android_joypad_axis,
|
||||||
android_joypad_poll,
|
android_joypad_poll,
|
||||||
android_joypad_rumble,
|
android_joypad_rumble,
|
||||||
|
NULL,
|
||||||
android_joypad_name,
|
android_joypad_name,
|
||||||
"android",
|
"android",
|
||||||
};
|
};
|
||||||
|
|
|
@ -219,6 +219,7 @@ input_device_driver_t ctr_joypad = {
|
||||||
ctr_joypad_axis,
|
ctr_joypad_axis,
|
||||||
ctr_joypad_poll,
|
ctr_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
ctr_joypad_name,
|
ctr_joypad_name,
|
||||||
"ctr",
|
"ctr",
|
||||||
};
|
};
|
||||||
|
|
|
@ -56,6 +56,7 @@ input_device_driver_t dinput_joypad = {
|
||||||
dinput_joypad_axis,
|
dinput_joypad_axis,
|
||||||
dinput_joypad_poll,
|
dinput_joypad_poll,
|
||||||
dinput_joypad_set_rumble,
|
dinput_joypad_set_rumble,
|
||||||
|
NULL,
|
||||||
dinput_joypad_name,
|
dinput_joypad_name,
|
||||||
"dinput",
|
"dinput",
|
||||||
};
|
};
|
||||||
|
|
|
@ -271,6 +271,7 @@ input_device_driver_t dos_joypad = {
|
||||||
dos_joypad_axis,
|
dos_joypad_axis,
|
||||||
dos_joypad_poll,
|
dos_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
dos_joypad_name,
|
dos_joypad_name,
|
||||||
"dos",
|
"dos",
|
||||||
};
|
};
|
||||||
|
|
|
@ -668,6 +668,7 @@ input_device_driver_t gx_joypad = {
|
||||||
gx_joypad_axis,
|
gx_joypad_axis,
|
||||||
gx_joypad_poll,
|
gx_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
gx_joypad_name,
|
gx_joypad_name,
|
||||||
"gx",
|
"gx",
|
||||||
};
|
};
|
||||||
|
|
|
@ -130,6 +130,7 @@ input_device_driver_t hid_joypad = {
|
||||||
hid_joypad_axis,
|
hid_joypad_axis,
|
||||||
hid_joypad_poll,
|
hid_joypad_poll,
|
||||||
hid_joypad_rumble,
|
hid_joypad_rumble,
|
||||||
|
NULL,
|
||||||
hid_joypad_name,
|
hid_joypad_name,
|
||||||
"hid"
|
"hid"
|
||||||
};
|
};
|
||||||
|
|
|
@ -402,6 +402,7 @@ input_device_driver_t linuxraw_joypad = {
|
||||||
linuxraw_joypad_axis,
|
linuxraw_joypad_axis,
|
||||||
linuxraw_joypad_poll,
|
linuxraw_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
linuxraw_joypad_name,
|
linuxraw_joypad_name,
|
||||||
"linuxraw",
|
"linuxraw",
|
||||||
};
|
};
|
||||||
|
|
|
@ -481,6 +481,7 @@ input_device_driver_t mfi_joypad = {
|
||||||
apple_gamecontroller_joypad_axis,
|
apple_gamecontroller_joypad_axis,
|
||||||
apple_gamecontroller_joypad_poll,
|
apple_gamecontroller_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
apple_gamecontroller_joypad_name,
|
apple_gamecontroller_joypad_name,
|
||||||
"mfi",
|
"mfi",
|
||||||
};
|
};
|
||||||
|
|
|
@ -412,6 +412,7 @@ input_device_driver_t parport_joypad = {
|
||||||
parport_joypad_axis,
|
parport_joypad_axis,
|
||||||
parport_joypad_poll,
|
parport_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
parport_joypad_name,
|
parport_joypad_name,
|
||||||
"parport",
|
"parport",
|
||||||
};
|
};
|
||||||
|
|
|
@ -261,6 +261,7 @@ input_device_driver_t ps2_joypad = {
|
||||||
ps2_joypad_axis,
|
ps2_joypad_axis,
|
||||||
ps2_joypad_poll,
|
ps2_joypad_poll,
|
||||||
ps2_joypad_rumble,
|
ps2_joypad_rumble,
|
||||||
|
NULL,
|
||||||
ps2_joypad_name,
|
ps2_joypad_name,
|
||||||
"ps2",
|
"ps2",
|
||||||
};
|
};
|
||||||
|
|
|
@ -289,6 +289,7 @@ input_device_driver_t ps3_joypad = {
|
||||||
ps3_joypad_axis,
|
ps3_joypad_axis,
|
||||||
ps3_joypad_poll,
|
ps3_joypad_poll,
|
||||||
ps3_joypad_rumble,
|
ps3_joypad_rumble,
|
||||||
|
NULL,
|
||||||
ps3_joypad_name,
|
ps3_joypad_name,
|
||||||
"ps3",
|
"ps3",
|
||||||
};
|
};
|
||||||
|
|
|
@ -242,6 +242,7 @@ input_device_driver_t ps4_joypad = {
|
||||||
ps4_joypad_axis,
|
ps4_joypad_axis,
|
||||||
ps4_joypad_poll,
|
ps4_joypad_poll,
|
||||||
ps4_joypad_rumble,
|
ps4_joypad_rumble,
|
||||||
|
NULL,
|
||||||
ps4_joypad_name,
|
ps4_joypad_name,
|
||||||
"ps4",
|
"ps4",
|
||||||
};
|
};
|
||||||
|
|
|
@ -432,6 +432,7 @@ input_device_driver_t psp_joypad = {
|
||||||
psp_joypad_axis,
|
psp_joypad_axis,
|
||||||
psp_joypad_poll,
|
psp_joypad_poll,
|
||||||
psp_joypad_rumble,
|
psp_joypad_rumble,
|
||||||
|
NULL,
|
||||||
psp_joypad_name,
|
psp_joypad_name,
|
||||||
#ifdef VITA
|
#ifdef VITA
|
||||||
"vita",
|
"vita",
|
||||||
|
|
|
@ -163,6 +163,7 @@ input_device_driver_t qnx_joypad = {
|
||||||
qnx_joypad_axis,
|
qnx_joypad_axis,
|
||||||
qnx_joypad_poll,
|
qnx_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
qnx_joypad_name,
|
qnx_joypad_name,
|
||||||
"qnx",
|
"qnx",
|
||||||
};
|
};
|
||||||
|
|
|
@ -219,6 +219,7 @@ input_device_driver_t rwebpad_joypad = {
|
||||||
rwebpad_joypad_axis,
|
rwebpad_joypad_axis,
|
||||||
rwebpad_joypad_poll,
|
rwebpad_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
rwebpad_joypad_name,
|
rwebpad_joypad_name,
|
||||||
"rwebpad",
|
"rwebpad",
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
#if defined(HAVE_LIBSHAKE)
|
#if defined(HAVE_LIBSHAKE)
|
||||||
#include <shake.h>
|
#include <shake.h>
|
||||||
#include "../../configuration.h"
|
#include "../../configuration.h"
|
||||||
|
#include "../../config.def.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(RS90) || defined (RETROFW)
|
#if defined(RS90) || defined (RETROFW)
|
||||||
|
@ -100,15 +101,11 @@ static dingux_joypad_t dingux_joypad;
|
||||||
static bool sdl_dingux_rumble_init(dingux_joypad_rumble_t *rumble)
|
static bool sdl_dingux_rumble_init(dingux_joypad_rumble_t *rumble)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
unsigned rumble_gain = settings ? settings->uints.input_dingux_rumble_gain : 0;
|
unsigned rumble_gain = settings ? settings->uints.input_rumble_gain
|
||||||
|
: DEFAULT_RUMBLE_GAIN;
|
||||||
bool weak_uploaded = false;
|
bool weak_uploaded = false;
|
||||||
bool strong_uploaded = false;
|
bool strong_uploaded = false;
|
||||||
|
|
||||||
/* If gain is zero, rumble is disabled
|
|
||||||
* > No need to initialise device */
|
|
||||||
if (rumble_gain == 0)
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
if (Shake_NumOfDevices() < 1)
|
if (Shake_NumOfDevices() < 1)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
@ -163,8 +160,7 @@ static bool sdl_dingux_rumble_init(dingux_joypad_rumble_t *rumble)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
if (rumble_gain != 0)
|
RARCH_WARN("[libShake]: Input device does not support rumble effects.\n");
|
||||||
RARCH_WARN("[libShake]: Input device does not support rumble effects.\n");
|
|
||||||
|
|
||||||
if (rumble->device)
|
if (rumble->device)
|
||||||
{
|
{
|
||||||
|
@ -238,7 +234,8 @@ static bool sdl_dingux_joypad_set_rumble(unsigned pad,
|
||||||
{
|
{
|
||||||
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||||
|
|
||||||
if (!joypad->rumble.device)
|
if ((pad != 0) ||
|
||||||
|
!joypad->rumble.device)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
switch (effect)
|
switch (effect)
|
||||||
|
@ -257,6 +254,27 @@ static bool sdl_dingux_joypad_set_rumble(unsigned pad,
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool sdl_dingux_joypad_set_rumble_gain(unsigned pad, unsigned gain)
|
||||||
|
{
|
||||||
|
dingux_joypad_t *joypad = (dingux_joypad_t*)&dingux_joypad;
|
||||||
|
|
||||||
|
if ((pad != 0) ||
|
||||||
|
!joypad->rumble.device)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
/* Gain is automatically capped by Shake_SetGain(),
|
||||||
|
* but do it explicitly here for clarity */
|
||||||
|
if (gain > 100)
|
||||||
|
gain = 100;
|
||||||
|
|
||||||
|
/* Set gain */
|
||||||
|
if (Shake_QueryGainSupport(joypad->rumble.device))
|
||||||
|
if (Shake_SetGain(joypad->rumble.device, (int)gain) == SHAKE_OK)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const char *sdl_dingux_joypad_name(unsigned port)
|
static const char *sdl_dingux_joypad_name(unsigned port)
|
||||||
|
@ -727,8 +745,10 @@ input_device_driver_t sdl_dingux_joypad = {
|
||||||
sdl_dingux_joypad_poll,
|
sdl_dingux_joypad_poll,
|
||||||
#if defined(HAVE_LIBSHAKE)
|
#if defined(HAVE_LIBSHAKE)
|
||||||
sdl_dingux_joypad_set_rumble,
|
sdl_dingux_joypad_set_rumble,
|
||||||
|
sdl_dingux_joypad_set_rumble_gain,
|
||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
sdl_dingux_joypad_name,
|
sdl_dingux_joypad_name,
|
||||||
"sdl_dingux",
|
"sdl_dingux",
|
||||||
|
|
|
@ -535,6 +535,7 @@ input_device_driver_t sdl_joypad = {
|
||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
|
NULL,
|
||||||
sdl_joypad_name,
|
sdl_joypad_name,
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
"sdl2",
|
"sdl2",
|
||||||
|
|
|
@ -456,6 +456,7 @@ input_device_driver_t switch_joypad = {
|
||||||
#else
|
#else
|
||||||
NULL, /* set_rumble */
|
NULL, /* set_rumble */
|
||||||
#endif
|
#endif
|
||||||
|
NULL,
|
||||||
switch_joypad_name,
|
switch_joypad_name,
|
||||||
"switch"
|
"switch"
|
||||||
};
|
};
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
|
|
||||||
#include "../input_driver.h"
|
#include "../input_driver.h"
|
||||||
|
|
||||||
|
#include "../../configuration.h"
|
||||||
|
#include "../../config.def.h"
|
||||||
|
|
||||||
#include "../../tasks/tasks_internal.h"
|
#include "../../tasks/tasks_internal.h"
|
||||||
|
|
||||||
#include "../../verbosity.h"
|
#include "../../verbosity.h"
|
||||||
|
@ -81,6 +84,7 @@ struct udev_joypad
|
||||||
uint8_t axes_bind[ABS_MAX];
|
uint8_t axes_bind[ABS_MAX];
|
||||||
uint16_t strength[2];
|
uint16_t strength[2];
|
||||||
uint16_t configured_strength[2];
|
uint16_t configured_strength[2];
|
||||||
|
unsigned rumble_gain;
|
||||||
|
|
||||||
char ident[255];
|
char ident[255];
|
||||||
bool has_set_ff[2];
|
bool has_set_ff[2];
|
||||||
|
@ -147,6 +151,35 @@ error:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool udev_set_rumble_gain(unsigned i, unsigned gain)
|
||||||
|
{
|
||||||
|
struct input_event ie;
|
||||||
|
struct udev_joypad *pad = (struct udev_joypad*)&udev_pads[i];
|
||||||
|
|
||||||
|
/* Does not support > 100 gains */
|
||||||
|
if ((pad->fd < 0) ||
|
||||||
|
(gain > 100))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (pad->rumble_gain == gain)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
memset(&ie, 0, sizeof(ie));
|
||||||
|
ie.type = EV_FF;
|
||||||
|
ie.code = FF_GAIN;
|
||||||
|
ie.value = 0xFFFF * (gain/100.0);
|
||||||
|
|
||||||
|
if (write(pad->fd, &ie, sizeof(ie)) < (ssize_t)sizeof(ie))
|
||||||
|
{
|
||||||
|
RARCH_ERR("[udev]: Failed to set rumble gain on pad #%u.\n", i);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
pad->rumble_gain = gain;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -266,6 +299,15 @@ static int udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
||||||
p, path, pad->num_effects);
|
p, path, pad->num_effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set rumble gain here, if supported */
|
||||||
|
if (test_bit(FF_RUMBLE, ffbit))
|
||||||
|
{
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
|
unsigned rumble_gain = settings ? settings->uints.input_rumble_gain
|
||||||
|
: DEFAULT_RUMBLE_GAIN;
|
||||||
|
udev_set_rumble_gain(p, rumble_gain);
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -748,6 +790,7 @@ input_device_driver_t udev_joypad = {
|
||||||
udev_joypad_axis,
|
udev_joypad_axis,
|
||||||
udev_joypad_poll,
|
udev_joypad_poll,
|
||||||
udev_set_rumble,
|
udev_set_rumble,
|
||||||
|
udev_set_rumble_gain,
|
||||||
udev_joypad_name,
|
udev_joypad_name,
|
||||||
"udev",
|
"udev",
|
||||||
};
|
};
|
||||||
|
|
|
@ -130,6 +130,7 @@ input_device_driver_t hidpad_driver =
|
||||||
hidpad_axis,
|
hidpad_axis,
|
||||||
hidpad_poll,
|
hidpad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
hidpad_name,
|
hidpad_name,
|
||||||
"hid"
|
"hid"
|
||||||
};
|
};
|
||||||
|
|
|
@ -299,6 +299,7 @@ input_device_driver_t kpad_driver =
|
||||||
kpad_axis,
|
kpad_axis,
|
||||||
kpad_poll,
|
kpad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
kpad_name,
|
kpad_name,
|
||||||
"wiimote",
|
"wiimote",
|
||||||
};
|
};
|
||||||
|
|
|
@ -370,6 +370,7 @@ input_device_driver_t wpad_driver =
|
||||||
wpad_axis,
|
wpad_axis,
|
||||||
wpad_poll,
|
wpad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
wpad_name,
|
wpad_name,
|
||||||
"gamepad",
|
"gamepad",
|
||||||
};
|
};
|
||||||
|
|
|
@ -153,6 +153,7 @@ input_device_driver_t wiiu_joypad =
|
||||||
wiiu_joypad_axis,
|
wiiu_joypad_axis,
|
||||||
wiiu_joypad_poll,
|
wiiu_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
wiiu_joypad_name,
|
wiiu_joypad_name,
|
||||||
"wiiu",
|
"wiiu",
|
||||||
};
|
};
|
||||||
|
|
|
@ -325,6 +325,7 @@ input_device_driver_t xdk_joypad = {
|
||||||
xdk_joypad_axis,
|
xdk_joypad_axis,
|
||||||
xdk_joypad_poll,
|
xdk_joypad_poll,
|
||||||
NULL,
|
NULL,
|
||||||
|
NULL,
|
||||||
xdk_joypad_name,
|
xdk_joypad_name,
|
||||||
"xdk",
|
"xdk",
|
||||||
};
|
};
|
||||||
|
|
|
@ -695,6 +695,7 @@ input_device_driver_t xinput_joypad = {
|
||||||
xinput_joypad_axis,
|
xinput_joypad_axis,
|
||||||
xinput_joypad_poll,
|
xinput_joypad_poll,
|
||||||
xinput_joypad_rumble,
|
xinput_joypad_rumble,
|
||||||
|
NULL,
|
||||||
xinput_joypad_name,
|
xinput_joypad_name,
|
||||||
"xinput",
|
"xinput",
|
||||||
};
|
};
|
||||||
|
|
|
@ -395,6 +395,7 @@ input_device_driver_t xinput_joypad = {
|
||||||
xinput_joypad_axis,
|
xinput_joypad_axis,
|
||||||
xinput_joypad_poll,
|
xinput_joypad_poll,
|
||||||
xinput_joypad_rumble,
|
xinput_joypad_rumble,
|
||||||
|
NULL,
|
||||||
xinput_joypad_name,
|
xinput_joypad_name,
|
||||||
"xinput",
|
"xinput",
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,7 +78,8 @@ static input_device_driver_t null_joypad = {
|
||||||
NULL, /* get_buttons */
|
NULL, /* get_buttons */
|
||||||
NULL, /* axis */
|
NULL, /* axis */
|
||||||
NULL, /* poll */
|
NULL, /* poll */
|
||||||
NULL,
|
NULL, /* rumble */
|
||||||
|
NULL, /* rumble_gain */
|
||||||
NULL, /* name */
|
NULL, /* name */
|
||||||
"null",
|
"null",
|
||||||
};
|
};
|
||||||
|
@ -326,6 +327,25 @@ bool input_driver_set_rumble(
|
||||||
|
|
||||||
/**************************************/
|
/**************************************/
|
||||||
|
|
||||||
|
bool input_driver_set_rumble_gain(
|
||||||
|
input_driver_state_t *driver_state, unsigned gain,
|
||||||
|
unsigned input_max_users)
|
||||||
|
{
|
||||||
|
unsigned i;
|
||||||
|
|
||||||
|
if (driver_state->primary_joypad
|
||||||
|
&& driver_state->primary_joypad->set_rumble_gain)
|
||||||
|
{
|
||||||
|
for (i = 0; i < input_max_users; i++)
|
||||||
|
driver_state->primary_joypad->set_rumble_gain(i, gain);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**************************************/
|
||||||
|
|
||||||
bool input_driver_set_sensor(
|
bool input_driver_set_sensor(
|
||||||
input_driver_state_t *driver_state, unsigned port, bool sensors_enable,
|
input_driver_state_t *driver_state, unsigned port, bool sensors_enable,
|
||||||
enum retro_sensor_action action, unsigned rate)
|
enum retro_sensor_action action, unsigned rate)
|
||||||
|
|
|
@ -340,6 +340,7 @@ struct rarch_joypad_driver
|
||||||
int16_t (*axis)(unsigned, uint32_t);
|
int16_t (*axis)(unsigned, uint32_t);
|
||||||
void (*poll)(void);
|
void (*poll)(void);
|
||||||
bool (*set_rumble)(unsigned, enum retro_rumble_effect, uint16_t);
|
bool (*set_rumble)(unsigned, enum retro_rumble_effect, uint16_t);
|
||||||
|
bool (*set_rumble_gain)(unsigned, unsigned);
|
||||||
const char *(*name)(unsigned);
|
const char *(*name)(unsigned);
|
||||||
|
|
||||||
const char *ident;
|
const char *ident;
|
||||||
|
@ -381,6 +382,18 @@ const char* config_get_input_driver_options(void);
|
||||||
bool input_driver_set_rumble(
|
bool input_driver_set_rumble(
|
||||||
input_driver_state_t *driver_state, unsigned port, unsigned joy_idx,
|
input_driver_state_t *driver_state, unsigned port, unsigned joy_idx,
|
||||||
enum retro_rumble_effect effect, uint16_t strength);
|
enum retro_rumble_effect effect, uint16_t strength);
|
||||||
|
/**
|
||||||
|
* Sets the rumble gain.
|
||||||
|
*
|
||||||
|
* @param driver_state
|
||||||
|
* @param gain Rumble gain, 0-100 [%]
|
||||||
|
* @param input_max_users
|
||||||
|
*
|
||||||
|
* @return true if the rumble gain has been successfully set
|
||||||
|
**/
|
||||||
|
bool input_driver_set_rumble_gain(
|
||||||
|
input_driver_state_t *driver_state, unsigned gain,
|
||||||
|
unsigned input_max_users);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets the sensor state.
|
* Sets the sensor state.
|
||||||
|
|
|
@ -2018,8 +2018,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"تمكين اهتزاز الجهاز (للنواة المدعومة)"
|
"تمكين اهتزاز الجهاز (للنواة المدعومة)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -902,8 +902,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2230,16 +2230,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"启用设备振动 (对支持的核心)"
|
"启用设备振动 (对支持的核心)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"振动强度 (需要重启)"
|
"振动强度 (需要重启)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"指定触觉反馈效果的强弱。"
|
"指定触觉反馈效果的强弱。"
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1822,8 +1822,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"啟用設備振動(對於支援的內核)"
|
"啟用設備振動(對於支援的內核)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1114,8 +1114,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1098,8 +1098,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -162,8 +162,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2190,16 +2190,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Vibration aktivieren (für unterstützte Cores)"
|
"Vibration aktivieren (für unterstützte Cores)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Vibrationsstärke (Neustart erforderlich)"
|
"Vibrationsstärke (Neustart erforderlich)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Die Größenordnung der haptischen Feedback-Effekte angeben."
|
"Die Größenordnung der haptischen Feedback-Effekte angeben."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1838,8 +1838,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Ενεργοποίηση Δόνησης Συσκευής (Για Υποστηριζόμενους Πυρήνες)"
|
"Ενεργοποίηση Δόνησης Συσκευής (Για Υποστηριζόμενους Πυρήνες)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -438,8 +438,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2290,16 +2290,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Activar vibración de dispositivo (en núcleos compatibles)"
|
"Activar vibración de dispositivo (en núcleos compatibles)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Intensidad de vibración (es necesario reiniciar)"
|
"Intensidad de vibración (es necesario reiniciar)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Especifica la fuerza de los efectos de respuesta háptica."
|
"Especifica la fuerza de los efectos de respuesta háptica."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -382,8 +382,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2246,16 +2246,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Ota laitteen värinä käyttöön (tuetuille ytimille)"
|
"Ota laitteen värinä käyttöön (tuetuille ytimille)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Tärinän voimakkuus (Uudelleenkäynnistys vaaditaan)"
|
"Tärinän voimakkuus (Uudelleenkäynnistys vaaditaan)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Määritä haptisen palautteen voimakkuus."
|
"Määritä haptisen palautteen voimakkuus."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2278,16 +2278,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Activer la vibration du périphérique (pour les cœurs pris en charge)"
|
"Activer la vibration du périphérique (pour les cœurs pris en charge)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Force de la vibration (Redémarrage requis)"
|
"Force de la vibration (Redémarrage requis)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Spécifier l'ampleur des effets de retour haptique."
|
"Spécifier l'ampleur des effets de retour haptique."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1090,8 +1090,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -490,8 +490,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -370,8 +370,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2022,16 +2022,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Aktifkan Getaran Perangkat (Untuk Core yang Didukung)"
|
"Aktifkan Getaran Perangkat (Untuk Core yang Didukung)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Kekuatan Getaran (Diperlukan Restart)"
|
"Kekuatan Getaran (Diperlukan Restart)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Tentukan besarnya efek umpan balik haptic."
|
"Tentukan besarnya efek umpan balik haptic."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2266,16 +2266,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Abilita Vibrazione Dispositivo (Per i Core Supportati)"
|
"Abilita Vibrazione Dispositivo (Per i Core Supportati)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Forza Vibrazione (Richiesta)"
|
"Forza Vibrazione (Richiesta)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Specifica l'entità degli effetti di feedback tattili."
|
"Specifica l'entità degli effetti di feedback tattili."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2182,16 +2182,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"(対応コアで)デバイスの振動を有効"
|
"(対応コアで)デバイスの振動を有効"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"振動の強さ (再起動が必要)"
|
"振動の強さ (再起動が必要)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"触覚フィードバック効果の大きさを指定します."
|
"触覚フィードバック効果の大きさを指定します."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2318,16 +2318,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"장치 진동 사용 (지원 코어 한정)"
|
"장치 진동 사용 (지원 코어 한정)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"진동 세기 (재시작 필요)"
|
"진동 세기 (재시작 필요)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"햅틱 피드백으로 사용될 진동의 세기를 설정합니다."
|
"햅틱 피드백으로 사용될 진동의 세기를 설정합니다."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -5038,12 +5038,10 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
MENU_ENUM_LABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
||||||
"input_haptic_feedback_settings"
|
"input_haptic_feedback_settings"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN,
|
||||||
"input_dingux_rumble_gain"
|
"input_rumble_gain"
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_INPUT_TURBO_MODE,
|
MENU_ENUM_LABEL_INPUT_TURBO_MODE,
|
||||||
"input_turbo_mode"
|
"input_turbo_mode"
|
||||||
|
|
|
@ -1798,8 +1798,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Toestel trillen inschakelen (voor ondersteunde Cores)"
|
"Toestel trillen inschakelen (voor ondersteunde Cores)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -250,8 +250,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2214,16 +2214,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Włącz wibracje urządzenia (dla obsługiwanych rdzeni)"
|
"Włącz wibracje urządzenia (dla obsługiwanych rdzeni)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Siła wibracji (wymagany restart)"
|
"Siła wibracji (wymagany restart)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Określ skalę efektów wibracji."
|
"Określ skalę efektów wibracji."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2254,16 +2254,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Ativar vibração do dispositivo (para núcleos suportados)"
|
"Ativar vibração do dispositivo (para núcleos suportados)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Força da vibração (requer reinício)"
|
"Força da vibração (requer reinício)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Determine a magnitude dos efeitos do retorno táctil."
|
"Determine a magnitude dos efeitos do retorno táctil."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1730,8 +1730,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2310,16 +2310,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Вибрация устройством (если поддерживается ядром)"
|
"Вибрация устройством (если поддерживается ядром)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Сила виброотдачи (требуется перезапуск)"
|
"Сила виброотдачи (требуется перезапуск)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Настройка интенсивности эффекта тактильной отдачи."
|
"Настройка интенсивности эффекта тактильной отдачи."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1774,8 +1774,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -1782,8 +1782,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Aktivera enheters vibration (för kärnor som stödjer det)"
|
"Aktivera enheters vibration (för kärnor som stödjer det)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2286,16 +2286,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Cihaz Titreşimini Etkinleştir (Desteklenen Çekirdekler İçin)"
|
"Cihaz Titreşimini Etkinleştir (Desteklenen Çekirdekler İçin)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Titreşim Gücü (Yeniden Başlatılmalı)"
|
"Titreşim Gücü (Yeniden Başlatılmalı)"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Dokunsal geri bildirim efektlerinin büyüklüğünü belirtir."
|
"Dokunsal geri bildirim efektlerinin büyüklüğünü belirtir."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2222,8 +2222,6 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_VIBRATE_ON_KEYPRESS,
|
MENU_ENUM_LABEL_VALUE_VIBRATE_ON_KEYPRESS,
|
||||||
"Вібрувати при натисканні клавіші"
|
"Вібрувати при натисканні клавіші"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -2362,16 +2362,14 @@ MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
MENU_ENUM_LABEL_VALUE_ENABLE_DEVICE_VIBRATION,
|
||||||
"Enable Device Vibration (For Supported Cores)"
|
"Enable Device Vibration (For Supported Cores)"
|
||||||
)
|
)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
"Vibration Strength (Restart Required)"
|
"Vibration Strength"
|
||||||
)
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN,
|
||||||
"Specify the magnitude of haptic feedback effects."
|
"Specify the magnitude of haptic feedback effects."
|
||||||
)
|
)
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -634,8 +634,6 @@ MSG_HASH(
|
||||||
|
|
||||||
/* Settings > Input > Haptic Feedback/Vibration */
|
/* Settings > Input > Haptic Feedback/Vibration */
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Settings > Input > Menu Controls */
|
/* Settings > Input > Menu Controls */
|
||||||
|
|
||||||
|
|
|
@ -359,9 +359,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_turbo_period, MENU_
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_duty_cycle, MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_duty_cycle, MENU_ENUM_SUBLABEL_INPUT_DUTY_CYCLE)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_turbo_mode, MENU_ENUM_SUBLABEL_INPUT_TURBO_MODE)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_turbo_mode, MENU_ENUM_SUBLABEL_INPUT_TURBO_MODE)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_turbo_default_button, MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_turbo_default_button, MENU_ENUM_SUBLABEL_INPUT_TURBO_DEFAULT_BUTTON)
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_rumble_gain, MENU_ENUM_SUBLABEL_INPUT_RUMBLE_GAIN)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_input_dingux_rumble_gain, MENU_ENUM_SUBLABEL_INPUT_DINGUX_RUMBLE_GAIN)
|
|
||||||
#endif
|
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_vertical_sync, MENU_ENUM_SUBLABEL_VIDEO_VSYNC)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_vertical_sync, MENU_ENUM_SUBLABEL_VIDEO_VSYNC)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_adaptive_vsync, MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_video_adaptive_vsync, MENU_ENUM_SUBLABEL_VIDEO_ADAPTIVE_VSYNC)
|
||||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_allow_rotate, MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE)
|
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_allow_rotate, MENU_ENUM_SUBLABEL_VIDEO_ALLOW_ROTATE)
|
||||||
|
@ -3599,11 +3597,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||||
case MENU_ENUM_LABEL_INPUT_TURBO_DEFAULT_BUTTON:
|
case MENU_ENUM_LABEL_INPUT_TURBO_DEFAULT_BUTTON:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_turbo_default_button);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_turbo_default_button);
|
||||||
break;
|
break;
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
case MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN:
|
||||||
case MENU_ENUM_LABEL_INPUT_DINGUX_RUMBLE_GAIN:
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_rumble_gain);
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_dingux_rumble_gain);
|
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT:
|
case MENU_ENUM_LABEL_INPUT_BIND_TIMEOUT:
|
||||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_bind_timeout);
|
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_input_bind_timeout);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -5593,14 +5593,10 @@ unsigned menu_displaylist_build_list(
|
||||||
PARSE_ONLY_BOOL, false) == 0)
|
PARSE_ONLY_BOOL, false) == 0)
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN,
|
||||||
if (string_is_equal(joypad_driver_id, "sdl_dingux"))
|
PARSE_ONLY_UINT, false) == 0)
|
||||||
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(list,
|
|
||||||
MENU_ENUM_LABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
|
||||||
PARSE_ONLY_UINT, false) == 0)
|
|
||||||
count++;
|
count++;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
case DISPLAYLIST_INPUT_HOTKEY_BINDS_LIST:
|
||||||
|
|
|
@ -8139,6 +8139,12 @@ static void general_write_handler(rarch_setting_t *setting)
|
||||||
*setting->value.target.unsigned_integer);
|
*setting->value.target.unsigned_integer);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN:
|
||||||
|
{
|
||||||
|
input_set_rumble_gain(
|
||||||
|
*setting->value.target.unsigned_integer);
|
||||||
|
}
|
||||||
|
break;
|
||||||
case MENU_ENUM_LABEL_WIFI_ENABLED:
|
case MENU_ENUM_LABEL_WIFI_ENABLED:
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
if (*setting->value.target.boolean)
|
if (*setting->value.target.boolean)
|
||||||
|
@ -12918,13 +12924,12 @@ static bool setting_append_list(
|
||||||
SD_FLAG_NONE
|
SD_FLAG_NONE
|
||||||
);
|
);
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
CONFIG_UINT(
|
CONFIG_UINT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->uints.input_dingux_rumble_gain,
|
&settings->uints.input_rumble_gain,
|
||||||
MENU_ENUM_LABEL_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN,
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_DINGUX_RUMBLE_GAIN,
|
MENU_ENUM_LABEL_VALUE_INPUT_RUMBLE_GAIN,
|
||||||
DEFAULT_DINGUX_RUMBLE_GAIN,
|
DEFAULT_RUMBLE_GAIN,
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
parent_group,
|
parent_group,
|
||||||
|
@ -12932,8 +12937,9 @@ static bool setting_append_list(
|
||||||
general_read_handler);
|
general_read_handler);
|
||||||
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
|
||||||
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint_special;
|
||||||
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
|
&setting_get_string_representation_percentage;
|
||||||
menu_settings_list_current_add_range(list, list_info, 0, 100, 5, true, true);
|
menu_settings_list_current_add_range(list, list_info, 0, 100, 5, true, true);
|
||||||
#endif
|
|
||||||
CONFIG_UINT(
|
CONFIG_UINT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->uints.input_poll_type_behavior,
|
&settings->uints.input_poll_type_behavior,
|
||||||
|
@ -13337,17 +13343,13 @@ static bool setting_append_list(
|
||||||
menu_settings_list_current_add_range(list, list_info, 1, 10, 1, true, true);
|
menu_settings_list_current_add_range(list, list_info, 1, 10, 1, true, true);
|
||||||
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
|
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_ADVANCED);
|
||||||
|
|
||||||
if (string_is_equal(settings->arrays.input_driver, "android") ||
|
CONFIG_ACTION(
|
||||||
string_is_equal(settings->arrays.input_joypad_driver, "sdl_dingux"))
|
list, list_info,
|
||||||
{
|
MENU_ENUM_LABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
||||||
CONFIG_ACTION(
|
MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
||||||
list, list_info,
|
&group_info,
|
||||||
MENU_ENUM_LABEL_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
&subgroup_info,
|
||||||
MENU_ENUM_LABEL_VALUE_INPUT_HAPTIC_FEEDBACK_SETTINGS,
|
parent_group);
|
||||||
&group_info,
|
|
||||||
&subgroup_info,
|
|
||||||
parent_group);
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG_ACTION(
|
CONFIG_ACTION(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
|
|
|
@ -1009,6 +1009,7 @@ enum msg_hash_enums
|
||||||
MENU_LABEL(INPUT_ALL_USERS_CONTROL_MENU),
|
MENU_LABEL(INPUT_ALL_USERS_CONTROL_MENU),
|
||||||
MENU_LABEL(INPUT_POLL_TYPE_BEHAVIOR),
|
MENU_LABEL(INPUT_POLL_TYPE_BEHAVIOR),
|
||||||
MENU_LABEL(INPUT_UNIFIED_MENU_CONTROLS),
|
MENU_LABEL(INPUT_UNIFIED_MENU_CONTROLS),
|
||||||
|
MENU_LABEL(INPUT_RUMBLE_GAIN),
|
||||||
|
|
||||||
MENU_LABEL(QUIT_PRESS_TWICE),
|
MENU_LABEL(QUIT_PRESS_TWICE),
|
||||||
MENU_LABEL(QUIT_ON_CLOSE_CONTENT),
|
MENU_LABEL(QUIT_ON_CLOSE_CONTENT),
|
||||||
|
@ -1017,10 +1018,6 @@ enum msg_hash_enums
|
||||||
MENU_ENUM_LABEL_VALUE_QUIT_ON_CLOSE_CONTENT_ENABLED,
|
MENU_ENUM_LABEL_VALUE_QUIT_ON_CLOSE_CONTENT_ENABLED,
|
||||||
MENU_ENUM_LABEL_VALUE_QUIT_ON_CLOSE_CONTENT_CLI,
|
MENU_ENUM_LABEL_VALUE_QUIT_ON_CLOSE_CONTENT_CLI,
|
||||||
|
|
||||||
#if defined(DINGUX) && defined(HAVE_LIBSHAKE)
|
|
||||||
MENU_LABEL(INPUT_DINGUX_RUMBLE_GAIN),
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Video */
|
/* Video */
|
||||||
MENU_LABEL(BRIGHTNESS_CONTROL),
|
MENU_LABEL(BRIGHTNESS_CONTROL),
|
||||||
MENU_LABEL(CRT_SWITCH_RESOLUTION),
|
MENU_LABEL(CRT_SWITCH_RESOLUTION),
|
||||||
|
|
27
retroarch.c
27
retroarch.c
|
@ -19196,10 +19196,35 @@ bool input_set_rumble_state(unsigned port,
|
||||||
input_driver_state_t *input_driver_st = &(p_rarch->input_driver_state);
|
input_driver_state_t *input_driver_st = &(p_rarch->input_driver_state);
|
||||||
settings_t *settings = p_rarch->configuration_settings;
|
settings_t *settings = p_rarch->configuration_settings;
|
||||||
unsigned joy_idx = settings->uints.input_joypad_index[port];
|
unsigned joy_idx = settings->uints.input_joypad_index[port];
|
||||||
|
unsigned rumble_gain = settings->uints.input_rumble_gain;
|
||||||
|
uint16_t scaled_strength = strength;
|
||||||
|
|
||||||
|
/* If gain setting is not suported, do software gain control */
|
||||||
|
if (!input_driver_st->primary_joypad->set_rumble_gain)
|
||||||
|
scaled_strength = (rumble_gain * strength) / 100.0;
|
||||||
|
|
||||||
return input_driver_set_rumble(
|
return input_driver_set_rumble(
|
||||||
input_driver_st,
|
input_driver_st,
|
||||||
port, joy_idx, effect, strength);
|
port, joy_idx, effect, scaled_strength);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the rumble gain. Used by MENU_ENUM_LABEL_INPUT_RUMBLE_GAIN.
|
||||||
|
*
|
||||||
|
* @param gain Rumble gain, 0-100 [%]
|
||||||
|
*
|
||||||
|
* @return true if the rumble gain has been successfully set
|
||||||
|
**/
|
||||||
|
bool input_set_rumble_gain(unsigned gain)
|
||||||
|
{
|
||||||
|
struct rarch_state *p_rarch = &rarch_st;
|
||||||
|
input_driver_state_t *input_driver_st = &(p_rarch->input_driver_state);
|
||||||
|
settings_t *settings = p_rarch->configuration_settings;
|
||||||
|
if (input_driver_set_rumble_gain(
|
||||||
|
input_driver_st, gain, settings->uints.input_max_users))
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2046,6 +2046,8 @@ void retroarch_init_task_queue(void);
|
||||||
bool input_set_rumble_state(unsigned port,
|
bool input_set_rumble_state(unsigned port,
|
||||||
enum retro_rumble_effect effect, uint16_t strength);
|
enum retro_rumble_effect effect, uint16_t strength);
|
||||||
|
|
||||||
|
bool input_set_rumble_gain(unsigned gain);
|
||||||
|
|
||||||
float input_get_sensor_state(unsigned port, unsigned id);
|
float input_get_sensor_state(unsigned port, unsigned id);
|
||||||
|
|
||||||
bool input_set_sensor_state(unsigned port,
|
bool input_set_sensor_state(unsigned port,
|
||||||
|
|
Loading…
Add table
Reference in a new issue