Merge pull request from hydra-emu/wrage-6

Implement getFps hc function
This commit is contained in:
wheremyfoodat 2023-10-21 12:19:05 +03:00 committed by GitHub
commit 4eeecc9378
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View file

@ -23,6 +23,7 @@ class HC_GLOBAL HydraCore final : public hydra::IBase, public hydra::IOpenGlRend
// IFrontendDriven
void runFrame() override;
uint16_t getFps() override;
// IInput
void setPollInputCallback(void (*callback)()) override;
@ -71,10 +72,13 @@ void HydraCore::runFrame() {
int y = !!checkButtonCallback(0, hydra::ButtonType::Analog1Up) - !!checkButtonCallback(0, hydra::ButtonType::Analog1Down);
hid.setCirclepadX(x * 0x9C);
hid.setCirclepadY(y * 0x9C);
hid.updateInputs(emulator->getTicks());
emulator->runFrame();
}
uint16_t HydraCore::getFps() { return 60; }
void HydraCore::reset() { emulator->reset(Emulator::ReloadOption::Reload); }
hydra::Size HydraCore::getNativeSize() { return {400, 480}; }