This commit is contained in:
Nitload
2024-06-10 15:12:08 +08:00
parent f6963b8e00
commit be6c2e6b92
305 changed files with 28336 additions and 5938 deletions
@@ -0,0 +1,42 @@
using StgSharp.Graphics;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
public static partial class StgSharp
{
private unsafe static IntPtr[] monitorsArray;
public static unsafe IntPtr[] MonitorsHandleArray
{
get
{
if (monitorsArray == null)
{
int count = 0;
IntPtr* arrayhandle = InternalIO.glfwGetMonitors(&count);
monitorsArray = new IntPtr[count];
Marshal.Copy((IntPtr)arrayhandle,monitorsArray,0,count);
Marshal.FreeHGlobal((IntPtr)arrayhandle);
}
return monitorsArray;
}
}
public static IntPtr DefaultMonitor
{
get
{
return MonitorsHandleArray[0];
}
}
}
}