[vlc-devel] [PATCH 3/5] ifdef out 32-bit Carbon API calls on x86_64

David Menestrina dmenest at yahoo.com
Thu Apr 15 01:24:06 CEST 2010


From: David Menestrina <dmenest-vlc at ofb dot net>

The Mac OS Carbon APIs are not available to 64-bit applications.
This change just ifdefs out calls to them to avoid compiler errors.
---
 projects/mozilla/vlcshell.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/projects/mozilla/vlcshell.cpp b/projects/mozilla/vlcshell.cpp
index e59dac9..3afe5ed 100644
--- a/projects/mozilla/vlcshell.cpp
+++ b/projects/mozilla/vlcshell.cpp
@@ -176,11 +176,13 @@ int16_t NPP_HandleEvent( NPP instance, void * event )
             return true;
         case mouseDown:
         {
+#ifndef __x86_64__  // GetDblTime() not available in 64 bit
             if( (myEvent->when - lastMouseUp) < GetDblTime() )
             {
                 /* double click */
                 p_plugin->toggle_fullscreen();
             }
+#endif // __x86_64__
             return true;
         }
         case mouseUp:
@@ -217,6 +219,7 @@ int16_t NPP_HandleEvent( NPP instance, void * event )
 
                 if( ! hasVout )
                 {
+#ifndef __x86_64__ 
                     /* draw the beautiful "No Picture" */
 
                     ForeColor(blackColor);
@@ -238,6 +241,7 @@ int16_t NPP_HandleEvent( NPP instance, void * event )
                     MoveTo( (npwindow.width-80)/ 2  , npwindow.height / 2 );
                     if( p_plugin->psz_text )
                         DrawText( p_plugin->psz_text, 0, strlen(p_plugin->psz_text) );
+#endif // __x86_64__
                 }
             }
             return true;
-- 
1.7.0.3




More information about the vlc-devel mailing list