Skip to content

Commit

Permalink
Attempted to fix memory leak in UL_Basic3D1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nielk1 committed Feb 17, 2018
1 parent d40a7e2 commit 1a91f87
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
28 changes: 14 additions & 14 deletions VSCView/MainForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions VSCView/OSD.cs
Original file line number Diff line number Diff line change
Expand Up @@ -921,10 +921,14 @@ private void Draw3dAs3d(
{
if (Math.Sign(TiltFactorX) > 0) {
float percent = TiltFactorX * 2;// * 0.15f;
percent = (float)Math.Round(percent * 25f) / 25f;
percent = (float)Math.Min(percent, 1.0f);
g.DrawImage(cache.GetImage($"{ImageGyroDName}:{percent}", () => { return UI_ImageCache.SetImageOpacity(ImageGyroD, percent); }), location.X, location.Y, Width, Height);
}
if (Math.Sign(TiltFactorX) < 0) {
float percent = -TiltFactorX * 2;// * 0.15f;
percent = (float)Math.Round(percent * 25f) / 25f;
percent = (float)Math.Min(percent, 1.0f);
g.DrawImage(cache.GetImage($"{ImageGyroUName}:{percent}", () => { return UI_ImageCache.SetImageOpacity(ImageGyroU, percent); }), location.X, location.Y, Width, Height);
}
}
Expand All @@ -933,10 +937,14 @@ private void Draw3dAs3d(
{
if (Math.Sign(TiltFactorY) > 0) {
float percent = TiltFactorY * 2;// * 0.15f;
percent = (float)Math.Round(percent * 25f) / 25f;
percent = (float)Math.Min(percent, 1.0f);
g.DrawImage(cache.GetImage($"{ImageGyroLName}:{percent}", () => { return UI_ImageCache.SetImageOpacity(ImageGyroL, percent); }), location.X, location.Y, Width, Height);
}
if (Math.Sign(TiltFactorY) < 0) {
float percent = -TiltFactorY * 2;// * 0.15f;
percent = (float)Math.Round(percent * 25f) / 25f;
percent = (float)Math.Min(percent, 1.0f);
g.DrawImage(cache.GetImage($"{ImageGyroRName}:{percent}", () => { return UI_ImageCache.SetImageOpacity(ImageGyroR, percent); }), location.X, location.Y, Width, Height);
}
}
Expand Down
4 changes: 2 additions & 2 deletions VSCView/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,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("0.3.0.4")]
[assembly: AssemblyFileVersion("0.3.0.4")]
[assembly: AssemblyVersion("0.3.1.4")]
[assembly: AssemblyFileVersion("0.3.1.4")]

0 comments on commit 1a91f87

Please sign in to comment.