mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-10-16 06:45:59 +00:00
Only lock the pointer for mouse relative mode, there isn't really a concept of grab and confinement on iOS
Locking the pointer prevents the on-screen cursor from moving, which isn't what we want with a grab behavior. Fixes https://github.com/libsdl-org/SDL/issues/4941
This commit is contained in:
@@ -250,14 +250,7 @@ SDL_HideHomeIndicatorHintChanged(void *userdata, const char *name, const char *o
|
||||
|
||||
- (BOOL)prefersPointerLocked
|
||||
{
|
||||
SDL_VideoDevice *_this = SDL_GetVideoDevice();
|
||||
|
||||
if (SDL_HasGCMouse() &&
|
||||
(SDL_GCMouseRelativeMode() || _this->grabbed_window == window)) {
|
||||
return YES;
|
||||
} else {
|
||||
return NO;
|
||||
}
|
||||
return SDL_GCMouseRelativeMode() ? YES : NO;
|
||||
}
|
||||
|
||||
#endif /* !TARGET_OS_TV */
|
||||
|
Reference in New Issue
Block a user