compilation fixes for wxUSE_WAVE=0

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2001-07-02 10:12:40 +00:00
parent d373d379ae
commit 4c05b807a5
2 changed files with 6 additions and 0 deletions

View File

@@ -44,7 +44,9 @@ bool MyApp::OnInit(void)
wxMessageBox("No joystick detected!"); wxMessageBox("No joystick detected!");
return FALSE; return FALSE;
} }
#if wxUSE_WAVE
m_fire.Create("gun.wav"); m_fire.Create("gun.wav");
#endif // wxUSE_WAVE
m_maxX = stick.GetXMax(); m_maxX = stick.GetXMax();
m_maxY = stick.GetYMax(); m_maxY = stick.GetYMax();
@@ -133,10 +135,12 @@ void MyCanvas::OnJoystickEvent(wxJoystickEvent& event)
sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y); sprintf(buf, "Joystick (%ld, %ld)", pt.x, pt.y);
frame->SetStatusText(buf); frame->SetStatusText(buf);
#if wxUSE_WAVE
if (event.ButtonDown() && wxGetApp().m_fire.IsOk()) if (event.ButtonDown() && wxGetApp().m_fire.IsOk())
{ {
wxGetApp().m_fire.Play(); wxGetApp().m_fire.Play();
} }
#endif // wxUSE_WAVE
} }
BEGIN_EVENT_TABLE(MyFrame, wxFrame) BEGIN_EVENT_TABLE(MyFrame, wxFrame)

View File

@@ -19,7 +19,9 @@ class MyApp: public wxApp
int m_maxX; int m_maxX;
int m_maxY; int m_maxY;
#if wxUSE_WAVE
wxWave m_fire; wxWave m_fire;
#endif // wxUSE_WAVE
}; };
DECLARE_APP(MyApp) DECLARE_APP(MyApp)