From 7272cae8bf367dc748a03a1dd6dd0a6e5eb28be9 Mon Sep 17 00:00:00 2001 From: raphael123333 <136315646+raphael123333@users.noreply.github.com> Date: Mon, 26 Jun 2023 15:28:13 +0200 Subject: [PATCH] fix freeze Some computers have rendering issues in menus, console and connect/map loading screen. It is unplayable. Maybe it is because of OpenGL 4.0 and Intel HD Graphics. --- hook.cpp | 2 ++ render.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/hook.cpp b/hook.cpp index 7bea7d2..12fcf38 100644 --- a/hook.cpp +++ b/hook.cpp @@ -112,6 +112,7 @@ bool apply_hooks() { __call(0x4D87F5, (int)RB_ShowImages); __nop(0x4D87F0, 5); //cmp and jz for r_showImages->integer + /* void __stdcall RB_BeginSurface(); // crashes? __call(0x4D4A2C, (int)RB_BeginSurface); __call(0x4D6886, (int)RB_BeginSurface); @@ -133,6 +134,7 @@ bool apply_hooks() { __call(0x511067, (int)RB_BeginSurface); __call(0x511D85, (int)RB_BeginSurface); __call(0x51269B, (int)RB_BeginSurface); + */ void* ri_Hunk_AllocAlign(int size); XUNLOCK((void*)0x4FD6AF, 6); diff --git a/render.cpp b/render.cpp index 1398ec9..8db3e69 100644 --- a/render.cpp +++ b/render.cpp @@ -334,6 +334,7 @@ void APIENTRY qglBindTexture(GLenum target, GLuint texture) { glBindTexture(target, texture); } +/* void __stdcall RB_BeginSurface() { shader_t* shader; __asm { @@ -353,6 +354,7 @@ void __stdcall RB_BeginSurface() { } call(); } +*/ static GLfloat rot = 0.0; static time_t rot_time = 0;