Apply correct font when loading full menu

This commit is contained in:
Evan Barger 2020-04-04 23:03:32 -04:00
parent b633cdd75f
commit d5fb5df36b
2 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ let app = new Vue({
addMenu: function(e) {
let fileReader = new FileReader()
fileReader.onload = () => {
this.roms = this.processor.parseMenuData(fileReader.result);
this.roms = this.processor.parseMenuData(fileReader.result, this.fontIndex);
}
fileReader.readAsArrayBuffer(e.target.files[0]);

View File

@ -357,7 +357,7 @@ class Processor {
return new Uint8Array(romBuffer);
}
parseMenuData(menuBuffer) {
parseMenuData(menuBuffer, fontIndex) {
this.roms = [];
const menuFile = new FileSeeker(menuBuffer);
@ -378,7 +378,7 @@ class Processor {
for (let i = 0; i < romSizes.length; i++) {
const romData = menuFile.read(romSizes[i] * 128 * 1024);
const romBuffer = (new Uint8Array(romData)).buffer;
this.roms.push(new ROM(romBuffer))
this.roms.push(new ROM(romBuffer, fontIndex))
}
} catch(e) {
console.log(e)