mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Revert "Get rid of video_context_driver_input_driver"
This reverts commit 75b1a09184fdf3bc502a7e62cd7137ee2741e5af.
This commit is contained in:
parent
1c9f60f98d
commit
2efa8ac80e
@ -3577,6 +3577,7 @@ static void *gl2_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
enum gfx_wrap_type wrap_type;
|
||||
gfx_ctx_input_t inp;
|
||||
unsigned full_x, full_y;
|
||||
video_shader_ctx_info_t shader_info;
|
||||
settings_t *settings = config_get_ptr();
|
||||
@ -3908,13 +3909,10 @@ static void *gl2_init(const video_info_t *video,
|
||||
}
|
||||
}
|
||||
|
||||
if (gl->ctx_driver->input_driver)
|
||||
{
|
||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||
gl->ctx_driver->input_driver(
|
||||
gl->ctx_data, joypad_name,
|
||||
input, input_data);
|
||||
}
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (video->font_enable)
|
||||
font_driver_init_osd(gl, video,
|
||||
|
@ -218,6 +218,7 @@ static void *gl1_gfx_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
unsigned full_x, full_y;
|
||||
gfx_ctx_input_t inp;
|
||||
void *ctx_data = NULL;
|
||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||
unsigned mode_width = 0;
|
||||
@ -378,13 +379,10 @@ static void *gl1_gfx_init(const video_info_t *video,
|
||||
video_driver_set_gpu_api_version_string(version);
|
||||
}
|
||||
|
||||
if (gl1->ctx_driver->input_driver)
|
||||
{
|
||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||
gl1->ctx_driver->input_driver(
|
||||
gl1->ctx_data, joypad_name,
|
||||
input, input_data);
|
||||
}
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (video_font_enable)
|
||||
font_driver_init_osd(gl1,
|
||||
|
@ -1157,6 +1157,7 @@ static void gl_core_set_viewport_wrapper(void *data,
|
||||
static void *gl_core_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
unsigned full_x, full_y;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool video_gpu_record = settings->bools.video_gpu_record;
|
||||
@ -1313,13 +1314,9 @@ static void *gl_core_init(const video_info_t *video,
|
||||
* the viewport sizes before we start running. */
|
||||
gl_core_set_viewport_wrapper(gl, temp_width, temp_height, false, true);
|
||||
|
||||
if (gl->ctx_driver->input_driver)
|
||||
{
|
||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||
gl->ctx_driver->input_driver(
|
||||
gl->ctx_data, joypad_name,
|
||||
input, input_data);
|
||||
}
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (!gl_core_init_filter_chain(gl))
|
||||
{
|
||||
|
@ -108,6 +108,7 @@ static INLINE bool vg_query_extension(const char *ext)
|
||||
static void *vg_init(const video_info_t *video,
|
||||
input_driver_t **input, void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
unsigned win_width, win_height;
|
||||
VGfloat clearColor[4] = {0, 0, 0, 1};
|
||||
int interval = 0;
|
||||
@ -221,13 +222,10 @@ static void *vg_init(const video_info_t *video,
|
||||
: VG_IMAGE_QUALITY_NONANTIALIASED);
|
||||
vg_set_nonblock_state(vg, !video->vsync, adaptive_vsync_enabled, interval);
|
||||
|
||||
if (vg->ctx_driver->input_driver)
|
||||
{
|
||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||
vg->ctx_driver->input_driver(
|
||||
vg->ctx_data, joypad_name,
|
||||
input, input_data);
|
||||
}
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if ( video->font_enable
|
||||
&& font_renderer_create_default(
|
||||
|
@ -1166,6 +1166,7 @@ static void *vulkan_init(const video_info_t *video,
|
||||
input_driver_t **input,
|
||||
void **input_data)
|
||||
{
|
||||
gfx_ctx_input_t inp;
|
||||
unsigned full_x, full_y;
|
||||
unsigned win_width;
|
||||
unsigned win_height;
|
||||
@ -1175,7 +1176,6 @@ static void *vulkan_init(const video_info_t *video,
|
||||
unsigned temp_width = 0;
|
||||
unsigned temp_height = 0;
|
||||
const gfx_ctx_driver_t *ctx_driver = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
vk_t *vk = (vk_t*)calloc(1, sizeof(*vk));
|
||||
if (!vk)
|
||||
return NULL;
|
||||
@ -1277,13 +1277,9 @@ static void *vulkan_init(const video_info_t *video,
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (vk->ctx_driver->input_driver)
|
||||
{
|
||||
const char *joypad_name = settings->arrays.input_joypad_driver;
|
||||
vk->ctx_driver->input_driver(
|
||||
vk->ctx_data, joypad_name,
|
||||
input, input_data);
|
||||
}
|
||||
inp.input = input;
|
||||
inp.input_data = input_data;
|
||||
video_context_driver_input_driver(&inp);
|
||||
|
||||
if (video->font_enable)
|
||||
font_driver_init_osd(vk,
|
||||
|
21
retroarch.c
21
retroarch.c
@ -33496,10 +33496,10 @@ bool video_driver_get_metrics(gfx_ctx_metrics_t *metrics)
|
||||
bool video_context_driver_get_refresh_rate(float *refresh_rate)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
if (!p_rarch->video_context_data)
|
||||
return false;
|
||||
if (!p_rarch->current_video_context.get_refresh_rate || !refresh_rate)
|
||||
return false;
|
||||
if (!p_rarch->video_context_data)
|
||||
return false;
|
||||
|
||||
if (!p_rarch->video_driver_crt_switching_active)
|
||||
{
|
||||
@ -33525,6 +33525,23 @@ bool video_context_driver_get_refresh_rate(float *refresh_rate)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_context_driver_input_driver(gfx_ctx_input_t *inp)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
|
||||
if (p_rarch && 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)
|
||||
{
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
|
@ -1784,6 +1784,8 @@ bool video_context_driver_set_flags(gfx_ctx_flags_t *flags);
|
||||
|
||||
bool video_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);
|
||||
|
||||
void video_context_driver_free(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user