1
0
Fork 0

if mouse is autolocked, ignore first button click

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@585
This commit is contained in:
Ulf Wohlers 2002-12-19 14:03:44 +00:00
parent 6966af57ac
commit 3350fc0c86

View file

@ -367,7 +367,11 @@ static void HandleMouseMotion(SDL_MouseMotionEvent * motion) {
static void HandleMouseButton(SDL_MouseButtonEvent * button) {
switch (button->state) {
case SDL_PRESSED:
if (sdl.mouse.requestlock && !sdl.mouse.locked) CaptureMouse();
if (sdl.mouse.requestlock && !sdl.mouse.locked) {
CaptureMouse();
// Dont pass klick to mouse handler
break;
}
switch (button->button) {
case SDL_BUTTON_LEFT:
Mouse_ButtonPressed(0);