From 03d9157d2654e01ed8b7126b542121d0b1550a0f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Dec 2012 19:36:03 -0800 Subject: [PATCH 1/4] Draw offscreen in headless (Windows only.) --- CMakeLists.txt | 2 +- Core/HLE/sceKernel.cpp | 10 +- headless/Headless.cpp | 50 ++++------ headless/Headless.vcxproj | 9 +- headless/Headless.vcxproj.filters | 5 + headless/StubHost.h | 53 +++++++++++ headless/WindowsHeadlessHost.cpp | 147 ++++++++++++++++++++++++++++++ headless/WindowsHeadlessHost.h | 44 +++++++++ 8 files changed, 279 insertions(+), 41 deletions(-) create mode 100644 headless/StubHost.h create mode 100644 headless/WindowsHeadlessHost.cpp create mode 100644 headless/WindowsHeadlessHost.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a44d5bef0..f6d109a56d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -886,7 +886,7 @@ if(WIN32) endif() if(HEADLESS) - add_executable(PPSSPPHeadless headless/Headless.cpp) + add_executable(PPSSPPHeadless headless/Headless.cpp headless/StubHost.h) target_link_libraries(PPSSPPHeadless ${CoreLibName} ${COCOA_LIBRARY} ${CMAKE_THREAD_LIBS_INIT}) setup_target_project(PPSSPPHeadless headless) diff --git a/Core/HLE/sceKernel.cpp b/Core/HLE/sceKernel.cpp index b590393c49..01df21da5d 100644 --- a/Core/HLE/sceKernel.cpp +++ b/Core/HLE/sceKernel.cpp @@ -182,20 +182,18 @@ bool __KernelIsRunning() { void sceKernelExitGame() { INFO_LOG(HLE,"sceKernelExitGame"); - if (PSP_CoreParameter().headLess) - exit(0); - else + if (!PSP_CoreParameter().headLess) PanicAlert("Game exited"); + __KernelSwitchOffThread("game exited"); Core_Stop(); } void sceKernelExitGameWithStatus() { INFO_LOG(HLE,"sceKernelExitGameWithStatus"); - if (PSP_CoreParameter().headLess) - exit(0); - else + if (!PSP_CoreParameter().headLess) PanicAlert("Game exited (with status)"); + __KernelSwitchOffThread("game exited"); Core_Stop(); } diff --git a/headless/Headless.cpp b/headless/Headless.cpp index dabd2586e7..aaeb2ae7d9 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -12,35 +12,13 @@ #include "../Core/Host.h" #include "Log.h" #include "LogManager.h" +#include "file/vfs.h" +#include "file/zip_read.h" -// TODO: Get rid of this junk -class HeadlessHost : public Host -{ -public: - // virtual void StartThread() - virtual void UpdateUI() {} - - virtual void UpdateMemView() {} - virtual void UpdateDisassembly() {} - - virtual void SetDebugMode(bool mode) { } - - virtual void InitGL() {} - virtual void BeginFrame() {} - virtual void EndFrame() {} - virtual void ShutdownGL() {} - - virtual void InitSound(PMixer *mixer) {} - virtual void UpdateSound() {} - virtual void ShutdownSound() {} - - // this is sent from EMU thread! Make sure that Host handles it properly! - virtual void BootDone() {} - virtual void PrepareShutdown() {} - - virtual bool IsDebuggingEnabled() {return false;} - virtual bool AttemptLoadSymbolMap() {return false;} -}; +#include "StubHost.h" +#ifdef _WIN32 +#include "WindowsHeadlessHost.h" +#endif class PrintfLogger : public LogListener { @@ -140,7 +118,12 @@ int main(int argc, const char* argv[]) return 1; } - host = new HeadlessHost(); + VFSRegister("", new DirectoryAssetReader("assets/")); + VFSRegister("", new DirectoryAssetReader("")); + + HeadlessHost *headlessHost = new HEADLESSHOST_CLASS(); + host = headlessHost; + host->InitGL(); LogManager::Init(); LogManager *logman = LogManager::GetInstance(); @@ -160,7 +143,7 @@ int main(int argc, const char* argv[]) coreParameter.mountIso = mountIso ? mountIso : ""; coreParameter.startPaused = false; coreParameter.cpuCore = useJit ? CPU_JIT : (fastInterpreter ? CPU_FASTINTERPRETER : CPU_INTERPRETER); - coreParameter.gpuCore = GPU_NULL; + coreParameter.gpuCore = headlessHost->isGLWorking() ? GPU_GLES : GPU_NULL; coreParameter.enableSound = false; coreParameter.headLess = true; coreParameter.printfEmuLog = true; @@ -191,10 +174,13 @@ int main(int argc, const char* argv[]) coreState = CORE_RUNNING; } - // NOTE: we won't get here until I've gotten rid of the exit(0) in sceExitProcess or whatever it's called - + host->ShutdownGL(); PSP_Shutdown(); + delete host; + host = NULL; + headlessHost = NULL; + if (autoCompare) { std::string expect_filename = std::string(bootFilename).substr(strlen(bootFilename - 4)) + ".expected"; diff --git a/headless/Headless.vcxproj b/headless/Headless.vcxproj index e4e8907ff7..3e58e022a8 100644 --- a/headless/Headless.vcxproj +++ b/headless/Headless.vcxproj @@ -81,7 +81,7 @@ Level3 Disabled WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ../Common;..;../Core;../native/ext/glew; + ../Common;..;../Core;../native/ext/glew;../native Default @@ -112,7 +112,7 @@ true true WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ../Common;..;../Core;../native/ext/glew; + ../Common;..;../Core;../native/ext/glew;../native false StreamingSIMDExtensions2 Fast @@ -151,6 +151,7 @@ NotUsing NotUsing + @@ -175,6 +176,10 @@ {f761046e-6c38-4428-a5f1-38391a37bb34} + + + + diff --git a/headless/Headless.vcxproj.filters b/headless/Headless.vcxproj.filters index cb596797fd..5982bf35db 100644 --- a/headless/Headless.vcxproj.filters +++ b/headless/Headless.vcxproj.filters @@ -3,8 +3,13 @@ + + + + + \ No newline at end of file diff --git a/headless/StubHost.h b/headless/StubHost.h new file mode 100644 index 0000000000..5c9e4364fb --- /dev/null +++ b/headless/StubHost.h @@ -0,0 +1,53 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +#include "../Core/Host.h" + +#define HEADLESSHOST_CLASS HeadlessHost + +// TODO: Get rid of this junk +class HeadlessHost : public Host +{ +public: + // virtual void StartThread() + virtual void UpdateUI() {} + + virtual void UpdateMemView() {} + virtual void UpdateDisassembly() {} + + virtual void SetDebugMode(bool mode) { } + + virtual void InitGL() {} + virtual void BeginFrame() {} + virtual void EndFrame() {} + virtual void ShutdownGL() {} + + virtual void InitSound(PMixer *mixer) {} + virtual void UpdateSound() {} + virtual void ShutdownSound() {} + + // this is sent from EMU thread! Make sure that Host handles it properly + virtual void BootDone() {} + virtual void PrepareShutdown() {} + + virtual bool IsDebuggingEnabled() {return false;} + virtual bool AttemptLoadSymbolMap() {return false;} + + virtual bool isGLWorking() { return false; } +}; \ No newline at end of file diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp new file mode 100644 index 0000000000..ce7086d41d --- /dev/null +++ b/headless/WindowsHeadlessHost.cpp @@ -0,0 +1,147 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#include "WindowsHeadlessHost.h" + +#include +#include + +#include "../native/gfx_es2/gl_state.h" +#include "../native/gfx/gl_common.h" + +const bool WINDOW_VISIBLE = false; +const int WINDOW_WIDTH = 480; +const int WINDOW_HEIGHT = 272; + +typedef BOOL (APIENTRY *PFNWGLSWAPINTERVALFARPROC)(int value); +PFNWGLSWAPINTERVALFARPROC wglSwapIntervalEXT = NULL; + +HWND CreateHiddenWindow() +{ + static WNDCLASSEX wndClass = { + sizeof(WNDCLASSEX), + CS_HREDRAW | CS_VREDRAW | CS_OWNDC, + DefWindowProc, + 0, + 0, + NULL, + NULL, + LoadCursor(NULL, IDC_ARROW), + (HBRUSH) GetStockObject(BLACK_BRUSH), + NULL, + "PPSSPPHeadless", + NULL, + }; + RegisterClassEx(&wndClass); + + DWORD style = WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_POPUP; + return CreateWindowEx(0, "PPSSPPHeadless", "PPSSPPHeadless", style, CW_USEDEFAULT, CW_USEDEFAULT, WINDOW_WIDTH, WINDOW_HEIGHT, NULL, NULL, NULL, NULL); +} + +void SetVSync(int value) +{ + const char *extensions = (const char *) glGetString(GL_EXTENSIONS); + + if (!strstr(extensions, "WGL_EXT_swap_control")) + return; + + wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC) wglGetProcAddress("wglSwapIntervalEXT"); + if (wglSwapIntervalEXT != NULL) + wglSwapIntervalEXT(value); +} + +void WindowsHeadlessHost::InitGL() +{ + glOkay = false; + hWnd = CreateHiddenWindow(); + + if (WINDOW_VISIBLE) + { + ShowWindow(hWnd, TRUE); + SetFocus(hWnd); + } + + int pixelFormat; + + static PIXELFORMATDESCRIPTOR pfd = {0}; + pfd.nSize = sizeof(pfd); + pfd.nVersion = 1; + pfd.dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER; + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = 32; + pfd.cDepthBits = 16; + pfd.iLayerType = PFD_MAIN_PLANE; + +#define ENFORCE(x, msg) { if (!(x)) { fprintf(stderr, msg); return; } } + + ENFORCE(hDC = GetDC(hWnd), "Unable to create DC."); + ENFORCE(pixelFormat = ChoosePixelFormat(hDC, &pfd), "Unable to match pixel format."); + ENFORCE(SetPixelFormat(hDC, pixelFormat, &pfd), "Unable to set pixel format."); + ENFORCE(hRC = wglCreateContext(hDC), "Unable to create GL context."); + ENFORCE(wglMakeCurrent(hDC, hRC), "Unable to activate GL context."); + + SetVSync(0); + + glewInit(); + glstate.Initialize(); + + if (ResizeGL()) + glOkay = true; +} + +void WindowsHeadlessHost::ShutdownGL() +{ + if (hRC) + { + wglMakeCurrent(NULL, NULL); + wglDeleteContext(hRC); + hRC = NULL; + } + + if (hDC) + ReleaseDC(hWnd, hDC); + hDC = NULL; + DestroyWindow(hWnd); + hWnd = NULL; +} + +bool WindowsHeadlessHost::ResizeGL() +{ + if (!hWnd) + return false; + + RECT rc; + GetWindowRect(hWnd, &rc); + + glViewport(0, 0, WINDOW_WIDTH, WINDOW_HEIGHT); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(0.0f, WINDOW_WIDTH, WINDOW_HEIGHT, 0.0f, -1.0f, 1.0f); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); + return true; +} + +void WindowsHeadlessHost::BeginFrame() +{ + +} + +void WindowsHeadlessHost::EndFrame() +{ + SwapBuffers(hDC); +} diff --git a/headless/WindowsHeadlessHost.h b/headless/WindowsHeadlessHost.h new file mode 100644 index 0000000000..2dc2b5b0b4 --- /dev/null +++ b/headless/WindowsHeadlessHost.h @@ -0,0 +1,44 @@ +// Copyright (c) 2012- PPSSPP Project. + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, version 2.0 or later versions. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License 2.0 for more details. + +// A copy of the GPL 2.0 should have been included with the program. +// If not, see http://www.gnu.org/licenses/ + +// Official git repository and contact information can be found at +// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/. + +#pragma once + +#include "StubHost.h" + +#undef HEADLESSHOST_CLASS +#define HEADLESSHOST_CLASS WindowsHeadlessHost + +#include + +// TODO: Get rid of this junk +class WindowsHeadlessHost : public HeadlessHost +{ +public: + virtual void InitGL(); + virtual void BeginFrame(); + virtual void EndFrame(); + virtual void ShutdownGL(); + virtual bool isGLWorking() { return glOkay; } + +private: + bool ResizeGL(); + + bool glOkay; + HWND hWnd; + HDC hDC; + HGLRC hRC; +}; \ No newline at end of file From ade0f4103b3fd5b7829fd2103a88fa9d8579d663 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Dec 2012 20:49:45 -0800 Subject: [PATCH 2/4] Don't let native's log output spoil tests. Also, log to stderr, makes more sense anyway. --- Core/HLE/sceIo.cpp | 7 +++---- Core/Host.h | 3 +++ headless/Headless.cpp | 18 +++++++----------- headless/StubHost.h | 2 ++ headless/WindowsHeadlessHost.cpp | 31 +++++++++++++++++++++++++++++-- headless/WindowsHeadlessHost.h | 4 ++++ 6 files changed, 48 insertions(+), 17 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index c3b1386894..ef817f557c 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -22,6 +22,7 @@ #include "../System.h" #include "../Config.h" +#include "../Host.h" #include "../SaveState.h" #include "HLE.h" #include "../MIPS/MIPS.h" @@ -644,10 +645,8 @@ u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 outPtr, std::string data(Memory::GetCharPointer(argAddr), argLen); if (PSP_CoreParameter().printfEmuLog) { - printf("%s", data.c_str()); -#ifdef _WIN32 - OutputDebugString(data.c_str()); -#endif + host->SendDebugOutput(data.c_str()); + // Also collect the debug output emuDebugOutput += data; } diff --git a/Core/Host.h b/Core/Host.h index 5600e01393..056395184c 100644 --- a/Core/Host.h +++ b/Core/Host.h @@ -60,6 +60,9 @@ public: virtual bool IsDebuggingEnabled() {return true;} virtual bool AttemptLoadSymbolMap() {return false;} virtual void SetWindowTitle(const char *message) {} + + // Used for headless. + virtual void SendDebugOutput(const std::string &output) {} }; extern Host *host; diff --git a/headless/Headless.cpp b/headless/Headless.cpp index aaeb2ae7d9..b4d0880b85 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -12,8 +12,6 @@ #include "../Core/Host.h" #include "Log.h" #include "LogManager.h" -#include "file/vfs.h" -#include "file/zip_read.h" #include "StubHost.h" #ifdef _WIN32 @@ -28,20 +26,20 @@ public: switch (level) { case LogTypes::LDEBUG: - printf("D %s", msg); + fprintf(stderr, "D %s", msg); break; case LogTypes::LINFO: - printf("I %s", msg); + fprintf(stderr, "I %s", msg); break; case LogTypes::LERROR: - printf("E %s", msg); + fprintf(stderr, "E %s", msg); break; case LogTypes::LWARNING: - printf("W %s", msg); + fprintf(stderr, "W %s", msg); break; case LogTypes::LNOTICE: default: - printf("N %s", msg); + fprintf(stderr, "N %s", msg); break; } } @@ -118,9 +116,6 @@ int main(int argc, const char* argv[]) return 1; } - VFSRegister("", new DirectoryAssetReader("assets/")); - VFSRegister("", new DirectoryAssetReader("")); - HeadlessHost *headlessHost = new HEADLESSHOST_CLASS(); host = headlessHost; host->InitGL(); @@ -160,8 +155,9 @@ int main(int argc, const char* argv[]) return 1; } - coreState = CORE_RUNNING; + host->BootDone(); + coreState = CORE_RUNNING; while (coreState == CORE_RUNNING) { // Run for a frame at a time, just because. diff --git a/headless/StubHost.h b/headless/StubHost.h index 5c9e4364fb..9445aee06c 100644 --- a/headless/StubHost.h +++ b/headless/StubHost.h @@ -49,5 +49,7 @@ public: virtual bool IsDebuggingEnabled() {return false;} virtual bool AttemptLoadSymbolMap() {return false;} + virtual void SendDebugOutput(const std::string &output) { printf("%s", output.c_str()); } + virtual bool isGLWorking() { return false; } }; \ No newline at end of file diff --git a/headless/WindowsHeadlessHost.cpp b/headless/WindowsHeadlessHost.cpp index ce7086d41d..dd473a8279 100644 --- a/headless/WindowsHeadlessHost.cpp +++ b/headless/WindowsHeadlessHost.cpp @@ -19,9 +19,13 @@ #include #include +#include -#include "../native/gfx_es2/gl_state.h" -#include "../native/gfx/gl_common.h" +#include "gfx_es2/gl_state.h" +#include "gfx/gl_common.h" +#include "gfx/gl_lost_manager.h" +#include "file/vfs.h" +#include "file/zip_read.h" const bool WINDOW_VISIBLE = false; const int WINDOW_WIDTH = 480; @@ -64,6 +68,27 @@ void SetVSync(int value) wglSwapIntervalEXT(value); } +void WindowsHeadlessHost::LoadNativeAssets() +{ + // Native is kinda talkative, but that's annoying in our case. + out = _fdopen(_dup(_fileno(stdout)), "wt"); + freopen("NUL", "wt", stdout); + + VFSRegister("", new DirectoryAssetReader("assets/")); + VFSRegister("", new DirectoryAssetReader("")); + VFSRegister("", new DirectoryAssetReader("../")); + + gl_lost_manager_init(); + + // See SendDebugOutput() for how things get back on track. +} + +void WindowsHeadlessHost::SendDebugOutput(const std::string &output) +{ + fprintf_s(out, "%s", output.c_str()); + OutputDebugString(output.c_str()); +} + void WindowsHeadlessHost::InitGL() { glOkay = false; @@ -99,6 +124,8 @@ void WindowsHeadlessHost::InitGL() glewInit(); glstate.Initialize(); + LoadNativeAssets(); + if (ResizeGL()) glOkay = true; } diff --git a/headless/WindowsHeadlessHost.h b/headless/WindowsHeadlessHost.h index 2dc2b5b0b4..28e51ee543 100644 --- a/headless/WindowsHeadlessHost.h +++ b/headless/WindowsHeadlessHost.h @@ -34,11 +34,15 @@ public: virtual void ShutdownGL(); virtual bool isGLWorking() { return glOkay; } + virtual void SendDebugOutput(const std::string &output); + private: bool ResizeGL(); + void LoadNativeAssets(); bool glOkay; HWND hWnd; HDC hDC; HGLRC hRC; + FILE *out; }; \ No newline at end of file From 1c8280b15e18bece273a005c7792bceb1f5706c4 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 29 Dec 2012 21:01:13 -0800 Subject: [PATCH 3/4] Make graphics optional, it's slower to start. Might also be nice to batch tests. --- headless/Headless.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/headless/Headless.cpp b/headless/Headless.cpp index b4d0880b85..b0b3362a14 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -55,6 +55,12 @@ void printUsage(const char *progname, const char *reason) fprintf(stderr, "Options:\n"); fprintf(stderr, " -m, --mount umd.cso mount iso on umd:\n"); fprintf(stderr, " -l, --log full log output, not just emulated printfs\n"); + + HEADLESSHOST_CLASS h1; + HeadlessHost h2; + if (typeid(h1) != typeid(h2)) + fprintf(stderr, " --graphics use the full gpu backend (slower)\n"); + fprintf(stderr, " -f use the fast interpreter\n"); fprintf(stderr, " -j use jit (overrides -f)\n"); fprintf(stderr, " -c, --compare compare with output in file.expected\n"); @@ -67,6 +73,7 @@ int main(int argc, const char* argv[]) bool useJit = false; bool fastInterpreter = false; bool autoCompare = false; + bool useGraphics = false; const char *bootFilename = 0; const char *mountIso = 0; @@ -90,6 +97,8 @@ int main(int argc, const char* argv[]) fastInterpreter = true; else if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--compare")) autoCompare = true; + else if (!strcmp(argv[i], "--graphics")) + useGraphics = true; else if (bootFilename == 0) bootFilename = argv[i]; else @@ -116,7 +125,7 @@ int main(int argc, const char* argv[]) return 1; } - HeadlessHost *headlessHost = new HEADLESSHOST_CLASS(); + HeadlessHost *headlessHost = useGraphics ? new HEADLESSHOST_CLASS() : new HeadlessHost(); host = headlessHost; host->InitGL(); From 62b1fe0fb13abf16115d7ec64171bb313ea1cf49 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sun, 30 Dec 2012 00:00:58 -0800 Subject: [PATCH 4/4] sceIo doesn't have to do emu output, headless can. --- Core/HLE/sceIo.cpp | 9 --------- Core/HLE/sceIo.h | 2 -- 2 files changed, 11 deletions(-) diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index ef817f557c..4f5ff5c8a4 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -78,12 +78,6 @@ typedef s32 SceMode; typedef s64 SceOff; typedef u64 SceIores; -std::string emuDebugOutput; - -const std::string &EmuDebugOutput() { - return emuDebugOutput; -} - typedef u32 (*DeferredAction)(SceUID id, int param); DeferredAction defAction = 0; u32 defParam = 0; @@ -646,9 +640,6 @@ u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 outPtr, if (PSP_CoreParameter().printfEmuLog) { host->SendDebugOutput(data.c_str()); - - // Also collect the debug output - emuDebugOutput += data; } else { diff --git a/Core/HLE/sceIo.h b/Core/HLE/sceIo.h index 0f87cde613..d05c00df06 100644 --- a/Core/HLE/sceIo.h +++ b/Core/HLE/sceIo.h @@ -29,5 +29,3 @@ KernelObject *__KernelDirListingObject(); void Register_IoFileMgrForUser(); void Register_StdioForUser(); - -const std::string &EmuDebugOutput();