Better module loading.
This commit is contained in:
@@ -58,29 +58,6 @@ namespace StgSharp
|
||||
private static uint markCount = 0;
|
||||
internal static GraphicAPI API = default;
|
||||
|
||||
public static unsafe int DefaultSIMDAlignment
|
||||
{
|
||||
get
|
||||
{
|
||||
SIMDID id = NativeIntrinsic.IntrinsicMask;
|
||||
switch (id.MaskByte[0] & 0b_00001111)
|
||||
{
|
||||
case 1:
|
||||
return id.MaskByte[1] switch
|
||||
{
|
||||
1 => 16,
|
||||
2 => 32,
|
||||
3 => 64,
|
||||
4 => 64,
|
||||
5 => 64,
|
||||
_ => 8,
|
||||
};
|
||||
default:
|
||||
return 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static ModuleToInitializeCollection Initialize()
|
||||
{
|
||||
return new ModuleToInitializeCollection(new Initializer());
|
||||
@@ -122,7 +99,8 @@ namespace StgSharp
|
||||
public static void Terminate(int exitCode)
|
||||
{
|
||||
MainTimeProvider.StopProvidingTime();
|
||||
GraphicFramework.glfwTerminate();
|
||||
|
||||
// GraphicFramework.glfwTerminate();
|
||||
Environment.Exit(exitCode);
|
||||
}
|
||||
|
||||
@@ -204,10 +182,6 @@ namespace StgSharp
|
||||
{
|
||||
// Initialize time provider and start providing time
|
||||
MainTimeProvider.StartProvidingTime();
|
||||
GraphicFramework.LoadGlfw();
|
||||
if (GraphicFramework.glfwInit() == 0) {
|
||||
throw new Exception("Failed to init system graphic environment.");
|
||||
}
|
||||
DefaultLog.InternalAppendLog("\n\n\n");
|
||||
DefaultLog.InternalWriteLog(
|
||||
$"Program {Assembly.GetEntryAssembly()!.FullName} on {Environment.MachineName} Started.", LogType.Info);
|
||||
|
||||
Reference in New Issue
Block a user