Skip to content

Commit

Permalink
Fixed resolution detection for secondary monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
sabaatworld committed Oct 9, 2018
1 parent 2c3b599 commit 61f5658
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions HyperionScreenCap/Capture/Dx11ScreenCapture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ public static String GetAvailableMonitors()
foreach(Output output in adapter.Outputs)
{
response.Append($"\tMonitor Index {outputIndex++}: {output.Description.DeviceName}");
response.Append($" {output.Description.DesktopBounds.Right}×{output.Description.DesktopBounds.Bottom}\n");
var desktopBounds = output.Description.DesktopBounds;
response.Append($" {desktopBounds.Right - desktopBounds.Left}×{desktopBounds.Bottom - desktopBounds.Top}\n");
}
response.Append("\n");
}
Expand Down Expand Up @@ -102,8 +103,9 @@ public void Initialize()
_output1 = _output.QueryInterface<Output1>();

// Width/Height of desktop to capture
_width = _output.Description.DesktopBounds.Right;
_height = _output.Description.DesktopBounds.Bottom;
var desktopBounds = _output.Description.DesktopBounds;
_width = desktopBounds.Right - desktopBounds.Left;
_height = desktopBounds.Bottom - desktopBounds.Top;

CaptureWidth = _width / _scalingFactor;
CaptureHeight = _height / _scalingFactor;
Expand Down
2 changes: 1 addition & 1 deletion HyperionScreenCap/Installation Files/InstallScript.iss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "Hyperion Screen Capture"
#define MyAppVersion "2.5"
#define MyAppVersion "2.6"
#define MyAppPublisher "@sabaatworld"
#define MyAppURL "https://github.com/sabaatworld/HyperionScreenCap"
#define MyAppUpdatesURL "https://github.com/sabaatworld/HyperionScreenCap/releases"
Expand Down
2 changes: 1 addition & 1 deletion HyperionScreenCap/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.5.0.0")]
[assembly: AssemblyVersion("2.6.0.0")]
//[assembly: AssemblyFileVersion("2.0.0.0")] Commented out so that it will be generated automatically

0 comments on commit 61f5658

Please sign in to comment.