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

vid_desktopfullscreen "1" is pixelated on macOS #684

Open
Perlence opened this issue Apr 10, 2023 · 3 comments
Open

vid_desktopfullscreen "1" is pixelated on macOS #684

Perlence opened this issue Apr 10, 2023 · 3 comments
Labels

Comments

@Perlence
Copy link
Contributor

Describe the bug

The vid_desktopfullscreen "1" setting produces pixelated, low DPI output on macOS, see the original vid_desktopfullscreen "1" screenshot.

To reproduce

Set the following settings:

vid_borderless "0"
vid_desktopfullscreen "1"
vid_fullscreen "1"
vid_height "1600"
vid_width "2560"

Expected behavior

Sharp rendering, identical to the graphics we get when vid_desktopfullscreen is "0", see the original vid_desktopfullscreen "0" screenshot.

Additional context

I use vid_desktopfullscreen "1" so I can easily Cmd-Tab between applications. Otherwise I have to press Alt-Enter to exit full screen and then switch between apps.

I've tried adding SDL_WINDOW_ALLOW_HIGHDPI to the SDL_CreateWindow call and it fixed the issue for me, see the allow_hidpi vid_desktopfullscreen "1" screenshot.

flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_VULKAN;

However, doing vid_restart in the game afterwards freezes the video output. The game is going, but it's a still image.

Screenshots

Desktop

  • OS: macOS Ventura 13.3
  • GPU vendor and model: Apple M1
@Novum
Copy link
Owner

Novum commented Apr 11, 2023

High DPI stuff is a nightmare and I don't just want to set that flag as it can have unknown side effects on all sorts of different configurations and I don't have a QA department. This might need to wait until I migrate to SDL3 which handles this better.

@Novum Novum removed their assignment Apr 30, 2023
@vsonnier
Copy link
Collaborator

vsonnier commented Nov 6, 2024

Ping @Perlence Sorry for the spam, is this still a thing on master or 1.31.2 with newer SDL2 and MoltenVK ?

@Perlence
Copy link
Contributor Author

Perlence commented Nov 6, 2024

Hey @vsonnier, no worries! Unfortunately, I still have the issue on d5f8694. I made sure to remove my patch before building the latest version.

I have some thoughts on this. I assume that when vid_desktopfullscreen is "1", vkQuake asks the OS what the resolution is. I think the problem is what MacOS is telling it, because it's lying! 😁

In MacOS, you can set the display resolution:

However, changing the setting does not change the video resolution. It's always the same, determined by the display. In my case, it's 2560x1600:

image

So what does the resolution setting above do? It changes the scaling of the UI.

Given all that, here's what I get in vkQuake when vid_desktopfullscreen is "1":

]vid_describecurrentmode
1440x900x32 60Hz fullscreen

MacOS tells vkQuake the "virtual" resolution, 1440x900. I think it should tell it the real one, 2560x1600.

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

3 participants