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
863240b7
Commit
863240b7
authored
Mar 11, 2008
by
Paul Vriens
Committed by
Alexandre Julliard
Mar 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Fix setting version to Vista.
parent
acc1dd11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
6 deletions
+20
-6
appdefaults.c
programs/winecfg/appdefaults.c
+20
-6
No files found.
programs/winecfg/appdefaults.c
View file @
863240b7
...
...
@@ -70,11 +70,18 @@ static const char szKeyNT[] = "Software\\Microsoft\\Windows NT\\CurrentVersion";
static
int
get_registry_version
(
void
)
{
int
i
,
best
=
-
1
,
platform
,
major
,
minor
=
0
;
int
i
,
best
=
-
1
,
platform
,
major
,
minor
,
build
=
0
;
char
*
p
,
*
ver
;
if
((
ver
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyNT
,
"CurrentVersion"
,
NULL
)))
{
char
*
build_str
;
platform
=
VER_PLATFORM_WIN32_NT
;
build_str
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyNT
,
"CurrentBuildNumber"
,
NULL
);
build
=
atoi
(
build_str
);
}
else
if
((
ver
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKey9x
,
"VersionNumber"
,
NULL
)))
platform
=
VER_PLATFORM_WIN32_WINDOWS
;
else
...
...
@@ -82,10 +89,15 @@ static int get_registry_version(void)
if
((
p
=
strchr
(
ver
,
'.'
)))
{
char
*
str
=
p
;
*
str
++
=
0
;
if
((
p
=
strchr
(
str
,
'.'
)))
*
p
=
0
;
minor
=
atoi
(
str
);
char
*
minor_str
=
p
;
*
minor_str
++
=
0
;
if
((
p
=
strchr
(
minor_str
,
'.'
)))
{
char
*
build_str
=
p
;
*
build_str
++
=
0
;
build
=
atoi
(
build_str
);
}
minor
=
atoi
(
minor_str
);
}
major
=
atoi
(
ver
);
...
...
@@ -94,7 +106,9 @@ static int get_registry_version(void)
if
(
win_versions
[
i
].
dwPlatformId
!=
platform
)
continue
;
if
(
win_versions
[
i
].
dwMajorVersion
!=
major
)
continue
;
best
=
i
;
if
(
win_versions
[
i
].
dwMinorVersion
==
minor
)
return
i
;
if
((
win_versions
[
i
].
dwMinorVersion
==
minor
)
&&
(
win_versions
[
i
].
dwBuildNumber
==
build
))
return
i
;
}
return
best
;
}
...
...
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