]> git.sesse.net Git - vlc/commitdiff
activex: bool to VARIANT_BOOL macro
authorJean-Paul Saman <jean-paul.saman@m2x.nl>
Fri, 12 Mar 2010 12:10:40 +0000 (13:10 +0100)
committerJean-Paul Saman <jean-paul.saman@m2x.nl>
Thu, 18 Mar 2010 10:16:03 +0000 (11:16 +0100)
projects/activex/plugin.cpp

index 1d9a23f79ed0262c0cda227fa73cc2b3624651ec..cc99dc7c2d7fc1bb46bd0487cbeb2c9e4035c401 100644 (file)
@@ -1135,6 +1135,7 @@ static void handle_position_changed_event(const libvlc_event_t* event, void *par
     plugin->fireOnPositionChangedEvent(event->u.media_player_position_changed.new_position);
 }
 
+#define B(val) ((val) ? 0xFFFF : 0x0000)
 void VLCPlugin::fireOnSeekableChangedEvent(VARIANT_BOOL seekable)
 {
     VARIANT varSeek;
@@ -1147,7 +1148,7 @@ void VLCPlugin::fireOnSeekableChangedEvent(VARIANT_BOOL seekable)
 static void handle_seekable_changed_event(const libvlc_event_t* event, void *param)
 {
     VLCPlugin *plugin = (VLCPlugin*)param;
-    plugin->fireOnSeekableChangedEvent(event->u.media_player_seekable_changed.new_seekable);
+    plugin->fireOnSeekableChangedEvent(B(event->u.media_player_seekable_changed.new_seekable));
 }
 
 void VLCPlugin::fireOnPausableChangedEvent(VARIANT_BOOL pausable)
@@ -1162,8 +1163,9 @@ void VLCPlugin::fireOnPausableChangedEvent(VARIANT_BOOL pausable)
 static void handle_pausable_changed_event(const libvlc_event_t* event, void *param)
 {
     VLCPlugin *plugin = (VLCPlugin*)param;
-    plugin->fireOnPausableChangedEvent(event->u.media_player_pausable_changed.new_pausable);
+    plugin->fireOnPausableChangedEvent(B(event->u.media_player_pausable_changed.new_pausable));
 }
+#undef B
 
 /* */