SDL: Fix SDL_SetRelativeMouseMode failing with software framebuffer on Haiku

From 2c63bc73156e932d71d4fb1deef418a226b9e0db Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Gustaf=20Alh=C3=A4ll?= <[EMAIL REDACTED]>
Date: Sat, 11 Oct 2025 14:49:26 +0200
Subject: [PATCH] Fix SDL_SetRelativeMouseMode failing with software
 framebuffer on Haiku

---
 src/video/haiku/SDL_bvideo.cc | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/src/video/haiku/SDL_bvideo.cc b/src/video/haiku/SDL_bvideo.cc
index e287744d7fead..0e81a074a6529 100644
--- a/src/video/haiku/SDL_bvideo.cc
+++ b/src/video/haiku/SDL_bvideo.cc
@@ -240,16 +240,18 @@ static bool HAIKU_SetRelativeMouseMode(bool enabled)
     }
 
 	SDL_BWin *bewin = _ToBeWin(window);
-	BGLView *_SDL_GLView = bewin->GetGLView();
-    if (!_SDL_GLView) {
-        return false;
-    }
+	BView *_SDL_View = bewin->GetGLView();
+	if (!_SDL_View) {
+		_SDL_View = bewin->GetView();
+		if (!_SDL_View)
+			return false;
+	}
 
 	bewin->Lock();
 	if (enabled)
-		_SDL_GLView->SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
+		_SDL_View->SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
 	else
-		_SDL_GLView->SetEventMask(0, 0);
+		_SDL_View->SetEventMask(0, 0);
 	bewin->Unlock();
 
     return true;