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
a4590d2b
Commit
a4590d2b
authored
Aug 25, 2005
by
Vitaly Lipatov
Committed by
Alexandre Julliard
Aug 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- remove return: now break loop if can't change state during test
- add test for value returned by SwapMouseButton - fix SwapMouseButton return value (it returns previous state)
parent
030dbe2d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
+12
-2
sysparams.c
dlls/user/sysparams.c
+7
-1
sysparams.c
dlls/user/tests/sysparams.c
+5
-1
No files found.
dlls/user/sysparams.c
View file @
a4590d2b
...
...
@@ -2405,10 +2405,16 @@ INT WINAPI GetSystemMetrics( INT index )
/***********************************************************************
* SwapMouseButton (USER32.@)
* Reverse or restore the meaning of the left and right mouse buttons
* fSwap [I ] TRUE - reverse, FALSE - original
* RETURN
* previous state
*/
BOOL
WINAPI
SwapMouseButton
(
BOOL
fSwap
)
{
return
SystemParametersInfoW
(
SPI_SETMOUSEBUTTONSWAP
,
fSwap
,
0
,
0
);
BOOL
prev
=
GetSystemMetrics
(
SM_SWAPBUTTON
);
SystemParametersInfoW
(
SPI_SETMOUSEBUTTONSWAP
,
fSwap
,
0
,
0
);
return
prev
;
}
...
...
dlls/user/tests/sysparams.c
View file @
a4590d2b
...
...
@@ -1011,7 +1011,7 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEBUTTONSWAP
,
vals
[
i
],
0
,
SPIF_UPDATEINIFILE
|
SPIF_SENDCHANGE
);
if
(
!
test_error_msg
(
rc
,
"SPI_{GET,SET}MOUSEBUTTONSWAP"
))
return
;
break
;
test_change_message
(
SPI_SETMOUSEBUTTONSWAP
,
0
);
test_reg_key
(
SPI_SETMOUSEBUTTONSWAP_REGKEY
,
...
...
@@ -1019,6 +1019,10 @@ static void test_SPI_SETMOUSEBUTTONSWAP( void ) /* 33 */
vals
[
i
]
?
"1"
:
"0"
);
eq
(
GetSystemMetrics
(
SM_SWAPBUTTON
),
(
int
)
vals
[
i
],
"SM_SWAPBUTTON"
,
"%d"
);
rc
=
SwapMouseButton
((
BOOL
)
vals
[
i
^
1
]);
eq
(
GetSystemMetrics
(
SM_SWAPBUTTON
),
(
int
)
vals
[
i
^
1
],
"SwapMouseButton"
,
"%d"
);
ok
(
rc
==
vals
[
i
],
"SwapMouseButton does not return previous state (really %d)
\n
"
,
rc
);
}
rc
=
SystemParametersInfoA
(
SPI_SETMOUSEBUTTONSWAP
,
old_b
,
0
,
...
...
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