mirror of
https://github.com/djhackersdev/bemanitools.git
synced 2026-04-25 23:37:54 -05:00
jbhook: make errors right-side-up as well
This commit is contained in:
parent
ba2016b5bc
commit
0f2828da40
|
|
@ -27,6 +27,8 @@ static void (__stdcall *real_glFlush)(void);
|
||||||
static void hook_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
static void hook_glBindFramebufferEXT(GLenum target, GLuint framebuffer);
|
||||||
static void (*real_glBindFramebufferEXT)(GLenum target, GLuint framebuffer);
|
static void (*real_glBindFramebufferEXT)(GLenum target, GLuint framebuffer);
|
||||||
|
|
||||||
|
static void hook_infodispcore_set_angle(void* this, int angle);
|
||||||
|
|
||||||
static const struct hook_symbol jbhook1_opengl_hook_syms[] = {
|
static const struct hook_symbol jbhook1_opengl_hook_syms[] = {
|
||||||
{.name = "glFlush",
|
{.name = "glFlush",
|
||||||
.patch = hook_glFlush,
|
.patch = hook_glFlush,
|
||||||
|
|
@ -39,6 +41,12 @@ static const struct hook_symbol jbhook1_glhelper_hook_syms[] = {
|
||||||
.link = (void **) &real_glBindFramebufferEXT},
|
.link = (void **) &real_glBindFramebufferEXT},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// on knit/copious, this gives us right-side-up errors, too!
|
||||||
|
static const struct hook_symbol jbhook_infodisp_hook_syms[] = {
|
||||||
|
{.name = "?set_angle@infodispcore@@QAEXH@Z",
|
||||||
|
.patch = hook_infodispcore_set_angle},
|
||||||
|
};
|
||||||
|
|
||||||
static DWORD STDCALL my_GetGlyphOutline(
|
static DWORD STDCALL my_GetGlyphOutline(
|
||||||
HDC hdc,
|
HDC hdc,
|
||||||
UINT uChar,
|
UINT uChar,
|
||||||
|
|
@ -117,9 +125,19 @@ void jbhook_util_gfx_install_vertical_hooks(void) {
|
||||||
jbhook1_glhelper_hook_syms,
|
jbhook1_glhelper_hook_syms,
|
||||||
lengthof(jbhook1_glhelper_hook_syms));
|
lengthof(jbhook1_glhelper_hook_syms));
|
||||||
|
|
||||||
|
hook_table_apply(
|
||||||
|
NULL,
|
||||||
|
"infodisp.dll",
|
||||||
|
jbhook_infodisp_hook_syms,
|
||||||
|
lengthof(jbhook_infodisp_hook_syms));
|
||||||
|
|
||||||
log_info("Inserted vertical display hooks");
|
log_info("Inserted vertical display hooks");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void hook_infodispcore_set_angle(void* this, int angle) {
|
||||||
|
// ignore
|
||||||
|
}
|
||||||
|
|
||||||
// Welcome to OpenGL land! There is a ton of boilerplate needed here "just" to
|
// Welcome to OpenGL land! There is a ton of boilerplate needed here "just" to
|
||||||
// rotate the render output
|
// rotate the render output
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user