X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/196785e6b7a5b69b7f16abb65c2397954192bbf9..69a05ef6d65a4450f9e929a22bbf96ddcde916f3:/samples/joytest/joytest.cpp diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 0366659659..0da7193b51 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -43,6 +43,9 @@ int nButtons = 0; // Initialise this in OnInit, not statically bool MyApp::OnInit() { + if ( !wxApp::OnInit() ) + return false; + wxJoystick stick(wxJOYSTICK1); if (!stick.IsOk()) { @@ -86,7 +89,7 @@ bool MyApp::OnInit() #if wxUSE_STATUSBAR frame->CreateStatusBar(); - frame->SetStatusText(wxString::Format(wxT("Device [%s] (PID:[%i] MID:[%i]) Ready... # of joysticks:[%i]"), stick.GetProductName().c_str(), stick.GetProductId(), stick.GetManufacturerId(), stick.GetNumberJoysticks())); + frame->SetStatusText(wxString::Format(wxT("Device [%s] (PID:[%i] MID:[%i]) Ready... # of joysticks:[%i]"), stick.GetProductName().c_str(), stick.GetProductId(), stick.GetManufacturerId(), wxJoystick::GetNumberJoysticks())); #endif // wxUSE_STATUSBAR frame->CenterOnScreen();