mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-04 17:39:53 +00:00
(Xenon) Avoid some naming conflicts
This commit is contained in:
parent
66ab67fa23
commit
354387b46b
@ -114,7 +114,7 @@ static inline bool input_key_pressed_func(int key)
|
||||
#define MAKENAME_VIDEO(A) CONCAT2(xdk_d3d, A)
|
||||
|
||||
#elif defined(XENON) /* XENON */
|
||||
#define MAKENAME_VIDEO(A) CONCAT2(xenon360, A)
|
||||
#define MAKENAME_VIDEO(A) CONCAT2(xenon360_gfx, A)
|
||||
|
||||
#define video_set_aspect_ratio_func(aspectratio_idx) gfx_ctx_set_aspect_ratio(driver.video_data, aspectratio_idx)
|
||||
|
||||
|
@ -30,7 +30,7 @@ typedef struct
|
||||
bool nonblock;
|
||||
} xenon_audio_t;
|
||||
|
||||
static void *xenon360_init(const char *device, unsigned rate, unsigned latency)
|
||||
static void *xenon360_audio_init(const char *device, unsigned rate, unsigned latency)
|
||||
{
|
||||
static bool inited = false;
|
||||
if (!inited)
|
||||
@ -48,7 +48,7 @@ static inline uint32_t bswap_32(uint32_t val)
|
||||
return (val >> 24) | (val << 24) | ((val >> 8) & 0xff00) | ((val << 8) & 0xff0000);
|
||||
}
|
||||
|
||||
static ssize_t xenon360_write(void *data, const void *buf, size_t size)
|
||||
static ssize_t xenon360_audio_write(void *data, const void *buf, size_t size)
|
||||
{
|
||||
xenon_audio_t *xa = data;
|
||||
|
||||
@ -81,37 +81,37 @@ static ssize_t xenon360_write(void *data, const void *buf, size_t size)
|
||||
return written;
|
||||
}
|
||||
|
||||
static bool xenon360_stop(void *data)
|
||||
static bool xenon360_audio_stop(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xenon360_set_nonblock_state(void *data, bool state)
|
||||
static void xenon360_audio_set_nonblock_state(void *data, bool state)
|
||||
{
|
||||
xenon_audio_t *xa = data;
|
||||
xa->nonblock = state;
|
||||
}
|
||||
|
||||
static bool xenon360_start(void *data)
|
||||
static bool xenon360_audio_start(void *data)
|
||||
{
|
||||
(void)data;
|
||||
return true;
|
||||
}
|
||||
|
||||
static void xenon360_free(void *data)
|
||||
static void xenon360_audio_free(void *data)
|
||||
{
|
||||
if (data)
|
||||
free(data);
|
||||
}
|
||||
|
||||
const audio_driver_t audio_xenon360 = {
|
||||
.init = xenon360_init,
|
||||
.write = xenon360_write,
|
||||
.stop = xenon360_stop,
|
||||
.start = xenon360_start,
|
||||
.set_nonblock_state = xenon360_set_nonblock_state,
|
||||
.free = xenon360_free,
|
||||
.init = xenon360_audio_init,
|
||||
.write = xenon360_audio_write,
|
||||
.stop = xenon360_audio_stop,
|
||||
.start = xenon360_audio_start,
|
||||
.set_nonblock_state = xenon360_audio_set_nonblock_state,
|
||||
.free = xenon360_audio_free,
|
||||
.ident = "xenon360"
|
||||
};
|
||||
|
||||
|
@ -87,10 +87,9 @@ static void* xenon360_input_init(void)
|
||||
return (void*)-1;
|
||||
}
|
||||
|
||||
static bool xenon360_key_pressed(void *data, int key)
|
||||
static bool xenon360_input_key_pressed(void *data, int key)
|
||||
{
|
||||
(void)data;
|
||||
return false;
|
||||
return (g_extern.lifecycle_state & (1ULL << key));
|
||||
}
|
||||
|
||||
static void xenon360_input_set_default_keybind_lut(unsigned device, unsigned port)
|
||||
@ -106,14 +105,21 @@ static void xenon360_input_set_analog_dpad_mapping(unsigned device, unsigned map
|
||||
(void)controller_id;
|
||||
}
|
||||
|
||||
static void xenon360_input_post_init(void)
|
||||
{
|
||||
for(unsigned i = 0; i < MAX_PADS; i++)
|
||||
xenon360_input_set_analog_dpad_mapping(0, g_settings.input.dpad_emulation[i], i);
|
||||
}
|
||||
|
||||
const input_driver_t input_xenon360 = {
|
||||
.init = xenon360_input_init,
|
||||
.poll = xenon360_input_poll,
|
||||
.input_state = xenon360_input_state,
|
||||
.key_pressed = xenon360_key_pressed,
|
||||
.key_pressed = xenon360_input_key_pressed,
|
||||
.free = xenon360_input_free_input,
|
||||
.set_default_keybind_lut = xenon360_input_set_default_keybind_lut,
|
||||
.set_analog_dpad_mapping = xenon360_input_set_analog_dpad_mapping,
|
||||
.post_init = xenon360_input_post_init,
|
||||
.max_pads = MAX_PADS,
|
||||
.ident = "xenon360",
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user