Refactor CMake configuration and improve emulation timing calculations

- Updated CMakeLists.txt to disable additional optional components (EMU and Z3ED) in minimal builds for better build management.
- Refactored emulation timing calculations in emu.cc to use consistent method naming conventions, enhancing code readability and maintainability.
This commit is contained in:
scawful
2025-09-26 11:33:15 -04:00
parent 7c90b2b6ba
commit f0fa93fa2b
2 changed files with 7 additions and 5 deletions

View File

@@ -107,8 +107,8 @@ int main(int argc, char **argv) {
if (rom_.is_loaded()) {
rom_data_ = rom_.vector();
snes_.Init(rom_data_);
wanted_frames_ = 1.0 / (snes_.Memory().pal_timing() ? 50.0 : 60.0);
wanted_samples_ = 48000 / (snes_.Memory().pal_timing() ? 50 : 60);
wanted_frames_ = 1.0 / (snes_.memory().pal_timing() ? 50.0 : 60.0);
wanted_samples_ = 48000 / (snes_.memory().pal_timing() ? 50 : 60);
loaded = true;
}
@@ -120,8 +120,8 @@ int main(int argc, char **argv) {
if (rom_.is_loaded()) {
rom_data_ = rom_.vector();
snes_.Init(rom_data_);
wanted_frames_ = 1.0 / (snes_.Memory().pal_timing() ? 50.0 : 60.0);
wanted_samples_ = 48000 / (snes_.Memory().pal_timing() ? 50 : 60);
wanted_frames_ = 1.0 / (snes_.memory().pal_timing() ? 50.0 : 60.0);
wanted_samples_ = 48000 / (snes_.memory().pal_timing() ? 50 : 60);
loaded = true;
}
SDL_free(event.drop.file);