mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 11:42:31 +01:00
- a few changes so things can also build when using newer wxwidgets libs as well as newer xerces
This commit is contained in:
parent
0379b7284d
commit
c75181f350
@ -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;
|
||||
|
@ -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"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user