Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd fullscreen CLI option for SDL renderer #232
Conversation
1080p seems to look best to me with 1.5 font scale
805fc05
to
412e41f
Oh, cool, well done. Regarding override, I'd rather keep commandline and config commands explicit and with separation of concerns. However, it would be nice to add, in another issue, an in-game keybinding that binds to a composition of three human commands (or more?): "set internal font scale to the system's default resolution, saving the old resolution somewhere", "reload the current fontset with the current font scale, saving the old fonts and their texture atlases in a map indexed by scale; if already in the map, just restore instead of reloading" and "go fullscreen". Preferably the commands would have inverses and then the keybinding could toggle fullscreen and we could also have a toggle 'fullscreen on/off' in the settings menu that just executes the keybinding. Feel free to open any issues about that and I'd help to flesh them out. Edit: BTW, feel free to use |
windowConfig = SDL.defaultWindow {SDL.windowInitialSize = screenV2} | ||
windowConfig = SDL.defaultWindow | ||
{ SDL.windowInitialSize = screenV2 | ||
, SDL.windowMode = if sfullscreen then SDL.Fullscreen else SDL.Windowed } |
Mikolaj
Aug 30, 2020
Member
OOI, what would FullscreenDesktop
do here?
OOI, what would FullscreenDesktop
do here?
MichaelMackus
Aug 30, 2020
Author
That is a "fake fullscreen" according to SDL wiki. So, I'm assuming, fullscreen windowed mode with no borders. We can add that as a separate config/CLI option, but I left it out here for simplicity.
That is a "fake fullscreen" according to SDL wiki. So, I'm assuming, fullscreen windowed mode with no borders. We can add that as a separate config/CLI option, but I left it out here for simplicity.
Mikolaj
Aug 30, 2020
•
Member
I've done some searching and it seems each of the modes don't work for some people. Do you think it would make sense to rename the option to windowMode and let the user specify any of the values that SDL accepts? The type has Read instance, so it should work fine. In config, by default, Windowed could be set.
I've done some searching and it seems each of the modes don't work for some people. Do you think it would make sense to rename the option to windowMode and let the user specify any of the values that SDL accepts? The type has Read instance, so it should work fine. In config, by default, Windowed could be set.
Mikolaj
Aug 30, 2020
Member
Actually, it's easier to just define own 3-value type. Otherwise, each frontend module would need to provide a (usually erroring out) parser for the type, I think. Too complex.
Actually, it's easier to just define own 3-value type. Otherwise, each frontend module would need to provide a (usually erroring out) parser for the type, I think. Too complex.
MichaelMackus
Sep 4, 2020
•
Author
I can look into this. So you are saying you want me to add different CLI options for e.g. --fullscreen
and --fullscreen-windowed
? Internally, I can see this being represented in the ClientOptions as a 3 value type like you mentioned.
I can look into this. So you are saying you want me to add different CLI options for e.g. --fullscreen
and --fullscreen-windowed
? Internally, I can see this being represented in the ClientOptions as a 3 value type like you mentioned.
Mikolaj
Sep 4, 2020
Member
Thank you, I would be grateful. I guess I'd prefer to have the same schema in the config file and on command line. And in the config file, probably windowMode = FullscreenDesktop
is natural and obvious. So --windowMode FullscreenDesktop
.
Thank you, I would be grateful. I guess I'd prefer to have the same schema in the config file and on command line. And in the config file, probably windowMode = FullscreenDesktop
is natural and obvious. So --windowMode FullscreenDesktop
.
@@ -69,6 +71,7 @@ defClientOptions = ClientOptions | |||
, sallFontsScale = Nothing | |||
, sfonts = [] | |||
, sfontsets = [] | |||
, sfullscreen = False |
Mikolaj
Aug 30, 2020
Member
Could you also, in a separate commit, add this to config file, just following closely how it's done for sallFontsScale
?
Could you also, in a separate commit, add this to config file, just following closely how it's done for sallFontsScale
?
MichaelMackus
Aug 30, 2020
Author
Yes, I was looking to add to config file but ran out of time.
Yes, I was looking to add to config file but ran out of time.
@MichaelMackus: hi! how is it going? need any help? |
Better way to do this would likely be to override the font scale when in fullscreen mode. This way, we can automatically change the font scale a good setting. However, the current results look great to me in 1080p with 1.5 font scale.
Related #221