Skip to content

Commit

Permalink
update for 1.61hf1
Browse files Browse the repository at this point in the history
  • Loading branch information
jackhumbert committed Feb 2, 2023
1 parent a48eda8 commit 0e8831f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,11 @@ public class ModStngsSelectorControllerListInt extends SettingsSelectorControlle
if !value.ListHasDisplayValues() {
inkTextRef.SetText(this.m_ValueText, IntToString(value.GetValue()));
} else {
inkTextRef.SetText(this.m_ValueText, ToString(value.GetDisplayValue(index)));
let text = GetLocalizedTextByKey(value.GetDisplayValue(index));
if StrLen(text) == 0 {
text = ToString(value.GetDisplayValue(index));
};
inkTextRef.SetText(this.m_ValueText, text);
};
this.SelectDot(index);
}
Expand Down
Binary file modified build/red4ext/plugins/mod_settings/mod_settings.dll
Binary file not shown.
7 changes: 4 additions & 3 deletions src/red4ext/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ void __fastcall ProcessModSettings(ScriptData * scriptData) {

// 1.6 RVA: 0x273D50
// 1.61 RVA: 0x274300
// 1.62 RVA: 0x274380
// 48 89 5C 24 08 48 89 74 24 10 57 48 83 EC 20 48 8B D9 E8 99 0B 00 00 48 8D 8B 38 01 00 00 FF 15
void *__fastcall ReleaseScriptData(ScriptData *scriptData);
constexpr uintptr_t ReleaseScriptDataAddr = 0x274300;
constexpr uintptr_t ReleaseScriptDataAddr = 0x274380;
decltype(&ReleaseScriptData) ReleaseScriptData_Original;

void *__fastcall ReleaseScriptData(ScriptData *scriptData) {
Expand All @@ -108,7 +109,7 @@ RED4EXT_C_EXPORT bool RED4EXT_CALL Main(RED4ext::PluginHandle aHandle, RED4ext::
sdk = aSdk;
pluginHandle = aHandle;

aSdk->logger->Info(aHandle, "Starting up Mod Settings v0.0.9");
aSdk->logger->Info(aHandle, "Starting up Mod Settings v0.0.11");
RED4ext::RTTIRegistrator::Add(ModSettings::RegisterTypes, ModSettings::PostRegisterTypes);

while (!aSdk->hooking->Attach(aHandle, RED4EXT_OFFSET_TO_ADDR(ReleaseScriptDataAddr), &ReleaseScriptData,
Expand All @@ -135,7 +136,7 @@ RED4EXT_C_EXPORT bool RED4EXT_CALL Main(RED4ext::PluginHandle aHandle, RED4ext::
RED4EXT_C_EXPORT void RED4EXT_CALL Query(RED4ext::PluginInfo *aInfo) {
aInfo->name = L"Mod Settings";
aInfo->author = L"Jack Humbert";
aInfo->version = RED4EXT_SEMVER(0, 0, 9);
aInfo->version = RED4EXT_SEMVER(0, 0, 11);
aInfo->runtime = RED4EXT_RUNTIME_LATEST;
aInfo->sdk = RED4EXT_SDK_LATEST;
}
Expand Down

0 comments on commit 0e8831f

Please sign in to comment.