From 789e1cdf371137b729e832e28a5feb6e97a3a243 Mon Sep 17 00:00:00 2001 From: Jammyjamjamman Date: Fri, 4 Jun 2021 22:08:18 +0100 Subject: [PATCH] Fix editor and g3dviewer for wx 3.1.x glCanvas args struct needs to be null terminated. https://trac.wxwidgets.org/ticket/19193#ticket fixes iss #207. --- source/g3d_viewer/main.cpp | 2 +- source/glest_map_editor/main.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/g3d_viewer/main.cpp b/source/g3d_viewer/main.cpp index bd321fd45..c1bed3f5b 100644 --- a/source/g3d_viewer/main.cpp +++ b/source/g3d_viewer/main.cpp @@ -591,7 +591,7 @@ MainWindow::~MainWindow(){ void MainWindow::initGlCanvas(){ if(glCanvas == NULL) { - 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, 0 }; // to prevent flicker glCanvas = new GlCanvas(this, args); } } diff --git a/source/glest_map_editor/main.cpp b/source/glest_map_editor/main.cpp index 889a1dea8..d1606df2d 100644 --- a/source/glest_map_editor/main.cpp +++ b/source/glest_map_editor/main.cpp @@ -493,7 +493,7 @@ void MainWindow::onClose(wxCloseEvent &event) { void MainWindow::initGlCanvas(){ if(glCanvas == NULL) { - int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8 }; + int args[] = { WX_GL_RGBA, WX_GL_DOUBLEBUFFER, WX_GL_MIN_ALPHA, 8, 0 }; glCanvas = new GlCanvas(this, this->panel, args); boxsizer->Add(glCanvas, 1, wxEXPAND);