mirror of
https://github.com/libretro/RetroArch
synced 2025-04-11 00:44:20 +00:00
No more usage of settings_t inside input_overlay.c
This commit is contained in:
parent
36a6abede7
commit
92ca53db01
@ -288,7 +288,8 @@ void input_poll(void)
|
|||||||
|
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
if (overlay_ptr && input_overlay_is_alive(overlay_ptr))
|
if (overlay_ptr && input_overlay_is_alive(overlay_ptr))
|
||||||
input_poll_overlay(overlay_ptr, settings->input.overlay_opacity);
|
input_poll_overlay(overlay_ptr, settings->input.overlay_opacity,
|
||||||
|
settings->input.analog_dpad_mode[0], settings->input.axis_threshold);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_COMMAND
|
#ifdef HAVE_COMMAND
|
||||||
|
@ -36,7 +36,6 @@
|
|||||||
#include "../menu/menu_driver.h"
|
#include "../menu/menu_driver.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "../configuration.h"
|
|
||||||
#include "../verbosity.h"
|
#include "../verbosity.h"
|
||||||
|
|
||||||
#include "input_overlay.h"
|
#include "input_overlay.h"
|
||||||
@ -574,13 +573,13 @@ bool input_overlay_key_pressed(input_overlay_t *ol, int key)
|
|||||||
*
|
*
|
||||||
* Poll pressed buttons/keys on currently active overlay.
|
* Poll pressed buttons/keys on currently active overlay.
|
||||||
**/
|
**/
|
||||||
void input_poll_overlay(input_overlay_t *ol, float opacity)
|
void input_poll_overlay(input_overlay_t *ol, float opacity, unsigned analog_dpad_mode,
|
||||||
|
float axis_threshold)
|
||||||
{
|
{
|
||||||
input_overlay_state_t old_key_state;
|
input_overlay_state_t old_key_state;
|
||||||
unsigned i, j, device;
|
unsigned i, j, device;
|
||||||
uint16_t key_mod = 0;
|
uint16_t key_mod = 0;
|
||||||
bool polled = false;
|
bool polled = false;
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
input_overlay_state_t *ol_state = &ol->overlay_state;
|
input_overlay_state_t *ol_state = &ol->overlay_state;
|
||||||
|
|
||||||
if (!ol_state)
|
if (!ol_state)
|
||||||
@ -673,16 +672,15 @@ void input_poll_overlay(input_overlay_t *ol, float opacity)
|
|||||||
|
|
||||||
/* Check for analog_dpad_mode.
|
/* Check for analog_dpad_mode.
|
||||||
* Map analogs to d-pad buttons when configured. */
|
* Map analogs to d-pad buttons when configured. */
|
||||||
switch (settings->input.analog_dpad_mode[0])
|
switch (analog_dpad_mode)
|
||||||
{
|
{
|
||||||
case ANALOG_DPAD_LSTICK:
|
case ANALOG_DPAD_LSTICK:
|
||||||
case ANALOG_DPAD_RSTICK:
|
case ANALOG_DPAD_RSTICK:
|
||||||
{
|
{
|
||||||
float analog_x, analog_y;
|
float analog_x, analog_y;
|
||||||
unsigned analog_base = 2;
|
unsigned analog_base = 2;
|
||||||
float axis_threshold = settings->input.axis_threshold;
|
|
||||||
|
|
||||||
if (settings->input.analog_dpad_mode[0] == ANALOG_DPAD_LSTICK)
|
if (analog_dpad_mode == ANALOG_DPAD_LSTICK)
|
||||||
analog_base = 0;
|
analog_base = 0;
|
||||||
|
|
||||||
analog_x = (float)ol_state->analog[analog_base + 0] / 0x7fff;
|
analog_x = (float)ol_state->analog[analog_base + 0] / 0x7fff;
|
||||||
|
@ -236,7 +236,8 @@ void input_overlay_next(input_overlay_t *ol, float opacity);
|
|||||||
*
|
*
|
||||||
* Poll pressed buttons/keys on currently active overlay.
|
* Poll pressed buttons/keys on currently active overlay.
|
||||||
**/
|
**/
|
||||||
void input_poll_overlay(input_overlay_t *ol, float opacity);
|
void input_poll_overlay(input_overlay_t *ol, float opacity, unsigned analog_dpad_mode,
|
||||||
|
float axis_threshold);
|
||||||
|
|
||||||
void input_state_overlay(input_overlay_t *ol,
|
void input_state_overlay(input_overlay_t *ol,
|
||||||
int16_t *ret, unsigned port, unsigned device, unsigned idx,
|
int16_t *ret, unsigned port, unsigned device, unsigned idx,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user