mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
Remove usage of steamAPI in preparation of steam lazy loading
This commit is contained in:
parent
14461152a5
commit
9c24a947ef
@ -36,11 +36,7 @@ void QMLUtilities::openLicenceFolder()
|
||||
QProcess explorer;
|
||||
explorer.setProgram("explorer.exe");
|
||||
QStringList args;
|
||||
const int folderLength = 2000;
|
||||
char folder[folderLength];
|
||||
SteamApps()->GetAppInstallDir(672870, folder, static_cast<uint32>(folderLength));
|
||||
QByteArray folderData(folder);
|
||||
args.append(QDir::toNativeSeparators(QString(folderData + "/ScreenPlay/legal")));
|
||||
args.append(QDir::toNativeSeparators(QString(QDir::toNativeSeparators(QCoreApplication::applicationFilePath()) + "/ScreenPlay/legal")));
|
||||
explorer.setArguments(args);
|
||||
explorer.startDetached();
|
||||
}
|
||||
|
@ -4,8 +4,7 @@
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QProcess>
|
||||
|
||||
#include "steam/steam_api.h"
|
||||
#include <QCoreApplication>
|
||||
|
||||
/*!
|
||||
\class Global QML Utilities
|
||||
|
@ -58,10 +58,8 @@ Settings::Settings(ProfileListModel* plm, MonitorListModel* mlm, InstalledListMo
|
||||
|
||||
//If empty use steam workshop location
|
||||
if (QString(configObj.value("absoluteStoragePath").toString()).isEmpty()) {
|
||||
const uint32 size = 5000;
|
||||
char folder[size];
|
||||
SteamApps()->GetAppInstallDir(m_steamID, folder, 5000);
|
||||
QDir steamTmpUrl = QDir(QString(QByteArray(folder).data()));
|
||||
QDir steamTmpUrl = QDir::toNativeSeparators(QCoreApplication::applicationFilePath());
|
||||
steamTmpUrl.cdUp();
|
||||
steamTmpUrl.cdUp();
|
||||
steamTmpUrl.cdUp();
|
||||
steamTmpUrl.cd("workshop");
|
||||
|
@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QDebug>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
@ -21,6 +20,7 @@
|
||||
#include <QUrl>
|
||||
#include <QVariant>
|
||||
#include <QVector>
|
||||
#include <QtGlobal>
|
||||
|
||||
#include "installedlistmodel.h"
|
||||
#include "monitorlistmodel.h"
|
||||
@ -78,7 +78,6 @@ public:
|
||||
int patch = 1;
|
||||
};
|
||||
|
||||
|
||||
Version version() const
|
||||
{
|
||||
return m_version;
|
||||
|
Loading…
Reference in New Issue
Block a user