-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement Native Input support for Linux #3180
Comments
Requirements The Native Input abstraction layer in O3DE (Code/Framework/AzFramework/Input) allows for creating platform specific implementations on how input is handled for keyboards, mice, touch pad, etc. For Linux, the focus will specifically be on the following types of input:
|
I can help here, once I can build and run a little better in my native distro Fedora. I've done input a few times, with the latest open a few years back for Oryol web gamepad support floooh/oryol#242. |
While the addition of the mouse and keyboard input on Linux via xcb was welcome, the gamepad/joystick support is as of yet not available. In reviewing previous discussions around this issue both sdl and glfw were discussed, and with sdl being removed recently and the glfw a seemingly simpler to grok and perhaps extract while being fairly mature. In an effort to not re-invent the wheel, I've started with an approach of creating a gem to first use glfw directly to get gamepad/joystick input on Linux with a plan to then hollow that out to just the gamepad/joystick functionality. As well glfw may lend itself to helping with #745 for wayland support. Timeline unknown however, and atm investigating an issue where the mouse cursor does not reappear when I swtich away from the windowed o3de app which is a pita. |
For the moment when in debugging mode I simply ensure that ShowCursor always shows the cursor as per this commit on the 'HiddenCursorInDebugFix' branch in my copy of the repo at commit 758e4e6e8939e771559fc054f4b7762d4c4a4928. The behaviour was such that the cursor was hidden globally for the X window system, yet unconstrained so that I could interact with the debugger but not ascertain the cursor position until an element was lit by hovering or I clicked. This likely should be more nuanced so that when the o3de app gives up the window focus it re-shows the cursor, but potentially still hides it when self focused and running. However this change unblocks me for the moment for the task at hand. |
Started to scaffold this in in o3de via my issue3180 branch while also subsequently refactoring glfw to separate the joystick/gamepad processing via an o3de_issue3180 branch in that project. |
A little long between being able to focus on this and it may be so again, however with the latest commit 466ab4c4397501ea951c40e9048f73741060dcd2 input is being polled and received per tick via the integrated glfw based gamepad code. Pretty rough still but next steps will be seeing about processing the incoming input data into input channels for distribution via the event bus. |
This issue is closed from 46d1b19 |
No description provided.
The text was updated successfully, but these errors were encountered: