cocoa: remove usage of FFABS and the dependency on libavutil/common.h

This commit is contained in:
Akemi 2017-07-26 21:41:31 +02:00
parent b726f1eb90
commit 80758eda17
1 changed files with 2 additions and 4 deletions

View File

@ -15,8 +15,6 @@
* License along with mpv. If not, see <http://www.gnu.org/licenses/>.
*/
#include <libavutil/common.h>
#include "input/input.h"
#include "input/keycodes.h"
@ -246,7 +244,7 @@
CGFloat delta;
int cmd;
if (FFABS([event deltaY]) >= FFABS([event deltaX])) {
if (fabs([event deltaY]) >= fabs([event deltaX])) {
delta = [event deltaY] * 0.1;
cmd = delta > 0 ? MP_AXIS_UP : MP_AXIS_DOWN;
} else {
@ -254,7 +252,7 @@
cmd = delta > 0 ? MP_AXIS_RIGHT : MP_AXIS_LEFT;
}
[self.adapter putAxis:cmd delta:FFABS(delta)];
[self.adapter putAxis:cmd delta:fabs(delta)];
}
- (void)scrollWheel:(NSEvent *)event