Skip to content

Commit

Permalink
Implement a CL switch to start fullscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
nohal committed Sep 17, 2013
1 parent 448cb06 commit aefc641
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/chart1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ wxString glog_file;
wxString gConfig_File;

int g_unit_test_1;
bool g_start_fullscreen;

MyFrame *gFrame;

Expand Down Expand Up @@ -761,17 +762,17 @@ void MyApp::OnInitCmdLine( wxCmdLineParser& parser )
{
// Add some OpenCPN specific command line options
parser.AddSwitch( _T("unit_test_1") );

parser.AddSwitch( _T("p") );

parser.AddSwitch( _T("no_opengl") );
parser.AddSwitch( _T("fullscreen") );
}

bool MyApp::OnCmdLineParsed( wxCmdLineParser& parser )
{
g_unit_test_1 = parser.Found( _T("unit_test_1") );
g_bportable = parser.Found( _T("p") );
g_bdisable_opengl = parser.Found( _T("no_opengl") );
g_start_fullscreen = parser.Found( _T("fullscreen") );

return true;
}
Expand Down Expand Up @@ -1742,7 +1743,7 @@ if( 0 == g_memCacheLimit )

cc1 = new ChartCanvas( gFrame ); // the chart display canvas
gFrame->SetCanvasWindow( cc1 );

cc1->SetQuiltMode( g_bQuiltEnable ); // set initial quilt mode
cc1->m_bFollow = pConfig->st_bFollow; // set initial state
cc1->SetViewPoint( vLat, vLon, initial_scale_ppm, 0., 0. );
Expand All @@ -1756,6 +1757,9 @@ if( 0 == g_memCacheLimit )
pthumbwin = new ThumbWin( cc1 );

gFrame->ApplyGlobalSettings( 1, false ); // done once on init with resize

if ( g_start_fullscreen )
gFrame->ToggleFullScreen();

g_toolbar_x = wxMax(g_toolbar_x, 0);
g_toolbar_y = wxMax(g_toolbar_y, 0);
Expand Down

0 comments on commit aefc641

Please sign in to comment.