mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-19 01:12:33 +00:00
Move get_proc_address/get_current_framebuffer to gfx/video_driver.c
This commit is contained in:
parent
3ec9005c5c
commit
bb481a158c
26
driver.c
26
driver.c
@ -261,32 +261,6 @@ void driver_set_nonblock_state(bool enable)
|
||||
g_extern.audio_data.block_chunk_size;
|
||||
}
|
||||
|
||||
/**
|
||||
* driver_get_current_framebuffer:
|
||||
*
|
||||
* Gets pointer to current hardware renderer framebuffer object.
|
||||
* Used by RETRO_ENVIRONMENT_SET_HW_RENDER.
|
||||
*
|
||||
* Returns: pointer to hardware framebuffer object, otherwise 0.
|
||||
**/
|
||||
uintptr_t driver_get_current_framebuffer(void)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (driver.video_poke && driver.video_poke->get_current_framebuffer)
|
||||
return driver.video_poke->get_current_framebuffer(driver.video_data);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
retro_proc_address_t driver_get_proc_address(const char *sym)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (driver.video_poke && driver.video_poke->get_proc_address)
|
||||
return driver.video_poke->get_proc_address(driver.video_data, sym);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* driver_update_system_av_info:
|
||||
* @info : pointer to new A/V info
|
||||
|
12
driver.h
12
driver.h
@ -368,18 +368,6 @@ void driver_set_nonblock_state(bool enable);
|
||||
**/
|
||||
void driver_set_refresh_rate(float hz);
|
||||
|
||||
/**
|
||||
* driver_get_current_framebuffer:
|
||||
*
|
||||
* Gets pointer to current hardware renderer framebuffer object.
|
||||
* Used by RETRO_ENVIRONMENT_SET_HW_RENDER.
|
||||
*
|
||||
* Returns: pointer to hardware framebuffer object, otherwise 0.
|
||||
**/
|
||||
uintptr_t driver_get_current_framebuffer(void);
|
||||
|
||||
retro_proc_address_t driver_get_proc_address(const char *sym);
|
||||
|
||||
/**
|
||||
* driver_update_system_av_info:
|
||||
* @info : pointer to new A/V info
|
||||
|
@ -933,8 +933,8 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
||||
RARCH_LOG("Requesting unknown context.\n");
|
||||
return false;
|
||||
}
|
||||
cb->get_current_framebuffer = driver_get_current_framebuffer;
|
||||
cb->get_proc_address = driver_get_proc_address;
|
||||
cb->get_current_framebuffer = video_driver_get_current_framebuffer;
|
||||
cb->get_proc_address = video_driver_get_proc_address;
|
||||
|
||||
if (cmd & RETRO_ENVIRONMENT_EXPERIMENTAL) /* Old ABI. Don't copy garbage. */
|
||||
memcpy(&g_extern.system.hw_render_callback,
|
||||
|
@ -188,3 +188,29 @@ void *driver_video_resolve(const video_driver_t **drv)
|
||||
|
||||
return driver.video_data;
|
||||
}
|
||||
|
||||
/**
|
||||
* video_driver_get_current_framebuffer:
|
||||
*
|
||||
* Gets pointer to current hardware renderer framebuffer object.
|
||||
* Used by RETRO_ENVIRONMENT_SET_HW_RENDER.
|
||||
*
|
||||
* Returns: pointer to hardware framebuffer object, otherwise 0.
|
||||
**/
|
||||
uintptr_t video_driver_get_current_framebuffer(void)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (driver.video_poke && driver.video_poke->get_current_framebuffer)
|
||||
return driver.video_poke->get_current_framebuffer(driver.video_data);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
retro_proc_address_t video_driver_get_proc_address(const char *sym)
|
||||
{
|
||||
#ifdef HAVE_FBO
|
||||
if (driver.video_poke && driver.video_poke->get_proc_address)
|
||||
return driver.video_poke->get_proc_address(driver.video_data, sym);
|
||||
#endif
|
||||
return NULL;
|
||||
}
|
||||
|
@ -228,6 +228,18 @@ void find_video_driver(void);
|
||||
**/
|
||||
void *driver_video_resolve(const video_driver_t **drv);
|
||||
|
||||
/**
|
||||
* video_driver_get_current_framebuffer:
|
||||
*
|
||||
* Gets pointer to current hardware renderer framebuffer object.
|
||||
* Used by RETRO_ENVIRONMENT_SET_HW_RENDER.
|
||||
*
|
||||
* Returns: pointer to hardware framebuffer object, otherwise 0.
|
||||
**/
|
||||
uintptr_t video_driver_get_current_framebuffer(void);
|
||||
|
||||
retro_proc_address_t video_driver_get_proc_address(const char *sym);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user