@@ -65,7 +65,7 @@ import * as YAML from 'yaml';
6565import { ConfigFile } from './ConfigFile' ;
6666import { getAllApplicationPaths , getAllDevelopers , getAllLibraries , getAllPlayModes , getAllPublishers , getAllSeries , getAllStatuses , getTags , markGameSave } from './DatabaseCache' ;
6767import { ExtConfigFile } from './ExtConfigFile' ;
68- import { escapeArgsForShell , GameLauncher } from './GameLauncher' ;
68+ import { checkAndInstallPlatform , escapeArgsForShell , GameLauncher } from './GameLauncher' ;
6969import { ManagedChildProcess } from './ManagedChildProcess' ;
7070import { importAllMetaEdits } from './MetaEdit' ;
7171import { DEFAULT_PLAYLIST_DATA , overwritePlaylistData , PlaylistFile } from './PlaylistFile' ;
@@ -531,7 +531,7 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise<v
531531 PreferencesFile . saveFile ( path . join ( state . config . flashpointPath , PREFERENCES_FILENAME ) , state . preferences , state ) ;
532532 } ) ;
533533 state . socketServer . broadcast ( BackOut . UPDATE_PREFERENCES , {
534- gameDataSources : state . preferences . gameMetadataSources
534+ gameMetadataSources : state . preferences . gameMetadataSources
535535 } ) ;
536536 }
537537
@@ -684,6 +684,8 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise<v
684684 } ) ;
685685
686686 state . socketServer . register ( BackIn . LAUNCH_GAME , async ( event , id , provider , override ) => {
687+ const openDialog = state . socketServer . showMessageBoxBack ( state , event . client ) ;
688+
687689 // Find game from database
688690 const game = await fpDatabase . findGame ( id ) ;
689691 if ( ! game ) {
@@ -703,6 +705,7 @@ export function registerRequestCallbacks(state: BackState, init: () => Promise<v
703705 if ( contentRunner ) {
704706 // Make sure the active game data exists (where possible) instead of relying on runners doing it
705707 await ensureGameDataDownloaded ( state , game ) ;
708+ await checkAndInstallPlatform ( game . detailedPlatforms ! , state , openDialog ) ;
706709
707710 // Prepare the launch information
708711 const gameLaunchInfo = await contentRunner . prepareGame ( game , false ) ;
0 commit comments