Merge remote-tracking branch 'origin/master' into gallery-filter-sorting

This commit is contained in:
Zurdi
2024-02-01 23:16:59 +01:00
7 changed files with 17 additions and 46 deletions

View File

@@ -204,6 +204,15 @@ If you like this project, consider buying me a coffee!
[![coffee-donate]][coffee-donate-url]
## Our Friends
Here are a few projects that we think you might like:
- [EmualtorJS](https://emulatorjs.org/): An embeddable, browser-based emulator
- [RetroDECK](https://retrodeck.net/): Retro gaming on SteamOS and Linux
- [ES-DE Frontend](https://es-de.org/): Emulator frontend for Linux, macOS and Windows
- [Gaseous](https://github.com/gaseous-project/gaseous-server): Another self-hosted ROM manager
<!-- Sections -->
[folder-structure]: #-folder-structure

View File

@@ -1 +0,0 @@
Generic single-database configuration.

View File

@@ -5,7 +5,7 @@ import storeAuth from "@/stores/auth";
import storeDownload from "@/stores/download";
import type { Rom } from "@/stores/roms";
import type { Events } from "@/types/emitter";
import { platformSlugEJSPlatformMap } from "@/utils";
import { platformSlugEJSCoreMap } from "@/utils";
import type { Emitter } from "mitt";
import { inject, ref } from "vue";
@@ -43,7 +43,7 @@ function toggleEmulation() {
</v-col>
<v-col>
<v-btn
:disabled="!(rom.platform_slug in platformSlugEJSPlatformMap)"
:disabled="!(rom.platform_slug in platformSlugEJSCoreMap)"
rounded="0"
block
@click="toggleEmulation"

View File

@@ -4,7 +4,7 @@ import storeDownload from "@/stores/download";
import storeAuth from "@/stores/auth";
import AdminMenu from "@/components/Game/AdminMenu/Base.vue";
import type { Rom } from "@/stores/roms";
import { platformSlugEJSPlatformMap } from "@/utils";
import { platformSlugEJSCoreMap } from "@/utils";
// Props
const props = defineProps<{ rom: Rom }>();
@@ -32,7 +32,7 @@ const downloadStore = storeDownload();
size="x-small"
rounded="0"
variant="text"
:disabled="!(rom.platform_slug in platformSlugEJSPlatformMap)"
:disabled="!(rom.platform_slug in platformSlugEJSCoreMap)"
/>
</v-col>
<v-menu location="bottom">

View File

@@ -11,7 +11,7 @@ import storeRoms from "@/stores/roms";
import {
formatBytes,
languageToEmoji,
platformSlugEJSPlatformMap,
platformSlugEJSCoreMap,
regionToEmoji,
} from "@/utils";
import { useTheme } from "vuetify";
@@ -153,7 +153,7 @@ function rowClick(_: Event, row: any) {
:href="`/play/${item.raw.id}`"
class="my-1 bg-terciary"
rounded="0"
:disabled="!(item.raw.platform_slug in platformSlugEJSPlatformMap)"
:disabled="!(item.raw.platform_slug in platformSlugEJSCoreMap)"
><v-icon>mdi-play</v-icon></v-btn
>
<v-menu location="bottom">

View File

@@ -279,40 +279,3 @@ export const platformSlugEJSPlatformMap: Record<string, string> = {
wonderswan: "ws",
"wonderswan-color": "ws",
} as const;
export const platformSlugEJSCoreMap: Record<string, string> = {
"3do": "opera",
amiga: "puae",
arcade: "fbneo",
atari2600: "stella2014",
atari5200: "a5200",
atari7800: "prosystem",
c64: "vice_x64",
colecovision: "gearcoleco",
jaguar: "virtualjaguar",
lynx: "handy",
mame: "mame2003_plus",
"neo-geo-pocket": "mednafen_ngp",
"neo-geo-pocket-color": "mednafen_ngp",
nes: "fceumm",
"famicom": "fceumm",
n64: "mupen64plus_next",
nds: "melonds",
gba: "mgba",
gb: "gambatte",
"pc-fx": "mednafen_pcfx",
ps: "pcsx_rearmed",
psp: "ppsspp",
segacd: "genesis_plus_gx",
sega32: "picodrive",
gamegear: "genesis_plus_gx",
sms: "genesis_plus_gx",
"genesis-slash-megadrive": "genesis_plus_gx",
saturn: "yabause",
snes: "snes9x",
sfam: "snes9x",
"turbografx16--1": "mednafen_pce",
virtualboy: "beetle_vb",
wonderswan: "mednafen_wswan",
"wonderswan-color": "mednafen_wswan",
} as const;

View File

@@ -4,7 +4,7 @@ import stateApi from "@/services/api/state";
import saveApi, { saveApi as api } from "@/services/api/save";
import screenshotApi from "@/services/api/screenshot";
import type { Rom } from "@/stores/roms";
import { platformSlugEJSPlatformMap, platformSlugEJSCoreMap } from "@/utils";
import { platformSlugEJSCoreMap } from "@/utils";
import type { SaveSchema, StateSchema } from "@/__generated__";
const props = defineProps<{
@@ -47,7 +47,7 @@ declare global {
}
}
window.EJS_core = platformSlugEJSPlatformMap[props.rom.platform_slug];
window.EJS_core = platformSlugEJSCoreMap[props.rom.platform_slug];
window.EJS_gameID = props.rom.id;
window.EJS_gameUrl = props.rom.download_path;
window.EJS_player = "#game";