Skip to content

Commit

Permalink
Fix button guide image in games with custom keymap
Browse files Browse the repository at this point in the history
Gravity Rush now shows correct overriden keymap.
  • Loading branch information
nowrep committed Sep 30, 2017
1 parent 0d19c72 commit 4072778
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,20 @@ struct RPJob {
int mode;
};

struct S1 {
char padding[141];
char image_loaded;
};

static tai_hook_ref_t ref_hook0;
static int load_keymap_image_patched(void *a1, int a2)
static int load_keymap_image_patched(struct S1 *a1, int a2)
{
a1->image_loaded = 0;
return TAI_CONTINUE(int, ref_hook0, a1, keymap_number);
}

static tai_hook_ref_t ref_hook1;
static int update_rp_parameters_patched(struct RPJob *a1, int a2)
static int update_rp_parameters_patched(struct RPJob *a1, int *a2)
{
int out = TAI_CONTINUE(int, ref_hook1, a1, a2);
a1->mode = keymap_number;
Expand Down

0 comments on commit 4072778

Please sign in to comment.