Page 1 of 1

Setting Default Game Window Size?

Posted: Mon Dec 13, 2021 8:03 pm
by Tiimx
Hello! I'm trying to figure out how to set the default game window size when you select "window" in the display preference menu.

Code: Select all

if renpy.variant("pc") or renpy.variant("web"):

                    vbox:
                        style_prefix "radio"
                        label _("Display")
                        textbutton _("Window") action Preference("display", "window")
                        textbutton _("Fullscreen") action Preference("display", "fullscreen")
I know by changing "window" to "all window" display will temporarily make any custom size the window size, but once you go fullscreen, or exit the game, it defaults back to it's small size. I'm having this issue for all Ren'py games, not just my own, which leads me to think it's somewhere in the Ren'py directory, but I'm lost on where I can change the preferences for this.

Edit: Sorry for the confusion, the problem is making the window display's default size the maximum size, as mine currently is not.

Re: Setting Default Game Window Size?

Posted: Mon Dec 13, 2021 8:25 pm
by rayminator
I think this might help it might work or it might not

Code: Select all

$ renpy.display("display", "fullscreen")
or this but it old code

Code: Select all

config.default_fullscreen = True
or this

Code: Select all

init:
    if not persistent.set_fullscreen:
        $ _preferences.fullscreen = True
        $ persistent.set_fullscreen = True

Re: Setting Default Game Window Size?

Posted: Mon Dec 13, 2021 8:41 pm
by Tiimx
rayminator wrote:
Mon Dec 13, 2021 8:25 pm
I think this might help it might work or it might not

Code: Select all

$ renpy.display("display", "fullscreen")
or this but it old code

Code: Select all

config.default_fullscreen = True
or this

Code: Select all

init:
    if not persistent.set_fullscreen:
        $ _preferences.fullscreen = True
        $ persistent.set_fullscreen = True
Okay First: So, these seem to work for each individual game, but where would I put them to make it work for all ren'py games.
Second: The third init block only works if the player previously has fullscreen selected, once they select windowed, it won't automatically become fullscreen anymore until they select it.
And finally, these all seem to work in the sense of making the game open as fullscreen, but it doesn't solve the problem of having the default window size change.

Making the game fullscreen isn't a problem, as there's multiple ways to do it (as you've shown), but the default size for "window" display still isn't 1920x1080 or whatever the maximum window display size is.