- switch x11drvdlg to kernel_style, and clean up some superflous code
- more win32 heapification - move getDialogItemText into header and rename, use some more in x11drv page - make label phrasing consistent in x11drv page
This commit is contained in:
parent
0af614e77b
commit
02e850efdf
|
@ -62,7 +62,7 @@ BEGIN
|
||||||
LTEXT "Screen color depth: ",IDC_STATIC,8,10,70,30
|
LTEXT "Screen color depth: ",IDC_STATIC,8,10,70,30
|
||||||
COMBOBOX IDC_SCREEN_DEPTH,80,8,170,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
COMBOBOX IDC_SCREEN_DEPTH,80,8,170,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||||
|
|
||||||
CONTROL "Can DirectX programs prevent the mouse leaving their window?",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,35,230,8
|
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
|
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
|
GROUPBOX " Window settings ",IDC_STATIC,8,25,244,120
|
||||||
|
|
|
@ -538,32 +538,32 @@ void onEditChanged(HWND hDlg, WORD controlID) {
|
||||||
WINE_TRACE("controlID=%d\n", controlID);
|
WINE_TRACE("controlID=%d\n", controlID);
|
||||||
switch (controlID) {
|
switch (controlID) {
|
||||||
case IDC_EDIT_LABEL: {
|
case IDC_EDIT_LABEL: {
|
||||||
char *label = getDialogItemText(hDlg, controlID);
|
char *label = get_control_text(hDlg, controlID);
|
||||||
if(!label) label = strdup("");
|
if(!label) label = strdup("");
|
||||||
setDriveLabel(editDriveEntry, label);
|
setDriveLabel(editDriveEntry, label);
|
||||||
refreshDriveDlg(driveDlgHandle);
|
refreshDriveDlg(driveDlgHandle);
|
||||||
if (label) free(label);
|
if (label) HeapFree(GetProcessHeap(), 0, label);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDC_EDIT_PATH: {
|
case IDC_EDIT_PATH: {
|
||||||
char *path = getDialogItemText(hDlg, controlID);
|
char *path = get_control_text(hDlg, controlID);
|
||||||
if (!path) path = strdup("fake_windows"); /* default to assuming fake_windows in the .wine directory */
|
if (!path) path = strdup("fake_windows"); /* default to assuming fake_windows in the .wine directory */
|
||||||
WINE_TRACE("got path from control of '%s'\n", path);
|
WINE_TRACE("got path from control of '%s'\n", path);
|
||||||
setDrivePath(editDriveEntry, path);
|
setDrivePath(editDriveEntry, path);
|
||||||
if(path) free(path);
|
if (path) HeapFree(GetProcessHeap(), 0, path);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDC_EDIT_SERIAL: {
|
case IDC_EDIT_SERIAL: {
|
||||||
char *serial = getDialogItemText(hDlg, controlID);
|
char *serial = get_control_text(hDlg, controlID);
|
||||||
if(!serial) serial = strdup("");
|
if(!serial) serial = strdup("");
|
||||||
setDriveSerial(editDriveEntry, serial);
|
setDriveSerial(editDriveEntry, serial);
|
||||||
if (serial) free (serial);
|
if (serial) HeapFree(GetProcessHeap(), 0, serial);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IDC_EDIT_DEVICE: {
|
case IDC_EDIT_DEVICE: {
|
||||||
char *device = getDialogItemText(hDlg,controlID);
|
char *device = get_control_text(hDlg,controlID);
|
||||||
/* TODO: handle device if/when it makes sense to do so.... */
|
/* TODO: handle device if/when it makes sense to do so.... */
|
||||||
if (device) free(device);
|
if (device) HeapFree(GetProcessHeap(), 0, device);
|
||||||
refreshDriveDlg(driveDlgHandle);
|
refreshDriveDlg(driveDlgHandle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -635,15 +635,15 @@ INT_PTR CALLBACK DriveEditDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
case IDC_RADIO_ASSIGN:
|
case IDC_RADIO_ASSIGN:
|
||||||
{
|
{
|
||||||
char *edit, *serial;
|
char *edit, *serial;
|
||||||
edit = getDialogItemText(hDlg, IDC_EDIT_LABEL);
|
edit = get_control_text(hDlg, IDC_EDIT_LABEL);
|
||||||
if(!edit) edit = strdup("");
|
if(!edit) edit = strdup("");
|
||||||
setDriveLabel(editDriveEntry, edit);
|
setDriveLabel(editDriveEntry, edit);
|
||||||
free(edit);
|
HeapFree(GetProcessHeap(), 0, edit);
|
||||||
|
|
||||||
serial = getDialogItemText(hDlg, IDC_EDIT_SERIAL);
|
serial = get_control_text(hDlg, IDC_EDIT_SERIAL);
|
||||||
if(!serial) serial = strdup("");
|
if(!serial) serial = strdup("");
|
||||||
setDriveSerial(editDriveEntry, serial);
|
setDriveSerial(editDriveEntry, serial);
|
||||||
free(serial);
|
HeapFree(GetProcessHeap(), 0, serial);
|
||||||
|
|
||||||
/* TODO: we don't have a device at this point */
|
/* TODO: we don't have a device at this point */
|
||||||
/* setDriveValue(editWindowLetter, "Device", NULL); */
|
/* setDriveValue(editWindowLetter, "Device", NULL); */
|
||||||
|
@ -669,9 +669,11 @@ INT_PTR CALLBACK DriveEditDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
}
|
}
|
||||||
|
|
||||||
void onAddDriveClicked(HWND hDlg) {
|
void onAddDriveClicked(HWND hDlg) {
|
||||||
/* we should allocate a drive letter automatically. We also need some way to let the user choose the mapping point,
|
/* we should allocate a drive letter automatically. We also need
|
||||||
for now we will just force them to enter a path automatically, with / being the default. In future we should
|
some way to let the user choose the mapping point, for now we
|
||||||
be able to temporarily map / then invoke the directory chooser dialog. */
|
will just force them to enter a path automatically, with / being
|
||||||
|
the default. In future we should be able to temporarily map /
|
||||||
|
then invoke the directory chooser dialog. */
|
||||||
|
|
||||||
char newLetter = 'C'; /* we skip A and B, they are historically floppy drives */
|
char newLetter = 'C'; /* we skip A and B, they are historically floppy drives */
|
||||||
long mask = ~drive_available_mask(0); /* the mask is now which drives aren't available */
|
long mask = ~drive_available_mask(0); /* the mask is now which drives aren't available */
|
||||||
|
|
|
@ -487,15 +487,6 @@ char *keypath(char *section)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* returns a string with the window text of the dialog item. user is responsible for freeing the result */
|
|
||||||
char *getDialogItemText(HWND hDlg, WORD controlID) {
|
|
||||||
HWND item = GetDlgItem(hDlg, controlID);
|
|
||||||
int len = GetWindowTextLength(item) + 1;
|
|
||||||
char *result = malloc(len);
|
|
||||||
if (GetWindowText(item, result, len) == 0) return NULL;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
void PRINTERROR(void)
|
void PRINTERROR(void)
|
||||||
{
|
{
|
||||||
LPSTR msg;
|
LPSTR msg;
|
||||||
|
|
|
@ -93,7 +93,6 @@ INT_PTR CALLBACK LibrariesDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM l
|
||||||
INT_PTR CALLBACK AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
INT_PTR CALLBACK AudioDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
/* some basic utilities to make win32 suck less */
|
/* some basic utilities to make win32 suck less */
|
||||||
char *getDialogItemText(HWND hDlg, WORD controlID);
|
|
||||||
#define disable(id) EnableWindow(GetDlgItem(dialog, id), 0);
|
#define disable(id) EnableWindow(GetDlgItem(dialog, id), 0);
|
||||||
#define enable(id) EnableWindow(GetDlgItem(dialog, id), 1);
|
#define enable(id) EnableWindow(GetDlgItem(dialog, id), 1);
|
||||||
void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastError() */
|
void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastError() */
|
||||||
|
@ -105,6 +104,14 @@ static inline char *strdupA(char *s)
|
||||||
return strcpy(r, s);
|
return strcpy(r, s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline char *get_control_text(HWND dialog, WORD id)
|
||||||
|
{
|
||||||
|
HWND item = GetDlgItem(dialog, id);
|
||||||
|
int len = GetWindowTextLength(item) + 1;
|
||||||
|
char *result = HeapAlloc(GetProcessHeap(), 0, len);
|
||||||
|
if (GetWindowText(item, result, len) == 0) return NULL;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
#define WINE_KEY_ROOT "Software\\Wine\\Wine\\Config"
|
#define WINE_KEY_ROOT "Software\\Wine\\Wine\\Config"
|
||||||
|
|
||||||
|
|
|
@ -72,109 +72,119 @@ void update_gui_for_desktop_mode(HWND dialog) {
|
||||||
updating_ui = FALSE;
|
updating_ui = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pokes the win32 api to setup the dialog from the config struct */
|
static void init_dialog (HWND dialog)
|
||||||
void initGraphDlg (HWND hDlg)
|
|
||||||
{
|
{
|
||||||
static char *default_desktop = "640x480";
|
static char *default_desktop = "640x480";
|
||||||
char *buf;
|
char *buf;
|
||||||
char *bufindex;
|
char *bufindex;
|
||||||
|
|
||||||
update_gui_for_desktop_mode(hDlg);
|
update_gui_for_desktop_mode(dialog);
|
||||||
|
|
||||||
updating_ui = TRUE;
|
updating_ui = TRUE;
|
||||||
|
|
||||||
/* desktop size */
|
/* desktop size */
|
||||||
buf = get(keypath("x11drv"), "Desktop", default_desktop);
|
buf = get(keypath("x11drv"), "Desktop", default_desktop);
|
||||||
bufindex = strchr(buf, 'x');
|
bufindex = strchr(buf, 'x');
|
||||||
|
|
||||||
if(!bufindex) /* handle invalid "Desktop" values */
|
if(!bufindex) /* handle invalid "Desktop" values */
|
||||||
{
|
{
|
||||||
free(buf);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
buf = strdup(default_desktop);
|
buf = strdupA(default_desktop);
|
||||||
bufindex = strchr(buf, 'x');
|
bufindex = strchr(buf, 'x');
|
||||||
}
|
}
|
||||||
|
|
||||||
*bufindex = '\0';
|
*bufindex = '\0';
|
||||||
bufindex++;
|
bufindex++;
|
||||||
SetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_WIDTH), buf);
|
SetWindowText(GetDlgItem(dialog, IDC_DESKTOP_WIDTH), buf);
|
||||||
SetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_HEIGHT), bufindex);
|
SetWindowText(GetDlgItem(dialog, IDC_DESKTOP_HEIGHT), bufindex);
|
||||||
HeapFree(GetProcessHeap(), 0, buf);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
|
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_RESETCONTENT, 0, 0);
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_RESETCONTENT, 0, 0);
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "8 bit");
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "8 bit");
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "16 bit");
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "16 bit");
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "24 bit");
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "24 bit");
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "32 bit"); /* is this valid? */
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "32 bit"); /* is this valid? */
|
||||||
|
|
||||||
buf = get(keypath("x11drv"), "ScreenDepth", "24");
|
buf = get(keypath("x11drv"), "ScreenDepth", "24");
|
||||||
if (strcmp(buf, "8") == 0)
|
if (strcmp(buf, "8") == 0)
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 0, 0);
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 0, 0);
|
||||||
else if (strcmp(buf, "16") == 0)
|
else if (strcmp(buf, "16") == 0)
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 1, 0);
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 1, 0);
|
||||||
else if (strcmp(buf, "24") == 0)
|
else if (strcmp(buf, "24") == 0)
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 2, 0);
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 2, 0);
|
||||||
else if (strcmp(buf, "32") == 0)
|
else if (strcmp(buf, "32") == 0)
|
||||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 3, 0);
|
SendDlgItemMessage(dialog, IDC_SCREEN_DEPTH, CB_SETCURSEL, 3, 0);
|
||||||
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);
|
||||||
|
|
||||||
SendDlgItemMessage(hDlg, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
|
SendDlgItemMessage(dialog, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
|
||||||
SendDlgItemMessage(hDlg, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
|
SendDlgItemMessage(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
|
||||||
|
|
||||||
buf = get(keypath("x11drv"), "DXGrab", "Y");
|
buf = get(keypath("x11drv"), "DXGrab", "Y");
|
||||||
if (IS_OPTION_TRUE(*buf))
|
if (IS_OPTION_TRUE(*buf))
|
||||||
CheckDlgButton(hDlg, IDC_DX_MOUSE_GRAB, BST_CHECKED);
|
CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_CHECKED);
|
||||||
else
|
else
|
||||||
CheckDlgButton(hDlg, IDC_DX_MOUSE_GRAB, BST_UNCHECKED);
|
CheckDlgButton(dialog, IDC_DX_MOUSE_GRAB, BST_UNCHECKED);
|
||||||
HeapFree(GetProcessHeap(), 0, buf);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
|
|
||||||
buf = get(keypath("x11drv"), "DesktopDoubleBuffered", "Y");
|
buf = get(keypath("x11drv"), "DesktopDoubleBuffered", "Y");
|
||||||
if (IS_OPTION_TRUE(*buf))
|
if (IS_OPTION_TRUE(*buf))
|
||||||
CheckDlgButton(hDlg, IDC_DOUBLE_BUFFER, BST_CHECKED);
|
CheckDlgButton(dialog, IDC_DOUBLE_BUFFER, BST_CHECKED);
|
||||||
else
|
else
|
||||||
CheckDlgButton(hDlg, IDC_DOUBLE_BUFFER, BST_UNCHECKED);
|
CheckDlgButton(dialog, IDC_DOUBLE_BUFFER, BST_UNCHECKED);
|
||||||
HeapFree(GetProcessHeap(), 0, buf);
|
HeapFree(GetProcessHeap(), 0, buf);
|
||||||
|
|
||||||
updating_ui = FALSE;
|
updating_ui = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setFromDesktopSizeEdits(HWND hDlg) {
|
static void set_from_desktop_edits(HWND dialog) {
|
||||||
char *width = HeapAlloc(GetProcessHeap(), 0, RES_MAXLEN+1);
|
char *width, *height, *new;
|
||||||
char *height = HeapAlloc(GetProcessHeap(), 0, RES_MAXLEN+1);
|
|
||||||
char *new = HeapAlloc(GetProcessHeap(), 0, (RES_MAXLEN*2) + 2);
|
|
||||||
|
|
||||||
if (updating_ui) goto end;
|
if (updating_ui) return;
|
||||||
|
|
||||||
WINE_TRACE("\n");
|
WINE_TRACE("\n");
|
||||||
|
|
||||||
GetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_WIDTH), width, RES_MAXLEN+1);
|
|
||||||
GetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_HEIGHT), height, RES_MAXLEN+1);
|
|
||||||
|
|
||||||
if (strcmp(width, "") == 0) strcpy(width, "640");
|
width = get_control_text(dialog, IDC_DESKTOP_WIDTH);
|
||||||
if (strcmp(height, "") == 0) strcpy(height, "480");
|
height = get_control_text(dialog, IDC_DESKTOP_HEIGHT);
|
||||||
|
|
||||||
|
if (strcmp(width, "") == 0)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, width);
|
||||||
|
width = strdupA("640");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(height, "") == 0)
|
||||||
|
{
|
||||||
|
HeapFree(GetProcessHeap(), 0, height);
|
||||||
|
height = strdupA("480");
|
||||||
|
}
|
||||||
|
|
||||||
|
new = HeapAlloc(GetProcessHeap(), 0, strlen(width) + strlen(height) + 2 /* x + terminator */);
|
||||||
sprintf(new, "%sx%s", width, height);
|
sprintf(new, "%sx%s", width, height);
|
||||||
set(keypath("x11drv"), "Desktop", new);
|
set(keypath("x11drv"), "Desktop", new);
|
||||||
|
|
||||||
end:
|
|
||||||
HeapFree(GetProcessHeap(), 0, width);
|
HeapFree(GetProcessHeap(), 0, width);
|
||||||
HeapFree(GetProcessHeap(), 0, height);
|
HeapFree(GetProcessHeap(), 0, height);
|
||||||
HeapFree(GetProcessHeap(), 0, new);
|
HeapFree(GetProcessHeap(), 0, new);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onEnableDesktopClicked(HWND hDlg) {
|
void on_enable_desktop_clicked(HWND dialog) {
|
||||||
WINE_TRACE("\n");
|
WINE_TRACE("\n");
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_ENABLE_DESKTOP) == BST_CHECKED) {
|
|
||||||
|
if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) {
|
||||||
/* it was just unchecked, so read the values of the edit boxes, set the config value */
|
/* it was just unchecked, so read the values of the edit boxes, set the config value */
|
||||||
setFromDesktopSizeEdits(hDlg);
|
set_from_desktop_edits(dialog);
|
||||||
} else {
|
} else {
|
||||||
/* it was just checked, so remove the config values */
|
/* it was just checked, so remove the config values */
|
||||||
set(keypath("x11drv"), "Desktop", NULL);
|
set(keypath("x11drv"), "Desktop", NULL);
|
||||||
}
|
}
|
||||||
update_gui_for_desktop_mode(hDlg);
|
|
||||||
|
update_gui_for_desktop_mode(dialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onScreenDepthChanged(HWND hDlg) {
|
static void on_screen_depth_changed(HWND dialog) {
|
||||||
char *newvalue = getDialogItemText(hDlg, IDC_SCREEN_DEPTH);
|
char *newvalue = get_control_text(dialog, IDC_SCREEN_DEPTH);
|
||||||
char *spaceIndex = strchr(newvalue, ' ');
|
char *spaceIndex = strchr(newvalue, ' ');
|
||||||
|
|
||||||
WINE_TRACE("newvalue=%s\n", newvalue);
|
WINE_TRACE("newvalue=%s\n", newvalue);
|
||||||
|
@ -182,19 +192,19 @@ void onScreenDepthChanged(HWND hDlg) {
|
||||||
|
|
||||||
*spaceIndex = '\0';
|
*spaceIndex = '\0';
|
||||||
set(keypath("x11drv"), "ScreenDepth", newvalue);
|
set(keypath("x11drv"), "ScreenDepth", newvalue);
|
||||||
free(newvalue);
|
HeapFree(GetProcessHeap(), 0, newvalue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void onDXMouseGrabClicked(HWND hDlg) {
|
static void on_dx_mouse_grab_clicked(HWND dialog) {
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_DX_MOUSE_GRAB) == BST_CHECKED)
|
if (IsDlgButtonChecked(dialog, IDC_DX_MOUSE_GRAB) == BST_CHECKED)
|
||||||
set(keypath("x11drv"), "DXGrab", "Y");
|
set(keypath("x11drv"), "DXGrab", "Y");
|
||||||
else
|
else
|
||||||
set(keypath("x11drv"), "DXGrab", "N");
|
set(keypath("x11drv"), "DXGrab", "N");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void onDoubleBufferClicked(HWND hDlg) {
|
static void on_double_buffer_clicked(HWND dialog) {
|
||||||
if (IsDlgButtonChecked(hDlg, IDC_DOUBLE_BUFFER) == BST_CHECKED)
|
if (IsDlgButtonChecked(dialog, IDC_DOUBLE_BUFFER) == BST_CHECKED)
|
||||||
set(keypath("x11drv"), "DesktopDoubleBuffered", "Y");
|
set(keypath("x11drv"), "DesktopDoubleBuffered", "Y");
|
||||||
else
|
else
|
||||||
set(keypath("x11drv"), "DesktopDoubleBuffered", "N");
|
set(keypath("x11drv"), "DesktopDoubleBuffered", "N");
|
||||||
|
@ -216,20 +226,20 @@ GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
case EN_CHANGE: {
|
case EN_CHANGE: {
|
||||||
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
||||||
if ( ((LOWORD(wParam) == IDC_DESKTOP_WIDTH) || (LOWORD(wParam) == IDC_DESKTOP_HEIGHT)) && !updating_ui )
|
if ( ((LOWORD(wParam) == IDC_DESKTOP_WIDTH) || (LOWORD(wParam) == IDC_DESKTOP_HEIGHT)) && !updating_ui )
|
||||||
setFromDesktopSizeEdits(hDlg);
|
set_from_desktop_edits(hDlg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case BN_CLICKED: {
|
case BN_CLICKED: {
|
||||||
if (updating_ui) break;
|
if (updating_ui) break;
|
||||||
switch(LOWORD(wParam)) {
|
switch(LOWORD(wParam)) {
|
||||||
case IDC_ENABLE_DESKTOP: onEnableDesktopClicked(hDlg); break;
|
case IDC_ENABLE_DESKTOP: on_enable_desktop_clicked(hDlg); break;
|
||||||
case IDC_DX_MOUSE_GRAB: onDXMouseGrabClicked(hDlg); break;
|
case IDC_DX_MOUSE_GRAB: on_dx_mouse_grab_clicked(hDlg); break;
|
||||||
case IDC_DOUBLE_BUFFER: onDoubleBufferClicked(hDlg); break;
|
case IDC_DOUBLE_BUFFER: on_double_buffer_clicked(hDlg); break;
|
||||||
};
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CBN_SELCHANGE: {
|
case CBN_SELCHANGE: {
|
||||||
if (LOWORD(wParam) == IDC_SCREEN_DEPTH) onScreenDepthChanged(hDlg);
|
if (LOWORD(wParam) == IDC_SCREEN_DEPTH) on_screen_depth_changed(hDlg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -251,7 +261,7 @@ GraphDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case PSN_SETACTIVE: {
|
case PSN_SETACTIVE: {
|
||||||
initGraphDlg (hDlg);
|
init_dialog (hDlg);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue