From 108edd4093672cf8b113722feb60926207c934a7 Mon Sep 17 00:00:00 2001 From: Sacha Date: Tue, 10 Dec 2013 18:49:25 +1000 Subject: [PATCH] Buildfix for Windows Qt. Enable PSP model SLIM on Symbian (works fine due to lack of mmap). --- Core/Config.cpp | 10 +++++----- Core/Config.h | 4 ++-- Core/Dialog/PSPOskDialog.cpp | 6 +++--- Core/Dialog/PSPOskDialog.h | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Core/Config.cpp b/Core/Config.cpp index 8f94c3ee71..d7d843bcb8 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -99,7 +99,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { general->Get("ReportingHost", &sReportHost, "default"); general->Get("Recent", recentIsos); general->Get("AutoSaveSymbolMap", &bAutoSaveSymbolMap, false); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) general->Get("TopMost", &bTopMost); general->Get("WindowX", &iWindowX, -1); // -1 tells us to center the window. general->Get("WindowY", &iWindowY, -1); @@ -316,7 +316,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { network->Get("EnableWlan", &bEnableWlan, false); IniFile::Section *pspConfig = iniFile.GetOrCreateSection("SystemParam"); -#if !defined(ARM) +#if !defined(ARM) || defined(__SYMBIAN32__) pspConfig->Get("PSPModel", &iPSPModel, PSP_MODEL_SLIM); #else pspConfig->Get("PSPModel", &iPSPModel, PSP_MODEL_FAT); @@ -332,7 +332,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { pspConfig->Get("ButtonPreference", &iButtonPreference, PSP_SYSTEMPARAM_BUTTON_CROSS); pspConfig->Get("LockParentalLevel", &iLockParentalLevel, 0); pspConfig->Get("WlanAdhocChannel", &iWlanAdhocChannel, PSP_SYSTEMPARAM_ADHOC_CHANNEL_AUTOMATIC); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) pspConfig->Get("BypassOSKWithKeyboard", &bBypassOSKWithKeyboard, false); #endif pspConfig->Get("WlanPowerSave", &bWlanPowerSave, PSP_SYSTEMPARAM_WLAN_POWERSAVE_OFF); @@ -419,7 +419,7 @@ void Config::Save() { general->Set("ShowDebuggerOnLoad", bShowDebuggerOnLoad); general->Set("ReportingHost", sReportHost); general->Set("AutoSaveSymbolMap", bAutoSaveSymbolMap); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) general->Set("TopMost", bTopMost); general->Set("WindowX", iWindowX); general->Set("WindowY", iWindowY); @@ -569,7 +569,7 @@ void Config::Save() { pspConfig->Set("WlanAdhocChannel", iWlanAdhocChannel); pspConfig->Set("WlanPowerSave", bWlanPowerSave); pspConfig->Set("EncryptSave", bEncryptSave); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) pspConfig->Set("BypassOSKWithKeyboard", bBypassOSKWithKeyboard); #endif diff --git a/Core/Config.h b/Core/Config.h index f2040838fc..8fa683c89f 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -54,7 +54,7 @@ public: int iNumWorkerThreads; bool bScreenshotsAsPNG; bool bEnableLogging; -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) bool bPauseOnLostFocus; bool bTopMost; std::string sFont; @@ -236,7 +236,7 @@ public: int iPSPModel; // TODO: Make this work with your platform, too! -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) bool bBypassOSKWithKeyboard; #endif diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 7e4f54e104..273e046339 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -27,7 +27,7 @@ #include "Common/ChunkFile.h" #include "GPU/GPUState.h" -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) #include "base/NativeApp.h" #endif @@ -781,7 +781,7 @@ void PSPOskDialog::RenderKeyboard() } } -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) // TODO: Why does this have a 2 button press lag/delay when // re-opening the dialog box? I don't get it. int PSPOskDialog::NativeKeyboard() @@ -850,7 +850,7 @@ int PSPOskDialog::Update(int animSpeed) // TODO: Add your platforms here when you have a NativeKeyboard func. -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) // Windows: Fall back to the OSK/continue normally if we're in fullscreen. // The dialog box doesn't work right if in fullscreen. if(g_Config.bBypassOSKWithKeyboard && !g_Config.bFullScreen) diff --git a/Core/Dialog/PSPOskDialog.h b/Core/Dialog/PSPOskDialog.h index eeefc41369..a22cbfbc7f 100644 --- a/Core/Dialog/PSPOskDialog.h +++ b/Core/Dialog/PSPOskDialog.h @@ -215,7 +215,7 @@ private: void ConvertUCS2ToUTF8(std::string& _string, const PSPPointer em_address); void ConvertUCS2ToUTF8(std::string& _string, const wchar_t *input); void RenderKeyboard(); -#ifdef _WIN32 +#if defined(_WIN32) && !defined(USING_QT_UI) int NativeKeyboard(); #endif