Skip to content

Commit afc05bd

Browse files
committed
Fixed weather editor window creation
1 parent a862762 commit afc05bd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/xrEngine/Device_Initialize.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ void CRenderDevice::initialize_weather_editor()
2727
m_editor_initialize(m_editor, m_engine);
2828
VERIFY(m_editor);
2929

30-
//m_hWnd = m_editor->view_handle();
31-
VERIFY(m_sdlWnd != INVALID_HANDLE_VALUE);
30+
m_sdlWnd = SDL_CreateWindowFrom(m_editor->view_handle());
31+
R_ASSERT3(m_sdlWnd, "Unable to create SDL window from editor", SDL_GetError());
3232

3333
GEnv.isEditor = true;
3434
}
@@ -39,11 +39,11 @@ void CRenderDevice::Initialize()
3939
TimerGlobal.Start();
4040
TimerMM.Start();
4141

42+
R_ASSERT3(SDL_Init(SDL_INIT_VIDEO) == 0, "Unable to initialize SDL", SDL_GetError());
43+
4244
if (strstr(Core.Params, "-weather"))
4345
initialize_weather_editor();
4446

45-
R_ASSERT3(SDL_Init(SDL_INIT_VIDEO) == 0, "Unable to initialize SDL", SDL_GetError());
46-
4747
if (!m_sdlWnd)
4848
{
4949
const Uint32 flags = SDL_WINDOW_BORDERLESS | SDL_WINDOW_HIDDEN |

0 commit comments

Comments
 (0)