Permalink
Browse files

browserfs api changed slightly?

  • Loading branch information...
db48x committed Apr 19, 2017
1 parent b08d9bb commit 659a21bcaed0d2f533994cdbb68832805e60fba7
Showing with 3 additions and 3 deletions.
  1. +3 −3 loader.js
View
@@ -729,17 +729,17 @@ var Module = null;
}
this._cfg.memory.rom.name = game_data.rom;
- this._cfg.memory.rom.data = new Uint8Array(game_data.fs.readFileSync('/'+game_data.rom, null, flag_r).toArrayBuffer());
+ this._cfg.memory.rom.data = game_data.fs.readFileSync('/'+game_data.rom, null, flag_r);
this._cfg.memory.rom.size = this._cfg.memory.rom.data.length;
if (game_data.extRom) {
this._cfg.memory.extRom.name = game_data.extRom;
- this._cfg.memory.extRom.data = new Uint8Array(game_data.fs.readFileSync('/'+game_data.extRom, null, flag_r).toArrayBuffer());
+ this._cfg.memory.extRom.data = game_data.fs.readFileSync('/'+game_data.extRom, null, flag_r);
this._cfg.memory.extRom.size = this._cfg.memory.extRom.data.length;
}
this._cfg.floppy.drive[0].file.name = game_data.floppy[0];
- this._cfg.floppy.drive[0].file.data = new Uint8Array(game_data.fs.readFileSync('/'+game_data.floppy[0], null, flag_r).toArrayBuffer());
+ this._cfg.floppy.drive[0].file.data = game_data.fs.readFileSync('/'+game_data.floppy[0], null, flag_r);
this._cfg.floppy.drive[0].file.size = this._cfg.floppy.drive[0].file.data.length;
}

1 comment on commit 659a21b

@jvilk

This comment has been minimized.

Show comment
Hide comment
@jvilk

jvilk Apr 25, 2017

Contributor

Oh yeah, sorry. toArrayBuffer was always an internal interface to our Buffer implementation. I switched over to the standard buffer module on NPM, which maps Buffers to Uint8Arrays like NodeJS does.

Please open a bug if you see any other regressions in the future!

Contributor

jvilk commented on 659a21b Apr 25, 2017

Oh yeah, sorry. toArrayBuffer was always an internal interface to our Buffer implementation. I switched over to the standard buffer module on NPM, which maps Buffers to Uint8Arrays like NodeJS does.

Please open a bug if you see any other regressions in the future!

Please sign in to comment.