- a few changes so things can also build when using newer wxwidgets libs as well as newer xerces

This commit is contained in:
Mark Vejvoda 2011-03-20 00:59:17 +00:00
parent 0379b7284d
commit c75181f350
2 changed files with 15 additions and 0 deletions

View File

@ -218,7 +218,11 @@ MainWindow::MainWindow( std::pair<string,vector<string> > 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;

View File

@ -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"));