- 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

View File

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