mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Make rbxfpsunlocker updating more reliable (#46)
depending on file timestamps suck
This commit is contained in:
parent
7295a8eec7
commit
a39ce6bf81
@ -121,7 +121,10 @@ namespace Bloxstrap
|
||||
//if (Program.IsFirstRun)
|
||||
// Dialog.ShowSuccess($"{Program.ProjectName} has been installed");
|
||||
//else
|
||||
await StartRoblox();
|
||||
|
||||
Program.SettingsManager.Save();
|
||||
|
||||
await StartRoblox();
|
||||
|
||||
Program.Exit();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
||||
<GroupBox Grid.Column="0" Header="Discord Rich Presence" Margin="10,10,5,5">
|
||||
<StackPanel VerticalAlignment="Center">
|
||||
<CheckBox x:Name="CheckBoxDRPEnabled" Content=" Show game activity" Margin="5" VerticalAlignment="Top" IsChecked="{Binding DRPEnabled, Mode=TwoWay}" />
|
||||
<CheckBox x:Name="CheckBoxDRPButtons" Content=" Show activity buttons" Margin="5" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, ElementName=CheckBoxDRPEnabled, Mode=OneWay}" IsChecked="{Binding DRPButtons, Mode=TwoWay}" />
|
||||
<CheckBox x:Name="CheckBoxDRPButtons" Content=" Allow others to join" Margin="5" VerticalAlignment="Top" IsEnabled="{Binding IsChecked, ElementName=CheckBoxDRPEnabled, Mode=OneWay}" IsChecked="{Binding DRPButtons, Mode=TwoWay}" />
|
||||
</StackPanel>
|
||||
</GroupBox>
|
||||
<GroupBox Grid.Column="1" Header="FPS Unlocking" Margin="5,10,10,5">
|
||||
|
@ -71,7 +71,6 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
ActivityMachineAddress = "";
|
||||
await SetPresence();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async void MonitorGameActivity()
|
||||
|
@ -70,25 +70,19 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
return;
|
||||
}
|
||||
|
||||
DateTime lastReleasePublish;
|
||||
string downloadUrl;
|
||||
|
||||
var releaseInfo = await Utilities.GetJson<GithubRelease>($"https://api.github.com/repos/{ProjectRepository}/releases/latest");
|
||||
|
||||
if (releaseInfo is null || releaseInfo.Assets is null)
|
||||
return;
|
||||
|
||||
lastReleasePublish = DateTime.Parse(releaseInfo.CreatedAt);
|
||||
downloadUrl = releaseInfo.Assets[0].BrowserDownloadUrl;
|
||||
string downloadUrl = releaseInfo.Assets[0].BrowserDownloadUrl;
|
||||
|
||||
Directory.CreateDirectory(folderLocation);
|
||||
|
||||
if (File.Exists(fileLocation))
|
||||
{
|
||||
DateTime lastDownload = File.GetCreationTimeUtc(fileLocation);
|
||||
|
||||
// no new release published, return
|
||||
if (lastDownload > lastReleasePublish)
|
||||
if (Program.Settings.RFUVersion == releaseInfo.TagName)
|
||||
return;
|
||||
|
||||
CheckIfRunning();
|
||||
@ -112,6 +106,8 @@ namespace Bloxstrap.Helpers.Integrations
|
||||
{
|
||||
await File.WriteAllTextAsync(settingsLocation, Settings);
|
||||
}
|
||||
|
||||
Program.Settings.RFUVersion = releaseInfo.TagName;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -4,6 +4,9 @@ namespace Bloxstrap.Models
|
||||
{
|
||||
public class GithubRelease
|
||||
{
|
||||
[JsonPropertyName("tag_name")]
|
||||
public string TagName { get; set; } = null!;
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; } = null!;
|
||||
|
||||
|
@ -19,6 +19,8 @@ namespace Bloxstrap.Models
|
||||
public bool RFUEnabled { get; set; } = false;
|
||||
public bool RFUAutoclose { get; set; } = false;
|
||||
|
||||
public string RFUVersion { get; set; } = "";
|
||||
|
||||
public bool UseOldDeathSound { get; set; } = true;
|
||||
public bool UseOldMouseCursor { get; set; } = false;
|
||||
}
|
||||
|
@ -132,7 +132,6 @@ namespace Bloxstrap
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (!String.IsNullOrEmpty(commandLine))
|
||||
{
|
||||
DeployManager.Channel = Settings.Channel;
|
||||
|
Loading…
Reference in New Issue
Block a user