Fixing minor annoyances in Leadwerks

Months ago Leadwerks was updated to have a built in GUI system. Along with the GUI, it implemented a Half-Life 2 style game menu and options system. This was all fine and dandy, but there was one huge problem. Leadwerks by default chooses the maximum resolution of the monitor and not the current resolution. So if you are like me and have AMD's Virtual Super Resolution enabled but at a lower resolution, Leadwerks would start fullscreen and change your resolution to the maximum supported until you change the settings. That is something that I annoys me, so I went about to fix this.

The first thing that you will find, as of this writing Leadwerks has no built in way to find the current desktop resolution. The work around that I found was create a hidden borderless window, maximize it, Read the window dimension and close the window. The player never sees or knows this happens. This allows the developer to know the screen resolution and choose to start with that as the default.

After developing the workaround I decided, why not go all the way and make a game launcher? Undertaking this task I cloned the Leadwerks in game options menu and added a window mode option For those who like to run windowed or borderless. I also added sane defaults when the settings can not be found.

The final result: LeadwerksLauncher_2017-09-22_20-09-55.png

The launcher in action:

Posted in Coding, Screenshots on Sep 24, 2017.