optimize mouse update

pull/37/head
cosmonaut 2022-12-13 15:13:43 -08:00
parent 36e6c6f332
commit ca61e94b13
1 changed files with 1 additions and 3 deletions

View File

@ -43,8 +43,6 @@ namespace MoonWorks.Input
private readonly Dictionary<MouseButtonCode, MouseButton> CodeToButton;
private IEnumerable<MouseButton> Buttons => CodeToButton.Values;
public Mouse()
{
LeftButton = new MouseButton(this, MouseButtonCode.Left, SDL.SDL_BUTTON_LMASK);
@ -78,7 +76,7 @@ namespace MoonWorks.Input
Wheel = WheelRaw - previousWheelRaw;
previousWheelRaw = WheelRaw;
foreach (var button in Buttons)
foreach (var button in CodeToButton.Values)
{
button.Update();