Mac HighDPI

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
dan369
Prole
Posts: 44
Joined: Tue Apr 15, 2014 10:53 pm

Mac HighDPI

Post by dan369 »

Hi,

Trying to figure out multiple resolutions and have it working fine on my local windows machine however on my friend'sretina macbook pro, love.window.getFullscreenModes() does not return his native resolution but an increase width / height;
I use the following code in my love.load function

Code: Select all

	high_dpi = love.window.getPixelScale();
	screen_modes = love.window.getFullscreenModes();
	window_width = love.graphics.getWidth();
	window_height = love.graphics.getHeight();
	
	love.window.setMode(screen_modes[1].width, screen_modes[1].height, {fullscreen = true, fullscreentype = "exclusive", borderless=true, x=0, y=0, highdpi = true});
Which returns on his Mac a window with the width & height of;

Image

And his resolution:

Image

What am i doing wrong?
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: Mac HighDPI

Post by Jasoco »

Because he has his display set to 1440x900 Retina mode. However the computer's display itself is physically 2560x1600 because it's meant for the default out of the box resolution of 1280x800 Retina. Basically a Retina display can go higher than what is set as default. The actual max Retina resolution of his computer is actually 1680x1050 Retina, he just has it set to the next step down. Löve returns what your current "resolution" is set to. Which may not be the same as what you actually physically have.

It's complicated. HiDPI is a totally different beast than the old displays. Both Mac and Windows deal with it differently.

Personally, I hate the old method of doing it where it would "take over" the computer and prefer to use the "desktop" mode of fullscreen rather than changing the actual resolution because it's hit or miss that a display may or may not support the resolution you're aiming for, but with Desktop mode I just let the window take the full resolution of my desktop and just scale the content to fit. Less trouble that way. But that's just me. I once played a game (Gungodz) in fullscreen where it had a large buffer of wasted corrupt space at the bottom of the screen because the engine they coded it in couldn't handle my display and my display didn't know how to properly display at whatever resolution the game was trying to change it to.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 5 guests