1
0
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:
kelteseth 2018-03-31 23:12:53 +02:00
parent 14461152a5
commit 9c24a947ef
4 changed files with 5 additions and 13 deletions

View File

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

View File

@ -4,8 +4,7 @@
#include <QString>
#include <QDir>
#include <QProcess>
#include "steam/steam_api.h"
#include <QCoreApplication>
/*!
\class Global QML Utilities

View File

@ -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");

View File

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