From d3aba9ed3fa516db2e32498282bc5a54c77578ce Mon Sep 17 00:00:00 2001 From: Mattes D Date: Sat, 28 Mar 2015 20:47:24 +0100 Subject: QtBiomeVisualiser: Fixed compilation and INI loading. --- Tools/QtBiomeVisualiser/GeneratorSetup.cpp | 12 ++++++++++-- Tools/QtBiomeVisualiser/Globals.h | 5 +---- Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro | 2 ++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp index 8f97e1f37..54b7ef36e 100644 --- a/Tools/QtBiomeVisualiser/GeneratorSetup.cpp +++ b/Tools/QtBiomeVisualiser/GeneratorSetup.cpp @@ -120,15 +120,23 @@ void GeneratorSetup::editChanged(const QString & a_NewValue) void GeneratorSetup::updateFromIni() { - m_eSeed->setText(QString::number(m_IniFile->GetValueI("Seed", "Seed", 0))); + // Set the seed editbox: + int seed = m_IniFile->GetValueI("Seed", "Seed", 0); + m_eSeed->setText(QString::number(seed)); int keyID = m_IniFile->FindKey("Generator"); if (keyID <= -1) { return; } - int numItems = m_IniFile->GetNumValues(keyID); + + // Set the Generator combobox: AString generatorName = m_IniFile->GetValue("Generator", "BiomeGen"); size_t generatorNameLen = generatorName.length(); + int index = m_cbGenerator->findText(QString::fromStdString(generatorName)); + m_cbGenerator->setCurrentIndex(index); + + // Create the controls for all the generator settings in the INI file: + int numItems = m_IniFile->GetNumValues(keyID); for (int i = 0; i < numItems; i++) { AString itemName = m_IniFile->GetValueName(keyID, i); diff --git a/Tools/QtBiomeVisualiser/Globals.h b/Tools/QtBiomeVisualiser/Globals.h index e2e9a9970..cc90f9383 100644 --- a/Tools/QtBiomeVisualiser/Globals.h +++ b/Tools/QtBiomeVisualiser/Globals.h @@ -176,8 +176,7 @@ template class SizeChecker; // OS-dependent stuff: #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN - - #define _WIN32_WINNT 0x501 // We want to target WinXP and higher + #define _WIN32_WINNT _WIN32_WINNT_WS03 // We want to target Windows XP with Service Pack 2 & Windows Server 2003 with Service Pack 1 and higher #include #include @@ -248,11 +247,9 @@ template class SizeChecker; #ifndef TEST_GLOBALS // Common headers (part 1, without macros): #include "src/StringUtils.h" - #include "src/OSSupport/Sleep.h" #include "src/OSSupport/CriticalSection.h" #include "src/OSSupport/Semaphore.h" #include "src/OSSupport/Event.h" - #include "src/OSSupport/Thread.h" #include "src/OSSupport/File.h" #include "src/Logger.h" #else diff --git a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro index cccee1305..daf2d4020 100644 --- a/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro +++ b/Tools/QtBiomeVisualiser/QtBiomeVisualiser.pro @@ -22,6 +22,7 @@ SOURCES += \ ../../src/LoggerListeners.cpp \ ../../src/Logger.cpp \ ../../src/IniFile.cpp \ + ../../src/OSSupport/Event.cpp \ ../../src/OSSupport/File.cpp \ ../../src/OSSupport/CriticalSection.cpp \ ../../src/OSSupport/IsThread.cpp \ @@ -69,6 +70,7 @@ HEADERS += \ ../../src/LoggerListeners.h \ ../../src/Logger.h \ ../../src/IniFile.h \ + ../../src/OSSupport/Event.h \ ../../src/OSSupport/File.h \ ../../src/OSSupport/CriticalSection.h \ ../../src/OSSupport/IsThread.h \ -- cgit v1.2.3