start getting somewhere with that input config dialog

This commit is contained in:
StapleButter
2017-03-25 05:04:15 +01:00
parent 68eb4f6caf
commit e6124c4776
5 changed files with 253 additions and 57 deletions

View File

@ -37,6 +37,9 @@ wxIMPLEMENT_APP(wxApp_melonDS);
bool wxApp_melonDS::OnInit()
{
// http://stackoverflow.com/questions/14543333/joystick-wont-work-using-sdl
SDL_SetHint(SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS, "1");
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
{
printf("SDL shat itself :(\n");
@ -238,6 +241,10 @@ void MainFrame::ProcessSDLEvents()
if (evt.key.keysym.scancode == Config::KeyMapping[10]) NDS::ReleaseKey(16);
if (evt.key.keysym.scancode == Config::KeyMapping[11]) NDS::ReleaseKey(17);
break;
case SDL_JOYBUTTONDOWN:
printf("button %d %d\n", evt.jbutton.which, evt.jbutton.button);
break;
}
}