Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

react-gbajs: add hacks #99

Merged
merged 1 commit into from
May 17, 2021
Merged

react-gbajs: add hacks #99

merged 1 commit into from
May 17, 2021

Conversation

macabeus
Copy link
Owner

Add hacks feature on react-gbajs, and options to turn on it.

image

@macabeus macabeus self-assigned this May 16, 2021
@macabeus
Copy link
Owner Author

@city41 Maybe that might interest you. I had some difficulties not dropping FPS, but it worked.

If you want to check the FPS, you can apply this patch:

diff --git a/react-gbajs/src/emulator/gba.js b/react-gbajs/src/emulator/gba.js
index d837a4e..e8775fd 100644
--- a/react-gbajs/src/emulator/gba.js
+++ b/react-gbajs/src/emulator/gba.js
@@ -212,7 +212,7 @@ GameBoyAdvance.prototype.runStable = function() {
        this.paused = false;
        this.audio.pause(false);
 
-       if (this.reportFPS) {
+       if (true) {
                runFunc = function() {
                        try {
                                timer += Date.now() - start;
@@ -225,7 +225,8 @@ GameBoyAdvance.prototype.runStable = function() {
                                self.advanceFrame();
                                ++frames;
                                if (frames == 60) {
-                                       self.reportFPS((frames * 1000) / timer);
+                                       console.log((frames * 1000) / timer)
+                                       // self.reportFPS((frames * 1000) / timer);
                                        frames = 0;
                                        timer = 0;
                                }

@macabeus macabeus merged commit 085d504 into master May 17, 2021
@macabeus macabeus deleted the feat/add-hacks branch May 17, 2021 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant