diff --git a/source/g3d_viewer/main.cpp b/source/g3d_viewer/main.cpp index f5274689..cfdbeb76 100644 --- a/source/g3d_viewer/main.cpp +++ b/source/g3d_viewer/main.cpp @@ -218,7 +218,11 @@ MainWindow::MainWindow( std::pair > unitToLoad, //getGlPlatformExtensions(); 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 renderer= Renderer::getInstance(); @@ -435,7 +439,10 @@ MainWindow::~MainWindow(){ } void MainWindow::init() { +#if wxCHECK_VERSION(2, 9, 1) +#else glCanvas->SetCurrent(); +#endif renderer->init(); wxCommandEvent event; diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index e3f29b2c..c21bdd8b 100755 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -73,7 +73,10 @@ void MainWindow::onToolPlayer(wxCommandEvent& event){ } void MainWindow::init(string fname) { +#if wxCHECK_VERSION(2, 9, 1) +#else glCanvas->SetCurrent(); +#endif //menus menuBar = new wxMenuBar(); @@ -520,7 +523,12 @@ void MainWindow::onMenuFileSave(wxCommandEvent &event) { } void MainWindow::onMenuFileSaveAs(wxCommandEvent &event) { + +#if wxCHECK_VERSION(2, 9, 1) + wxFileDialog fd(this, wxT("Select file"), wxT(""), wxT(""), wxT("*.gbm|*.mgm"), wxFD_SAVE); +#else wxFileDialog fd(this, wxT("Select file"), wxT(""), wxT(""), wxT("*.gbm|*.mgm"), wxSAVE); +#endif fd.SetPath(fileDialog->GetPath()); fd.SetWildcard(wxT("Glest Map (*.gbm)|*.gbm|MegaGlest Map (*.mgm)|*.mgm"));