mirror of https://github.com/mpv-player/mpv
osx: cocoa_common: use default wakeup period
Now that Cocoa's input handling is done on a separate thread from the playloop it is ridicolously simple to have longer asynchronous sleeps when paused.
This commit is contained in:
parent
f13f0db33a
commit
f0d2120347
|
@ -118,6 +118,14 @@ static NSString *escape_loadfile_name(NSString *input)
|
||||||
@synthesize eventsResponder = _events_responder;
|
@synthesize eventsResponder = _events_responder;
|
||||||
@synthesize menuItems = _menu_items;
|
@synthesize menuItems = _menu_items;
|
||||||
|
|
||||||
|
- (void)sendEvent:(NSEvent *)event
|
||||||
|
{
|
||||||
|
[super sendEvent:event];
|
||||||
|
|
||||||
|
if (self.inputContext)
|
||||||
|
mp_input_wakeup(self.inputContext);
|
||||||
|
}
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
if (self = [super init]) {
|
if (self = [super init]) {
|
||||||
|
|
|
@ -149,7 +149,6 @@ static void disable_power_management(struct vo *vo)
|
||||||
int vo_cocoa_init(struct vo *vo)
|
int vo_cocoa_init(struct vo *vo)
|
||||||
{
|
{
|
||||||
vo->cocoa = vo_cocoa_init_state(vo);
|
vo->cocoa = vo_cocoa_init_state(vo);
|
||||||
vo->wakeup_period = 0.02;
|
|
||||||
disable_power_management(vo);
|
disable_power_management(vo);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue