From 7991015359e64e986ed7929fe5d976bb36e2bffe Mon Sep 17 00:00:00 2001 From: Robert Konrad Date: Sat, 3 Feb 2024 15:52:47 +0100 Subject: [PATCH] [Emscripten] Add missing gamepad functions --- .../Emscripten/Sources/kinc/backend/gamepad.c.h | 15 +++++++++++++++ .../Emscripten/Sources/kinc/backend/html5unit.c | 1 + 2 files changed, 16 insertions(+) create mode 100644 Backends/System/Emscripten/Sources/kinc/backend/gamepad.c.h diff --git a/Backends/System/Emscripten/Sources/kinc/backend/gamepad.c.h b/Backends/System/Emscripten/Sources/kinc/backend/gamepad.c.h new file mode 100644 index 000000000..7a2ed0b1d --- /dev/null +++ b/Backends/System/Emscripten/Sources/kinc/backend/gamepad.c.h @@ -0,0 +1,15 @@ +#include + +const char *kinc_gamepad_vendor(int gamepad) { + return "None"; +} + +const char *kinc_gamepad_product_name(int gamepad) { + return "Gamepad"; +} + +bool kinc_gamepad_connected(int gamepad) { + return false; +} + +void kinc_gamepad_rumble(int gamepad, float left, float right) {} diff --git a/Backends/System/Emscripten/Sources/kinc/backend/html5unit.c b/Backends/System/Emscripten/Sources/kinc/backend/html5unit.c index 48072f369..08c2b4b1f 100644 --- a/Backends/System/Emscripten/Sources/kinc/backend/html5unit.c +++ b/Backends/System/Emscripten/Sources/kinc/backend/html5unit.c @@ -1,6 +1,7 @@ #include "audio.c.h" #include "display.c.h" #include "event.c.h" +#include "gamepad.c.h" #include "mouse.c.h" #include "mutex.c.h" #include "semaphore.c.h"