opengl32: fix wglCreateContextAttribsARB on nvidia

Roderick Colenbrander thunderbird2k at gmail.com
Tue Nov 24 04:05:37 CST 2009


On Tue, Nov 24, 2009 at 9:10 AM, Dmitry Timoshkov
<dmitry at codeweavers.com> wrote:
> "Roderick Colenbrander" <thunderbird2k at gmail.com> wrote:
>
>> +/* Nvidia converts win32 error codes to (0xc007 << 16) | win32_error_code
>> */
>> +#define NVIDIA_HRESULT_FROM_WIN32(x) (HRESULT_FROM_WIN32(x) | 0x40000000)
>
> Using MAKE_HRESULT() with appropriate severity and facility would be
> cleaner IMO.
>
> --
> Dmitry.
>

I looked at MAKE_HRESULT and tried things like:
MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, error_code) but this
results in codes like 0x8007xxxx because it only uses 1-bit for the
severity level (where ntstatus codes use bit30 for severity and bit31
for error). I wasn't able to find a MAKE_NTSTATUS, so perhaps there is
something else?

Roderick



More information about the wine-devel mailing list