VideoBackends: Combine Initialize/Prepare and Cleanup/Shutdown methods

Also allows the work previously done in Prepare to return a failure
status.
This commit is contained in:
Stenzek 2018-01-26 15:09:07 +10:00
parent 04027a7da7
commit d96e8c9d76
20 changed files with 58 additions and 160 deletions

View file

@ -45,15 +45,6 @@ void VideoBackendBase::Video_ExitLoop()
s_FifoShuttingDown.Set();
}
void VideoBackendBase::Video_CleanupShared()
{
// First stop any framedumping, which might need to dump the last xfb frame. This process
// can require additional graphics sub-systems so it needs to be done first
g_renderer->ShutdownFrameDumping();
Video_Cleanup();
}
// Run from the CPU thread (from VideoInterface.cpp)
void VideoBackendBase::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight,
u64 ticks)
@ -211,12 +202,8 @@ void VideoBackendBase::ShutdownShared()
m_initialized = false;
Fifo::Shutdown();
}
void VideoBackendBase::CleanupShared()
{
VertexLoaderManager::Clear();
Fifo::Shutdown();
}
// Run from the CPU thread