Skip to content

Commit b6da172

Browse files
author
Martín Pane
committed
v3.0.4. Fixed warning and now using non alloc version for string conversion for the refresh rate string
1 parent bb67c18 commit b6da172

File tree

3 files changed

+14
-3
lines changed

3 files changed

+14
-3
lines changed

Changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
-----------------------------
2+
v3.0.4
3+
4+
- Fixed small oversight in Resolution.refreshRate is obsolete warning fix.
5+
16
-----------------------------
27
v3.0.3
38

Runtime/Advanced/G_AdvancedData.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ private void Update()
107107

108108
m_sb.Append( m_windowStrings[ 0 ] ).Append( Screen.width.ToStringNonAlloc() )
109109
.Append( m_windowStrings[ 1 ] ).Append( Screen.height.ToStringNonAlloc() )
110-
.Append( m_windowStrings[ 2 ] ).Append( Screen.currentResolution.refreshRate.ToStringNonAlloc() )
110+
.Append( m_windowStrings[ 2 ] ).Append(
111+
#if UNITY_2022_2_OR_NEWER
112+
((int)Screen.currentResolution.refreshRateRatio.value).ToStringNonAlloc()
113+
#else
114+
Screen.currentResolution.refreshRate.ToStringNonAlloc()
115+
#endif
116+
)
111117
.Append( m_windowStrings[ 3 ] )
112118
.Append( m_windowStrings[ 4 ] ).Append( ((int) Screen.dpi).ToStringNonAlloc() )
113119
.Append( m_windowStrings[ 5 ] );
@@ -328,7 +334,7 @@ private void Init()
328334
+ res.height
329335
+ "@"
330336
#if UNITY_2022_2_OR_NEWER
331-
+ res.refreshRateRatio.value.ToString("F2")
337+
+ ((int)Screen.currentResolution.refreshRateRatio.value).ToStringNonAlloc()
332338
#else
333339
+ res.refreshRate
334340
#endif

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "com.tayx.graphy",
3-
"version": "3.0.3",
3+
"version": "3.0.4",
44
"displayName": "Graphy - Ultimate FPS Counter",
55
"description": "Graphy is the ultimate, easy to use, feature packed FPS Counter, stats monitor and debugger for your Unity project.",
66
"unity": "2019.4",

0 commit comments

Comments
 (0)