|
1 | 1 | package me.flashyreese.mods.sodiumextra.client; |
2 | 2 |
|
3 | 3 | import me.flashyreese.mods.sodiumextra.client.config.SodiumExtraGameOptions; |
| 4 | +import me.flashyreese.mods.sodiumextra.client.config.SodiumExtraConfigKeys; |
| 5 | +import me.flashyreese.mods.sodiumextra.client.gui.FullscreenResolutionConfirmation; |
4 | 6 | import me.flashyreese.mods.sodiumextra.client.gui.SodiumExtraHud; |
5 | 7 | import net.caffeinemc.caffeineconfig.CaffeineConfig; |
6 | 8 | import net.caffeinemc.mods.sodium.client.services.PlatformRuntimeInformation; |
@@ -43,7 +45,6 @@ public static CaffeineConfig mixinConfig() { |
43 | 45 | .addMixinOption("cloud", true) |
44 | 46 | .addMixinOption("compat", true, false) |
45 | 47 | .addMixinOption("fog", true) |
46 | | - .addMixinOption("fog_falloff", true) |
47 | 48 | .addMixinOption("fps", true) |
48 | 49 | .addMixinOption("gui", true) |
49 | 50 | .addMixinOption("instant_sneak", true) |
@@ -82,14 +83,31 @@ public static CaffeineConfig mixinConfig() { |
82 | 83 | } |
83 | 84 |
|
84 | 85 | private static SodiumExtraGameOptions loadConfig() { |
85 | | - return SodiumExtraGameOptions.load(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve("sodium-extra-options.json").toFile()); |
| 86 | + return SodiumExtraGameOptions.load(PlatformRuntimeInformation.getInstance().getConfigDirectory().resolve(SodiumExtraConfigKeys.FILE_NAME).toFile()); |
| 87 | + } |
| 88 | + |
| 89 | + public static void armWaylandFullscreenResolutionRecovery() { |
| 90 | + SodiumExtraGameOptions options = options(); |
| 91 | + if (!options.extraSettings.waylandFullscreenResolutionRecoveryPending) { |
| 92 | + options.extraSettings.waylandFullscreenResolutionRecoveryPending = true; |
| 93 | + options.writeChanges(); |
| 94 | + } |
| 95 | + } |
| 96 | + |
| 97 | + public static void disarmWaylandFullscreenResolutionRecovery() { |
| 98 | + SodiumExtraGameOptions options = options(); |
| 99 | + if (options.extraSettings.waylandFullscreenResolutionRecoveryPending) { |
| 100 | + options.extraSettings.waylandFullscreenResolutionRecoveryPending = false; |
| 101 | + options.writeChanges(); |
| 102 | + } |
86 | 103 | } |
87 | 104 |
|
88 | 105 | public static void onTick(Minecraft client) { |
89 | 106 | if (hud == null) { |
90 | 107 | hud = new SodiumExtraHud(); |
91 | 108 | } |
92 | 109 | hud.onStartTick(client); |
| 110 | + FullscreenResolutionConfirmation.tick(client); |
93 | 111 | } |
94 | 112 |
|
95 | 113 | public static void onHudRender(GuiGraphics guiGraphics, DeltaTracker deltaTracker) { |
|
0 commit comments