From: drowe67 Date: Sun, 25 May 2014 01:11:41 +0000 (+0000) Subject: first pass at Win32 registry bug X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=704f9d4774a9254b8fe5704aebc4709033e0a9de;p=freetel-svn-tracking.git first pass at Win32 registry bug git-svn-id: https://svn.code.sf.net/p/freetel/code@1593 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/fdmdv2/src/fdmdv2_main.cpp b/fdmdv2/src/fdmdv2_main.cpp index ba157fd3..ba93e3db 100644 --- a/fdmdv2/src/fdmdv2_main.cpp +++ b/fdmdv2/src/fdmdv2_main.cpp @@ -201,6 +201,13 @@ MainFrame::MainFrame(wxWindow *parent) : TopFrame(parent) int w = pConfig->Read(wxT("/MainFrame/width"), 800); int h = pConfig->Read(wxT("/MainFrame/height"), 550); + // sanitise frame position as a first pass at Win32 registry bug + + if (x < 0) x = 20; + if (y < 0) y = 20; + if (w < 0) w = 800; + if (h < 0) h = 550; + // note: run DebugView program to see this message under windows //wxLogDebug("x = %d y = %d w = %d h = %d\n", x,y,w,h); wxGetApp().m_show_wf = pConfig->Read(wxT("/MainFrame/show_wf"), 1);