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:
parent
e2ad7e71d5
commit
d1d96d5e9f
2 changed files with 5 additions and 7 deletions
|
@ -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;
|
||||
};
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue