diff options
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/joypad_ios.mm | 19 | ||||
-rw-r--r-- | platform/linuxbsd/detect.py | 37 |
2 files changed, 41 insertions, 15 deletions
diff --git a/platform/ios/joypad_ios.mm b/platform/ios/joypad_ios.mm index 057f439b81..9194b09ef6 100644 --- a/platform/ios/joypad_ios.mm +++ b/platform/ios/joypad_ios.mm @@ -305,6 +305,25 @@ void JoypadIOS::start_processing() { float value = gamepad.rightTrigger.value; Input::get_singleton()->joy_axis(joy_id, JoyAxis::TRIGGER_RIGHT, value); } + + if (@available(iOS 13, *)) { + // iOS uses 'buttonOptions' and 'buttonMenu' names for BACK and START joy buttons. + if (element == gamepad.buttonOptions) { + Input::get_singleton()->joy_button(joy_id, JoyButton::BACK, + gamepad.buttonOptions.isPressed); + } else if (element == gamepad.buttonMenu) { + Input::get_singleton()->joy_button(joy_id, JoyButton::START, + gamepad.buttonMenu.isPressed); + } + } + + if (@available(iOS 14, *)) { + // iOS uses 'buttonHome' for the GUIDE joy button. + if (element == gamepad.buttonHome) { + Input::get_singleton()->joy_button(joy_id, JoyButton::GUIDE, + gamepad.buttonHome.isPressed); + } + } }; } else if (controller.microGamepad != nil) { // micro gamepads were added in OS 9 and feature just 2 buttons and a d-pad diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index af2a271476..3f713d2db3 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -194,19 +194,21 @@ def configure(env: "Environment"): # FIXME: Check for existence of the libs before parsing their flags with pkg-config # freetype depends on libpng and zlib, so bundling one of them while keeping others - # as shared libraries leads to weird issues - if ( - env["builtin_freetype"] - or env["builtin_libpng"] - or env["builtin_zlib"] - or env["builtin_graphite"] - or env["builtin_harfbuzz"] - ): - env["builtin_freetype"] = True - env["builtin_libpng"] = True - env["builtin_zlib"] = True - env["builtin_graphite"] = True - env["builtin_harfbuzz"] = True + # as shared libraries leads to weird issues. And graphite and harfbuzz need freetype. + ft_linked_deps = [ + env["builtin_freetype"], + env["builtin_libpng"], + env["builtin_zlib"], + env["builtin_graphite"], + env["builtin_harfbuzz"], + ] + if (not all(ft_linked_deps)) and any(ft_linked_deps): # All or nothing. + print( + "These libraries should be either all builtin, or all system provided:\n" + "freetype, libpng, zlib, graphite, harfbuzz.\n" + "Please specify `builtin_<name>=no` for all of them, or none." + ) + sys.exit() if not env["builtin_freetype"]: env.ParseConfig("pkg-config freetype2 --cflags --libs") @@ -214,8 +216,8 @@ def configure(env: "Environment"): if not env["builtin_graphite"]: env.ParseConfig("pkg-config graphite2 --cflags --libs") - if not env["builtin_icu"]: - env.ParseConfig("pkg-config icu-uc --cflags --libs") + if not env["builtin_icu4c"]: + env.ParseConfig("pkg-config icu-i18n icu-uc --cflags --libs") if not env["builtin_harfbuzz"]: env.ParseConfig("pkg-config harfbuzz harfbuzz-icu --cflags --libs") @@ -270,6 +272,11 @@ def configure(env: "Environment"): if not env["builtin_pcre2"]: env.ParseConfig("pkg-config libpcre2-32 --cflags --libs") + if not env["builtin_recastnavigation"]: + # No pkgconfig file so far, hardcode default paths. + env.Prepend(CPPPATH=["/usr/include/recastnavigation"]) + env.Append(LIBS=["Recast"]) + if not env["builtin_embree"]: # No pkgconfig file so far, hardcode expected lib name. env.Append(LIBS=["embree3"]) |