From 37958449a2d68be30f2207241f8565821af65e30632554637bcfe0e05ab8f043 Mon Sep 17 00:00:00 2001 From: Mexpert_PRO Date: Mon, 19 Jan 2026 16:59:44 +0100 Subject: [PATCH] added small change to IWindow to be able to get the window size from the interface pointer, and not needing to use glfw for it --- TSE_Core/src/interfaces/IWindow.cpp | 5 +++++ TSE_Core/src/interfaces/IWindow.hpp | 2 ++ 2 files changed, 7 insertions(+) diff --git a/TSE_Core/src/interfaces/IWindow.cpp b/TSE_Core/src/interfaces/IWindow.cpp index ee3034e..5bcdcbd 100644 --- a/TSE_Core/src/interfaces/IWindow.cpp +++ b/TSE_Core/src/interfaces/IWindow.cpp @@ -22,6 +22,11 @@ void TSE::IWindow::BaseUpdate() const Time::Update(); } +TSE::Vector2 TSE::IWindow::GetSize() const +{ + return Vector2({width, height}); +} + TSE::IWindow::~IWindow() { AudioEngine::Destroy(); diff --git a/TSE_Core/src/interfaces/IWindow.hpp b/TSE_Core/src/interfaces/IWindow.hpp index daca906..c8c8e4f 100644 --- a/TSE_Core/src/interfaces/IWindow.hpp +++ b/TSE_Core/src/interfaces/IWindow.hpp @@ -2,6 +2,7 @@ #include "IRenderTarget.hpp" #include "Types.hpp" +#include "Vector2.hpp" namespace TSE { @@ -20,6 +21,7 @@ namespace TSE bool BaseInit() const; void BaseUpdate() const; + Vector2 GetSize() const; ~IWindow(); }; } // namespace TSE