|
6 | 6 | type EmulatorWorkerConfig, |
7 | 7 | type EmulatorWorkerVideoBlit, |
8 | 8 | type EmulatorMouseEvent, |
| 9 | + generateChunkedFileSpecForCDROM, |
9 | 10 | } from "./emulator-common"; |
10 | 11 | import { |
11 | 12 | emulatorUsesPlaceholderDisks, |
@@ -462,7 +463,18 @@ export class Emulator { |
462 | 463 |
|
463 | 464 | const serviceWorkerAvailable = await this.#serviceWorkerReady; |
464 | 465 | if (serviceWorkerAvailable) { |
465 | | - for (const spec of config.disks.concat(config.delayedDisks ?? [])) { |
| 466 | + const specs = [ |
| 467 | + ...config.disks, |
| 468 | + ...(config.delayedDisks ?? []), |
| 469 | + ...config.cdroms |
| 470 | + .filter( |
| 471 | + cdrom => |
| 472 | + !cdrom.fetchClientSide && |
| 473 | + cdrom.prefetchChunks?.length |
| 474 | + ) |
| 475 | + .map(generateChunkedFileSpecForCDROM), |
| 476 | + ]; |
| 477 | + for (const spec of specs) { |
466 | 478 | this.#serviceWorker!.postMessage({ |
467 | 479 | type: "init-disk-cache", |
468 | 480 | spec, |
@@ -788,7 +800,6 @@ export class Emulator { |
788 | 800 |
|
789 | 801 | #getAdbKeyCode(code: string): number | undefined { |
790 | 802 | if (this.#delegate?.emulatorSettings?.(this).swapControlAndCommand) { |
791 | | - console.log("swapping control and command keys"); |
792 | 803 | if (code.startsWith("Control")) { |
793 | 804 | code = "Meta" + code.slice("Control".length); |
794 | 805 | } else if (code.startsWith("Meta")) { |
|
0 commit comments