[vlc-commits] commit: activex: bool to VARIANT_BOOL macro (Jean-Paul Saman )

git at videolan.org git at videolan.org
Thu Mar 18 11:19:15 CET 2010


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Fri Mar 12 13:10:40 2010 +0100| [5577ca9936e34c3dbc79a90f9156d681e5cc624e] | committer: Jean-Paul Saman 

activex: bool to VARIANT_BOOL macro

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5577ca9936e34c3dbc79a90f9156d681e5cc624e
---

 projects/activex/plugin.cpp |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/projects/activex/plugin.cpp b/projects/activex/plugin.cpp
index 1d9a23f..cc99dc7 100644
--- a/projects/activex/plugin.cpp
+++ b/projects/activex/plugin.cpp
@@ -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
 
 /* */
 



More information about the vlc-commits mailing list