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

Add joystick hat support and ammend opengl includes to identify arm g… #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

noabody
Copy link

@noabody noabody commented Jul 29, 2018

…l.h as a structural change to support Linux x86_64 common platform.

This relates to notaz/picodrive#90 which is a pull request against picodrive master to expand the common platform to support opengl for Linux x86_64.

…l.h as a structural change to support Linux x86_64 common platform.
Copy link
Owner

@notaz notaz left a comment

Choose a reason for hiding this comment

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

Looks ok to me, just a couple of things that may need adjustment.

@@ -2,7 +2,11 @@
#include <stdlib.h>

#include <EGL/egl.h>
#include <GLES/gl.h>
#if defined(__arm__)
#include <GLES/gl.h>
Copy link
Owner

Choose a reason for hiding this comment

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

ARM doesn't automatically mean GLES, just use HAVE_GLES.

@@ -300,6 +300,34 @@ static int handle_joy_event(struct in_sdl_state *state, SDL_Event *event,
}
break;

case SDL_JOYHATMOTION:
if (event->jhat.which != state->joy_id)
return -2;
Copy link
Owner

Choose a reason for hiding this comment

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

Don't you need a check that event->jhat.hat is < 2, like in the SDL_JOYAXISMOTION case, or are there only 2 hats possible? It fear may overflow axis_keydown[] array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants