On Sat, Feb 02, 2008 at 05:43:27PM +0000, Andrew Talbot wrote:
Changelog: winex11.drv: Use bitwise NOT not logical NOT.
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index d68b674..2cd36c7 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -369,10 +369,10 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, devmode->dmBitsPerPel,devmode->dmDisplayFrequency, handler_name);
dwBpp = devmode->dmBitsPerPel;
if (devmode->dmFields & DM_BITSPERPEL) def_mode &= !dwBpp;
if (devmode->dmFields & DM_PELSWIDTH) def_mode &= !devmode->dmPelsWidth;
if (devmode->dmFields & DM_PELSHEIGHT) def_mode &= !devmode->dmPelsHeight;
if (devmode->dmFields & DM_DISPLAYFREQUENCY) def_mode &= !devmode->dmDisplayFrequency;
if (devmode->dmFields & DM_BITSPERPEL) def_mode &= ~dwBpp;
if (devmode->dmFields & DM_PELSWIDTH) def_mode &= ~devmode->dmPelsWidth;
if (devmode->dmFields & DM_PELSHEIGHT) def_mode &= ~devmode->dmPelsHeight;
if (devmode->dmFields & DM_DISPLAYFREQUENCY) def_mode &= ~devmode->dmDisplayFrequency;
I do not think this is right, def_mode is a boolean and we actually check for not-0-being of various struct members.
Ciao, Marcus
Marcus Meissner wrote:
On Sat, Feb 02, 2008 at 05:43:27PM +0000, Andrew Talbot wrote:
Changelog: winex11.drv: Use bitwise NOT not logical NOT.
diff --git a/dlls/winex11.drv/settings.c b/dlls/winex11.drv/settings.c index d68b674..2cd36c7 100644 --- a/dlls/winex11.drv/settings.c +++ b/dlls/winex11.drv/settings.c @@ -369,10 +369,10 @@ LONG X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode, devmode->dmBitsPerPel,devmode->dmDisplayFrequency, handler_name);
dwBpp = devmode->dmBitsPerPel;
if (devmode->dmFields & DM_BITSPERPEL) def_mode &= !dwBpp;
if (devmode->dmFields & DM_PELSWIDTH) def_mode &= !devmode->dmPelsWidth;
if (devmode->dmFields & DM_PELSHEIGHT) def_mode &= !devmode->dmPelsHeight;
if (devmode->dmFields & DM_DISPLAYFREQUENCY) def_mode &= !devmode->dmDisplayFrequency;
if (devmode->dmFields & DM_BITSPERPEL) def_mode &= ~dwBpp;
if (devmode->dmFields & DM_PELSWIDTH) def_mode &= ~devmode->dmPelsWidth;
if (devmode->dmFields & DM_PELSHEIGHT) def_mode &= ~devmode->dmPelsHeight;
if (devmode->dmFields & DM_DISPLAYFREQUENCY) def_mode &= ~devmode->dmDisplayFrequency;
I do not think this is right, def_mode is a boolean and we actually check for not-0-being of various struct members.
Correct. What all that meant, is if app asks for something, but the value is 0, switch to default mode.
Also Andrew, have you actually ran tests to check of they still pass? Of course you need to run them in interactive mode: export WINETEST_INTERACTIVE=1
Vitaliy.
Vitaliy Margolen wrote:
Marcus Meissner wrote:
On Sat, Feb 02, 2008 at 05:43:27PM +0000, Andrew Talbot wrote:
Correct. What all that meant, is if app asks for something, but the value is 0, switch to default mode.
Yes. I wrongly mistook it to be a case of setting one group of flags in accordance with another. I should have looked more carefully.
Also Andrew, have you actually ran tests to check of they still pass? Of course you need to run them in interactive mode: export WINETEST_INTERACTIVE=1
No, I'm guilty again. Thanks for the advice.
-- Andy.
Marcus Meissner wrote:
I do not think this is right, def_mode is a boolean and we actually check for not-0-being of various struct members.
Ciao, Marcus
Hi Marcus,
You are correct. I should have studied the code more carefully.
Thanks,
-- Andy.