From 581f7983aa311549273849aa1e910ceb2668a409 Mon Sep 17 00:00:00 2001
From: Zamitto <167933696+zamitto@users.noreply.github.com>
Date: Tue, 4 Jun 2024 23:52:29 -0300
Subject: [PATCH] undo addGameToLibrary change
---
.../src/pages/game-details/hero/hero-panel-actions.tsx | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx
index 06406d22..2dbedaa1 100644
--- a/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx
+++ b/src/renderer/src/pages/game-details/hero/hero-panel-actions.tsx
@@ -77,11 +77,13 @@ export function HeroPanelActions() {
if (game) {
await removeGameFromLibrary(game.id);
} else {
+ const gameExecutablePath = await selectGameExecutable();
+
await window.electron.addGameToLibrary(
objectID!,
gameTitle,
"steam",
- null
+ gameExecutablePath
);
}
@@ -224,7 +226,7 @@ export function HeroPanelActions() {
if (game) {
return (
<>
- {game?.progress === 1 && game?.folderName && (
+ {game.progress === 1 && game.downloadPath && (
<>
)}
- {game?.progress === 1 && !game?.folderName && showDownloadOptionsButton}
+ {game.progress === 1 && !game.downloadPath && showDownloadOptionsButton}
- {game?.progress !== 1 && toggleGameOnLibraryButton}
+ {game.progress !== 1 && toggleGameOnLibraryButton}
{isGameRunning ? (