diff --git a/programs/winecfg/Bg.rc b/programs/winecfg/Bg.rc index 302bec5..a2580a3 100644 --- a/programs/winecfg/Bg.rc +++ b/programs/winecfg/Bg.rc @@ -90,6 +90,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,115,218,125,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL " Pixel Shader ( )",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,237,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Cs.rc b/programs/winecfg/Cs.rc index 5bba698..07ba100 100644 --- a/programs/winecfg/Cs.rc +++ b/programs/winecfg/Cs.rc @@ -88,6 +88,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,105,197,140,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Povolit stnovn pixel (spolh se na hardware podporu)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Velikost videopamti (v megabytech):",IDC_STATIC,15,232,140,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,145,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 @@ -244,8 +246,8 @@ END STRINGTABLE DISCARDABLE BEGIN - IDS_SHADER_MODE_HARDWARE "Hardwarov" - IDS_SHADER_MODE_NONE "dn" + IDS_SHADER_MODE_HARDWARE "Podporovno zazenm" + IDS_SHADER_MODE_NONE "dn" END STRINGTABLE DISCARDABLE diff --git a/programs/winecfg/De.rc b/programs/winecfg/De.rc index 8c77b2b..9741a48 100644 --- a/programs/winecfg/De.rc +++ b/programs/winecfg/De.rc @@ -84,6 +84,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,140,197,105,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Pixel Shader aktivieren (wenn von Hardware untersttzt)", IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,212,230,10 + LTEXT "Gre des Grafikspeichers(in Megabytes)",IDC_STATIC,15,232,140,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,150,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/En.rc b/programs/winecfg/En.rc index 02d4850..218150a 100644 --- a/programs/winecfg/En.rc +++ b/programs/winecfg/En.rc @@ -79,12 +79,14 @@ BEGIN EDITTEXT IDC_DESKTOP_WIDTH,64,167,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED EDITTEXT IDC_DESKTOP_HEIGHT,117,167,40,12,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED - GROUPBOX " Direct3D ",IDC_STATIC,8,189,244,50 + GROUPBOX " Direct3D ",IDC_STATIC,8,189,244,60 LTEXT "Vertex Shader Support: ",IDC_STATIC,15,199,80,30 COMBOBOX IDC_D3D_VSHADER_MODE,100,197,145,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Allow Pixel Shader (if supported by hardware)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Es.rc b/programs/winecfg/Es.rc index 2430b02..d7dea8b 100644 --- a/programs/winecfg/Es.rc +++ b/programs/winecfg/Es.rc @@ -83,6 +83,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,197,145,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Permitir Pixel Shader (si hay soporte por hardware)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Fi.rc b/programs/winecfg/Fi.rc index 16da0ca..f8f8180 100644 --- a/programs/winecfg/Fi.rc +++ b/programs/winecfg/Fi.rc @@ -84,6 +84,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,218,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Salli &Pixel Shader:n kytt laitteiston tukiessa",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,237,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Fr.rc b/programs/winecfg/Fr.rc index 007ca53..a25a899 100644 --- a/programs/winecfg/Fr.rc +++ b/programs/winecfg/Fr.rc @@ -84,6 +84,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,110,198,100,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Permettre le Pixel Shader (si support par le matriel)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,215,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Hu.rc b/programs/winecfg/Hu.rc index 20e5286..ec07983 100644 --- a/programs/winecfg/Hu.rc +++ b/programs/winecfg/Hu.rc @@ -84,6 +84,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,218,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Pixel Shader engedlyezse (ha tmogatja a hardver)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,237,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Ja.rc b/programs/winecfg/Ja.rc index 4b0285f..71d3730 100644 --- a/programs/winecfg/Ja.rc +++ b/programs/winecfg/Ja.rc @@ -83,6 +83,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,148,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Pixel Shader Lɂ(n[hEFAŃT|[gĂꍇ̂)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,165,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc index fe20fc4..4588af2 100644 --- a/programs/winecfg/Ko.rc +++ b/programs/winecfg/Ko.rc @@ -86,6 +86,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,197,146,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "ȼ ̴ (ϵ Ѵٸ)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Nl.rc b/programs/winecfg/Nl.rc index 5f25052..05761bc 100644 --- a/programs/winecfg/Nl.rc +++ b/programs/winecfg/Nl.rc @@ -86,6 +86,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,120,197,130,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Pixel Shader toestaan (indien ondersteund door de hardware)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/No.rc b/programs/winecfg/No.rc index f76a47c..5bc023b 100644 --- a/programs/winecfg/No.rc +++ b/programs/winecfg/No.rc @@ -83,6 +83,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,218,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Tillat piksel-skyggelegger (hvis maskinvaren sttter det)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,237,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Pl.rc b/programs/winecfg/Pl.rc index fa7bc62..f1ab369 100644 --- a/programs/winecfg/Pl.rc +++ b/programs/winecfg/Pl.rc @@ -88,6 +88,8 @@ Niektrym aplikacjom moe to pomc w lepszym dziaaniu.", COMBOBOX IDC_D3D_VSHADER_MODE,100,197,145,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Obsuguj Pixel Shader (jeeli s obsugiwane przez kart graficzn)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Ro.rc b/programs/winecfg/Ro.rc index 3b62984..c4a275f 100644 --- a/programs/winecfg/Ro.rc +++ b/programs/winecfg/Ro.rc @@ -85,6 +85,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,197,145,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Allow Pixel Shader (if supported by hardware)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Ru.rc b/programs/winecfg/Ru.rc index 1872a3d..5e0fb61 100644 --- a/programs/winecfg/Ru.rc +++ b/programs/winecfg/Ru.rc @@ -85,6 +85,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,120,197,125,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL " Pixel Shader ( )",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,216,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/Tr.rc b/programs/winecfg/Tr.rc index 13404c7..ff0bf14 100644 --- a/programs/winecfg/Tr.rc +++ b/programs/winecfg/Tr.rc @@ -83,6 +83,8 @@ BEGIN COMBOBOX IDC_D3D_VSHADER_MODE,100,218,150,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP CONTROL "Pixel Shader'a izin ver (donanm destekliyorsa)",IDC_D3D_PSHADER_MODE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,237,230,10 + LTEXT "Video Memory Size (in megabytes):",IDC_STATIC,15,232,120,12 + COMBOBOX IDC_VIDEOMEMORY_SIZE_COMBO,130,232,40,112,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP | CBS_LOWERCASE END IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250 diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h index 811a115..cabe783 100644 --- a/programs/winecfg/resource.h +++ b/programs/winecfg/resource.h @@ -65,6 +65,7 @@ #define IDC_DESKTOP_BY 1026 #define IDC_XDGA 1027 #define IDC_XSHM 1028 +#define IDC_VIDEOMEMORY_SIZE_COMBO 1081 /* dll editing */ #define IDC_RAD_BUILTIN 1029 diff --git a/programs/winecfg/x11drvdlg.c b/programs/winecfg/x11drvdlg.c index 8fa183e..c99b855 100644 --- a/programs/winecfg/x11drvdlg.c +++ b/programs/winecfg/x11drvdlg.c @@ -36,7 +36,10 @@ 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? */ +#define VIDEOMEM_MAXLEN 5 /* the maximum number of characters in a video memory input box */ +#define VIDEOMEM_SIZES_LENGTH 6 /* array length */ +const char * builtin_videomem_sizes[] = { "", "32", "64", "128", "256", "512" }; static struct SHADERMODE { @@ -72,7 +75,7 @@ static void update_gui_for_desktop_mode(HWND dialog) { if (reg_key_exists(config_key, keypath("X11 Driver"), "Desktop")) { char* buf, *bufindex; - CheckDlgButton(dialog, IDC_ENABLE_DESKTOP, BST_CHECKED); + CheckDlgButton(dialog, IDC_ENABLE_DESKTOP, BST_CHECKED); buf = get_reg_key(config_key, keypath("X11 Driver"), "Desktop", "640x480"); /* note: this test must match the one in x11drv */ @@ -114,6 +117,26 @@ static void update_gui_for_desktop_mode(HWND dialog) { updating_ui = FALSE; } +static void update_gui_for_videomem_size(HWND dialog) { + char* buf; + int i; + + SendDlgItemMessage(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, CB_RESETCONTENT, 0, 0); + SendDlgItemMessage(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, EM_LIMITTEXT, VIDEOMEM_MAXLEN, 0); + + for (i = 0; i < VIDEOMEM_SIZES_LENGTH; i++) + SendDlgItemMessageA(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, CB_ADDSTRING, i, (LPARAM) builtin_videomem_sizes[i]); + + buf = get_reg_key(config_key, keypath("Direct3D"), "VideoMemorySize", "64"); + + SendDlgItemMessage(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, WM_SETTEXT, 0, buf); + + enable(IDC_VIDEOMEMORY_SIZE_COMBO); + HeapFree(GetProcessHeap(), 0, buf); + + updating_ui = FALSE; +} + static void init_dialog(HWND dialog) { unsigned int it; @@ -164,6 +187,7 @@ static void init_dialog(HWND dialog) CheckDlgButton(dialog, IDC_D3D_PSHADER_MODE, BST_UNCHECKED); HeapFree(GetProcessHeap(), 0, buf); + update_gui_for_videomem_size(dialog); updating_ui = FALSE; } @@ -208,6 +232,36 @@ static void on_enable_desktop_clicked(HWND dialog) { update_gui_for_desktop_mode(dialog); } +static void set_from_videomemory_size_edits(HWND dialog) { + char buffer[1024]; + + SendDlgItemMessage(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, WM_GETTEXT, sizeof(buffer), (LPARAM) buffer); + + if (strlen(buffer)) + set_reg_key(config_key, keypath("Direct3D"), "VideoMemorySize", buffer); +} + +static void set_from_videomemory_size_changed(HWND dialog) { + char *memsize = HeapAlloc( GetProcessHeap(), 0, 5+2 ); + int sel; + + if (updating_ui) return; + + WINE_TRACE("\n"); + + sel = SendDlgItemMessage(dialog, IDC_VIDEOMEMORY_SIZE_COMBO, CB_GETCURSEL, 0, 0); + strcpy( memsize, builtin_videomem_sizes[sel]); + + if (memsize == NULL || strcmp(memsize, "") == 0) { + HeapFree(GetProcessHeap(), 0, memsize); + memsize = strdupA("64"); + } + + set_reg_key(config_key, keypath("Direct3D"), "VideoMemorySize", memsize); + + HeapFree(GetProcessHeap(), 0, memsize); +} + static void on_enable_managed_clicked(HWND dialog) { WINE_TRACE("\n"); @@ -272,11 +326,17 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case CBN_SELCHANGE: { SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); switch (LOWORD(wParam)) { - case IDC_D3D_VSHADER_MODE: on_d3d_vshader_mode_changed(hDlg); break; - } + case IDC_D3D_VSHADER_MODE: on_d3d_vshader_mode_changed(hDlg); break; + case IDC_VIDEOMEMORY_SIZE_COMBO: set_from_videomemory_size_changed(hDlg); break; + } + break; + } + case CBN_EDITCHANGE: { + SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); + if(LOWORD(wParam) == IDC_VIDEOMEMORY_SIZE_COMBO) + set_from_videomemory_size_edits(hDlg); break; } - default: break; }