private void PlatformUpdate() { MSG message = new MSG(); while (WinUser.PeekMessageW(ref message, IntPtr.Zero, 0, 0, WinUser.PM_REMOVE)) { if (message.message == WinUser.WM_QUIT) { closed = true; return; } WinUser.TranslateMessage(ref message); WinUser.DispatchMessageW(ref message); } inputManager.PlatformUpdate(); Renderer.Present(); }