mirror of
https://github.com/mpv-player/mpv
synced 2025-03-11 00:29:02 +00:00
vo_opengl: make ra_fns.timer_create optional
This commit is contained in:
parent
1171f92beb
commit
8209376468
@ -382,7 +382,7 @@ struct ra_fns {
|
||||
const struct ra_renderpass_run_params *params);
|
||||
|
||||
// Create a timer object. Returns NULL on failure, or if timers are
|
||||
// unavailable.
|
||||
// unavailable for some reason. Optional.
|
||||
ra_timer *(*timer_create)(struct ra *ra);
|
||||
|
||||
void (*timer_destroy)(struct ra *ra, ra_timer *timer);
|
||||
|
@ -134,6 +134,9 @@ struct timer_pool {
|
||||
|
||||
struct timer_pool *timer_pool_create(struct ra *ra)
|
||||
{
|
||||
if (!ra->fns->timer_create)
|
||||
return NULL;
|
||||
|
||||
ra_timer *timer = ra->fns->timer_create(ra);
|
||||
if (!timer)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user