diff options
| author | Glenn Rice <glennricster@gmail.com> | 2011-02-25 21:14:13 +0000 |
|---|---|---|
| committer | Glenn Rice <glennricster@gmail.com> | 2011-02-25 21:14:13 +0000 |
| commit | 992f8be5b0ac4c391e50bb2e18cb2f7df1b7dd26 (patch) | |
| tree | a479a4613d4fea10126c174bdc0502ae9680b719 /Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp | |
| parent | eef715b1cf8730174777000f94252d9adf92332b (diff) | |
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
Diffstat (limited to 'Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp')
| -rw-r--r-- | Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp index 04a3b4ecc6..52d080b9a9 100644 --- a/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp +++ b/Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp @@ -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&) |
