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
136d6755
Commit
136d6755
authored
Nov 10, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 11, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemine: Fix loading program state from registry.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6018064d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
16 deletions
+8
-16
main.c
programs/winemine/main.c
+8
-16
No files found.
programs/winemine/main.c
View file @
136d6755
...
...
@@ -80,38 +80,31 @@ static void LoadBoard( BOARD *p_board )
RegOpenKeyExW
(
HKEY_CURRENT_USER
,
registry_key
,
0
,
KEY_QUERY_VALUE
,
&
hkey
);
size
=
sizeof
(
p_board
->
pos
.
x
);
if
(
!
RegQueryValueExW
(
hkey
,
xposW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
pos
.
x
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
xposW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
pos
.
x
,
&
size
)
)
p_board
->
pos
.
x
=
0
;
size
=
sizeof
(
p_board
->
pos
.
y
);
if
(
!
RegQueryValueExW
(
hkey
,
yposW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
pos
.
y
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
yposW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
pos
.
y
,
&
size
)
)
p_board
->
pos
.
y
=
0
;
size
=
sizeof
(
p_board
->
rows
);
if
(
!
RegQueryValueExW
(
hkey
,
heightW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
rows
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
heightW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
rows
,
&
size
)
)
p_board
->
rows
=
BEGINNER_ROWS
;
size
=
sizeof
(
p_board
->
cols
);
if
(
!
RegQueryValueExW
(
hkey
,
widthW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
cols
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
widthW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
cols
,
&
size
)
)
p_board
->
cols
=
BEGINNER_COLS
;
size
=
sizeof
(
p_board
->
mines
);
if
(
!
RegQueryValueExW
(
hkey
,
minesW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
mines
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
minesW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
mines
,
&
size
)
)
p_board
->
mines
=
BEGINNER_MINES
;
size
=
sizeof
(
p_board
->
difficulty
);
if
(
!
RegQueryValueExW
(
hkey
,
difficultyW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
difficulty
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
difficultyW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
difficulty
,
&
size
)
)
p_board
->
difficulty
=
BEGINNER
;
size
=
sizeof
(
p_board
->
IsMarkQ
);
if
(
!
RegQueryValueExW
(
hkey
,
markW
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
IsMarkQ
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
markW
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
IsMarkQ
,
&
size
)
)
p_board
->
IsMarkQ
=
TRUE
;
for
(
i
=
0
;
i
<
3
;
i
++
)
{
...
...
@@ -127,8 +120,7 @@ static void LoadBoard( BOARD *p_board )
for
(
i
=
0
;
i
<
3
;
i
++
)
{
wsprintfW
(
key_name
,
timeW
,
i
+
1
);
size
=
sizeof
(
p_board
->
best_time
[
i
]
);
if
(
!
RegQueryValueExW
(
hkey
,
key_name
,
NULL
,
&
type
,
(
LPBYTE
)
&
p_board
->
best_time
[
i
],
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
key_name
,
NULL
,
&
type
,
(
BYTE
*
)
&
p_board
->
best_time
[
i
],
&
size
)
)
p_board
->
best_time
[
i
]
=
999
;
}
RegCloseKey
(
hkey
);
...
...
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