mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-06 06:05:40 +12:00
Implement getFps hc function
This commit is contained in:
parent
977ab53b68
commit
4172194479
3 changed files with 6 additions and 1 deletions
|
@ -117,4 +117,5 @@ class Emulator {
|
|||
ServiceManager& getServiceManager() { return kernel.getServiceManager(); }
|
||||
RendererType getRendererType() const { return config.rendererType; }
|
||||
Renderer* getRenderer() { return gpu.getRenderer(); }
|
||||
u64 getTicks() { return cpu.getTicks(); }
|
||||
};
|
||||
|
|
|
@ -21,6 +21,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;
|
||||
|
@ -69,10 +70,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}; }
|
||||
|
|
2
third_party/hydra_core
vendored
2
third_party/hydra_core
vendored
|
@ -1 +1 @@
|
|||
Subproject commit 090c8a74e0a970052ca8c63050a17e918036d3d8
|
||||
Subproject commit 51a2dceb312a7e175264c266a1762f57d3604020
|
Loading…
Add table
Reference in a new issue