2
0
mirror of https://github.com/Thracky/GlosSI.git synced 2024-11-03 09:40:18 +00:00

add version check for targets

This commit is contained in:
Peter Repukat 2016-11-29 19:05:36 +01:00
parent 56f9a9a436
commit e6bcf7a881
3 changed files with 5 additions and 3 deletions

View File

@ -55,6 +55,7 @@ void GloSC::writeIni(QString entryName)
settings.setValue("bEnableOverlay", 0 + ui.cbOverlay->isChecked());
settings.setValue("bEnableControllers", 0 + ui.cbControllers->isChecked());
settings.setValue("bHookSteam", 1);
settings.setValue("version", GLOSC_VERSION);
settings.endGroup();
@ -89,10 +90,10 @@ void GloSC::updateTargetsToNewVersion()
QSettings settings(name + "\\TargetConfig.ini", QSettings::IniFormat);
settings.beginGroup("BaseConf");
bool newVersion = settings.contains("bHookSteam");
unsigned int version = settings.value("version").toInt();
settings.endGroup();
if (!newVersion)
if (version < GLOSC_VERSION)
{
QFile file(name + "\\" + name + ".exe");
file.remove();

View File

@ -49,7 +49,7 @@ private:
QList<UWPPair> uwpPairs;
const unsigned int GLOSC_VERSION = 0x00000111;
private slots:
void on_pbSave_clicked();

View File

@ -3,6 +3,7 @@ bDrawDebugEdges=0
bEnableOverlay=1
bEnableControllers=1
bHookSteam=1
version=273
[LaunchGame]
bLaunchGame=0