Skip to content

Commit

Permalink
Add tooltip to mipmap control in Starfield
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaldaien committed Sep 9, 2023
1 parent 4782ac7 commit e3e776a
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 18 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
23.9.9.x
23.9.10
=======
+ Added Mipmap LOD Bias control to Starfield for Steam users

23.9.9.x
========
[.6] + Added support for extended remastering to non-Steam version of Starfield
[.5] + Fixed reversal of meaning for INI_UTF8 and INI_UTF8NOBOM
Expand Down
46 changes: 29 additions & 17 deletions src/plugins/bethesda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,17 @@ bool SK_SF_PlugInCfg (void)
static std::string utf8VersionString =
SK_WideCharToUTF8 (SK_GetDLLVersionStr (SK_GetHostApp ()));

if (ImGui::CollapsingHeader(utf8VersionString.data(), ImGuiTreeNodeFlags_DefaultOpen))
if (ImGui::CollapsingHeader (utf8VersionString.data (), ImGuiTreeNodeFlags_DefaultOpen))
{
ImGui::PushStyleColor(ImGuiCol_Header, ImVec4(0.90f, 0.40f, 0.40f, 0.45f));
ImGui::PushStyleColor(ImGuiCol_HeaderHovered, ImVec4(0.90f, 0.45f, 0.45f, 0.80f));
ImGui::PushStyleColor(ImGuiCol_HeaderActive, ImVec4(0.87f, 0.53f, 0.53f, 0.80f));
ImGui::TreePush("");
ImGui::PushStyleColor (ImGuiCol_Header, ImVec4 (0.90f, 0.40f, 0.40f, 0.45f));
ImGui::PushStyleColor (ImGuiCol_HeaderHovered, ImVec4 (0.90f, 0.45f, 0.45f, 0.80f));
ImGui::PushStyleColor (ImGuiCol_HeaderActive, ImVec4 (0.87f, 0.53f, 0.53f, 0.80f));
ImGui::TreePus h("");

Check failure on line 62 in src/plugins/bethesda.cpp

View workflow job for this annotation

GitHub Actions / Build (Release, x64)

ImGui::TreePus h(""); [D:\a\SpecialK\SpecialK\SpecialK.vcxproj]

Check failure on line 62 in src/plugins/bethesda.cpp

View workflow job for this annotation

GitHub Actions / Build (Release, x64)

^ [D:\a\SpecialK\SpecialK\SpecialK.vcxproj]

Check failure on line 62 in src/plugins/bethesda.cpp

View workflow job for this annotation

GitHub Actions / Build (Release, x64)

ImGui::TreePus h(""); [D:\a\SpecialK\SpecialK\SpecialK.vcxproj]

Check failure on line 62 in src/plugins/bethesda.cpp

View workflow job for this annotation

GitHub Actions / Build (Release, x64)

^ [D:\a\SpecialK\SpecialK\SpecialK.vcxproj]

if (ImGui::CollapsingHeader ("Render Quality", ImGuiTreeNodeFlags_DefaultOpen))
{
bool changed = false;
bool changed = false;
bool changed_no_restart_needed = false;

ImGui::TreePush ("");
changed |= ImGui::Checkbox ("Upgrade Base RTs to 16-bpc color", &bRemasterBasicRTs);
Expand All @@ -82,21 +83,33 @@ bool SK_SF_PlugInCfg (void)

if (pfMipBias != nullptr)
{
changed |=
changed_no_restart_needed |=
ImGui::SliderFloat ("Mipmap Bias", pfMipBias, -5.f, 5.f, "%.1f", 0.1f);

if (ImGui::IsItemHovered ())
{
ImGui::SetTooltip ("A negative bias is potentially required when using FSR/DLSS");
}
}

ImGui::TreePop ();

static bool restart_needed = false;

if (changed)
if (changed || changed_no_restart_needed)
{
restart_needed = true;
if (changed)
restart_needed = true;

__SK_SF_BasicRemastering->store (bRemasterBasicRTs);
__SK_SF_ExtendedRemastering->store (bRemasterExtendedRTs);

if (pfMipBias != nullptr)
{
sf_MipBias->store (*pfMipBias);
gameCustom_ini->write ();
}

extern iSK_INI *dll_ini;
dll_ini->write ();
}
Expand All @@ -117,25 +130,24 @@ bool SK_SF_PlugInCfg (void)
{
ImGui::TreePush("");

changed |= ImGui::SliderFloat("1st Person FOV", pf1stFOV, 1, 120, "%.0f");
changed |= ImGui::SliderFloat("3rd Person FOV", pf3rdFOV, 1, 120, "%.0f");
changed |= ImGui::SliderFloat ("1st Person FOV", pf1stFOV, 1, 120, "%.0f");
changed |= ImGui::SliderFloat ("3rd Person FOV", pf3rdFOV, 1, 120, "%.0f");

ImGui::TreePop();
}

if (changed)
{
sf_1stFOV->store (*pf1stFOV);
sf_3rdFOV->store (*pf3rdFOV);
sf_MipBias->store (*pfMipBias);
sf_1stFOV->store (*pf1stFOV);
sf_3rdFOV->store (*pf3rdFOV);

gameCustom_ini->write ();
}
}

ImGui::Separator();
ImGui::PopStyleColor(3);
ImGui::TreePop();
ImGui::Separator ( );
ImGui::PopStyleColor (3);
ImGui::TreePop ( );
}

return true;
Expand Down

0 comments on commit e3e776a

Please sign in to comment.