mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 10:47:02 -07:00
This simple workaround fixes that the animations are not at the right speed (it's a workaround as it would be much nicer if the number of frames is correctly calculated.)
This commit is contained in:
parent
f084d0e95e
commit
95c4ea5cbe
1 changed files with 1 additions and 22 deletions
|
@ -34,7 +34,6 @@ namespace Greenshot.Base.Controls
|
|||
{
|
||||
private static readonly ILog Log = LogManager.GetLogger(typeof(AnimatingForm));
|
||||
private const int DEFAULT_VREFRESH = 60;
|
||||
private int _vRefresh;
|
||||
private Timer _timer;
|
||||
|
||||
/// <summary>
|
||||
|
@ -45,27 +44,7 @@ namespace Greenshot.Base.Controls
|
|||
/// <summary>
|
||||
/// Vertical Refresh Rate
|
||||
/// </summary>
|
||||
protected int VRefresh
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_vRefresh == 0)
|
||||
{
|
||||
// get te hDC of the desktop to get the V-REFRESH
|
||||
using var desktopHandle = SafeWindowDcHandle.FromDesktop();
|
||||
_vRefresh = GDI32.GetDeviceCaps(desktopHandle, DeviceCaps.VREFRESH);
|
||||
}
|
||||
|
||||
// A vertical refresh rate value of 0 or 1 represents the display hardware's default refresh rate.
|
||||
// As there is currently no know way to get the default, we guess it.
|
||||
if (_vRefresh <= 1)
|
||||
{
|
||||
_vRefresh = DEFAULT_VREFRESH;
|
||||
}
|
||||
|
||||
return _vRefresh;
|
||||
}
|
||||
}
|
||||
protected int VRefresh => DEFAULT_VREFRESH;
|
||||
|
||||
/// <summary>
|
||||
/// Check if we are in a Terminal Server session OR need to optimize for RDP / remote desktop connections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue