]> git.saurik.com Git - wxWidgets.git/commitdiff
compilation fixes for wxUSE_WAVE=0
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2001 10:12:40 +0000 (10:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2001 10:12:40 +0000 (10:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10763 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

samples/joytest/joytest.cpp
samples/joytest/joytest.h

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