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
e180cd95
Commit
e180cd95
authored
Sep 26, 2005
by
Christian Costa
Committed by
Alexandre Julliard
Sep 26, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Screen depth cannot be selected when double buffering is enabled.
Disable depth selection when it's the case.
parent
9f859692
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
18 deletions
+32
-18
x11drvdlg.c
programs/winecfg/x11drvdlg.c
+32
-18
No files found.
programs/winecfg/x11drvdlg.c
View file @
e180cd95
...
@@ -95,21 +95,9 @@ static void update_gui_for_desktop_mode(HWND dialog) {
...
@@ -95,21 +95,9 @@ static void update_gui_for_desktop_mode(HWND dialog) {
updating_ui
=
FALSE
;
updating_ui
=
FALSE
;
}
}
static
void
init_
dialog
(
HWND
dialog
)
static
void
init_
screen_depth
(
HWND
dialog
)
{
{
unsigned
int
it
;
char
*
buf
;
char
*
buf
;
update_gui_for_desktop_mode
(
dialog
);
updating_ui
=
TRUE
;
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_RESETCONTENT
,
0
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"8 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"16 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"24 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"32 bit"
);
/* is this valid? */
buf
=
get_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"ScreenDepth"
,
"24"
);
buf
=
get_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"ScreenDepth"
,
"24"
);
if
(
strcmp
(
buf
,
"8"
)
==
0
)
if
(
strcmp
(
buf
,
"8"
)
==
0
)
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
0
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
0
,
0
);
...
@@ -122,6 +110,22 @@ static void init_dialog (HWND dialog)
...
@@ -122,6 +110,22 @@ static void init_dialog (HWND dialog)
else
else
WINE_ERR
(
"Invalid screen depth read from registry (%s)
\n
"
,
buf
);
WINE_ERR
(
"Invalid screen depth read from registry (%s)
\n
"
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
}
static
void
init_dialog
(
HWND
dialog
)
{
unsigned
int
it
;
char
*
buf
;
update_gui_for_desktop_mode
(
dialog
);
updating_ui
=
TRUE
;
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_RESETCONTENT
,
0
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"8 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"16 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"24 bit"
);
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_ADDSTRING
,
0
,
(
LPARAM
)
"32 bit"
);
/* is this valid? */
SendDlgItemMessage
(
dialog
,
IDC_DESKTOP_WIDTH
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_DESKTOP_WIDTH
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_DESKTOP_HEIGHT
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_DESKTOP_HEIGHT
,
EM_LIMITTEXT
,
RES_MAXLEN
,
0
);
...
@@ -134,10 +138,15 @@ static void init_dialog (HWND dialog)
...
@@ -134,10 +138,15 @@ static void init_dialog (HWND dialog)
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
buf
=
get_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"Y"
);
buf
=
get_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"Y"
);
if
(
IS_OPTION_TRUE
(
*
buf
))
if
(
IS_OPTION_TRUE
(
*
buf
))
{
CheckDlgButton
(
dialog
,
IDC_DOUBLE_BUFFER
,
BST_CHECKED
);
CheckDlgButton
(
dialog
,
IDC_DOUBLE_BUFFER
,
BST_CHECKED
);
else
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
-
1
,
0
);
disable
(
IDC_SCREEN_DEPTH
);
}
else
{
CheckDlgButton
(
dialog
,
IDC_DOUBLE_BUFFER
,
BST_UNCHECKED
);
CheckDlgButton
(
dialog
,
IDC_DOUBLE_BUFFER
,
BST_UNCHECKED
);
init_screen_depth
(
dialog
);
enable
(
IDC_SCREEN_DEPTH
);
}
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
SendDlgItemMessage
(
dialog
,
IDC_D3D_VSHADER_MODE
,
CB_RESETCONTENT
,
0
,
0
);
SendDlgItemMessage
(
dialog
,
IDC_D3D_VSHADER_MODE
,
CB_RESETCONTENT
,
0
,
0
);
...
@@ -228,10 +237,15 @@ static void on_dx_mouse_grab_clicked(HWND dialog) {
...
@@ -228,10 +237,15 @@ static void on_dx_mouse_grab_clicked(HWND dialog) {
static
void
on_double_buffer_clicked
(
HWND
dialog
)
{
static
void
on_double_buffer_clicked
(
HWND
dialog
)
{
if
(
IsDlgButtonChecked
(
dialog
,
IDC_DOUBLE_BUFFER
)
==
BST_CHECKED
)
if
(
IsDlgButtonChecked
(
dialog
,
IDC_DOUBLE_BUFFER
)
==
BST_CHECKED
)
{
set_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"Y"
);
set_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"Y"
);
else
SendDlgItemMessage
(
dialog
,
IDC_SCREEN_DEPTH
,
CB_SETCURSEL
,
-
1
,
0
);
disable
(
IDC_SCREEN_DEPTH
);
}
else
{
set_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"N"
);
set_reg_key
(
config_key
,
keypath
(
"X11 Driver"
),
"DesktopDoubleBuffered"
,
"N"
);
init_screen_depth
(
dialog
);
enable
(
IDC_SCREEN_DEPTH
);
}
}
}
static
void
on_d3d_vshader_mode_changed
(
HWND
dialog
)
{
static
void
on_d3d_vshader_mode_changed
(
HWND
dialog
)
{
...
@@ -247,7 +261,7 @@ static void on_d3d_pshader_mode_clicked(HWND dialog) {
...
@@ -247,7 +261,7 @@ static void on_d3d_pshader_mode_clicked(HWND dialog) {
}
}
INT_PTR
CALLBACK
INT_PTR
CALLBACK
GraphDlgProc
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
GraphDlgProc
(
HWND
hDlg
,
UINT
uMsg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
{
switch
(
uMsg
)
{
switch
(
uMsg
)
{
case
WM_INITDIALOG
:
case
WM_INITDIALOG
:
...
...
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