Skip to content

Commit

Permalink
Fixed First time instructions not ensuring STA thread
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-wh committed Jan 29, 2019
1 parent c8ab7bb commit cbd227c
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ public bool Initialize()
{
if (Global.Configuration.corsair_first_time)
{
CorsairInstallInstructions instructions = new CorsairInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
CorsairInstallInstructions instructions = new CorsairInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.corsair_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down
8 changes: 5 additions & 3 deletions Project-Aurora/Project-Aurora/Devices/Dualshock4/Dualshock4Device.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ public bool Initialize()
isInitialized = true;
if (Global.Configuration.dualshock_first_time)
{
DualshockInstallInstructions instructions = new DualshockInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
DualshockInstallInstructions instructions = new DualshockInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.dualshock_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,11 @@ public bool Initialize()
{
if (Global.Configuration.logitech_first_time)
{
LogitechInstallInstructions instructions = new LogitechInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
LogitechInstallInstructions instructions = new LogitechInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.logitech_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down
8 changes: 5 additions & 3 deletions Project-Aurora/Project-Aurora/Devices/Razer/RazerDevice.cs
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,11 @@ public bool Initialize()

if (Global.Configuration.razer_first_time)
{
RazerInstallInstructions instructions = new RazerInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
RazerInstallInstructions instructions = new RazerInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.razer_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down
8 changes: 5 additions & 3 deletions Project-Aurora/Project-Aurora/Devices/Roccat/RoccatDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,11 @@ public bool Initialize()
}
if (Global.Configuration.roccat_first_time)
{
RoccatInstallInstructions instructions = new RoccatInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
RoccatInstallInstructions instructions = new RoccatInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.roccat_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,11 @@ public bool Initialize()

if (Global.Configuration.steelseries_first_time)
{
SteelSeriesInstallInstructions instructions = new SteelSeriesInstallInstructions();
instructions.ShowDialog();

App.Current.Dispatcher.Invoke(() =>
{
SteelSeriesInstallInstructions instructions = new SteelSeriesInstallInstructions();
instructions.ShowDialog();
});
Global.Configuration.steelseries_first_time = false;
Settings.ConfigManager.Save(Global.Configuration);
}
Expand Down

0 comments on commit cbd227c

Please sign in to comment.