Resolutions

Previous topic - Next topic

doimus

What does GETDESKTOPSIZE return in case of these 8000x9000 workarounds? Does it return actual device res like 1024, 960, 480?

Crivens

If it's like my existing code then it tries to use the resolution in project settings and then goto native if it fails. So setup retina and a 3GS will switch to non-retina but a 4 will do retina. Use the command to retrieve the screen size if not PC otherwise set the screen size to what you want for a pc. Easy.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

ampos

Quote from: doimus on 2011-Aug-31
What does GETDESKTOPSIZE return in case of these 8000x9000 workarounds? Does it return actual device res like 1024, 960, 480?

GLB will try to open the highest resolution upto the one in the settings.

Example: on iOS you set max as 960x640 (retina). If you run it on iPads (768x1024) it will be 960x640. On 3G it will be 320x480.

getdesktopsize returns the size of the desktop, not the openen one.

If you want to know the real resolution your app is using you have to use getscreensize instead.


Kitty Hello

getdesktopsize returns the physical pixels of the display device. 320x480 for 3Gs, 1024x768 for iPad.

Crivens

Excellent. Will try it when I get the chance. I still think though that the project settings isn't very obvious to allow you to over type the resolutions and should be changed to be clearer.

Cheers
Current fave quote: Cause you like musicians and I like people with boobs.

Nathan

Just to hijack this thread with a screen resolution question.  In the Project -> Options dialog I have Platform configuration set to iPhone, with the resolution drop down I've chosen of 960x640.
However, when I compile and run my program, the window size, as given by GETSCREENSIZE is 1024,768.  Should it not create a window that has dimensions of 960x640?  (Or whatever is chosen in the options screen)
I know I can use SETSCREEN to change the resolution, but I believe this shouldn't be used for iDevices?

Kitty Hello

1024x768? Are you running it on an iPad?

Nathan

Nope, at the moment I'm doing everything on my Windows PC.
And I've just tried this at work (ahem), with the free non-registered version, at home my version is registered, but I don't think it's behaving any differently.  But please let me know where I'm going wrong...

- In the Project Options, set the Platform to Win32 and any resolution, e.g. 176x220.
- Compile and run, GETSCREENSIZE correctly shows 176x220.
- In the Project Options, change the Platform to iPhone and leave it at the default res that is given, i.e. 320x480.
- Compile and run.  GETSCREENSIZE shows the previous res of 176x220.

No one else has mentioned this so it must be something I'm doing?

ampos

This is the resolution you will get IF compiled for iPhone. If you want to test iPhone resolution on your development machine (aka windows/win32) yo have to set the screen size in the project menu for Windows/win32.

So, change your resolution from 176x220 to 320x480 onm the Win32 platform settings.

Nathan

Ahhh, I see, thanks for that Ampos.
Yeah, my intention is to do a majority of the progam development on Win32, then only compile and transfer it to Apple devices towards the end.