diff --git a/Core/Config.cpp b/Core/Config.cpp index 177fd3a8f2..4ddaec5780 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -149,7 +149,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { general->Get("ScreenRotation", &iScreenRotation, 1); #endif -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) general->Get("TopMost", &bTopMost); general->Get("WindowX", &iWindowX, -1); // -1 tells us to center the window. general->Get("WindowY", &iWindowY, -1); @@ -213,7 +213,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { graphics->Get("SoftwareSkinning", &bSoftwareSkinning, true); graphics->Get("TextureFiltering", &iTexFiltering, 1); // Auto on Windows, 2x on large screens, 1x elsewhere. -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) graphics->Get("InternalResolution", &iInternalResolution, 0); #else graphics->Get("InternalResolution", &iInternalResolution, pixel_xres >= 1024 ? 2 : 1); @@ -297,7 +297,7 @@ void Config::Load(const char *iniFileName, const char *controllerIniFilename) { control->Get("ShowAnalogStick", &bShowTouchAnalogStick, true); control->Get("ShowTouchDpad", &bShowTouchDpad, true); control->Get("ShowTouchUnthrottle", &bShowTouchUnthrottle, true); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) control->Get("IgnoreWindowsKey", &bIgnoreWindowsKey, false); #endif #if defined(MOBILE_DEVICE) @@ -406,7 +406,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); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) pspConfig->Get("BypassOSKWithKeyboard", &bBypassOSKWithKeyboard, false); #endif pspConfig->Get("WlanPowerSave", &bWlanPowerSave, PSP_SYSTEMPARAM_WLAN_POWERSAVE_OFF); @@ -498,7 +498,7 @@ void Config::Save() { general->Set("ScreenRotation", iScreenRotation); #endif -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) general->Set("TopMost", bTopMost); general->Set("WindowX", iWindowX); general->Set("WindowY", iWindowY); @@ -643,7 +643,7 @@ void Config::Save() { control->Set("AnalogStickY", fAnalogStickY); control->Set("AnalogStickScale", fAnalogStickScale); control->Delete("DPadRadius"); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) control->Set("IgnoreWindowsKey", bIgnoreWindowsKey); #endif @@ -666,7 +666,7 @@ void Config::Save() { pspConfig->Set("WlanAdhocChannel", iWlanAdhocChannel); pspConfig->Set("WlanPowerSave", bWlanPowerSave); pspConfig->Set("EncryptSave", bEncryptSave); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) pspConfig->Set("BypassOSKWithKeyboard", bBypassOSKWithKeyboard); #endif diff --git a/Core/Config.h b/Core/Config.h index ceea88b2ea..7b0085ec42 100644 --- a/Core/Config.h +++ b/Core/Config.h @@ -64,7 +64,7 @@ public: int iNumWorkerThreads; bool bScreenshotsAsPNG; bool bEnableLogging; -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) bool bPauseOnLostFocus; bool bTopMost; std::string sFont; @@ -262,7 +262,7 @@ public: int iPSPModel; int iFirmwareVersion; // TODO: Make this work with your platform, too! -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) bool bBypassOSKWithKeyboard; #endif diff --git a/Core/Core.cpp b/Core/Core.cpp index 92af5cb021..cf4ceb0fc4 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -146,7 +146,7 @@ void Core_RunLoop() { while ((globalUIState != UISTATE_INGAME || !PSP_IsInited()) && globalUIState != UISTATE_EXIT) { time_update(); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) double startTime = time_now_d(); UpdateRunLoop(); @@ -165,7 +165,7 @@ void Core_RunLoop() { while (!coreState && globalUIState == UISTATE_INGAME) { time_update(); UpdateRunLoop(); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) if (!Core_IsStepping()) { GL_SwapBuffers(); } diff --git a/Core/Dialog/PSPOskDialog.cpp b/Core/Dialog/PSPOskDialog.cpp index 89e4d5387d..bd55e21b2e 100755 --- a/Core/Dialog/PSPOskDialog.cpp +++ b/Core/Dialog/PSPOskDialog.cpp @@ -28,7 +28,7 @@ #include "Common/ChunkFile.h" #include "GPU/GPUState.h" -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) #include "base/NativeApp.h" #endif @@ -786,7 +786,7 @@ void PSPOskDialog::RenderKeyboard() } } -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_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() @@ -866,7 +866,7 @@ int PSPOskDialog::Update(int animSpeed) // TODO: Add your platforms here when you have a NativeKeyboard func. -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_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 a22cbfbc7f..43deb2260f 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(); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) int NativeKeyboard(); #endif diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 60cfbd382c..e141ae7216 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -429,7 +429,7 @@ void __IoAsyncEndCallback(SceUID threadID, SceUID prevCallbackId) { } static DirectoryFileSystem *memstickSystem = NULL; -#if (defined(_WIN32) && !defined(USING_QT_UI)) || defined(APPLE) +#if defined(USING_WIN_UI) || defined(APPLE) static DirectoryFileSystem *flash0System = NULL; #else static VFSFileSystem *flash0System = NULL; @@ -455,7 +455,7 @@ void __IoInit() { syncNotifyEvent = CoreTiming::RegisterEvent("IoSyncNotify", __IoSyncNotify); memstickSystem = new DirectoryFileSystem(&pspFileSystem, g_Config.memCardDirectory); -#if (defined(_WIN32) && !defined(USING_QT_UI)) || defined(APPLE) +#if defined(USING_WIN_UI) || defined(APPLE) flash0System = new DirectoryFileSystem(&pspFileSystem, g_Config.flash0Directory); #else flash0System = new VFSFileSystem(&pspFileSystem, "flash0"); diff --git a/UI/EmuScreen.cpp b/UI/EmuScreen.cpp index 427fb482fe..41eab12b69 100644 --- a/UI/EmuScreen.cpp +++ b/UI/EmuScreen.cpp @@ -129,7 +129,7 @@ void EmuScreen::bootComplete() { I18NCategory *s = GetI18NCategory("Screen"); -#ifdef _WIN32 +#ifndef MOBILE_DEVICE if (g_Config.bFirstRun) { osm.Show(s->T("PressESC", "Press ESC to open the pause menu"), 3.0f); } @@ -181,7 +181,7 @@ void EmuScreen::sendMessage(const char *message, const char *value) { } host->BootDone(); host->UpdateDisassembly(); -#ifdef _WIN32 +#ifndef MOBILE_DEVICE if (g_Config.bAutoRun) { Core_EnableStepping(false); } else { diff --git a/UI/GameSettingsScreen.cpp b/UI/GameSettingsScreen.cpp index 931708fb73..fd882d3fde 100644 --- a/UI/GameSettingsScreen.cpp +++ b/UI/GameSettingsScreen.cpp @@ -47,12 +47,6 @@ #include "GPU/GPUInterface.h" #include "GPU/GLES/Framebuffer.h" -#ifdef _WIN32 -namespace MainWindow { - extern HWND hwndMain; -} -#endif - #ifdef IOS extern bool iosCanUseJit; #endif @@ -277,7 +271,7 @@ void GameSettingsScreen::CreateViews() { View *style = controlsSettings->Add(new PopupMultiChoice(&g_Config.iTouchButtonStyle, c->T("Button style"), touchControlStyles, 0, ARRAY_SIZE(touchControlStyles), c, screenManager())); style->SetEnabledPtr(&g_Config.bShowTouchControls); -#if defined(_WIN32) && !defined(USING_QT_UI) +#if defined(USING_WIN_UI) controlsSettings->Add(new ItemHeader(c->T("Keyboard", "Keyboard Control Settings"))); controlsSettings->Add(new CheckBox(&g_Config.bIgnoreWindowsKey, c->T("Ignore Windows Key"))); #endif diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 2fd4a5e470..66dca8e56a 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -868,7 +868,7 @@ UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) { g_Config.Save(); screenManager()->switchScreen(new EmuScreen(fileName.toStdString())); } -#elif defined(_WIN32) +#elif defined(USING_WIN_UI) MainWindow::BrowseAndBoot(""); #endif return UI::EVENT_DONE; diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index 4a95ba4f46..4d10e0c103 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -531,7 +531,7 @@ void CreditsScreen::render() { #endif #if defined(USING_QT_UI) "Qt", -#elif !defined(_WIN32) +#elif !defined(USING_WIN_UI) "SDL", #endif "CMake",