From: wittend99 Date: Mon, 6 May 2013 17:17:19 +0000 (+0000) Subject: Pushing changes to force windows builds to use a configuration file rather than the... X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=c41e3c10e3fa00e72c3a6b1114d1891af449a3af;p=freetel-svn-tracking.git Pushing changes to force windows builds to use a configuration file rather than the registry. git-svn-id: https://svn.code.sf.net/p/freetel/code@1241 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index ac144cd0..53463874 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -130,7 +130,6 @@ IMPLEMENT_APP(MainApp); //------------------------------------------------------------------------- bool MainApp::OnInit() { - if(!wxApp::OnInit()) { return false; @@ -138,8 +137,16 @@ bool MainApp::OnInit() SetVendorName(wxT("CODEC2-Project")); SetAppName(wxT("FreeDV")); // not needed, it's the default value +#ifdef _WXMSW_ + // Force use of file-based configuration persistance on Windows platforma + wxConfig *pConfig = new wxConfig(); + wxFileConfig *pFConfig = new wxFileConfig(wxT("FreeDV"), wxT("CODEC2-Project"), wxT("freedv.conf"), wxT("freedv.conf"), wxCONFIG_USE_LOCAL_FILE | wxCONFIG_USE_RELATIVE_PATH); + pConfig->Set(pFConfig); + pConfig->SetRecordDefaults(); +#else wxConfigBase *pConfig = wxConfigBase::Get(); pConfig->SetRecordDefaults(); +#endif m_rTopWindow = wxRect(0, 0, 0, 0); m_strRxInAudio.Empty();