3 Commits

Author SHA1 Message Date
Felix Rieseberg
7d48709cff README: v5.0.1 2026-04-13 10:26:31 -07:00
Felix Rieseberg
739931aec6 5.0.1 2026-04-13 10:19:19 -07:00
Felix Rieseberg
731a9b2369 Wait for v86 emulator-loaded before restoring state (#367)
The 500ms setTimeout raced against v86's async wasm/BIOS/hda load. When
loading exceeded 500ms (cold cache, Gatekeeper scan on packaged apps),
restore_state ran on an uninitialized CPU, threw, was silently caught,
and the VM cold-booted from default-state.bin instead of resuming the
user's session.
2026-04-13 10:18:41 -07:00
4 changed files with 21 additions and 22 deletions

View File

@@ -15,18 +15,18 @@ This is Windows 95, running in an [Electron](https://electronjs.org/) app. Yes,
</td>
<td>
<span>32-bit</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-5.0.0-setup-ia32.exe">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-5.0.1-setup-ia32.exe">
💿 Installer
</a> |
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-win32-ia32-5.0.0.zip">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-win32-ia32-5.0.1.zip">
📦 Standalone Zip
</a>
<br />
<span>64-bit</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-5.0.0-setup-x64.exe">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-5.0.1-setup-x64.exe">
💿 Installer
</a> |
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-win32-x64-5.0.0.zip">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-win32-x64-5.0.1.zip">
📦 Standalone Zip
</a><br />
<span>
@@ -41,11 +41,11 @@ This is Windows 95, running in an [Electron](https://electronjs.org/) app. Yes,
</td>
<td>
<span>Apple Silicon Processor</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-darwin-arm64-5.0.0.zip">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-darwin-arm64-5.0.1.zip">
📦 Standalone Zip
</a><br />
<span>Intel Processor</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-darwin-x64-5.0.0.zip">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-darwin-x64-5.0.1.zip">
📦 Standalone Zip
</a>
<span>
@@ -60,24 +60,24 @@ This is Windows 95, running in an [Electron](https://electronjs.org/) app. Yes,
</td>
<td>
<span>64-bit</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-5.0.0-1.x86_64.rpm">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-5.0.1-1.x86_64.rpm">
💿 rpm
</a> |
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95_5.0.0_amd64.deb">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95_5.0.1_amd64.deb">
💿 deb
</a><br />
<span>ARM64</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-5.0.0-1.arm64.rpm">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-5.0.1-1.arm64.rpm">
💿 rpm
</a> |
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95_5.0.0_arm64.deb">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95_5.0.1_arm64.deb">
💿 deb
</a><br />
<span>ARM</span>
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95-5.0.0-1.armv7hl.rpm">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95-5.0.1-1.armv7hl.rpm">
💿 rpm
</a> |
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.0/windows95_5.0.0_armhf.deb">
<a href="https://github.com/felixrieseberg/windows95/releases/download/v5.0.1/windows95_5.0.1_armhf.deb">
💿 deb
</a><br />
</td>

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "windows95",
"version": "5.0.0",
"version": "5.0.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "windows95",
"version": "5.0.0",
"version": "5.0.1",
"hasInstallScript": true,
"license": "MIT",
"dependencies": {

View File

@@ -1,7 +1,7 @@
{
"name": "windows95",
"productName": "windows95",
"version": "5.0.0",
"version": "5.0.1",
"description": "Windows 95, in an app. I'm sorry.",
"main": "./dist/src/main/main.js",
"scripts": {

View File

@@ -482,17 +482,16 @@ export class Emulator extends React.Component<{}, EmulatorState> {
ipcRenderer.send(IPC_COMMANDS.MACHINE_STARTED);
// Restore state. We can't do this right away
// and randomly chose 500ms as the appropriate
// wait time (lol)
setTimeout(async () => {
// Wait for v86 to finish loading wasm/bios/hda before restoring — calling
// restore_state on an uninitialized cpu throws and we'd silently cold-boot.
window["emulator"].add_listener("emulator-loaded", async () => {
if (!this.state.isBootingFresh) {
await this.restoreState();
}
this.state.emulator.run();
this.state.emulator.screen_set_scale(this.state.scale);
}, 500);
window["emulator"].run();
window["emulator"].screen_set_scale(this.state.scale);
});
}
/**