mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-06 03:18:13 +00:00
Fix vision os fake screen size
It never really worked, as the value was arbitrary, digging apple docs showed the right values.
This commit is contained in:

committed by
Sam Lantinga

parent
3c90b1c1f6
commit
a057240984
@@ -56,10 +56,12 @@ extern void UIKit_QuitModes(SDL_VideoDevice *_this);
|
|||||||
extern int UIKit_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect);
|
extern int UIKit_GetDisplayUsableBounds(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect);
|
||||||
|
|
||||||
// because visionOS does not have a screen
|
// because visionOS does not have a screen
|
||||||
// we create a fake 1080p display to maintain compatibility.
|
// we create a fake display to maintain compatibility.
|
||||||
|
// By default, a window measures 1280x720 pt.
|
||||||
|
// https://developer.apple.com/design/human-interface-guidelines/windows#visionOS
|
||||||
#ifdef SDL_PLATFORM_VISIONOS
|
#ifdef SDL_PLATFORM_VISIONOS
|
||||||
#define SDL_XR_SCREENWIDTH 1920
|
#define SDL_XR_SCREENWIDTH 1280
|
||||||
#define SDL_XR_SCREENHEIGHT 1080
|
#define SDL_XR_SCREENHEIGHT 720
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* SDL_uikitmodes_h_ */
|
#endif /* SDL_uikitmodes_h_ */
|
||||||
|
Reference in New Issue
Block a user