1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 22:57:42 +08:00

Apply review suggestions.

This commit is contained in:
Lucas A 2020-07-06 11:15:56 +02:00
parent ce5da5c51b
commit 022e4b6335
2 changed files with 10 additions and 11 deletions

View File

@ -36,9 +36,6 @@ namespace osu.Desktop.Windows
{
switch (lParam.VkCode)
{
case 0x09 when lParam.Flags == 32: // alt + tab
case 0x1b when lParam.Flags == 32: // alt + esc
case 0x1b when (getKeyState(0x11) & 0x8000) != 0: //ctrl + esc
case 0x5B: // left windows key
case 0x5C: // right windows key
return 1;
@ -79,8 +76,5 @@ namespace osu.Desktop.Windows
[DllImport(@"user32.dll", EntryPoint = @"CallNextHookEx")]
private static extern int callNextHookEx(int hHook, int nCode, int wParam, ref KdDllHookStruct lParam);
[DllImport(@"user32.dll", EntryPoint = @"GetKeyState")]
private static extern int getKeyState(int vkey);
}
}

View File

@ -1,6 +1,7 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
@ -76,13 +77,17 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
{
LabelText = "Score display mode",
Bindable = config.GetBindable<ScoringMode>(OsuSetting.ScoreDisplayMode)
},
new SettingsCheckbox
{
LabelText = "Disable Win key during gameplay",
Bindable = config.GetBindable<bool>(OsuSetting.GameplayDisableWinKey)
}
};
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows)
{
Add(new SettingsCheckbox
{
LabelText = "Disable Windows key during gameplay",
Bindable = config.GetBindable<bool>(OsuSetting.GameplayDisableWinKey)
});
}
}
}
}