@@ -14,7 +14,7 @@ public class DoomEternal
1414 public const string GameName = "Doom Eternal" ;
1515
1616 public const int SteamGameID = 782330 ;
17- public static string SteamSavePath = Path . Combine ( Utilities . GetSteamPath ( ) , "userdata" ) ;
17+ public static string SteamSavePath = "" ;
1818 public static string BnetSavePath = Path . Combine ( Environment . GetFolderPath ( Environment . SpecialFolder . UserProfile ) , "Saved Games" , "id Software" , "DOOMEternal" , "base" , "savegame" ) ;
1919
2020 public static DoomEternalSavePathCollection Saves ;
@@ -30,11 +30,15 @@ public static void EnumerateSaves() {
3030 }
3131 }
3232
33- if ( Directory . Exists ( SteamSavePath ) ) {
34- foreach ( var steamId3 in Directory . GetDirectories ( SteamSavePath , "*.*" , SearchOption . TopDirectoryOnly ) ) {
35- foreach ( var single in Directory . GetDirectories ( steamId3 , "*.*" , SearchOption . TopDirectoryOnly ) ) {
36- if ( Path . GetFileNameWithoutExtension ( single ) == SteamGameID . ToString ( ) )
37- Saves . Add ( new DoomEternalSavePath ( Utilities . Id3ToId64 ( Path . GetFileNameWithoutExtension ( steamId3 ) ) , DoomEternalSavePlatform . Steam ) ) ;
33+ string steamPath = Utilities . GetSteamPath ( ) ;
34+ if ( ! string . IsNullOrEmpty ( steamPath ) ) {
35+ SteamSavePath = Path . Combine ( steamPath , "userdata" ) ;
36+ if ( Directory . Exists ( SteamSavePath ) ) {
37+ foreach ( var steamId3 in Directory . GetDirectories ( SteamSavePath , "*.*" , SearchOption . TopDirectoryOnly ) ) {
38+ foreach ( var single in Directory . GetDirectories ( steamId3 , "*.*" , SearchOption . TopDirectoryOnly ) ) {
39+ if ( Path . GetFileNameWithoutExtension ( single ) == SteamGameID . ToString ( ) )
40+ Saves . Add ( new DoomEternalSavePath ( Utilities . Id3ToId64 ( Path . GetFileNameWithoutExtension ( steamId3 ) ) , DoomEternalSavePlatform . Steam ) ) ;
41+ }
3842 }
3943 }
4044 }
0 commit comments