Window on mac is double the size

Hi there!

I have a very simple question that probably I have already solved in the past but now I forgot how…

In my defold project on mac the window has width and height double of the values set in game.project.display.width and height. I may guess this is due to my display being retina but I don’t know how to prevent this double size.

Any help?

Thanks!

I believe checking the “High DPI” checkbox in your game.project file will solve this.

Thank @WhiteBoxDev!

Just tried! High DPI checked or unchecked same result: window of double the size…

Using Defold on macOS for a long time, haven’t noticed such behavior. Also having retina displays.
Record a video maybe?

Thanks @sergey.lerg

I created a new desktop project, launched it and taken the following screenshot

As you see the dimension of the game area is 2560 x 1440, the double of the project size 1280 x 720. Maybe this is normal for a retina display?

Ah, that’s the normal behavior for Defold on macOS. If you want the window to be smaller, you have to set smaller values in display settings of the project. Because macOS UI operates in “logical” pixels.

I think High DPI checkbox only affects rendering or coordinate calculation for things like mouse. It doesn’t affect the window size.

Thanks again @sergey.lerg! This indeed explains the behavior I see. Ciao!

3 Likes