Add short name handling for ROMs in Rom class; update EditorManager to use short names in the ROM selector for improved UI clarity.

This commit is contained in:
scawful
2025-04-16 17:33:48 -04:00
parent 75d7ba9382
commit 00d30efbf1
4 changed files with 107 additions and 38 deletions

View File

@@ -176,6 +176,8 @@ absl::Status Rom::LoadFromFile(const std::string &filename, bool z3_load) {
}
std::string full_filename = std::filesystem::absolute(filename).string();
filename_ = full_filename;
// Get the short name of the ROM
short_name_ = filename_.substr(filename_.find_last_of("/\\") + 1);
std::ifstream file(filename_, std::ios::binary);
if (!file.is_open()) {