Commit 88f73c4f authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

- add direct3d configuration on winecfg graphics panel

- resync Fr libraries dialog (based on En.rc)
parent 4b0809e8
......@@ -58,11 +58,11 @@ BEGIN
LTEXT "Screen color depth: ",IDC_STATIC,8,10,70,30
COMBOBOX IDC_SCREEN_DEPTH,80,8,170,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX " Window settings ",IDC_STATIC,8,25,244,120
CONTROL "Allow DirectX apps to stop the mouse leaving their window",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,35,230,8
CONTROL "Enable desktop double buffering",IDC_DOUBLE_BUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,45,230,8
GROUPBOX " Window settings ",IDC_STATIC,8,25,244,120
/* FIXME: the wording of this explanation could be a lot better */
LTEXT "You can choose to emulate a windows desktop, where all the windows are confined to one 'virtual screen', or you can have the windows placed on your standard desktop.",
IDC_STATIC,15,73,228,28
......@@ -73,6 +73,13 @@ BEGIN
EDITTEXT IDC_DESKTOP_WIDTH,64,115,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_HEIGHT,117,115,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
GROUPBOX " Direct3D ",IDC_STATIC,8,140,244,120
LTEXT "Vertex Shader Support: ",IDC_STATIC,15,150,80,30
COMBOBOX IDC_D3D_VSHADER_MODE,100,148,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Allow Pixel Shader (if supported by HW)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,165,230,10
END
IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -56,11 +56,11 @@ BEGIN
LTEXT "Qualit couleur: ",IDC_STATIC,8,10,70,30
COMBOBOX IDC_SCREEN_DEPTH,80,8,170,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
GROUPBOX " Paramtres des fentres ",IDC_STATIC,8,25,244,110
CONTROL "Permettre aux applications DirectX d'empcher la souris de quitter leur fentre",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,35,230,8
CONTROL "Activer le double buffering du bureau",IDC_DOUBLE_BUFFER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,45,230,8
GROUPBOX " Paramtres des fentres ",IDC_STATIC,8,25,244,120
/* FIXME: the wording of this explanation could be a lot better */
LTEXT "Vous avez le choix entre l'mulation d'un bureau Windows o toutes les fentres de vos programme swindows sont confines ou bien d'afficher les fentres de ces programmes sur votre bureau standard.",
IDC_STATIC,15,73,228,28
......@@ -71,6 +71,14 @@ BEGIN
EDITTEXT IDC_DESKTOP_WIDTH,64,115,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_HEIGHT,117,115,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
GROUPBOX " Direct3D ",IDC_STATIC,8,140,244,120
LTEXT "Vertex Shader Support: ",IDC_STATIC,15,150,80,30
COMBOBOX IDC_D3D_VSHADER_MODE,100,148,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
CONTROL "Allow Pixel Shader (if supported by HW)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,165,230,10
END
IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250
......@@ -79,17 +87,29 @@ FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX " Surclassage de DLLs ",IDC_STATIC,8,4,244,240
LTEXT "Il est possible de spcifier si Wine doit utiliser une version native (importe depuis Windows ou installe par l'application) ou bien une version inclue (distribue avec Wine) de chaque DLL (Dynamic Link Libraries) utilise par un programme."
, IDC_STATIC,15,17,228,32
LISTBOX IDC_DLLS_LIST,15,50,142,187,WS_BORDER | WS_TABSTOP | WS_VSCROLL
LTEXT "Ordre de chargement:",IDC_STATIC,163,50,80,8
CONTROL "&Inclue (Wine)",IDC_RAD_BUILTIN,"Button", BS_AUTORADIOBUTTON | WS_GROUP,163,65,75,10
CONTROL "&Native (Windows)",IDC_RAD_NATIVE,"Button", BS_AUTORADIOBUTTON,163,80,75,10
CONTROL "&Inclue puis native",IDC_RAD_BUILTIN_NATIVE,"Button", BS_AUTORADIOBUTTON,163,95,75,10
CONTROL "Nati&ve puis inclue",IDC_RAD_NATIVE_BUILTIN,"Button", BS_AUTORADIOBUTTON,163,110,75,10
CONTROL "&Dsactiv",IDC_RAD_DISABLE,"Button", BS_AUTORADIOBUTTON,163,125,75,10
PUSHBUTTON "Surcl&assage pour:",IDC_DLLS_ADDDLL, 163,184,82,14
COMBOBOX IDC_DLLCOMBO,163,204,82,14,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_SORT | CBS_LOWERCASE
PUSHBUTTON "&Supprimer surclassage",IDC_DLLS_REMOVEDLL,163,224,82,14
, IDC_STATIC,16,16,220,32
LTEXT "&Nouveau suclassage pour:",IDC_STATIC,16,58,100,8
COMBOBOX IDC_DLLCOMBO,16,68,140,14,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_SORT | CBS_LOWERCASE
PUSHBUTTON "&Ajouter surclassage",IDC_DLLS_ADDDLL, 164,68,82,13,BS_DEFPUSHBUTTON
LTEXT "Surclassages existants:",IDC_STATIC,16,86,100,8
LISTBOX IDC_DLLS_LIST,16,96,140,140,WS_BORDER | WS_TABSTOP | WS_VSCROLL
PUSHBUTTON "&Editer surclassage",IDC_DLLS_EDITDLL,164,96,82,14
PUSHBUTTON "&Supprimer surclassage",IDC_DLLS_REMOVEDLL,164,114,82,14
END
IDD_LOADORDER DIALOG DISCARDABLE 80, 90, 110, 92
STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
CAPTION "Edit Override"
FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX " Load Order ",IDC_STATIC,8,4,94,66
CONTROL "&Builtin (Wine)",IDC_RAD_BUILTIN,"Button", BS_AUTORADIOBUTTON | WS_GROUP,16,14,75,10
CONTROL "&Native (Windows)",IDC_RAD_NATIVE,"Button", BS_AUTORADIOBUTTON,16,24,75,10
CONTROL "Bui&ltin then Native",IDC_RAD_BUILTIN_NATIVE,"Button", BS_AUTORADIOBUTTON,16,34,75,10
CONTROL "Nati&ve then Builtin",IDC_RAD_NATIVE_BUILTIN,"Button", BS_AUTORADIOBUTTON,16,44,75,10
CONTROL "&Disable",IDC_RAD_DISABLE,"Button", BS_AUTORADIOBUTTON,16,54,75,10
DEFPUSHBUTTON "OK",IDOK,8,74,45,14,WS_GROUP
PUSHBUTTON "Cancel",IDCANCEL,57,74,45,14,WS_GROUP
END
IDD_DRIVECFG DIALOG DISCARDABLE 0, 0, 260, 250
......
......@@ -5,6 +5,7 @@
* Copyright 2003 Dimitrie O. Paun
* Copyright 2003 Mark Westcott
* Copyright 2004 Mike Hearn
* Copyright 2005 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -116,6 +117,8 @@
#define IDC_DX_MOUSE_GRAB 1102
#define IDC_USE_TAKE_FOCUS 1103
#define IDC_DOUBLE_BUFFER 1104
#define IDC_D3D_VSHADER_MODE 1105
#define IDC_D3D_PSHADER_MODE 1106
/* applications tab */
#define IDC_APP_LISTVIEW 1200
......
......@@ -3,6 +3,7 @@
*
* Copyright 2003 Mark Westcott
* Copyright 2003-2004 Mike Hearn
* Copyright 2005 Raphael Junqueira
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -36,6 +37,15 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
#define RES_MAXLEN 5 /* the maximum number of characters in a screen dimension. 5 digits should be plenty, what kind of crazy person runs their screen >10,000 pixels across? */
static const char* D3D_VS_Modes[] = {
"hardware",
"none",
"emulation",
NULL
};
int updating_ui;
static void update_gui_for_desktop_mode(HWND dialog) {
......@@ -87,6 +97,7 @@ static void update_gui_for_desktop_mode(HWND dialog) {
static void init_dialog (HWND dialog)
{
unsigned int it;
char* buf;
update_gui_for_desktop_mode(dialog);
......@@ -128,7 +139,30 @@ static void init_dialog (HWND dialog)
else
CheckDlgButton(dialog, IDC_DOUBLE_BUFFER, BST_UNCHECKED);
HeapFree(GetProcessHeap(), 0, buf);
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_RESETCONTENT, 0, 0);
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_ADDSTRING, 0, (LPARAM) D3D_VS_Modes[it]);
}
buf = get_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", "hardware");
for (it = 0; NULL != D3D_VS_Modes[it]; ++it) {
if (strcmp(buf, D3D_VS_Modes[it]) == 0) {
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_SETCURSEL, it, 0);
break ;
}
}
if (NULL == D3D_VS_Modes[it]) {
WINE_ERR("Invalid Direct3D VertexShader Mode read from registry (%s)\n", buf);
}
HeapFree(GetProcessHeap(), 0, buf);
buf = get_reg_key(config_key, keypath("Direct3D"), "PixelShaderMode", "enabled");
if (!strcmp(buf, "enabled"))
CheckDlgButton(dialog, IDC_D3D_PSHADER_MODE, BST_CHECKED);
else
CheckDlgButton(dialog, IDC_D3D_PSHADER_MODE, BST_UNCHECKED);
HeapFree(GetProcessHeap(), 0, buf);
updating_ui = FALSE;
}
......@@ -200,6 +234,18 @@ static void on_double_buffer_clicked(HWND dialog) {
set_reg_key(config_key, keypath("X11 Driver"), "DesktopDoubleBuffered", "N");
}
static void on_d3d_vshader_mode_changed(HWND dialog) {
int selected_mode = SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_GETCURSEL, 0, 0);
set_reg_key(config_key, keypath("Direct3D"), "VertexShaderMode", D3D_VS_Modes[selected_mode]);
}
static void on_d3d_pshader_mode_clicked(HWND dialog) {
if (IsDlgButtonChecked(dialog, IDC_D3D_PSHADER_MODE) == BST_CHECKED)
set_reg_key(config_key, keypath("Direct3D"), "PixelShaderMode", "enabled");
else
set_reg_key(config_key, keypath("Direct3D"), "PixelShaderMode", "disabled");
}
INT_PTR CALLBACK
GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
......@@ -227,12 +273,16 @@ GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case IDC_ENABLE_DESKTOP: on_enable_desktop_clicked(hDlg); break;
case IDC_DX_MOUSE_GRAB: on_dx_mouse_grab_clicked(hDlg); break;
case IDC_DOUBLE_BUFFER: on_double_buffer_clicked(hDlg); break;
case IDC_D3D_PSHADER_MODE: on_d3d_pshader_mode_clicked(hDlg); break;
}
break;
}
case CBN_SELCHANGE: {
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
if (LOWORD(wParam) == IDC_SCREEN_DEPTH) on_screen_depth_changed(hDlg);
switch (LOWORD(wParam)) {
case IDC_SCREEN_DEPTH: on_screen_depth_changed(hDlg); break;
case IDC_D3D_VSHADER_MODE: on_d3d_vshader_mode_changed(hDlg); break;
}
break;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment