Skip to content

Commit

Permalink
FF7: Prevent input configuration corruption on Steam edition (julianx…
Browse files Browse the repository at this point in the history
  • Loading branch information
maciej-trebacz authored Mar 31, 2024
1 parent ce4d848 commit 602cd14
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
- Rendering: Fix wrong rendering for battle limit boxes when using transparency. Usually notices while using ESUI or FFNx default hext files.
- Rendering: Fix wrong rendering for overlapping message boxes. Usually noticed while using custom mods like SYW UI or Kactuar.

## FF7 Steam

- Input: Prevent input configuration corruption after starting a new game and entering the Config menu ( https://github.com/julianxhokaxhiu/FFNx/pull/683 )

## FF8

- Fix crash when some text windows are opening in worldmap on Spanish and Italian versions ( https://github.com/julianxhokaxhiu/FFNx/pull/682/files )
Expand Down
1 change: 1 addition & 0 deletions src/ff7.h
Original file line number Diff line number Diff line change
Expand Up @@ -2912,6 +2912,7 @@ struct ff7_externals
uint32_t sound_operation;
struct ff7_field_sfx_state* sound_states;
uint32_t config_menu_sub;
uint32_t config_initialize;
uint32_t call_menu_sound_slider_loop_sfx_up;
uint32_t call_menu_sound_slider_loop_sfx_down;
uint32_t menu_start;
Expand Down
2 changes: 2 additions & 0 deletions src/ff7_data.h
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,8 @@ void ff7_find_externals(struct ff7_game_obj* game_object)
ff7_externals.config_menu_sub = ff7_externals.menu_subs_call_table[8];
ff7_externals.menu_sub_6FEDB0 = ff7_externals.menu_subs_call_table[10];

ff7_externals.config_initialize = get_relative_call(main_init_loop, 0x4B0);

ff7_externals.menu_tutorial_window_state = (BYTE*)get_absolute_value((uint32_t)ff7_externals.menu_tutorial_sub_6C49FD, 0x9);
ff7_externals.menu_tutorial_window_text_ptr = (DWORD*)get_absolute_value((uint32_t)ff7_externals.menu_tutorial_sub_6C49FD, 0x18);

Expand Down
3 changes: 3 additions & 0 deletions src/ff7_opengl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,9 @@ void ff7_init_hooks(struct game_obj *_game_object)
replace_function(ff7_externals.set_default_input_settings_save, noop);
replace_function(ff7_externals.keyboard_name_input, noop);
replace_function(ff7_externals.restore_input_settings, noop);

// Patch the default config bitmask so that "Customize" controller option is enabled by default
memset_code(ff7_externals.config_initialize + 0x36, 0x45, 1);
}

//###############################
Expand Down

0 comments on commit 602cd14

Please sign in to comment.