Skip to content

Commit

Permalink
log env
Browse files Browse the repository at this point in the history
  • Loading branch information
sblantipodi committed Dec 31, 2024
1 parent 0f1eb3c commit f76da2a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/org/dpsoftware/FireflyLuciferin.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public FireflyLuciferin() {
powerSavingManager = new PowerSavingManager();
powerSavingManager.setLastFrameTime(LocalDateTime.now());
NativeExecutor.setHighPriorityThreads(MainSingleton.getInstance().config.getThreadPriority());
logEnvironment();
}

/**
Expand Down Expand Up @@ -605,4 +606,21 @@ private void clean() {
}
}

/**
* Log the environment in use
*/
private void logEnvironment() {
if (NativeExecutor.isLinux()) {
if (NativeExecutor.isFlatpak()) {
log.info("Running on Linux using Flatpak sandbox");
} else if (NativeExecutor.isSnap()) {
log.info("Running on Linux using Snap sandbox");
} else {
log.info("Running on Linux");
}
} else if (NativeExecutor.isWindows()) {
log.info("Running on Windows");
}
}

}

0 comments on commit f76da2a

Please sign in to comment.