This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Setting the device's screen resolution


Setting the device's screen resolution

Postby Nic-Gun » Feb 14, 2008 @ 9:35am

hi there,

is it possible to change a device's resolution so it'll match my application's graphics?

currently i'm making a game using the 240x320 resolution, and then i wanted to import the game to a 480x640 resolution device without making new graphics.

will be waiting for your response. thanks.
User avatar
Nic-Gun
pm Member
 
Posts: 61
Joined: Apr 7, 2005 @ 6:50am
Location: Jakarta, Indonesia


Postby edge » Feb 14, 2008 @ 9:42am

Hi Nic-Gun,

It's not possible to change the resolution of a mobile device. You can use GAPI (which stretches 240x320 to 480x640), but it leads to a wide range of problems and isn't recommended.

I suggest scaling your resources 200% at load time for high-resolution devices, and make your application resolution aware.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Nic-Gun » Feb 14, 2008 @ 9:55am

if i'm scaling at load time, does it mean i need to create a new surface for the graphic i want to scale? won't it slow the loading process then?

and what about scaling at run time? which one is better?

edited:
by the way, which function should i use to create the new scaled object? thanks.
User avatar
Nic-Gun
pm Member
 
Posts: 61
Joined: Apr 7, 2005 @ 6:50am
Location: Jakarta, Indonesia


Postby edge » Feb 14, 2008 @ 6:49pm

EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby Nic-Gun » Feb 15, 2008 @ 5:01am

the Resize() works great. but can I get the resolution used by the device that's running my application?

I wanted to check the resolution used and then divide it bt 240x320 to get the desired scaling factor for the Resize() method.

I just found out that the default setting for config->width and config->height is 240x320 so I can't use that. any suggestion? thanks.
User avatar
Nic-Gun
pm Member
 
Posts: 61
Joined: Apr 7, 2005 @ 6:50am
Location: Jakarta, Indonesia


Postby edge » Feb 15, 2008 @ 11:49am

Hi Nic-Gun,

You can use GetWidth and GetHeight on the backbuffer surface to get the size of the display.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

cron