Skip to content

Commit

Permalink
inject: Better describe GDI behavior.
Browse files Browse the repository at this point in the history
Fixes d77e180.

Thanks to Jesse Natalie for helping me to better understand what's going
on.
  • Loading branch information
jrfonseca committed Apr 4, 2021
1 parent 424f69a commit cf88103
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inject/injectee_iat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -965,13 +965,13 @@ MyLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
BOOL bLoaded = FALSE;

/*
* XXX: On Windows 10 GDI's ChoosePixelFormat calls
* XXX: GDI's DescribePixelFormat does
*
* HMODULE hModule = LoadLibraryExA("OPENGL32", 0, 0)
* GetProcAddress(hModule, "wglDescribePixelFormat")
* MyFreeLibrary(hModule)
*
* over and over again, possibly for every pixel format, and we end up
* And GLFW3 calls it for every existing pixel format, and we end up
* spending an eternity inside Tool Help Library functions. To avoid this,
* we try to detect when loading an existing library and do nothing.
*
Expand Down

0 comments on commit cf88103

Please sign in to comment.