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
1c5777a5
Commit
1c5777a5
authored
Dec 11, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Dec 11, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
If we have registry entries, use them. Never mind which version we
autodetected.
parent
9af5e691
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
34 deletions
+28
-34
syscolor.c
windows/syscolor.c
+28
-34
No files found.
windows/syscolor.c
View file @
1c5777a5
...
...
@@ -18,7 +18,6 @@
#include "debugtools.h"
#include "tweak.h"
#include "winreg.h"
#include "winversion.h"
DEFAULT_DEBUG_CHANNEL
(
syscolor
)
...
...
@@ -126,42 +125,37 @@ void SYSCOLOR_Init(void)
p
=
(
TWEAK_WineLook
==
WIN31_LOOK
)
?
DefSysColors
:
DefSysColors95
;
/* first, try to read the values from the registry */
if
(
VERSION_GetVersion
()
!=
WIN31
)
{
if
(
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Control Panel
\\
Colors"
,
0
,
0
,
0
,
KEY_ALL_ACCESS
,
0
,
&
hKey
,
0
))
bNoReg
=
TRUE
;
}
for
(
i
=
0
;
i
<
NUM_SYS_COLORS
;
i
++
)
{
bOk
=
FALSE
;
/* first try, registry */
if
(
!
bNoReg
)
{
DWORD
dwDataSize
=
sizeof
(
buffer
);
if
(
!
(
RegQueryValueExA
(
hKey
,(
LPSTR
)
p
[
i
*
2
],
0
,
0
,
buffer
,
&
dwDataSize
)))
if
(
sscanf
(
buffer
,
"%d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
bOk
=
TRUE
;
}
/* second try, win.ini */
if
(
!
bOk
)
{
GetProfileStringA
(
"colors"
,
p
[
i
*
2
],
p
[
i
*
2
+
1
],
buffer
,
100
);
if
(
sscanf
(
buffer
,
" %d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
if
(
RegCreateKeyExA
(
HKEY_CURRENT_USER
,
"Control Panel
\\
Colors"
,
0
,
0
,
0
,
KEY_ALL_ACCESS
,
0
,
&
hKey
,
0
))
bNoReg
=
TRUE
;
for
(
i
=
0
;
i
<
NUM_SYS_COLORS
;
i
++
)
{
bOk
=
FALSE
;
/* first try, registry */
if
(
!
bNoReg
)
{
DWORD
dwDataSize
=
sizeof
(
buffer
);
if
(
!
(
RegQueryValueExA
(
hKey
,(
LPSTR
)
p
[
i
*
2
],
0
,
0
,
buffer
,
&
dwDataSize
)))
if
(
sscanf
(
buffer
,
"%d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
bOk
=
TRUE
;
}
/* last chance, take the default */
if
(
!
bOk
)
{
int
iNumColors
=
sscanf
(
p
[
i
*
2
+
1
],
" %d %d %d"
,
&
r
,
&
g
,
&
b
);
assert
(
iNumColors
==
3
);
}
SYSCOLOR_SetColor
(
i
,
RGB
(
r
,
g
,
b
)
);
}
if
(
!
bNoReg
)
RegCloseKey
(
hKey
);
/* second try, win.ini */
if
(
!
bOk
)
{
GetProfileStringA
(
"colors"
,
p
[
i
*
2
],
p
[
i
*
2
+
1
],
buffer
,
100
);
if
(
sscanf
(
buffer
,
" %d %d %d"
,
&
r
,
&
g
,
&
b
)
==
3
)
bOk
=
TRUE
;
}
/* last chance, take the default */
if
(
!
bOk
)
{
int
iNumColors
=
sscanf
(
p
[
i
*
2
+
1
],
" %d %d %d"
,
&
r
,
&
g
,
&
b
);
assert
(
iNumColors
==
3
);
}
SYSCOLOR_SetColor
(
i
,
RGB
(
r
,
g
,
b
)
);
}
if
(
!
bNoReg
)
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