Skip to content
Permalink
Browse files

Merge pull request #8355 from phire/qt_fix_fifo_range

QtFifoPlayer: handle FIFO load before window creation
  • Loading branch information...
JMC47 committed Sep 30, 2019
2 parents bec433c + 677a090 commit d3a9104cee5bb599e6c1c36c8c2e2cc6128ea9c9
Showing with 13 additions and 2 deletions.
  1. +11 −0 Source/Core/Core/FifoPlayer/FifoPlayer.cpp
  2. +2 −2 Source/Core/Core/FifoPlayer/FifoPlayer.h
@@ -168,6 +168,17 @@ std::unique_ptr<CPUCoreBase> FifoPlayer::GetCPUCore()
return std::make_unique<CPUCore>(this);
}

void FifoPlayer::SetFileLoadedCallback(CallbackFunc callback)
{
m_FileLoadedCb = std::move(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)
@@ -93,8 +93,8 @@ class FifoPlayer
// Default is disabled
void SetEarlyMemoryUpdates(bool enabled) { m_EarlyMemoryUpdates = enabled; }
// Callbacks
void SetFileLoadedCallback(CallbackFunc callback) { m_FileLoadedCb = callback; }
void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = callback; }
void SetFileLoadedCallback(CallbackFunc callback);
void SetFrameWrittenCallback(CallbackFunc callback) { m_FrameWrittenCb = std::move(callback); }
static FifoPlayer& GetInstance();

bool IsRunningWithFakeVideoInterfaceUpdates() const;

0 comments on commit d3a9104

Please sign in to comment.
You can’t perform that action at this time.