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:
parent
6966af57ac
commit
3350fc0c86
1 changed files with 5 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue