mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Get rid of video_context_driver_get_context_data
This commit is contained in:
parent
d854ba5c05
commit
9e2d688e1d
@ -1136,24 +1136,23 @@ static void *vulkan_init(const video_info_t *video,
|
||||
vk_t *vk = (vk_t*)calloc(1, sizeof(*vk));
|
||||
if (!vk)
|
||||
return NULL;
|
||||
|
||||
vk->video = *video;
|
||||
|
||||
ctx_driver = vulkan_get_context(vk);
|
||||
ctx_driver = vulkan_get_context(vk);
|
||||
if (!ctx_driver)
|
||||
{
|
||||
RARCH_ERR("[Vulkan]: Failed to get Vulkan context.\n");
|
||||
goto error;
|
||||
}
|
||||
|
||||
vk->ctx_driver = ctx_driver;
|
||||
vk->video = *video;
|
||||
vk->ctx_driver = ctx_driver;
|
||||
|
||||
video_context_driver_set((const gfx_ctx_driver_t*)ctx_driver);
|
||||
|
||||
video_context_driver_get_video_size(&mode);
|
||||
full_x = mode.width;
|
||||
full_y = mode.height;
|
||||
mode.width = 0;
|
||||
mode.height = 0;
|
||||
full_x = mode.width;
|
||||
full_y = mode.height;
|
||||
mode.width = 0;
|
||||
mode.height = 0;
|
||||
|
||||
RARCH_LOG("[Vulkan]: Detecting screen resolution %ux%u.\n", full_x, full_y);
|
||||
interval = video->vsync ? video->swap_interval : 0;
|
||||
@ -1188,7 +1187,7 @@ static void *vulkan_init(const video_info_t *video,
|
||||
|
||||
RARCH_LOG("[Vulkan]: Using resolution %ux%u\n", temp_width, temp_height);
|
||||
|
||||
video_context_driver_get_context_data(&vk->context);
|
||||
*(void**)&vk->context = vk->ctx_driver->get_context_data(vk->ctx_data);
|
||||
|
||||
vk->vsync = video->vsync;
|
||||
vk->fullscreen = video->fullscreen;
|
||||
|
@ -3273,15 +3273,6 @@ bool video_context_driver_get_video_size(gfx_ctx_mode_t *mode_info)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_context_driver_get_context_data(void *data)
|
||||
{
|
||||
if (!current_video_context.get_context_data)
|
||||
return false;
|
||||
*(void**)data = current_video_context.get_context_data(
|
||||
video_context_data);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_context_driver_show_mouse(bool *bool_data)
|
||||
{
|
||||
if (!current_video_context.show_mouse)
|
||||
@ -3384,15 +3375,13 @@ enum gfx_ctx_api video_context_driver_get_api(void)
|
||||
|
||||
bool video_driver_has_windowed(void)
|
||||
{
|
||||
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
|
||||
return false;
|
||||
#else
|
||||
#if !(defined(RARCH_CONSOLE) || defined(RARCH_MOBILE))
|
||||
if (video_driver_data && current_video->has_windowed)
|
||||
return current_video->has_windowed(video_driver_data);
|
||||
else if (video_context_data && current_video_context.has_windowed)
|
||||
return current_video_context.has_windowed(video_context_data);
|
||||
return false;
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
bool video_driver_cached_frame_has_valid_framebuffer(void)
|
||||
|
@ -1181,8 +1181,6 @@ bool video_context_driver_get_video_size(gfx_ctx_mode_t *mode_info);
|
||||
|
||||
bool video_context_driver_get_refresh_rate(float *refresh_rate);
|
||||
|
||||
bool video_context_driver_get_context_data(void *data);
|
||||
|
||||
bool video_context_driver_show_mouse(bool *bool_data);
|
||||
|
||||
bool video_context_driver_set_flags(gfx_ctx_flags_t *flags);
|
||||
|
Loading…
x
Reference in New Issue
Block a user