From f186efe2a9d07eb6ba67bd99ada4c2f72c73dca0 Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sun, 17 Dec 2023 22:24:11 +0100 Subject: [PATCH] Fix compilation with latest Kinc --- Sources/Kore/Input/Gamepad.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Sources/Kore/Input/Gamepad.cpp b/Sources/Kore/Input/Gamepad.cpp index 8913bbecf..6431fa391 100644 --- a/Sources/Kore/Input/Gamepad.cpp +++ b/Sources/Kore/Input/Gamepad.cpp @@ -10,13 +10,13 @@ namespace { bool padInitialized[maxGamepads] = {0}; bool callbacksInitialized = false; - void axisCallback(int gamepad, int axis, float value) { + void axisCallback(int gamepad, int axis, float value, void *data) { if (gamepad < maxGamepads && padInitialized[gamepad] && pads[gamepad].Axis != nullptr) { pads[gamepad].Axis(axis, value); } } - void buttonCallback(int gamepad, int button, float value) { + void buttonCallback(int gamepad, int button, float value, void *data) { if (gamepad < maxGamepads && padInitialized[gamepad] && pads[gamepad].Button != nullptr) { pads[gamepad].Button(button, value); } @@ -28,8 +28,8 @@ Gamepad *Gamepad::get(int num) { return nullptr; } if (!callbacksInitialized) { - kinc_gamepad_set_axis_callback(axisCallback); - kinc_gamepad_set_button_callback(buttonCallback); + kinc_gamepad_set_axis_callback(axisCallback, nullptr); + kinc_gamepad_set_button_callback(buttonCallback, nullptr); } if (!padInitialized[num]) { pads[num].vendor = kinc_gamepad_vendor(num);