Skip to content

Commit

Permalink
Fix for #192 .
Browse files Browse the repository at this point in the history
Let's see if this works.
  • Loading branch information
tommyettinger committed Aug 11, 2024
1 parent ca633f2 commit 8f7b1af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/kotlin/gdx/liftoff/data/templates/Template.kt
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ public class Lwjgl3Launcher {
private static Lwjgl3ApplicationConfiguration getDefaultConfiguration() {
Lwjgl3ApplicationConfiguration configuration = new Lwjgl3ApplicationConfiguration();
configuration.setTitle("${project.basic.name}");
//// Vsync limits the frames per second to what your hardware can display, and helps eliminate
//// screen tearing. This setting doesn't always work on Linux, so the line after is a safeguard.
configuration.useVsync(true);
//// Limits FPS to the refresh rate of the currently active monitor.
configuration.setForegroundFPS(Lwjgl3ApplicationConfiguration.getDisplayMode().refreshRate);
//// Limits FPS to the refresh rate of the currently active monitor, plus 1 to try to match fractional
//// refresh rates. The Vsync setting above should limit the actual FPS to match the monitor.
configuration.setForegroundFPS(Lwjgl3ApplicationConfiguration.getDisplayMode().refreshRate + 1);
//// If you remove the above line and set Vsync to false, you can get unlimited FPS, which can be
//// useful for testing performance, but can also be very stressful to some hardware.
//// You may also need to configure GPU drivers to fully disable Vsync; this can cause screen tearing.
configuration.setWindowedMode($width, $height);
//// You can change these files; they are in lwjgl3/src/main/resources/ .
configuration.setWindowIcon("libgdx128.png", "libgdx64.png", "libgdx32.png", "libgdx16.png");
return configuration;
}
Expand Down

0 comments on commit 8f7b1af

Please sign in to comment.