[dinput] regression c17e06d5c0e456d3052a1b6de688956f87c59d3e: No need to copy default constant format. Use already defined static instead

Vitaliy Margolen wine-devel at kievinfo.com
Wed Dec 20 11:27:52 CST 2006


Christoph Frick wrote:
> The old code copied the default constant format and applied
> caclulate_ids on it. So the dwTypes where set with proper
> MAKEINSTANCE(...) calls. So an app, that requested later its own data
> format with SetDataFormat using the data from EnumObjects. After the
> change now the default const has ANY_INSTANCE all over the place but the
> app request a certain instance - so on SetDataFormat there are no
> matches.
> 
> So the big question is: is our SetDataFormat wrong or is this patch
> wrong? Please advice.
> 
I know about this problem. The test I added actually has that sort of
custom data format. The thing is, I'm not sure yet how to fix this
properly. I don't want to just copy default data format, modify it and
use it as internal format. This is only one place that needs to be
fixed. But there are several other areas that need this data format
with some additional requirements.

The biggest problem is we don't properly "initialize" device. We should
create our own data format structure that has only found objects. So we
don't need to do it over and over again in EnumObjects or GetObjectInfo.

Also, because we create user format during device creation, we can not
check if user actually set data format.

Vitaliy Margolen.



More information about the wine-devel mailing list