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

@ -464,11 +464,7 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
PanicAlert("Failed to initialize video backend!");
return;
}
g_video_backend->Video_Prepare();
Common::ScopeGuard video_guard{[] {
g_video_backend->Video_Cleanup();
g_video_backend->Shutdown();
}};
Common::ScopeGuard video_guard{[] { g_video_backend->Shutdown(); }};
if (cpu_info.HTT)
SConfig::GetInstance().bDSPThread = cpu_info.num_cores > 4;