Audio fix

This commit is contained in:
2026-03-14 19:11:59 +01:00
parent 52df67da09
commit b19f595daf
6 changed files with 67 additions and 37 deletions

View File

@@ -10,6 +10,7 @@
#include <state/gamestate.hpp>
#include <game/gamemanager.hpp>
#include <audio/audio.hpp>
#include <chrono>
namespace Game::Window {
class Window {
@@ -24,14 +25,19 @@ namespace Game::Window {
void setTargetFPS(int fps) { mTargetFPS = fps; }
int getTargetFPS() { return mTargetFPS; }
static SDL_Window* getSDLWindowBackend() { return sWindowBackend; }
Renderer::Renderer* getRenderer() { return &mRenderer; }
private:
static inline SDL_Window* sWindowBackend = nullptr;
SDL_Window* mWindow;
Renderer::Renderer mRenderer;
Game::GameManager mGameManager;
std::jthread mGameThread;
bool mRunning;
int mTargetFPS = 60;
size_t mFrameCount = 0;
std::chrono::steady_clock::time_point mLastFPSTime;
};
}