mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-29 20:57:59 +08:00
The pixel density on Apple Vision Pro is 2.0
This commit is contained in:
@@ -270,7 +270,8 @@ bool UIKit_AddDisplay(UIScreen *uiscreen, bool send_event)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef SDL_PLATFORM_VISIONOS
|
#ifdef SDL_PLATFORM_VISIONOS
|
||||||
bool UIKit_AddDisplay(bool send_event){
|
bool UIKit_AddDisplay(bool send_event)
|
||||||
|
{
|
||||||
CGSize size = CGSizeMake(SDL_XR_SCREENWIDTH, SDL_XR_SCREENHEIGHT);
|
CGSize size = CGSizeMake(SDL_XR_SCREENWIDTH, SDL_XR_SCREENHEIGHT);
|
||||||
SDL_VideoDisplay display;
|
SDL_VideoDisplay display;
|
||||||
SDL_DisplayMode mode;
|
SDL_DisplayMode mode;
|
||||||
@@ -278,7 +279,7 @@ bool UIKit_AddDisplay(bool send_event){
|
|||||||
SDL_zero(mode);
|
SDL_zero(mode);
|
||||||
mode.w = (int)size.width;
|
mode.w = (int)size.width;
|
||||||
mode.h = (int)size.height;
|
mode.h = (int)size.height;
|
||||||
mode.pixel_density = 1;
|
mode.pixel_density = 2;
|
||||||
mode.format = SDL_PIXELFORMAT_ABGR8888;
|
mode.format = SDL_PIXELFORMAT_ABGR8888;
|
||||||
mode.refresh_rate = 60.0f;
|
mode.refresh_rate = 60.0f;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user