How to Get a List of Possible Screen Resolution [SOLVED]

I would like to remove the start screen and do a possible setting in Lemur to be steam deck compatible. My question is how does the startup “know” all the possible screen resolutions? Is there a good way to get a list of possible resolutions?

Thanks a lot

2 Likes

It asks Java’s GraphicsEnvironment. I started to look up the code for you but I’m between things and it occurred to me that if you really wanted that specificity then you could search yourself the same as I would (open ‘SourceCode’ link and search for GraphicsEnvironment)

The thing is that these resolutions sometimes do not match what is actually available in lwjgl. I know there was talk of asking the implementation directly (ie: lwjgl-version specific code) but I do not know if that was ever implemented or only discussed.

If you pick a specific version of lwjgl then you can ask it. That’s what I did for an older unreleased version of Mythruna… I asked lwjgl2’s Display class directly.

1 Like

Ah, true, I just thought there might be some Jme functionality. Thanks for the pointers!

I do it with GLFW.glfwGetVideoModes(monitor).

6 Likes

For my “Acorus” user-interface library I created a utility method that provides this information and is compatible with both LWJGL v2 and v3:

6 Likes

This would be great addition to jME itself. There is already an ancient ticket about it: Get supported display modes · Issue #20 · jMonkeyEngine/jmonkeyengine · GitHub

Also with LWJGL 3, multi-monitor support would be a thing too. Related to the display modes.

5 Likes