switch root namespace name to NITLOAD

This commit is contained in:
Youmu Liu
2026-09-02 18:15:03 +08:00
parent 4218baad48
commit 7c7101ee48
502 changed files with 710 additions and 721 deletions
@@ -0,0 +1,39 @@
// -----------------------------------------------------------------------------
// file="Monitor"
// Project: StgSharp
// Copyright (c) Nitload.
// SPDX-License-Identifier: MIT
// -----------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Nitload.Graphics
{
public static class GraphicsEnvironment
{
private static IntPtr[] _monitorsHandleArray;
public static unsafe ReadOnlySpan<IntPtr> MonitorsHandleArray
{
get
{
if (_monitorsHandleArray == null)
{
int count = 0;
IntPtr* arrayHandle = GraphicFramework.glfwGetMonitors(&count);
_monitorsHandleArray = new IntPtr[count];
Marshal.Copy((IntPtr)arrayHandle, _monitorsHandleArray, 0, count);
Marshal.FreeHGlobal((IntPtr)arrayHandle);
}
return _monitorsHandleArray;
}
}
}
}