mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-27 23:08:47 +00:00
If video backend initialization fails, have the emulator die gracefully instead of crashing the application. Also a little clean up of the passage of the video window handle to the backend and back.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7248 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
eef715b1cf
commit
992f8be5b0
17 changed files with 53 additions and 96 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "FileUtil.h"
|
||||
#include "VideoBackend.h"
|
||||
#include "../../../Core/VideoCommon/Src/Fifo.h"
|
||||
#include "Core.h"
|
||||
|
||||
namespace SW
|
||||
{
|
||||
|
@ -62,10 +63,16 @@ void VideoBackend::ShowConfig(void *_hParent)
|
|||
#endif
|
||||
}
|
||||
|
||||
void VideoBackend::Initialize()
|
||||
bool VideoBackend::Initialize(void *&window_handle)
|
||||
{
|
||||
g_SWVideoConfig.Load((std::string(File::GetUserPath(D_CONFIG_IDX)) + "gfx_software.ini").c_str());
|
||||
|
||||
if (!OpenGL_Create(window_handle))
|
||||
{
|
||||
Core::Callback_VideoLog("SWRenderer::Create failed\n");
|
||||
return false;
|
||||
}
|
||||
|
||||
InitBPMemory();
|
||||
InitXFMemory();
|
||||
SWCommandProcessor::Init();
|
||||
|
@ -76,6 +83,8 @@ void VideoBackend::Initialize()
|
|||
HwRasterizer::Init();
|
||||
SWRenderer::Init();
|
||||
DebugUtil::Init();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void VideoBackend::DoState(PointerWrap&)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue