From 8d3b23c3eb897e2091fcf0b3b964a5c446d1a471 Mon Sep 17 00:00:00 2001 From: Andy Adshead Date: Sat, 26 Jan 2019 20:54:35 +0000 Subject: [PATCH] Variable name cleanup --- Ryujinx.Profiler/InternalProfile.cs | 8 +- Ryujinx.Profiler/ProfileConfig.cs | 20 +- Ryujinx.Profiler/UI/ProfileButton.cs | 10 +- Ryujinx.Profiler/UI/ProfileWindow.cs | 174 +++++++++--------- Ryujinx.Profiler/UI/ProfileWindowManager.cs | 26 ++- .../UI/SharpFontHelpers/FontService.cs | 8 +- 6 files changed, 130 insertions(+), 116 deletions(-) diff --git a/Ryujinx.Profiler/InternalProfile.cs b/Ryujinx.Profiler/InternalProfile.cs index 55f35d1585..7e4612a83f 100644 --- a/Ryujinx.Profiler/InternalProfile.cs +++ b/Ryujinx.Profiler/InternalProfile.cs @@ -11,8 +11,8 @@ namespace Ryujinx.Profiler private Stopwatch SW; internal ConcurrentDictionary Timers; - private readonly object sessionLock = new object(); - private int sessionCounter = 0; + private readonly object SessionLock = new object(); + private int SessionCounter = 0; public InternalProfile() { @@ -69,9 +69,9 @@ namespace Ryujinx.Profiler public string GetSession() { // Can be called from multiple threads so locked to ensure no duplicate sessions are generated - lock (sessionLock) + lock (SessionLock) { - return (sessionCounter++).ToString(); + return (SessionCounter++).ToString(); } } diff --git a/Ryujinx.Profiler/ProfileConfig.cs b/Ryujinx.Profiler/ProfileConfig.cs index b932631813..18bd3b0db7 100644 --- a/Ryujinx.Profiler/ProfileConfig.cs +++ b/Ryujinx.Profiler/ProfileConfig.cs @@ -9,7 +9,7 @@ namespace Ryujinx.Profiler public string Category; public string SessionGroup, SessionItem; - private string cachedTag, cachedSession; + private string CachedTag, CachedSession; public string Search => $"{Category}.{SessionGroup}.{SessionItem}"; @@ -17,9 +17,9 @@ namespace Ryujinx.Profiler { get { - if (cachedTag == null) - cachedTag = $"{Category}{(Session == "" ? "" : $" ({Session})")}"; - return cachedTag; + if (CachedTag == null) + CachedTag = $"{Category}{(Session == "" ? "" : $" ({Session})")}"; + return CachedTag; } } @@ -27,27 +27,27 @@ namespace Ryujinx.Profiler { get { - if (cachedSession == null) + if (CachedSession == null) { if (SessionGroup != null && SessionItem != null) { - cachedSession = $"{SessionGroup}: {SessionItem}"; + CachedSession = $"{SessionGroup}: {SessionItem}"; } else if (SessionGroup != null) { - cachedSession = $"{SessionGroup}"; + CachedSession = $"{SessionGroup}"; } else if (SessionItem != null) { - cachedSession = $"---: {SessionItem}"; + CachedSession = $"---: {SessionItem}"; } else { - cachedSession = ""; + CachedSession = ""; } } - return cachedSession; + return CachedSession; } } } diff --git a/Ryujinx.Profiler/UI/ProfileButton.cs b/Ryujinx.Profiler/UI/ProfileButton.cs index 55d33bd257..535d8a520e 100644 --- a/Ryujinx.Profiler/UI/ProfileButton.cs +++ b/Ryujinx.Profiler/UI/ProfileButton.cs @@ -10,10 +10,10 @@ namespace Ryujinx.Profiler.UI { public class ProfileButton { - private int padding; + private int Padding; private FontService FontService; private int X, Y, Right, Top, Height; - private int textX, textY; + private int TextX, TextY; private string Label; private Action Clicked; private bool Visible; @@ -55,8 +55,8 @@ namespace Ryujinx.Profiler.UI Height = height; X = x; Y = y; - textX = x + padding / 2; - textY = y + padding / 2; + TextX = x + padding / 2; + TextY = y + padding / 2; Top = y + height + padding; Right = x + width + padding; } @@ -79,7 +79,7 @@ namespace Ryujinx.Profiler.UI GL.Vertex2(X, Y); GL.End(); - FontService.DrawText(Label, textX, textY, Height); + FontService.DrawText(Label, TextX, TextY, Height); } public bool ProcessClick(int x, int y) diff --git a/Ryujinx.Profiler/UI/ProfileWindow.cs b/Ryujinx.Profiler/UI/ProfileWindow.cs index 7d911c0758..182139d15b 100644 --- a/Ryujinx.Profiler/UI/ProfileWindow.cs +++ b/Ryujinx.Profiler/UI/ProfileWindow.cs @@ -26,28 +26,28 @@ namespace Ryujinx Pause = 6, } - private bool visible = true, initComplete = false, viewportUpdated = true; - public bool visibleChanged; - private FontService fontService; - private List> rawPofileData, profileData; + private bool VisibleLocal = true, InitComplete = false, ViewportUpdated = true; + public bool VisibleChangedLocal; + private FontService FontServ; + private List> RawPofileData, ProfileData; - private float scrollPos = 0; - private float minScroll = 0, maxScroll = 0; + private float ScrollPos = 0; + private float MinScroll = 0, MaxScroll = 0; - private ProfileButton[] buttons; - private IComparer> sortAction; + private ProfileButton[] Buttons; + private IComparer> SortAction; private string FilterText = ""; private double BackspaceDownTime, UpdateTimer; - private bool BackspaceDown = false, prevBackspaceDown = false, regexEnabled = false, ProfileUpdated = false; - private bool showInactive = true, Paused = false; + private bool BackspaceDown = false, PrevBackspaceDown = false, RegexEnabled = false, ProfileUpdated = false; + private bool ShowInactive = true, Paused = false; public ProfileWindow() : base(1280, 720) { Location = new Point(DisplayDevice.Default.Width - 1280, (DisplayDevice.Default.Height - 720) - 50); Title = "Profiler"; - sortAction = null; + SortAction = null; BackspaceDownTime = 0; // Large number to force an update on first update @@ -57,8 +57,8 @@ namespace Ryujinx #region Public Methods public void ToggleVisible() { - visible = !visible; - visibleChanged = true; + VisibleLocal = !VisibleLocal; + VisibleChangedLocal = true; } #endregion @@ -70,26 +70,26 @@ namespace Ryujinx protected override void OnLoad(EventArgs e) { GL.ClearColor(Color.MidnightBlue); - fontService = new FontService(); - fontService.InitalizeTextures(); - fontService.UpdateScreenHeight(Height); + FontServ = new FontService(); + FontServ.InitalizeTextures(); + FontServ.UpdateScreenHeight(Height); - buttons = new ProfileButton[7]; - buttons[(int)ButtonIndex.TagTitle] = new ProfileButton(fontService, () => sortAction = new ProfileSorters.TagAscending()); - buttons[(int)ButtonIndex.InstantTitle] = new ProfileButton(fontService, () => sortAction = new ProfileSorters.InstantAscending()); - buttons[(int)ButtonIndex.AverageTitle] = new ProfileButton(fontService, () => sortAction = new ProfileSorters.AverageAscending()); - buttons[(int)ButtonIndex.TotalTitle] = new ProfileButton(fontService, () => sortAction = new ProfileSorters.TotalAscending()); - buttons[(int)ButtonIndex.FilterBar] = new ProfileButton(fontService, () => + Buttons = new ProfileButton[7]; + Buttons[(int)ButtonIndex.TagTitle] = new ProfileButton(FontServ, () => SortAction = new ProfileSorters.TagAscending()); + Buttons[(int)ButtonIndex.InstantTitle] = new ProfileButton(FontServ, () => SortAction = new ProfileSorters.InstantAscending()); + Buttons[(int)ButtonIndex.AverageTitle] = new ProfileButton(FontServ, () => SortAction = new ProfileSorters.AverageAscending()); + Buttons[(int)ButtonIndex.TotalTitle] = new ProfileButton(FontServ, () => SortAction = new ProfileSorters.TotalAscending()); + Buttons[(int)ButtonIndex.FilterBar] = new ProfileButton(FontServ, () => { ProfileUpdated = true; - regexEnabled = !regexEnabled; + RegexEnabled = !RegexEnabled; }); - buttons[(int)ButtonIndex.ShowHideInactive] = new ProfileButton(fontService, () => + Buttons[(int)ButtonIndex.ShowHideInactive] = new ProfileButton(FontServ, () => { ProfileUpdated = true; - showInactive = !showInactive; + ShowInactive = !ShowInactive; }); - buttons[(int)ButtonIndex.Pause] = new ProfileButton(fontService, () => + Buttons[(int)ButtonIndex.Pause] = new ProfileButton(FontServ, () => { ProfileUpdated = true; Paused = !Paused; @@ -105,7 +105,7 @@ namespace Ryujinx /// There is no need to call the base implementation. protected override void OnResize(EventArgs e) { - viewportUpdated = true; + ViewportUpdated = true; } #endregion @@ -115,8 +115,8 @@ namespace Ryujinx /// protected override void OnClosing(CancelEventArgs e) { - visible = false; - visibleChanged = true; + VisibleLocal = false; + VisibleChangedLocal = true; e.Cancel = true; base.OnClosing(e); } @@ -130,12 +130,12 @@ namespace Ryujinx /// There is no need to call the base implementation. protected override void OnUpdateFrame(FrameEventArgs e) { - initComplete = true; + InitComplete = true; // Backspace handling if (BackspaceDown) { - if (!prevBackspaceDown) + if (!PrevBackspaceDown) { BackspaceDownTime = 0; FilterBackspace(); @@ -150,42 +150,42 @@ namespace Ryujinx } } } - prevBackspaceDown = BackspaceDown; + PrevBackspaceDown = BackspaceDown; // Get timing data if enough time has passed UpdateTimer += e.Time; if (!Paused && (UpdateTimer > Profile.GetUpdateRate())) { UpdateTimer %= Profile.GetUpdateRate(); - rawPofileData = Profile.GetProfilingData().ToList(); + RawPofileData = Profile.GetProfilingData().ToList(); ProfileUpdated = true; } // Filtering if (ProfileUpdated) { - if (showInactive) + if (ShowInactive) { - profileData = rawPofileData; + ProfileData = RawPofileData; } else { - profileData = rawPofileData.FindAll(kvp => kvp.Value.Instant > 0.001f); + ProfileData = RawPofileData.FindAll(kvp => kvp.Value.Instant > 0.001f); } - if (sortAction != null) + if (SortAction != null) { - profileData.Sort(sortAction); + ProfileData.Sort(SortAction); } - if (regexEnabled) + if (RegexEnabled) { try { Regex filterRegex = new Regex(FilterText, RegexOptions.IgnoreCase); if (FilterText != "") { - profileData = profileData.Where((pair => filterRegex.IsMatch(pair.Key.Search))).ToList(); + ProfileData = ProfileData.Where((pair => filterRegex.IsMatch(pair.Key.Search))).ToList(); } } catch (ArgumentException argException) @@ -196,7 +196,7 @@ namespace Ryujinx else { // Regular filtering - profileData = profileData.Where((pair => pair.Key.Search.ToLower().Contains(FilterText.ToLower()))).ToList(); + ProfileData = ProfileData.Where((pair => pair.Key.Search.ToLower().Contains(FilterText.ToLower()))).ToList(); } ProfileUpdated = false; @@ -212,19 +212,19 @@ namespace Ryujinx /// There is no need to call the base implementation. protected override void OnRenderFrame(FrameEventArgs e) { - if (visibleChanged) + if (VisibleChangedLocal) { - Visible = visible; - visibleChanged = false; + Visible = VisibleLocal; + VisibleChangedLocal = false; } - if (!visible || !initComplete) + if (!VisibleLocal || !InitComplete) { return; } // Update viewport - if (viewportUpdated) + if (ViewportUpdated) { GL.Viewport(0, 0, Width, Height); @@ -232,16 +232,16 @@ namespace Ryujinx GL.LoadIdentity(); GL.Ortho(0, Width, 0, Height, 0.0, 4.0); - fontService.UpdateScreenHeight(Height); + FontServ.UpdateScreenHeight(Height); - viewportUpdated = false; + ViewportUpdated = false; } // Frame setup GL.Clear(ClearBufferMask.ColorBufferBit | ClearBufferMask.DepthBufferBit); GL.ClearColor(Color.Black); - fontService.fontColor = Color.White; + FontServ.fontColor = Color.White; int verticalIndex = 0; int lineHeight = 16; int titleHeight = 24; @@ -252,7 +252,7 @@ namespace Ryujinx float width; float maxWidth = 0; - float yOffset = scrollPos - titleHeight; + float yOffset = ScrollPos - titleHeight; float xOffset = 10; // Background lines to make reading easier @@ -260,7 +260,7 @@ namespace Ryujinx GL.Scissor(0, filterHeight, Width, Height - titleHeight - filterHeight); GL.Begin(PrimitiveType.Triangles); GL.Color3(0.2f, 0.2f, 0.2f); - for (int i = 0; i < profileData.Count; i += 2) + for (int i = 0; i < ProfileData.Count; i += 2) { float top = GetLineY(yOffset, lineHeight, linePadding, false, i - 1); float bottom = GetLineY(yOffset, lineHeight, linePadding, false, i); @@ -278,14 +278,14 @@ namespace Ryujinx GL.Vertex2(0, bottom); } GL.End(); - maxScroll = (lineHeight + linePadding) * (profileData.Count - 1); + MaxScroll = (lineHeight + linePadding) * (ProfileData.Count - 1); // Display category verticalIndex = 0; - foreach (var entry in profileData) + foreach (var entry in ProfileData) { float y = GetLineY(yOffset, lineHeight, linePadding, true, verticalIndex++); - width = fontService.DrawText(entry.Key.Category, xOffset, y, lineHeight); + width = FontServ.DrawText(entry.Key.Category, xOffset, y, lineHeight); if (width > maxWidth) { maxWidth = width; @@ -293,7 +293,7 @@ namespace Ryujinx } GL.Disable(EnableCap.ScissorTest); - width = fontService.DrawText("Category", xOffset, Height - titleFontHeight, titleFontHeight); + width = FontServ.DrawText("Category", xOffset, Height - titleFontHeight, titleFontHeight); if (width > maxWidth) maxWidth = width; @@ -304,10 +304,10 @@ namespace Ryujinx maxWidth = 0; verticalIndex = 0; GL.Enable(EnableCap.ScissorTest); - foreach (var entry in profileData) + foreach (var entry in ProfileData) { float y = GetLineY(yOffset, lineHeight, linePadding, true, verticalIndex++); - width = fontService.DrawText(entry.Key.SessionGroup, xOffset, y, lineHeight); + width = FontServ.DrawText(entry.Key.SessionGroup, xOffset, y, lineHeight); if (width > maxWidth) { maxWidth = width; @@ -315,7 +315,7 @@ namespace Ryujinx } GL.Disable(EnableCap.ScissorTest); - width = fontService.DrawText("Group", xOffset, Height - titleFontHeight, titleFontHeight); + width = FontServ.DrawText("Group", xOffset, Height - titleFontHeight, titleFontHeight); if (width > maxWidth) maxWidth = width; @@ -325,10 +325,10 @@ namespace Ryujinx maxWidth = 0; verticalIndex = 0; GL.Enable(EnableCap.ScissorTest); - foreach (var entry in profileData) + foreach (var entry in ProfileData) { float y = GetLineY(yOffset, lineHeight, linePadding, true, verticalIndex++); - width = fontService.DrawText(entry.Key.SessionItem, xOffset, y, lineHeight); + width = FontServ.DrawText(entry.Key.SessionItem, xOffset, y, lineHeight); if (width > maxWidth) { maxWidth = width; @@ -336,15 +336,15 @@ namespace Ryujinx } GL.Disable(EnableCap.ScissorTest); - width = fontService.DrawText("Item", xOffset, Height - titleFontHeight, titleFontHeight); + width = FontServ.DrawText("Item", xOffset, Height - titleFontHeight, titleFontHeight); if (width > maxWidth) maxWidth = width; xOffset += maxWidth + columnSpacing; - buttons[(int)ButtonIndex.TagTitle].UpdateSize(0, Height - titleFontHeight, 0, (int)xOffset, titleFontHeight); + Buttons[(int)ButtonIndex.TagTitle].UpdateSize(0, Height - titleFontHeight, 0, (int)xOffset, titleFontHeight); // Time bars - if (profileData.Count != 0) + if (ProfileData.Count != 0) { width = Width - xOffset - 370; long maxAverage, maxTotal; @@ -353,7 +353,7 @@ namespace Ryujinx // Get max values var maxInstant = maxAverage = maxTotal = 0; - foreach (KeyValuePair kvp in profileData) + foreach (KeyValuePair kvp in ProfileData) { maxInstant = Math.Max(maxInstant, kvp.Value.Instant); maxAverage = Math.Max(maxAverage, kvp.Value.AverageTime); @@ -362,7 +362,7 @@ namespace Ryujinx GL.Enable(EnableCap.ScissorTest); GL.Begin(PrimitiveType.Triangles); - foreach (var entry in profileData) + foreach (var entry in ProfileData) { // Instant GL.Color3(Color.Blue); @@ -413,44 +413,44 @@ namespace Ryujinx GL.Disable(EnableCap.ScissorTest); } - fontService.DrawText("Blue: Instant, Green: Avg, Red: Total", xOffset, Height - titleFontHeight, titleFontHeight); + FontServ.DrawText("Blue: Instant, Green: Avg, Red: Total", xOffset, Height - titleFontHeight, titleFontHeight); xOffset = Width - 360; // Display timestamps verticalIndex = 0; GL.Enable(EnableCap.ScissorTest); - foreach (var entry in profileData) + foreach (var entry in ProfileData) { float y = GetLineY(yOffset, lineHeight, linePadding, true, verticalIndex++); - fontService.DrawText($"{Profile.ConvertTicksToMS(entry.Value.Instant):F3} ({entry.Value.InstantCount})", xOffset, y, lineHeight); - fontService.DrawText($"{Profile.ConvertTicksToMS(entry.Value.AverageTime):F3}", columnSpacing + 120 + xOffset, y, lineHeight); - fontService.DrawText($"{Profile.ConvertTicksToMS(entry.Value.TotalTime):F3}", columnSpacing + columnSpacing + 200 + xOffset, y, lineHeight); + FontServ.DrawText($"{Profile.ConvertTicksToMS(entry.Value.Instant):F3} ({entry.Value.InstantCount})", xOffset, y, lineHeight); + FontServ.DrawText($"{Profile.ConvertTicksToMS(entry.Value.AverageTime):F3}", columnSpacing + 120 + xOffset, y, lineHeight); + FontServ.DrawText($"{Profile.ConvertTicksToMS(entry.Value.TotalTime):F3}", columnSpacing + columnSpacing + 200 + xOffset, y, lineHeight); } GL.Disable(EnableCap.ScissorTest); float yHeight = Height - titleFontHeight; - fontService.DrawText("Instant (ms, count)", xOffset, yHeight, titleFontHeight); - buttons[(int)ButtonIndex.InstantTitle].UpdateSize((int)xOffset, (int)yHeight, 0, (int)(columnSpacing + 100), titleFontHeight); + FontServ.DrawText("Instant (ms, count)", xOffset, yHeight, titleFontHeight); + Buttons[(int)ButtonIndex.InstantTitle].UpdateSize((int)xOffset, (int)yHeight, 0, (int)(columnSpacing + 100), titleFontHeight); - fontService.DrawText("Average (ms)", columnSpacing + 120 + xOffset, yHeight, titleFontHeight); - buttons[(int)ButtonIndex.AverageTitle].UpdateSize((int)(columnSpacing + 120 + xOffset), (int)yHeight, 0, (int)(columnSpacing + 100), titleFontHeight); + FontServ.DrawText("Average (ms)", columnSpacing + 120 + xOffset, yHeight, titleFontHeight); + Buttons[(int)ButtonIndex.AverageTitle].UpdateSize((int)(columnSpacing + 120 + xOffset), (int)yHeight, 0, (int)(columnSpacing + 100), titleFontHeight); - fontService.DrawText("Total (ms)", columnSpacing + columnSpacing + 200 + xOffset, yHeight, titleFontHeight); - buttons[(int)ButtonIndex.TotalTitle].UpdateSize((int)(columnSpacing + columnSpacing + 200 + xOffset), (int)yHeight, 0, Width, titleFontHeight); + FontServ.DrawText("Total (ms)", columnSpacing + columnSpacing + 200 + xOffset, yHeight, titleFontHeight); + Buttons[(int)ButtonIndex.TotalTitle].UpdateSize((int)(columnSpacing + columnSpacing + 200 + xOffset), (int)yHeight, 0, Width, titleFontHeight); // Show/Hide Inactive - float widthShowHideButton = buttons[(int)ButtonIndex.ShowHideInactive].UpdateSize($"{(showInactive ? "Hide" : "Show")} Inactive", 5, 5, 4, 16); + float widthShowHideButton = Buttons[(int)ButtonIndex.ShowHideInactive].UpdateSize($"{(ShowInactive ? "Hide" : "Show")} Inactive", 5, 5, 4, 16); // Play/Pause - width = buttons[(int)ButtonIndex.Pause].UpdateSize(Paused ? "Play" : "Pause", 15 + (int)widthShowHideButton, 5, 4, 16) + widthShowHideButton; + width = Buttons[(int)ButtonIndex.Pause].UpdateSize(Paused ? "Play" : "Pause", 15 + (int)widthShowHideButton, 5, 4, 16) + widthShowHideButton; // Filter bar - fontService.DrawText($"{(regexEnabled ? "Regex " : "Filter")}: {FilterText}", 25 + width, 7, 16); - buttons[(int) ButtonIndex.FilterBar].UpdateSize((int)(25 + width), 0, 0, Width, filterHeight); + FontServ.DrawText($"{(RegexEnabled ? "Regex " : "Filter")}: {FilterText}", 25 + width, 7, 16); + Buttons[(int) ButtonIndex.FilterBar].UpdateSize((int)(25 + width), 0, 0, Width, filterHeight); // Draw buttons - foreach (ProfileButton button in buttons) + foreach (ProfileButton button in Buttons) { button.Draw(); } @@ -522,7 +522,7 @@ namespace Ryujinx protected override void OnMouseUp(MouseButtonEventArgs e) { - foreach (ProfileButton button in buttons) + foreach (ProfileButton button in Buttons) { if (button.ProcessClick(e.X, Height - e.Y)) return; @@ -535,11 +535,11 @@ namespace Ryujinx protected override void OnMouseWheel(MouseWheelEventArgs e) { - scrollPos += e.Delta * -30; - if (scrollPos < minScroll) - scrollPos = minScroll; - if (scrollPos > maxScroll) - scrollPos = maxScroll; + ScrollPos += e.Delta * -30; + if (ScrollPos < MinScroll) + ScrollPos = MinScroll; + if (ScrollPos > MaxScroll) + ScrollPos = MaxScroll; } } } \ No newline at end of file diff --git a/Ryujinx.Profiler/UI/ProfileWindowManager.cs b/Ryujinx.Profiler/UI/ProfileWindowManager.cs index 1273a5a37f..ded37efd5b 100644 --- a/Ryujinx.Profiler/UI/ProfileWindowManager.cs +++ b/Ryujinx.Profiler/UI/ProfileWindowManager.cs @@ -4,18 +4,19 @@ namespace Ryujinx.Profiler.UI { public class ProfileWindowManager { - private ProfileWindow window; + private ProfileWindow Window; + private Thread ProfileThread; public ProfileWindowManager() { if (Profile.ProfilingEnabled()) { - Thread profileThread = new Thread(() => + ProfileThread = new Thread(() => { - window = new ProfileWindow(); - window.Run(60, 60); + Window = new ProfileWindow(); + Window.Run(60, 60); }); - profileThread.Start(); + ProfileThread.Start(); } } @@ -23,8 +24,21 @@ namespace Ryujinx.Profiler.UI { if (Profile.ProfilingEnabled()) { - window.ToggleVisible(); + Window.ToggleVisible(); } } + + public void Close() + { + if (Window != null) + { + Window.Close(); + Window.Dispose(); + } + + ProfileThread.Join(); + + Window = null; + } } } diff --git a/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs b/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs index bcb1c1b460..7b3ef6bc29 100644 --- a/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs +++ b/Ryujinx.Profiler/UI/SharpFontHelpers/FontService.cs @@ -19,7 +19,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers private const int SheetWidth = 256; private const int SheetHeight = 256; private int ScreenWidth, ScreenHeight; - private int characterTextureSheet; + private int CharacterTextureSheet; private CharacterInfo[] characters; public Color fontColor = Color.Black; @@ -62,8 +62,8 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers } // Convert raw data into texture - characterTextureSheet = GL.GenTexture(); - GL.BindTexture(TextureTarget.Texture2D, characterTextureSheet); + CharacterTextureSheet = GL.GenTexture(); + GL.BindTexture(TextureTarget.Texture2D, CharacterTextureSheet); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMinFilter, (int)TextureMinFilter.Linear); GL.TexParameter(TextureTarget.Texture2D, TextureParameterName.TextureMagFilter, (int)TextureMagFilter.Linear); @@ -93,7 +93,7 @@ namespace Ryujinx.Profiler.UI.SharpFontHelpers if (draw) { // Use font map texture - GL.BindTexture(TextureTarget.Texture2D, characterTextureSheet); + GL.BindTexture(TextureTarget.Texture2D, CharacterTextureSheet); // Enable blending and textures GL.Enable(EnableCap.Texture2D);