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
726df300
Commit
726df300
authored
Mar 04, 2005
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 04, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better way of handling non-existent SystemParametersInfoW.
SetLastError if GetLastError is checked after a call.
parent
3f7f290b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
6 deletions
+21
-6
sysparams.c
dlls/user/tests/sysparams.c
+21
-6
No files found.
dlls/user/tests/sysparams.c
View file @
726df300
...
...
@@ -287,16 +287,31 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
BOOL
rc
;
INT
mi
[
3
];
static
int
aw_turn
=
0
;
static
BOOL
w_implemented
=
1
;
char
buf
[
20
];
int
i
;
aw_turn
++
;
rc
=
0
;
if
(
aw_turn
%
2
!=
0
)
/* call unicode version each second call */
if
((
aw_turn
%
2
!=
0
)
&&
(
w_implemented
))
{
/* call unicode on odd (non even) calls */
SetLastError
(
0xdeadbeef
);
rc
=
SystemParametersInfoW
(
SPI_SETMOUSE
,
0
,
curr_val
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
aw_turn
%
2
==
0
||
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
))
if
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
w_implemented
=
0
;
trace
(
"SystemParametersInfoW not supported on this platform
\n
"
);
}
}
if
((
aw_turn
%
2
==
0
)
||
(
!
w_implemented
))
{
/* call ascii version on even calls or if unicode is not available */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSE
,
0
,
curr_val
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
}
ok
(
rc
!=
0
,
"SystemParametersInfo: rc=%d err=%ld
\n
"
,
rc
,
GetLastError
());
test_change_message
(
SPI_SETMOUSE
,
0
);
for
(
i
=
0
;
i
<
3
;
i
++
)
...
...
@@ -313,10 +328,10 @@ static void run_spi_setmouse_test( int curr_val[], POINT *req_change, POINT *pro
"incorrect value for %d: %d != %d
\n
"
,
i
,
mi
[
i
],
curr_val
[
i
]);
}
rc
=
SystemParametersInfoW
(
SPI_GETMOUSE
,
0
,
mi
,
0
);
if
(
rc
!=
0
&&
GetLastError
()
!=
ERROR_CALL_NOT_IMPLEMENTED
)
{
ok
(
rc
!=
0
,
"SystemParametersInfo
A
: rc=%d err=%ld
\n
"
,
rc
,
GetLastError
());
if
(
w_implemented
)
{
rc
=
SystemParametersInfoW
(
SPI_GETMOUSE
,
0
,
mi
,
0
);
ok
(
rc
!=
0
,
"SystemParametersInfo
W
: rc=%d err=%ld
\n
"
,
rc
,
GetLastError
());
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ok
(
mi
[
i
]
==
curr_val
[
i
],
...
...
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