diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 15:25:10 +1000 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2023-06-21 15:25:10 +1000 |
commit | d6fdd960768cbb94a67a1d3cdd34c606807ac180 (patch) | |
tree | b824f0091745d9bea6e02c78b0f7ef4d05e7d5d5 /source/client/StarClientApplication.cpp | |
parent | 0ec3000536fae16ede8aa85ad22aba4d9781cc9e (diff) |
Fixes and stuff
Using proper SDL Audio APIs now
Fixed borderless
Create game window before asset load
Bump up root loading worker thread count to 8
Fix not hearing other player songs on load-in
Fix issues with shipworlds missing ship.level property
Fix rare thread race with received chat packets on the server-side
Diffstat (limited to 'source/client/StarClientApplication.cpp')
-rw-r--r-- | source/client/StarClientApplication.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/source/client/StarClientApplication.cpp b/source/client/StarClientApplication.cpp index ae194ea..a80e650 100644 --- a/source/client/StarClientApplication.cpp +++ b/source/client/StarClientApplication.cpp @@ -128,11 +128,6 @@ void ClientApplication::startup(StringList const& cmdLineArgs) { m_root = rootLoader.initOrDie(cmdLineArgs).first; Logger::info("Client Version %s (%s) Source ID: %s Protocol: %s", StarVersionString, StarArchitectureString, StarSourceIdentifierString, StarProtocolVersion); - - auto assets = m_root->assets(); - m_minInterfaceScale = assets->json("/interface.config:minInterfaceScale").toInt(); - m_maxInterfaceScale = assets->json("/interface.config:maxInterfaceScale").toInt(); - m_crossoverRes = jsonToVec2F(assets->json("/interface.config:interfaceCrossoverRes")); } void ClientApplication::shutdown() { @@ -159,6 +154,11 @@ void ClientApplication::shutdown() { void ClientApplication::applicationInit(ApplicationControllerPtr appController) { Application::applicationInit(appController); + auto assets = m_root->assets(); + m_minInterfaceScale = assets->json("/interface.config:minInterfaceScale").toInt(); + m_maxInterfaceScale = assets->json("/interface.config:maxInterfaceScale").toInt(); + m_crossoverRes = jsonToVec2F(assets->json("/interface.config:interfaceCrossoverRes")); + appController->setCursorVisible(false); AudioFormat audioFormat = appController->enableAudio(); @@ -178,7 +178,7 @@ void ClientApplication::applicationInit(ApplicationControllerPtr appController) bool borderless = configuration->get("borderless").toBool(); bool maximized = configuration->get("maximized").toBool(); - appController->setApplicationTitle(m_root->assets()->json("/client.config:windowTitle").toString()); + appController->setApplicationTitle(assets->json("/client.config:windowTitle").toString()); appController->setVSyncEnabled(vsync); if (fullscreen) @@ -190,8 +190,8 @@ void ClientApplication::applicationInit(ApplicationControllerPtr appController) else appController->setNormalWindow(windowedSize); - appController->setMaxFrameSkip(m_root->assets()->json("/client.config:maxFrameSkip").toUInt()); - appController->setUpdateTrackWindow(m_root->assets()->json("/client.config:updateTrackWindow").toFloat()); + appController->setMaxFrameSkip(assets->json("/client.config:maxFrameSkip").toUInt()); + appController->setUpdateTrackWindow(assets->json("/client.config:updateTrackWindow").toFloat()); } void ClientApplication::renderInit(RendererPtr renderer) { |