Commit a3b536c9 authored by Stephen Anthony's avatar Stephen Anthony
Browse files

libretro: Pass the filename to the underlying emulation, since we can detect...

libretro: Pass the filename to the underlying emulation, since we can detect things based on what it contains.
parent 4d248c97
......@@ -61,8 +61,6 @@ bool StellaLIBRETRO::create(bool logging)
{
system_ready = false;
FilesystemNode rom("rom");
// build play system
destroy();
......@@ -115,6 +113,8 @@ bool StellaLIBRETRO::create(bool logging)
settings.setValue(AudioSettings::SETTING_VOLUME, 100);
settings.setValue(AudioSettings::SETTING_STEREO, audio_mode);
FilesystemNode rom(rom_path);
if(myOSystem->createConsole(rom) != EmptyString)
return false;
......@@ -334,8 +334,10 @@ bool StellaLIBRETRO::getVideoResize()
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
void StellaLIBRETRO::setROM(const void* data, size_t size)
void StellaLIBRETRO::setROM(const char* path, const void* data, size_t size)
{
rom_path = path;
memcpy(rom_image.get(), data, size);
rom_size = static_cast<uInt32>(size);
......
......@@ -96,7 +96,7 @@ class StellaLIBRETRO
Int16* getAudioBuffer() { return audio_buffer.get(); }
public:
void setROM(const void* data, size_t size);
void setROM(const char* path, const void* data, size_t size);
void setConsoleFormat(uInt32 mode);
......@@ -139,6 +139,7 @@ class StellaLIBRETRO
unique_ptr<uInt8[]> rom_image;
uInt32 rom_size;
string rom_path;
ConsoleTiming console_timing;
string console_format;
......
......@@ -574,7 +574,7 @@ bool retro_load_game(const struct retro_game_info *info)
}
stella.setROM(info->data, info->size);
stella.setROM(info->path, info->data, info->size);
return reset_system();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment