Skip to content

Commit

Permalink
UIScaling: fix rival marker position during online/LAN
Browse files Browse the repository at this point in the history
also change UIScalingMode = 1 to the default
  • Loading branch information
emoose committed Aug 7, 2024
1 parent 81b45c2 commit 4650516
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OutRun2006Tweaks.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ SingleCoreAffinity = false
# 1 = fixed UI scaling without stretching, based on Outrun Online Arcade
# 2 = 4:3 UI centered to middle of screen
# Outrun Online Arcade scaling required many manual code changes, please let me know if you notice anything broken!
UIScalingMode = 0
UIScalingMode = 1

# Adds 4:3 letterboxing to game menus, to address some graphical issues outside of the menus 4:3 display
# 0 = disable all letterboxing
Expand Down
6 changes: 5 additions & 1 deletion src/hooks_uiscaling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ class UIScaling : public Hook

static inline SafetyHookMid NaviPub_Disp_RivalDisableScaling_hk{};
static inline SafetyHookMid NaviPub_Disp_RivalEnableScaling_hk{};
static inline SafetyHookMid NaviPub_Disp_RivalOnlineDisableScaling_hk{};
static inline SafetyHookMid NaviPub_Disp_RivalOnlineEnableScaling_hk{};

static inline SafetyHookMid ctrl_icon_work_AdjustPosition_hk{};
static void ctrl_icon_work_AdjustPosition(safetyhook::Context& ctx)
Expand Down Expand Up @@ -514,8 +516,10 @@ class UIScaling : public Hook
NaviPub_Disp_C2CFruitDisableScaling_hk = safetyhook::create_mid((void*)0x481A86, SpriteSpacingDisable);
NaviPub_Disp_C2CFruitEnableScaling_hk = safetyhook::create_mid((void*)0x481A8B, SpriteSpacingEnable);

NaviPub_Disp_RivalDisableScaling_hk = safetyhook::create_mid((void*)0x4BEBAA, SpriteSpacingDisable);
NaviPub_Disp_RivalDisableScaling_hk = safetyhook::create_mid((void*)0x4BEB8E, SpriteSpacingDisable);
NaviPub_Disp_RivalEnableScaling_hk = safetyhook::create_mid((void*)0x4BEBAF, SpriteSpacingEnable);
NaviPub_Disp_RivalOnlineDisableScaling_hk = safetyhook::create_mid((void*)0x4BEC83, SpriteSpacingDisable);
NaviPub_Disp_RivalOnlineEnableScaling_hk = safetyhook::create_mid((void*)0x4BEC88, SpriteSpacingEnable);

// dispMarkerCheck is called by all three rival-marker functions, hopefully can fix them all
dispMarkerCheck_SpriteScalingDisable_hk = safetyhook::create_mid((void*)0x4BA0E0, SpriteSpacingDisable);
Expand Down
4 changes: 2 additions & 2 deletions src/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
#endif

#define MODULE_VERSION_MAJOR 0
#define MODULE_VERSION_MINOR 4
#define MODULE_VERSION_BUILD 3
#define MODULE_VERSION_MINOR 5
#define MODULE_VERSION_BUILD 0
#define MODULE_VERSION_REVISION 0

#define STR(value) #value
Expand Down

0 comments on commit 4650516

Please sign in to comment.