mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 17:19:44 -06:00
QtFifoPlayer: handle fifo load before window creation
Fixes a bug where if you loaded a fifo before opening the fifo player window (which you can do by dragging a .dff onto dolphin's main window) then the player's widgets wouldn't be initilized correctly. Importantly, the object range widgets would be broken.
This commit is contained in:
@ -168,6 +168,17 @@ std::unique_ptr<CPUCoreBase> FifoPlayer::GetCPUCore()
|
||||
return std::make_unique<CPUCore>(this);
|
||||
}
|
||||
|
||||
void FifoPlayer::SetFileLoadedCallback(CallbackFunc callback)
|
||||
{
|
||||
m_FileLoadedCb = callback;
|
||||
|
||||
// Trigger the callback immediatly if the file is already loaded.
|
||||
if (GetFile() != nullptr)
|
||||
{
|
||||
m_FileLoadedCb();
|
||||
}
|
||||
}
|
||||
|
||||
bool FifoPlayer::IsRunningWithFakeVideoInterfaceUpdates() const
|
||||
{
|
||||
if (!m_File || m_File->GetFrameCount() == 0)
|
||||
|
Reference in New Issue
Block a user