Skip to content

Commit 51071e2

Browse files
author
Martin Nielsen
committed
Patch 1.4.6 - Fixed issue with detecting competitive play screen due to brightness.
TODO: alternative way of detecting
1 parent c857c04 commit 51071e2

5 files changed

Lines changed: 10 additions & 7 deletions

File tree

BetterOverwatch/Functions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,10 @@ public static string BitmapToText(Bitmap frame, int x, int y, int width, int hei
300300
AdjustContrast(result, 255f, invertColors, limeToWhite);
301301
}
302302
output = FetchTextFromImage(result, network);
303-
303+
if(output.StartsWith("70"))
304+
{
305+
//result.Save($@"C:\Users\Avoid\Desktop\test\{output}.png", ImageFormat.Png);
306+
}
304307
result.Dispose();
305308
}
306309
catch (Exception e) { Console.WriteLine($"BitmapToText error: {e}"); }

BetterOverwatch/GameMethods.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class GameMethods
1313
{
1414
public static bool IsOnCompetitiveScreen(Bitmap frame)
1515
{
16-
return (Functions.BitmapToText(frame, 76, 204, 78, 28, true, 110, Network.Numbers, false) == "7022");
16+
return (Functions.BitmapToText(frame, 76, 204, 78, 28, false, 110, Network.Numbers, false) == "7029");
1717
}
1818
public static void ReadRoleRatings(Bitmap frame)
1919
{

BetterOverwatch/Program.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ internal class Program
2222
private static void Main()
2323
{
2424
AppData.initalize = new Initalize(
25-
"1.4.5",
25+
"1.4.6",
2626
"betteroverwatch.com",
2727
"https://api.github.com/repos/MartinNielsenDev/OverwatchTracker/releases/latest");
2828
Application.EnableVisualStyles();
@@ -32,7 +32,7 @@ private static void Main()
3232

3333
if (!mutex.WaitOne(TimeSpan.Zero, true))
3434
{
35-
MessageBox.Show("Better Overwatch is already running\r\n\r\nYou must close other instances of Better Overwatch if you want to open this one", "", MessageBoxButtons.OK, MessageBoxIcon.Error);
35+
MessageBox.Show("Better Overwatch is already running\r\n\r\nYou must close other instances of Better Overwatch if you want to open this one", "Better Overwatch", MessageBoxButtons.OK, MessageBoxIcon.Error);
3636
return;
3737
}
3838
AppDomain.CurrentDomain.AssemblyResolve += (s, assembly) =>

BetterOverwatch/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,5 @@
3131
// You can specify all the values or you can default the Build and Revision Numbers
3232
// by using the '*' as shown below:
3333
// [assembly: AssemblyVersion("1.0.*")]
34-
[assembly: AssemblyVersion("1.4.5.0")]
35-
[assembly: AssemblyFileVersion("1.4.5.0")]
34+
[assembly: AssemblyVersion("1.4.6.0")]
35+
[assembly: AssemblyFileVersion("1.4.6.0")]

BetterOverwatch/ScreenCaptureHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace BetterOverwatch
1010
{
1111
class ScreenCaptureHandler
1212
{
13-
#if DEBUG
13+
#if DEBUG
1414
public static bool debug = true;
1515
#else
1616
public static bool debug = false;

0 commit comments

Comments
 (0)