Fix wrong printf() format specifiers in the joystick sample.

Use "%ld" for the long values, not "%d", they are not the same under LP64
platforms.

Closes #15691.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75253 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-11-21 00:07:30 +00:00
parent de54520c95
commit e705b36af5

View File

@@ -159,9 +159,9 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
#if wxUSE_STATUSBAR #if wxUSE_STATUSBAR
wxString buf; wxString buf;
if (event.ButtonDown()) if (event.ButtonDown())
buf.Printf(wxT("Joystick (%d, %d) #%i Fire!"), xpos, ypos, event.GetButtonChange()); buf.Printf(wxT("Joystick (%ld, %ld) #%i Fire!"), xpos, ypos, event.GetButtonChange());
else else
buf.Printf(wxT("Joystick (%d, %d) "), xpos, ypos); buf.Printf(wxT("Joystick (%ld, %ld) "), xpos, ypos);
/* /*
for(int i = 0; i < nButtons; ++i) for(int i = 0; i < nButtons; ++i)