Skip to content

Commit

Permalink
Start with a larger zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
felixrieseberg committed Jun 26, 2022
1 parent 61f3269 commit 33db389
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/renderer/emulator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ export class Emulator extends React.Component<{}, EmulatorState> {
isRunning: false,
currentUiCard: "start",
isInfoDisplayed: true,
scale: 1,
// We can start pretty large
// If it's too large, it'll just grow until it hits borders
scale: 2,
};

this.setupInputListeners();
Expand Down Expand Up @@ -264,7 +266,6 @@ export class Emulator extends React.Component<{}, EmulatorState> {
const imagePath = path.join(__dirname, "../../images/windows95.img");

console.log(`Showing disk image in ${imagePath}`);
``;

shell.showItemInFolder(imagePath);
}
Expand All @@ -276,10 +277,11 @@ export class Emulator extends React.Component<{}, EmulatorState> {
document.body.classList.remove("paused");

const cdrom: any = {};
if (this.state.cdromFile?.path) {
cdrom.url = this.state.cdromFile.path;
const cdromFile: any = this.state.cdromFile;
if (cdromFile?.path) {
cdrom.url = cdromFile.path;
cdrom.async = true;
cdrom.size = await getDiskImageSize(this.state.cdromFile.path);
cdrom.size = await getDiskImageSize(cdromFile.path);
}

const options = {
Expand All @@ -303,12 +305,14 @@ export class Emulator extends React.Component<{}, EmulatorState> {
},
cdrom: cdrom,
boot_order: 0x132,
// One day, maybe!
// network_relay_url: "ws://localhost:8080/"
};

console.log(`🚜 Starting emulator with options`, options);

window["emulator"] = new V86Starter(options);


// New v86 instance
this.setState({
Expand All @@ -328,6 +332,7 @@ export class Emulator extends React.Component<{}, EmulatorState> {

this.lockMouse();
this.state.emulator.run();
this.state.emulator.screen_set_scale(this.state.scale);
}, 500);
}

Expand Down

0 comments on commit 33db389

Please sign in to comment.