mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Better UX when touch events aren't supported by Irrlicht device (#15288)
This commit is contained in:
parent
24704b01d9
commit
9f43018df2
10 changed files with 50 additions and 4 deletions
|
@ -349,14 +349,16 @@ local function check_requirements(name, requires)
|
|||
|
||||
local video_driver = core.get_active_driver()
|
||||
local shaders_support = video_driver == "opengl" or video_driver == "opengl3" or video_driver == "ogles2"
|
||||
local touch_support = core.irrlicht_device_supports_touch()
|
||||
local touch_controls = core.settings:get("touch_controls")
|
||||
local special = {
|
||||
android = PLATFORM == "Android",
|
||||
desktop = PLATFORM ~= "Android",
|
||||
-- When touch_controls is "auto", we don't which input method will be used,
|
||||
-- so we show settings for both.
|
||||
touchscreen = touch_controls == "auto" or core.is_yes(touch_controls),
|
||||
keyboard_mouse = touch_controls == "auto" or not core.is_yes(touch_controls),
|
||||
touch_support = touch_support,
|
||||
-- When touch_controls is "auto", we don't know which input method will
|
||||
-- be used, so we show settings for both.
|
||||
touchscreen = touch_support and (touch_controls == "auto" or core.is_yes(touch_controls)),
|
||||
keyboard_mouse = not touch_support or (touch_controls == "auto" or not core.is_yes(touch_controls)),
|
||||
shaders_support = shaders_support,
|
||||
shaders = core.settings:get_bool("enable_shaders") and shaders_support,
|
||||
opengl = video_driver == "opengl",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue