Skip to content

Commit 41aee2f

Browse files
committed
Ditto, but better.
1 parent a45a52a commit 41aee2f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Simfile/SaveSm.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -508,8 +508,7 @@ static bool GetSectionCompression(const char* section, int width, std::list<uint
508508
for (int i = 4; i <= lcm / 2; i++)
509509
{
510510
// Skip anything that isn't a lcm factor
511-
// Skipping 6 is a special case, since it's a factor of 192 but not a standard snap
512-
if (lcm % i > 0 || i == 6) continue;
511+
if (lcm % i > 0) continue;
513512

514513
// The first (smallest) match is always the best
515514
if (TestSectionCompression(section, width, i))
@@ -539,6 +538,11 @@ static bool GetSectionCompression(const char* section, int width, std::list<uint
539538
{
540539
count = ROWS_PER_NOTE_SECTION;
541540
}
541+
// Yes it is weird... but we don't save 6ths even though they factor into 192 evenly.
542+
if (count == 6)
543+
{
544+
count = 12;
545+
}
542546
pitch = (ROWS_PER_NOTE_SECTION * width) / count;
543547
return error;
544548
}

0 commit comments

Comments
 (0)