mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-11-13 05:48:40 +00:00
Pass the error through from the SetRelativeMouseMode() implementation
This commit is contained in:
@@ -1369,10 +1369,11 @@ bool SDL_SetRelativeMouseMode(bool enabled)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set the relative mode
|
// Set the relative mode
|
||||||
if (!mouse->SetRelativeMouseMode || !mouse->SetRelativeMouseMode(enabled)) {
|
if (!mouse->SetRelativeMouseMode) {
|
||||||
if (enabled) {
|
return SDL_Unsupported();
|
||||||
return SDL_SetError("No relative mode implementation available");
|
|
||||||
}
|
}
|
||||||
|
if (!mouse->SetRelativeMouseMode(enabled)) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
mouse->relative_mode = enabled;
|
mouse->relative_mode = enabled;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user