Skip to content

Commit 6a0e5ff

Browse files
committed
Merge branch 'feature/xemu-streaming' into feat/emulator-streaming
2 parents 95f5e7d + 6ea4463 commit 6a0e5ff

2 files changed

Lines changed: 72 additions & 63 deletions

File tree

frontend/src/stores/streaming.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export const useStreamingStore = defineStore("streaming", () => {
5757
* hasAutosave — whether a dedicated "load autosave" action is available
5858
*
5959
* Dolphin (ngc, wii, wiiu): slots 1–7 user-accessible; slot 8 reserved for auto-save.
60-
* PCSX2 (ps2) and default: 9 slots + slot 10 autosave.
60+
* PCSX2 (ps2), xemu (xbox), and default: 9 slots + slot 10 autosave.
61+
* Eden (switch): no save state support.
6162
*/
6263
function platformCapabilities(slug: string | null | undefined): {
6364
maxSlots: number;
@@ -68,6 +69,12 @@ export const useStreamingStore = defineStore("streaming", () => {
6869
if (lower === "ngc" || lower === "wii" || lower === "wiiu") {
6970
return { maxSlots: 7, hasAutosave: true, autosaveSlot: 8 };
7071
}
72+
if (lower === "switch") {
73+
return { maxSlots: 0, hasAutosave: false, autosaveSlot: 0 };
74+
}
75+
if (lower === "xbox") {
76+
return { maxSlots: 9, hasAutosave: true, autosaveSlot: 10 };
77+
}
7178
return { maxSlots: 9, hasAutosave: true, autosaveSlot: 10 };
7279
}
7380

frontend/src/views/Player/Stream/Player.vue

Lines changed: 64 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -167,68 +167,70 @@
167167
:disabled="isMuted"
168168
/>
169169

170-
<!-- Save/load state controls -->
171-
<select
172-
v-model.number="selectedSlot"
173-
class="slot-selector"
174-
title="Save slot"
175-
>
176-
<option v-for="n in capabilities.maxSlots" :key="n" :value="n">
177-
Slot {{ n }}
178-
</option>
179-
</select>
180-
181-
<v-btn
182-
icon
183-
variant="text"
184-
density="compact"
185-
title="Save state"
186-
:loading="isSavingState"
187-
:disabled="
188-
isSavingState ||
189-
isLoadingState ||
190-
isLoadingAutosave ||
191-
isSavingAndExiting
192-
"
193-
@click="handleSaveState"
194-
>
195-
<v-icon size="20">mdi-content-save-outline</v-icon>
196-
</v-btn>
197-
198-
<v-btn
199-
icon
200-
variant="text"
201-
density="compact"
202-
title="Load state"
203-
:loading="isLoadingState"
204-
:disabled="
205-
isSavingState ||
206-
isLoadingState ||
207-
isLoadingAutosave ||
208-
isSavingAndExiting
209-
"
210-
@click="handleLoadState"
211-
>
212-
<v-icon size="20">mdi-restore</v-icon>
213-
</v-btn>
214-
215-
<v-btn
216-
v-if="capabilities.hasAutosave"
217-
icon
218-
variant="text"
219-
density="compact"
220-
title="Load autosave"
221-
:loading="isLoadingAutosave"
222-
:disabled="
223-
isSavingState ||
224-
isLoadingState ||
225-
isLoadingAutosave ||
226-
isSavingAndExiting
227-
"
228-
@click="handleLoadAutosave"
229-
>
230-
<v-icon size="20">mdi-history</v-icon>
231-
</v-btn>
170+
<!-- Save/load state controls (hidden for platforms with no save state support) -->
171+
<template v-if="capabilities.maxSlots > 0">
172+
<select
173+
v-model.number="selectedSlot"
174+
class="slot-selector"
175+
title="Save slot"
176+
>
177+
<option v-for="n in capabilities.maxSlots" :key="n" :value="n">
178+
Slot {{ n }}
179+
</option>
180+
</select>
181+
182+
<v-btn
183+
icon
184+
variant="text"
185+
density="compact"
186+
title="Save state"
187+
:loading="isSavingState"
188+
:disabled="
189+
isSavingState ||
190+
isLoadingState ||
191+
isLoadingAutosave ||
192+
isSavingAndExiting
193+
"
194+
@click="handleSaveState"
195+
>
196+
<v-icon size="20">mdi-content-save-outline</v-icon>
197+
</v-btn>
198+
199+
<v-btn
200+
icon
201+
variant="text"
202+
density="compact"
203+
title="Load state"
204+
:loading="isLoadingState"
205+
:disabled="
206+
isSavingState ||
207+
isLoadingState ||
208+
isLoadingAutosave ||
209+
isSavingAndExiting
210+
"
211+
@click="handleLoadState"
212+
>
213+
<v-icon size="20">mdi-restore</v-icon>
214+
</v-btn>
215+
216+
<v-btn
217+
v-if="capabilities.hasAutosave"
218+
icon
219+
variant="text"
220+
density="compact"
221+
title="Load autosave"
222+
:loading="isLoadingAutosave"
223+
:disabled="
224+
isSavingState ||
225+
isLoadingState ||
226+
isLoadingAutosave ||
227+
isSavingAndExiting
228+
"
229+
@click="handleLoadAutosave"
230+
>
231+
<v-icon size="20">mdi-history</v-icon>
232+
</v-btn>
233+
</template>
232234

233235
<v-btn
234236
icon

0 commit comments

Comments
 (0)