From a9cb31e75fe269519f6be71ae83627ee21d1bc1f Mon Sep 17 00:00:00 2001 From: Ac_K Date: Fri, 8 Jan 2021 09:14:13 +0100 Subject: 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 --- .../System/WindowsMultimediaTimerResolution.cs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'Ryujinx.Common/System/WindowsMultimediaTimerResolution.cs') 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()); + uint result = TimeGetDevCaps(ref timeCaps, (uint)Unsafe.SizeOf()); 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 -- cgit v1.2.3