aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
diff options
context:
space:
mode:
authorAc_K <Acoustik666@gmail.com>2021-01-08 09:14:13 +0100
committerGitHub <noreply@github.com>2021-01-08 09:14:13 +0100
commita9cb31e75fe269519f6be71ae83627ee21d1bc1f (patch)
treed078b6adea185e6bab72bdb79db37b061ca3bcdf /Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
parent72e94bb089a0f2fef862acee1960dd05083a735b (diff)
gui: Refactoring Part 1 (#1859)
* gui: Refactoring Part 1 * Fix ProfileDialog.glade path * Fix Application.Quit assert * Fix TitleUpdateWindow parent * Fix TitleUpdate selected item * Remove extra line in TitleUpdateWindow * Fix empty assign of Enum.TryParse * Add Patrons list in the About Window * update about error messages
Diffstat (limited to 'Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs')
-rw-r--r--Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs21
1 files changed, 11 insertions, 10 deletions
diff --git a/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs b/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
index fccda247..69ce145b 100644
--- a/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
+++ b/Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs
@@ -17,14 +17,14 @@ namespace Ryujinx.Common.System
public uint wPeriodMax;
};
- [DllImport("winmm.dll", SetLastError = true)]
- private static extern uint timeGetDevCaps(ref TimeCaps timeCaps, uint sizeTimeCaps);
+ [DllImport("winmm.dll", EntryPoint = "timeGetDevCaps", SetLastError = true)]
+ private static extern uint TimeGetDevCaps(ref TimeCaps timeCaps, uint sizeTimeCaps);
- [DllImport("winmm.dll")]
- private static extern uint timeBeginPeriod(uint uMilliseconds);
+ [DllImport("winmm.dll", EntryPoint = "timeBeginPeriod")]
+ private static extern uint TimeBeginPeriod(uint uMilliseconds);
- [DllImport("winmm.dll")]
- private static extern uint timeEndPeriod(uint uMilliseconds);
+ [DllImport("winmm.dll", EntryPoint = "timeEndPeriod")]
+ private static extern uint TimeEndPeriod(uint uMilliseconds);
private uint _targetResolutionInMilliseconds;
private bool _isActive;
@@ -45,7 +45,7 @@ namespace Ryujinx.Common.System
{
TimeCaps timeCaps = default;
- uint result = timeGetDevCaps(ref timeCaps, (uint)Unsafe.SizeOf<TimeCaps>());
+ uint result = TimeGetDevCaps(ref timeCaps, (uint)Unsafe.SizeOf<TimeCaps>());
if (result != 0)
{
@@ -66,7 +66,7 @@ namespace Ryujinx.Common.System
private void Activate()
{
- uint result = timeBeginPeriod(_targetResolutionInMilliseconds);
+ uint result = TimeBeginPeriod(_targetResolutionInMilliseconds);
if (result != 0)
{
@@ -82,7 +82,7 @@ namespace Ryujinx.Common.System
{
if (_isActive)
{
- uint result = timeEndPeriod(_targetResolutionInMilliseconds);
+ uint result = TimeEndPeriod(_targetResolutionInMilliseconds);
if (result != 0)
{
@@ -98,6 +98,7 @@ namespace Ryujinx.Common.System
public void Dispose()
{
Dispose(true);
+ GC.SuppressFinalize(this);
}
protected virtual void Dispose(bool disposing)
@@ -108,4 +109,4 @@ namespace Ryujinx.Common.System
}
}
}
-}
+} \ No newline at end of file