7 #define kPollEveryNFrames 3
9 static uint32 joypads[2];
11 static void processEvent(const SDL_Event& event)
16 if (Config.action[event.key.keysym.scancode])
17 S9xDoAction(Config.action[event.key.keysym.scancode]);
18 joypads[0] |= Config.joypad1Mapping[event.key.keysym.scancode];
21 joypads[0] &= ~Config.joypad1Mapping[event.key.keysym.scancode];
24 Config.quitting = true;
29 uint32 S9xReadJoypad (int which)
31 if (which < 0 || which > 2) {
35 return joypads[which];
38 bool8 S9xReadMousePosition (int /* which1 */, int &/* x */, int & /* y */,
39 uint32 & /* buttons */)
44 bool8 S9xReadSuperScopePosition (int & /* x */, int & /* y */,
45 uint32 & /* buttons */)
50 void S9xProcessEvents(bool8_32 block)
55 SDL_WaitEvent(&event);
58 while(SDL_PollEvent(&event))
65 void S9xInitInputDevices()
67 joypads[0] = 0x80000000UL;
70 printf("Input: 1 joypad, hw keyboard input only\n");