Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
780a173f
Commit
780a173f
authored
Sep 28, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Oct 17, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.media.mediacontrol: Implement IMusicDisplayProperties::get/put_Artist().
Called by Roon.
parent
b7768065
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
9 deletions
+14
-9
main.c
dlls/windows.media.mediacontrol/main.c
+9
-4
mediacontrol.c
dlls/windows.media.mediacontrol/tests/mediacontrol.c
+5
-5
No files found.
dlls/windows.media.mediacontrol/main.c
View file @
780a173f
...
@@ -122,6 +122,7 @@ struct music_properties
...
@@ -122,6 +122,7 @@ struct music_properties
IMusicDisplayProperties
IMusicDisplayProperties_iface
;
IMusicDisplayProperties
IMusicDisplayProperties_iface
;
LONG
ref
;
LONG
ref
;
HSTRING
artist
;
HSTRING
title
;
HSTRING
title
;
};
};
...
@@ -168,6 +169,7 @@ static ULONG WINAPI music_properties_Release( IMusicDisplayProperties *iface )
...
@@ -168,6 +169,7 @@ static ULONG WINAPI music_properties_Release( IMusicDisplayProperties *iface )
if
(
!
ref
)
if
(
!
ref
)
{
{
WindowsDeleteString
(
impl
->
artist
);
WindowsDeleteString
(
impl
->
title
);
WindowsDeleteString
(
impl
->
title
);
free
(
impl
);
free
(
impl
);
}
}
...
@@ -221,14 +223,17 @@ static HRESULT WINAPI music_properties_put_AlbumArtist( IMusicDisplayProperties
...
@@ -221,14 +223,17 @@ static HRESULT WINAPI music_properties_put_AlbumArtist( IMusicDisplayProperties
static
HRESULT
WINAPI
music_properties_get_Artist
(
IMusicDisplayProperties
*
iface
,
HSTRING
*
value
)
static
HRESULT
WINAPI
music_properties_get_Artist
(
IMusicDisplayProperties
*
iface
,
HSTRING
*
value
)
{
{
FIXME
(
"iface %p, value %p stub!
\n
"
,
iface
,
value
);
struct
music_properties
*
impl
=
impl_from_IMusicDisplayProperties
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, value %p
\n
"
,
iface
,
value
);
return
WindowsDuplicateString
(
impl
->
artist
,
value
);
}
}
static
HRESULT
WINAPI
music_properties_put_Artist
(
IMusicDisplayProperties
*
iface
,
HSTRING
value
)
static
HRESULT
WINAPI
music_properties_put_Artist
(
IMusicDisplayProperties
*
iface
,
HSTRING
value
)
{
{
FIXME
(
"iface %p, value %s stub!
\n
"
,
iface
,
debugstr_hstring
(
value
)
);
struct
music_properties
*
impl
=
impl_from_IMusicDisplayProperties
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"iface %p, value %p
\n
"
,
iface
,
value
);
WindowsDeleteString
(
impl
->
artist
);
return
WindowsDuplicateString
(
value
,
&
impl
->
artist
);
}
}
static
const
IMusicDisplayPropertiesVtbl
music_properties_vtbl
=
static
const
IMusicDisplayPropertiesVtbl
music_properties_vtbl
=
...
...
dlls/windows.media.mediacontrol/tests/mediacontrol.c
View file @
780a173f
...
@@ -193,17 +193,17 @@ static void test_MediaControlStatics(void)
...
@@ -193,17 +193,17 @@ static void test_MediaControlStatics(void)
WindowsDeleteString
(
ret_str
);
WindowsDeleteString
(
ret_str
);
hr
=
IMusicDisplayProperties_put_Artist
(
music_properties
,
NULL
);
hr
=
IMusicDisplayProperties_put_Artist
(
music_properties
,
NULL
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCreateStringReference
(
L"The Wine Project"
,
wcslen
(
L"The Wine Project"
),
&
header
,
&
str
);
hr
=
WindowsCreateStringReference
(
L"The Wine Project"
,
wcslen
(
L"The Wine Project"
),
&
header
,
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IMusicDisplayProperties_put_Artist
(
music_properties
,
str
);
hr
=
IMusicDisplayProperties_put_Artist
(
music_properties
,
str
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IMusicDisplayProperties_get_Artist
(
music_properties
,
&
ret_str
);
hr
=
IMusicDisplayProperties_get_Artist
(
music_properties
,
&
ret_str
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
WindowsCompareStringOrdinal
(
str
,
ret_str
,
&
res
);
hr
=
WindowsCompareStringOrdinal
(
str
,
ret_str
,
&
res
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
res
,
"got string %s.
\n
"
,
debugstr_hstring
(
ret_str
)
);
ok
(
!
res
,
"got string %s.
\n
"
,
debugstr_hstring
(
ret_str
)
);
todo_wine
ok
(
str
!=
ret_str
,
"got same HSTRINGs %p, %p.
\n
"
,
str
,
ret_str
);
ok
(
str
!=
ret_str
,
"got same HSTRINGs %p, %p.
\n
"
,
str
,
ret_str
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
str
);
WindowsDeleteString
(
ret_str
);
WindowsDeleteString
(
ret_str
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment