-
-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
@@ -74,13 +74,31 @@ void SDL_SYS_JoystickUpdate (SDL_Joystick *joystick) { | |||
SDL_PrivateJoystickButton (joystick, 7, SDL_PRESSED); | |||
} | |||
if ((key_press & KEY_START)) { | |||
SDL_PrivateJoystickButton (joystick, 8, SDL_PRESSED); |
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.
This is why the Start button didn't work… I'm surprised nobody noticed it until now 😂
pos= 1<<i; | ||
if(hidkey&pos) keymap[i]=key; | ||
} | ||
// Do nothing |
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.
This function can't be removed, SDL relies on it.
SDL_PrivateKeyboard (SDL_RELEASED, &keysym); | ||
} | ||
} | ||
|
||
if (hidKeysHeld() & KEY_TOUCH) { |
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.
Not super happy about it, but I guess it doesn't hurt, so I left the touchscreen mapping to the mouse API. Proper support for touchscreens was added to SDL2, so I guess this is better than nothing.
keymap[0]=SDLK_a; //KEY_A | ||
keymap[1]=SDLK_b; // KEY_B | ||
keymap[2]=SDLK_ESCAPE; //KEY_SELECT | ||
keymap[3]=SDLK_RETURN; //KEY_START |
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.
Random button-to-key mapping like this makes no sense in a SDL port IMO.
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.
Good call. This belongs in the port using SDL, not SDL itself.
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.
Yep, I also had to work around this in OpenJazz.
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.
Thanks for reporting that so we could do something about it @carstene1ns. Much appreciated.
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.
Well, I found no sane way to have this backward compatible. This breaks quite a lot homebrew this way unfortunately.
Right now you will get an undefined reference, because include/SDL_keyboard.h
was not updated to remove the function.
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.
But I didn't remove the implementation either, because otherwise it crashes in runtime. I left the implementation empty: https://github.com/devkitPro/SDL/pull/57/files#r432952006
Is that what you were referring to?
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.
SDL_N3DSKeyBind()
is gone.
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.
😱 You're right, that bit didn't make it into this PR, not sure how it went missing. I'm AFK right now but I will fix it ASAP
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 I didn't miss it when I cherry picked the changes, I never deleted it. However, it doesn't fail with undefined reference because it's never used. Anyway, I'll clean it up in a PR in a few hours, sorry about that!
Nice job. Was worth keeping the individual commits as well so I rebased rather than the usual squash. |
palette[i] = N3DS_MAP_RGB(colors[i].r, colors[i].g, colors[i].b); | ||
{ | ||
int colorIndex = i - firstcolor; | ||
palette[i] = N3DS_MAP_RGB(colors[colorIndex].r, colors[colorIndex].g, colors[colorIndex].b); |
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.
Good find!
This PR fixes a bunch of bugs that I found while porting https://github.com/sergiou87/open-supaplex to 3DS:
SetColors
function for 3DS, which assumed the inputcolors
array was a 256 colors array, but it's not. That parameter hasncolors
inside.