mirror of
https://github.com/HarbourMasters/Starship.git
synced 2025-04-28 12:27:59 +03:00
Bump LUS (#190)
Some checks are pending
GenerateBuilds / generate-port-o2r (push) Waiting to run
GenerateBuilds / build-windows (push) Blocked by required conditions
GenerateBuilds / build-macos (push) Blocked by required conditions
GenerateBuilds / build-linux (push) Blocked by required conditions
GenerateBuilds / build-switch (push) Blocked by required conditions
Some checks are pending
GenerateBuilds / generate-port-o2r (push) Waiting to run
GenerateBuilds / build-windows (push) Blocked by required conditions
GenerateBuilds / build-macos (push) Blocked by required conditions
GenerateBuilds / build-linux (push) Blocked by required conditions
GenerateBuilds / build-switch (push) Blocked by required conditions
* Bump LUS * Disabled shader-based linear conversion on metal * Fixed missing mInterpolationIndex * Bump LUS --------- Co-authored-by: KiritoDv <kiritodev01@gmail.com>
This commit is contained in:
parent
9fc9b3cf80
commit
4c3fc8fd76
10 changed files with 61 additions and 62 deletions
|
@ -1 +1 @@
|
||||||
Subproject commit ec63c7390050c452b34c3f78be7499f88fae2636
|
Subproject commit 1a8a2f70d1a2624130a40baa7f8b0ce522314553
|
|
@ -147,17 +147,6 @@ float random(float3 value) {
|
||||||
return fract(sin(random) * 143758.5453);
|
return fract(sin(random) * 143758.5453);
|
||||||
}
|
}
|
||||||
|
|
||||||
float4 fromLinear(float4 linearRGB) {
|
|
||||||
float3 threshold = float3(0.0031308);
|
|
||||||
float3 gamma = float3(1.0 / 2.4);
|
|
||||||
float3 scale = float3(12.92);
|
|
||||||
float3 offset = float3(1.055);
|
|
||||||
float3 subtract = float3(0.055);
|
|
||||||
float3 higher = offset * fast::pow(linearRGB.xyz, gamma) - subtract;
|
|
||||||
float3 lower = linearRGB.xyz * scale;
|
|
||||||
return float4(select(higher, lower, linearRGB.xyz < threshold), linearRGB.w);
|
|
||||||
}
|
|
||||||
|
|
||||||
fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUniforms &frameUniforms [[buffer(0)]]
|
fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUniforms &frameUniforms [[buffer(0)]]
|
||||||
@if(o_textures[0])
|
@if(o_textures[0])
|
||||||
, texture2d<float> uTex0 [[texture(0)]], sampler uTex0Smplr [[sampler(0)]]
|
, texture2d<float> uTex0 [[texture(0)]], sampler uTex0Smplr [[sampler(0)]]
|
||||||
|
@ -288,8 +277,8 @@ fragment float4 fragmentShader(ProjectedVertex in [[stage_in]], constant FrameUn
|
||||||
@if(o_invisible)
|
@if(o_invisible)
|
||||||
texel.w = 0.0;
|
texel.w = 0.0;
|
||||||
@end
|
@end
|
||||||
return fromLinear(texel);
|
return texel;
|
||||||
@else
|
@else
|
||||||
return fromLinear(float4(texel, 1.0));
|
return float4(texel, 1.0);
|
||||||
@end
|
@end
|
||||||
}
|
}
|
|
@ -258,7 +258,7 @@ void Background_DrawStarfield(void) {
|
||||||
|
|
||||||
float originalWidth = currentScreenWidth / 3;
|
float originalWidth = currentScreenWidth / 3;
|
||||||
float originalAspect = originalWidth / (currentScreenHeight / 3);
|
float originalAspect = originalWidth / (currentScreenHeight / 3);
|
||||||
float renderMaskWidth = originalWidth * (OTRGetAspectRatio() / originalAspect);
|
float renderMaskWidth = originalWidth * (GameEngine_GetAspectRatio() / originalAspect);
|
||||||
float marginX = (currentScreenWidth - renderMaskWidth) / 2;
|
float marginX = (currentScreenWidth - renderMaskWidth) / 2;
|
||||||
float renderMaskHeight = currentScreenHeight / 3;
|
float renderMaskHeight = currentScreenHeight / 3;
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include "port/patches/DisplayListPatch.h"
|
#include "port/patches/DisplayListPatch.h"
|
||||||
#include "port/mods/PortEnhancements.h"
|
#include "port/mods/PortEnhancements.h"
|
||||||
|
|
||||||
#include <Fast3D/gfx_pc.h>
|
#include <Fast3D/interpreter.h>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
#ifdef __SWITCH__
|
#ifdef __SWITCH__
|
||||||
|
@ -453,14 +453,16 @@ void GameEngine::RunCommands(Gfx* Commands, const std::vector<std::unordered_map
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto interpreter = wnd->GetInterpreterWeak().lock().get();
|
||||||
|
|
||||||
// Process window events for resize, mouse, keyboard events
|
// Process window events for resize, mouse, keyboard events
|
||||||
wnd->HandleEvents();
|
wnd->HandleEvents();
|
||||||
|
|
||||||
gInterpolationIndex = 0;
|
interpreter->mInterpolationIndex = 0;
|
||||||
|
|
||||||
for (const auto& m : mtx_replacements) {
|
for (const auto& m : mtx_replacements) {
|
||||||
wnd->DrawAndRunGraphicsCommands(Commands, m);
|
wnd->DrawAndRunGraphicsCommands(Commands, m);
|
||||||
gInterpolationIndex++;
|
interpreter->mInterpolationIndex++;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool curAltAssets = CVarGetInteger("gEnhancements.Mods.AlternateAssets", 0);
|
bool curAltAssets = CVarGetInteger("gEnhancements.Mods.AlternateAssets", 0);
|
||||||
|
@ -616,8 +618,16 @@ extern "C" uint32_t GameEngine_GetSamplesPerFrame() {
|
||||||
|
|
||||||
// End
|
// End
|
||||||
|
|
||||||
|
Fast::Interpreter* GameEngine_GetInterpreter() {
|
||||||
|
return static_pointer_cast<Fast::Fast3dWindow>(Ship::Context::GetInstance()->GetWindow())
|
||||||
|
->GetInterpreterWeak()
|
||||||
|
.lock()
|
||||||
|
.get();
|
||||||
|
}
|
||||||
|
|
||||||
extern "C" float GameEngine_GetAspectRatio() {
|
extern "C" float GameEngine_GetAspectRatio() {
|
||||||
return gfx_current_dimensions.aspect_ratio;
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
|
return interpreter->mCurDimensions.aspect_ratio;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" uint32_t GameEngine_GetGameVersion() {
|
extern "C" uint32_t GameEngine_GetGameVersion() {
|
||||||
|
@ -730,34 +740,33 @@ extern "C" uint32_t OTRGetCurrentHeight() {
|
||||||
return GameEngine::Instance->context->GetWindow()->GetHeight();
|
return GameEngine::Instance->context->GetWindow()->GetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetAspectRatio() {
|
|
||||||
return gfx_current_dimensions.aspect_ratio;
|
|
||||||
}
|
|
||||||
|
|
||||||
extern "C" float OTRGetHUDAspectRatio() {
|
extern "C" float OTRGetHUDAspectRatio() {
|
||||||
if (CVarGetInteger("gHUDAspectRatio.Enabled", 0) == 0 || CVarGetInteger("gHUDAspectRatio.X", 0) == 0 || CVarGetInteger("gHUDAspectRatio.Y", 0) == 0)
|
if (CVarGetInteger("gHUDAspectRatio.Enabled", 0) == 0 || CVarGetInteger("gHUDAspectRatio.X", 0) == 0 || CVarGetInteger("gHUDAspectRatio.Y", 0) == 0) {
|
||||||
{
|
return GameEngine_GetAspectRatio();
|
||||||
return OTRGetAspectRatio();
|
|
||||||
}
|
}
|
||||||
return ((float)CVarGetInteger("gHUDAspectRatio.X", 1) / (float)CVarGetInteger("gHUDAspectRatio.Y", 1));
|
return ((float)CVarGetInteger("gHUDAspectRatio.X", 1) / (float)CVarGetInteger("gHUDAspectRatio.Y", 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetDimensionFromLeftEdge(float v) {
|
extern "C" float OTRGetDimensionFromLeftEdge(float v) {
|
||||||
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 * OTRGetAspectRatio() + (v));
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
|
return (interpreter->mNativeDimensions.width / 2 - interpreter->mNativeDimensions.height / 2 * interpreter->mCurDimensions.aspect_ratio + (v));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetDimensionFromRightEdge(float v) {
|
extern "C" float OTRGetDimensionFromRightEdge(float v) {
|
||||||
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 * OTRGetAspectRatio() -
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
(gfx_native_dimensions.width - v));
|
return (interpreter->mNativeDimensions.width / 2 + interpreter->mNativeDimensions.height / 2 * interpreter->mCurDimensions.aspect_ratio -
|
||||||
|
(interpreter->mNativeDimensions.width - v));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
|
extern "C" float OTRGetDimensionFromLeftEdgeForcedAspect(float v, float aspectRatio) {
|
||||||
return (gfx_native_dimensions.width / 2 - gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) + (v));
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
|
return (interpreter->mNativeDimensions.width / 2 - interpreter->mNativeDimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : interpreter->mCurDimensions.aspect_ratio) + (v));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
|
extern "C" float OTRGetDimensionFromRightEdgeForcedAspect(float v, float aspectRatio) {
|
||||||
return (gfx_native_dimensions.width / 2 + gfx_native_dimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : OTRGetAspectRatio()) -
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
(gfx_native_dimensions.width - v));
|
return (interpreter->mNativeDimensions.width / 2 + interpreter->mNativeDimensions.height / 2 * (aspectRatio > 0 ? aspectRatio : interpreter->mCurDimensions.aspect_ratio) -
|
||||||
|
(interpreter->mNativeDimensions.width - v));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" float OTRGetDimensionFromLeftEdgeOverride(float v) {
|
extern "C" float OTRGetDimensionFromLeftEdgeOverride(float v) {
|
||||||
|
@ -770,12 +779,14 @@ extern "C" float OTRGetDimensionFromRightEdgeOverride(float v) {
|
||||||
|
|
||||||
// Gets the width of the current render target area
|
// Gets the width of the current render target area
|
||||||
extern "C" uint32_t OTRGetGameRenderWidth() {
|
extern "C" uint32_t OTRGetGameRenderWidth() {
|
||||||
return gfx_current_dimensions.width;
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
|
return interpreter->mCurDimensions.width;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets the height of the current render target area
|
// Gets the height of the current render target area
|
||||||
extern "C" uint32_t OTRGetGameRenderHeight() {
|
extern "C" uint32_t OTRGetGameRenderHeight() {
|
||||||
return gfx_current_dimensions.height;
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
|
return interpreter->mCurDimensions.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int16_t OTRGetRectDimensionFromLeftEdge(float v) {
|
extern "C" int16_t OTRGetRectDimensionFromLeftEdge(float v) {
|
||||||
|
@ -803,9 +814,10 @@ extern "C" int16_t OTRGetRectDimensionFromRightEdgeOverride(float v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" int32_t OTRConvertHUDXToScreenX(int32_t v) {
|
extern "C" int32_t OTRConvertHUDXToScreenX(int32_t v) {
|
||||||
float gameAspectRatio = gfx_current_dimensions.aspect_ratio;
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
int32_t gameHeight = gfx_current_dimensions.height;
|
float gameAspectRatio = interpreter->mCurDimensions.aspect_ratio;
|
||||||
int32_t gameWidth = gfx_current_dimensions.width;
|
int32_t gameHeight = interpreter->mCurDimensions.height;
|
||||||
|
int32_t gameWidth = interpreter->mCurDimensions.width;
|
||||||
float hudAspectRatio = 4.0f / 3.0f;
|
float hudAspectRatio = 4.0f / 3.0f;
|
||||||
int32_t hudHeight = gameHeight;
|
int32_t hudHeight = gameHeight;
|
||||||
int32_t hudWidth = hudHeight * hudAspectRatio;
|
int32_t hudWidth = hudHeight * hudAspectRatio;
|
||||||
|
|
|
@ -12,7 +12,7 @@ typedef enum {
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <Fast3D/gfx_pc.h>
|
#include <Fast3D/interpreter.h>
|
||||||
#include "libultraship/src/Context.h"
|
#include "libultraship/src/Context.h"
|
||||||
|
|
||||||
#ifndef IDYES
|
#ifndef IDYES
|
||||||
|
@ -48,21 +48,23 @@ class GameEngine {
|
||||||
static bool HasVersion(SF64Version ver);
|
static bool HasVersion(SF64Version ver);
|
||||||
};
|
};
|
||||||
|
|
||||||
extern "C" void* GameEngine_Malloc(size_t size);
|
Fast::Interpreter* GameEngine_GetInterpreter();
|
||||||
|
|
||||||
#define memallocn(type, n) (type*) GameEngine_Malloc(sizeof(type) * n)
|
#define memallocn(type, n) (type*) GameEngine_Malloc(sizeof(type) * n)
|
||||||
#define memalloc(type) memallocn(type, 1)
|
#define memalloc(type) memallocn(type, 1)
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
#else
|
#else
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#define memalloc(size) GameEngine_Malloc(size)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
void* GameEngine_Malloc(size_t size);
|
||||||
bool GameEngine_HasVersion(SF64Version ver);
|
bool GameEngine_HasVersion(SF64Version ver);
|
||||||
void GameEngine_ProcessGfxCommands(Gfx* commands);
|
void GameEngine_ProcessGfxCommands(Gfx* commands);
|
||||||
float GameEngine_GetAspectRatio();
|
float GameEngine_GetAspectRatio();
|
||||||
uint8_t GameEngine_OTRSigCheck(char* imgData);
|
uint8_t GameEngine_OTRSigCheck(const char* imgData);
|
||||||
uint32_t OTRGetCurrentWidth(void);
|
uint32_t OTRGetCurrentWidth(void);
|
||||||
uint32_t OTRGetCurrentHeight(void);
|
uint32_t OTRGetCurrentHeight(void);
|
||||||
float OTRGetAspectRatio(void);
|
|
||||||
float OTRGetHUDAspectRatio();
|
float OTRGetHUDAspectRatio();
|
||||||
int32_t OTRConvertHUDXToScreenX(int32_t v);
|
int32_t OTRConvertHUDXToScreenX(int32_t v);
|
||||||
float OTRGetDimensionFromLeftEdge(float v);
|
float OTRGetDimensionFromLeftEdge(float v);
|
||||||
|
@ -83,5 +85,7 @@ void* GameEngine_Malloc(size_t size);
|
||||||
void GameEngine_GetTextureInfo(const char* path, int32_t* width, int32_t* height, float* scale, bool* custom);
|
void GameEngine_GetTextureInfo(const char* path, int32_t* width, int32_t* height, float* scale, bool* custom);
|
||||||
void gDPSetTileSizeInterp(Gfx* pkt, int t, float uls, float ult, float lrs, float lrt);
|
void gDPSetTileSizeInterp(Gfx* pkt, int t, float uls, float ult, float lrs, float lrt);
|
||||||
uint32_t GameEngine_GetInterpolationFrameCount();
|
uint32_t GameEngine_GetInterpolationFrameCount();
|
||||||
#define memalloc(size) GameEngine_Malloc(size)
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
#endif
|
#endif
|
|
@ -3,8 +3,6 @@
|
||||||
#include "Engine.h"
|
#include "Engine.h"
|
||||||
#include "DisplayList.h"
|
#include "DisplayList.h"
|
||||||
|
|
||||||
extern "C" uint8_t GameEngine_OTRSigCheck(const char* data);
|
|
||||||
|
|
||||||
extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) {
|
extern "C" void gSPDisplayList(Gfx* pkt, Gfx* dl) {
|
||||||
char* imgData = (char*)dl;
|
char* imgData = (char*)dl;
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <libultraship.h>
|
#include <libultraship.h>
|
||||||
|
|
||||||
#include <Fast3D/gfx_pc.h>
|
#include <Fast3D/interpreter.h>
|
||||||
#include "Engine.h"
|
#include "Engine.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
#include <libultraship.h>
|
|
||||||
#include <Fast3D/gfx_pc.h>
|
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
|
|
||||||
}
|
|
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
#include <imgui_internal.h>
|
#include <imgui_internal.h>
|
||||||
#include <libultraship/libultraship.h>
|
#include <libultraship/libultraship.h>
|
||||||
#include <Fast3D/gfx_pc.h>
|
#include <Fast3D/interpreter.h>
|
||||||
#include "port/Engine.h"
|
#include "port/Engine.h"
|
||||||
#include "port/notification/notification.h"
|
#include "port/notification/notification.h"
|
||||||
#include "utils/StringHelper.h"
|
#include "utils/StringHelper.h"
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
#include "ResolutionEditor.h"
|
#include "ResolutionEditor.h"
|
||||||
#include "UIWidgets.h"
|
#include "UIWidgets.h"
|
||||||
#include "libultraship/src/Context.h"
|
#include "libultraship/src/Context.h"
|
||||||
|
#include "port/Engine.h"
|
||||||
|
|
||||||
#include <imgui.h>
|
#include <imgui.h>
|
||||||
#include <libultraship/libultraship.h>
|
#include <libultraship/libultraship.h>
|
||||||
#include <graphic/Fast3D/gfx_pc.h>
|
#include <graphic/Fast3D/interpreter.h>
|
||||||
|
|
||||||
/* Console Variables are grouped under gAdvancedResolution. (e.g. "gAdvancedResolution.Enabled")
|
/* Console Variables are grouped under gAdvancedResolution. (e.g. "gAdvancedResolution.Enabled")
|
||||||
|
|
||||||
|
@ -59,6 +60,7 @@ namespace AdvancedResolutionSettings {
|
||||||
for (unsigned short i = 0; i < sizeof(setting); i++)
|
for (unsigned short i = 0; i < sizeof(setting); i++)
|
||||||
update[i] = false;
|
update[i] = false;
|
||||||
static short updateCountdown = 0;
|
static short updateCountdown = 0;
|
||||||
|
auto interpreter = GameEngine_GetInterpreter();
|
||||||
short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 60) / 2; // half of a second, in frames.
|
short countdownStartingValue = CVarGetInteger("gInterpolationFPS", 60) / 2; // half of a second, in frames.
|
||||||
|
|
||||||
// Initialise integer scale bounds.
|
// Initialise integer scale bounds.
|
||||||
|
@ -67,13 +69,13 @@ namespace AdvancedResolutionSettings {
|
||||||
|
|
||||||
short integerScale_maximumBounds = 1; // can change when window is resized
|
short integerScale_maximumBounds = 1; // can change when window is resized
|
||||||
// This is mostly just for UX purposes, as Fit Automatically logic is part of LUS.
|
// This is mostly just for UX purposes, as Fit Automatically logic is part of LUS.
|
||||||
if (((float)gfx_current_game_window_viewport.width / gfx_current_game_window_viewport.height) >
|
if (((float)interpreter->mGameWindowViewport.width / interpreter->mGameWindowViewport.height) >
|
||||||
((float)gfx_current_dimensions.width / gfx_current_dimensions.height)) {
|
((float)interpreter->mCurDimensions.width / interpreter->mCurDimensions.height)) {
|
||||||
// Scale to window height
|
// Scale to window height
|
||||||
integerScale_maximumBounds = gfx_current_game_window_viewport.height / gfx_current_dimensions.height;
|
integerScale_maximumBounds = interpreter->mGameWindowViewport.height / interpreter->mCurDimensions.height;
|
||||||
} else {
|
} else {
|
||||||
// Scale to window width
|
// Scale to window width
|
||||||
integerScale_maximumBounds = gfx_current_game_window_viewport.width / gfx_current_dimensions.width;
|
integerScale_maximumBounds = interpreter->mGameWindowViewport.width / interpreter->mCurDimensions.width;
|
||||||
}
|
}
|
||||||
// Lower-clamping maximum bounds value to 1 is no-longer necessary as that's accounted for in LUS.
|
// Lower-clamping maximum bounds value to 1 is no-longer necessary as that's accounted for in LUS.
|
||||||
// Letting it go below 1 in this Editor will even allow for checking if screen bounds are being exceeded.
|
// Letting it go below 1 in this Editor will even allow for checking if screen bounds are being exceeded.
|
||||||
|
@ -136,9 +138,9 @@ namespace AdvancedResolutionSettings {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Resolution visualiser
|
// Resolution visualiser
|
||||||
ImGui::Text("Viewport dimensions: %d x %d", gfx_current_game_window_viewport.width,
|
ImGui::Text("Viewport dimensions: %d x %d", interpreter->mGameWindowViewport.width,
|
||||||
gfx_current_game_window_viewport.height);
|
interpreter->mGameWindowViewport.height);
|
||||||
ImGui::Text("Internal resolution: %d x %d", gfx_current_dimensions.width, gfx_current_dimensions.height);
|
ImGui::Text("Internal resolution: %d x %d", interpreter->mCurDimensions.width, interpreter->mCurDimensions.height);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);
|
UIWidgets::PaddedSeparator(true, true, 3.0f, 3.0f);
|
||||||
|
|
||||||
|
@ -171,7 +173,7 @@ namespace AdvancedResolutionSettings {
|
||||||
} else if (showHorizontalResField) { // Show calculated aspect ratio
|
} else if (showHorizontalResField) { // Show calculated aspect ratio
|
||||||
if (item_aspectRatio) {
|
if (item_aspectRatio) {
|
||||||
UIWidgets::Spacer(2);
|
UIWidgets::Spacer(2);
|
||||||
float resolvedAspectRatio = (float)gfx_current_dimensions.height / gfx_current_dimensions.width;
|
float resolvedAspectRatio = (float)interpreter->mCurDimensions.height / interpreter->mCurDimensions.width;
|
||||||
ImGui::Text("Aspect ratio: %.4f", resolvedAspectRatio);
|
ImGui::Text("Aspect ratio: %.4f", resolvedAspectRatio);
|
||||||
} else {
|
} else {
|
||||||
UIWidgets::Spacer(enhancementSpacerHeight);
|
UIWidgets::Spacer(enhancementSpacerHeight);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue