projects
/
reactos.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e692c0d
)
[0.4.9][OPENGL32] Remove Err Log Spam from wglMakeCurrent in nominal cases (#3096...
author
Joachim Henze
<Joachim.Henze@reactos.org>
Fri, 7 Oct 2022 16:18:57 +0000
(18:18 +0200)
committer
Joachim Henze
<Joachim.Henze@reactos.org>
Fri, 7 Oct 2022 16:18:57 +0000
(18:18 +0200)
The log-spam was triggered at end of 2nd stage and within some games.
fix picked from commit 0.4.15-dev-655-g
ba006b3d497cade418ceae0d3fb4686d9eab3102
dll/opengl/opengl32/wgl.c
patch
|
blob
|
history
diff --git
a/dll/opengl/opengl32/wgl.c
b/dll/opengl/opengl32/wgl.c
index
a8547c1
..
99c2dde
100644
(file)
--- a/
dll/opengl/opengl32/wgl.c
+++ b/
dll/opengl/opengl32/wgl.c
@@
-735,9
+735,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;
}