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
ff9e31a2
Commit
ff9e31a2
authored
Nov 04, 2010
by
Pluciński Mariusz
Committed by
Alexandre Julliard
Nov 05, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux: Add implementation of IGameStatistics::GetCategoryTitle.
parent
2d6875b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
9 deletions
+30
-9
gamestatistics.c
dlls/gameux/gamestatistics.c
+23
-2
gamestatistics.c
dlls/gameux/tests/gamestatistics.c
+7
-7
No files found.
dlls/gameux/gamestatistics.c
View file @
ff9e31a2
...
...
@@ -807,8 +807,29 @@ static HRESULT WINAPI GameStatisticsImpl_GetCategoryTitle(
WORD
categoryIndex
,
LPWSTR
*
pTitle
)
{
FIXME
(
"stub
\n
"
);
return
E_NOTIMPL
;
HRESULT
hr
=
S_OK
;
LONG
nLength
;
GameStatisticsImpl
*
This
=
impl_from_IGameStatistics
(
iface
);
TRACE
(
"%p, %d, %p
\n
"
,
This
,
categoryIndex
,
pTitle
);
*
pTitle
=
NULL
;
if
(
!
pTitle
||
categoryIndex
>=
MAX_CATEGORIES
)
hr
=
E_INVALIDARG
;
if
(
SUCCEEDED
(
hr
))
{
nLength
=
lstrlenW
(
This
->
stats
.
categories
[
categoryIndex
].
sName
);
if
(
nLength
!=
0
)
{
*
pTitle
=
CoTaskMemAlloc
(
sizeof
(
WCHAR
)
*
(
nLength
+
1
));
lstrcpyW
(
*
pTitle
,
This
->
stats
.
categories
[
categoryIndex
].
sName
);
}
}
return
hr
;
}
static
HRESULT
WINAPI
GameStatisticsImpl_GetStatistic
(
...
...
dlls/gameux/tests/gamestatistics.c
View file @
ff9e31a2
...
...
@@ -346,23 +346,23 @@ static void test_gamestatisticsmgr( void )
/* verify values with these which we stored before*/
hr
=
IGameStatistics_GetCategoryTitle
(
gs
,
0
,
&
lpName
);
todo_wine
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sCategory0
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sCategory0
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
CoTaskMemFree
(
lpName
);
hr
=
IGameStatistics_GetCategoryTitle
(
gs
,
1
,
&
lpName
);
todo_wine
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sCategory1
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sCategory1
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
CoTaskMemFree
(
lpName
);
hr
=
IGameStatistics_GetCategoryTitle
(
gs
,
2
,
&
lpName
);
todo_wine
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
todo_wine
ok
(
lstrcmpW
(
lpName
,
sCategory2
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
ok
(
lstrcmpW
(
lpName
,
sCategory2
)
==
0
,
"getting category title returned invalid string (%s)
\n
"
,
wine_dbgstr_w
(
lpName
));
CoTaskMemFree
(
lpName
);
/* check result if category doesn't exists */
hr
=
IGameStatistics_GetCategoryTitle
(
gs
,
3
,
&
lpName
);
todo_wine
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
ok
(
hr
==
S_OK
,
"getting category title failed
\n
"
);
ok
(
lpName
==
NULL
,
"getting category title failed
\n
"
);
CoTaskMemFree
(
lpName
);
...
...
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