mirror of
https://github.com/libretro/RetroArch
synced 2025-01-30 12:32:52 +00:00
* Fix implicit declaration
* Move more code to gfx/video_driver.c
This commit is contained in:
parent
e47e9968ed
commit
d87e0c1744
@ -408,6 +408,10 @@ size_t audio_driver_sample_batch_rewind(
|
||||
const int16_t *data, size_t frames);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
void audio_driver_menu_sample(void);
|
||||
#endif
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif /* __AUDIO_DRIVER__H */
|
||||
|
@ -2353,3 +2353,81 @@ void video_viewport_get_scaled_integer(struct video_viewport *vp,
|
||||
vp->x = padding_x / 2;
|
||||
vp->y = padding_y / 2;
|
||||
}
|
||||
|
||||
void video_driver_display_type_set(enum rarch_display_type type)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
video_st->display_type = type;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_display_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
return video_st->display;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_display_userdata_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
return video_st->display_userdata;
|
||||
}
|
||||
|
||||
void video_driver_display_userdata_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
video_st->display_userdata = idx;
|
||||
}
|
||||
|
||||
void video_driver_display_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
video_st->display = idx;
|
||||
}
|
||||
|
||||
enum rarch_display_type video_driver_display_type_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
return video_st->display_type;
|
||||
}
|
||||
|
||||
void video_driver_window_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
video_st->window = idx;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_window_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
return video_st->window;
|
||||
}
|
||||
|
||||
bool video_driver_texture_load(void *data,
|
||||
enum texture_filter_type filter_type,
|
||||
uintptr_t *id)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
if ( !id
|
||||
|| !video_st->poke
|
||||
|| !video_st->poke->load_texture)
|
||||
return false;
|
||||
*id = video_st->poke->load_texture(
|
||||
video_st->data, data,
|
||||
VIDEO_DRIVER_IS_THREADED_INTERNAL(video_st),
|
||||
filter_type);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_driver_texture_unload(uintptr_t *id)
|
||||
{
|
||||
video_driver_state_t *video_st = &video_driver_st;
|
||||
if ( !video_st->poke
|
||||
|| !video_st->poke->unload_texture)
|
||||
return false;
|
||||
video_st->poke->unload_texture(
|
||||
video_st->data,
|
||||
VIDEO_DRIVER_IS_THREADED_INTERNAL(video_st),
|
||||
*id);
|
||||
*id = 0;
|
||||
return true;
|
||||
}
|
||||
|
78
retroarch.c
78
retroarch.c
@ -15191,84 +15191,6 @@ char* crt_switch_core_name(void)
|
||||
return (char*)runloop_state.system.info.library_name;
|
||||
}
|
||||
|
||||
void video_driver_display_type_set(enum rarch_display_type type)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
video_st->display_type = type;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_display_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
return video_st->display;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_display_userdata_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
return video_st->display_userdata;
|
||||
}
|
||||
|
||||
void video_driver_display_userdata_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
video_st->display_userdata = idx;
|
||||
}
|
||||
|
||||
void video_driver_display_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
video_st->display = idx;
|
||||
}
|
||||
|
||||
enum rarch_display_type video_driver_display_type_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
return video_st->display_type;
|
||||
}
|
||||
|
||||
void video_driver_window_set(uintptr_t idx)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
video_st->window = idx;
|
||||
}
|
||||
|
||||
uintptr_t video_driver_window_get(void)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
return video_st->window;
|
||||
}
|
||||
|
||||
bool video_driver_texture_load(void *data,
|
||||
enum texture_filter_type filter_type,
|
||||
uintptr_t *id)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
if ( !id
|
||||
|| !video_st->poke
|
||||
|| !video_st->poke->load_texture)
|
||||
return false;
|
||||
*id = video_st->poke->load_texture(
|
||||
video_st->data, data,
|
||||
VIDEO_DRIVER_IS_THREADED_INTERNAL(video_st),
|
||||
filter_type);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool video_driver_texture_unload(uintptr_t *id)
|
||||
{
|
||||
video_driver_state_t *video_st = video_state_get_ptr();
|
||||
if ( !video_st->poke
|
||||
|| !video_st->poke->unload_texture)
|
||||
return false;
|
||||
video_st->poke->unload_texture(
|
||||
video_st->data,
|
||||
VIDEO_DRIVER_IS_THREADED_INTERNAL(video_st),
|
||||
*id);
|
||||
*id = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
void video_driver_build_info(video_frame_info_t *video_info)
|
||||
{
|
||||
video_viewport_t *custom_vp = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user