From 992a83003db7e84f27989b36eabcc9689163aacd Mon Sep 17 00:00:00 2001 From: Matthew Hurley Date: Tue, 20 Oct 2026 11:22:27 +1000 Subject: [PATCH] tests: stub VR pad ports in controller settings tests (#1741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * tests: stub VR pad ports in controller settings tests #1726 added PadVrPortHand/PadVrPort/PadVrClose calls to controller.cpp, which controller_settings_tests #includes directly, breaking its link (the full-emulator tests pick up libs/padVr.cpp via glob and are fine). Stub the three VR entry points as unavailable, matching the file's existing DualSenseHaptics fakes. 🤖 Generated with Codebuff Co-Authored-By: Codebuff * tests: stub PadVrCheckHandle for the Windows controller settings link --------- Co-authored-by: Matthew Hurley <171001439+theantipopau@users.noreply.github.com> Co-authored-by: Codebuff Co-authored-by: nmzik --- tests/ControllerSettingsTests.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/ControllerSettingsTests.cpp b/tests/ControllerSettingsTests.cpp index fe01678d3..03b73026a 100644 --- a/tests/ControllerSettingsTests.cpp +++ b/tests/ControllerSettingsTests.cpp @@ -90,6 +90,14 @@ void Delay(Uint32) {} #undef SDL_CloseGamepad #undef SDL_Delay +namespace Libs::Controller { +// No virtual headset in these tests (padVr.cpp is not linked here). +int PadVrPortHand(int) { return -1; } +int PadVrPort(int, int, int, bool) { return PAD_ERROR_INVALID_ARG; } +int PadVrCheckHandle(int) { return PAD_ERROR_INVALID_HANDLE; } +int PadVrClose(int) { return PAD_ERROR_INVALID_HANDLE; } +} // namespace Libs::Controller + namespace Libs::Controller::DualSenseHaptics { bool SetVibration(int, uint8_t large_motor, uint8_t small_motor, uint32_t duration_ms) { haptics.push_back({large_motor, small_motor, duration_ms});