From 69f5d2afa1304a007e4fe7d9de25f5efbc2bbf4c Mon Sep 17 00:00:00 2001 From: Bryan Elliott Date: Sat, 5 Sep 2020 16:43:36 -0400 Subject: [PATCH 1/2] [Issue #1] Fixed render scaling --- js/gba.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/gba.js b/js/gba.js index 5e55628e..52edd064 100644 --- a/js/gba.js +++ b/js/gba.js @@ -84,7 +84,7 @@ GameBoyAdvance.prototype.setCanvas = function(canvas) { this.setCanvasDirect(this.indirectCanvas); var targetContext = canvas.getContext('2d'); this.video.drawCallback = function() { - targetContext.drawImage(self.indirectCanvas, 0, 0, canvas.offsetWidth, canvas.offsetHeight); + targetContext.drawImage(self.indirectCanvas, 0, 0, canvas.width, canvas.height); } } else { this.setCanvasDirect(canvas); From 5072e659c39c0b3f03b7057bab91bac76f389c3b Mon Sep 17 00:00:00 2001 From: Bryan Elliott Date: Sat, 5 Sep 2020 16:56:53 -0400 Subject: [PATCH 2/2] Added fullscreen --- index.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/index.html b/index.html index 7bc75e6e..f7fb323d 100644 --- a/index.html +++ b/index.html @@ -261,6 +261,10 @@ canvas.removeAttribute('style'); } }, false); + +const fullScreen = () => { + document.getElementById('screen').requestFullscreen(); +}; @@ -268,6 +272,22 @@

The Game Boy Advance's buttons are mapped as follows:

+ + + + + + + + + + + + + + + + @@ -306,6 +326,7 @@ +
UpUp
DownDown
LeftLeft
RightRight
A Z