Skip to content

Commit 4d1e2f6

Browse files
committed
fix rumble event
1 parent 0909c89 commit 4d1e2f6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

dist/jsgbc-core.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jsgbc",
3-
"version": "0.5.6",
3+
"version": "0.5.7",
44
"description": "jsGBC Core Emulator",
55
"main": "./dist/jsgbc-core.js",
66
"types": "./dist/typings/index.d.ts",

src/core/GameBoyCore.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,12 @@ export default class GameBoyCore {
337337
cartridge.connect(this);
338338
this.cartridge = cartridge;
339339

340-
if (this.cartridge && this.cartridge.mbc) this.cartridge.mbc.on("rumble", this.onRUMBLE);
341-
342340
this.loadCartridgeRomIntoMemory();
343341
if (this.bootROM) this.loadBootROMIntoMemory();
344342

345343
this.cartridge.interpret();
344+
345+
if (this.cartridge && this.cartridge.mbc) this.cartridge.mbc.on("rumble", this.onRUMBLE);
346346
}
347347

348348
onRUMBLE() {

0 commit comments

Comments
 (0)