mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-16 12:58:33 +02:00
VideoCommon: Pass WindowSystemInfo to InitBackendInfo
This commit is contained in:
@ -281,7 +281,7 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
|
||||
g_video_backend = iter->get();
|
||||
}
|
||||
|
||||
void VideoBackendBase::PopulateBackendInfo()
|
||||
void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi)
|
||||
{
|
||||
g_Config.Refresh();
|
||||
// Reset backend_info so if the backend forgets to initialize something it doesn't end up using
|
||||
@ -289,18 +289,18 @@ void VideoBackendBase::PopulateBackendInfo()
|
||||
g_Config.backend_info = {};
|
||||
ActivateBackend(Config::Get(Config::MAIN_GFX_BACKEND));
|
||||
g_Config.backend_info.DisplayName = g_video_backend->GetDisplayName();
|
||||
g_video_backend->InitBackendInfo();
|
||||
g_video_backend->InitBackendInfo(wsi);
|
||||
// We validate the config after initializing the backend info, as system-specific settings
|
||||
// such as anti-aliasing, or the selected adapter may be invalid, and should be checked.
|
||||
g_Config.VerifyValidity();
|
||||
}
|
||||
|
||||
void VideoBackendBase::PopulateBackendInfoFromUI()
|
||||
void VideoBackendBase::PopulateBackendInfoFromUI(const WindowSystemInfo& wsi)
|
||||
{
|
||||
// If the core is running, the backend info will have been populated already.
|
||||
// If we did it here, the UI thread can race with the with the GPU thread.
|
||||
if (!Core::IsRunning())
|
||||
PopulateBackendInfo();
|
||||
PopulateBackendInfo(wsi);
|
||||
}
|
||||
|
||||
void VideoBackendBase::DoState(PointerWrap& p)
|
||||
|
Reference in New Issue
Block a user