From 83b2f70283650feef4d1b5433ad25d14e7e0bd89 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 8 Jul 2015 16:58:17 -0500 Subject: [PATCH] example of how to store default message positions so it can be used by default config and reset process too --- BizHawk.Client.Common/config/Config.cs | 10 ++++++++-- BizHawk.Client.EmuHawk/config/MessageConfig.cs | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.Common/config/Config.cs b/BizHawk.Client.Common/config/Config.cs index 1664a32dc3..9c72fee722 100644 --- a/BizHawk.Client.Common/config/Config.cs +++ b/BizHawk.Client.Common/config/Config.cs @@ -172,14 +172,20 @@ namespace BizHawk.Client.Common /// use vsync. if VSyncThrottle = false, this will try to use vsync without throttling to it public bool VSync = false; + public static class DefaultMessageOptions + { + public const int DispFPSx = 99; + public const int DispFPSy = 99; + } + // Display options public int MessagesColor = -1; public int AlertMessageColor = -65536; public int LastInputColor = -23296; public int MovieInput = -8355712; public bool DisplayFPS = false; - public int DispFPSx = 0; - public int DispFPSy = 0; + public int DispFPSx = DefaultMessageOptions.DispFPSx; + public int DispFPSy = DefaultMessageOptions.DispFPSy; public int DispFPSanchor = 0; // 0 = UL, 1 = UR, 2 = DL, 3 = DR public bool DisplayFrameCounter = false; public int DispFrameCx = 0; diff --git a/BizHawk.Client.EmuHawk/config/MessageConfig.cs b/BizHawk.Client.EmuHawk/config/MessageConfig.cs index 9edc3d7ae1..a56cb63bd1 100644 --- a/BizHawk.Client.EmuHawk/config/MessageConfig.cs +++ b/BizHawk.Client.EmuHawk/config/MessageConfig.cs @@ -401,8 +401,8 @@ namespace BizHawk.Client.EmuHawk private void ResetDefaultsButton_Click(object sender, EventArgs e) { - Global.Config.DispFPSx = 0; - Global.Config.DispFPSy = 0; + Global.Config.DispFPSx = Config.DefaultMessageOptions.DispFPSx; + Global.Config.DispFPSy = Config.DefaultMessageOptions.DispFPSy; Global.Config.DispFrameCx = 0; Global.Config.DispFrameCy = 12; Global.Config.DispLagx = 0;