Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3be472e1
Commit
3be472e1
authored
May 30, 2018
by
Michael Stefaniuc
Committed by
Alexandre Julliard
May 30, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gameux/tests: Use the available ARRAY_SIZE() macro.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dbaf52c8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
gameexplorer.c
dlls/gameux/tests/gameexplorer.c
+4
-4
gamestatistics.c
dlls/gameux/tests/gamestatistics.c
+2
-2
No files found.
dlls/gameux/tests/gameexplorer.c
View file @
3be472e1
...
...
@@ -143,7 +143,7 @@ static HRESULT _buildGameRegistryPath(GAME_INSTALL_SCOPE installScope,
if
(
gameInstanceId
)
{
if
(
SUCCEEDED
(
hr
))
hr
=
(
StringFromGUID2
(
gameInstanceId
,
sInstanceId
,
sizeof
(
sInstanceId
)
/
sizeof
(
sInstanceId
[
0
]
))
?
S_OK
:
E_FAIL
);
hr
=
(
StringFromGUID2
(
gameInstanceId
,
sInstanceId
,
ARRAY_SIZE
(
sInstanceId
))
?
S_OK
:
E_FAIL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
@@ -294,7 +294,7 @@ static void _validateGameRegistryValues(int line,
HRESULT
hr
;
WCHAR
sGameApplicationId
[
40
];
hr
=
(
StringFromGUID2
(
gameApplicationId
,
sGameApplicationId
,
sizeof
(
sGameApplicationId
)
/
sizeof
(
sGameApplicationId
[
0
]
))
?
S_OK
:
E_FAIL
);
hr
=
(
StringFromGUID2
(
gameApplicationId
,
sGameApplicationId
,
ARRAY_SIZE
(
sGameApplicationId
))
?
S_OK
:
E_FAIL
);
ok_
(
__FILE__
,
line
)(
hr
==
S_OK
,
"cannot convert game application id to string
\n
"
);
/* these values exist up from Vista */
...
...
@@ -547,7 +547,7 @@ static void test_add_remove_game(void)
if
(
ge
)
{
/* prepare path to binary */
dwExeNameLen
=
GetModuleFileNameW
(
NULL
,
sExeName
,
sizeof
(
sExeName
)
/
sizeof
(
sExeName
[
0
]
));
dwExeNameLen
=
GetModuleFileNameW
(
NULL
,
sExeName
,
ARRAY_SIZE
(
sExeName
));
ok
(
dwExeNameLen
!=
0
,
"GetModuleFileNameW returned invalid value
\n
"
);
lstrcpynW
(
sExePath
,
sExeName
,
StrRChrW
(
sExeName
,
NULL
,
'\\'
)
-
sExeName
+
1
);
bstrExeName
=
SysAllocString
(
sExeName
);
...
...
@@ -625,7 +625,7 @@ static void test_install_uninstall_game(void)
if
(
ge2
)
{
/* prepare path to binary */
dwExeNameLen
=
GetModuleFileNameW
(
NULL
,
sExeName
,
sizeof
(
sExeName
)
/
sizeof
(
sExeName
[
0
]
));
dwExeNameLen
=
GetModuleFileNameW
(
NULL
,
sExeName
,
ARRAY_SIZE
(
sExeName
));
ok
(
dwExeNameLen
!=
0
,
"GetModuleFileNameW returned invalid value
\n
"
);
lstrcpynW
(
sExePath
,
sExeName
,
StrRChrW
(
sExeName
,
NULL
,
'\\'
)
-
sExeName
+
1
);
...
...
dlls/gameux/tests/gamestatistics.c
View file @
3be472e1
...
...
@@ -44,7 +44,7 @@ static void test_register_game(IGameExplorer **explorer)
BSTR
bstrExeName
,
bstrExePath
;
/* prepare path to binary */
GetModuleFileNameW
(
NULL
,
sExeName
,
sizeof
(
sExeName
)
/
sizeof
(
sExeName
[
0
]
));
GetModuleFileNameW
(
NULL
,
sExeName
,
ARRAY_SIZE
(
sExeName
));
lstrcpyW
(
pathW
,
sExeName
);
PathRemoveFileSpecW
(
pathW
);
...
...
@@ -101,7 +101,7 @@ static HRESULT _buildStatisticsFilePath(LPCGUID guidApplicationId, LPWSTR *lpSta
hr
=
SHGetFolderPathW
(
NULL
,
CSIDL_LOCAL_APPDATA
,
NULL
,
SHGFP_TYPE_CURRENT
,
sPath
);
if
(
SUCCEEDED
(
hr
))
hr
=
(
StringFromGUID2
(
guidApplicationId
,
sGuid
,
sizeof
(
sGuid
)
/
sizeof
(
sGuid
[
0
]
))
!=
0
?
S_OK
:
E_FAIL
);
hr
=
(
StringFromGUID2
(
guidApplicationId
,
sGuid
,
ARRAY_SIZE
(
sGuid
))
!=
0
?
S_OK
:
E_FAIL
);
if
(
SUCCEEDED
(
hr
))
{
...
...
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