mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
video_context_data only accessed now from one file
This commit is contained in:
parent
3ad52d0f08
commit
f98cda3c33
@ -332,7 +332,7 @@ static bool gfx_ctx_cgl_init(void *data)
|
||||
|
||||
CGLSetCurrentContext(cgl->glCtx);
|
||||
|
||||
driver->video_context_data = cgl;
|
||||
gfx_ctx_data_set(cgl);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -509,7 +509,7 @@ nextgpu:
|
||||
|
||||
dir_list_free(gpu_descriptors);
|
||||
|
||||
driver->video_context_data = drm;
|
||||
gfx_ctx_data_set(drm);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -261,7 +261,7 @@ static bool gfx_ctx_glx_init(void *data)
|
||||
glx->g_fbc = fbcs[0];
|
||||
XFree(fbcs);
|
||||
|
||||
driver->video_context_data = glx;
|
||||
gfx_ctx_data_set(glx);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -292,7 +292,7 @@ static bool gfx_ctx_ps3_init(void *data)
|
||||
|
||||
gfx_ctx_ps3_get_available_resolutions();
|
||||
|
||||
driver->video_context_data = ps3;
|
||||
gfx_ctx_data_set(ps3);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -93,7 +93,7 @@ static bool sdl_ctx_init(void *data)
|
||||
RARCH_LOG("[SDL_GL] SDL %i.%i.%i gfx context driver initialized.\n",
|
||||
SDL_MAJOR_VERSION, SDL_MINOR_VERSION, SDL_PATCHLEVEL);
|
||||
|
||||
driver->video_context_data = sdl;
|
||||
gfx_ctx_data_set(sdl);
|
||||
|
||||
return true;
|
||||
|
||||
|
@ -337,7 +337,7 @@ static bool gfx_ctx_wl_init(void *data)
|
||||
goto error;
|
||||
}
|
||||
|
||||
driver->video_context_data = wl;
|
||||
gfx_ctx_data_set(wl);
|
||||
|
||||
wl->g_registry = wl_display_get_registry(wl->g_dpy);
|
||||
wl_registry_add_listener(wl->g_registry, ®istry_listener, NULL);
|
||||
|
@ -87,6 +87,14 @@ void *gfx_ctx_data_get_ptr(void)
|
||||
return driver->video_context_data;
|
||||
}
|
||||
|
||||
void gfx_ctx_data_set(void *ptr)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
if (!driver || !ptr)
|
||||
return;
|
||||
driver->video_context_data = ptr;
|
||||
}
|
||||
|
||||
void gfx_ctx_free_data(void)
|
||||
{
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
@ -256,6 +256,8 @@ retro_proc_address_t gfx_ctx_get_proc_address(const char *sym);
|
||||
|
||||
void *gfx_ctx_data_get_ptr(void);
|
||||
|
||||
void gfx_ctx_data_set(void *ptr);
|
||||
|
||||
void gfx_ctx_free_data(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Loading…
x
Reference in New Issue
Block a user