Windows scale

Hello,

I tried my game on another computer and I have a problem with the orthographic zoom.

I found a post about scaling_factor on retina / hdpi screen. But it is not the problem, defos gives a scaling_factor of 1.

I found out that the get_window_width() and get_window_height() are not the same as on my dev computer… And also different from get_width() and get_height().
The problem is : the scale in the system > display properties of windows. It is set to 125%. At 100% there is no problem.

Is there a good way to handle the windows scaling property ?
Defos gives the scale of the monitor, but I didn’t find something about the Windows scale…

1 Like

What is the problem?

local width, height = window.get_size()

Is this value not including the 125% scale?

The window is 25% bigger that is the problem.
Is there a way to get the windows scaling property like the scaling factor ?

I’m having the same problem where DefOS reports the scaling factor as always one. I’m working on a game that extends upon multiple screens, and changing the window from one screen to another messes with my camera’s (orthographic) zoom.

Have you found a solution yet?

1 Like

This seems to be a recurring issue. Maybe we need to integrate this functionality into the Defold main API, in the window.* namespace.

4 Likes

That would be lovely, as it would help me greatly with the feature I’m working on and the game I am developing. A getter and a callback would definitely fix it for me as I think of it now.

There is this issue about it on Defold’s repository, and also this one on DefOS’s repository. Is there a need to open a separate request issue?

1 Like