libsdl2: fix mouse event for relative mode

This commit is contained in:
Gerasim Troeglazov
2021-03-08 14:42:30 +10:00
parent 179c3e09e2
commit ae2ec50bf9
2 changed files with 26 additions and 14 deletions

View File

@@ -6,7 +6,7 @@ software, emulators, and popular games."
HOMEPAGE="https://www.libsdl.org/"
COPYRIGHT="1997-2021 Sam Lantinga"
LICENSE="Zlib"
REVISION="2"
REVISION="3"
SOURCE_URI="https://www.libsdl.org/release/SDL2-$portVersion.tar.gz"
CHECKSUM_SHA256="d8215b571a581be1332d2106f8036fcb03d12a70bae01e20f424976d275432bc"
SOURCE_DIR="SDL2-$portVersion"

View File

@@ -1,4 +1,4 @@
From cab82bafaa473b144c3bb04d04faf27627848a7c Mon Sep 17 00:00:00 2001
From ba669ad41dfb539c1af63bfba0c0819556f9b3ef Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Fri, 2 Feb 2018 09:40:46 +0100
Subject: Fix secondary arch build.
@@ -46,12 +46,24 @@ index b7e519b..8e15ca9 100644
2.30.0
From 91df47cd7ab55dc8eace6850ff4fab72f31364db Mon Sep 17 00:00:00 2001
From ba24f3489f7a964d0cb103c02b4f28652d83cf6a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 5 Mar 2021 17:29:13 +1000
Date: Mon, 8 Mar 2021 14:34:02 +1000
Subject: Fix relative mode for mouse
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index 34f0d5f..806fc51 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -140,7 +140,6 @@ class SDL_BWin:public BDirectWindow
_gl_type = gl_flags;
}
AddChild(_SDL_GLView);
- _SDL_GLView->SetEventMask(B_POINTER_EVENTS | B_KEYBOARD_EVENTS, B_NO_POINTER_HISTORY);
_SDL_GLView->EnableDirectMode(true);
_SDL_GLView->LockGL(); /* "New" GLViews are created */
Unlock();
diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc
index 817fccf..234eaf0 100644
--- a/src/video/haiku/SDL_bvideo.cc
@@ -108,14 +120,14 @@ index 817fccf..234eaf0 100644
2.30.0
From 825f87de8ef9a54fad03ed5e51c1faedbff5d915 Mon Sep 17 00:00:00 2001
From 5afcc48482bb072ec5d66b5966d4280a282fd640 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 5 Mar 2021 17:30:08 +1000
Date: Mon, 8 Mar 2021 14:34:40 +1000
Subject: Add support for system cursors
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index 34f0d5f..220d60a 100644
index 806fc51..974c152 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -37,6 +37,7 @@ extern "C" {
@@ -230,20 +242,20 @@ index 234eaf0..0948451 100644
2.30.0
From 45a5cbd4df36a36ab55337a16f352192c68b3178 Mon Sep 17 00:00:00 2001
From 5f40d0e1ef61d32a6d215cab9b7bb4866cbc94da Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 5 Mar 2021 17:31:02 +1000
Date: Mon, 8 Mar 2021 14:36:14 +1000
Subject: Disable direct mode for BGLView
diff --git a/src/video/haiku/SDL_BWin.h b/src/video/haiku/SDL_BWin.h
index 220d60a..2b01d11 100644
index 974c152..83bb346 100644
--- a/src/video/haiku/SDL_BWin.h
+++ b/src/video/haiku/SDL_BWin.h
@@ -142,7 +142,7 @@ class SDL_BWin:public BDirectWindow
@@ -141,7 +141,7 @@ class SDL_BWin:public BDirectWindow
_gl_type = gl_flags;
}
AddChild(_SDL_GLView);
_SDL_GLView->SetEventMask(B_POINTER_EVENTS | B_KEYBOARD_EVENTS, B_NO_POINTER_HISTORY);
- _SDL_GLView->EnableDirectMode(true);
+ _SDL_GLView->EnableDirectMode(false); /* Disable direct mode */
_SDL_GLView->LockGL(); /* "New" GLViews are created */
@@ -253,9 +265,9 @@ index 220d60a..2b01d11 100644
2.30.0
From af8a95d20ad00a3ba9e17061b65fca2826b4e421 Mon Sep 17 00:00:00 2001
From 1ccc6f46feb71a0e82c460fb4830ba3608f935e1 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 5 Mar 2021 21:54:21 +0000
Date: Mon, 8 Mar 2021 14:36:48 +1000
Subject: Fix build for gcc2