mirror of https://github.com/mpv-player/mpv
cocoa: remove usage of FFABS and the dependency on libavutil/common.h
This commit is contained in:
parent
b726f1eb90
commit
80758eda17
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue