Core: Call InitBackendInfo before loading config
This commit is contained in:
parent
93923e2b29
commit
eb33d7af64
|
@ -74,6 +74,7 @@
|
|||
#include "VideoCommon/OnScreenDisplay.h"
|
||||
#include "VideoCommon/RenderBase.h"
|
||||
#include "VideoCommon/VideoBackendBase.h"
|
||||
#include "VideoCommon/VideoConfig.h"
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
@ -434,6 +435,12 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
|
|||
HLE::Clear();
|
||||
}};
|
||||
|
||||
// Backend info has to be initialized before we can initialize the backend.
|
||||
// This is because when we load the config, we validate it against the current backend info.
|
||||
// We also should have the correct adapter selected for creating the device in Initialize().
|
||||
g_video_backend->InitBackendInfo();
|
||||
g_Config.Refresh();
|
||||
|
||||
if (!g_video_backend->Initialize(s_window_handle))
|
||||
{
|
||||
PanicAlert("Failed to initialize video backend!");
|
||||
|
|
|
@ -132,7 +132,6 @@ bool VideoBackend::Initialize(void* window_handle)
|
|||
if (window_handle == nullptr)
|
||||
return false;
|
||||
|
||||
InitBackendInfo();
|
||||
InitializeShared();
|
||||
|
||||
if (FAILED(D3D::Create(reinterpret_cast<HWND>(window_handle))))
|
||||
|
|
|
@ -57,7 +57,6 @@ void VideoBackend::InitBackendInfo()
|
|||
bool VideoBackend::Initialize(void* window_handle)
|
||||
{
|
||||
InitializeShared();
|
||||
InitBackendInfo();
|
||||
|
||||
g_renderer = std::make_unique<Renderer>();
|
||||
g_vertex_manager = std::make_unique<VertexManager>();
|
||||
|
|
|
@ -159,7 +159,6 @@ bool VideoBackend::FillBackendInfo()
|
|||
|
||||
bool VideoBackend::Initialize(void* window_handle)
|
||||
{
|
||||
InitBackendInfo();
|
||||
InitializeShared();
|
||||
|
||||
GLUtil::InitInterface();
|
||||
|
|
|
@ -80,7 +80,6 @@ void VideoSoftware::InitBackendInfo()
|
|||
|
||||
bool VideoSoftware::Initialize(void* window_handle)
|
||||
{
|
||||
InitBackendInfo();
|
||||
InitializeShared();
|
||||
|
||||
SWOGLWindow::Init(window_handle);
|
||||
|
|
|
@ -302,7 +302,6 @@ void VideoBackendBase::InitializeShared()
|
|||
GeometryShaderManager::Init();
|
||||
PixelShaderManager::Init();
|
||||
|
||||
g_Config.Refresh();
|
||||
UpdateActiveConfig();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue