-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
media-sound/xmms2: adapt to mac-3 -> mac-4 API change
Picked patch sas-is from: xmms2/xmms2-devel#2 Package-Manager: Portage-2.3.13, Repoman-2.3.4
- Loading branch information
Sergei Trofimovich
committed
Nov 4, 2017
1 parent
aafb51b
commit c2395af
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
From e87745721deaf46d7054ac40cc55838561c9f552 Mon Sep 17 00:00:00 2001 | ||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Carretero?= <cJ@zougloub.eu> | ||
Date: Tue, 24 Oct 2017 18:43:26 -0400 | ||
Subject: [PATCH] plugins: mac: support newer mac API version | ||
|
||
--- | ||
src/plugins/mac/mac.cpp | 6 +++++- | ||
src/plugins/mac/source_adapter.h | 8 +++++++- | ||
2 files changed, 12 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/src/plugins/mac/mac.cpp b/src/plugins/mac/mac.cpp | ||
index cec43e52..d8d3d1b9 100644 | ||
--- a/src/plugins/mac/mac.cpp | ||
+++ b/src/plugins/mac/mac.cpp | ||
@@ -210,8 +210,12 @@ xmms_mac_get_media_info (xmms_xform_t *xform) | ||
gchar *name; | ||
|
||
field_name = pTagField->GetFieldName (); | ||
- name = (gchar *)GetUTF8FromUTF16 (field_name); | ||
|
||
+#if MAC_DLL_INTERFACE_VERSION_NUMBER >= 1000 | ||
+ name = (gchar *)CAPECharacterHelper::GetUTF8FromUTF16 (field_name); | ||
+#else | ||
+ name = (gchar *)GetUTF8FromUTF16 (field_name); | ||
+#endif | ||
memset (field_value, 0, 255); | ||
int size = 255; | ||
p_ape_tag->GetFieldString (field_name, (char *)field_value, &size, TRUE); | ||
diff --git a/src/plugins/mac/source_adapter.h b/src/plugins/mac/source_adapter.h | ||
index 94f75359..70617514 100644 | ||
--- a/src/plugins/mac/source_adapter.h | ||
+++ b/src/plugins/mac/source_adapter.h | ||
@@ -38,7 +38,13 @@ public: | ||
~CSourceAdapter () {}; | ||
|
||
// open / close | ||
- int Open (const wchar_t * pName) { return ERROR_SUCCESS; } | ||
+#if MAC_DLL_INTERFACE_VERSION_NUMBER >= 1000 | ||
+ int Open (const wchar_t * pName, BOOL bOpenReadOnly = FALSE) | ||
+#else | ||
+ int Open (const wchar_t * pName) | ||
+#endif | ||
+ { return ERROR_SUCCESS; } | ||
+ | ||
int Close () { return ERROR_SUCCESS; } | ||
|
||
// read / write | ||
-- | ||
2.15.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters