diff --git a/Backends/Kinc-HL/kinc-bridge/system.c.h b/Backends/Kinc-HL/kinc-bridge/system.c.h index 88c791d33..83f4d5a40 100644 --- a/Backends/Kinc-HL/kinc-bridge/system.c.h +++ b/Backends/Kinc-HL/kinc-bridge/system.c.h @@ -94,11 +94,11 @@ void hl_kinc_system_load_url(vbyte *url) { } vbyte *hl_kinc_get_gamepad_id(int index) { - return (vbyte*)kinc_gamepad_product_name(index); + return (vbyte *)kinc_gamepad_product_name(index); } vbyte *hl_kinc_get_gamepad_vendor(int index) { - return (vbyte*)kinc_gamepad_vendor(index); + return (vbyte *)kinc_gamepad_vendor(index); } bool hl_kinc_gamepad_connected(int index) { @@ -137,12 +137,12 @@ void hl_kinc_register_pen(vclosure *penDown, vclosure *penUp, vclosure *penMove) kinc_pen_set_move_callback(*((FN_PEN_MOVE *)(&penMove->fun))); } -typedef void (*FN_GAMEPAD_AXIS)(int, int, float); -typedef void (*FN_GAMEPAD_BUTTON)(int, int, float); +typedef void (*FN_GAMEPAD_AXIS)(int, int, float, void *); +typedef void (*FN_GAMEPAD_BUTTON)(int, int, float, void *); void hl_kinc_register_gamepad(vclosure *gamepadAxis, vclosure *gamepadButton) { - kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun))); - kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun))); + kinc_gamepad_set_axis_callback(*((FN_GAMEPAD_AXIS *)(&gamepadAxis->fun)), NULL); + kinc_gamepad_set_button_callback(*((FN_GAMEPAD_BUTTON *)(&gamepadButton->fun)), NULL); } typedef void (*FN_TOUCH_START)(int, int, int); diff --git a/Backends/Kinc-hxcpp/main.cpp b/Backends/Kinc-hxcpp/main.cpp index 8ca4f7fb3..77829a3cb 100644 --- a/Backends/Kinc-hxcpp/main.cpp +++ b/Backends/Kinc-hxcpp/main.cpp @@ -29,7 +29,7 @@ #include #ifdef ANDROID -//#include +// #include #endif namespace { @@ -103,11 +103,11 @@ namespace { Sensor_obj::_changed(1, x, y, z); } - void gamepadAxis(int gamepad, int axis, float value) { + void gamepadAxis(int gamepad, int axis, float value, void *data) { SystemImpl_obj::gamepadAxis(gamepad, axis, value); } - void gamepadButton(int gamepad, int button, float value) { + void gamepadButton(int gamepad, int button, float value, void *data) { SystemImpl_obj::gamepadButton(gamepad, button, value); } @@ -311,8 +311,8 @@ void init_kinc(const char *name, int width, int height, kinc_window_options_t *w kinc_eraser_set_press_callback(penEraserDown); kinc_eraser_set_release_callback(penEraserUp); kinc_eraser_set_move_callback(penEraserMove); - kinc_gamepad_set_axis_callback(gamepadAxis); - kinc_gamepad_set_button_callback(gamepadButton); + kinc_gamepad_set_axis_callback(gamepadAxis, nullptr); + kinc_gamepad_set_button_callback(gamepadButton, nullptr); kinc_surface_set_touch_start_callback(touchStart); kinc_surface_set_touch_end_callback(touchEnd); kinc_surface_set_move_callback(touchMove); diff --git a/Kinc b/Kinc index 4d29c8c6c..38416f1a8 160000 --- a/Kinc +++ b/Kinc @@ -1 +1 @@ -Subproject commit 4d29c8c6c3e15f5c88df04ecf6a78800d50339df +Subproject commit 38416f1a8cf759a648329d4b75cc72803f513bc6