From 602425d108a16326361ed8c91ef08f0b664e18f7 Mon Sep 17 00:00:00 2001 From: KinoMyu Date: Fri, 13 Dec 2019 01:34:29 -0800 Subject: [PATCH] Add user configurable unity ver --- mainwindow.ui | 19 +++++++++++-------- src/mainwindow.cpp | 8 ++++++-- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/mainwindow.ui b/mainwindow.ui index df8b945..12cd2f3 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -32,17 +32,20 @@ - - - Qt::Horizontal - - + + - 40 - 20 + 58 + 16777215 - + + 2018 + + + Unity Ver + + diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 67ba7a2..62dfcc9 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -58,7 +58,7 @@ void MainWindow::load() ui->statusBar->showMessage("Downloading manifest file"); - if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + "2017.3/" + "Android/" + path, s, curlerror) != CURLE_OK) + if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + ui->unityVer->text().toStdString() + "/Android/" + path, s, curlerror) != CURLE_OK) { ui->statusBar->showMessage("ERROR: Could not connect to MLTD servers (" + QString(curlerror) + ")"); return; @@ -103,7 +103,7 @@ void MainWindow::diff() ui->statusBar->showMessage("Downloading manifest file"); - if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + "2017.3/" + "Android/" + path, s, curlerror) != CURLE_OK) + if(openURL("https://td-assets.bn765.com/" + ver + "/production/" + ui->unityVer->text().toStdString() + "/Android/" + path, s, curlerror) != CURLE_OK) { ui->statusBar->showMessage("ERROR: Could not connect to MLTD servers (" + QString(curlerror) + ")"); return; @@ -236,6 +236,10 @@ void MainWindow::filterPath(std::string& nString) { nString = "event/" + nString; } + if(nString.substr(0, 6) == "salmon") + { + nString = "salmon/" + nString; + } if(nString.substr(0, 4) == "tuna") { nString = "tuna/" + nString;