devkitPro / SDL

Simple Directmedia Layer
https://libsdl.org
zlib License
15 stars 12 forks source link

Mouse and keyboard support for Switch? #5

Closed rsn8887 closed 3 years ago

rsn8887 commented 5 years ago

It would be great to have mouse and keyboard support for the Switch. I implemented it for Vita a long time ago, but I am not sure how to do it for Switch. The libnx functions to read mouse/keyboard are quite different compared to the VitaSDK functions, I am not sure how to read them correctly.

Keyboard/Mouse support for Vita is here: https://github.com/rsn8887/SDL-Vita/blob/master/src/video/vita/SDL_vitakeyboard.c https://github.com/rsn8887/SDL-Vita/blob/master/src/video/vita/SDL_vitamouse.c

And the inits here: https://github.com/rsn8887/SDL-Vita/blob/2010f2d6dfaca01b02465f29fb70eba454326aca/src/video/vita/SDL_vitavideo.c#L192

and the polls here: https://github.com/rsn8887/SDL-Vita/blob/2010f2d6dfaca01b02465f29fb70eba454326aca/src/video/vita/SDL_vitavideo.c#L340

rsn8887 commented 5 years ago

I will try.