Bug Tracker – Bug 1284

Joystick buttons presses letter in the console

Last modified: 2020-04-12 16:21:56 UTC
Bug 1284 - Joystick buttons presses letter in the console
Summary: Joystick buttons presses letter in the console
Status: NEW
Alias: None
Product: Odamex
Classification: Unclassified
Component: Client (show other bugs)
Version: 0.8.x
Hardware: All Other
: P5 enhancement
Assignee: Odamex Bug Reporter
Depends on:
Reported: 2019-05-31 11:51 UTC by Maëllig Desmottes
Modified: 2020-04-12 16:21 UTC (History)
2 users (show)

See Also:


Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this bug.
Description Maëllig Desmottes 2019-05-31 11:51:47 UTC
When using a joystick in the console, Odamex considers joystick buttons as keyboard presses from keys. Definitely not a normal way to handle it...

Tested on Odamex PC, Xbox, and on the Switch port.
Comment 1 Dr. Sean 2020-04-12 16:21:56 UTC
A fix has been submitted for this: https://github.com/odamex/odamex/commit/dd7e5034f4fa19942bd10a89f18fa758add41354

Joystick button events should not use event_t::data2 or event_t::data3 as those are reserved for storing the text value of key presses. The old code would add the button value to event_t::data2, resulting in a character being displayed in the console.