Skip to content

Commit

Permalink
add abourt section and update version to 2.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
alyosha-tas committed Oct 8, 2023
1 parent c77a2f9 commit c9be0fa
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
26 changes: 4 additions & 22 deletions src/BizHawk.Client.Common/config/ConfigService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ static ConfigService()

public static bool IsFromSameVersion(string filepath, out string msg)
{
const string MSGFMT_NEWER = "Your config file ({0}) is from a newer version of EmuHawk, {2} (this is {1}). It may fail to load.";
const string MSGFMT_OLDER = "Your config file ({0}) is from an older version of EmuHawk, {2} (this is {1}). It may fail to load.";
const string MSGFMT_PRE_2_3_3 = "Your config file ({0}) is corrupted, or is from an older version of EmuHawk, predating 2.3.3 (this is {1}). It may fail to load.";
const string MSGFMT_PRE_2_5 = "Your config file ({0}) is corrupted, or is from an older version of EmuHawk, predating 2.5 (this is {1}). It may fail to load.";
const string MSGFMT = "Your config file ({0}) is corrupted, or is from a different version of GBAHawk (this is {1}). It may fail to load.";

if (!new FileInfo(filepath).Exists)
{
Expand All @@ -60,24 +57,9 @@ public static bool IsFromSameVersion(string filepath, out string msg)
msg = null;
return true;
}
string fmt;
if (cfgVersionStr == null)
{
fmt = MSGFMT_PRE_2_3_3;
}
else
{
var cfgVersion = VersionInfo.VersionStrToInt(cfgVersionStr);
if (cfgVersion < 0x02050000U)
{
fmt = MSGFMT_PRE_2_5;
}
else
{
var thisVersion = VersionInfo.VersionStrToInt(VersionInfo.MainVersion);
fmt = cfgVersion < thisVersion ? MSGFMT_OLDER : MSGFMT_NEWER;
}
}

string fmt = MSGFMT;

msg = string.Format(fmt, Path.GetFileName(filepath), VersionInfo.MainVersion, cfgVersionStr);
return false;
}
Expand Down
10 changes: 9 additions & 1 deletion src/BizHawk.Client.EmuHawk/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions src/BizHawk.Client.EmuHawk/MainForm.Events.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1074,6 +1074,11 @@ private void ExternalToolMenuItem_DropDownOpening(object sender, EventArgs e)
}
}

private void AboutSubMenu_Click(object sender, EventArgs e)
{
ShowMessageBox(owner: null, "Current GBAHwak version: " + VersionInfo.MainVersion);
}

private void RamWatchMenuItem_Click(object sender, EventArgs e)
{
Tools.LoadRamWatch(true);
Expand Down
2 changes: 1 addition & 1 deletion src/BizHawk.Common/VersionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public static partial class VersionInfo
/// Bump this immediately after release.
/// Only use '0'..'9' and '.' or it will fail to parse and the new version notification won't work.
/// </remarks>
public static readonly string MainVersion = "2.0.0";
public static readonly string MainVersion = "2.0.1";

public static string GetEmuVersion()
=> $"Version {MainVersion}";
Expand Down

0 comments on commit c9be0fa

Please sign in to comment.