feat: Enhance Emulator and Rendering Performance with New Features

- Implemented a Cleanup method in the Emulator class to manage resources effectively during shutdown.
- Added auto-pause functionality to the emulator when the window loses focus, optimizing CPU and battery usage.
- Updated the DoRender method in the Controller class to include frame timing management and a gentle frame rate cap.
- Enhanced texture processing in the Arena class to batch process up to 8 texture commands per frame, improving rendering efficiency.
This commit is contained in:
scawful
2025-10-07 18:16:36 -04:00
parent 0c3c8ebca7
commit defc99b571
7 changed files with 1117 additions and 5 deletions

View File

@@ -40,9 +40,10 @@ struct EmulatorKeybindings {
class Emulator {
public:
Emulator() = default;
~Emulator() = default;
~Emulator();
void Initialize(gfx::IRenderer* renderer, const std::vector<uint8_t>& rom_data);
void Run(Rom* rom);
void Cleanup();
auto snes() -> Snes& { return snes_; }
auto running() const -> bool { return running_; }