Ejemplo n.º 1
0
void UndetourOpenGL32(bool remove)
{
  auto& module = GetOpenGL32Module();
  auto& helper = GetHelperInterface();
  if (helper.CommonUndetourModule(L"OpenGL32", module))
  {
    UndetourFunc(L"wglSwapBuffers", GetWglSwapBuffersDetour(), remove);

    module = std::make_pair(nullptr, 0);
  }
}
Ejemplo n.º 2
0
void DetourOpenGL32(HMODULE base)
{
  auto const& process = GetThisProcess();
  auto& module = GetOpenGL32Module();
  auto& helper = GetHelperInterface();
  if (helper.CommonDetourModule(process, L"OpenGL32", base, module))
  {
    DetourFunc(process,
               base,
               "wglSwapBuffers",
               GetWglSwapBuffersDetour(),
               WglSwapBuffersDetour);
  }
}