-
Notifications
You must be signed in to change notification settings - Fork 33
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
Raw input #354
Conversation
src/game_api/game_manager.hpp
Outdated
bool enabled; | ||
uint8_t padding1[3]; | ||
int8_t input_index; | ||
uint8_t padding2[3]; | ||
uint32_t buttons; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The struct is
4x bool
int8 input_index
//probably padding
int32 buttons
int8 unknown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first bool is disabled not enabled
second one is like enabled or something (setting false disables it)
dunno about third
fourth is "connected" - if set to false you get popup about controller disconnected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, third one is like "can_use_menu"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah I figured there must be more of them, but didn't actually even test what the first one does. The controllers kept getting reserved, not being able to switch to again, even though not set in any input_index, and some of these is probably why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The last byte is used as first parameter to XInputSetState
, at least for the XInput controllers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the first bool is disabled not enabled
second one is like enabled or something (setting false disables it)
dunno about third
fourth is "connected" - if set to false you get popup about controller disconnectedthese didn't make any sense after all, everything you said seems backwards
the fourth i made mistake it's more like "lost_connection" the rest should be correct, so by default you have:
false
true
true
false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for keyboard those are not default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i guess we're wrong about the first two (what they mean), and keyboard doesn't seam to care about the menu one
or the struct are different for keyboard vs controller
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whatever, not really even smart to expose that struct to the api...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also the struct is much larger, seen accessed qword at offset 0x280
This is still in a bit of a weird state, but I think I'll merge it cause I may have merged even dumber stuff earlier and this fixes some of that. |
Tried to figure out more of the input tables.
get_raw_input
-> RawInput* to view all pressed keyboard keys and controller buttons without imguiON.PRE/POST_PROCESS_INPUT
to disable or capture all input