Conversation
Closed
Adds an on-screen touch control overlay for touchscreen devices: - Virtual joystick (auto-follows the finger in the left third of the screen): digital 8-way movement through the regular +forward/+back/ +moveleft/+moveright bindings, with an outer ring that adds +speed. - Look around by dragging anywhere that isn't a control; deltas go through PostMouseMove so mouse sensitivity/invert/freelook apply. - Translucent buttons (fire, use, jump, crouch, weapon next/prev, esc) drawn with 2D primitives, no image assets. - New KEY_TOUCH_* key codes bound via engine/commonbinds.txt, so every touch button is rebindable through the existing binding system. Configs from before these keys existed get the defaults re-applied. - Touch taps act as left-mouse clicks in menus and the console. - New cvars touch_enable (auto/off/on), touch_scale, touch_alpha, touch_sensitivity, with an Options -> Input -> Touchscreen menu. - Mouse is not captured in relative mode while touch is enabled and touch-synthesized mouse events are dropped: SDL synthesizes mouse input from touches in relative mode even with the hint off, which made every touch fire mouse1. - touchtest console command simulates finger events for development without touch hardware.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note: let me add, that my deep knowledge of gzdoom is limited, but I wanted to play games based on gzdoom such as Blade of Agony on my Linux phone without setting up some custom overlays and stuff.
I haven't found any other open-source effort, so here it's.
The main inspiration was Luanti touchscreen controls (used across Linux and Android), but of course input system in gzdoom looks differently.
The menu experience is extremely annoying (small scale), but the game itself is fine.
Here is the video of freedoom (OnePlus 6T, running Mobian distribution)
Similar work for UZDoom ( https://github.com/okias/UZDoom/tree/touch-controls but not upstremable due to strict LLM policy)