From c21317a5f4bf8e0f28fcad82734eae983872d21d Mon Sep 17 00:00:00 2001 From: SoftCoder Date: Sat, 29 Nov 2014 17:44:22 -0800 Subject: [PATCH] - attempt to further stabilize g3d viewer end map editor --- data/glest_game | 2 +- source/g3d_viewer/main.cpp | 4 ++-- source/glest_map_editor/main.cpp | 14 +++++++++----- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/data/glest_game b/data/glest_game index 720a63bb3..f674bb746 160000 --- a/data/glest_game +++ b/data/glest_game @@ -1 +1 @@ -Subproject commit 720a63bb34e0c30add8fb1bf65833db0710ae6fc +Subproject commit f674bb7461ea1ada93c96a7c3167daa4d2dc1ef3 diff --git a/source/g3d_viewer/main.cpp b/source/g3d_viewer/main.cpp index ba1751536..9386cb15f 100644 --- a/source/g3d_viewer/main.cpp +++ b/source/g3d_viewer/main.cpp @@ -575,7 +575,7 @@ void MainWindow::init() { #elif wxCHECK_VERSION(2, 9, 1) #else - //glCanvas->SetCurrent(); + glCanvas->SetCurrent(); //printf("setcurrent #2\n"); #endif @@ -593,7 +593,7 @@ void MainWindow::onPaint(wxPaintEvent &event) { #elif wxCHECK_VERSION(2, 9, 3) #elif wxCHECK_VERSION(2, 9, 1) - //glCanvas->setCurrentGLContext(); + glCanvas->setCurrentGLContext(); #endif if(startupSettingsInited == false) { diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index aaef12ae1..e9c9b7c70 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -644,11 +644,11 @@ void MainWindow::onPaint(wxPaintEvent &event) { // glCanvas->setCurrentGLContext(); //#endif - static bool contextSet = false; - if(contextSet == false) { - contextSet = true; - glCanvas->setCurrentGLContext(); - } + //static bool contextSet = false; + //if(contextSet == false) { + // contextSet = true; + glCanvas->setCurrentGLContext(); + //} if(lastPaintEvent.getMillis() < 30) { sleep(1); @@ -1585,6 +1585,10 @@ bool App::OnInit() { SystemFlags::VERBOSE_MODE_ENABLED = false; SystemFlags::ENABLE_THREADED_LOGGING = false; +#if defined(wxMAJOR_VERSION) && defined(wxMINOR_VERSION) && defined(wxRELEASE_NUMBER) && defined(wxSUBRELEASE_NUMBER) + printf("Using wxWidgets version [%d.%d.%d.%d]\n",wxMAJOR_VERSION,wxMINOR_VERSION,wxRELEASE_NUMBER,wxSUBRELEASE_NUMBER); +#endif + string fileparam; if(argc==2){ if(argv[1][0]=='-') { // any flag gives help and exits program.