mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
Fix swapping loaded ELF files
This commit is contained in:
parent
f095e6af0b
commit
d0f13de4c5
1 changed files with 5 additions and 0 deletions
|
@ -299,6 +299,11 @@ bool Emulator::load3DSX(const std::filesystem::path& path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Emulator::loadELF(const std::filesystem::path& path) {
|
bool Emulator::loadELF(const std::filesystem::path& path) {
|
||||||
|
// We can't open a new file with this ifstream if it's associated with a file
|
||||||
|
if (loadedELF.is_open()) {
|
||||||
|
loadedELF.close();
|
||||||
|
}
|
||||||
|
|
||||||
loadedELF.open(path, std::ios_base::binary); // Open ROM in binary mode
|
loadedELF.open(path, std::ios_base::binary); // Open ROM in binary mode
|
||||||
romType = ROMType::ELF;
|
romType = ROMType::ELF;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue