mirror of
https://github.com/redstrate/Astra.git
synced 2025-04-23 04:57:44 +00:00
Make Steamworks API initialization failure fatal
This commit is contained in:
parent
e2ad7e71d5
commit
d1d96d5e9f
2 changed files with 5 additions and 7 deletions
|
@ -11,12 +11,9 @@ class SteamAPI : public QObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit SteamAPI(LauncherCore &core, QObject *parent = nullptr);
|
explicit SteamAPI(LauncherCore &core, QObject *parent = nullptr);
|
||||||
~SteamAPI();
|
~SteamAPI() override;
|
||||||
|
|
||||||
void setLauncherMode(bool isLauncher);
|
void setLauncherMode(bool isLauncher);
|
||||||
|
|
||||||
[[nodiscard]] bool isDeck() const;
|
[[nodiscard]] bool isDeck() const;
|
||||||
|
|
||||||
private:
|
|
||||||
LauncherCore &core;
|
|
||||||
};
|
};
|
|
@ -7,18 +7,19 @@
|
||||||
#include <steam/steam_api.h>
|
#include <steam/steam_api.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "astra_log.h"
|
||||||
#include "launchercore.h"
|
#include "launchercore.h"
|
||||||
|
|
||||||
SteamAPI::SteamAPI(LauncherCore &core, QObject *parent)
|
SteamAPI::SteamAPI(LauncherCore &core, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, core(core)
|
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_STEAM
|
#ifdef ENABLE_STEAM
|
||||||
qputenv("SteamAppId", "39210");
|
qputenv("SteamAppId", "39210");
|
||||||
qputenv("SteamGameId", "39210");
|
qputenv("SteamGameId", "39210");
|
||||||
|
|
||||||
if (!SteamAPI_Init())
|
if (!SteamAPI_Init()) {
|
||||||
qDebug() << "Failed to initialize steam api!";
|
qFatal(ASTRA_LOG) << "Failed to initialize steam api!";
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue