winmm: Fix MCI A/W mapping for 64bit Wine.

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Mon Mar 29 11:42:01 CDT 2010


Hi,

this patch shows that A/W conversion needs prior knowledge about
the commands to be executed and hence is not extensible at all with
foreign drivers and their potentially unknown commands.  I'm
wondering whether another approach would be feasible,
based on "generic" functions that can perform strlenAW and strcmpAW on
either A or W strings, given some flag.  OTOH, how possibly could
Wine know whether a foreign driver is expecting A or W strings
and translate on the fly?

The scheme might go as follows:
 - recognize the command and driver;
 - get the driver's command table;
 - fix in place or using another structure everything that has
   MCI_STRING type -- argh, we don't even know whether these slots
   are valid without consulting the flags whose meaning we pretend
   not to know :-(  Catch-22
   How to handle that?

I've changed the default return from -1 to 0 to let unrecognized
(and unimplemented) commands pass through.  That should be enough for
SETVIDEO and SETAUDIO whose Algorithm and Quality slots builtin mciavi
does not implement anyway.

This patch could be completed the day these 2 slots get implemented
(or if some app requires it and works great with native) -- I'd like
to get some feedback first.

What's this to do with 64 bit? MCI_ANIM_OPEN_PARMS then has 3, not 2
extra DWORDs because of the final HWND.

Regards,
 Jörg Höhle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-winmm-Fix-MCI-A-W-mapping-for-64bit-Wine.patch
Type: application/octet-stream
Size: 10044 bytes
Desc: 0001-winmm-Fix-MCI-A-W-mapping-for-64bit-Wine.patch
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100329/ecf8f77d/attachment.obj>


More information about the wine-patches mailing list