Skip to content

Add MTP import and game browser improvements#63

Open
mokapi47 wants to merge 6 commits into
nadrino:mainfrom
mokapi47:feature/smm-mtp-game-browser-clean
Open

Add MTP import and game browser improvements#63
mokapi47 wants to merge 6 commits into
nadrino:mainfrom
mokapi47:feature/smm-mtp-game-browser-clean

Conversation

@mokapi47
Copy link
Copy Markdown

@mokapi47 mokapi47 commented May 9, 2026

Summary

This update improves SimpleModManager's mod import workflow, game browser, and mod management reliability on Nintendo Switch.

Import mods over USB MTP

  • Adds an Import Mod section that exposes the SD mods directory over USB MTP.
  • Integrates an MTP responder for transferring mod folders directly from a PC.
  • Adds stronger MTP start, stop, restart, disconnect, and stale-state handling.
  • Keeps the Switch awake while MTP is active.
  • Hides internal metadata files from MTP by default.
  • Adds a Debug setting to optionally show internal metadata files during MTP sessions.
  • Removes the old manual step that told users to stop MTP before leaving the tab.

Automatic game folder detection

  • Detects installed Switch titles and creates matching folders in the mods directory.
  • Stores title identifiers in lightweight metadata files so detected folders can be matched back to their games.
  • Filters entries without valid game icons so homebrew shortcuts and installed NRO forwarders are not shown as games.
  • Loads icons for automatically detected game folders immediately, without requiring a mod to be added first.

Game Browser improvements

  • Adds sorting presets for alphabetical order, mod count, game launch data, mod added time, play time, and launch count.
  • Adds ascending and descending order switching with X while a sort preset is selected.
  • Optimizes game browser loading by caching mod status and avoiding unnecessary repeated filesystem work.
  • Adds time and battery percentage display in the top-right UI.

Mod management reliability

  • Deleting a mod from the SD now also removes the installed copy from the contents directory when applicable.
  • Improves deletion of enabled mods so partial leftovers are less likely.
  • Adds a short cooldown to protect against rapid repeated delete actions.
  • Keeps selector focus on the previous mod after deleting an entry.
  • Improves empty SD mod messages instead of showing a raw filesystem open error.
  • Removes the experimental time-left display from install, delete, and disable operations.

Notes

  • The import workflow intentionally keeps internal metadata hidden by default for normal users.
  • Debug visibility can be enabled from settings when troubleshooting metadata files.
  • The MTP implementation is focused on stability for many-file mod folders and cable reconnect scenarios.

Validation

  • Built successfully in the development copy with the Switch homebrew toolchain.
  • Verified git patch whitespace with git diff checks before publishing.

@mokapi47
Copy link
Copy Markdown
Author

mokapi47 commented May 9, 2026

Update pushed in b7e3456.

This update adds the new mod status cache system and related optimizations, while also fixing the instability found when navigating back from the Mod Browser.

Changes:

  • Added a v2 mod status cache with per-file source/destination stamps so unchanged files reuse cached results while changed files are refreshed.
  • Game Browser now reads lightweight status summaries from the cache instead of forcing slow rechecks, hides unchecked counts, and only shows useful active/partial/inactive/empty counts.

@mokapi47
Copy link
Copy Markdown
Author

mokapi47 commented May 9, 2026

Update:

  • Added a safer installed-mod cleanup flow for mods removed from the SD card: leftover files are detected through the status cache, shown in a cleanup prompt, deleted carefully, then rescanned before the cleanup is considered done.
  • Reworked the mod status cache and refresh logic so similar mods with shared files are handled properly, with better ownership tracking and faster status updates.
  • Fixed false PARTIAL states when a newly added inactive mod shares files with an old deleted mod.
  • Fixed cleanup false positives by removing unreliable unknown-file cleanup detection and forcing a real orphan rescan before showing the popup.
  • Protected files owned by currently active mods during cleanup, while allowing leftovers from inactive/similar SD mods to be cleaned correctly.
  • Improved repeated delete/cleanup stability with safer async handling, cooldown protection, filesystem settle delays, and selector recovery.
  • Fixed natural numeric sorting for mod names, so numbered mods sort in the expected order.
  • Updated the NRO build and release artifacts.

@mokapi47
Copy link
Copy Markdown
Author

Improve touchscreen controls and mod-change stability

Changes:

  • Added touchscreen support across the NRO, with direct tab switching from the left sidebar and safer double-tap confirmation for content actions.
  • Tightened the Import Mod screen layout, including more compact instruction spacing and cleaner MTP status/button spacing.
  • Added extra SD card commit/settle handling after mod install, disable, delete, and orphan cleanup operations to reduce crash risk after filesystem changes.

Release includes the updated .nro and .elf files.

@mokapi47
Copy link
Copy Markdown
Author

mokapi47 commented May 10, 2026

Changes:

  • Touch navigation now enters the first content item when tapping Game Browser, Import Mod, or Settings, while controller navigation keeps the normal tab-switching behavior.
  • Settings touch scrolling is less sensitive to avoid accidental jumps.
  • Release build includes the Borealis focus-highlight animation fix that prevents stale sidebar outlines after fast touch navigation.

Release assets:

  • SimpleModManager.nro
  • SimpleModManager.elf

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.

1 participant