1
0

QtBiomeVisualiser: Fixed compilation and INI loading.

This commit is contained in:
Mattes D 2015-03-28 20:47:24 +01:00
parent 53f5cc209f
commit d3aba9ed3f
3 changed files with 13 additions and 6 deletions

View File

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

View File

@ -176,8 +176,7 @@ template class SizeChecker<UInt16, 2>;
// 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 <Windows.h>
#include <winsock2.h>
@ -248,11 +247,9 @@ template class SizeChecker<UInt16, 2>;
#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

View File

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