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
d0547cb6
Commit
d0547cb6
authored
Oct 25, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemine: Properly handle negative coordinates for mouse events.
parent
938f2314
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
main.c
programs/winemine/main.c
+8
-8
main.h
programs/winemine/main.h
+1
-1
No files found.
programs/winemine/main.c
View file @
d0547cb6
...
@@ -134,7 +134,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -134,7 +134,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
WINE_TRACE
(
"WM_LBUTTONDOWN
\n
"
);
WINE_TRACE
(
"WM_LBUTTONDOWN
\n
"
);
if
(
wParam
&
MK_RBUTTON
)
if
(
wParam
&
MK_RBUTTON
)
msg
=
WM_MBUTTONDOWN
;
msg
=
WM_MBUTTONDOWN
;
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
SetCapture
(
hWnd
);
SetCapture
(
hWnd
);
return
0
;
return
0
;
...
@@ -142,7 +142,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -142,7 +142,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
WINE_TRACE
(
"WM_LBUTTONUP
\n
"
);
WINE_TRACE
(
"WM_LBUTTONUP
\n
"
);
if
(
wParam
&
MK_RBUTTON
)
if
(
wParam
&
MK_RBUTTON
)
msg
=
WM_MBUTTONUP
;
msg
=
WM_MBUTTONUP
;
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
ReleaseCapture
();
ReleaseCapture
();
return
0
;
return
0
;
...
@@ -153,24 +153,24 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -153,24 +153,24 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
board
.
press
.
y
=
0
;
board
.
press
.
y
=
0
;
msg
=
WM_MBUTTONDOWN
;
msg
=
WM_MBUTTONDOWN
;
}
}
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
return
0
;
return
0
;
case
WM_RBUTTONUP
:
case
WM_RBUTTONUP
:
WINE_TRACE
(
"WM_RBUTTONUP
\n
"
);
WINE_TRACE
(
"WM_RBUTTONUP
\n
"
);
if
(
wParam
&
MK_LBUTTON
)
if
(
wParam
&
MK_LBUTTON
)
msg
=
WM_MBUTTONUP
;
msg
=
WM_MBUTTONUP
;
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
return
0
;
return
0
;
case
WM_MBUTTONDOWN
:
case
WM_MBUTTONDOWN
:
WINE_TRACE
(
"WM_MBUTTONDOWN
\n
"
);
WINE_TRACE
(
"WM_MBUTTONDOWN
\n
"
);
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
return
0
;
return
0
;
case
WM_MBUTTONUP
:
case
WM_MBUTTONUP
:
WINE_TRACE
(
"WM_MBUTTONUP
\n
"
);
WINE_TRACE
(
"WM_MBUTTONUP
\n
"
);
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
return
0
;
return
0
;
case
WM_MOUSEMOVE
:
case
WM_MOUSEMOVE
:
...
@@ -185,7 +185,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
...
@@ -185,7 +185,7 @@ LRESULT WINAPI MainProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
return
0
;
return
0
;
}
}
TestBoard
(
hWnd
,
&
board
,
LOWORD
(
lParam
),
HIWORD
(
lParam
),
msg
);
TestBoard
(
hWnd
,
&
board
,
(
short
)
LOWORD
(
lParam
),
(
short
)
HIWORD
(
lParam
),
msg
);
return
0
;
return
0
;
}
}
...
@@ -755,7 +755,7 @@ void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board )
...
@@ -755,7 +755,7 @@ void DrawBoard( HDC hdc, HDC hMemDC, PAINTSTRUCT *ps, BOARD *p_board )
}
}
void
TestBoard
(
HWND
hWnd
,
BOARD
*
p_board
,
unsigned
x
,
unsigned
y
,
int
msg
)
void
TestBoard
(
HWND
hWnd
,
BOARD
*
p_board
,
int
x
,
int
y
,
int
msg
)
{
{
POINT
pt
;
POINT
pt
;
unsigned
col
,
row
;
unsigned
col
,
row
;
...
...
programs/winemine/main.h
View file @
d0547cb6
...
@@ -136,7 +136,7 @@ void CreateBoard( BOARD *p_board );
...
@@ -136,7 +136,7 @@ void CreateBoard( BOARD *p_board );
void
CreateBoxes
(
BOARD
*
p_board
);
void
CreateBoxes
(
BOARD
*
p_board
);
void
TestBoard
(
HWND
hWnd
,
BOARD
*
p_board
,
unsigned
x
,
unsigned
y
,
int
msg
);
void
TestBoard
(
HWND
hWnd
,
BOARD
*
p_board
,
int
x
,
int
y
,
int
msg
);
void
TestMines
(
BOARD
*
p_board
,
POINT
pt
,
int
msg
);
void
TestMines
(
BOARD
*
p_board
,
POINT
pt
,
int
msg
);
...
...
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