mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 15:49:25 +01:00
Merge pull request #8355 from phire/qt_fix_fifo_range
QtFifoPlayer: handle FIFO load before window creation
This commit is contained in:
commit
d3a9104cee
@ -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 @@ public:
|
||||
// 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user