- try to fix wx 2.8

This commit is contained in:
SoftCoder 2016-01-22 18:05:46 -08:00
parent 325920400e
commit 4da1425cbc
2 changed files with 9 additions and 2 deletions

@ -1 +1 @@
Subproject commit c256b69196d8aae7f00b833e75d6acdcb73953b0
Subproject commit a1e6be21823b1c597129e3c81f4301177c32fba7

View File

@ -307,7 +307,7 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
#if wxCHECK_VERSION(2, 9, 1)
#else
glCanvas->SetCurrent();
if(glCanvas) glCanvas->SetCurrent();
#endif
unitPath = unitToLoad;
@ -479,6 +479,13 @@ void MainWindow::setupStartupSettings() {
if(glCanvas == NULL) {
int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; // to prevent flicker
glCanvas = new GlCanvas(this, args);
#if wxCHECK_VERSION(2, 9, 1)
#else
glCanvas->SetCurrent();
#endif
}
glCanvas->setCurrentGLContext();
//printf("In setupStartupSettings #2\n");