summaryrefslogtreecommitdiffstats
path: root/avmedia
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-01-27 18:48:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-01-27 22:01:41 +0100
commit78568fc29315fd653b39d8911e690703446bdc76 (patch)
treed4cf7413a62287d09cfa64b0450e3d99ad6e2f3f /avmedia
parentAdapt to Clang 11 move of DynTypedNodeList (diff)
downloadcore-78568fc29315fd653b39d8911e690703446bdc76.tar.gz
core-78568fc29315fd653b39d8911e690703446bdc76.zip
Fix order of MACOSX vs. UNX checks
...where UNX is also defined on macOS, as spotted by Mike Kaganski at <https://gerrit.libreoffice.org/c/core/+/87372#message-d1cf7f65_776ae3cd>. The order appears to have been broken ever since fd47df122a37b4fa982f9fd0000907d9aee0c80a "Fix typos and make the VLC code in theory work as 64-bit on Windows and OS X". Change-Id: I83fa7937d560d88d66856660f143e883265fefd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87547 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'avmedia')
-rw-r--r--avmedia/source/vlc/wrapper/Player.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/avmedia/source/vlc/wrapper/Player.cxx b/avmedia/source/vlc/wrapper/Player.cxx
index e80b8df043bb..27e63a21a6d0 100644
--- a/avmedia/source/vlc/wrapper/Player.cxx
+++ b/avmedia/source/vlc/wrapper/Player.cxx
@@ -36,10 +36,10 @@ namespace { extern "C" {
const char *psz_filepath,
unsigned int i_width,
unsigned int i_height );
-#if defined UNX
- void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable );
-#elif defined MACOSX
+#if defined MACOSX
void ( *libvlc_media_player_set_nsobject ) ( libvlc_media_player_t *p_mi, void *drawable );
+#elif defined UNX
+ void ( *libvlc_media_player_set_xwindow ) ( libvlc_media_player_t *p_mi, uint32_t drawable );
#elif defined _WIN32
void ( *libvlc_media_player_set_hwnd ) ( libvlc_media_player_t *p_mi, void *drawable );
#else
@@ -79,10 +79,10 @@ namespace avmedia::vlc::wrapper
SYM_MAP( libvlc_audio_set_mute ),
SYM_MAP( libvlc_audio_get_mute ),
SYM_MAP( libvlc_video_take_snapshot ),
-#if defined UNX
- SYM_MAP( libvlc_media_player_set_xwindow ),
-#elif defined MACOSX
+#if defined MACOSX
SYM_MAP( libvlc_media_player_set_nsobject ),
+#elif defined UNX
+ SYM_MAP( libvlc_media_player_set_xwindow ),
#elif defined _WIN32
SYM_MAP( libvlc_media_player_set_hwnd ),
#endif
@@ -216,10 +216,10 @@ namespace avmedia::vlc::wrapper
void Player::setWindow( intptr_t id )
{
-#if defined UNX
- libvlc_media_player_set_xwindow( mPlayer, static_cast<uint32_t>(id) );
-#elif defined MACOSX
+#if defined MACOSX
libvlc_media_player_set_nsobject( mPlayer, reinterpret_cast<void*>( id ) );
+#elif defined UNX
+ libvlc_media_player_set_xwindow( mPlayer, static_cast<uint32_t>(id) );
#elif defined _WIN32
libvlc_media_player_set_hwnd( mPlayer, reinterpret_cast<void*>( id ) );
#endif