X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/84267f0dfcc98e1cd285295b2f1b2abf74dc0b45..941b78cc1da712afca54adb29bb6c04d6ba9b295:/samples/display/display.cpp diff --git a/samples/display/display.cpp b/samples/display/display.cpp index 3b9fc584cd..0744d063d4 100644 --- a/samples/display/display.cpp +++ b/samples/display/display.cpp @@ -161,6 +161,13 @@ IMPLEMENT_APP(MyApp) // 'Main program' equivalent: the program execution "starts" here bool MyApp::OnInit() { +#ifdef __WXMSW__ + if ( argc == 2 && !wxStricmp(argv[1], _T("/dx")) ) + { + wxDisplay::UseDirectX(true); + } +#endif // __WXMSW__ + // create the main application window MyFrame *frame = new MyFrame(_("Display wxWindows Sample"), wxPoint(50, 50), wxSize(450, 340)); @@ -306,13 +313,6 @@ void MyFrame::OnQuit(wxCommandEvent& WXUNUSED(event)) void MyFrame::OnAbout(wxCommandEvent& WXUNUSED(event)) { - wxDisplay dpy(1); - if ( !dpy.ChangeMode(wxVideoMode(800, 600)) ) - { - wxLogError("Failed!"); - return; - } - wxMessageBox(_T("Demo program for wxDisplay class.\n\n(c) 2003 Vadim Zeitlin"), _T("About Display Sample"), wxOK | wxICON_INFORMATION,