mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-05 11:44:53 +01:00
Reworked booleans
This commit is contained in:
parent
8abd24ca54
commit
2fe5e90294
7 changed files with 16 additions and 17 deletions
|
|
@ -11,9 +11,7 @@
|
|||
|
||||
#include <GL/glew.h>
|
||||
|
||||
#pragma comment(lib, "opengl32")
|
||||
#pragma comment(lib, "glew32s")
|
||||
|
||||
#include "steam_overlay.h"
|
||||
|
||||
// This is created by OpenGL_Hook::Create, and deleted by the Hook_Manager if not used
|
||||
static OpenGL_Hook* hook;
|
||||
|
|
@ -22,13 +20,14 @@ void OpenGL_Hook::hook_ogl()
|
|||
{
|
||||
if (!_hooked)
|
||||
{
|
||||
_hooked = true;
|
||||
Hook_Manager::Inst().FoundRenderer(this);
|
||||
Hook_Manager::Inst().FoundHook(this);
|
||||
|
||||
GLenum err = glewInit();
|
||||
|
||||
if (err == GLEW_OK)
|
||||
{
|
||||
_hooked = true;
|
||||
PRINT_DEBUG("Hooked OpenGL\n");
|
||||
UnhookAll();
|
||||
BeginHook();
|
||||
|
|
@ -42,7 +41,6 @@ void OpenGL_Hook::hook_ogl()
|
|||
PRINT_DEBUG("Failed to hook OpenGL\n");
|
||||
/* Problem: glewInit failed, something is seriously wrong. */
|
||||
PRINT_DEBUG("Error: %s\n", glewGetErrorString(err));
|
||||
_hooked = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -115,7 +113,6 @@ OpenGL_Hook::OpenGL_Hook():
|
|||
wglSwapBuffers(nullptr)
|
||||
{
|
||||
_dll = GetModuleHandle(DLL_NAME);
|
||||
_hooked = false;
|
||||
// Hook to wglMakeCurrent so we know when it gets called.
|
||||
// If its called, then OpenGL will be used to render the overlay.
|
||||
wglMakeCurrent = (decltype(wglMakeCurrent))GetProcAddress(_dll, "wglMakeCurrent");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue