forked from Mirrors/openclonk
StdSchedulerMac: don't call setTolerance:
respondsToSelector isn't properly guarding against calling this method on unsupported platforms, possibly because it existed as a private method in OS X before 10.9. For example, attempting to build this on OS X 10.8 fails with the error: no visible @interface for 'NSTimer' declares the selector 'setTolerance:' Since the default tolerance is 0 anyway, this can be removed without adverse effect.stable-6.1
parent
6e129f0535
commit
2f08800709
|
@ -218,8 +218,6 @@ static NSMutableDictionary* additionsDictionary;
|
|||
[super registerAt:_additions];
|
||||
auto loop = _additions.runLoop;
|
||||
timer = [NSTimer timerWithTimeInterval:proc->TimerInterval()/1000.0 target:self selector:@selector(run:) userInfo:nil repeats:YES];
|
||||
if ([timer respondsToSelector:@selector(setTolerance:)])
|
||||
[timer setTolerance:0.0];
|
||||
[loop addTimer:timer forMode:NSDefaultRunLoopMode];
|
||||
}
|
||||
- (void) unregisterFrom:(SCHAdditions*) _additions
|
||||
|
|
Loading…
Reference in New Issue