Skip to content

Commit

Permalink
I am an idiot and did not notice I removed lnk files from the list
Browse files Browse the repository at this point in the history
  • Loading branch information
wearrrrr committed Dec 9, 2023
1 parent a872b98 commit f52747a
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 41 deletions.
6 changes: 0 additions & 6 deletions src/assets/tauri.svg

This file was deleted.

25 changes: 0 additions & 25 deletions src/assets/typescript.svg

This file was deleted.

1 change: 0 additions & 1 deletion src/assets/vite.svg

This file was deleted.

26 changes: 17 additions & 9 deletions src/ts/lib/games.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ async function determineIfLnkIsTHCrap(filepath: string) {
}

async function installGamePrompt(name: string, value: gameObject, gameCard: HTMLElement) {
let currentExtensions = ["exe", "hdi"]
let currentExtensions = ["exe", "lnk", "hdi"]
if (pc98.includes(value.game_id)) {
// PC-98 only reasonably supports hdi files, so we don't need to check for anything else.
currentExtensions = ["hdi"]
Expand Down Expand Up @@ -362,17 +362,25 @@ async function addGame(name: string, value: gameObject, gamesElement: HTMLDivEle
</div>
`;
const checkInstallStatus = installedGames.includes(name);
if (checkInstallStatus) {
gameCard.style.background = `url(assets/game-images/${value.img})`;
gameCard.addEventListener('contextmenu', async (e) => {
// if (checkInstallStatus) {
// gameCard.style.background = `url(assets/game-images/${value.img})`;
// gameCard.addEventListener('contextmenu', async (e) => {
// e.preventDefault();
// gameConfigurator(value.game_id);
// });
// } else {
// gameCard.addEventListener('contextmenu', async (e) => {
// e.preventDefault();
// })
// }
gameCard.addEventListener('contextmenu', async (e) => {
if (checkInstallStatus) {
e.preventDefault();
gameConfigurator(value.game_id);
});
} else {
gameCard.addEventListener('contextmenu', async (e) => {
} else {
e.preventDefault();
})
}
}
})
gamesElement.appendChild(gameCard);
if (checkInstallStatus) {
gameCard.addEventListener('click', async () => {
Expand Down

0 comments on commit f52747a

Please sign in to comment.