]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/joytest/joytest.cpp
remove .cvsignore files, they're useless with svn
[wxWidgets.git] / samples / joytest / joytest.cpp
index 0366659659d180520930305c063d7b06aeffc74e..0da7193b519d8c94ec0a9b4bdad5e1d69a552e8e 100644 (file)
@@ -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();