mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-05 22:30:29 +00:00
Pass the error through from the SetRelativeMouseMode() implementation
This commit is contained in:
parent
05887f2087
commit
49134ecf25
1 changed files with 5 additions and 4 deletions
|
|
@ -1369,10 +1369,11 @@ bool SDL_SetRelativeMouseMode(bool enabled)
|
|||
}
|
||||
|
||||
// Set the relative mode
|
||||
if (!mouse->SetRelativeMouseMode || !mouse->SetRelativeMouseMode(enabled)) {
|
||||
if (enabled) {
|
||||
return SDL_SetError("No relative mode implementation available");
|
||||
}
|
||||
if (!mouse->SetRelativeMouseMode) {
|
||||
return SDL_Unsupported();
|
||||
}
|
||||
if (!mouse->SetRelativeMouseMode(enabled)) {
|
||||
return false;
|
||||
}
|
||||
mouse->relative_mode = enabled;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue