From 69067986c1f7354512f12e4b788506051b747a5b Mon Sep 17 00:00:00 2001 From: Michael Wetherell Date: Fri, 10 Jun 2005 14:45:39 +0000 Subject: [PATCH] Compilation fix for Cygwin git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34630 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- contrib/samples/mmedia/mmbman.cpp | 14 ++++++-------- contrib/samples/mmedia/mmboard.cpp | 19 +++++++++---------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/contrib/samples/mmedia/mmbman.cpp b/contrib/samples/mmedia/mmbman.cpp index 9da1bea03e..ab4f5c8c54 100644 --- a/contrib/samples/mmedia/mmbman.cpp +++ b/contrib/samples/mmedia/mmbman.cpp @@ -355,9 +355,9 @@ MMBoardVideoFile::MMBoardVideoFile(const wxString& filename) { m_output_window = NULL; -#if defined(__UNIX__) +#if defined(__UNIX__) && !defined(__CYGWIN__) m_video_driver = new wxVideoXANIM(filename); -#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__) +#elif defined(__WINDOWS__) && !defined(__MINGW32__) && !defined(__WATCOMC__) && !defined(__CYGWIN__) // versions of Open Watcom and MinGW tested against this source does not // deliver "digitalv.h" required in this feature m_video_driver = new wxVideoWindows(filename); @@ -510,7 +510,10 @@ DECLARE_APP(MMBoardApp) wxSoundStream *MMBoardManager::OpenSoundStream() { -#ifdef __UNIX__ +#ifdef __WIN32__ + if ((wxGetApp().m_caps & MM_SOUND_WIN) != 0) + return new wxSoundStreamWin(); +#elif __UNIX__ if ((wxGetApp().m_caps & MM_SOUND_ESD) != 0) return new wxSoundStreamESD(); @@ -518,11 +521,6 @@ wxSoundStream *MMBoardManager::OpenSoundStream() return new wxSoundStreamOSS(); #endif -#ifdef __WIN32__ - if ((wxGetApp().m_caps & MM_SOUND_WIN) != 0) - return new wxSoundStreamWin(); -#endif - wxMessageBox(_T("You are trying to open a multimedia but you have not devices"), _T("Error"), wxOK | wxICON_ERROR, NULL); return NULL; diff --git a/contrib/samples/mmedia/mmboard.cpp b/contrib/samples/mmedia/mmboard.cpp index 7b64a14b36..3015dd5308 100644 --- a/contrib/samples/mmedia/mmboard.cpp +++ b/contrib/samples/mmedia/mmboard.cpp @@ -198,7 +198,15 @@ wxUint8 MMBoardApp::TestMultimediaCaps() caps = 0; -#ifdef __UNIX__ +#ifdef __WIN32__ + // We test the Windows sound support. + + dev = new wxSoundStreamWin(); + if (dev->GetError() == wxSOUND_NOERROR) + caps |= MM_SOUND_WIN; + delete dev; + +#elif defined __UNIX__ // We now test the ESD support dev = new wxSoundStreamESD(); @@ -221,15 +229,6 @@ wxUint8 MMBoardApp::TestMultimediaCaps() } #endif -#endif - -#ifdef __WIN32__ - // We test the Windows sound support. - - dev = new wxSoundStreamWin(); - if (dev->GetError() == wxSOUND_NOERROR) - caps |= MM_SOUND_WIN; - delete dev; #endif return caps; -- 2.47.2