Pushing changes to force windows builds to use a configuration file rather than the...
authorwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 6 May 2013 17:17:19 +0000 (17:17 +0000)
committerwittend99 <wittend99@01035d8c-6547-0410-b346-abe4f91aad63>
Mon, 6 May 2013 17:17:19 +0000 (17:17 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1241 01035d8c-6547-0410-b346-abe4f91aad63

fdmdv2/src/fdmdv2_main.cpp

index ac144cd030f1d5e80a09c01f0eaea747e1b992d5..53463874aa4bafc00429ef9c45b0bb740618c507 100644 (file)
@@ -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();