aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Profiler/UI
diff options
context:
space:
mode:
authorAlex Barney <thealexbarney@gmail.com>2019-07-01 21:39:22 -0500
committerAc_K <Acoustik666@gmail.com>2019-07-02 04:39:22 +0200
commitb2b736abc2569ab5d8199da666aef8d8394844a0 (patch)
tree88bcc2ae4fb0d4161c95df2cd7edb12388de922a /Ryujinx.Profiler/UI
parent10c74182babaf8cf6bedaeffd64c3109df4ea816 (diff)
Misc cleanup (#708)
* Fix typos * Remove unneeded using statements * Enforce var style more * Remove redundant qualifiers * Fix some indentation * Disable naming warnings on files with external enum names * Fix build * Mass find & replace for comments with no spacing * Standardize todo capitalization and for/if spacing
Diffstat (limited to 'Ryujinx.Profiler/UI')
-rw-r--r--Ryujinx.Profiler/UI/ProfileSorters.cs1
-rw-r--r--Ryujinx.Profiler/UI/ProfileWindow.cs6
-rw-r--r--Ryujinx.Profiler/UI/ProfileWindowBars.cs2
-rw-r--r--Ryujinx.Profiler/UI/ProfileWindowGraph.cs6
-rw-r--r--Ryujinx.Profiler/UI/ProfileWindowManager.cs3
-rw-r--r--Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs8
6 files changed, 12 insertions, 14 deletions
diff --git a/Ryujinx.Profiler/UI/ProfileSorters.cs b/Ryujinx.Profiler/UI/ProfileSorters.cs
index 2d06f426..9f66de22 100644
--- a/Ryujinx.Profiler/UI/ProfileSorters.cs
+++ b/Ryujinx.Profiler/UI/ProfileSorters.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using System.Text;
namespace Ryujinx.Profiler.UI
{
diff --git a/Ryujinx.Profiler/UI/ProfileWindow.cs b/Ryujinx.Profiler/UI/ProfileWindow.cs
index c58b9235..1db70bc7 100644
--- a/Ryujinx.Profiler/UI/ProfileWindow.cs
+++ b/Ryujinx.Profiler/UI/ProfileWindow.cs
@@ -98,7 +98,7 @@ namespace Ryujinx.Profiler.UI
private readonly object _profileDataLock = new object();
public ProfileWindow()
- // Graphigs mode enables 2xAA
+ // Graphics mode enables 2xAA
: base(1280, 720, new GraphicsMode(new ColorFormat(8, 8, 8, 8), 1, 1, 2))
{
Title = "Profiler";
@@ -108,7 +108,7 @@ namespace Ryujinx.Profiler.UI
if (Profile.UpdateRate <= 0)
{
// Perform step regardless of flag type
- Profile.RegisterFlagReciever((t) =>
+ Profile.RegisterFlagReceiver((t) =>
{
if (!_paused)
{
@@ -146,7 +146,7 @@ namespace Ryujinx.Profiler.UI
{
GL.ClearColor(Color.Black);
_fontService = new FontService();
- _fontService.InitalizeTextures();
+ _fontService.InitializeTextures();
_fontService.UpdateScreenHeight(Height);
_buttons = new ProfileButton[(int)ButtonIndex.Count];
diff --git a/Ryujinx.Profiler/UI/ProfileWindowBars.cs b/Ryujinx.Profiler/UI/ProfileWindowBars.cs
index b1955a07..ab5b4fd1 100644
--- a/Ryujinx.Profiler/UI/ProfileWindowBars.cs
+++ b/Ryujinx.Profiler/UI/ProfileWindowBars.cs
@@ -18,7 +18,7 @@ namespace Ryujinx.Profiler.UI
float barHeight = (LineHeight - LinePadding) / 3.0f;
// Get max values
- var maxInstant = maxAverage = maxTotal = 0;
+ long maxInstant = maxAverage = maxTotal = 0;
foreach (KeyValuePair<ProfileConfig, TimingInfo> kvp in _sortedProfileData)
{
maxInstant = Math.Max(maxInstant, kvp.Value.Instant);
diff --git a/Ryujinx.Profiler/UI/ProfileWindowGraph.cs b/Ryujinx.Profiler/UI/ProfileWindowGraph.cs
index 9d34be97..6a4a52a9 100644
--- a/Ryujinx.Profiler/UI/ProfileWindowGraph.cs
+++ b/Ryujinx.Profiler/UI/ProfileWindowGraph.cs
@@ -7,8 +7,8 @@ namespace Ryujinx.Profiler.UI
{
public partial class ProfileWindow
{
- // Colour index equal to timing flag type as int
- private Color[] _timingFlagColours = new[]
+ // Color index equal to timing flag type as int
+ private Color[] _timingFlagColors = new[]
{
new Color(150, 25, 25, 50), // FrameSwap = 0
new Color(25, 25, 150, 50), // SystemFrame = 1
@@ -62,7 +62,7 @@ namespace Ryujinx.Profiler.UI
if (prevType != timingFlag.FlagType)
{
prevType = timingFlag.FlagType;
- GL.Color4(_timingFlagColours[(int)prevType]);
+ GL.Color4(_timingFlagColors[(int)prevType]);
}
int x = (int)(graphRight - ((graphPositionTicks - timingFlag.Timestamp) / timeWidthTicks) * width);
diff --git a/Ryujinx.Profiler/UI/ProfileWindowManager.cs b/Ryujinx.Profiler/UI/ProfileWindowManager.cs
index 4ba0c881..c6a65a31 100644
--- a/Ryujinx.Profiler/UI/ProfileWindowManager.cs
+++ b/Ryujinx.Profiler/UI/ProfileWindowManager.cs
@@ -1,5 +1,4 @@
-using System.Diagnostics;
-using System.Threading;
+using System.Threading;
using OpenTK;
using OpenTK.Input;
using Ryujinx.Common;
diff --git a/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs b/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs
index e64c9da3..32846977 100644
--- a/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs
+++ b/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs
@@ -36,7 +36,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers
private string GetFontPath()
{
- string fontFolder = System.Environment.GetFolderPath(Environment.SpecialFolder.Fonts);
+ string fontFolder = Environment.GetFolderPath(Environment.SpecialFolder.Fonts);
// Only uses Arial, add more fonts here if wanted
string path = Path.Combine(fontFolder, "arial.ttf");
@@ -48,7 +48,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers
throw new Exception($"Profiler exception. Required font Courier New or Arial not installed to {fontFolder}");
}
- public void InitalizeTextures()
+ public void InitializeTextures()
{
// Create and init some vars
uint[] rawCharacterSheet = new uint[SheetWidth * SheetHeight];
@@ -66,7 +66,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers
// Update raw data for each character
for (int i = 0; i < 94; i++)
{
- var surface = RenderSurface((char)(i + 33), font, out var xBearing, out var yBearing, out var advance);
+ var surface = RenderSurface((char)(i + 33), font, out float xBearing, out float yBearing, out float advance);
characters[i] = UpdateTexture(surface, ref rawCharacterSheet, ref x, ref y, ref lineOffset);
characters[i].BearingX = xBearing;
@@ -217,7 +217,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers
lineOffset = 0;
}
- // Update lineoffset
+ // Update lineOffset
if (lineOffset < height)
{
lineOffset = height + 1;