mirror of
https://github.com/orangeglo/gbnp.git
synced 2026-04-25 07:37:06 -05:00
Apply correct font when loading full menu
This commit is contained in:
parent
b633cdd75f
commit
d5fb5df36b
|
|
@ -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]);
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user