diff options
Diffstat (limited to 'src/ochess.cpp')
| -rw-r--r-- | src/ochess.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ochess.cpp b/src/ochess.cpp index 7e212f8..bf3a2ce 100644 --- a/src/ochess.cpp +++ b/src/ochess.cpp @@ -5,8 +5,21 @@ bool MyApp::OnInit() { wxImage::AddHandler(new wxPNGHandler); + // Check config version + CONFIG_OPEN(conf); + wxString version=conf->Read("version",CONFIG_VERSION); + conf->Write("version",version); // Setup config file version + wxLogDebug("Starting ochess with configuration file version %s",version); + CONFIG_CLOSE(conf); + + // Advertise for configuration file version + if(version != CONFIG_VERSION) + SHOW_DIALOG_INFO("Configuration files version missmatch. Expected "+std::string(CONFIG_VERSION)+" but got "+version+".\nPlease remove the current configuration file as it may crash the application."); + + // Main frame MainWindow *frame = new MainWindow(); frame->Show(true); + return true; } |
