mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Add getter for SteamVR's buildID to SteamClient
This commit is contained in:
parent
15ee56a50f
commit
f26ddc6f8b
3 changed files with 28 additions and 0 deletions
|
@ -569,6 +569,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_deadlockWatchdogThread = new DeadlockWatchdogThread();
|
_deadlockWatchdogThread = new DeadlockWatchdogThread();
|
||||||
_deadlockWatchdogThread->start();
|
_deadlockWatchdogThread->start();
|
||||||
|
|
||||||
|
qCDebug(interfaceapp) << "[VERSION] SteamVR buildID:" << SteamClient::getSteamVRBuildID();
|
||||||
qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
|
qCDebug(interfaceapp) << "[VERSION] Build sequence:" << qPrintable(applicationVersion());
|
||||||
qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
|
qCDebug(interfaceapp) << "[VERSION] MODIFIED_ORGANIZATION:" << BuildInfo::MODIFIED_ORGANIZATION;
|
||||||
qCDebug(interfaceapp) << "[VERSION] VERSION:" << BuildInfo::VERSION;
|
qCDebug(interfaceapp) << "[VERSION] VERSION:" << BuildInfo::VERSION;
|
||||||
|
|
|
@ -245,6 +245,32 @@ void SteamClient::shutdown() {
|
||||||
steamCallbackManager.getTicketRequests().stopAll();
|
steamCallbackManager.getTicketRequests().stopAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int SteamClient::getSteamVRBuildID() {
|
||||||
|
if (initialized) {
|
||||||
|
static const int MAX_PATH_SIZE = 512;
|
||||||
|
static const int STEAMVR_APPID = 250820;
|
||||||
|
char rawPath[MAX_PATH_SIZE];
|
||||||
|
SteamApps()->GetAppInstallDir(STEAMVR_APPID, rawPath, MAX_PATH_SIZE);
|
||||||
|
|
||||||
|
QString path(rawPath);
|
||||||
|
path += "\\bin\\version.txt";
|
||||||
|
qDebug() << "SteamVR version file path:" << path;
|
||||||
|
|
||||||
|
QFile file(path);
|
||||||
|
if (file.open(QIODevice::ReadOnly)) {
|
||||||
|
QString buildIDString = file.readLine();
|
||||||
|
|
||||||
|
bool ok = false;
|
||||||
|
int buildID = buildIDString.toInt(&ok);
|
||||||
|
if (ok) {
|
||||||
|
return buildID;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void SteamClient::runCallbacks() {
|
void SteamClient::runCallbacks() {
|
||||||
if (!initialized) {
|
if (!initialized) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -37,6 +37,7 @@ public:
|
||||||
static void openInviteOverlay();
|
static void openInviteOverlay();
|
||||||
static void joinLobby(QString lobbyId);
|
static void joinLobby(QString lobbyId);
|
||||||
|
|
||||||
|
static int getSteamVRBuildID();
|
||||||
};
|
};
|
||||||
|
|
||||||
class SteamScriptingInterface : public QObject {
|
class SteamScriptingInterface : public QObject {
|
||||||
|
|
Loading…
Reference in a new issue