Skip to content

Commit

Permalink
Fix missing resolution on config file creation
Browse files Browse the repository at this point in the history
- Refactor: get the highest resolution available
  • Loading branch information
xCollateral committed Apr 26, 2024
1 parent a0e6c2d commit 826bf09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/main/java/net/vulkanmod/Initializer.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ public void onInitializeClient() {

LOGGER.info("== VulkanMod ==");

Platform.init();
VideoModeManager.init();

var configPath = FabricLoader.getInstance()
.getConfigDir()
.resolve("vulkanmod_settings.json");

CONFIG = loadConfig(configPath);

Platform.init();
VideoModeManager.init();
}

private static Config loadConfig(Path path) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/net/vulkanmod/config/video/VideoModeSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public VideoMode getVideoMode(int refresh) {
}

public VideoMode getVideoMode() {
return new VideoMode(this.width, this.height, this.bitDepth, this.refreshRates.get(0));
int refreshRate = this.refreshRates.get(this.refreshRates.size() - 1);
return new VideoMode(this.width, this.height, this.bitDepth, refreshRate);
}

public static final class VideoMode {
Expand Down

0 comments on commit 826bf09

Please sign in to comment.