fix command line parsing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57295 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
6c7f094959
commit
7881f83bed
@ -38,7 +38,6 @@
|
|||||||
|
|
||||||
|
|
||||||
// global options which can be set through command-line options
|
// global options which can be set through command-line options
|
||||||
GLboolean g_speed_test = GL_FALSE;
|
|
||||||
GLboolean g_use_vertex_arrays = GL_FALSE;
|
GLboolean g_use_vertex_arrays = GL_FALSE;
|
||||||
GLboolean g_doubleBuffer = GL_TRUE;
|
GLboolean g_doubleBuffer = GL_TRUE;
|
||||||
GLboolean g_smooth = GL_TRUE;
|
GLboolean g_smooth = GL_TRUE;
|
||||||
@ -67,28 +66,21 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
|
void MyApp::OnInitCmdLine(wxCmdLineParser& parser)
|
||||||
{
|
{
|
||||||
parser.AddSwitch("", "-sb");
|
parser.AddSwitch("", "sb", "Do not use double buffering");
|
||||||
parser.AddSwitch("", "-db");
|
parser.AddSwitch("", "db", "Use double buffering");
|
||||||
parser.AddSwitch("", "-speed");
|
parser.AddSwitch("", "va", "Use vertex arrays");
|
||||||
parser.AddSwitch("", "-va");
|
|
||||||
|
|
||||||
wxApp::OnInitCmdLine(parser);
|
wxApp::OnInitCmdLine(parser);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
bool MyApp::OnCmdLineParsed(wxCmdLineParser& parser)
|
||||||
{
|
{
|
||||||
if (parser.Found("-sb"))
|
if (parser.Found("sb"))
|
||||||
g_doubleBuffer = GL_FALSE;
|
g_doubleBuffer = GL_FALSE;
|
||||||
else if (parser.Found("-db"))
|
else if (parser.Found("db"))
|
||||||
g_doubleBuffer = GL_TRUE;
|
g_doubleBuffer = GL_TRUE;
|
||||||
|
|
||||||
if (parser.Found("-speed"))
|
if (parser.Found("va"))
|
||||||
{
|
|
||||||
g_speed_test = GL_TRUE;
|
|
||||||
g_doubleBuffer = GL_TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (parser.Found("-va"))
|
|
||||||
g_use_vertex_arrays = GL_TRUE;
|
g_use_vertex_arrays = GL_TRUE;
|
||||||
|
|
||||||
return wxApp::OnCmdLineParsed(parser);
|
return wxApp::OnCmdLineParsed(parser);
|
||||||
|
Loading…
Reference in New Issue
Block a user