[0.4.11][OPENGL32] Remove Err Log Spam from wglMakeCurrent in nominal cases (#3096) CORE-17224

The log-spam was triggered at end of 2nd stage and within some games.

fix picked from commit 0.4.15-dev-655-g ba006b3d49
This commit is contained in:
Joachim Henze 2022-10-07 18:17:32 +02:00
parent c233696e9b
commit 634d47d322

View file

@ -742,9 +742,13 @@ BOOL WINAPI wglMakeCurrent(HDC hdc, HGLRC hglrc)
else
{
/* Winetest conformance */
if (GetObjectType( hdc ) != OBJ_DC && GetObjectType( hdc ) != OBJ_MEMDC)
DWORD objType = GetObjectType(hdc);
if (objType != OBJ_DC && objType != OBJ_MEMDC)
{
ERR( "Error: hdc is not a DC handle!\n");
if (hdc)
{
ERR("hdc (%p) is not a DC handle (ObjectType: %d)!\n", hdc, objType);
}
SetLastError( ERROR_INVALID_HANDLE );
return FALSE;
}