mirror of https://github.com/mpv-player/mpv
cocoa_common: remove play/pause VOCTRL functions
Make VOCTRL_RESTORE_SCREENSAVER / VOCTRL_KILL_SCREENSAVER use the power management functions directly.
This commit is contained in:
parent
60a0c450eb
commit
3c12148668
|
@ -39,8 +39,6 @@ void vo_cocoa_swap_buffers(struct vo *vo);
|
||||||
int vo_cocoa_check_events(struct vo *vo);
|
int vo_cocoa_check_events(struct vo *vo);
|
||||||
void vo_cocoa_fullscreen(struct vo *vo);
|
void vo_cocoa_fullscreen(struct vo *vo);
|
||||||
void vo_cocoa_ontop(struct vo *vo);
|
void vo_cocoa_ontop(struct vo *vo);
|
||||||
void vo_cocoa_pause(struct vo *vo);
|
|
||||||
void vo_cocoa_resume(struct vo *vo);
|
|
||||||
int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg);
|
int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg);
|
||||||
|
|
||||||
void vo_cocoa_register_resize_callback(struct vo *vo,
|
void vo_cocoa_register_resize_callback(struct vo *vo,
|
||||||
|
|
|
@ -184,16 +184,6 @@ void vo_cocoa_uninit(struct vo *vo)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void vo_cocoa_pause(struct vo *vo)
|
|
||||||
{
|
|
||||||
enable_power_management(vo);
|
|
||||||
}
|
|
||||||
|
|
||||||
void vo_cocoa_resume(struct vo *vo)
|
|
||||||
{
|
|
||||||
disable_power_management(vo);
|
|
||||||
}
|
|
||||||
|
|
||||||
void vo_cocoa_register_resize_callback(struct vo *vo,
|
void vo_cocoa_register_resize_callback(struct vo *vo,
|
||||||
void (*cb)(struct vo *vo, int w, int h))
|
void (*cb)(struct vo *vo, int w, int h))
|
||||||
{
|
{
|
||||||
|
@ -556,10 +546,10 @@ int vo_cocoa_control(struct vo *vo, int *events, int request, void *arg)
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
}
|
}
|
||||||
case VOCTRL_RESTORE_SCREENSAVER:
|
case VOCTRL_RESTORE_SCREENSAVER:
|
||||||
vo_cocoa_pause(vo);
|
enable_power_management(vo);
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
case VOCTRL_KILL_SCREENSAVER:
|
case VOCTRL_KILL_SCREENSAVER:
|
||||||
vo_cocoa_resume(vo);
|
disable_power_management(vo);
|
||||||
return VO_TRUE;
|
return VO_TRUE;
|
||||||
}
|
}
|
||||||
return VO_NOTIMPL;
|
return VO_NOTIMPL;
|
||||||
|
|
Loading…
Reference in New Issue