mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-28 11:57:24 +08:00
Fix SDL_SetRelativeMouseMode failing with software framebuffer on Haiku
(cherry picked from commit 2c63bc7315)
This commit is contained in:
committed by
Sam Lantinga
parent
d2d655b41f
commit
ec682cc794
@@ -240,16 +240,18 @@ static bool HAIKU_SetRelativeMouseMode(bool enabled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SDL_BWin *bewin = _ToBeWin(window);
|
SDL_BWin *bewin = _ToBeWin(window);
|
||||||
BGLView *_SDL_GLView = bewin->GetGLView();
|
BView *_SDL_View = bewin->GetGLView();
|
||||||
if (!_SDL_GLView) {
|
if (!_SDL_View) {
|
||||||
return false;
|
_SDL_View = bewin->GetView();
|
||||||
}
|
if (!_SDL_View)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
bewin->Lock();
|
bewin->Lock();
|
||||||
if (enabled)
|
if (enabled)
|
||||||
_SDL_GLView->SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
|
_SDL_View->SetEventMask(B_POINTER_EVENTS, B_NO_POINTER_HISTORY);
|
||||||
else
|
else
|
||||||
_SDL_GLView->SetEventMask(0, 0);
|
_SDL_View->SetEventMask(0, 0);
|
||||||
bewin->Unlock();
|
bewin->Unlock();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user