Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS Retina support for GetCurrentDisplayMode #377

Open
flibitijibibo opened this issue Jan 28, 2022 · 4 comments
Open

iOS Retina support for GetCurrentDisplayMode #377

flibitijibibo opened this issue Jan 28, 2022 · 4 comments
Labels

Comments

@flibitijibibo
Copy link
Member

flibitijibibo commented Jan 28, 2022

See: f660aec fd41ed1

This may be an SDL issue though?

@TheSpydog @kiates

@TheSpydog
Copy link
Member

Whatever logic we add for this, should it go into GetGraphicsAdapters as well? I don't remember why the retina logic was only in GetCurrentDisplayMode since both deal with DisplayModes.

@flibitijibibo
Copy link
Member Author

I would think so... the thing that throws me off is how uikit doesn't give you the full unscaled res, so you can't know the maximum drawable size. I did this for Wayland and it's totally fine:

https://github.com/flibitijibibo/SDL/blob/main/src/video/wayland/SDL_waylandvideo.c#L381

@TheSpydog
Copy link
Member

For some reason SDL's UIKit driver seems pretty deliberate in choosing to use "points" over pixels for display modes. I don't really understand the rationale.

I think we could take the existing code and multiply w/h by data.uiscreen.nativeScale at the end to get the full raw size of the screen, although that'd be a breaking change for applications. Alternatively we could introduce a new SDL hint to request a full retina resolution instead of points.

@TheSpydog
Copy link
Member

SDL issue filed: libsdl-org/SDL#5290

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants