Added patch to show unmounted devices in winecfg and allow changing the unix path.

This commit is contained in:
Sebastian Lackner 2015-03-31 01:28:35 +02:00
parent cc9f3cfa0e
commit 6a0153d46c
5 changed files with 201 additions and 28 deletions

View File

@ -38,7 +38,7 @@ Wine. All those differences are also documented on the
Included bug fixes and improvements
===================================
**Bugfixes and features included in the next upcoming release [11]:**
**Bugfixes and features included in the next upcoming release [12]:**
* Add stub fltmgr.sys (filter manager driver) ([Wine Bug #23583](https://bugs.winehq.org/show_bug.cgi?id=23583))
* Add stubs for Power[Set|Clear]Request
@ -50,6 +50,7 @@ Included bug fixes and improvements
* Fix handling of ANSI NTLM credentials ([Wine Bug #37063](https://bugs.winehq.org/show_bug.cgi?id=37063))
* Implement empty enumerator for IWiaDevMgr::EnumDeviceInfo ([Wine Bug #27775](https://bugs.winehq.org/show_bug.cgi?id=27775))
* Return correct device type for cd devices without medium
* Show unmounted devices in winecfg and allow changing the unix path
* Software support for Environmental Audio Extensions (EAX)

1
debian/changelog vendored
View File

@ -12,6 +12,7 @@ wine-staging (1.7.40) UNRELEASED; urgency=low
* Added patch for stub of fltmgr.sys (filter manager driver).
* Added patch to return correct device type for cd devices without medium.
* Added patch to fix device paths in HKLM\SYSTEM\MountedDevices.
* Added patch to show unmounted devices in winecfg and allow changing the unix path.
* Removed patch to fix regression causing black screen on startup (accepted upstream).
* Removed patch to fix edge cases in TOOLTIPS_GetTipText (fixed upstream).
* Removed patch for IConnectionPoint/INetworkListManagerEvents stub interface (accepted upstream).

View File

@ -217,6 +217,7 @@ patch_enable_all ()
enable_winebuild_LinkerVersion="$1"
enable_winecfg_Libraries="$1"
enable_winecfg_Staging="$1"
enable_winecfg_Unmounted_Devices="$1"
enable_wineconsole_Buffer_Size="$1"
enable_wined3d_CSMT_Helper="$1"
enable_wined3d_CSMT_Main="$1"
@ -715,6 +716,9 @@ patch_enable ()
winecfg-Staging)
enable_winecfg_Staging="$2"
;;
winecfg-Unmounted_Devices)
enable_winecfg_Unmounted_Devices="$2"
;;
wineconsole-Buffer_Size)
enable_wineconsole_Buffer_Size="$2"
;;
@ -1951,33 +1955,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Multisampling
# |
# | This patchset fixes the following Wine bugs:
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Multisampling" -eq 1; then
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
(
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Revert_PixelFormat
# |
# | This patchset fixes the following Wine bugs:
@ -2012,6 +1989,33 @@ if test "$enable_wined3d_Revert_PixelFormat" -eq 1; then
) >> "$patchlist"
fi
# Patchset wined3d-UnhandledBlendFactor
# |
# | Modified files:
# | * dlls/wined3d/state.c
# |
if test "$enable_wined3d_UnhandledBlendFactor" -eq 1; then
patch_apply wined3d-UnhandledBlendFactor/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch
(
echo '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-Multisampling
# |
# | This patchset fixes the following Wine bugs:
# | * [#12652] Allow to override number of quality levels for D3DMULTISAMPLE_NONMASKABLE.
# |
# | Modified files:
# | * dlls/wined3d/directx.c, dlls/wined3d/wined3d_main.c, dlls/wined3d/wined3d_private.h
# |
if test "$enable_wined3d_Multisampling" -eq 1; then
patch_apply wined3d-Multisampling/0001-wined3d-Allow-to-specify-multisampling-AA-quality-le.patch
(
echo '+ { "Austin English", "wined3d: Allow to specify multisampling AA quality levels via registry.", 1 },';
) >> "$patchlist"
fi
# Patchset wined3d-CSMT_Main
# |
# | This patchset fixes the following Wine bugs:
@ -4427,6 +4431,18 @@ if test "$enable_winecfg_Libraries" -eq 1; then
) >> "$patchlist"
fi
# Patchset winecfg-Unmounted_Devices
# |
# | Modified files:
# | * programs/winecfg/drive.c, programs/winecfg/driveui.c
# |
if test "$enable_winecfg_Unmounted_Devices" -eq 1; then
patch_apply winecfg-Unmounted_Devices/0001-winecfg-Show-unmounted-devices-and-allow-changing-th.patch
(
echo '+ { "Michael Müller", "winecfg: Show unmounted devices and allow changing the device value.", 1 },';
) >> "$patchlist"
fi
# Patchset wineconsole-Buffer_Size
# |
# | This patchset fixes the following Wine bugs:

View File

@ -0,0 +1,154 @@
From 3cdf8418055efc6fc1d1e0b290ad02a6e0ed2128 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 30 Mar 2015 04:38:21 +0200
Subject: winecfg: Show unmounted devices and allow changing the device value.
---
programs/winecfg/drive.c | 24 ++++++++++++------------
programs/winecfg/driveui.c | 27 ++++++++++++++++++---------
2 files changed, 30 insertions(+), 21 deletions(-)
diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c
index 8cad14a..a740d74 100644
--- a/programs/winecfg/drive.c
+++ b/programs/winecfg/drive.c
@@ -106,7 +106,7 @@ BOOL add_drive(char letter, const char *targetpath, const char *device, const WC
wine_dbgstr_w(label), serial, type);
drives[driveIndex].letter = toupper(letter);
- drives[driveIndex].unixpath = strdupA(targetpath);
+ drives[driveIndex].unixpath = targetpath ? strdupA(targetpath) : NULL;
drives[driveIndex].device = device ? strdupA(device) : NULL;
drives[driveIndex].label = label ? strdupW(label) : NULL;
drives[driveIndex].serial = serial;
@@ -290,8 +290,7 @@ BOOL load_drives(void)
volname[0] = 0;
serial = 0;
}
- if (unixpath) /* FIXME: handle unmounted drives too */
- add_drive( root[0], unixpath, device, volname, serial, get_drive_type(root[0]) );
+ add_drive( root[0], unixpath, device, volname, serial, get_drive_type(root[0]) );
root[0]++;
}
else
@@ -331,32 +330,33 @@ void apply_drive_changes(void)
len = sizeof(*ioctl);
if (drives[i].in_use)
{
- len += strlen(drives[i].unixpath) + 1;
+ if (drives[i].unixpath) len += strlen(drives[i].unixpath) + 1;
if (drives[i].device) len += strlen(drives[i].device) + 1;
}
if (!(ioctl = HeapAlloc( GetProcessHeap(), 0, len ))) continue;
ioctl->size = len;
+ ioctl->type = DRIVE_NO_ROOT_DIR;
ioctl->letter = 'a' + i;
+ ioctl->mount_point_offset = 0;
ioctl->device_offset = 0;
if (drives[i].in_use)
{
char *ptr = (char *)(ioctl + 1);
ioctl->type = drives[i].type;
- strcpy( ptr, drives[i].unixpath );
- ioctl->mount_point_offset = ptr - (char *)ioctl;
- if (drives[i].device)
+ if (drives[i].unixpath)
{
+ strcpy( ptr, drives[i].unixpath );
+ ioctl->mount_point_offset = ptr - (char *)ioctl;
ptr += strlen(ptr) + 1;
+ }
+
+ if (drives[i].device)
+ {
strcpy( ptr, drives[i].device );
ioctl->device_offset = ptr - (char *)ioctl;
}
}
- else
- {
- ioctl->type = DRIVE_NO_ROOT_DIR;
- ioctl->mount_point_offset = 0;
- }
if (DeviceIoControl( mgr, IOCTL_MOUNTMGR_DEFINE_UNIX_DRIVE, ioctl, len, NULL, 0, NULL, NULL ))
{
diff --git a/programs/winecfg/driveui.c b/programs/winecfg/driveui.c
index 98e057b..fcd7ac3 100644
--- a/programs/winecfg/driveui.c
+++ b/programs/winecfg/driveui.c
@@ -176,14 +176,12 @@ static void enable_labelserial_box(HWND dialog, int mode)
{
case BOX_MODE_DEVICE:
/* FIXME: enable device editing */
- disable(IDC_EDIT_DEVICE);
disable(IDC_BUTTON_BROWSE_DEVICE);
disable(IDC_EDIT_SERIAL);
disable(IDC_EDIT_LABEL);
break;
case BOX_MODE_NORMAL:
- disable(IDC_EDIT_DEVICE);
disable(IDC_BUTTON_BROWSE_DEVICE);
enable(IDC_EDIT_SERIAL);
enable(IDC_EDIT_LABEL);
@@ -234,7 +232,7 @@ static int fill_drives_list(HWND dialog)
lv_insert_item(dialog, &item);
HeapFree(GetProcessHeap(), 0, item.pszText);
- path = strdupU2W(drives[i].unixpath);
+ path = strdupU2W(drives[i].unixpath ? drives[i].unixpath : "");
lv_set_item_text(dialog, count, 1, path);
HeapFree(GetProcessHeap(), 0, path);
@@ -433,7 +431,7 @@ static void update_controls(HWND dialog)
/* path */
WINE_TRACE("set path control text to '%s'\n", current_drive->unixpath);
- path = strdupU2W(current_drive->unixpath);
+ path = strdupU2W(current_drive->unixpath ? current_drive->unixpath : "");
set_textW(dialog, IDC_EDIT_PATH, path);
HeapFree(GetProcessHeap(), 0, path);
@@ -518,11 +516,11 @@ static void on_edit_changed(HWND dialog, WORD id)
else
{
path = NULL;
- wpath = strdupU2W("drive_c");
+ wpath = strdupU2W("");
}
HeapFree(GetProcessHeap(), 0, current_drive->unixpath);
- current_drive->unixpath = path ? path : strdupA("drive_c");
+ current_drive->unixpath = path;
current_drive->modified = TRUE;
WINE_TRACE("set path to %s\n", current_drive->unixpath);
@@ -554,9 +552,20 @@ static void on_edit_changed(HWND dialog, WORD id)
case IDC_EDIT_DEVICE:
{
- char *device = get_text(dialog, id);
- /* TODO: handle device if/when it makes sense to do so.... */
- HeapFree(GetProcessHeap(), 0, device);
+ WCHAR *wdevice = get_textW(dialog, id);
+ char *device;
+ int lenW;
+
+ HeapFree(GetProcessHeap(), 0, current_drive->device);
+
+ if ((lenW = WideCharToMultiByte(CP_UNIXCP, 0, wdevice, -1, NULL, 0, NULL, NULL)))
+ {
+ device = HeapAlloc(GetProcessHeap(), 0, lenW);
+ WideCharToMultiByte(CP_UNIXCP, 0, wdevice, -1, device, lenW, NULL, NULL);
+ current_drive->device = device;
+ }
+ else
+ current_drive->device = NULL;
break;
}
}
--
2.3.3

View File

@ -0,0 +1 @@
Fixes: Show unmounted devices in winecfg and allow changing the unix path