diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp
index 54b8463..26b6b11 100644
a
|
b
|
ScenarioEditor::ScenarioEditor(wxWindow* parent)
|
521 | 521 | // Need to make sure the canvas is realised, so that its context is valid |
522 | 522 | // this solves the "invalid drawable" error |
523 | 523 | Show(true); |
| 524 | Raise(); |
524 | 525 | #endif |
525 | 526 | #ifdef __WXGTK__ |
526 | 527 | // TODO: wxSafeYield causes issues on wxOSX 2.9, is it necessary? |
… |
… |
ScenarioEditor::ScenarioEditor(wxWindow* parent)
|
529 | 530 | |
530 | 531 | // Send setup messages to game engine: |
531 | 532 | |
| 533 | POST_MESSAGE(InitSDL, ()); |
| 534 | |
532 | 535 | POST_MESSAGE(SetCanvas, (static_cast<wxGLCanvas*>(canvas), |
533 | 536 | canvas->GetClientSize().GetWidth(), canvas->GetClientSize().GetHeight())); |
534 | 537 | |
diff --git a/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp b/source/tools/atlas/GameInterface/Handlers/GraphicsSetupHandlers.cpp
index 050831c..78c5811 100644
a
|
b
|
|
1 | | /* Copyright (C) 2014 Wildfire Games. |
| 1 | /* Copyright (C) 2015 Wildfire Games. |
2 | 2 | * This file is part of 0 A.D. |
3 | 3 | * |
4 | 4 | * 0 A.D. is free software: you can redistribute it and/or modify |
… |
… |
MESSAGEHANDLER(Init)
|
62 | 62 | g_VideoMode.InitNonSDL(); |
63 | 63 | } |
64 | 64 | |
65 | | MESSAGEHANDLER(InitGraphics) |
| 65 | MESSAGEHANDLER(InitSDL) |
66 | 66 | { |
67 | 67 | UNUSED2(msg); |
68 | 68 | |
… |
… |
MESSAGEHANDLER(InitGraphics)
|
81 | 81 | SDL_GL_LoadLibrary(NULL); // NULL = use default |
82 | 82 | // (it shouldn't hurt if this is called multiple times, I think) |
83 | 83 | #endif |
| 84 | } |
| 85 | |
| 86 | MESSAGEHANDLER(InitGraphics) |
| 87 | { |
| 88 | UNUSED2(msg); |
84 | 89 | |
85 | 90 | ogl_Init(); |
86 | 91 | |
diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
index 0a93a60..8de339b 100644
a
|
b
|
|
32 | 32 | // Initialise some engine code. Must be called before anything else. |
33 | 33 | MESSAGE(Init, ); |
34 | 34 | |
| 35 | // Initialise SDL-related code. Must be called before SetCanvas and InitGraphics. |
| 36 | MESSAGE(InitSDL, ); |
| 37 | |
35 | 38 | // Initialise graphics-related code. Must be called after the first SetCanvas, |
36 | 39 | // and before much else. |
37 | 40 | MESSAGE(InitGraphics, ); |