X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/65442ab650425a5f6a1d5d685e8df582401a9be7..9b6bbdccba27401cf85654cd0fb3533902c4ad5c:/samples/joytest/joytest.cpp diff --git a/samples/joytest/joytest.cpp b/samples/joytest/joytest.cpp index 403ea91a8e..65ca2e196c 100644 --- a/samples/joytest/joytest.cpp +++ b/samples/joytest/joytest.cpp @@ -51,7 +51,7 @@ bool MyApp::OnInit() } #if wxUSE_SOUND - m_fire.Create(_T("gun.wav")); + m_fire.Create(_T("buttonpress.wav")); #endif // wxUSE_SOUND m_minX = stick.GetXMin(); @@ -86,7 +86,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(); @@ -162,11 +162,11 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event) /* for(int i = 0; i < nButtons; ++i) { - buf += wxString(wxT("[")) + + buf += wxString(wxT("[")) + ((event.GetButtonState() & (1 << i)) ? wxT("Y") : wxT("N")) + wxString(wxT("]")); } */ - + frame->SetStatusText(buf); #endif // wxUSE_STATUSBAR