mirror of
https://github.com/pound-emu/pound.git
synced 2025-12-12 01:36:57 +00:00
- Create modular GUI architecture with base Panel class - Implement GUIManager to handle window lifecycle and panel management - Add Window wrapper class for SDL3/OpenGL context management - Create specialized panels: - ConsolePanel: Colored log output with timestamps - CPUPanel: CPU debugging with tabs for registers, memory, and disassembly - PerformancePanel: Real-time FPS and frame time monitoring - Apply modern dark theme with purple accents - Add comprehensive menu bar (File, Emulation, View, Tools, Help) - Update CMakeLists.txt to include new gui/ directory structure - Refactor main.cpp to use the new GUI system - Cutom theme on switch colors
37 lines
No EOL
809 B
C++
37 lines
No EOL
809 B
C++
// Copyright 2025 Pound Emulator Project. All rights reserved.
|
|
#pragma once
|
|
|
|
#include "../Panel.h"
|
|
#include <deque>
|
|
#include <chrono>
|
|
|
|
namespace Pound::GUI
|
|
{
|
|
|
|
class PerformancePanel : public Panel
|
|
{
|
|
public:
|
|
PerformancePanel();
|
|
|
|
void Render() override;
|
|
void Update();
|
|
|
|
private:
|
|
struct PerformanceData
|
|
{
|
|
float fps = 0.0f;
|
|
float frame_time = 0.0f;
|
|
float cpu_usage = 0.0f;
|
|
float memory_usage = 0.0f;
|
|
};
|
|
|
|
PerformanceData current_data;
|
|
std::deque<float> fps_history;
|
|
std::deque<float> frame_time_history;
|
|
static constexpr size_t HISTORY_SIZE = 120;
|
|
|
|
std::chrono::steady_clock::time_point last_update;
|
|
int frame_count = 0;
|
|
};
|
|
|
|
} // namespace Pound::GUI
|