feat: Implement FPS Tracking and Audio Status Display in Emulator
- Added frame rate tracking to the emulator, calculating and displaying current FPS in the UI. - Enhanced audio management by monitoring queued audio frames and ensuring the audio buffer is filled appropriately. - Updated texture handling to align with the PPU output format, improving visual consistency. - Refactored timing management to cap time accumulation, preventing performance issues during frame processing.
This commit is contained in:
@@ -82,7 +82,12 @@ class Emulator {
|
||||
// timing
|
||||
uint64_t count_frequency;
|
||||
uint64_t last_count;
|
||||
float time_adder = 0.0;
|
||||
double time_adder = 0.0;
|
||||
|
||||
// FPS tracking
|
||||
int frame_count_ = 0;
|
||||
double fps_timer_ = 0.0;
|
||||
double current_fps_ = 0.0;
|
||||
|
||||
int16_t* audio_buffer_;
|
||||
SDL_AudioDeviceID audio_device_;
|
||||
|
||||
Reference in New Issue
Block a user