_update sdl
This commit is contained in:
@@ -389,7 +389,7 @@ public:
|
||||
SDL_GetGlobalMouseState(&oldPosition.X, &oldPosition.Y);
|
||||
|
||||
Mouse::SetRelativeMode(relativeMode, window);
|
||||
if (SDL_SetWindowRelativeMouseMode(static_cast<SDLWindow*>(window)->_window, relativeMode) != 0)
|
||||
if (!SDL_SetWindowRelativeMouseMode(static_cast<SDLWindow*>(window)->_window, relativeMode))
|
||||
LOG(Error, "Failed to set mouse relative mode: {0}", String(SDL_GetError()));
|
||||
|
||||
if (!relativeMode)
|
||||
|
||||
@@ -442,7 +442,7 @@ DialogResult MessageBox::Show(Window* parent, const StringView& text, const Stri
|
||||
data.buttons = dataButtons;
|
||||
|
||||
int result = -1;
|
||||
if (SDL_ShowMessageBox(&data, &result) != 0)
|
||||
if (!SDL_ShowMessageBox(&data, &result))
|
||||
{
|
||||
#if PLATFORM_LINUX
|
||||
// Fallback to native messagebox implementation in case some system fonts are missing
|
||||
|
||||
@@ -760,7 +760,7 @@ void SDLWindow::Show()
|
||||
|
||||
if (_isTrackingMouse)
|
||||
{
|
||||
if (SDL_CaptureMouse(true) != 0)
|
||||
if (!SDL_CaptureMouse(true))
|
||||
{
|
||||
if (!SDLPlatform::UsesWayland()) // Suppress "That operation is not supported" errors
|
||||
LOG(Warning, "SDL_CaptureMouse: {0}", String(SDL_GetError()));
|
||||
@@ -1232,7 +1232,7 @@ void SDLWindow::StartTrackingMouse(bool useMouseScreenOffset)
|
||||
|
||||
if (_visible)
|
||||
{
|
||||
if (SDL_CaptureMouse(true) != 0)
|
||||
if (!SDL_CaptureMouse(true))
|
||||
{
|
||||
if (!SDLPlatform::UsesWayland()) // Suppress "That operation is not supported" errors
|
||||
LOG(Warning, "SDL_CaptureMouse: {0}", String(SDL_GetError()));
|
||||
@@ -1253,7 +1253,7 @@ void SDLWindow::EndTrackingMouse()
|
||||
_isHorizontalFlippingMouse = false;
|
||||
_isVerticalFlippingMouse = false;
|
||||
|
||||
if (SDL_CaptureMouse(false) != 0)
|
||||
if (!SDL_CaptureMouse(false))
|
||||
{
|
||||
if (!SDLPlatform::UsesWayland()) // Suppress "That operation is not supported" errors
|
||||
LOG(Warning, "SDL_CaptureMouse: {0}", String(SDL_GetError()));
|
||||
|
||||
Reference in New Issue
Block a user