mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoBackends: Merge Initialize and Shutdown functions.
This commit is contained in:
@ -53,7 +53,7 @@ static void InitBackendInfo()
|
||||
void VideoBackend::ShowConfig(void* parent)
|
||||
{
|
||||
InitBackendInfo();
|
||||
Host_ShowVideoConfig(parent, GetDisplayName(), "gfx_null");
|
||||
Host_ShowVideoConfig(parent, GetDisplayName(), GetConfigName());
|
||||
}
|
||||
|
||||
bool VideoBackend::Initialize(void* window_handle)
|
||||
@ -61,28 +61,6 @@ bool VideoBackend::Initialize(void* window_handle)
|
||||
InitializeShared();
|
||||
InitBackendInfo();
|
||||
|
||||
// Load Configs
|
||||
g_Config.Load(File::GetUserPath(D_CONFIG_IDX) + "GFX.ini");
|
||||
g_Config.GameIniLoad();
|
||||
g_Config.UpdateProjectionHack();
|
||||
g_Config.VerifyValidity();
|
||||
UpdateActiveConfig();
|
||||
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::CallbackType::Initialization);
|
||||
|
||||
// Initialize VideoCommon
|
||||
CommandProcessor::Init();
|
||||
PixelEngine::Init();
|
||||
BPInit();
|
||||
Fifo::Init();
|
||||
OpcodeDecoder::Init();
|
||||
IndexGenerator::Init();
|
||||
VertexShaderManager::Init();
|
||||
PixelShaderManager::Init();
|
||||
VertexLoaderManager::Init();
|
||||
Host_Message(WM_USER_CREATE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -102,19 +80,12 @@ void VideoBackend::Video_Prepare()
|
||||
|
||||
void VideoBackend::Shutdown()
|
||||
{
|
||||
// Shutdown VideoCommon
|
||||
Fifo::Shutdown();
|
||||
VertexLoaderManager::Shutdown();
|
||||
VertexShaderManager::Shutdown();
|
||||
PixelShaderManager::Shutdown();
|
||||
OpcodeDecoder::Shutdown();
|
||||
|
||||
// Do our OSD callbacks
|
||||
OSD::DoCallbacks(OSD::CallbackType::Shutdown);
|
||||
ShutdownShared();
|
||||
}
|
||||
|
||||
void VideoBackend::Video_Cleanup()
|
||||
{
|
||||
CleanupShared();
|
||||
PixelShaderCache::s_instance.reset();
|
||||
VertexShaderCache::s_instance.reset();
|
||||
GeometryShaderCache::s_instance.reset();
|
||||
|
Reference in New Issue
Block a user