Skip to content

Commit

Permalink
rename setting EnableWatchdog into AutoInject and some UI bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
komefai committed Sep 18, 2017
1 parent 8a36c76 commit b57a6ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions PS4Macro/Classes/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ public class Settings
{
public const string FILE_PATH = "settings.xml";

public bool EnableWatchdog { get; set; }
public bool AutoInject { get; set; }
public string StartupFile { get; set; }

public Settings()
{
EnableWatchdog = false;
AutoInject = false;
StartupFile = null;
}

Expand Down
10 changes: 7 additions & 3 deletions PS4Macro/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public MainForm()
m_SaveLoadHelper.PropertyChanged += SaveLoadHelper_PropertyChanged;

// Enable watchdog based on settings
if (!Program.Settings.EnableWatchdog)
if (!Program.Settings.AutoInject)
{
Interceptor.InjectionMode = InjectionMode.Compatibility;
}
Expand All @@ -92,7 +92,7 @@ public MainForm()
else
{
// Handle exception if watchdog is disabled
if (!Program.Settings.EnableWatchdog)
if (!Program.Settings.AutoInject)
{
MessageBox.Show(string.Format("[{0}] - {1}", ex.GetType().ToString(), ex.Message), "Injection Failed", MessageBoxButtons.OK, MessageBoxIcon.Error);
Environment.Exit(-1);
Expand All @@ -101,7 +101,7 @@ public MainForm()
}

// Start watchdog to automatically inject when possible
if (Program.Settings.EnableWatchdog)
if (Program.Settings.AutoInject)
{
Interceptor.Watchdog.Start();
}
Expand All @@ -122,6 +122,10 @@ private void SetControlMode(ControlMode controlMode)
}
else if (m_ControlMode == ControlMode.Script)
{
// Stop macro player
if (m_MacroPlayer.IsRecording) m_MacroPlayer.Record();
m_MacroPlayer.Stop();

// Setup callback to interceptor
Interceptor.Callback = new InterceptionDelegate(m_ScriptHost.OnReceiveData);

Expand Down

0 comments on commit b57a6ed

Please sign in to comment.