Skip to content

Commit

Permalink
Update LoadingTimer.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Blobanium committed Apr 14, 2021
1 parent 794094b commit ac3879e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/io/github/blobanium/lt/LoadingTimer.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class LoadingTimer implements ModInitializer {
public static byte hasGameStarted = 0;
public static double loadMemory = 0;
private static boolean isClientFullscreen = false;
private static boolean isClientFullscreen2 = false;
public static double finalResult = 0;
public static boolean timerDone = false;
public static final Logger LOGGER = LogManager.getLogger("Loading Timer");
Expand All @@ -45,6 +46,7 @@ public static void load() {
hasGameStarted = 1;
if (MinecraftClient.getInstance().options.fullscreen) {
isClientFullscreen = true;
isClientFullscreen2 = true;
}
LOGGER.debug("hasGameStarted=1");
resV = MinecraftClient.getInstance().currentScreen.height;
Expand All @@ -69,10 +71,13 @@ public static void load() {
}
}
} else {

if(!resizeError){
LOGGER.warn("Please refrain from changing resolutions during startup, as it may cause issues");
if(isClientFullscreen2){
isClientFullscreen2 = false;
} else {
LOGGER.warn("Please refrain from changing resolutions during startup, as it may cause issues.");
resizeError = true;
}
}
resV = MinecraftClient.getInstance().currentScreen.height;
resH = MinecraftClient.getInstance().currentScreen.width;
Expand Down

0 comments on commit ac3879e

Please sign in to comment.