(sdl_input.c) Use video_driver_get_ident

This commit is contained in:
twinaphex 2015-11-23 14:57:24 +01:00
parent 4cccd6d596
commit 60fec26bcf

View File

@ -299,15 +299,14 @@ static void sdl_grab_mouse(void *data, bool state)
struct temp{
SDL_Window *w;
};
sdl_input_t *sdl = (sdl_input_t*)data;
driver_t *driver = driver_get_ptr();
if (driver->current_video != &video_sdl2)
return;
/* First member of sdl2_video_t is the window */
SDL_SetWindowGrab(((struct temp*)driver->video_data)->w,
state ? SDL_TRUE : SDL_FALSE);
if (!strcmp(video_driver_get_ident(), "sdl2"))
{
/* First member of sdl2_video_t is the window */
SDL_SetWindowGrab(((struct temp*)driver->video_data)->w,
state ? SDL_TRUE : SDL_FALSE);
}
#endif
}