Skip to content

Conversation

StopMotionEGames
Copy link

@StopMotionEGames StopMotionEGames commented Aug 9, 2025

Updated file extension checking to support uppercase and lowercase letters (or a combination of them, such as .MiDi).
These fixes are related to issue #396.

Fixing a bug can lead to more bugs
*Some bugs have surfaced, such as autosave not working

Updated the file extension checking to support both lowercase and uppercase (or mixed, like .MiDi)
@StopMotionEGames
Copy link
Author

opening files via executable argument (like Windows' "open with") will need to be adjusted

Fixed checks to support uppercase file extensions via cli
@StopMotionEGames
Copy link
Author

I have a question: auto-saving isn't exactly making a backup (for automatic recovery), right?
I remember that in previous versions, auto-saving a song displayed a small message ("Song saved") on the screen, as if pressing ctrl + s.

I changed the way the function is called on autosave (removing the "true" in the last argument) to be able to show the message that the song was saved, since I think that visually showing that the song was saved (like showing the message or just removing the "*" from the window title) is better.

@OctoFlareDev
Copy link
Collaborator

I have a question: auto-saving isn't exactly making a backup (for automatic recovery), right?

I remember that in previous versions, auto-saving a song displayed a small message ("Song saved") on the screen, as if pressing ctrl + s.

I changed the way the function is called on autosave (removing the "true" in the last argument) to be able to show the message that the song was saved, since I think that visually showing that the song was saved (like showing the message or just removing the "*" from the window title) is better.

It's not advised to do that since saving without the backup set to true will cause selections to be deselected
The current code also have some issues so I think is to add a third optional argument to save_song()
save_song(fn[, backup, autosave_arg])
and add do not place the selection when the autosave_arg is true (do not use autosave as it's an object scope variable)

`tonextsave` has been moved to be defined after the load_settings call, preventing auto-saving when opening the first song after loading the game.

And if autosave is enabled, it'll receive the value of autosavemins. Else, it'll be 0.
Added the var asave;
It's an optional argument.

If asave is true, selection_replace won't be called and the message will be "Song auto saved" ("歌曲自动保存" if laanguage is chinese)
The real operations said in previous commits
Updated file extension checking for ".nbp", ".ogg" and ".wav" to be case-insensitive.

And a syntax fix for the latest GMS versions.
Added multiple __MACOSX-related paths to .gitignore to prevent accidental commits of macOS-specific shaders.
Theoretically the last file extension check
@StopMotionEGames
Copy link
Author

I believe the fix is now complete!

@OctoFlareDev OctoFlareDev merged commit ec93f11 into OpenNBS:feature/tabs-cross-platform Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants