Skip to content

Commit

Permalink
Patch release [v1.7.2.0]
Browse files Browse the repository at this point in the history
- Fixed a bug where the key would infinitely get created by the autosave system
- Added a "Created On Version" stat
  • Loading branch information
o7q committed May 18, 2023
1 parent 1516d16 commit d699509
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
~ v1.7.2.0
- Fixed a bug where the key would infinitely get created by the autosave system
- Added a "Created On Version" stat

~ v1.7.1.0
- Fixed the autosave system
- Fixed the cps counter to work with controller
Expand Down
2 changes: 1 addition & 1 deletion src/Keystrokes/Includes/Data/Storage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Keystrokes.Data
{
public static class Storage
{
public static string VERSION = "v1.7.1";
public static string VERSION = "v1.7.2";
public static List<Form> keys = new List<Form>();

public static string[] key_names =
Expand Down
1 change: 1 addition & 0 deletions src/Keystrokes/Includes/Data/Structure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace Keystrokes.Data
public struct KeyInfo
{
public string VERSION;
public string VERSION_CREATED_ON;

public string presetName;

Expand Down
6 changes: 5 additions & 1 deletion src/Keystrokes/Key.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public Key(KeyInfo keyData_)
// load keyData_ into keyData
keyData = keyData_;
keyData.VERSION = VERSION;
if (keyData.VERSION_CREATED_ON == null)
keyData.VERSION_CREATED_ON = VERSION;
}

private void Key_Load(object sender, EventArgs e)
Expand Down Expand Up @@ -807,7 +809,8 @@ private void StatsButton_Click(object sender, EventArgs e)

"Nickname: " + keyData.KEY_NICKNAME + "\n" +
"Key Age: " + formattedTime + "\n" +
"Creation Date: " + keyData.KEY_CREATION_DATE;
"Creation Date: " + keyData.KEY_CREATION_DATE + "\n" +
"Created On Version: " + keyData.VERSION_CREATED_ON;
CustomMessageBox statsWindow = new CustomMessageBox();
statsWindow.MessageText = keyStats;
statsWindow.ShowDialog();
Expand Down Expand Up @@ -966,6 +969,7 @@ private void HandleClose(bool deleteKey)

// disable the input ping
inputPing.Enabled = false;
secPing.Enabled = false;

// dispose the background images if they are being used
if (useBackgroundImage == true)
Expand Down
2 changes: 2 additions & 0 deletions src/Keystrokes/KeyEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ private void CreateKeyButton_PreviewKeyDown(object sender, PreviewKeyDownEventAr

// lock create button
allowKeyCreation = false;
allowControllerCreation = false;
}

bool allowControllerCreation = false;
Expand Down Expand Up @@ -239,6 +240,7 @@ private void ControllerRefresh(object source, ElapsedEventArgs e)
// disable ControllerRefresh
controllerPing.Enabled = false;
allowControllerCreation = false;
allowKeyCreation = false;

Invoke((MethodInvoker)delegate
{
Expand Down
1 change: 1 addition & 0 deletions src/Keystrokes/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ private void LoadPresetButton_Click(object sender, EventArgs e)
switch (keySettingPair[0])
{
case "VERSION": keyData_.VERSION = keySettingPair[1]; break;
case "VERSION_CREATED_ON": keyData_.VERSION_CREATED_ON = keySettingPair[1]; break;

case "presetName": keyData_.presetName = keySettingPair[1]; break;

Expand Down

0 comments on commit d699509

Please sign in to comment.