🔧 Fix resetState()
This commit is contained in:
parent
3a78521ee3
commit
82fbf96137
|
@ -14,7 +14,7 @@
|
|||
<div id="buttons">
|
||||
<div id="start-buttons">
|
||||
<!-- <div class="btn" id="win98">Windows 98</div> -->
|
||||
<div class="btn" id="win95">
|
||||
<div class="btn btn-start" id="win95">
|
||||
Start Windows 95
|
||||
<br />
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ async function main(id) {
|
|||
}
|
||||
|
||||
function setupButtons() {
|
||||
document.querySelectorAll('.btn').forEach((btn) => {
|
||||
document.querySelectorAll('.btn-start').forEach((btn) => {
|
||||
btn.addEventListener('click', () => {
|
||||
BUTTONS.remove()
|
||||
document.body.className = '';
|
||||
|
@ -47,12 +47,13 @@ function setupButtons() {
|
|||
})
|
||||
|
||||
document.querySelector('#reset').addEventListener('click', () => {
|
||||
if (window.emulator) {
|
||||
if (window.emulator.stop) {
|
||||
window.emulator.stop()
|
||||
}
|
||||
|
||||
windows95.resetState()
|
||||
if (window.emulator) {
|
||||
|
||||
if (window.emulator.run) {
|
||||
window.emulator.run()
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue