mirror of
https://github.com/reactos/reactos.git
synced 2024-11-03 21:34:00 +00:00
Handle return value 0 from ExtEscape as special case (means to use the default driver)
svn path=/trunk/; revision=10177
This commit is contained in:
parent
13bc74184a
commit
1bd5f9a981
1 changed files with 9 additions and 6 deletions
|
@ -291,18 +291,21 @@ ROSGL_ICDForHDC( HDC hdc )
|
|||
/* get driver name */
|
||||
ret = ExtEscape( hdc, EXT_GET_DRIVERINFO, sizeof (dwInput), (LPCSTR)&dwInput,
|
||||
sizeof (EXTDRIVERINFO), (LPSTR)&info );
|
||||
if (ret < 0)
|
||||
if (ret <= 0)
|
||||
{
|
||||
HKEY hKey;
|
||||
DWORD type, size;
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
DBGPRINT( "Warning: ExtEscape to get the drivername failed!!! (%d)", GetLastError() );
|
||||
if (MessageBox( WindowFromDC( hdc ), L"Couldn't get installable client driver name!\nUsing default driver.",
|
||||
L"OPENGL32.dll: Warning", MB_OKCANCEL | MB_ICONWARNING ) == IDCANCEL)
|
||||
{
|
||||
SetLastError( ret );
|
||||
SetLastError( 0 );
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* open registry key */
|
||||
ret = RegOpenKeyExW( HKEY_LOCAL_MACHINE, OPENGL_DRIVERS_SUBKEY, 0, KEY_READ, &hKey );
|
||||
|
|
Loading…
Reference in a new issue