PSP SDL input

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
User avatar
Thanhda
Posts: 331
Joined: Sat Apr 09, 2005 2:08 am
Location: Canada
Contact:

PSP SDL input

Post by Thanhda »

Just wondering how does it catch the input. i read the readme, and it says a list of numbers for the inputs. saying 8 is Down pad. So when i try coding it, i was wondering, do i use SDLK_8 for downpad, or am i supose to write my own catch function to catch the value 8. such as getch() or scanf.
There are 10 types of people in the world: Those who understand binary, and those who don't...
ufoz
Posts: 86
Joined: Thu Nov 10, 2005 2:36 am
Location: Tokyo
Contact:

Post by ufoz »

IIRC, psp-sdl maps all the buttons on the psp as joystick buttons (except for the volume control remote buttons which are mapped as keyboard events) so the numbers in the reference are joystick button indices. You need to setup a joystick in sdl and when querying button status, use the given button numbers .

http://www.libsdl.org/cgi/docwiki.cgi/S ... kGetButton

edit: or if you set it up to send joystick events, http://www.libsdl.org/cgi/docwiki.cgi/S ... uttonEvent
Post Reply