diff options
| author | MegaMech <MegaMech@users.noreply.github.com> | 2025-05-15 15:25:18 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-15 15:25:18 -0600 |
| commit | 7cc9894aa12175f10ad91174cff41ef1701df166 (patch) | |
| tree | 8a24f90b69a06ed36d5aa8e53a003ae4f0f8aaa6 /src/port/ui/ResolutionEditor.cpp | |
| parent | e7415ec072ee1cdc99a49db658062d4de0b3301c (diff) | |
Fix compile (#199)
* Fixes made so far
* Fixes up until linking
* Moved GetInterpreter() to a single function under the Engine.h
* Updated shader files included with assets, added exception for Linux for including SDL2_net
* Removed osSetTime stub(for now)
* Adjustments to get it to compile + run
* Decoupled GetInterpreter() from the GameEngine Class, corrected a invalid include in SpaghettiGui.cpp
---------
Co-authored-by: sitton76 <58642183+sitton76@users.noreply.github.com>
Diffstat (limited to 'src/port/ui/ResolutionEditor.cpp')
| -rw-r--r-- | src/port/ui/ResolutionEditor.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/port/ui/ResolutionEditor.cpp b/src/port/ui/ResolutionEditor.cpp index 4bf44ee7e..ca47cb15e 100644 --- a/src/port/ui/ResolutionEditor.cpp +++ b/src/port/ui/ResolutionEditor.cpp @@ -96,12 +96,12 @@ void RegisterResolutionWidgets() { // Resolution visualiser mPortMenu->AddWidget(path, "Viewport dimensions: {} x {}", WIDGET_TEXT).PreFunc([](WidgetInfo& info) { - auto captured_window_viewport = GameEngine::GetInterpreter().get()->mGameWindowViewport; + auto captured_window_viewport = GetInterpreter()->mGameWindowViewport; info.name = fmt::format("Viewport dimensions: {} x {}", captured_window_viewport.width, captured_window_viewport.height); }); mPortMenu->AddWidget(path, "Internal resolution: {} x {}", WIDGET_TEXT).PreFunc([](WidgetInfo& info) { - auto captured_current_dimensions = GameEngine::GetInterpreter().get()->mCurDimensions; + auto captured_current_dimensions = GetInterpreter()->mCurDimensions; info.name = fmt::format("Internal resolution: {} x {}", captured_current_dimensions.width, captured_current_dimensions.height); }); @@ -174,8 +174,8 @@ void RegisterResolutionWidgets() { } } else if (showHorizontalResField) { // Show calculated aspect ratio if (item_aspectRatio) { - auto gfx_current_game_window_viewport = GameEngine::GetInterpreter().get()->mGameWindowViewport; - auto gfx_current_dimensions = GameEngine::GetInterpreter().get()->mCurDimensions; + auto gfx_current_game_window_viewport = GetInterpreter()->mGameWindowViewport; + auto gfx_current_dimensions = GetInterpreter()->mCurDimensions; ImGui::Dummy({ 0, 2 }); const float resolvedAspectRatio = (float)gfx_current_dimensions.width / gfx_current_dimensions.height; ImGui::Text("Aspect ratio: %.2f:1", resolvedAspectRatio); @@ -502,8 +502,8 @@ void UpdateResolutionVars() { 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. - auto gfx_current_game_window_viewport = GameEngine::GetInterpreter().get()->mGameWindowViewport; - auto gfx_current_dimensions = GameEngine::GetInterpreter().get()->mCurDimensions; + auto gfx_current_game_window_viewport = GetInterpreter()->mGameWindowViewport; + auto gfx_current_dimensions = GetInterpreter()->mCurDimensions; if (((float)gfx_current_game_window_viewport.width / gfx_current_game_window_viewport.height) > ((float)gfx_current_dimensions.width / gfx_current_dimensions.height)) { // Scale to window height |
