mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 03:35:22 +00:00
Move SDL input driver init to sdlwrap.
This commit is contained in:
parent
b2c7b766ae
commit
1e73ba4661
10
gfx/gl.c
10
gfx/gl.c
@ -1381,15 +1381,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
|
||||
memcpy(gl->prev_info[i].coord, tex_coords, sizeof(tex_coords));
|
||||
}
|
||||
|
||||
// Hook up SDL input driver to get SDL_QUIT events and RESIZE.
|
||||
sdl_input_t *sdl_input = (sdl_input_t*)input_sdl.init();
|
||||
if (sdl_input)
|
||||
{
|
||||
*input = &input_sdl;
|
||||
*input_data = sdl_input;
|
||||
}
|
||||
else
|
||||
*input = NULL;
|
||||
sdlwrap_input_driver(input, input_data);
|
||||
|
||||
gl_init_font(gl, g_settings.video.font_path, g_settings.video.font_size);
|
||||
|
||||
|
@ -359,3 +359,15 @@ bool sdlwrap_window_has_focus(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
void sdlwrap_input_driver(const input_driver_t **input, void **input_data)
|
||||
{
|
||||
void *sdl_input = input_sdl.init();
|
||||
if (sdl_input)
|
||||
{
|
||||
*input = &input_sdl;
|
||||
*input_data = sdl_input;
|
||||
}
|
||||
else
|
||||
*input = NULL;
|
||||
}
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
|
||||
#include "../boolean.h"
|
||||
|
||||
#include "../driver.h"
|
||||
#include "SDL.h"
|
||||
#include "SDL_version.h"
|
||||
#include "SDL_syswm.h"
|
||||
@ -64,5 +65,7 @@ bool sdlwrap_get_wm_info(SDL_SysWMinfo *info);
|
||||
|
||||
bool sdlwrap_window_has_focus(void);
|
||||
|
||||
void sdlwrap_input_driver(const input_driver_t **input, void **input_data);
|
||||
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user