Skip to content

Commit

Permalink
Fix broken auto-save for axes!
Browse files Browse the repository at this point in the history
  • Loading branch information
arithex committed Nov 8, 2023
1 parent 9485089 commit 7d04ae5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ public AxisAssignWindow(MainWindow mainWindow, InGameAxAssgn axisAssign, object
{
InitializeComponent();

this.Owner = mainWindow;

this.mainWindow = mainWindow;
this.axisAssign = axisAssign;

Expand Down Expand Up @@ -436,10 +438,6 @@ private void Save_Click(object sender, RoutedEventArgs e)
AxisDetectionTimer.Stop();
sw.Stop();

// Save the XML and Key files, after each change user makes.
MainWindow.deviceControl.SaveXml();
Program.mainWin.appReg.getOverrideWriter().SaveKeyMapping(MainWindow.inGameAxis, MainWindow.deviceControl);

Close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,10 @@ private void Assign_Click(object sender, RoutedEventArgs e)
joyAssign_2_inGameAxis();
ResetAssgnWindow();

// Save the XML and Key files, after each change user makes.
MainWindow.deviceControl.SaveXml();
this.appReg.getOverrideWriter().SaveKeyMapping(MainWindow.inGameAxis, MainWindow.deviceControl);

NewDeviceDetectTimer.Start();
AxisMovingTimer.Start();
}
Expand Down

0 comments on commit 7d04ae5

Please sign in to comment.