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/OnScreenDisplay.h"
|
||||||
#include "VideoCommon/RenderBase.h"
|
#include "VideoCommon/RenderBase.h"
|
||||||
#include "VideoCommon/VideoBackendBase.h"
|
#include "VideoCommon/VideoBackendBase.h"
|
||||||
|
#include "VideoCommon/VideoConfig.h"
|
||||||
|
|
||||||
namespace Core
|
namespace Core
|
||||||
{
|
{
|
||||||
|
@ -434,6 +435,12 @@ static void EmuThread(std::unique_ptr<BootParameters> boot)
|
||||||
HLE::Clear();
|
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))
|
if (!g_video_backend->Initialize(s_window_handle))
|
||||||
{
|
{
|
||||||
PanicAlert("Failed to initialize video backend!");
|
PanicAlert("Failed to initialize video backend!");
|
||||||
|
|
|
@ -132,7 +132,6 @@ bool VideoBackend::Initialize(void* window_handle)
|
||||||
if (window_handle == nullptr)
|
if (window_handle == nullptr)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
InitBackendInfo();
|
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
|
|
||||||
if (FAILED(D3D::Create(reinterpret_cast<HWND>(window_handle))))
|
if (FAILED(D3D::Create(reinterpret_cast<HWND>(window_handle))))
|
||||||
|
|
|
@ -57,7 +57,6 @@ void VideoBackend::InitBackendInfo()
|
||||||
bool VideoBackend::Initialize(void* window_handle)
|
bool VideoBackend::Initialize(void* window_handle)
|
||||||
{
|
{
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
InitBackendInfo();
|
|
||||||
|
|
||||||
g_renderer = std::make_unique<Renderer>();
|
g_renderer = std::make_unique<Renderer>();
|
||||||
g_vertex_manager = std::make_unique<VertexManager>();
|
g_vertex_manager = std::make_unique<VertexManager>();
|
||||||
|
|
|
@ -159,7 +159,6 @@ bool VideoBackend::FillBackendInfo()
|
||||||
|
|
||||||
bool VideoBackend::Initialize(void* window_handle)
|
bool VideoBackend::Initialize(void* window_handle)
|
||||||
{
|
{
|
||||||
InitBackendInfo();
|
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
|
|
||||||
GLUtil::InitInterface();
|
GLUtil::InitInterface();
|
||||||
|
|
|
@ -80,7 +80,6 @@ void VideoSoftware::InitBackendInfo()
|
||||||
|
|
||||||
bool VideoSoftware::Initialize(void* window_handle)
|
bool VideoSoftware::Initialize(void* window_handle)
|
||||||
{
|
{
|
||||||
InitBackendInfo();
|
|
||||||
InitializeShared();
|
InitializeShared();
|
||||||
|
|
||||||
SWOGLWindow::Init(window_handle);
|
SWOGLWindow::Init(window_handle);
|
||||||
|
|
|
@ -302,7 +302,6 @@ void VideoBackendBase::InitializeShared()
|
||||||
GeometryShaderManager::Init();
|
GeometryShaderManager::Init();
|
||||||
PixelShaderManager::Init();
|
PixelShaderManager::Init();
|
||||||
|
|
||||||
g_Config.Refresh();
|
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue