Hi Tomasz.
Welcome to Wine.
You already fixed your missing real name in your first patch. That is good, but there are more suggestions.
For applications which uses EnumICMProfiles to detect monitor icc profile, there should be a copy of monitor profile in windows\system32\spool\drivers\color\monitor.icc. If there is no monitor.icc in this directory, application works the same as if there were no color management enabled (but image is displayed ok).
A description for the issue is a good idea.
INT WINAPI EnumICMProfilesA(HDC hdc, ICMENUMPROCA func, LPARAM lparam) { FIXME("%p, %p, 0x%08lx stub\n", hdc, func, lparam);
- return -1;
- (*func)("C:
\windows\system32\spool\drivers\color\monitor.icc",lparam);
- FIXME("partially fixed: force C:
\windows\system32\spool\drivers\color\monitor.icc\n");
- return 1;
}
What you wrote in your patch is a hack and hacks are missing the code quality to be accepted in Wine.
Wine development is test driven. You should add some tests for this function and try to invent a real implementation, which match the tests.
- Does this function handle a NULL parameter for hdc and/or for func? (If a NULL produce a crash on Windows, there is no need to check for a NULL in the implementation in Wine) - What does the function return, when the directory does not exist or when there are no icc profiles in the directory? - A HDC for a window on the monitor is not the only type for an HDC. (memory, printers, metafiles) Implementing all possible types is not a requirement (as long, as an app does not need it), but the usual way in Wine is at least printing a FIXME for the unimplemented part of the API. - There are usable API functions, to get the icc profile path. - Reading the directory and calling the user func for every file is not very difficult, as wine has examples in the source.
You can ask for help for the implementation or for the tests on wine-devel or use #winehackers on freenode. There is has also http://testbot.winehq.org and later http://tests.winehq.org
INT WINAPI EnumICMProfilesW(HDC hdc, ICMENUMPROCW func, LPARAM
...
- (*func)("C:
\windows\system32\spool\drivers\color\monitor.icc",lparam);
Providing an ANSI Path to a UNICODE callback will never work.
/********************************************************************** diff --git a/dlls/mscms/transform.c b/dlls/mscms/transform.c
This is a separate Patch
I know, that the starting step is not easy, but once you contributed successfully to Wine, your Development results (patches) are much better.
Did you read http://wiki.winehq.org/DeveloperFaq and http://wiki.winehq.org/SubmittingPatches ? Overview: http://wiki.winehq.org/Developers