Only force a core name if one exists

This could actually not be the case for imported movies for example and is handled elsewhere, but this force parameter breaks rom loading completely when QueuedCoreName is empty.
This commit is contained in:
Morilli 2024-08-20 23:10:38 +02:00
parent cdd7ee1fea
commit beab2b141b
1 changed files with 3 additions and 1 deletions

View File

@ -3644,7 +3644,9 @@ namespace BizHawk.Client.EmuHawk
DisplayManager.ActivateOpenGLContext(); // required in case the core wants to create a shared OpenGL context
var result = loader.LoadRom(path, nextComm, ioaRetro?.CorePath, forcedCoreName: MovieSession.QueuedCoreName);
bool result = string.IsNullOrEmpty(MovieSession.QueuedCoreName)
? loader.LoadRom(path, nextComm, ioaRetro?.CorePath)
: loader.LoadRom(path, nextComm, ioaRetro?.CorePath, forcedCoreName: MovieSession.QueuedCoreName);
Game = result ? loader.Game : GameInfo.NullInstance;