Help! How to Change the Contents of a Method.

AmateurHacker

Platinian
public System.Void SetFoldScreen(System.Int32 width, System.Int32 hight);



MY HOOK

void (*SetFoldScreen)(void* instance,int width, int hight);
bool TransparentGameplay;


void (*old_ScreenAdapt)(void* instance);
void new_ScreenAdapt(void* instance) {
if (instance != NULL && TransparentGameplay) {

SetFoldScreen(instance,1920,1080);



}
old_ScreenAdapt(instance);
}

The update works fine and the method is called. But the game crashes. What am I doing wrong? I want to set the height to 1920 and the width to 1080.
 
Back
Top Bottom