Skip to content
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

[feat] SDL2: preliminary gamepad support #628

Merged
merged 4 commits into from
Mar 31, 2018

Conversation

Frenzie
Copy link
Member

@Frenzie Frenzie commented Mar 30, 2018

This is a "dumb" implementation that spits out fake keyboard events.

  • Left stick & d-pad: arrow keys
  • Bumpers and right stick: page up/down
  • Menu button: menu
  • A: enter
  • B: back

This is sufficient to use most of the program.

Made possible by @onde2rock's recent efforts in koreader/koreader#3796
koreader/koreader#3785 koreader/koreader#3774
koreader/koreader#3765 and koreader/koreader#3745

This is a "dumb" implementation that spits out fake keyboard events.

* Left trigger & d-pad: arrow keys
* Bumpers and right trigger: page up/down
* Menu button: menu
* A: enter
* B: back

This is sufficient to use most of the program.

Made possible by @onde2rock's recent efforts in koreader/koreader#3796
koreader/koreader#3785 koreader/koreader#3774
koreader/koreader#3765 and koreader/koreader#3745
if S.controller ~= nil then
io.write("SDL: opened gamecontroller ",joystick_counter, ": ",
ffi.string(SDL.SDL_GameControllerNameForIndex(joystick_counter)), "\n");
break
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally there'd be some kind of controller stack but for now this'll do.

@Frenzie Frenzie merged commit 266628d into koreader:master Mar 31, 2018
@Frenzie Frenzie deleted the sdl2-gamepad branch March 31, 2018 07:46
Frenzie added a commit to Frenzie/koreader that referenced this pull request Mar 31, 2018
* [feat] SDL2: preliminary gamepad support koreader/koreader-base#628

This is a "dumb" implementation that spits out fake keyboard events.

* Left stick & d-pad: arrow keys
* Bumpers and right stick: page up/down
* Menu button: menu
* A: enter
* B: back

This is sufficient to use most of the program.

Made possible by @onde2rock's recent efforts in koreader#3796
koreader#3785 koreader#3774
koreader#3765 and koreader#3745
Frenzie added a commit to koreader/koreader that referenced this pull request Mar 31, 2018
* [feat] SDL2: preliminary gamepad support koreader/koreader-base#628

This is a "dumb" implementation that spits out fake keyboard events.

* Left stick & d-pad: arrow keys
* Bumpers and right stick: page up/down
* Menu button: menu
* A: enter
* B: back

This is sufficient to use most of the program.

Made possible by @onde2rock's recent efforts in #3796
#3785 #3774
#3765 and #3745
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant