GameINI: Fix GFXBackend crash

Fixes a regression from 5.0-12066, where setting the GFXBackend variable
to one other than the current global backend would crash Dolphin upon
launching the game.
This commit is contained in:
Daniel Brookman 2021-06-02 17:46:57 -04:00
parent 3ef9d5f659
commit b214e0e71f
1 changed files with 3 additions and 0 deletions

View File

@ -242,6 +242,9 @@ bool Init(std::unique_ptr<BootParameters> boot, const WindowSystemInfo& wsi)
Host_UpdateMainFrame(); // Disable any menus or buttons at boot
// Manually reactivate the video backend in case a GameINI overrides the video backend setting.
VideoBackendBase::PopulateBackendInfo();
// Issue any API calls which must occur on the main thread for the graphics backend.
WindowSystemInfo prepared_wsi(wsi);
g_video_backend->PrepareWindow(prepared_wsi);