java and libGDX / LWJGL game fullscreen wrong size for multiple monitors on Ubuntu

I would refrain from using Toolkit.getDefaultToolkit() and use solely lwjgl.util.Display.getAvailableDisplayModes() or the method described by libgdx.

Once you have set up a fullscreen window, fetch its size (if your set-up method doesn’t already know that) and only use this information from thereon.

If Display.getAvailableDisplayModes() changes its sort order on different executions, simply re-sort them and use the biggest one available or use a standard one and provide in-game settings to change them.

Leave a Comment

tech