Skip to content

Commit

Permalink
Skip invalid game locations in registry
Browse files Browse the repository at this point in the history
  • Loading branch information
loriswit committed Aug 23, 2023
1 parent 3a5daa8 commit 3e14f75
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Rlcm/App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8.1" />
</startup>
</configuration>
4 changes: 2 additions & 2 deletions Rlcm/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public partial class App

private void AppStartup(object sender, StartupEventArgs startupEventArgs)
{
Version.Number = 310;
Version.Name = "3.1.0";
Version.Number = 311;
Version.Name = "3.1.1";

var args = Environment.GetCommandLineArgs();
if (args.Contains("--updated") || args.Contains("-u"))
Expand Down
3 changes: 2 additions & 1 deletion Rlcm/Game/TrainingRoom.cs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ private void LocateGame()
var path = (from subKey in key?.GetSubKeyNames()
select key?.OpenSubKey(subKey)
into program
where (string) program?.GetValue("DisplayName") == "Rayman Legends"
where (string) program?.GetValue("DisplayName") == "Rayman Legends" &&
!string.IsNullOrEmpty((string) program.GetValue("InstallLocation"))
select (string) program.GetValue("InstallLocation")).FirstOrDefault();

if (path == null)
Expand Down
2 changes: 1 addition & 1 deletion Rlcm/Rlcm.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<OutputType>WinExe</OutputType>
<RootNamespace>Rlcm</RootNamespace>
<AssemblyName>rlcm</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<WarningLevel>4</WarningLevel>
Expand Down

2 comments on commit 3e14f75

@ThomasPoloBelgini
Copy link

@ThomasPoloBelgini ThomasPoloBelgini commented on 3e14f75 Sep 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do i reset the game location and put the game location to a to another place?

or how do I use these codes or put these files in the game folder?

I'm sorry,I don't know how to use these things =(

@loriswit
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how do i reset the game location and put the game location to a to another place?

or how do I use these codes or put these files in the game folder?

I'm sorry,I don't know how to use these things =(

@ThomasPoloBelgini Please see my answer here: #4 (comment)

Please sign in to comment.