winmm: Add support for "open new" commands.
Peter Åstrand
astrand at cendio.se
Fri Jun 9 09:00:42 CDT 2006
ChangeLog:
winmm: Add support for "open new" commands.
--
Peter Åstrand ThinLinc Chief Developer
Cendio http://www.cendio.se
Teknikringen 3
583 30 Linköping Phone: +46-13-21 46 00
-------------- next part --------------
ChangeLog:
winmm: Add support for "open new" commands.
Index: dlls/winmm/mci.c
===================================================================
RCS file: /home/wine/wine/dlls/winmm/mci.c,v
retrieving revision 1.69
diff -u -r1.69 mci.c
--- dlls/winmm/mci.c 23 May 2006 12:48:57 -0000 1.69
+++ dlls/winmm/mci.c 9 Jun 2006 13:41:57 -0000
@@ -1281,18 +1281,27 @@
goto errCleanUp;
}
- /* case dev == 'new' has to be handled */
- if (!strcmpW(dev, wszNew)) {
- FIXME("'new': NIY as device name\n");
- dwRet = MCIERR_MISSING_DEVICE_NAME;
- goto errCleanUp;
- }
-
- /* otherwise, try to grab devType from open */
+ /* Determine devType from open */
if (!strcmpW(verb, wszOpen)) {
LPWSTR devType, tmp;
- if ((devType = strchrW(dev, '!')) != NULL) {
+ /* case dev == 'new' has to be handled */
+ if (!strcmpW(dev, wszNew)) {
+ dev = 0;
+ static const WCHAR wszTypeS[] = {'t','y','p','e',' ',0};
+ if ((devType = strstrW(args, wszTypeS)) != NULL) {
+ devType += 5;
+ tmp = strchrW(devType, ' ');
+ if (tmp) *tmp = '\0';
+ devType = str_dup_upper(devType);
+ if (tmp) *tmp = ' ';
+ /* dwFlags and data[2] will be correctly set in ParseOpt loop */
+ } else {
+ WARN("open new requires device type\n");
+ dwRet = MCIERR_MISSING_DEVICE_NAME;
+ goto errCleanUp;
+ }
+ } else if ((devType = strchrW(dev, '!')) != NULL) {
*devType++ = '\0';
tmp = devType; devType = dev; dev = tmp;
More information about the wine-patches
mailing list