From b3e05aad1d9fec7a46940d035789c5c843b26279 Mon Sep 17 00:00:00 2001 From: SSimco <37044560+SSimco@users.noreply.github.com> Date: Sat, 12 Jul 2025 10:18:39 +0300 Subject: [PATCH] Update new code to match the coding style guidelines --- src/Cafe/CafeSystem.cpp | 6 +-- src/Cafe/Filesystem/FST/KeyCache.cpp | 4 +- src/Cafe/GraphicPack/GraphicPack2Patches.cpp | 2 +- src/Cafe/HW/Espresso/Debugger/Debugger.cpp | 22 +++++----- src/Cafe/HW/Espresso/Debugger/Debugger.h | 40 ++++++++--------- src/Cafe/HW/Latte/Core/LatteOverlay.cpp | 8 ++-- .../HW/Latte/Core/LattePerformanceMonitor.cpp | 4 +- src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp | 10 ++--- src/Cafe/HW/Latte/Core/LatteShaderCache.cpp | 2 +- src/Cafe/HW/Latte/Core/LatteThread.cpp | 2 +- .../Latte/Renderer/OpenGL/OpenGLRenderer.cpp | 22 +++++----- src/Cafe/HW/Latte/Renderer/Renderer.cpp | 6 +-- .../Latte/Renderer/Vulkan/SwapchainInfoVk.cpp | 2 +- .../Latte/Renderer/Vulkan/VulkanRenderer.cpp | 16 +++---- src/Cafe/HW/MMU/MMU.cpp | 4 +- src/Cafe/OS/RPL/rpl.cpp | 4 +- src/Cafe/OS/libs/padscore/padscore.cpp | 2 +- src/Cafe/OS/libs/vpad/vpad.cpp | 2 +- .../Tools/DownloadManager/DownloadManager.cpp | 2 +- src/gui/interface/WindowSystem.h | 44 +++++++++---------- src/gui/wxgui/MainWindow.cpp | 6 +-- src/gui/wxgui/canvas/VulkanCanvas.cpp | 2 +- src/gui/wxgui/debugger/BreakpointWindow.cpp | 2 +- src/gui/wxgui/debugger/DebuggerWindow2.cpp | 16 +++---- src/gui/wxgui/debugger/DebuggerWindow2.h | 12 ++--- src/gui/wxgui/debugger/ModuleWindow.cpp | 2 +- src/gui/wxgui/debugger/SymbolCtrl.cpp | 2 +- src/gui/wxgui/input/panels/InputPanel.cpp | 2 +- src/gui/wxgui/wxWindowSystem.cpp | 42 +++++++++--------- src/imgui/imgui_extension.cpp | 2 +- src/input/api/Controller.cpp | 2 +- src/input/api/Keyboard/KeyboardController.cpp | 4 +- src/input/emulated/VPADController.cpp | 4 +- src/main.cpp | 2 +- src/mainLLE.cpp | 2 +- 35 files changed, 153 insertions(+), 153 deletions(-) diff --git a/src/Cafe/CafeSystem.cpp b/src/Cafe/CafeSystem.cpp index 8a2239b0..0a145a94 100644 --- a/src/Cafe/CafeSystem.cpp +++ b/src/Cafe/CafeSystem.cpp @@ -169,7 +169,7 @@ void LoadMainExecutable() applicationRPX = RPLLoader_LoadFromMemory(rpxData, rpxSize, (char*)_pathToExecutable.c_str()); if (!applicationRPX) { - WindowSystem::showErrorDialog(_tr("Failed to run this title because the executable is damaged")); + WindowSystem::ShowErrorDialog(_tr("Failed to run this title because the executable is damaged")); cemuLog_createLogFile(false); cemuLog_waitForFlush(); exit(0); @@ -354,7 +354,7 @@ uint32 LoadSharedData() void cemu_initForGame() { - WindowSystem::updateWindowTitles(false, true, 0.0); + WindowSystem::UpdateWindowTitles(false, true, 0.0); // input manager apply game profile InputManager::instance().apply_game_profile(); // log info for launched title @@ -852,7 +852,7 @@ namespace CafeSystem PPCTimer_waitForInit(); // start system sSystemRunning = true; - WindowSystem::notifyGameLoaded(); + WindowSystem::NotifyGameLoaded(); std::thread t(_LaunchTitleThread); t.detach(); } diff --git a/src/Cafe/Filesystem/FST/KeyCache.cpp b/src/Cafe/Filesystem/FST/KeyCache.cpp index 6699f49b..f85d2b54 100644 --- a/src/Cafe/Filesystem/FST/KeyCache.cpp +++ b/src/Cafe/Filesystem/FST/KeyCache.cpp @@ -75,7 +75,7 @@ void KeyCache_Prepare() } else { - WindowSystem::showErrorDialog(_tr("Unable to create file keys.txt\nThis can happen if Cemu does not have write permission to its own directory, the disk is full or if anti-virus software is blocking Cemu."), _tr("Error"), WindowSystem::ErrorCategory::KEYS_TXT_CREATION); + WindowSystem::ShowErrorDialog(_tr("Unable to create file keys.txt\nThis can happen if Cemu does not have write permission to its own directory, the disk is full or if anti-virus software is blocking Cemu."), _tr("Error"), WindowSystem::ErrorCategory::KEYS_TXT_CREATION); } mtxKeyCache.unlock(); return; @@ -109,7 +109,7 @@ void KeyCache_Prepare() if( strishex(line) == false ) { auto errorMsg = _tr("Error in keys.txt at line {}", lineNumber); - WindowSystem::showErrorDialog(errorMsg, WindowSystem::ErrorCategory::KEYS_TXT_CREATION); + WindowSystem::ShowErrorDialog(errorMsg, WindowSystem::ErrorCategory::KEYS_TXT_CREATION); continue; } if(line.size() == 32 ) diff --git a/src/Cafe/GraphicPack/GraphicPack2Patches.cpp b/src/Cafe/GraphicPack/GraphicPack2Patches.cpp index 3236341a..d0d00bf2 100644 --- a/src/Cafe/GraphicPack/GraphicPack2Patches.cpp +++ b/src/Cafe/GraphicPack/GraphicPack2Patches.cpp @@ -63,7 +63,7 @@ void PatchErrorHandler::showStageErrorMessageBox() } } - WindowSystem::showErrorDialog(errorMsg, _tr("Graphic pack error"), WindowSystem::ErrorCategory::GRAPHIC_PACKS); + WindowSystem::ShowErrorDialog(errorMsg, _tr("Graphic pack error"), WindowSystem::ErrorCategory::GRAPHIC_PACKS); } // loads Cemu-style patches (patch_.asm) diff --git a/src/Cafe/HW/Espresso/Debugger/Debugger.cpp b/src/Cafe/HW/Espresso/Debugger/Debugger.cpp index 73c00c07..fbfc94fe 100644 --- a/src/Cafe/HW/Espresso/Debugger/Debugger.cpp +++ b/src/Cafe/HW/Espresso/Debugger/Debugger.cpp @@ -338,7 +338,7 @@ void debugger_toggleBreakpoint(uint32 address, bool state, DebuggerBreakpoint* b { bp->enabled = state; debugger_updateExecutionBreakpoint(address); - g_debuggerDispatcher.updateViewThreadsafe(); + g_debuggerDispatcher.UpdateViewThreadsafe(); } else if (bpItr->isMemBP()) { @@ -360,7 +360,7 @@ void debugger_toggleBreakpoint(uint32 address, bool state, DebuggerBreakpoint* b debugger_updateMemoryBreakpoint(bpItr); else debugger_updateMemoryBreakpoint(nullptr); - g_debuggerDispatcher.updateViewThreadsafe(); + g_debuggerDispatcher.UpdateViewThreadsafe(); } return; } @@ -497,7 +497,7 @@ void debugger_stepInto(PPCInterpreter_t* hCPU, bool updateDebuggerWindow = true) debugger_updateExecutionBreakpoint(initialIP); debuggerState.debugSession.instructionPointer = hCPU->instructionPointer; if(updateDebuggerWindow) - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); ppcRecompilerEnabled = isRecEnabled; } @@ -516,7 +516,7 @@ bool debugger_stepOver(PPCInterpreter_t* hCPU) // nothing to skip, use step-into debugger_stepInto(hCPU); debugger_updateExecutionBreakpoint(initialIP); - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); ppcRecompilerEnabled = isRecEnabled; return false; } @@ -524,7 +524,7 @@ bool debugger_stepOver(PPCInterpreter_t* hCPU) debugger_createCodeBreakpoint(initialIP + 4, DEBUGGER_BP_T_ONE_SHOT); // step over current instruction (to avoid breakpoint) debugger_stepInto(hCPU); - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); // restore breakpoints debugger_updateExecutionBreakpoint(initialIP); // run @@ -622,8 +622,8 @@ void debugger_enterTW(PPCInterpreter_t* hCPU) DebuggerBreakpoint* singleshotBP = debugger_getFirstBP(debuggerState.debugSession.instructionPointer, DEBUGGER_BP_T_ONE_SHOT); if (singleshotBP) debugger_deleteBreakpoint(singleshotBP); - g_debuggerDispatcher.notifyDebugBreakpointHit(); - g_debuggerDispatcher.updateViewThreadsafe(); + g_debuggerDispatcher.NotifyDebugBreakpointHit(); + g_debuggerDispatcher.UpdateViewThreadsafe(); // reset step control debuggerState.debugSession.stepInto = false; debuggerState.debugSession.stepOver = false; @@ -640,14 +640,14 @@ void debugger_enterTW(PPCInterpreter_t* hCPU) break; // if true is returned, continue with execution } debugger_createPPCStateSnapshot(hCPU); - g_debuggerDispatcher.updateViewThreadsafe(); + g_debuggerDispatcher.UpdateViewThreadsafe(); debuggerState.debugSession.stepOver = false; } if (debuggerState.debugSession.stepInto) { debugger_stepInto(hCPU); debugger_createPPCStateSnapshot(hCPU); - g_debuggerDispatcher.updateViewThreadsafe(); + g_debuggerDispatcher.UpdateViewThreadsafe(); debuggerState.debugSession.stepInto = false; continue; } @@ -664,8 +664,8 @@ void debugger_enterTW(PPCInterpreter_t* hCPU) debuggerState.debugSession.isTrapped = false; debuggerState.debugSession.hCPU = nullptr; - g_debuggerDispatcher.updateViewThreadsafe(); - g_debuggerDispatcher.notifyRun(); + g_debuggerDispatcher.UpdateViewThreadsafe(); + g_debuggerDispatcher.NotifyRun(); } void debugger_shouldBreak(PPCInterpreter_t* hCPU) diff --git a/src/Cafe/HW/Espresso/Debugger/Debugger.h b/src/Cafe/HW/Espresso/Debugger/Debugger.h index 83f926a6..d385cadd 100644 --- a/src/Cafe/HW/Espresso/Debugger/Debugger.h +++ b/src/Cafe/HW/Espresso/Debugger/Debugger.h @@ -18,12 +18,12 @@ class DebuggerCallbacks { public: - virtual void updateViewThreadsafe() {} - virtual void notifyDebugBreakpointHit() {} - virtual void notifyRun() {} - virtual void moveIP() {} - virtual void notifyModuleLoaded(void* module) {} - virtual void notifyModuleUnloaded(void* module) {} + virtual void UpdateViewThreadsafe() {} + virtual void NotifyDebugBreakpointHit() {} + virtual void NotifyRun() {} + virtual void MoveIP() {} + virtual void NotifyModuleLoaded(void* module) {} + virtual void NotifyModuleUnloaded(void* module) {} virtual ~DebuggerCallbacks() = default; }; @@ -36,46 +36,46 @@ class DebuggerDispatcher DebuggerCallbacks* m_callbacks = &s_defaultDebuggerCallbacks; public: - void setDebuggerCallbacks(DebuggerCallbacks* debuggerCallbacks) + void SetDebuggerCallbacks(DebuggerCallbacks* debuggerCallbacks) { cemu_assert_debug(m_callbacks == &s_defaultDebuggerCallbacks); m_callbacks = debuggerCallbacks; } - void clearDebuggerCallbacks() + void ClearDebuggerCallbacks() { cemu_assert_debug(m_callbacks != &s_defaultDebuggerCallbacks); m_callbacks = &s_defaultDebuggerCallbacks; } - void updateViewThreadsafe() + void UpdateViewThreadsafe() { - m_callbacks->updateViewThreadsafe(); + m_callbacks->UpdateViewThreadsafe(); } - void notifyDebugBreakpointHit() + void NotifyDebugBreakpointHit() { - m_callbacks->notifyDebugBreakpointHit(); + m_callbacks->NotifyDebugBreakpointHit(); } - void notifyRun() + void NotifyRun() { - m_callbacks->notifyRun(); + m_callbacks->NotifyRun(); } - void moveIP() + void MoveIP() { - m_callbacks->moveIP(); + m_callbacks->MoveIP(); } - void notifyModuleLoaded(void* module) + void NotifyModuleLoaded(void* module) { - m_callbacks->notifyModuleLoaded(module); + m_callbacks->NotifyModuleLoaded(module); } - void notifyModuleUnloaded(void* module) + void NotifyModuleUnloaded(void* module) { - m_callbacks->notifyModuleUnloaded(module); + m_callbacks->NotifyModuleUnloaded(module); } } extern g_debuggerDispatcher; diff --git a/src/Cafe/HW/Latte/Core/LatteOverlay.cpp b/src/Cafe/HW/Latte/Core/LatteOverlay.cpp index 63356260..7499d743 100644 --- a/src/Cafe/HW/Latte/Core/LatteOverlay.cpp +++ b/src/Cafe/HW/Latte/Core/LatteOverlay.cpp @@ -519,17 +519,17 @@ void LatteOverlay_render(bool pad_view) return; sint32 w = 0, h = 0; - if (pad_view && WindowSystem::isPadWindowOpen()) - WindowSystem::getPadWindowPhysSize(w, h); + if (pad_view && WindowSystem::IsPadWindowOpen()) + WindowSystem::GetPadWindowPhysSize(w, h); else - WindowSystem::getWindowPhysSize(w, h); + WindowSystem::GetWindowPhysSize(w, h); if (w == 0 || h == 0) return; const Vector2f window_size{ (float)w,(float)h }; - float fontDPIScale = !pad_view ? WindowSystem::getWindowDPIScale() : WindowSystem::getPadDPIScale(); + float fontDPIScale = !pad_view ? WindowSystem::GetWindowDPIScale() : WindowSystem::GetPadDPIScale(); float overlayFontSize = 14.0f * (float)config.overlay.text_scale / 100.0f * fontDPIScale; diff --git a/src/Cafe/HW/Latte/Core/LattePerformanceMonitor.cpp b/src/Cafe/HW/Latte/Core/LattePerformanceMonitor.cpp index 96dfeee3..a3bcb63e 100644 --- a/src/Cafe/HW/Latte/Core/LattePerformanceMonitor.cpp +++ b/src/Cafe/HW/Latte/Core/LattePerformanceMonitor.cpp @@ -106,12 +106,12 @@ void LattePerformanceMonitor_frameEnd() if (isFirstUpdate) { LatteOverlay_updateStats(0.0, 0, 0); - WindowSystem::updateWindowTitles(false, false, 0.0); + WindowSystem::UpdateWindowTitles(false, false, 0.0); } else { LatteOverlay_updateStats(fps, drawCallCounter / elapsedFrames, fastDrawCallCounter / elapsedFrames); - WindowSystem::updateWindowTitles(false, false, fps); + WindowSystem::UpdateWindowTitles(false, false, fps); } } } diff --git a/src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp b/src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp index ff60ec45..be9917e1 100644 --- a/src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp +++ b/src/Cafe/HW/Latte/Core/LatteRenderTarget.cpp @@ -838,10 +838,10 @@ sint32 _currentOutputImageHeight = 0; void LatteRenderTarget_getScreenImageArea(sint32* x, sint32* y, sint32* width, sint32* height, sint32* fullWidth, sint32* fullHeight, bool padView) { int w, h; - if(padView && WindowSystem::isPadWindowOpen()) - WindowSystem::getPadWindowPhysSize(w, h); + if(padView && WindowSystem::IsPadWindowOpen()) + WindowSystem::GetPadWindowPhysSize(w, h); else - WindowSystem::getWindowPhysSize(w, h); + WindowSystem::GetWindowPhysSize(w, h); sint32 scaledOutputX; sint32 scaledOutputY; @@ -999,8 +999,8 @@ void LatteRenderTarget_itHLECopyColorBufferToScanBuffer(MPTR colorBufferPtr, uin return {pressed && !toggle, pressed && toggle}; }; - const bool tabPressed = WindowSystem::isKeyDown(WindowSystem::PlatformKeyCodes::TAB); - const bool ctrlPressed = WindowSystem::isKeyDown(WindowSystem::PlatformKeyCodes::LCONTROL); + const bool tabPressed = WindowSystem::IsKeyDown(WindowSystem::PlatformKeyCodes::TAB); + const bool ctrlPressed = WindowSystem::IsKeyDown(WindowSystem::PlatformKeyCodes::LCONTROL); const auto [vpad0Active, vpad0Toggle] = getVPADScreenActive(0); const auto [vpad1Active, vpad1Toggle] = getVPADScreenActive(1); diff --git a/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp b/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp index 8338d93c..737e9201 100644 --- a/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp +++ b/src/Cafe/HW/Latte/Core/LatteShaderCache.cpp @@ -505,7 +505,7 @@ void LatteShaderCache_ShowProgress(const std::function & loadUpdateF continue; int w, h; - WindowSystem::getWindowPhysSize(w, h); + WindowSystem::GetWindowPhysSize(w, h); const Vector2f window_size{ (float)w,(float)h }; ImGui_GetFont(window_size.y / 32.0f); // = 24 by default diff --git a/src/Cafe/HW/Latte/Core/LatteThread.cpp b/src/Cafe/HW/Latte/Core/LatteThread.cpp index 69322e8b..00027900 100644 --- a/src/Cafe/HW/Latte/Core/LatteThread.cpp +++ b/src/Cafe/HW/Latte/Core/LatteThread.cpp @@ -115,7 +115,7 @@ int Latte_ThreadEntry() { SetThreadName("LatteThread"); sint32 w,h; - WindowSystem::getWindowPhysSize(w,h); + WindowSystem::GetWindowPhysSize(w,h); // renderer g_renderer->Initialize(); diff --git a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp index 0f7ef4ad..ed09a12f 100644 --- a/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/OpenGL/OpenGLRenderer.cpp @@ -21,35 +21,35 @@ class DefaultOpenGLCanvasCallbacks : public OpenGLCanvasCallbacks { -} s_defaultOpenGLCanvasCallbacks; +} g_defaultOpenGLCanvasCallbacks; -OpenGLCanvasCallbacks* s_openGLCanvasCallbacks = &s_defaultOpenGLCanvasCallbacks; +OpenGLCanvasCallbacks* g_openGLCanvasCallbacks = &g_defaultOpenGLCanvasCallbacks; void SetOpenGLCanvasCallbacks(OpenGLCanvasCallbacks* callbacks) { - cemu_assert_debug(s_openGLCanvasCallbacks == &s_defaultOpenGLCanvasCallbacks); - s_openGLCanvasCallbacks = callbacks; + cemu_assert_debug(g_openGLCanvasCallbacks == &g_defaultOpenGLCanvasCallbacks); + g_openGLCanvasCallbacks = callbacks; } void ClearOpenGLCanvasCallbacks() { - cemu_assert_debug(s_openGLCanvasCallbacks != &s_defaultOpenGLCanvasCallbacks); - s_openGLCanvasCallbacks = &s_defaultOpenGLCanvasCallbacks; + cemu_assert_debug(g_openGLCanvasCallbacks != &g_defaultOpenGLCanvasCallbacks); + g_openGLCanvasCallbacks = &g_defaultOpenGLCanvasCallbacks; } bool GLCanvas_HasPadViewOpen() { - return s_openGLCanvasCallbacks->HasPadViewOpen(); + return g_openGLCanvasCallbacks->HasPadViewOpen(); } bool GLCanvas_MakeCurrent(bool padView) { - return s_openGLCanvasCallbacks->MakeCurrent(padView); + return g_openGLCanvasCallbacks->MakeCurrent(padView); } void GLCanvas_SwapBuffers(bool swapTV, bool swapDRC) { - s_openGLCanvasCallbacks->SwapBuffers(swapTV, swapDRC); + g_openGLCanvasCallbacks->SwapBuffers(swapTV, swapDRC); } #define STRINGIFY2(X) #X @@ -593,9 +593,9 @@ void OpenGLRenderer::DrawBackbufferQuad(LatteTextureView* texView, RendererOutpu { int windowWidth, windowHeight; if (padView) - WindowSystem::getPadWindowPhysSize(windowWidth, windowHeight); + WindowSystem::GetPadWindowPhysSize(windowWidth, windowHeight); else - WindowSystem::getWindowPhysSize(windowWidth, windowHeight); + WindowSystem::GetWindowPhysSize(windowWidth, windowHeight); g_renderer->renderTarget_setViewport(0, 0, windowWidth, windowHeight, 0.0f, 1.0f); g_renderer->ClearColorbuffer(padView); } diff --git a/src/Cafe/HW/Latte/Renderer/Renderer.cpp b/src/Cafe/HW/Latte/Renderer/Renderer.cpp index 2f618c83..35991cde 100644 --- a/src/Cafe/HW/Latte/Renderer/Renderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/Renderer.cpp @@ -65,9 +65,9 @@ bool Renderer::ImguiBegin(bool mainWindow) { sint32 w = 0, h = 0; if (mainWindow) - WindowSystem::getWindowPhysSize(w, h); - else if (WindowSystem::isPadWindowOpen()) - WindowSystem::getPadWindowPhysSize(w, h); + WindowSystem::GetWindowPhysSize(w, h); + else if (WindowSystem::IsPadWindowOpen()) + WindowSystem::GetPadWindowPhysSize(w, h); else return false; diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp index bef1d836..79bdffd1 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/SwapchainInfoVk.cpp @@ -9,7 +9,7 @@ SwapchainInfoVk::SwapchainInfoVk(bool mainWindow, Vector2i size) : mainWindow(mainWindow), m_desiredExtent(size) { - auto& windowHandleInfo = mainWindow ? WindowSystem::getWindowInfo().canvas_main : WindowSystem::getWindowInfo().canvas_pad; + auto& windowHandleInfo = mainWindow ? WindowSystem::GetWindowInfo().canvas_main : WindowSystem::GetWindowInfo().canvas_pad; auto renderer = VulkanRenderer::GetInstance(); m_instance = renderer->GetVkInstance(); m_logicalDevice = renderer->GetLogicalDevice(); diff --git a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp index 612c2eaf..867c7ead 100644 --- a/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp +++ b/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp @@ -111,7 +111,7 @@ std::vector VulkanRenderer::GetDevices() #if BOOST_OS_WINDOWS requiredExtensions.emplace_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME); #elif BOOST_OS_LINUX - auto backend = WindowSystem::getWindowInfo().window_main.backend; + auto backend = WindowSystem::GetWindowInfo().window_main.backend; if(backend == WindowSystem::WindowHandleInfo::Backend::X11) requiredExtensions.emplace_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); #ifdef HAS_WAYLAND @@ -154,7 +154,7 @@ std::vector VulkanRenderer::GetDevices() throw std::runtime_error("Failed to find a GPU with Vulkan support."); // create tmp surface to create a logical device - auto surface = CreateFramebufferSurface(instance, WindowSystem::getWindowInfo().window_main); + auto surface = CreateFramebufferSurface(instance, WindowSystem::GetWindowInfo().window_main); std::vector devices(device_count); vkEnumeratePhysicalDevices(instance, &device_count, devices.data()); for (const auto& device : devices) @@ -400,7 +400,7 @@ VulkanRenderer::VulkanRenderer() throw std::runtime_error("Failed to find a GPU with Vulkan support."); // create tmp surface to create a logical device - auto surface = CreateFramebufferSurface(m_instance, WindowSystem::getWindowInfo().window_main); + auto surface = CreateFramebufferSurface(m_instance, WindowSystem::GetWindowInfo().window_main); auto& config = GetConfig(); decltype(config.graphic_device_uuid) zero{}; @@ -1308,7 +1308,7 @@ std::vector VulkanRenderer::CheckInstanceExtensionSupport(FeatureCo #if BOOST_OS_WINDOWS requiredInstanceExtensions.emplace_back(VK_KHR_WIN32_SURFACE_EXTENSION_NAME); #elif BOOST_OS_LINUX - auto backend = WindowSystem::getWindowInfo().window_main.backend; + auto backend = WindowSystem::GetWindowInfo().window_main.backend; if(backend == WindowSystem::WindowHandleInfo::Backend::X11) requiredInstanceExtensions.emplace_back(VK_KHR_XLIB_SURFACE_EXTENSION_NAME); #if HAS_WAYLAND @@ -2744,11 +2744,11 @@ void VulkanRenderer::RecreateSwapchain(bool mainWindow, bool skipCreate) if (mainWindow) { ImGui_ImplVulkan_Shutdown(); - WindowSystem::getWindowPhysSize(size.x, size.y); + WindowSystem::GetWindowPhysSize(size.x, size.y); } else { - WindowSystem::getPadWindowPhysSize(size.x, size.y); + WindowSystem::GetPadWindowPhysSize(size.x, size.y); } chainInfo.swapchainImageIndex = -1; @@ -2778,9 +2778,9 @@ bool VulkanRenderer::UpdateSwapchainProperties(bool mainWindow) int width, height; if (mainWindow) - WindowSystem::getWindowPhysSize(width, height); + WindowSystem::GetWindowPhysSize(width, height); else - WindowSystem::getPadWindowPhysSize(width, height); + WindowSystem::GetPadWindowPhysSize(width, height); auto extent = chainInfo.getExtent(); if (width != extent.width || height != extent.height) stateChanged = true; diff --git a/src/Cafe/HW/MMU/MMU.cpp b/src/Cafe/HW/MMU/MMU.cpp index 02a9003b..2a3c7bbf 100644 --- a/src/Cafe/HW/MMU/MMU.cpp +++ b/src/Cafe/HW/MMU/MMU.cpp @@ -92,7 +92,7 @@ void MMURange::mapMem() if (MemMapper::AllocateMemory(memory_base + baseAddress, size, MemMapper::PAGE_PERMISSION::P_RW, true) == nullptr) { std::string errorMsg = _tr("Unable to allocate {} memory", name); - WindowSystem::showErrorDialog(errorMsg, _tr("Error")); + WindowSystem::ShowErrorDialog(errorMsg, _tr("Error")); #if BOOST_OS_WINDOWS ExitProcess(-1); #else @@ -134,7 +134,7 @@ void memory_init() { debug_printf("memory_init(): Unable to reserve 4GB of memory\n"); debugBreakpoint(); - WindowSystem::showErrorDialog(_tr("Unable to reserve 4GB of memory"), _tr("Error")); + WindowSystem::ShowErrorDialog(_tr("Unable to reserve 4GB of memory"), _tr("Error")); exit(-1); } for (auto& itr : g_mmuRanges) diff --git a/src/Cafe/OS/RPL/rpl.cpp b/src/Cafe/OS/RPL/rpl.cpp index 5f4238c3..4ce1957a 100644 --- a/src/Cafe/OS/RPL/rpl.cpp +++ b/src/Cafe/OS/RPL/rpl.cpp @@ -1795,7 +1795,7 @@ void RPLLoader_UnloadModule(RPLModule* rpl) RPLLoader_decrementModuleDependencyRefs(rpl); // save module config for this module in the debugger - g_debuggerDispatcher.notifyModuleUnloaded(rpl); + g_debuggerDispatcher.NotifyModuleUnloaded(rpl); // release memory rplLoaderHeap_codeArea2.free(rpl->regionMappingBase_text.GetPtr()); @@ -1878,7 +1878,7 @@ void RPLLoader_Link() RPLLoader_LoadDebugSymbols(rplModuleList[i]); rplModuleList[i]->isLinked = true; // mark as linked GraphicPack2::NotifyModuleLoaded(rplModuleList[i]); - g_debuggerDispatcher.notifyModuleLoaded(rplModuleList[i]); + g_debuggerDispatcher.NotifyModuleLoaded(rplModuleList[i]); } } diff --git a/src/Cafe/OS/libs/padscore/padscore.cpp b/src/Cafe/OS/libs/padscore/padscore.cpp index e8822765..8612261a 100644 --- a/src/Cafe/OS/libs/padscore/padscore.cpp +++ b/src/Cafe/OS/libs/padscore/padscore.cpp @@ -470,7 +470,7 @@ sint32 _KPADRead(uint32 channel, KPADStatus_t* samplingBufs, uint32 length, bety samplingBufs->wpadErr = WPAD_ERR_NONE; samplingBufs->data_format = controller->get_data_format(); samplingBufs->devType = controller->get_device_type(); - if(!WindowSystem::inputConfigWindowHasFocus()) + if(!WindowSystem::InputConfigWindowHasFocus()) { const auto btn_repeat = padscore::g_padscore.controller_data[channel].btn_repeat; controller->KPADRead(*samplingBufs, btn_repeat); diff --git a/src/Cafe/OS/libs/vpad/vpad.cpp b/src/Cafe/OS/libs/vpad/vpad.cpp index 95e0ed53..d1324b06 100644 --- a/src/Cafe/OS/libs/vpad/vpad.cpp +++ b/src/Cafe/OS/libs/vpad/vpad.cpp @@ -263,7 +263,7 @@ namespace vpad PPCCore_switchToScheduler(); } - if (!WindowSystem::inputConfigWindowHasFocus()) + if (!WindowSystem::InputConfigWindowHasFocus()) { if (channel <= 1 && vpadDelayEnabled) { diff --git a/src/Cemu/Tools/DownloadManager/DownloadManager.cpp b/src/Cemu/Tools/DownloadManager/DownloadManager.cpp index 0105b2d2..f2d7cb99 100644 --- a/src/Cemu/Tools/DownloadManager/DownloadManager.cpp +++ b/src/Cemu/Tools/DownloadManager/DownloadManager.cpp @@ -1403,7 +1403,7 @@ void DownloadManager::asyncPackageInstall(Package* package) reportPackageStatus(package); checkPackagesState(); // lastly request game list to be refreshed - WindowSystem::refreshGameList(); + WindowSystem::RefreshGameList(); return; } diff --git a/src/gui/interface/WindowSystem.h b/src/gui/interface/WindowSystem.h index 24daa938..dc614691 100644 --- a/src/gui/interface/WindowSystem.h +++ b/src/gui/interface/WindowSystem.h @@ -91,36 +91,36 @@ namespace WindowSystem GRAPHIC_PACKS = 1, }; - void showErrorDialog(std::string_view message, std::string_view title, std::optional errorCategory = {}); - inline void showErrorDialog(std::string_view message, std::optional errorCategory = {}) + void ShowErrorDialog(std::string_view message, std::string_view title, std::optional errorCategory = {}); + inline void ShowErrorDialog(std::string_view message, std::optional errorCategory = {}) { - showErrorDialog(message, "", errorCategory); + ShowErrorDialog(message, "", errorCategory); } - void create(); + void Create(); - WindowInfo& getWindowInfo(); + WindowInfo& GetWindowInfo(); - void updateWindowTitles(bool isIdle, bool isLoading, double fps); - void getWindowSize(int& w, int& h); - void getPadWindowSize(int& w, int& h); - void getWindowPhysSize(int& w, int& h); - void getPadWindowPhysSize(int& w, int& h); - double getWindowDPIScale(); - double getPadDPIScale(); - bool isPadWindowOpen(); - bool isKeyDown(uint32 key); - bool isKeyDown(PlatformKeyCodes key); - std::string getKeyCodeName(uint32 key); + void UpdateWindowTitles(bool isIdle, bool isLoading, double fps); + void GetWindowSize(int& w, int& h); + void GetPadWindowSize(int& w, int& h); + void GetWindowPhysSize(int& w, int& h); + void GetPadWindowPhysSize(int& w, int& h); + double GetWindowDPIScale(); + double GetPadDPIScale(); + bool IsPadWindowOpen(); + bool IsKeyDown(uint32 key); + bool IsKeyDown(PlatformKeyCodes key); + std::string GetKeyCodeName(uint32 key); - bool inputConfigWindowHasFocus(); + bool InputConfigWindowHasFocus(); - void notifyGameLoaded(); - void notifyGameExited(); + void NotifyGameLoaded(); + void NotifyGameExited(); - void refreshGameList(); + void RefreshGameList(); - bool isFullScreen(); + bool IsFullScreen(); - void captureInput(const ControllerState& currentState, const ControllerState& lastState); + void CaptureInput(const ControllerState& currentState, const ControllerState& lastState); }; // namespace WindowSystem diff --git a/src/gui/wxgui/MainWindow.cpp b/src/gui/wxgui/MainWindow.cpp index d9f5518f..c1826ae5 100644 --- a/src/gui/wxgui/MainWindow.cpp +++ b/src/gui/wxgui/MainWindow.cpp @@ -438,7 +438,7 @@ void MainWindow::OnClose(wxCloseEvent& event) if(m_game_list) m_game_list->OnClose(event); - if (!IsMaximized() && !WindowSystem::isFullScreen()) + if (!IsMaximized() && !WindowSystem::IsFullScreen()) m_restored_size = GetSize(); SaveSettings(); @@ -1641,7 +1641,7 @@ void MainWindow::DestroyCanvas() void MainWindow::OnSizeEvent(wxSizeEvent& event) { - if (!IsMaximized() && !WindowSystem::isFullScreen()) + if (!IsMaximized() && !WindowSystem::IsFullScreen()) m_restored_size = GetSize(); const wxSize client_size = GetClientSize(); @@ -1672,7 +1672,7 @@ void MainWindow::OnDPIChangedEvent(wxDPIChangedEvent& event) void MainWindow::OnMove(wxMoveEvent& event) { - if (!IsMaximized() && !WindowSystem::isFullScreen()) + if (!IsMaximized() && !WindowSystem::IsFullScreen()) m_restored_position = GetPosition(); if (m_debugger_window && m_debugger_window->IsShown()) diff --git a/src/gui/wxgui/canvas/VulkanCanvas.cpp b/src/gui/wxgui/canvas/VulkanCanvas.cpp index 0f187884..79d4de3b 100644 --- a/src/gui/wxgui/canvas/VulkanCanvas.cpp +++ b/src/gui/wxgui/canvas/VulkanCanvas.cpp @@ -14,7 +14,7 @@ VulkanCanvas::VulkanCanvas(wxWindow* parent, const wxSize& size, bool is_main_wi Bind(wxEVT_PAINT, &VulkanCanvas::OnPaint, this); Bind(wxEVT_SIZE, &VulkanCanvas::OnResize, this); - auto& canvas = is_main_window ? WindowSystem::getWindowInfo().canvas_main : WindowSystem::getWindowInfo().canvas_pad; + auto& canvas = is_main_window ? WindowSystem::GetWindowInfo().canvas_main : WindowSystem::GetWindowInfo().canvas_pad; canvas = initHandleContextFromWxWidgetsWindow(this); #if BOOST_OS_LINUX && HAS_WAYLAND if (canvas.backend == WindowSystem::WindowHandleInfo::Backend::Wayland) diff --git a/src/gui/wxgui/debugger/BreakpointWindow.cpp b/src/gui/wxgui/debugger/BreakpointWindow.cpp index 3fd3bb77..9b352553 100644 --- a/src/gui/wxgui/debugger/BreakpointWindow.cpp +++ b/src/gui/wxgui/debugger/BreakpointWindow.cpp @@ -179,7 +179,7 @@ void BreakpointWindow::OnLeftDClick(wxMouseEvent& event) const auto item = m_breakpoints->GetItemText(index, ColumnAddress); const auto address = std::stoul(item.ToStdString(), nullptr, 16); debuggerState.debugSession.instructionPointer = address; - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); return; } diff --git a/src/gui/wxgui/debugger/DebuggerWindow2.cpp b/src/gui/wxgui/debugger/DebuggerWindow2.cpp index cb100d68..c4758977 100644 --- a/src/gui/wxgui/debugger/DebuggerWindow2.cpp +++ b/src/gui/wxgui/debugger/DebuggerWindow2.cpp @@ -270,7 +270,7 @@ DebuggerWindow2::DebuggerWindow2(wxFrame& parent, const wxRect& display_size) : wxFrame(&parent, wxID_ANY, _("PPC Debugger"), wxDefaultPosition, wxSize(1280, 300), wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX | wxCLIP_CHILDREN | wxRESIZE_BORDER | wxFRAME_FLOAT_ON_PARENT), m_module_address(0) { - g_debuggerDispatcher.setDebuggerCallbacks(this); + g_debuggerDispatcher.SetDebuggerCallbacks(this); this->wxWindowBase::SetBackgroundColour(*wxWHITE); @@ -337,7 +337,7 @@ DebuggerWindow2::DebuggerWindow2(wxFrame& parent, const wxRect& display_size) DebuggerWindow2::~DebuggerWindow2() { - g_debuggerDispatcher.clearDebuggerCallbacks(); + g_debuggerDispatcher.ClearDebuggerCallbacks(); debuggerState.breakOnEntry = false; g_debugger_window = nullptr; @@ -686,38 +686,38 @@ void DebuggerWindow2::UpdateModuleLabel(uint32 address) } } -void DebuggerWindow2::updateViewThreadsafe() +void DebuggerWindow2::UpdateViewThreadsafe() { auto* evt = new wxCommandEvent(wxEVT_UPDATE_VIEW); wxQueueEvent(this, evt); } -void DebuggerWindow2::notifyDebugBreakpointHit() +void DebuggerWindow2::NotifyDebugBreakpointHit() { auto* evt = new wxCommandEvent(wxEVT_BREAKPOINT_HIT); wxQueueEvent(this, evt); } -void DebuggerWindow2::notifyRun() +void DebuggerWindow2::NotifyRun() { auto* evt = new wxCommandEvent(wxEVT_RUN); wxQueueEvent(this, evt); } -void DebuggerWindow2::moveIP() +void DebuggerWindow2::MoveIP() { auto* evt = new wxCommandEvent(wxEVT_MOVE_IP); wxQueueEvent(this, evt); } -void DebuggerWindow2::notifyModuleLoaded(void* module) +void DebuggerWindow2::NotifyModuleLoaded(void* module) { auto* evt = new wxCommandEvent(wxEVT_NOTIFY_MODULE_LOADED); evt->SetClientData(module); wxQueueEvent(this, evt); } -void DebuggerWindow2::notifyModuleUnloaded(void* module) +void DebuggerWindow2::NotifyModuleUnloaded(void* module) { auto* evt = new wxCommandEvent(wxEVT_NOTIFY_MODULE_UNLOADED); evt->SetClientData(module); diff --git a/src/gui/wxgui/debugger/DebuggerWindow2.h b/src/gui/wxgui/debugger/DebuggerWindow2.h index fa00efce..a2dbbebf 100644 --- a/src/gui/wxgui/debugger/DebuggerWindow2.h +++ b/src/gui/wxgui/debugger/DebuggerWindow2.h @@ -92,12 +92,12 @@ private: void CreateMenuBar(); void UpdateModuleLabel(uint32 address = 0); - void updateViewThreadsafe() override; - void notifyDebugBreakpointHit() override; - void notifyRun() override; - void moveIP() override; - void notifyModuleLoaded(void* module) override; - void notifyModuleUnloaded(void* module) override; + void UpdateViewThreadsafe() override; + void NotifyDebugBreakpointHit() override; + void NotifyRun() override; + void MoveIP() override; + void NotifyModuleLoaded(void* module) override; + void NotifyModuleUnloaded(void* module) override; XMLDebuggerConfig m_config; std::vector> m_modules_storage; diff --git a/src/gui/wxgui/debugger/ModuleWindow.cpp b/src/gui/wxgui/debugger/ModuleWindow.cpp index 325ac037..56b69cd4 100644 --- a/src/gui/wxgui/debugger/ModuleWindow.cpp +++ b/src/gui/wxgui/debugger/ModuleWindow.cpp @@ -132,5 +132,5 @@ void ModuleWindow::OnLeftDClick(wxMouseEvent& event) if (address == 0) return; debuggerState.debugSession.instructionPointer = address; - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); } diff --git a/src/gui/wxgui/debugger/SymbolCtrl.cpp b/src/gui/wxgui/debugger/SymbolCtrl.cpp index 66c2fe2e..a02269fe 100644 --- a/src/gui/wxgui/debugger/SymbolCtrl.cpp +++ b/src/gui/wxgui/debugger/SymbolCtrl.cpp @@ -113,7 +113,7 @@ void SymbolListCtrl::OnLeftDClick(wxListEvent& event) if (address == 0) return; debuggerState.debugSession.instructionPointer = address; - g_debuggerDispatcher.moveIP(); + g_debuggerDispatcher.MoveIP(); } void SymbolListCtrl::OnRightClick(wxListEvent& event) diff --git a/src/gui/wxgui/input/panels/InputPanel.cpp b/src/gui/wxgui/input/panels/InputPanel.cpp index 5aacc4f9..e460f0c6 100644 --- a/src/gui/wxgui/input/panels/InputPanel.cpp +++ b/src/gui/wxgui/input/panels/InputPanel.cpp @@ -26,7 +26,7 @@ void InputPanel::on_timer(const EmulatedControllerPtr& emulated_controller, cons const auto mapping = reinterpret_cast(element->GetClientData()); // reset mapping - if(std::exchange(m_right_down, false) || WindowSystem::isKeyDown(WindowSystem::PlatformKeyCodes::ESCAPE)) + if(std::exchange(m_right_down, false) || WindowSystem::IsKeyDown(WindowSystem::PlatformKeyCodes::ESCAPE)) { element->SetBackgroundColour(kKeyColourNormalMode); m_color_backup[element->GetId()] = kKeyColourNormalMode; diff --git a/src/gui/wxgui/wxWindowSystem.cpp b/src/gui/wxgui/wxWindowSystem.cpp index 344bf1c2..a444eb19 100644 --- a/src/gui/wxgui/wxWindowSystem.cpp +++ b/src/gui/wxgui/wxWindowSystem.cpp @@ -41,7 +41,7 @@ void _wxLaunch() } #endif -void WindowSystem::create() +void WindowSystem::Create() { SetThreadName("cemu"); #if BOOST_OS_WINDOWS @@ -56,7 +56,7 @@ void WindowSystem::create() #endif } -void WindowSystem::showErrorDialog(std::string_view message, std::string_view title, std::optional /*errorId*/) +void WindowSystem::ShowErrorDialog(std::string_view message, std::string_view title, std::optional /*errorId*/) { wxString caption; if (title.empty()) @@ -66,12 +66,12 @@ void WindowSystem::showErrorDialog(std::string_view message, std::string_view ti wxMessageBox(to_wxString(message), caption, wxOK | wxCENTRE | wxICON_ERROR); } -WindowSystem::WindowInfo& WindowSystem::getWindowInfo() +WindowSystem::WindowInfo& WindowSystem::GetWindowInfo() { return g_window_info; } -void WindowSystem::updateWindowTitles(bool isIdle, bool isLoading, double fps) +void WindowSystem::UpdateWindowTitles(bool isIdle, bool isLoading, double fps) { std::string windowText; windowText = BUILD_VERSION_WITH_NAME_STRING; @@ -152,13 +152,13 @@ void WindowSystem::updateWindowTitles(bool isIdle, bool isLoading, double fps) } } -void WindowSystem::getWindowSize(int& w, int& h) +void WindowSystem::GetWindowSize(int& w, int& h) { w = g_window_info.width; h = g_window_info.height; } -void WindowSystem::getPadWindowSize(int& w, int& h) +void WindowSystem::GetPadWindowSize(int& w, int& h) { if (g_window_info.pad_open) { @@ -172,13 +172,13 @@ void WindowSystem::getPadWindowSize(int& w, int& h) } } -void WindowSystem::getWindowPhysSize(int& w, int& h) +void WindowSystem::GetWindowPhysSize(int& w, int& h) { w = g_window_info.phys_width; h = g_window_info.phys_height; } -void WindowSystem::getPadWindowPhysSize(int& w, int& h) +void WindowSystem::GetPadWindowPhysSize(int& w, int& h) { if (g_window_info.pad_open) { @@ -192,27 +192,27 @@ void WindowSystem::getPadWindowPhysSize(int& w, int& h) } } -double WindowSystem::getWindowDPIScale() +double WindowSystem::GetWindowDPIScale() { return g_window_info.dpi_scale; } -double WindowSystem::getPadDPIScale() +double WindowSystem::GetPadDPIScale() { return g_window_info.pad_open ? g_window_info.pad_dpi_scale.load() : 1.0; } -bool WindowSystem::isPadWindowOpen() +bool WindowSystem::IsPadWindowOpen() { return g_window_info.pad_open; } -bool WindowSystem::isKeyDown(uint32 key) +bool WindowSystem::IsKeyDown(uint32 key) { return g_window_info.get_keystate(key); } -bool WindowSystem::isKeyDown(PlatformKeyCodes platformKey) +bool WindowSystem::IsKeyDown(PlatformKeyCodes platformKey) { uint32 key = 0; @@ -262,10 +262,10 @@ bool WindowSystem::isKeyDown(PlatformKeyCodes platformKey) return false; } - return WindowSystem::isKeyDown(key); + return WindowSystem::IsKeyDown(key); } -std::string WindowSystem::getKeyCodeName(uint32 button) +std::string WindowSystem::GetKeyCodeName(uint32 button) { #if BOOST_OS_WINDOWS LONG scan_code = MapVirtualKeyA((UINT)button, MAPVK_VK_TO_VSC_EX); @@ -307,12 +307,12 @@ std::string WindowSystem::getKeyCodeName(uint32 button) #endif } -bool WindowSystem::inputConfigWindowHasFocus() +bool WindowSystem::InputConfigWindowHasFocus() { return g_inputConfigWindowHasFocus; } -void WindowSystem::notifyGameLoaded() +void WindowSystem::NotifyGameLoaded() { std::shared_lock lock(g_mutex); if (g_mainFrame) @@ -322,14 +322,14 @@ void WindowSystem::notifyGameLoaded() } } -void WindowSystem::notifyGameExited() +void WindowSystem::NotifyGameExited() { std::shared_lock lock(g_mutex); if (g_mainFrame) g_mainFrame->RestoreSettingsAfterGameExited(); } -void WindowSystem::refreshGameList() +void WindowSystem::RefreshGameList() { std::shared_lock lock(g_mutex); if (g_mainFrame) @@ -338,12 +338,12 @@ void WindowSystem::refreshGameList() } } -void WindowSystem::captureInput(const ControllerState& currentState, const ControllerState& lastState) +void WindowSystem::CaptureInput(const ControllerState& currentState, const ControllerState& lastState) { HotkeySettings::CaptureInput(currentState, lastState); } -bool WindowSystem::isFullScreen() +bool WindowSystem::IsFullScreen() { return g_window_info.is_fullscreen; } diff --git a/src/imgui/imgui_extension.cpp b/src/imgui/imgui_extension.cpp index 747f6362..dadd2031 100644 --- a/src/imgui/imgui_extension.cpp +++ b/src/imgui/imgui_extension.cpp @@ -122,7 +122,7 @@ ImFont* ImGui_GetFont(float size) void ImGui_UpdateWindowInformation(bool mainWindow) { static std::map keyboard_mapping; - auto& windowInfo = WindowSystem::getWindowInfo(); + auto& windowInfo = WindowSystem::GetWindowInfo(); static uint32 current_key = 0; ImGuiIO& io = ImGui::GetIO(); io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; diff --git a/src/input/api/Controller.cpp b/src/input/api/Controller.cpp index 940b1c3f..a6b0f5e7 100644 --- a/src/input/api/Controller.cpp +++ b/src/input/api/Controller.cpp @@ -67,7 +67,7 @@ const ControllerState& ControllerBase::update_state() #undef APPLY_AXIS_BUTTON - WindowSystem::captureInput(result, m_last_state); + WindowSystem::CaptureInput(result, m_last_state); m_last_state = std::move(result); return m_last_state; diff --git a/src/input/api/Keyboard/KeyboardController.cpp b/src/input/api/Keyboard/KeyboardController.cpp index bb5b2cef..fedabb9d 100644 --- a/src/input/api/Keyboard/KeyboardController.cpp +++ b/src/input/api/Keyboard/KeyboardController.cpp @@ -11,14 +11,14 @@ KeyboardController::KeyboardController() std::string KeyboardController::get_button_name(uint64 button) const { - return WindowSystem::getKeyCodeName(button); + return WindowSystem::GetKeyCodeName(button); } ControllerState KeyboardController::raw_state() { ControllerState result{}; boost::container::small_vector pressedKeys; - WindowSystem::getWindowInfo().iter_keystates([&pressedKeys](const std::pair& keyState) { if (keyState.second) pressedKeys.emplace_back(keyState.first); }); + WindowSystem::GetWindowInfo().iter_keystates([&pressedKeys](const std::pair& keyState) { if (keyState.second) pressedKeys.emplace_back(keyState.first); }); result.buttons.SetPressedButtons(pressedKeys); return result; } diff --git a/src/input/emulated/VPADController.cpp b/src/input/emulated/VPADController.cpp index 531e83f5..6e54e401 100644 --- a/src/input/emulated/VPADController.cpp +++ b/src/input/emulated/VPADController.cpp @@ -286,9 +286,9 @@ void VPADController::update_motion(VPADStatus_t& status) int w, h; if (pad_view) - WindowSystem::getPadWindowPhysSize(w, h); + WindowSystem::GetPadWindowPhysSize(w, h); else - WindowSystem::getWindowPhysSize(w, h); + WindowSystem::GetWindowPhysSize(w, h); float wx = mousePos.x / w; float wy = mousePos.y / h; diff --git a/src/main.cpp b/src/main.cpp index 926fb27f..23eee26a 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -252,7 +252,7 @@ int main(int argc, char *argv[]) #endif if (!LaunchSettings::HandleCommandline(argc, argv)) return 0; - WindowSystem::create(); + WindowSystem::Create(); return 0; } #endif diff --git a/src/mainLLE.cpp b/src/mainLLE.cpp index 3b0031e3..2332c52d 100644 --- a/src/mainLLE.cpp +++ b/src/mainLLE.cpp @@ -36,7 +36,7 @@ void mainEmulatorLLE() memory_initPhysicalLayout(); // start GUI thread - WindowSystem::create(); + WindowSystem::Create(); // load kernel ancast image loadPPCBootrom(); loadEncryptedPPCAncastKernel();