Get a list of supported screen resolutions with NW.js?

0 favourites
  • 4 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I'm not sure if it's possible, but I'd like to allow the user to select screen resolutions from a list of resolutions supported on their hardware configuration. I know how to make a listbox and change the resolution, I just need to know how to get a list of supported (fullscreen) resolutions.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm not sure a list of supported resolutions is relevant since full screen just scales up the game to cover the entire screen. Aka it doesn't change the actual display resolution, at least I don't think it does.

    Here's the api provided by nwjs which you probably can access from the browser object.

    http://docs.nwjs.io/en/latest/

    I didn't notice anything to get a list of resolutions there.

    If you really want a list of supported resolutions you could make a nwjs addon that calls winapi functions to get that info. I think there was a construct classic example that used some Python to do that, although the actual c code to do it should be pretty easy to find online.

  • With modern displays, there is only one truly supported resolution, which is the physical resolution, which is probably the resolution it is already running at. The "list of supported resolutions" mainly existed for old CRT monitors which could genuinely display other resolutions. These days if you actually change resolution you'll get the same thing as low quality fullscreen mode: just stretching to fill the screen.

  • Thank you both for the info. That makes things pretty simple.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)