[Window]: Apply console safearea for stock game only.

This commit is contained in:
JerryALT 2024-03-29 20:33:53 +03:00
parent 0291c1be3e
commit 975d170e5b

View File

@ -326,6 +326,21 @@ namespace Components
if (adjustedRealWidth > viewportWidth) if (adjustedRealWidth > viewportWidth)
adjustedRealWidth = viewportWidth; adjustedRealWidth = viewportWidth;
float safeAreaRatioHorz = 0.0f;
float safeAreaRatioVert = 0.0f;
if (Game::HasLoadedMod())
{
safeAreaRatioHorz = 1.0f;
safeAreaRatioVert = 1.0f;
}
else
{
safeAreaRatioHorz = Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_horizontal->current.value;
safeAreaRatioVert = Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_horizontal->current.value;
}
Window::ScrPlace_CalcSafeAreaOffsets( Window::ScrPlace_CalcSafeAreaOffsets(
scrPlace->realViewableMin, scrPlace->realViewableMin,
scrPlace->realViewableMax, scrPlace->realViewableMax,
@ -334,8 +349,8 @@ namespace Components
viewportWidth, viewportWidth,
viewportHeight, viewportHeight,
viewportWidth / adjustedRealWidth, viewportWidth / adjustedRealWidth,
Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_horizontal->current.value, safeAreaRatioHorz,
Dvars::console_menu_style->current.enabled ? 0.85f : Dvars::safeArea_vertical->current.value, safeAreaRatioVert,
scrPlace->virtualViewableMin, scrPlace->virtualViewableMin,
scrPlace->virtualViewableMax, scrPlace->virtualViewableMax,
viewportWidth, viewportWidth,