Page 1 of 1
Setting the device's screen resolution
Posted:
Feb 14, 2008 @ 9:35am
by Nic-Gun
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.
Posted:
Feb 14, 2008 @ 9:42am
by edge
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.
Posted:
Feb 14, 2008 @ 9:55am
by Nic-Gun
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.
Posted:
Feb 14, 2008 @ 6:49pm
by edge
Posted:
Feb 15, 2008 @ 5:01am
by Nic-Gun
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.
Posted:
Feb 15, 2008 @ 11:49am
by edge
Hi Nic-Gun,
You can use GetWidth and GetHeight on the backbuffer surface to get the size of the display.