diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js index 447b596..3e12176 100644 --- a/frontend/src/lib/api.js +++ b/frontend/src/lib/api.js @@ -111,6 +111,16 @@ export function bundleUrl(game) { return `/games/${game.bundle_file}`; } +/** Get game config (dosbox.conf + jsdos.json) */ +export async function getGameConfig(id) { + const res = await fetch(`${BASE}/api/games/${id}/config`); + if (!res.ok) { + const err = await res.json().catch(() => ({ error: res.statusText })); + throw new Error(err.error || `HTTP ${res.status}`); + } + return res.json(); +} + /** Get game bundle URL for setup mode (runs SETUP.EXE instead) */ export function setupBundleUrl(game) { if (!game) return null; diff --git a/frontend/src/pages/Play.svelte b/frontend/src/pages/Play.svelte index 5604b66..549bd0a 100644 --- a/frontend/src/pages/Play.svelte +++ b/frontend/src/pages/Play.svelte @@ -1,5 +1,5 @@