Skip to content

Commit

Permalink
Fix truncated holds, ssc save path
Browse files Browse the repository at this point in the history
  • Loading branch information
tillvit committed Dec 26, 2023
1 parent 4c3dabe commit f71f0b3
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions app/src/chart/ChartManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ export class ChartManager {
beat: number
): PartialNotedataEntry {
const newHoldEndBeat = clamp(
Math.round((beat - Options.chart.snap) * 48) / 48,
Math.round((beat - Math.max(1 / 48, Options.chart.snap)) * 48) / 48,
hold.beat,
hold.beat + hold.hold - 1 / 48
)
Expand Down Expand Up @@ -1468,14 +1468,15 @@ export class ChartManager {
this.loadedSM.requiresSSC() ||
(await FileHandler.getFileHandle(sscPath))
) {
await FileHandler.writeFile(smPath, this.loadedSM.serialize("ssc")).catch(
err => {
const message = err.message
if (!message.includes(errors.GONE[0])) {
error = message
}
await FileHandler.writeFile(
sscPath,
this.loadedSM.serialize("ssc")
).catch(err => {
const message = err.message
if (!message.includes(errors.GONE[0])) {
error = message
}
)
})
}
if (error == null) {
if (this.loadedSM.usesChartTiming()) {
Expand Down

0 comments on commit f71f0b3

Please sign in to comment.