160 lines
4.6 KiB
C#
Raw Permalink Normal View History

using System;
using System.Diagnostics;
using System.IO;
namespace ANX.Framework.NonXNA
{
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
public static class Logger
{
#region Constants
private const string Filename = "log.txt";
#endregion
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
#region Private
#if !WINDOWSMETRO
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
private static FileStream outputStream;
private static StreamWriter writer;
#else
private static ANX.Framework.NonXNA.Windows8.MetroLogger logger;
#endif
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
private static string CurrentDateTimeStamp
{
get
{
DateTime stamp = DateTime.Now;
return stamp.Year + "-" + stamp.Month.ToString("00") + "-" +
stamp.Day.ToString("00") + " " + stamp.Hour.ToString("00") + ":" +
stamp.Minute.ToString("00") + ":" + stamp.Second.ToString("00");
}
}
private static string CurrentTimeStamp
{
get
{
DateTime stamp = DateTime.Now;
return stamp.Hour.ToString("00") + ":" + stamp.Minute.ToString("00") +
":" + stamp.Second.ToString("00");
}
}
#endregion
#region Public
public static bool IsWritingToConsole;
#endregion
#region Constructor
static Logger()
{
IsWritingToConsole = true;
#if !WINDOWSMETRO
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
outputStream = File.Open(Filename, FileMode.Create, FileAccess.Write, FileShare.ReadWrite);
writer = new StreamWriter(outputStream);
writer.AutoFlush = true;
#else
//logger = new ANX.Framework.NonXNA.Windows8.MetroLogger();
//logger.Initialize(Filename);
#endif
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
WriteToFile("OS: " + OSInformation.GetName() + " - " + OSInformation.GetVersionString() + "(" +
OSInformation.GetVersion() + ")");
WriteToFile("StartTime: " + CurrentDateTimeStamp);
WriteToFile("----------");
}
#endregion
#region Info
public static void Info(string message)
{
string text = CurrentTimeStamp + "| " + message;
WriteToConsole(text);
WriteToFile(text);
}
public static void Info(string message, params object[] formatObjects)
{
Info(String.Format(message, formatObjects));
}
#endregion
#region Warning
public static void Warning(string message, bool stacktrace = true)
{
string text = CurrentTimeStamp + "| Warning: " + message;
if (stacktrace)
text += BuildStackTrace();
WriteToConsole(text);
WriteToFile(text);
}
#endregion
#region Error
public static void Error(string message, Exception ex)
{
Error(String.Format("{0} - Exception: {1}", message, ex.Message));
}
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
public static void Error(string message)
{
string text = CurrentTimeStamp + "| Error: " + message + BuildStackTrace();
WriteToConsole(text);
WriteToFile(text);
}
#endregion
#region ErrorAndThrow
public static void ErrorAndThrow<T>(string message) where T : Exception, new()
{
string text = CurrentTimeStamp + "| Error: " + message + BuildStackTrace();
WriteToConsole(text);
WriteToFile(text);
throw (T)Activator.CreateInstance(typeof(T), message);
}
#endregion
#region BuildStackTrace
private static string BuildStackTrace()
{
string result = "";
#if !WINDOWSMETRO
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
string[] lines = new StackTrace(true).ToString().Split('\n');
for (int index = 2; index < lines.Length; index++)
{
result += "\n" + lines[index].ToString();
}
#endif
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
return result;
}
#endregion
#region WriteToConsole
private static void WriteToConsole(string message)
{
if (IsWritingToConsole == false)
{
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
return;
}
#if !WINDOWSMETRO
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
Console.WriteLine(message);
#endif
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
}
#endregion
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
#region WriteToFile
private static void WriteToFile(string message)
{
#if !WINDOWSMETRO
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
writer.WriteLine(message);
#else
ANX.Framework.NonXNA.Windows8.MetroEventSource.Log.Info(message);
#endif
two commits were missing, both by KorsarNek: "Removed the SupportedPlatformsImpl classes and replaced them with a new SupportedPlatforms attribute on the assembly level. Removed a few class constructors which could cause problems when loading a game. Made ResetElapsedTime in the game class reset to 0 instead of TimeSpan.MinValue. Removed the restriction in the InputDeviceFactory for which InputDevices are supported. Added a Logger for Metro which works with the current Logger implementation. Changed that when a platform is recognized that is higher than Windows 8, it gets treated like Windows 8, not like Windows 7. Due to the SupportedPlatforms change, the assembly loader is now faster in finding out which assemblies contains addIns. For not Metro system, it's also added that a warning gets written if an AddIn references a different ANX version than that of the running assembly. OpenGL and DirectX have been updated to the newest versions. XAudio system uses now the same SharpDX version as all the other systems. ParameterBuffer for WindowsMetro gets now correctly created by considering the size constraints for constant buffers. Fixed an erroneous finalizer in the xaudio system. Made the metro projects convert to Windows 8.1, as Windows 8.0 is not supported by the newer SharpDX versions. It's now also necessary to use at least Visual Studio 2013 to build the Metro versions. Made the samples work again on Windows." "Fixed the creation of the swap chain for windows metro and removed the dependency of the Metro Rendersystem onto the Metro Platformsytem. All occurrences of WindowHandles have been replaced with a custom WindowHandle type which should work out of the box in most cases, but does still represent a breaking change to XNA. The ProjectConverter for Metro was adjusted so that with just changing the way the application is initialized, most projects that worked with ANX before should now work under win rt. The sample SimpleNoContent does now work out of the box for win rt, after a project conversion. The application name for win rt apps is now a guid, the display name stayed the same though. That's to be more compliant with the way win rt apps are normally created. The default namespace and namespace of the classes for the Sample "SimpleNoContent" is renamed from "SimpleModernUI" to "SimpleNoContent". With the new way win rt apps are initialized for ANX, it's necessary to first create the WindowsGameHost for WinRT with a handler how to create the game instance and give that to the CoreApplication object to run it. Also took care of a few annoying bugs when working with win rt and ANX where no InputDevices could be created on the first frame (Issue #1164 ) and that it wasn't possible to use the localfolder of the application on the first update and all the other stuff for which an instance of the Application class was necessary."
2015-03-29 13:48:33 +02:00
}
#endregion
}
}