From d586ec0d5edcee50136bfeea4da359c4cf0aa490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 25 Mar 2023 10:47:01 +0100 Subject: [PATCH] Don't create Host objects except in headless/unittest --- Core/Core.cpp | 1 - Core/Debugger/WebSocket/GameSubscriber.cpp | 1 - Core/HLE/HLE.cpp | 1 - Core/HLE/__sceAudio.cpp | 1 - Core/HLE/proAdhoc.cpp | 1 - Core/HLE/sceAudio.cpp | 1 - Core/HLE/sceDisplay.cpp | 1 - Core/HLE/sceUmd.cpp | 1 - Core/MIPS/IR/IRInterpreter.cpp | 1 - Core/MIPS/MIPSCodeUtils.cpp | 1 - Core/MIPS/MIPSInt.cpp | 1 - Core/MIPS/x86/CompBranch.cpp | 1 - Core/MIPS/x86/Jit.cpp | 1 - Core/MemMapFunctions.cpp | 1 - Core/SaveState.cpp | 1 - Core/System.cpp | 1 - Core/Util/PPGeDraw.cpp | 1 - GPU/Common/FramebufferManagerCommon.cpp | 1 - GPU/Common/PresentationCommon.cpp | 1 - GPU/Common/TextureReplacer.cpp | 1 - GPU/D3D11/TextureCacheD3D11.cpp | 1 - GPU/Directx9/GPU_DX9.cpp | 1 - GPU/Directx9/ShaderManagerDX9.cpp | 1 - GPU/Directx9/TextureCacheDX9.cpp | 1 - GPU/GLES/GPU_GLES.cpp | 1 - GPU/GLES/ShaderManagerGLES.cpp | 1 - GPU/GLES/TextureCacheGLES.cpp | 1 - GPU/GPUCommon.cpp | 1 - GPU/Vulkan/TextureCacheVulkan.cpp | 1 - Qt/QtMain.cpp | 3 --- UI/NativeApp.cpp | 6 ------ UWP/PPSSPP_UWPMain.cpp | 2 -- Windows/EmuThread.cpp | 2 -- android/jni/app-android.cpp | 1 - 34 files changed, 43 deletions(-) diff --git a/Core/Core.cpp b/Core/Core.cpp index 3423b714a7..2b157e4e83 100644 --- a/Core/Core.cpp +++ b/Core/Core.cpp @@ -34,7 +34,6 @@ #include "Common/Log.h" #include "Core/Core.h" #include "Core/Config.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "Core/SaveState.h" #include "Core/System.h" diff --git a/Core/Debugger/WebSocket/GameSubscriber.cpp b/Core/Debugger/WebSocket/GameSubscriber.cpp index 4ca0f3e5cb..6d4d356cfe 100644 --- a/Core/Debugger/WebSocket/GameSubscriber.cpp +++ b/Core/Debugger/WebSocket/GameSubscriber.cpp @@ -20,7 +20,6 @@ #include "Core/Debugger/WebSocket/GameSubscriber.h" #include "Core/Debugger/WebSocket/WebSocketUtils.h" #include "Core/ELF/ParamSFO.h" -#include "Core/Host.h" #include "Core/System.h" DebuggerSubscriber *WebSocketGameInit(DebuggerEventHandlerMap &map) { diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index bd0e9d1cac..6ee97d7490 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -28,7 +28,6 @@ #include "Core/Config.h" #include "Core/Core.h" #include "Core/CoreTiming.h" -#include "Core/Host.h" #include "Core/MemMapHelpers.h" #include "Core/Reporting.h" #include "Core/System.h" diff --git a/Core/HLE/__sceAudio.cpp b/Core/HLE/__sceAudio.cpp index 8d28aa5b93..ed4cec8da2 100644 --- a/Core/HLE/__sceAudio.cpp +++ b/Core/HLE/__sceAudio.cpp @@ -31,7 +31,6 @@ #include "Core/Config.h" #include "Core/CoreTiming.h" -#include "Core/Host.h" #include "Core/MemMapHelpers.h" #include "Core/Reporting.h" #include "Core/System.h" diff --git a/Core/HLE/proAdhoc.cpp b/Core/HLE/proAdhoc.cpp index 83c8661de6..69428833b5 100644 --- a/Core/HLE/proAdhoc.cpp +++ b/Core/HLE/proAdhoc.cpp @@ -64,7 +64,6 @@ #include "Common/TimeUtil.h" #include "Core/Config.h" #include "Core/Core.h" -#include "Core/Host.h" #include "Core/HLE/sceKernelInterrupt.h" #include "Core/HLE/sceKernelThread.h" #include "Core/HLE/sceKernelMemory.h" diff --git a/Core/HLE/sceAudio.cpp b/Core/HLE/sceAudio.cpp index 06996a8205..b518c8fc61 100644 --- a/Core/HLE/sceAudio.cpp +++ b/Core/HLE/sceAudio.cpp @@ -19,7 +19,6 @@ #include "Common/Serialize/SerializeFuncs.h" #include "Common/Data/Collections/FixedSizeQueue.h" #include "Core/MIPS/MIPS.h" -#include "Core/Host.h" #include "Core/CoreTiming.h" #include "Core/HLE/HLE.h" #include "Core/HLE/FunctionWrappers.h" diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index a5dda5d839..279b9e9318 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -37,7 +37,6 @@ #include "Core/Config.h" #include "Core/CoreTiming.h" #include "Core/CoreParameter.h" -#include "Core/Host.h" #include "Core/Reporting.h" #include "Core/Core.h" #include "Core/System.h" diff --git a/Core/HLE/sceUmd.cpp b/Core/HLE/sceUmd.cpp index c249b865a4..b85f962a03 100644 --- a/Core/HLE/sceUmd.cpp +++ b/Core/HLE/sceUmd.cpp @@ -24,7 +24,6 @@ #include "Core/Loaders.h" #include "Core/MemMap.h" #include "Core/System.h" -#include "Core/Host.h" #include "Core/CoreTiming.h" #include "Core/Reporting.h" #include "Core/MIPS/MIPS.h" diff --git a/Core/MIPS/IR/IRInterpreter.cpp b/Core/MIPS/IR/IRInterpreter.cpp index c003b4f4df..123f208f2f 100644 --- a/Core/MIPS/IR/IRInterpreter.cpp +++ b/Core/MIPS/IR/IRInterpreter.cpp @@ -24,7 +24,6 @@ #include "Core/Debugger/Breakpoints.h" #include "Core/HLE/HLE.h" #include "Core/HLE/ReplaceTables.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "Core/MIPS/MIPS.h" #include "Core/MIPS/MIPSTables.h" diff --git a/Core/MIPS/MIPSCodeUtils.cpp b/Core/MIPS/MIPSCodeUtils.cpp index faf620d5b1..d32d4e5888 100644 --- a/Core/MIPS/MIPSCodeUtils.cpp +++ b/Core/MIPS/MIPSCodeUtils.cpp @@ -18,7 +18,6 @@ #include "Core/MIPS/MIPS.h" #include "Core/MIPS/MIPSTables.h" #include "Core/MIPS/MIPSCodeUtils.h" -#include "Core/Host.h" #include "Core/MemMap.h" namespace MIPSCodeUtils diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 66a9762753..fd326d84a4 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -25,7 +25,6 @@ #include "Common/CommonTypes.h" #include "Core/Config.h" #include "Core/Core.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "Core/MIPS/MIPS.h" #include "Core/MIPS/MIPSCodeUtils.h" diff --git a/Core/MIPS/x86/CompBranch.cpp b/Core/MIPS/x86/CompBranch.cpp index 99a73c5b60..474936cde3 100644 --- a/Core/MIPS/x86/CompBranch.cpp +++ b/Core/MIPS/x86/CompBranch.cpp @@ -26,7 +26,6 @@ #include "Core/Reporting.h" #include "Core/HLE/HLE.h" #include "Core/HLE/HLETables.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "Core/MIPS/MIPS.h" diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index 2755a1ac5d..bca09f6fbf 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -43,7 +43,6 @@ #include "RegCache.h" #include "Jit.h" -#include "Core/Host.h" #include "Core/Debugger/Breakpoints.h" namespace MIPSComp diff --git a/Core/MemMapFunctions.cpp b/Core/MemMapFunctions.cpp index ecab020418..357db733db 100644 --- a/Core/MemMapFunctions.cpp +++ b/Core/MemMapFunctions.cpp @@ -22,7 +22,6 @@ #include "Core/MemMap.h" #include "Core/Config.h" #include "Core/ConfigValues.h" -#include "Core/Host.h" #include "Core/MIPS/MIPS.h" diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 6386ca09ee..3af4973621 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -35,7 +35,6 @@ #include "Core/Config.h" #include "Core/Core.h" #include "Core/CoreTiming.h" -#include "Core/Host.h" #include "Core/Screenshot.h" #include "Core/System.h" #include "Core/FileSystems/MetaFileSystem.h" diff --git a/Core/System.cpp b/Core/System.cpp index 66f1546611..c66b406174 100644 --- a/Core/System.cpp +++ b/Core/System.cpp @@ -49,7 +49,6 @@ #include "Core/MIPS/MIPSAnalyst.h" #include "Core/MIPS/MIPSVFPUUtils.h" #include "Core/Debugger/SymbolMap.h" -#include "Core/Host.h" #include "Core/System.h" #include "Core/HLE/HLE.h" #include "Core/HLE/Plugins.h" diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index b9124e85c9..76d00d840e 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -33,7 +33,6 @@ #include "Core/Config.h" #include "Common/BitScan.h" #include "Core/HDRemaster.h" -#include "Core/Host.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" #include "GPU/GPUInterface.h" diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 26d9a78107..8c61276862 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -37,7 +37,6 @@ #include "Core/Core.h" #include "Core/CoreParameter.h" #include "Core/Debugger/MemBlockInfo.h" -#include "Core/Host.h" #include "Core/MIPS/MIPS.h" #include "GPU/Common/DrawEngineCommon.h" #include "GPU/Common/FramebufferManagerCommon.h" diff --git a/GPU/Common/PresentationCommon.cpp b/GPU/Common/PresentationCommon.cpp index a73c72e278..f346226f12 100644 --- a/GPU/Common/PresentationCommon.cpp +++ b/GPU/Common/PresentationCommon.cpp @@ -29,7 +29,6 @@ #include "Common/TimeUtil.h" #include "Core/Config.h" #include "Core/ConfigValues.h" -#include "Core/Host.h" #include "Core/System.h" #include "Core/HW/Display.h" #include "GPU/Common/PostShader.h" diff --git a/GPU/Common/TextureReplacer.cpp b/GPU/Common/TextureReplacer.cpp index 21d18fbac3..c8b73a2e43 100644 --- a/GPU/Common/TextureReplacer.cpp +++ b/GPU/Common/TextureReplacer.cpp @@ -43,7 +43,6 @@ #include "Common/Thread/ThreadManager.h" #include "Common/TimeUtil.h" #include "Core/Config.h" -#include "Core/Host.h" #include "Core/System.h" #include "Core/ThreadPools.h" #include "Core/ELF/ParamSFO.h" diff --git a/GPU/D3D11/TextureCacheD3D11.cpp b/GPU/D3D11/TextureCacheD3D11.cpp index aed4f29b07..d658d19a01 100644 --- a/GPU/D3D11/TextureCacheD3D11.cpp +++ b/GPU/D3D11/TextureCacheD3D11.cpp @@ -35,7 +35,6 @@ #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/TextureDecoder.h" #include "Core/Config.h" -#include "Core/Host.h" #include "ext/xxhash.h" #include "Common/Math/math_util.h" diff --git a/GPU/Directx9/GPU_DX9.cpp b/GPU/Directx9/GPU_DX9.cpp index 70df04ea63..a760549ccc 100644 --- a/GPU/Directx9/GPU_DX9.cpp +++ b/GPU/Directx9/GPU_DX9.cpp @@ -25,7 +25,6 @@ #include "Core/Debugger/Breakpoints.h" #include "Core/MemMapHelpers.h" #include "Core/MIPS/MIPS.h" -#include "Core/Host.h" #include "Core/Config.h" #include "Core/ConfigValues.h" #include "Core/System.h" diff --git a/GPU/Directx9/ShaderManagerDX9.cpp b/GPU/Directx9/ShaderManagerDX9.cpp index 5380cf1491..0e48bc7b2e 100644 --- a/GPU/Directx9/ShaderManagerDX9.cpp +++ b/GPU/Directx9/ShaderManagerDX9.cpp @@ -38,7 +38,6 @@ #include "Common/StringUtils.h" #include "Core/Config.h" -#include "Core/Host.h" #include "GPU/Math3D.h" #include "GPU/GPUState.h" #include "GPU/ge_constants.h" diff --git a/GPU/Directx9/TextureCacheDX9.cpp b/GPU/Directx9/TextureCacheDX9.cpp index ef823b3673..04a1aafad1 100644 --- a/GPU/Directx9/TextureCacheDX9.cpp +++ b/GPU/Directx9/TextureCacheDX9.cpp @@ -31,7 +31,6 @@ #include "GPU/Common/FramebufferManagerCommon.h" #include "GPU/Common/TextureDecoder.h" #include "Core/Config.h" -#include "Core/Host.h" #include "ext/xxhash.h" #include "Common/Math/math_util.h" diff --git a/GPU/GLES/GPU_GLES.cpp b/GPU/GLES/GPU_GLES.cpp index 894c3fb0c5..35ad18e6d5 100644 --- a/GPU/GLES/GPU_GLES.cpp +++ b/GPU/GLES/GPU_GLES.cpp @@ -28,7 +28,6 @@ #include "Core/Config.h" #include "Core/Debugger/Breakpoints.h" #include "Core/MemMapHelpers.h" -#include "Core/Host.h" #include "Core/Config.h" #include "Core/Reporting.h" #include "Core/System.h" diff --git a/GPU/GLES/ShaderManagerGLES.cpp b/GPU/GLES/ShaderManagerGLES.cpp index 2ba61f510e..13a0f33761 100644 --- a/GPU/GLES/ShaderManagerGLES.cpp +++ b/GPU/GLES/ShaderManagerGLES.cpp @@ -42,7 +42,6 @@ #include "Common/File/FileUtil.h" #include "Common/TimeUtil.h" #include "Core/Config.h" -#include "Core/Host.h" #include "Core/System.h" #include "GPU/Math3D.h" #include "GPU/GPUState.h" diff --git a/GPU/GLES/TextureCacheGLES.cpp b/GPU/GLES/TextureCacheGLES.cpp index 52dfc979db..01c3e936fb 100644 --- a/GPU/GLES/TextureCacheGLES.cpp +++ b/GPU/GLES/TextureCacheGLES.cpp @@ -29,7 +29,6 @@ #include "Common/TimeUtil.h" #include "Core/Config.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "GPU/ge_constants.h" #include "GPU/GPUState.h" diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index d90cde535a..bc4a26844e 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -29,7 +29,6 @@ #include "Core/CoreTiming.h" #include "Core/Debugger/MemBlockInfo.h" #include "Core/MemMap.h" -#include "Core/Host.h" #include "Core/Reporting.h" #include "Core/HLE/HLE.h" #include "Core/HLE/sceKernelMemory.h" diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index 9e12fdb6e7..65184f3eb5 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -36,7 +36,6 @@ #include "Common/GPU/Vulkan/VulkanMemory.h" #include "Core/Config.h" -#include "Core/Host.h" #include "Core/MemMap.h" #include "Core/System.h" diff --git a/Qt/QtMain.cpp b/Qt/QtMain.cpp index bed85668a5..2a572703dc 100644 --- a/Qt/QtMain.cpp +++ b/Qt/QtMain.cpp @@ -863,9 +863,6 @@ int main(int argc, char *argv[]) g_mainWindow = new MainWindow(nullptr, g_Config.UseFullScreen()); g_mainWindow->show(); - if (!host) { - host = new Host(); - } // TODO: Support other backends than GL, like Vulkan, in the Qt backend. g_Config.iGPUBackend = (int)GPUBackend::OPENGL; diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 6775d95647..743cad6718 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -448,12 +448,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_dir, const ch #endif g_VFS.Register("", new DirectoryReader(Path(savegame_dir))); -#if (defined(MOBILE_DEVICE) || !defined(USING_QT_UI)) && !PPSSPP_PLATFORM(UWP) - if (host == nullptr) { - host = new Host(); - } -#endif - g_Config.defaultCurrentDirectory = Path("/"); g_Config.internalDataDirectory = Path(savegame_dir); diff --git a/UWP/PPSSPP_UWPMain.cpp b/UWP/PPSSPP_UWPMain.cpp index 3d158288d7..904906fbb9 100644 --- a/UWP/PPSSPP_UWPMain.cpp +++ b/UWP/PPSSPP_UWPMain.cpp @@ -26,7 +26,6 @@ #include "Common/System/NativeApp.h" #include "Common/System/Request.h" -#include "Core/Host.h" #include "Core/System.h" #include "Core/Loaders.h" #include "Core/Config.h" @@ -67,7 +66,6 @@ PPSSPP_UWPMain::PPSSPP_UWPMain(App ^app, const std::shared_ptrRegisterDeviceNotify(this); diff --git a/Windows/EmuThread.cpp b/Windows/EmuThread.cpp index b59cd60534..70f20acb14 100644 --- a/Windows/EmuThread.cpp +++ b/Windows/EmuThread.cpp @@ -155,8 +155,6 @@ void MainThreadFunc() { // We'll start up a separate thread we'll call Emu SetCurrentThreadName(useEmuThread ? "Render" : "Emu"); - host = new Host(); - SetConsolePosition(); System_SetWindowTitle(""); diff --git a/android/jni/app-android.cpp b/android/jni/app-android.cpp index 9ba1caf01b..8dfdf662b9 100644 --- a/android/jni/app-android.cpp +++ b/android/jni/app-android.cpp @@ -92,7 +92,6 @@ struct JNIEnv {}; #include "Core/System.h" #include "Core/HLE/sceUsbCam.h" #include "Core/HLE/sceUsbGps.h" -#include "Core/Host.h" #include "Common/CPUDetect.h" #include "Common/Log.h" #include "UI/GameInfoCache.h"