Skip to content

Commit

Permalink
Merge pull request #10 from whohyno/main
Browse files Browse the repository at this point in the history
enable low textures + fix fonts reloading with default dpi value
  • Loading branch information
Viceroyy authored Aug 9, 2024
2 parents 2f751e3 + 850d4f1 commit 833e0b6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 34 deletions.
6 changes: 3 additions & 3 deletions Fusion/src/Features/Configs/Configs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ bool CConfigs::LoadConfig(const std::string& configName, bool bNotify)
}
}

H::Fonts.Reload();
H::Fonts.Reload(Vars::Menu::DPI.Map["default"]);

sCurrentConfig = configName; sCurrentVisuals = "";
if (bNotify)
Expand Down Expand Up @@ -486,7 +486,7 @@ bool CConfigs::LoadVisual(const std::string& configName, bool bNotify)
else LoadT(WindowBox_t, readTree)
}

H::Fonts.Reload();
H::Fonts.Reload(Vars::Menu::DPI.Map["default"]);

sCurrentVisuals = configName;
if (bNotify)
Expand Down Expand Up @@ -537,4 +537,4 @@ void CConfigs::RemoveConfig(const std::string& configName)
void CConfigs::RemoveVisual(const std::string& configName)
{
std::filesystem::remove(sVisualsPath + "\\" + configName + sConfigExtension);
}
}
4 changes: 2 additions & 2 deletions Fusion/src/Features/ImGui/Menu/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ void CMenu::MenuVisuals()
FSlider("Indicator font weight", Vars::Fonts::FONT_INDICATORS::nWeight, 0, 900, 100);

if (FButton("Apply fonts"))
H::Fonts.Reload();
H::Fonts.Reload(Vars::Menu::DPI.Map["default"]);
} EndSection();

EndTable();
Expand Down Expand Up @@ -2351,4 +2351,4 @@ void CMenu::Render()
}
else
mActives.clear();
}
}
14 changes: 0 additions & 14 deletions Fusion/src/Hooks/CBaseClient_Connect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,5 @@ MAKE_HOOK(CBaseClient_Connect, S::CBaseClient_Connect(), void, __fastcall,
{
F::Materials.ReloadMaterials();

/*if (Vars::Visuals::Other::ThePS2Inator.Value)
{
static auto r_lod = I::CVar->FindVar("r_lod");
static auto r_rootlod = I::CVar->FindVar("r_rootlod");
static auto mat_picmip = I::CVar->FindVar("mat_picmip");
if (r_lod)
r_lod->SetValue(7);
if (r_rootlod)
r_rootlod->SetValue(7);
if (mat_picmip)
mat_picmip->SetValue(4);
}*/

CALL_ORIGINAL(ecx, szName, nUserID, pNetChannel, bFakePlayer, clientChallenge);
}
16 changes: 1 addition & 15 deletions Fusion/src/Hooks/ViewRender_LevelInit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,5 @@ MAKE_HOOK(ViewRender_LevelInit, U::Memory.GetVFunc(I::ViewRender, 1), void, __fa
F::NoSpreadHitscan.Reset(true);
F::CheaterDetection.Reset();

/*if (Vars::Visuals::Other::ThePS2Inator.Value)
{
static auto r_lod = I::CVar->FindVar("r_lod");
static auto r_rootlod = I::CVar->FindVar("r_rootlod");
static auto mat_picmip = I::CVar->FindVar("mat_picmip");
if (r_lod)
r_lod->SetValue(7);
if (r_rootlod)
r_rootlod->SetValue(7);
if (mat_picmip)
mat_picmip->SetValue(4);
}*/

CALL_ORIGINAL(ecx);
}
}

0 comments on commit 833e0b6

Please sign in to comment.