diff --git a/SekiroFpsUnlockAndMore/MainWindow.xaml b/SekiroFpsUnlockAndMore/MainWindow.xaml
index 76eb081..8197759 100644
--- a/SekiroFpsUnlockAndMore/MainWindow.xaml
+++ b/SekiroFpsUnlockAndMore/MainWindow.xaml
@@ -7,84 +7,111 @@
mc:Ignorable="d"
Title="Sekiro FPS Unlocker and more v1.1.0" Width="Auto" Height="Auto" SizeToContent="WidthAndHeight" ResizeMode="CanMinimize" Loaded="Window_Loaded" Closing="Window_Closing">
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
-
-
-
- This patcher does not modify game files, you have to start it every time.
- If your monitor is 60 Hz you will have to use
- fullscreen mode and force disable VSYNC
- with Nvidia Control panel or AMD Radeon Settings to get frame rate unlock working.
- To avoid stuttering it's recommended to disable VSYNC even with a 144 Hz monitor.
- If your monitor is >60 Hz you will have to use
- borderless window mode or force the game to run on highest available refresh rate
- using Nvidia Control panel or AMD Radeon Settings.
- Borderless window mode requires "Windowed" in game settings first.
- Custom resolution adds 21/9 support and overwrites a default resolution, hud will be limited to 16/9.
- Borderless window mode with custom resolution requires you to patch and set resolution first, then add borderless patch afterwards.
- To enable Player Speed modification you have to be ingame first.
- See the link below for detailed information, guides, GSYNC support and an AMD fix.
-
-
-
-
-
+
+
+
+ This patcher does not modify game files, you have to start it every time.
+ If your monitor is 60 Hz you will have to use
+ fullscreen mode and force disable VSYNC
+ with Nvidia Control panel or AMD Radeon Settings to get frame rate unlock working.
+ To avoid stuttering it's recommended to disable VSYNC even with a 144 Hz monitor.
+ If your monitor is >60 Hz you will have to use
+ borderless window mode or force the game to run on highest available refresh rate
+ using Nvidia Control panel or AMD Radeon Settings.
+ Borderless window mode requires "Windowed" in game settings first.
+ Custom resolution adds 21/9 support and overwrites a default resolution, hud will be limited to 16/9.
+ Borderless window mode with custom resolution requires you to patch and set resolution first, then add borderless patch afterwards.
+ To enable Player Speed modification you have to be ingame first.
+ See the link below for detailed information, guides, GSYNC support and an AMD fix.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SekiroFpsUnlockAndMore/MainWindow.xaml.cs b/SekiroFpsUnlockAndMore/MainWindow.xaml.cs
index 5aa014b..6fa0570 100644
--- a/SekiroFpsUnlockAndMore/MainWindow.xaml.cs
+++ b/SekiroFpsUnlockAndMore/MainWindow.xaml.cs
@@ -12,8 +12,8 @@ using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text.RegularExpressions;
using System.Timers;
-using Timer = System.Timers.Timer;
-
+using Timer = System.Timers.Timer;
+
namespace SekiroFpsUnlockAndMore
{
public partial class MainWindow : Window
@@ -41,17 +41,21 @@ namespace SekiroFpsUnlockAndMore
internal SettingsService _settingsService;
internal const string totalKillsFilename = "TotalKillsCounter.txt";
+ internal StatViewModel _statViewModel = new StatViewModel();
+ private bool _statLoggingEnabled = false;
internal readonly Timer _statRecordTimer = new Timer();
internal readonly DispatcherTimer _dispatcherTimerCheck = new DispatcherTimer();
internal bool _running = false;
internal string _logPath;
internal bool _retryAccess = true;
internal RECT _windowRect;
+
public MainWindow()
{
- InitializeComponent();
- }
+ InitializeComponent();
+ DataContext = _statViewModel;
+ }
///
/// On window loaded.
@@ -89,6 +93,7 @@ namespace SekiroFpsUnlockAndMore
_statRecordTimer.Elapsed += new ElapsedEventHandler(StatReadTimer);
_statRecordTimer.Interval = 1500;
+ _statRecordTimer.Start();
}
///
@@ -699,18 +704,19 @@ namespace SekiroFpsUnlockAndMore
/// (_gameAccessHwndStatic, _pointer_player_deaths);
- //Debug.WriteLine("[STAT]Player deaths: " + playerDeaths);
- LogStatFile(deathCounterFilename, playerDeaths.ToString());
+ _statViewModel.Deaths = playerDeaths;
+ if (_statLoggingEnabled) LogStatFile(deathCounterFilename, playerDeaths.ToString());
if (IsValidAddress(_pointer_total_kills))
{
int totalKills = Read(_gameAccessHwndStatic, _pointer_total_kills);
totalKills -= playerDeaths; //Since this value seems to track every death, including the player
- //Debug.WriteLine("[STAT]Enemies killed: " + totalKills);
- LogStatFile(totalKillsFilename, totalKills.ToString());
+ _statViewModel.Kills = totalKills;
+ if (_statLoggingEnabled) LogStatFile(totalKillsFilename, totalKills.ToString());
}
}
}
@@ -1067,7 +1073,7 @@ namespace SekiroFpsUnlockAndMore
private void CbStatChanged(object sender, RoutedEventArgs e)
{
- _statRecordTimer.Enabled = (bool)cbLogStats.IsChecked;
+ _statLoggingEnabled = (bool)cbLogStats.IsChecked;
}
private void BPatch_Click(object sender, RoutedEventArgs e)
diff --git a/SekiroFpsUnlockAndMore/StatViewModel.cs b/SekiroFpsUnlockAndMore/StatViewModel.cs
new file mode 100644
index 0000000..6c1a35c
--- /dev/null
+++ b/SekiroFpsUnlockAndMore/StatViewModel.cs
@@ -0,0 +1,43 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace SekiroFpsUnlockAndMore
+{
+ ///
+ /// For Status bar display
+ ///
+ class StatViewModel : INotifyPropertyChanged
+ {
+ private int _deaths = 0;
+ public int Deaths
+ {
+ get { return _deaths; }
+ set
+ {
+ _deaths = value;
+ OnPropertyChanged(new PropertyChangedEventArgs("Deaths"));
+ }
+ }
+
+ private int _kills = 0;
+ public int Kills
+ {
+ get { return _kills; }
+ set
+ {
+ _kills = value;
+ OnPropertyChanged(new PropertyChangedEventArgs("Kills"));
+ }
+ }
+
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public void OnPropertyChanged(PropertyChangedEventArgs e)
+ {
+ PropertyChanged?.Invoke(this, e);
+ }
+ }
+}