do not register wiimote 'mouse' clicks when the wiimote is not pointed at the screen
This commit is contained in:
parent
4b6ed2fd71
commit
5a1a5a42b4
|
@ -33,13 +33,10 @@
|
|||
#include "SDL_wiivideo.h"
|
||||
#include "SDL_wiievents_c.h"
|
||||
|
||||
int lastX = 0;
|
||||
int lastY = 0;
|
||||
Uint8 lastButtonStateA = SDL_RELEASED;
|
||||
Uint8 lastButtonStateB = SDL_RELEASED;
|
||||
|
||||
Uint8 lastButtonStateLeftMouse = SDL_RELEASED;
|
||||
Uint8 lastButtonStateRightMouse = SDL_RELEASED;
|
||||
static int lastX = 0;
|
||||
static int lastY = 0;
|
||||
static Uint8 lastButtonStateA = SDL_RELEASED;
|
||||
static Uint8 lastButtonStateB = SDL_RELEASED;
|
||||
|
||||
static SDLKey keymap[512];
|
||||
|
||||
|
@ -78,10 +75,10 @@ void PumpEvents()
|
|||
lastX = x;
|
||||
lastY = y;
|
||||
}
|
||||
}
|
||||
|
||||
Uint8 stateA = SDL_RELEASED;
|
||||
Uint8 stateB = SDL_RELEASED;
|
||||
|
||||
if (wd->btns_h & WPAD_BUTTON_A)
|
||||
{
|
||||
stateA = SDL_PRESSED;
|
||||
|
@ -101,6 +98,7 @@ void PumpEvents()
|
|||
lastButtonStateB = stateB;
|
||||
posted += SDL_PrivateMouseButton(stateB, SDL_BUTTON_RIGHT, x, y);
|
||||
}
|
||||
}
|
||||
|
||||
if (stat && (ke.type == KEYBOARD_RELEASED || ke.type == KEYBOARD_PRESSED))
|
||||
{
|
||||
|
|
Reference in a new issue