diff --git a/src/input/gamepad.cpp b/src/input/gamepad.cpp index 859b1dcfe6e..d4215a99fe2 100644 --- a/src/input/gamepad.cpp +++ b/src/input/gamepad.cpp @@ -32,7 +32,7 @@ namespace input::gamepad { void free_gamepad(platf::input_t &platf_input, int id) { - platf::gamepad(platf_input, id, platf::gamepad_state_t {}); + platf::gamepad_update(platf_input, id, platf::gamepad_state_t {}); platf::free_gamepad(platf_input, id); free_id(gamepadMask, id); @@ -313,18 +313,18 @@ namespace input::gamepad { // Force the back button up gamepad.back_button_state = button_state_e::UP; state.buttonFlags &= ~platf::BACK; - platf::gamepad(PlatformInput::getInstance(), gamepad.id, state); + platf::gamepad_update(PlatformInput::getInstance(), gamepad.id, state); // Press Home button state.buttonFlags |= platf::HOME; - platf::gamepad(PlatformInput::getInstance(), gamepad.id, state); + platf::gamepad_update(PlatformInput::getInstance(), gamepad.id, state); // Sleep for a short time to allow the input to be detected std::this_thread::sleep_for(std::chrono::milliseconds(100)); // Release Home button state.buttonFlags &= ~platf::HOME; - platf::gamepad(PlatformInput::getInstance(), gamepad.id, state); + platf::gamepad_update(PlatformInput::getInstance(), gamepad.id, state); gamepad.back_timeout_id = nullptr; }; @@ -338,7 +338,7 @@ namespace input::gamepad { } } - platf::gamepad(PlatformInput::getInstance(), gamepad.id, gamepad_state); + platf::gamepad_update(PlatformInput::getInstance(), gamepad.id, gamepad_state); gamepad.gamepad_state = gamepad_state; } diff --git a/src/input/keyboard.cpp b/src/input/keyboard.cpp index c272d115ba4..7d715155c92 100644 --- a/src/input/keyboard.cpp +++ b/src/input/keyboard.cpp @@ -154,28 +154,28 @@ namespace input::keyboard { if (!release) { // Press any synthetic modifiers required for this key if (synthetic_modifiers & MODIFIER_SHIFT) { - platf::keyboard(PlatformInput::getInstance(), VKEY_SHIFT, false, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_SHIFT, false, flags); } if (synthetic_modifiers & MODIFIER_CTRL) { - platf::keyboard(PlatformInput::getInstance(), VKEY_CONTROL, false, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_CONTROL, false, flags); } if (synthetic_modifiers & MODIFIER_ALT) { - platf::keyboard(PlatformInput::getInstance(), VKEY_MENU, false, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_MENU, false, flags); } } - platf::keyboard(PlatformInput::getInstance(), map_keycode(key_code), release, flags); + platf::keyboard_update(PlatformInput::getInstance(), map_keycode(key_code), release, flags); if (!release) { // Raise any synthetic modifier keys we pressed if (synthetic_modifiers & MODIFIER_SHIFT) { - platf::keyboard(PlatformInput::getInstance(), VKEY_SHIFT, true, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_SHIFT, true, flags); } if (synthetic_modifiers & MODIFIER_CTRL) { - platf::keyboard(PlatformInput::getInstance(), VKEY_CONTROL, true, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_CONTROL, true, flags); } if (synthetic_modifiers & MODIFIER_ALT) { - platf::keyboard(PlatformInput::getInstance(), VKEY_MENU, true, flags); + platf::keyboard_update(PlatformInput::getInstance(), VKEY_MENU, true, flags); } } } @@ -268,7 +268,7 @@ namespace input::keyboard { // already released continue; } - platf::keyboard(platf_input, vk_from_kpid(kp.first) & 0x00FF, true, flags_from_kpid(kp.first)); + platf::keyboard_update(platf_input, vk_from_kpid(kp.first) & 0x00FF, true, flags_from_kpid(kp.first)); key_press[kp.first] = false; } } diff --git a/src/input/pen.cpp b/src/input/pen.cpp index 8c9a78bf8ef..943186f1cf8 100644 --- a/src/input/pen.cpp +++ b/src/input/pen.cpp @@ -105,7 +105,7 @@ namespace input::pen { contact_area.second, }; - platf::pen(input->client_context.get(), abs_port, pen); + platf::pen_update(input->client_context.get(), abs_port, pen); } /** diff --git a/src/input/processor.cpp b/src/input/processor.cpp index 7e75b75adc7..e59bd658038 100644 --- a/src/input/processor.cpp +++ b/src/input/processor.cpp @@ -274,8 +274,8 @@ namespace input { bool probe_gamepads() { - auto input = static_cast(platf_input.get()); - const auto gamepads = platf::supported_gamepads(input); + platf::input_t &input = PlatformInput::getInstance(); + const auto gamepads = platf::supported_gamepads(reinterpret_cast(&input)); for (auto &gamepad : gamepads) { if (gamepad.is_enabled && gamepad.name != "auto") { return false; diff --git a/src/input/touch.cpp b/src/input/touch.cpp index 1b5a6cb625e..ae4239bd32f 100644 --- a/src/input/touch.cpp +++ b/src/input/touch.cpp @@ -111,7 +111,7 @@ namespace input::touch { contact_area.second, }; - platf::touch(input->client_context.get(), abs_port, touch); + platf::touch_update(input->client_context.get(), abs_port, touch); } /** diff --git a/src/platform/macos/input.cpp b/src/platform/macos/input.cpp index 992d25f7126..674633d3dfb 100644 --- a/src/platform/macos/input.cpp +++ b/src/platform/macos/input.cpp @@ -2,7 +2,8 @@ * @file src/platform/macos/input.cpp * @brief todo */ -#include "src/input.h" +#include "src/input/common.h" +#include "src/input/processor.h" #import #include diff --git a/tests/unit/test_httpcommon.cpp b/tests/unit/test_httpcommon.cpp index 87e83e4ae8b..e72b242de2a 100644 --- a/tests/unit/test_httpcommon.cpp +++ b/tests/unit/test_httpcommon.cpp @@ -2,7 +2,7 @@ * @file tests/test_httpcommon.cpp * @brief Test src/httpcommon.*. */ -#include +#include #include diff --git a/tests/unit/test_mouse.cpp b/tests/unit/test_mouse.cpp index d97cb9c1ec6..1c3b3a146cb 100644 --- a/tests/unit/test_mouse.cpp +++ b/tests/unit/test_mouse.cpp @@ -2,7 +2,7 @@ * @file tests/unit/test_mouse.cpp * @brief Test src/input.*. */ -#include +#include #include #include