From d1d96d5e9fc2c8cf53ce650800955a8fb7556282 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 11 Oct 2023 13:08:00 -0400 Subject: [PATCH] Make Steamworks API initialization failure fatal --- launcher/include/steamapi.h | 5 +---- launcher/src/steamapi.cpp | 7 ++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/launcher/include/steamapi.h b/launcher/include/steamapi.h index 5446e46..f6087ca 100644 --- a/launcher/include/steamapi.h +++ b/launcher/include/steamapi.h @@ -11,12 +11,9 @@ class SteamAPI : public QObject { public: explicit SteamAPI(LauncherCore &core, QObject *parent = nullptr); - ~SteamAPI(); + ~SteamAPI() override; void setLauncherMode(bool isLauncher); [[nodiscard]] bool isDeck() const; - -private: - LauncherCore &core; }; \ No newline at end of file diff --git a/launcher/src/steamapi.cpp b/launcher/src/steamapi.cpp index 5a2e786..7a21530 100644 --- a/launcher/src/steamapi.cpp +++ b/launcher/src/steamapi.cpp @@ -7,18 +7,19 @@ #include #endif +#include "astra_log.h" #include "launchercore.h" SteamAPI::SteamAPI(LauncherCore &core, QObject *parent) : QObject(parent) - , core(core) { #ifdef ENABLE_STEAM qputenv("SteamAppId", "39210"); qputenv("SteamGameId", "39210"); - if (!SteamAPI_Init()) - qDebug() << "Failed to initialize steam api!"; + if (!SteamAPI_Init()) { + qFatal(ASTRA_LOG) << "Failed to initialize steam api!"; + } #endif }