Disable automatic window resizing

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Tayruu
Regular
Posts: 79
Joined: Sat Jul 05, 2014 7:57 pm

Disable automatic window resizing

#1 Post by Tayruu » Wed Jan 10, 2018 2:29 am

It seems that Ren'py has a function to decrease the game size if it's too close to the OS's current resolution.

As an example, I currently have my resolution set to 1368x912. My Ren'py project is supposed to be 1280x800 - that ought to fit on screen, but Ren'py decreases it ever so slightly, down to 1265x712, and I don't see any way to force it to be 1280x800. The game remains its native resolution if the OS (W10) resolution is 1600x900 or more.

Using config.adjust_view_size seems to give a native-looking resolution, but throws a subsurface rectangle outside surface area error during transitions, perhaps because of trying to render at the full resolution while the screen has been resized. Starting in full-screen avoids the error, even when returning to windowed mode.

I'm looking for a way to prevent this resizing, so the game renders natively since it ought to be able to. (Honestly this is all because I've set my OS resolution itself to something not-native, because 2736x1824 is just silly.)

User avatar
Imperf3kt
Eileen-Class Veteran
Posts: 1111
Joined: Mon Dec 14, 2015 5:05 am
Location: Your monitor
Contact:

Re: Disable automatic window resizing

#2 Post by Imperf3kt » Wed Jan 10, 2018 3:12 am

Are you running windowed? You must account for the titlebar and border edges of the window itself.
Image

Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Post Reply

Who is online

Users browsing this forum: jacobjumper, PyTom