[vlc-commits] mmdevice: require Vista, simplify
Rémi Denis-Courmont
git at videolan.org
Sat Aug 8 20:33:54 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Aug 8 21:30:00 2015 +0300| [81f37503066494cd7611786648a225c0cd256ce7] | committer: Rémi Denis-Courmont
mmdevice: require Vista, simplify
MMDevice is not available on older Windows versions anyway. Failing to
load the plugin there is fine. It is even arguably better: it prevents
impossible choices showing in the preferences.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=81f37503066494cd7611786648a225c0cd256ce7
---
modules/audio_output/mmdevice.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)
diff --git a/modules/audio_output/mmdevice.c b/modules/audio_output/mmdevice.c
index ef9be5f..936be42 100644
--- a/modules/audio_output/mmdevice.c
+++ b/modules/audio_output/mmdevice.c
@@ -18,6 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#define _WIN32_WINNT 0x600
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
@@ -43,37 +44,6 @@ DEFINE_PROPERTYKEY(PKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd,
#include <vlc_modules.h>
#include "audio_output/mmdevice.h"
-#if (_WIN32_WINNT < 0x600)
-static VOID (WINAPI *InitializeConditionVariable) (PCONDITION_VARIABLE);
-static BOOL (WINAPI *SleepConditionVariableCS) (PCONDITION_VARIABLE,
- PCRITICAL_SECTION, DWORD);
-static VOID (WINAPI *WakeConditionVariable)(PCONDITION_VARIABLE);
-#define LOOKUP(s) \
- if (((s) = (void *)GetProcAddress(h, #s)) == NULL) return FALSE
-
-BOOL WINAPI DllMain(HINSTANCE, DWORD, LPVOID); /* avoid warning */
-BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved)
-{
- (void) dll;
- (void) reserved;
-
- switch (reason)
- {
- case DLL_PROCESS_ATTACH:
- {
- HANDLE h = GetModuleHandle(TEXT("kernel32.dll"));
- if (unlikely(h == NULL))
- return FALSE;
- LOOKUP(InitializeConditionVariable);
- LOOKUP(SleepConditionVariableCS);
- LOOKUP(WakeConditionVariable);
- break;
- }
- }
- return TRUE;
-}
-#endif
-
DEFINE_GUID (GUID_VLC_AUD_OUT, 0x4533f59d, 0x59ee, 0x00c6,
0xad, 0xb2, 0xc6, 0x8b, 0x50, 0x1a, 0x66, 0x55);
More information about the vlc-commits
mailing list