Skip to content

Commit

Permalink
helios: (try to) improve sound on win11, build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Berti committed Nov 3, 2023
1 parent eca5878 commit 499a589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ task writeToFile {
["-XX:AutoBoxCacheMax=65536", "-XX:-DontCompileHugeMethods", "-XX:+AlwaysCompileLoopMethods"]
//win: default to busy wait
List<String> winOpts = ["-Dhelios.busy.wait=true"]
List<String> sampleBase = [ "java",
"-Dtinylog.configuration=./tinylog.properties",
"-Djinput.enable=true -Djinput.native.location=lib",
"-jar", "$jarName"] as String[]
List<String> sampleBase = ["java",
"-Dtinylog.configuration=./res/tinylog.properties",
"-Djinput.enable=true -Djinput.native.location=lib",
"-jar", "$jarName"] as String[]
sampleBase.addAll(1, javaAdvOpts)
List<String> sampleUx = new ArrayList<>(sampleBase)
sampleUx.add("\"\$@\"" + "\n")
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/omegadrive/util/Sleeper.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ private static void startSleeperThread() {
if (isWindows()) {
Runnable r = () -> Util.sleep(Long.MAX_VALUE);
Thread t = new Thread(r);
t.setDaemon(true);
t.setName("sleeperForWindows");
t.start();
}
Expand All @@ -54,6 +55,7 @@ public static void parkFuzzy(final long intervalNs) {
}

public static void parkExactly(final long intervalNs) {
assert intervalNs > 0;
if (BUSY_WAIT) {
long deadlineNs = System.nanoTime() + intervalNs;
while (System.nanoTime() < deadlineNs) {
Expand Down

0 comments on commit 499a589

Please sign in to comment.