mirror of
https://github.com/ppy/osu.git
synced 2025-01-08 06:52:59 +08:00
Avoid disable/restore pairs
This commit is contained in:
parent
9dc1a58ce7
commit
30fd40efd1
@ -489,7 +489,7 @@ namespace osu.Desktop
|
|||||||
public static uint Stride => (uint)Marshal.SizeOf(typeof(NvApplication)) | (2 << 16);
|
public static uint Stride => (uint)Marshal.SizeOf(typeof(NvApplication)) | (2 << 16);
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvStatus
|
internal enum NvStatus
|
||||||
{
|
{
|
||||||
OK = 0, // Success. Request is completed.
|
OK = 0, // Success. Request is completed.
|
||||||
@ -612,6 +612,7 @@ namespace osu.Desktop
|
|||||||
FIRMWARE_REVISION_NOT_SUPPORTED = -200, // The device's firmware is not supported.
|
FIRMWARE_REVISION_NOT_SUPPORTED = -200, // The device's firmware is not supported.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvSystemType
|
internal enum NvSystemType
|
||||||
{
|
{
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
@ -619,6 +620,7 @@ namespace osu.Desktop
|
|||||||
DESKTOP = 2
|
DESKTOP = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvGpuType
|
internal enum NvGpuType
|
||||||
{
|
{
|
||||||
UNKNOWN = 0,
|
UNKNOWN = 0,
|
||||||
@ -626,6 +628,7 @@ namespace osu.Desktop
|
|||||||
DGPU = 2, // Discrete
|
DGPU = 2, // Discrete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvSettingID : uint
|
internal enum NvSettingID : uint
|
||||||
{
|
{
|
||||||
OGL_AA_LINE_GAMMA_ID = 0x2089BF6C,
|
OGL_AA_LINE_GAMMA_ID = 0x2089BF6C,
|
||||||
@ -718,6 +721,7 @@ namespace osu.Desktop
|
|||||||
INVALID_SETTING_ID = 0xFFFFFFFF
|
INVALID_SETTING_ID = 0xFFFFFFFF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvShimSetting : uint
|
internal enum NvShimSetting : uint
|
||||||
{
|
{
|
||||||
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000,
|
SHIM_RENDERING_MODE_INTEGRATED = 0x00000000,
|
||||||
@ -732,6 +736,7 @@ namespace osu.Desktop
|
|||||||
SHIM_RENDERING_MODE_DEFAULT = SHIM_RENDERING_MODE_AUTO_SELECT
|
SHIM_RENDERING_MODE_DEFAULT = SHIM_RENDERING_MODE_AUTO_SELECT
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
internal enum NvThreadControlSetting : uint
|
internal enum NvThreadControlSetting : uint
|
||||||
{
|
{
|
||||||
OGL_THREAD_CONTROL_ENABLE = 0x00000001,
|
OGL_THREAD_CONTROL_ENABLE = 0x00000001,
|
||||||
@ -739,6 +744,4 @@ namespace osu.Desktop
|
|||||||
OGL_THREAD_CONTROL_NUM_VALUES = 2,
|
OGL_THREAD_CONTROL_NUM_VALUES = 2,
|
||||||
OGL_THREAD_CONTROL_DEFAULT = 0
|
OGL_THREAD_CONTROL_DEFAULT = 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper restore InconsistentNaming
|
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Versioning;
|
using System.Runtime.Versioning;
|
||||||
@ -163,8 +164,7 @@ namespace osu.Desktop.Windows
|
|||||||
[DllImport("Shell32.dll")]
|
[DllImport("Shell32.dll")]
|
||||||
private static extern void SHChangeNotify(EventId wEventId, Flags uFlags, IntPtr dwItem1, IntPtr dwItem2);
|
private static extern void SHChangeNotify(EventId wEventId, Flags uFlags, IntPtr dwItem1, IntPtr dwItem2);
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
|
|
||||||
private enum EventId
|
private enum EventId
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -174,14 +174,12 @@ namespace osu.Desktop.Windows
|
|||||||
SHCNE_ASSOCCHANGED = 0x08000000
|
SHCNE_ASSOCCHANGED = 0x08000000
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
private enum Flags : uint
|
private enum Flags : uint
|
||||||
{
|
{
|
||||||
// ReSharper disable once InconsistentNaming
|
|
||||||
SHCNF_IDLIST = 0x0000
|
SHCNF_IDLIST = 0x0000
|
||||||
}
|
}
|
||||||
|
|
||||||
// ReSharper restore InconsistentNaming
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private record FileAssociation(string Extension, LocalisableString Description, string IconPath)
|
private record FileAssociation(string Extension, LocalisableString Description, string IconPath)
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace osu.Game.Localisation
|
namespace osu.Game.Localisation
|
||||||
{
|
{
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
|
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
|
||||||
public enum Language
|
public enum Language
|
||||||
{
|
{
|
||||||
|
@ -2,18 +2,18 @@
|
|||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
using System.Diagnostics.CodeAnalysis;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Newtonsoft.Json.Converters;
|
using Newtonsoft.Json.Converters;
|
||||||
|
|
||||||
// ReSharper disable InconsistentNaming
|
|
||||||
|
|
||||||
namespace osu.Game.Users
|
namespace osu.Game.Users
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Matches `osu_countries` database table.
|
/// Matches `osu_countries` database table.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[JsonConverter(typeof(StringEnumConverter))]
|
[JsonConverter(typeof(StringEnumConverter))]
|
||||||
|
[SuppressMessage("ReSharper", "InconsistentNaming")]
|
||||||
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
|
[UsedImplicitly(ImplicitUseTargetFlags.WithMembers)]
|
||||||
public enum CountryCode
|
public enum CountryCode
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user