diff --git a/assets b/assets index b2f8b6a78..30ad76c15 160000 --- a/assets +++ b/assets @@ -1 +1 @@ -Subproject commit b2f8b6a780316959d0a79adc6dbf61f9e4ca675f +Subproject commit 30ad76c15d88bdff2b41ec017e3f3089ede52411 diff --git a/hmm.json b/hmm.json index 54ddabb09..80ae1023b 100644 --- a/hmm.json +++ b/hmm.json @@ -54,7 +54,7 @@ "name": "haxeui-core", "type": "git", "dir": null, - "ref": "5b2d5b8e7e470cf637953e1369c80a1f42016a75", + "ref": "a551159", "url": "https://github.com/haxeui/haxeui-core" }, { diff --git a/source/funkin/input/PreciseInputManager.hx b/source/funkin/input/PreciseInputManager.hx index 59e6610a5..1dfa7ac95 100644 --- a/source/funkin/input/PreciseInputManager.hx +++ b/source/funkin/input/PreciseInputManager.hx @@ -293,8 +293,9 @@ class PreciseInputManager extends FlxKeyManager // TODO: Remove this line with SDL3 when timestamps change meaning. // This is because SDL3's timestamps are measured in nanoseconds, not milliseconds. - timestamp *= Constants.NS_PER_MS; - + timestamp *= Constants.NS_PER_MS; // 18126000000 38367000000 + timestamp -= Conductor.instance.inputOffset * Constants.NS_PER_MS; + // trace(timestamp); updateKeyStates(key, true); if (getInputByKey(key)?.justPressed ?? false) diff --git a/source/funkin/ui/debug/latency/LatencyState.hx b/source/funkin/ui/debug/latency/LatencyState.hx index f75ac16bc..1a59167ef 100644 --- a/source/funkin/ui/debug/latency/LatencyState.hx +++ b/source/funkin/ui/debug/latency/LatencyState.hx @@ -246,10 +246,11 @@ class LatencyState extends MusicBeatSubState trace("input latency: " + inputLatencyMs + "ms"); trace("cur timestamp: " + PreciseInputManager.getCurrentTimestamp() + "ns"); trace("event timestamp: " + event.timestamp + "ns"); + trace("songtime: " + Conductor.instance.getTimeWithDiff() + "ms"); var closestBeat:Int = Math.round(Conductor.instance.getTimeWithDiff() / (Conductor.instance.stepLengthMs * 2)) % diffGrp.members.length; var getDiff:Float = Conductor.instance.getTimeWithDiff() - (closestBeat * (Conductor.instance.stepLengthMs * 2)); - getDiff -= Conductor.instance.inputOffset; + // getDiff -= Conductor.instance.inputOffset; getDiff -= inputLatencyMs; // lil fix for end of song diff --git a/source/funkin/util/Constants.hx b/source/funkin/util/Constants.hx index 1005b312e..d18956a8a 100644 --- a/source/funkin/util/Constants.hx +++ b/source/funkin/util/Constants.hx @@ -224,6 +224,8 @@ class Constants /** * Constant for the number of seconds in a minute. + * + * sex per min */ public static final SECS_PER_MIN:Int = 60;