1
Fork 0
mirror of https://github.com/redstrate/Astra.git synced 2025-04-22 20:47:45 +00:00

Make Steamworks API initialization failure fatal

This commit is contained in:
Joshua Goins 2023-10-11 13:08:00 -04:00
parent e2ad7e71d5
commit d1d96d5e9f
2 changed files with 5 additions and 7 deletions

View file

@ -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;
};

View file

@ -7,18 +7,19 @@
#include <steam/steam_api.h>
#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
}