mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 07:31:21 +02:00
- a few changes so things can also build when using newer wxwidgets libs as well as newer xerces
This commit is contained in:
@@ -218,7 +218,11 @@ MainWindow::MainWindow( std::pair<string,vector<string> > unitToLoad,
|
|||||||
//getGlPlatformExtensions();
|
//getGlPlatformExtensions();
|
||||||
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();
|
glCanvas->SetCurrent();
|
||||||
|
#endif
|
||||||
|
|
||||||
renderer= Renderer::getInstance();
|
renderer= Renderer::getInstance();
|
||||||
|
|
||||||
@@ -435,7 +439,10 @@ MainWindow::~MainWindow(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::init() {
|
void MainWindow::init() {
|
||||||
|
#if wxCHECK_VERSION(2, 9, 1)
|
||||||
|
#else
|
||||||
glCanvas->SetCurrent();
|
glCanvas->SetCurrent();
|
||||||
|
#endif
|
||||||
renderer->init();
|
renderer->init();
|
||||||
|
|
||||||
wxCommandEvent event;
|
wxCommandEvent event;
|
||||||
|
@@ -73,7 +73,10 @@ void MainWindow::onToolPlayer(wxCommandEvent& event){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::init(string fname) {
|
void MainWindow::init(string fname) {
|
||||||
|
#if wxCHECK_VERSION(2, 9, 1)
|
||||||
|
#else
|
||||||
glCanvas->SetCurrent();
|
glCanvas->SetCurrent();
|
||||||
|
#endif
|
||||||
|
|
||||||
//menus
|
//menus
|
||||||
menuBar = new wxMenuBar();
|
menuBar = new wxMenuBar();
|
||||||
@@ -520,7 +523,12 @@ void MainWindow::onMenuFileSave(wxCommandEvent &event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::onMenuFileSaveAs(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);
|
wxFileDialog fd(this, wxT("Select file"), wxT(""), wxT(""), wxT("*.gbm|*.mgm"), wxSAVE);
|
||||||
|
#endif
|
||||||
|
|
||||||
fd.SetPath(fileDialog->GetPath());
|
fd.SetPath(fileDialog->GetPath());
|
||||||
fd.SetWildcard(wxT("Glest Map (*.gbm)|*.gbm|MegaGlest Map (*.mgm)|*.mgm"));
|
fd.SetWildcard(wxT("Glest Map (*.gbm)|*.gbm|MegaGlest Map (*.mgm)|*.mgm"));
|
||||||
|
Reference in New Issue
Block a user