// SPDX-License-Identifier: MIT // Copyright (c) 2026 The Bozos (boubou666 and Arzaroth). MIT licence (see LICENSE at the repository root). // // The settings window's port tabs (bozo/app/settings_tabs.h). Moved from the team's ps2_debug_ui.cpp. #include "bozo/app/settings_tabs.h" #include namespace bozo::app::ui { namespace { std::mutex g_mutex; std::vector g_tabs; } void registerTab(const std::string &name, std::function draw) { std::lock_guard lock(g_mutex); for (Tab &tab : g_tabs) if (tab.name == name) { tab.draw = std::move(draw); return; } g_tabs.push_back(Tab{name, std::move(draw)}); } std::vector tabs() { std::lock_guard lock(g_mutex); return g_tabs; } }