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
5ad5a190
Commit
5ad5a190
authored
Apr 16, 2011
by
André Hentschel
Committed by
Alexandre Julliard
Apr 19, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Also distinguish versions by product type.
parent
200f8d95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
appdefaults.c
programs/winecfg/appdefaults.c
+6
-3
No files found.
programs/winecfg/appdefaults.c
View file @
5ad5a190
...
...
@@ -70,11 +70,12 @@ static const struct
static
const
char
szKey9x
[]
=
"Software
\\
Microsoft
\\
Windows
\\
CurrentVersion"
;
static
const
char
szKeyNT
[]
=
"Software
\\
Microsoft
\\
Windows NT
\\
CurrentVersion"
;
static
const
char
szKeyProdNT
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
ProductOptions"
;
static
int
get_registry_version
(
void
)
{
int
i
,
best
=
-
1
,
platform
,
major
,
minor
=
0
,
build
=
0
;
char
*
p
,
*
ver
;
char
*
p
,
*
ver
,
*
type
;
if
((
ver
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyNT
,
"CurrentVersion"
,
NULL
)))
{
...
...
@@ -82,8 +83,10 @@ static int get_registry_version(void)
platform
=
VER_PLATFORM_WIN32_NT
;
build_str
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyNT
,
"CurrentBuildNumber"
,
NULL
);
build_str
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyNT
,
"CurrentBuildNumber"
,
NULL
);
build
=
atoi
(
build_str
);
type
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKeyProdNT
,
"ProductType"
,
NULL
);
}
else
if
((
ver
=
get_reg_key
(
HKEY_LOCAL_MACHINE
,
szKey9x
,
"VersionNumber"
,
NULL
)))
platform
=
VER_PLATFORM_WIN32_WINDOWS
;
...
...
@@ -108,6 +111,7 @@ static int get_registry_version(void)
{
if
(
win_versions
[
i
].
dwPlatformId
!=
platform
)
continue
;
if
(
win_versions
[
i
].
dwMajorVersion
!=
major
)
continue
;
if
(
type
&&
strcasecmp
(
win_versions
[
i
].
szProductType
,
type
))
continue
;
best
=
i
;
if
((
win_versions
[
i
].
dwMinorVersion
==
minor
)
&&
(
win_versions
[
i
].
dwBuildNumber
==
build
))
...
...
@@ -409,7 +413,6 @@ static void on_winver_change(HWND dialog)
}
else
/* global version only */
{
static
const
char
szKeyProdNT
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
ProductOptions"
;
static
const
char
szKeyWindNT
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
Windows"
;
static
const
char
szKeyEnvNT
[]
=
"System
\\
CurrentControlSet
\\
Control
\\
Session Manager
\\
Environment"
;
char
Buffer
[
40
];
...
...
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