// Initialise this in OnInit, not statically
bool MyApp::OnInit()
{
+ if ( !wxApp::OnInit() )
+ return false;
+
wxJoystick stick(wxJOYSTICK1);
if (!stick.IsOk())
{
#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();