Get supported Screen Resolutions?

Monkey Forums/Monkey Beginners/Get supported Screen Resolutions?

Duke87(Posted 2015) [#1]
Hey monkeys,
is it possible to get the supported screen resolutions ?
I'd like to do a graphics options, where the user can choose.
especially for the Desktop target.

bye


therevills(Posted 2015) [#2]
I dont think MX/Mojo has a command directly for this, you'll have to extern it and use something like this for GLFW:
http://www.glfw.org/docs/latest/monitor.html#monitor_modes
int count;
GLFWvidmode* modes = glfwGetVideoModes(monitor, &count);



Duke87(Posted 2015) [#3]
Ok thank you, will have a look at this.


MikeHart(Posted 2015) [#4]
It is natively supported for a while now. Use the function Displaymodes.


therevills(Posted 2015) [#5]
It is natively supported for a while now. Use the function Displaymodes.


Mike is correct - I'm out of date ;)

Also the online version of the docs are out of date too...

Function DisplayModes : DisplayMode[] ()
Gets an array of valid fullscreen display modes for use with SetDeviceWindow.

On targets other than desktop and xna, this returns an empty array.