|
|
@@ -1,4 +1,5 @@ |
|
|
|
using GCMM.Properties; |
|
|
|
using Microsoft.Win32; |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
@@ -35,7 +36,7 @@ namespace GCMM |
|
|
|
{ //TODO |
|
|
|
string libs; |
|
|
|
if (Environment.OSVersion.Platform == PlatformID.Win32NT) |
|
|
|
libs = Settings.Default.SteamConfigFileForAutoLaunch + @"\steamapps\libraryfolders.vdf"; |
|
|
|
libs = Settings.Default.SteamConfigFileForAutoLaunch + @"\steamapps\libraryfolders.vdf"; //TODO: Not the Steam folder anymore! |
|
|
|
else |
|
|
|
return null; |
|
|
|
foreach (var line in File.ReadAllLines(libs).Concat(new[] {@"C:\Program Files (x86)\Steam\"})) |
|
|
@@ -83,7 +84,17 @@ namespace GCMM |
|
|
|
|
|
|
|
private void UpdateSteamConfigToAutoStart(bool autoLaunch) |
|
|
|
{ |
|
|
|
//TODO |
|
|
|
} |
|
|
|
|
|
|
|
private (string, int) GetSteamLocationAndUser() |
|
|
|
{ |
|
|
|
if (Environment.OSVersion.Platform != PlatformID.Win32NT) return (null, 0); |
|
|
|
using (var key = Registry.CurrentUser.OpenSubKey(@"Software\Valve\Steam\ActiveProcess")) |
|
|
|
{ |
|
|
|
string path = Directory.GetParent((string)key.GetValue("SteamClientDll")).FullName; |
|
|
|
return (path, (int)key.GetValue("ActiveUser")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void CheckStartGame(object sender, EventArgs e) |
|
|
|