diff --git a/frontend/assets/powered_by_emulatorjs.png b/frontend/assets/powered_by_emulatorjs.png
new file mode 100644
index 000000000..4f255c0d5
Binary files /dev/null and b/frontend/assets/powered_by_emulatorjs.png differ
diff --git a/frontend/src/components/Details/ActionBar.vue b/frontend/src/components/Details/ActionBar.vue
index 6d3c9f36c..7fc22be11 100644
--- a/frontend/src/components/Details/ActionBar.vue
+++ b/frontend/src/components/Details/ActionBar.vue
@@ -1,14 +1,25 @@
@@ -30,8 +41,8 @@ const auth = storeAuth();
-
-
+
+
diff --git a/frontend/src/components/Details/Emulation.vue b/frontend/src/components/Details/Emulation.vue
new file mode 100644
index 000000000..ffa762b09
--- /dev/null
+++ b/frontend/src/components/Details/Emulation.vue
@@ -0,0 +1,239 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ mdi-playPlay
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/components/Drawer/Base.vue b/frontend/src/components/Drawer/Base.vue
index 093976bc8..8912d0bd8 100644
--- a/frontend/src/components/Drawer/Base.vue
+++ b/frontend/src/components/Drawer/Base.vue
@@ -58,7 +58,7 @@ onMounted(() => {});
-
+
@@ -80,7 +80,7 @@ onMounted(() => {});
/>
-
+
{});
-
+
diff --git a/frontend/src/components/Game/Card/ActionBar.vue b/frontend/src/components/Game/Card/ActionBar.vue
index e2ee02eae..26eba2802 100644
--- a/frontend/src/components/Game/Card/ActionBar.vue
+++ b/frontend/src/components/Game/Card/ActionBar.vue
@@ -27,7 +27,6 @@ const downloadStore = storeDownload();
mdi-play import("@/views/Details/Base.vue"),
},
- {
- path: "/play/:rom",
- component: () => import("@/views/Play/Base.vue"),
- },
{
path: "/library/scan",
name: "scan",
@@ -65,6 +61,10 @@ const routes = [
},
],
},
+ {
+ path: "/play/:rom",
+ component: () => import("@/components/Details/Emulation.vue"),
+ },
];
const router = createRouter({
diff --git a/frontend/src/types/emitter.d.ts b/frontend/src/types/emitter.d.ts
index 79fa0c9b1..f2daaca97 100644
--- a/frontend/src/types/emitter.d.ts
+++ b/frontend/src/types/emitter.d.ts
@@ -42,6 +42,7 @@ export type Events = {
rom: Rom;
states: StateSchema[];
};
+ showEmulation: null;
toggleDrawer: null;
toggleDrawerRail: null;
snackbarShow: SnackbarStatus;
diff --git a/frontend/src/views/Details/Base.vue b/frontend/src/views/Details/Base.vue
index acd4dd021..60399319b 100644
--- a/frontend/src/views/Details/Base.vue
+++ b/frontend/src/views/Details/Base.vue
@@ -9,25 +9,31 @@ import type { EnhancedRomSchema, PlatformSchema } from "@/__generated__";
import ActionBar from "@/components/Details/ActionBar.vue";
import BackgroundHeader from "@/components/Details/BackgroundHeader.vue";
import Cover from "@/components/Details/Cover.vue";
-import DeleteAssetDialog from "@/components/Dialog/Asset/DeleteAssets.vue";
import DetailsInfo from "@/components/Details/DetailsInfo.vue";
+import Emulation from "@/components/Details/Emulation.vue";
import Saves from "@/components/Details/Saves.vue";
import Screenshots from "@/components/Details/Screenshots.vue";
import States from "@/components/Details/States.vue";
import TitleInfo from "@/components/Details/Title.vue";
+import DeleteAssetDialog from "@/components/Dialog/Asset/DeleteAssets.vue";
import LoadingDialog from "@/components/Dialog/Loading.vue";
import DeleteRomDialog from "@/components/Dialog/Rom/DeleteRom.vue";
import EditRomDialog from "@/components/Dialog/Rom/EditRom.vue";
import SearchRomDialog from "@/components/Dialog/Rom/SearchRom.vue";
-import romApi from "@/services/api/rom";
import platformApi from "@/services/api/platform";
+import romApi from "@/services/api/rom";
const route = useRoute();
const rom = ref();
const platform = ref();
-const tab = ref<"details" | "saves" | "screenshots">("details");
+const tab = ref<"details" | "saves" | "screenshots" | "emulation">("details");
const { smAndDown, mdAndUp } = useDisplay();
const emitter = inject>("emitter");
+const showEmulation = ref(false);
+emitter?.on("showEmulation", () => {
+ showEmulation.value = !showEmulation.value;
+ tab.value = showEmulation.value ? "emulation" : "details";
+});
async function fetchDetails() {
if (!route.params.rom) return;
@@ -139,16 +145,19 @@ watch(
}"
no-gutters
>
-
+
Details
- Saves
- States
- Screenshots
+ Saves
+ States
+ Screenshots
+
+
+ Emulation
-
+
@@ -162,6 +171,11 @@ watch(
+
+
+
+
+
diff --git a/frontend/src/views/Play/Base.vue b/frontend/src/views/Play/Base.vue
index 3516c461b..ccecc825d 100644
--- a/frontend/src/views/Play/Base.vue
+++ b/frontend/src/views/Play/Base.vue
@@ -12,6 +12,7 @@ const rom = ref(null);
const saveRef = ref(null);
const stateRef = ref(null);
const gameRunning = ref(false);
+const gameWindow = ref(9);
const EXTENSION_REGEX = new RegExp("\.(([a-z]+\.)*)$");
@@ -87,9 +88,7 @@ window.EJS_onSaveState = function ({
}
};
-window.EJS_onGameStart = () => {
- gameRunning.value = true;
-};
+window.EJS_onGameStart = () => {};
onMounted(() => {
romApi
@@ -108,59 +107,86 @@ onMounted(() => {
});
function onPlay() {
+ gameWindow.value = 12;
+ gameRunning.value = true;
window.EJS_loadStateURL = stateRef.value?.download_path ?? null;
document.body.appendChild(script);
}
-
-
-
-
-
-
-
- Play
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+ mdi-playPlay
+
+
+
+
+
+
+
+