Homebrew Question SDL Event Polling

Fleetscut

New Member
OP
Newbie
Joined
Jul 2, 2018
Messages
3
Trophies
0
Age
44
XP
216
Country
Canada
Ive managed to put together a simple SDL app and can get images and colors to be displayed. The thing i am trying to figure out right now is how to look for controller events. Ive tried to check for various event types by putting some checks into the applet loop but it doesnt look like any of the bellow are getting triggered. Is there a special event type that needs to be checked for?

Code:
while (SDL_PollEvent(&event)) {
            switch(event.type) {
                case SDL_KEYDOWN:
                    printf("Keyboard button was pressed\n");
                case SDL_JOYBUTTONDOWN:
                    printf("Joystick button was pressed\n");
                case SDL_CONTROLLERBUTTONDOWN:
                    printf("Controller button was pressed\n");
            }
}

Ive managed to get the regular hid* functions to work for joycon input but was wondering how to get the SDL libraries to work.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    Xdqwerty @ Xdqwerty: if i have time for that