Skip to content

Add option to install ROMs flat - #129

Merged
gantoine merged 3 commits into
rommapp:mainfrom
matthew-pye:Playnite-10
Jul 27, 2026
Merged

Add option to install ROMs flat#129
gantoine merged 3 commits into
rommapp:mainfrom
matthew-pye:Playnite-10

Conversation

@matthew-pye

Copy link
Copy Markdown
Contributor
  • Add option to install ROM flat instead of installing ROMs in a folder with the same name as the game
image image

@gantoine

Copy link
Copy Markdown
Member

@greptileai

@greptile-apps

greptile-apps Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds a per-emulator option for storing ROM files directly in the configured destination.

  • Persists and exposes the new Install Flat mapping setting.
  • Uses the destination root for flat imports and downloads.
  • Adjusts imported ROM and installation paths for flat storage.

Confidence Score: 2/5

This PR is not safe to merge because routine failure cleanup or uninstall can delete every ROM in a flat destination, and archive installs can attach sibling files to the wrong game.

The new flat mode replaces the game-specific install directory with a shared mapping root while downstream cleanup, uninstall, and ROM discovery continue treating that path as exclusively owned by one game.

Files Needing Attention: Games/RomMInstallController.cs and Games/RomMImport.cs

Important Files Changed

Filename Overview
Games/RomMInstallController.cs Routes flat installations through a shared root that existing discovery and recursive cleanup logic assumes is game-owned.
Games/RomMImport.cs Records the shared destination root as each flat-installed game's InstallDirectory, exposing destructive uninstall behavior.
Settings/EmulatorMapping.cs Adds a serializable, property-change-aware InstallFlat setting.
Settings/SettingsView.xaml Adds the per-mapping Install Flat checkbox and explanatory tooltip.

Fix All in Claude Code

Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
Games/RomMInstallController.cs:51-52
**Shared root is recursively deleted**

When a flat installation fails, is cancelled, or is later uninstalled, the shared destination is treated as the game's private install directory and recursively deleted, causing every sibling ROM in that destination to be removed.

### Issue 2 of 2
Games/RomMInstallController.cs:51-52
**ROM discovery includes sibling games**

When an archive is installed into a flat destination containing other supported ROM files, `BuildRoms` recursively scans the shared directory and adds those sibling files to the newly installed game's launch targets.

Reviews (1): Last reviewed commit: "Add install flat option" | Re-trigger Greptile

Comment thread Games/RomMInstallController.cs
Comment thread Games/RomMInstallController.cs
@gantoine
gantoine self-requested a review July 27, 2026 13:40

@gantoine gantoine left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@gantoine
gantoine merged commit 940a10c into rommapp:main Jul 27, 2026
3 checks passed
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