Skip to main content
mattr8755445
Known Participant
October 28, 2018
Question

Changing screen resolution in Windows app?

  • October 28, 2018
  • 1 reply
  • 1073 views

Hey, I'm releasing an AIR game for Windows soon, and was wondering if there's any way to change the user's screen resolution.

From what I've seen, there's no ANE for this, and no built in way to do this. I'd like to give the user resolution options, as is the norm in PC games, and my game is unlikely to run smoothly in very high resolutions.

I'm using HTMLLoader to load the game SWF into a wrapper SWF, as this allows me to use the now defunct LOW and MEDIUM stage quality settings. But this causes difficulties with fullscreen scaling. If I go into fullscreen from the game SWF, the "You are now entering fullscreen mode" pop-up appears, as if the game were in a browser, and looks very unprofessional. If I go into fullscreen from the wrapper SWF, I cannot use the stage.fullScreenSourceRect object for resolution scaling, as it doesn't seem to effect the game SWF. Unless I'm missing something, I really can't think of any elegant solution besides changing the user's screen resolution.

Thanks.

Update: I'm currently trying out a program called Qres.exe to change the resolution. It seems to work - my game can launch it and use it to change the screen resolution.
I can imagine some problem situations, such as a user having multiple monitors, or the game crashing and not changing the resolution back. But I think this may be a satisfactory solution unless I run into other problems...

This topic has been closed for replies.

1 reply

Flipline
Inspiring
October 29, 2018

I haven't tried it myself, but AIR 31 did add new ScreenMode APIs, where you can set resolution and get a list of compatible resolutions the display can use.  The Release Notes for AIR 31 has more info about it under "Screen Mode Configuration for AIR Desktop":

Release Notes Flash Player 31 AIR 31

natural_criticB837
Legend
October 29, 2018

Nice, did they add this feature after beta? I completely missed that they added this in Air 31.