Date: Thu, 30 Dec 2021 15:45:55 GMT From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: e741c9bc8586 - main - emulators/yuzu: drop SDL < 2.0.18 workaround after 9cb3316ecd20 Message-ID: <202112301545.1BUFjtod024016@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=e741c9bc85862f3501395fc75d31d8f4de5c3258 commit e741c9bc85862f3501395fc75d31d8f4de5c3258 Author: Jan Beich <jbeich@FreeBSD.org> AuthorDate: 2021-12-30 14:51:53 +0000 Commit: Jan Beich <jbeich@FreeBSD.org> CommitDate: 2021-12-30 15:45:20 +0000 emulators/yuzu: drop SDL < 2.0.18 workaround after 9cb3316ecd20 --- emulators/yuzu/files/patch-sdl2 | 111 ---------------------------------------- 1 file changed, 111 deletions(-) diff --git a/emulators/yuzu/files/patch-sdl2 b/emulators/yuzu/files/patch-sdl2 deleted file mode 100644 index 2a55b9750e86..000000000000 --- a/emulators/yuzu/files/patch-sdl2 +++ /dev/null @@ -1,111 +0,0 @@ -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252371 - -CMake Error at CMakeLists.txt:397 (find_package): - Could not find a configuration file for package "SDL2" that is compatible - with requested version "2.0.18". - - The following configuration files were considered but not accepted: - - /usr/local/lib/cmake/SDL2/sdl2-config.cmake, version: 2.0.12 - ---- CMakeLists.txt.orig 2021-12-06 23:09:30 UTC -+++ CMakeLists.txt -@@ -398,7 +398,7 @@ if (ENABLE_SDL2) - endif() - - if (NOT YUZU_USE_BUNDLED_SDL2 AND NOT YUZU_USE_EXTERNAL_SDL2) -- find_package(SDL2 2.0.18 REQUIRED) -+ find_package(SDL2 2.0.12 REQUIRED) - - # Some installations don't set SDL2_LIBRARIES - if("${SDL2_LIBRARIES}" STREQUAL "") ---- src/input_common/drivers/sdl_driver.cpp.orig 2021-12-18 10:33:07 UTC -+++ src/input_common/drivers/sdl_driver.cpp -@@ -39,6 +39,7 @@ class SDLJoystick { (public) - } - - void EnableMotion() { -+#if SDL_VERSION_ATLEAST(2,0,14) - if (sdl_controller) { - SDL_GameController* controller = sdl_controller.get(); - if (SDL_GameControllerHasSensor(controller, SDL_SENSOR_ACCEL) && !has_accel) { -@@ -50,6 +51,7 @@ class SDLJoystick { (public) - has_gyro = true; - } - } -+#endif - } - - bool HasGyro() const { -@@ -60,6 +62,7 @@ class SDLJoystick { (public) - return has_accel; - } - -+#if SDL_VERSION_ATLEAST(2,0,14) - bool UpdateMotion(SDL_ControllerSensorEvent event) { - constexpr float gravity_constant = 9.80665f; - std::lock_guard lock{mutex}; -@@ -87,6 +90,7 @@ class SDLJoystick { (public) - motion.delta_timestamp = time_difference * 1000; - return true; - } -+#endif - - const BasicMotion& GetMotion() const { - return motion; -@@ -362,6 +366,7 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Ev - } - break; - } -+#if SDL_VERSION_ATLEAST(2,0,14) - case SDL_CONTROLLERSENSORUPDATE: { - if (auto joystick = GetSDLJoystickBySDLID(event.csensor.which)) { - if (joystick->UpdateMotion(event.csensor)) { -@@ -371,6 +376,7 @@ void SDLDriver::HandleGameControllerEvent(const SDL_Ev - } - break; - } -+#endif - case SDL_JOYDEVICEREMOVED: - LOG_DEBUG(Input, "Controller removed with Instance_ID {}", event.jdevice.which); - CloseJoystick(SDL_JoystickFromInstanceID(event.jdevice.which)); -@@ -390,7 +396,7 @@ void SDLDriver::CloseJoysticks() { - SDLDriver::SDLDriver(std::string input_engine_) : InputEngine(std::move(input_engine_)) { - if (!Settings::values.enable_raw_input) { - // Disable raw input. When enabled this setting causes SDL to die when a web applet opens -- SDL_SetHint(SDL_HINT_JOYSTICK_RAWINPUT, "0"); -+ SDL_SetHint("SDL_JOYSTICK_RAWINPUT", "0"); - } - - // Prevent SDL from adding undesired axis -@@ -398,12 +404,12 @@ SDLDriver::SDLDriver(std::string input_engine_) : Inpu - - // Enable HIDAPI rumble. This prevents SDL from disabling motion on PS4 and PS5 controllers - SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE, "1"); -- SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE, "1"); -+ SDL_SetHint("SDL_JOYSTICK_HIDAPI_PS5_RUMBLE", "1"); - SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1"); - - // Use hidapi driver for joycons. This will allow joycons to be detected as a GameController and - // not a generic one -- SDL_SetHint(SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS, "1"); -+ SDL_SetHint("SDL_JOYSTICK_HIDAPI_JOY_CONS", "1"); - - // Disable hidapi driver for xbox. Already default on Windows, this causes conflict with native - // driver on Linux. -@@ -672,6 +678,7 @@ ButtonBindings SDLDriver::GetNintendoButtonBinding( - auto sl_button = SDL_CONTROLLER_BUTTON_LEFTSHOULDER; - auto sr_button = SDL_CONTROLLER_BUTTON_RIGHTSHOULDER; - -+#if SDL_VERSION_ATLEAST(2,0,14) - if (joystick->IsJoyconLeft()) { - sl_button = SDL_CONTROLLER_BUTTON_PADDLE2; - sr_button = SDL_CONTROLLER_BUTTON_PADDLE4; -@@ -680,6 +687,7 @@ ButtonBindings SDLDriver::GetNintendoButtonBinding( - sl_button = SDL_CONTROLLER_BUTTON_PADDLE3; - sr_button = SDL_CONTROLLER_BUTTON_PADDLE1; - } -+#endif - - return { - std::pair{Settings::NativeButton::A, SDL_CONTROLLER_BUTTON_A},
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112301545.1BUFjtod024016>