-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Fullscreen not working in Godot 4 when passed to DisplayServer create function #54065
Comments
I'm not so sure about the |
|
@akien-mga ok then all the more reason to not use it for this issure lol |
Also, I just verified that this issue is also present on Windows (Win11, Intel i5-8250U, Nvidia MX 110), so it shouldn't be OS specific |
The implementation of fullscreen is part of |
For the sake of completeness, here is the Reddit thread mentioned: https://old.reddit.com/r/godot/comments/qclznk/fullscreen_not_working_in_godot_4/ |
I'm sorry, I thought you were indeed criticizing the use of the label |
Have you tried with the (I just tried This was on Linux (elementary OS 5.1) with:
|
I can confirm the issue on Linux (Mageia 9), didn't test other platforms yet. On the other hand it works fine for the editor itself (one can toggle fullscreen with Shift+F11). Running the project with |
I also tested this (on Windows) with the latest three builds of Godot 4 (15/10, 04/10 and 29/09) and it is still present |
This seems to be caused by this chunk of code: Lines 1271 to 1302 in 9c9ec63
|
FWIW a project with:
|
That's not the issue, The problem seems to be that when the DisplayServer is created with Line 1509 in 9c9ec63
Then even if Lines 1616 to 1618 in 9c9ec63
In practice when godot/platform/linuxbsd/display_server_x11.cpp Line 3858 in 9c9ec63
That's from looking at the |
Yes sorry I noticed that it was |
Note that via the CLI Lines 740 to 748 in 9c9ec63
Note that via project settings Lines 1295 to 1297 in 9c9ec63
Both Lines 1509 to 1516 in 9c9ec63
The Lines 1609 to 1625 in 9c9ec63
Although I assume there's a distinction between initialization & mode setting, it does seem a little odd to have what appears to be duplication. Is this actually intentional; or, a side effect of search/replace on an older implementation; or, a "belt and suspenders" backup? If intentional, it seems wise to maybe only use |
This is the commit where the initial change was made: f8a79a9#diff-18b7c19417a461e4793bb2157831659d96ede991391e10ee5bc51f19453b7685L1186 And from a quick glance it seems like the lack of |
Okay, after running it under
|
On macOS, fullscreen (set in the Project settings or with |
via
but when it is fullscreen we get:
(As set by: godot/platform/linuxbsd/display_server_x11.cpp Lines 1431 to 1434 in 9c9ec63
So, at least for X11 it seems we need to check at some point whether or not the fullscreen has taken effect--before we assume it has. (And there does seem to be some other "double-checking" code already, e.g.: godot/platform/linuxbsd/display_server_x11.cpp Lines 1400 to 1407 in 9c9ec63
|
As a workaround, this worked for me on Linux in a script attached to the main scene:
|
For Visual Script users, you can use this as a workaround: How to setup a window_set_mode() node:
You can see all the available int values for window_set_mode() here. |
Still reproducible as of 4.0 alpha 12. |
Fixed for Windows with #63914, but still pending a different fix for Linux. |
Godot version
4.0.dev
System information
Issue verified on:
Issue description
I am trying to port my game from Godot 3 to Godot 4. Somehow, even fullscreen isn't working, even though it is turned on in the settings:
I know the resolution is 1024x600, the Godot default, but on Godot 3 that isn't a problem and the window simply gets scaled to completely fill my 1080p screen. From an answer I received on reddit, from a user also having this issue, it seems to happen regardless of GPU brand and regardless of how Godot 4 is "acquired" (manual build or download from the pre-alpha releases) and of whether the project is run from the editor or as an executable.
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: