mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
Backport getting rid of video_context_driver_input_driver
This commit is contained in:
parent
deee393dfb
commit
85e5c783af
@ -3577,7 +3577,6 @@ static void *gl2_init(const video_info_t *video,
|
|||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
enum gfx_wrap_type wrap_type;
|
enum gfx_wrap_type wrap_type;
|
||||||
gfx_ctx_input_t inp;
|
|
||||||
unsigned full_x, full_y;
|
unsigned full_x, full_y;
|
||||||
video_shader_ctx_info_t shader_info;
|
video_shader_ctx_info_t shader_info;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
@ -3909,10 +3908,13 @@ static void *gl2_init(const video_info_t *video,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inp.input = input;
|
if (gl->ctx_driver->input_driver)
|
||||||
inp.input_data = input_data;
|
{
|
||||||
|
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||||
video_context_driver_input_driver(&inp);
|
gl->ctx_driver->input_driver(
|
||||||
|
gl->ctx_data, joypad_name,
|
||||||
|
input, input_data);
|
||||||
|
}
|
||||||
|
|
||||||
if (video->font_enable)
|
if (video->font_enable)
|
||||||
font_driver_init_osd(gl, video,
|
font_driver_init_osd(gl, video,
|
||||||
|
@ -218,7 +218,6 @@ static void *gl1_gfx_init(const video_info_t *video,
|
|||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
unsigned full_x, full_y;
|
unsigned full_x, full_y;
|
||||||
gfx_ctx_input_t inp;
|
|
||||||
void *ctx_data = NULL;
|
void *ctx_data = NULL;
|
||||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||||
unsigned mode_width = 0;
|
unsigned mode_width = 0;
|
||||||
@ -379,10 +378,13 @@ static void *gl1_gfx_init(const video_info_t *video,
|
|||||||
video_driver_set_gpu_api_version_string(version);
|
video_driver_set_gpu_api_version_string(version);
|
||||||
}
|
}
|
||||||
|
|
||||||
inp.input = input;
|
if (gl1->ctx_driver->input_driver)
|
||||||
inp.input_data = input_data;
|
{
|
||||||
|
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||||
video_context_driver_input_driver(&inp);
|
gl1->ctx_driver->input_driver(
|
||||||
|
gl1->ctx_data, joypad_name,
|
||||||
|
input, input_data);
|
||||||
|
}
|
||||||
|
|
||||||
if (video_font_enable)
|
if (video_font_enable)
|
||||||
font_driver_init_osd(gl1,
|
font_driver_init_osd(gl1,
|
||||||
|
@ -1152,7 +1152,6 @@ static void gl_core_set_viewport_wrapper(void *data,
|
|||||||
static void *gl_core_init(const video_info_t *video,
|
static void *gl_core_init(const video_info_t *video,
|
||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
gfx_ctx_input_t inp;
|
|
||||||
unsigned full_x, full_y;
|
unsigned full_x, full_y;
|
||||||
settings_t *settings = config_get_ptr();
|
settings_t *settings = config_get_ptr();
|
||||||
bool video_gpu_record = settings->bools.video_gpu_record;
|
bool video_gpu_record = settings->bools.video_gpu_record;
|
||||||
@ -1308,9 +1307,13 @@ static void *gl_core_init(const video_info_t *video,
|
|||||||
* the viewport sizes before we start running. */
|
* the viewport sizes before we start running. */
|
||||||
gl_core_set_viewport_wrapper(gl, temp_width, temp_height, false, true);
|
gl_core_set_viewport_wrapper(gl, temp_width, temp_height, false, true);
|
||||||
|
|
||||||
inp.input = input;
|
if (gl->ctx_driver->input_driver)
|
||||||
inp.input_data = input_data;
|
{
|
||||||
video_context_driver_input_driver(&inp);
|
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||||
|
gl->ctx_driver->input_driver(
|
||||||
|
gl->ctx_data, joypad_name,
|
||||||
|
input, input_data);
|
||||||
|
}
|
||||||
|
|
||||||
if (!gl_core_init_filter_chain(gl))
|
if (!gl_core_init_filter_chain(gl))
|
||||||
{
|
{
|
||||||
|
@ -108,7 +108,6 @@ static INLINE bool vg_query_extension(const char *ext)
|
|||||||
static void *vg_init(const video_info_t *video,
|
static void *vg_init(const video_info_t *video,
|
||||||
input_driver_t **input, void **input_data)
|
input_driver_t **input, void **input_data)
|
||||||
{
|
{
|
||||||
gfx_ctx_input_t inp;
|
|
||||||
unsigned win_width, win_height;
|
unsigned win_width, win_height;
|
||||||
VGfloat clearColor[4] = {0, 0, 0, 1};
|
VGfloat clearColor[4] = {0, 0, 0, 1};
|
||||||
int interval = 0;
|
int interval = 0;
|
||||||
@ -222,10 +221,13 @@ static void *vg_init(const video_info_t *video,
|
|||||||
: VG_IMAGE_QUALITY_NONANTIALIASED);
|
: VG_IMAGE_QUALITY_NONANTIALIASED);
|
||||||
vg_set_nonblock_state(vg, !video->vsync, adaptive_vsync_enabled, interval);
|
vg_set_nonblock_state(vg, !video->vsync, adaptive_vsync_enabled, interval);
|
||||||
|
|
||||||
inp.input = input;
|
if (vg->ctx_driver->input_driver)
|
||||||
inp.input_data = input_data;
|
{
|
||||||
|
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||||
video_context_driver_input_driver(&inp);
|
vg->ctx_driver->input_driver(
|
||||||
|
vg->ctx_data, joypad_name,
|
||||||
|
input, input_data);
|
||||||
|
}
|
||||||
|
|
||||||
if ( video->font_enable
|
if ( video->font_enable
|
||||||
&& font_renderer_create_default(
|
&& font_renderer_create_default(
|
||||||
|
@ -1166,7 +1166,6 @@ static void *vulkan_init(const video_info_t *video,
|
|||||||
input_driver_t **input,
|
input_driver_t **input,
|
||||||
void **input_data)
|
void **input_data)
|
||||||
{
|
{
|
||||||
gfx_ctx_input_t inp;
|
|
||||||
unsigned full_x, full_y;
|
unsigned full_x, full_y;
|
||||||
unsigned win_width;
|
unsigned win_width;
|
||||||
unsigned win_height;
|
unsigned win_height;
|
||||||
@ -1176,6 +1175,7 @@ static void *vulkan_init(const video_info_t *video,
|
|||||||
unsigned temp_width = 0;
|
unsigned temp_width = 0;
|
||||||
unsigned temp_height = 0;
|
unsigned temp_height = 0;
|
||||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
vk_t *vk = (vk_t*)calloc(1, sizeof(*vk));
|
vk_t *vk = (vk_t*)calloc(1, sizeof(*vk));
|
||||||
if (!vk)
|
if (!vk)
|
||||||
return NULL;
|
return NULL;
|
||||||
@ -1277,9 +1277,13 @@ static void *vulkan_init(const video_info_t *video,
|
|||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
inp.input = input;
|
if (vk->ctx_driver->input_driver)
|
||||||
inp.input_data = input_data;
|
{
|
||||||
video_context_driver_input_driver(&inp);
|
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||||
|
vk->ctx_driver->input_driver(
|
||||||
|
vk->ctx_data, joypad_name,
|
||||||
|
input, input_data);
|
||||||
|
}
|
||||||
|
|
||||||
if (video->font_enable)
|
if (video->font_enable)
|
||||||
font_driver_init_osd(vk,
|
font_driver_init_osd(vk,
|
||||||
|
15
retroarch.c
15
retroarch.c
@ -33541,21 +33541,6 @@ bool video_context_driver_get_refresh_rate(float *refresh_rate)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
|
|
||||||
{
|
|
||||||
struct rarch_state *p_rarch = &rarch_st;
|
|
||||||
if (p_rarch->current_video_context.input_driver)
|
|
||||||
{
|
|
||||||
settings_t *settings = p_rarch->configuration_settings;
|
|
||||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
|
||||||
p_rarch->current_video_context.input_driver(
|
|
||||||
p_rarch->video_context_data, joypad_name,
|
|
||||||
inp->input, inp->input_data);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool video_context_driver_get_ident(gfx_ctx_ident_t *ident)
|
bool video_context_driver_get_ident(gfx_ctx_ident_t *ident)
|
||||||
{
|
{
|
||||||
struct rarch_state *p_rarch = &rarch_st;
|
struct rarch_state *p_rarch = &rarch_st;
|
||||||
|
@ -1783,8 +1783,6 @@ bool video_context_driver_set_flags(gfx_ctx_flags_t *flags);
|
|||||||
|
|
||||||
bool video_context_driver_get_metrics(gfx_ctx_metrics_t *metrics);
|
bool video_context_driver_get_metrics(gfx_ctx_metrics_t *metrics);
|
||||||
|
|
||||||
bool video_context_driver_input_driver(gfx_ctx_input_t *inp);
|
|
||||||
|
|
||||||
enum gfx_ctx_api video_context_driver_get_api(void);
|
enum gfx_ctx_api video_context_driver_get_api(void);
|
||||||
|
|
||||||
void video_context_driver_free(void);
|
void video_context_driver_free(void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user