- extended ContentPipeline ProcessorManager with method to select a default processor for a importer or imported type

- extended ContentImporter to provide OutputType of imported content
- provided a list of available ContentProcessors in current context

PlatformSystems are no longer AddIns. This doesn't mean, that you can't load them dynamically. The handling is just different. There's only a single PlatformSystem available for each platform ANX runs on. This one is auto loaded. If it doesn't exist the game doesn't run. The reason for this is, that we will move the AddIn system from ANX.Framework to the specialized PlatformSystem. This is necessary because we want ANX.Framework to become platform independent. The AddIn system is different for some platforms (Android, iOS, Windows 8 Metro) and needs to be specialized. On the other hand we are able to simplify the AddIn system when moving it to the PlatformSystem because we don't need a big AddIn system supporting all platforms with much conditional compiling.

THIS COMMIT DOES BREAK SOME FUNCTIONALITY. METRO DOESN'T WORK ANYMORE, AS IT IS NOT TESTED. DON'T USE THIS COMMIT IF YOU ARE NO ANX.FRAMEWORK DEVELOPER. We will catch up soon with a tested and working version.
This commit is contained in:
Glatzemann 2012-09-18 05:53:08 +00:00 committed by Konstantin Koch
parent e51a8943aa
commit 933ef7cae6
28 changed files with 290 additions and 127 deletions

View File

@ -1,4 +1,9 @@
// This file is part of the ANX.Framework created by the #region Using Statements
using System;
#endregion
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license // For details see: http://anxframework.codeplex.com/license
@ -13,6 +18,14 @@ namespace ANX.Framework.Content.Pipeline
public abstract T Import(string filename, ContentImporterContext context); public abstract T Import(string filename, ContentImporterContext context);
public Type OutputType
{
get
{
return typeof(T);
}
}
object IContentImporter.Import(string filename, ContentImporterContext context) object IContentImporter.Import(string filename, ContentImporterContext context)
{ {
return this.Import(filename, context); return this.Import(filename, context);

View File

@ -12,5 +12,7 @@ namespace ANX.Framework.Content.Pipeline
public interface IContentImporter public interface IContentImporter
{ {
Object Import(string filename, ContentImporterContext context); Object Import(string filename, ContentImporterContext context);
Type OutputType { get; }
} }
} }

View File

@ -1,4 +1,5 @@
using System.IO; using System;
using System.IO;
using ANX.Framework.Content.Pipeline.Audio; using ANX.Framework.Content.Pipeline.Audio;
using WaveUtils; using WaveUtils;
@ -24,5 +25,6 @@ namespace ANX.Framework.Content.Pipeline.Importer
FileType = AudioFileType.Wav, FileType = AudioFileType.Wav,
}; };
} }
} }
} }

View File

@ -15,7 +15,7 @@ namespace ANX.Framework.Content.Pipeline.Tasks
{ {
public class ProcessorManager public class ProcessorManager
{ {
private Dictionary<String, IContentProcessor> processors = new Dictionary<string,IContentProcessor>(); private Dictionary<string, IContentProcessor> processors = new Dictionary<string, IContentProcessor>();
public ProcessorManager() public ProcessorManager()
{ {
@ -45,7 +45,7 @@ namespace ANX.Framework.Content.Pipeline.Tasks
public String GetProcessorForType(Type type) public String GetProcessorForType(Type type)
{ {
foreach (KeyValuePair<String, IContentProcessor> processorDescription in processors) foreach (KeyValuePair<string, IContentProcessor> processorDescription in processors)
{ {
if (Type.Equals(processorDescription.Value.InputType, type)) if (Type.Equals(processorDescription.Value.InputType, type))
{ {
@ -53,7 +53,23 @@ namespace ANX.Framework.Content.Pipeline.Tasks
} }
} }
return String.Empty; return string.Empty;
}
public string GetProcessorForImporter(IContentImporter contentImporter)
{
return GetProcessorForType(contentImporter.OutputType);
}
public IEnumerable<KeyValuePair<string, IContentProcessor>> AvailableProcessors
{
get
{
foreach (KeyValuePair<string, IContentProcessor> kvp in processors)
{
yield return kvp;
}
}
} }
} }
} }

View File

@ -439,6 +439,8 @@
<Compile Include="NonXNA\PlatformSystem\INativeGameTimer.cs" /> <Compile Include="NonXNA\PlatformSystem\INativeGameTimer.cs" />
<Compile Include="NonXNA\PlatformSystem\INativeContentManager.cs" /> <Compile Include="NonXNA\PlatformSystem\INativeContentManager.cs" />
<Compile Include="NonXNA\PlatformSystem\INativeMediaLibrary.cs" /> <Compile Include="NonXNA\PlatformSystem\INativeMediaLibrary.cs" />
<Compile Include="NonXNA\PlatformSystem\PlatformSystem.cs" />
<Compile Include="NonXNA\PlatformSystem\PlatformSystemInstanceException.cs" />
<Compile Include="NonXNA\Reflection\AssemblyLoader.cs" /> <Compile Include="NonXNA\Reflection\AssemblyLoader.cs" />
<Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" /> <Compile Include="NonXNA\RenderSystem\INativeConstantBuffer.cs" />
<Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" /> <Compile Include="NonXNA\RenderSystem\IOcclusionQuery.cs" />
@ -449,7 +451,7 @@
<Compile Include="NonXNA\Windows8\IServiceProvider.cs" /> <Compile Include="NonXNA\Windows8\IServiceProvider.cs" />
<Compile Include="NonXNA\NoInputDeviceException.cs" /> <Compile Include="NonXNA\NoInputDeviceException.cs" />
<Compile Include="NonXNA\OSInformation.cs" /> <Compile Include="NonXNA\OSInformation.cs" />
<Compile Include="NonXNA\PlatformSystem\IPlatformSystemCreator.cs" /> <Compile Include="NonXNA\PlatformSystem\IPlatformSystem.cs" />
<Compile Include="NonXNA\RenderSystem\EffectProcessorOutputFormat.cs" /> <Compile Include="NonXNA\RenderSystem\EffectProcessorOutputFormat.cs" />
<Compile Include="NonXNA\ICreator.cs" /> <Compile Include="NonXNA\ICreator.cs" />
<Compile Include="NonXNA\InputSystem\IGamePad.cs" /> <Compile Include="NonXNA\InputSystem\IGamePad.cs" />

View File

@ -5,6 +5,7 @@ using System.IO;
using ANX.Framework.Audio.XactParser; using ANX.Framework.Audio.XactParser;
using ANX.Framework.NonXNA; using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.Development; using ANX.Framework.NonXNA.Development;
using ANX.Framework.NonXNA.PlatformSystem;
// This file is part of the ANX.Framework created by the // This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
@ -47,7 +48,7 @@ namespace ANX.Framework.Audio
// TODO: get renderer details // TODO: get renderer details
RendererDetails = new ReadOnlyCollection<RendererDetail>(new List<RendererDetail>()); RendererDetails = new ReadOnlyCollection<RendererDetail>(new List<RendererDetail>());
Stream loadingStream = AddInSystemFactory.DefaultPlatformCreator.OpenReadFilestream(settingsFile); Stream loadingStream = PlatformSystem.Instance.OpenReadFilestream(settingsFile);
generalSettings = new XactGeneralSettings(loadingStream); generalSettings = new XactGeneralSettings(loadingStream);
loadingStream.Dispose(); loadingStream.Dispose();
} }
@ -59,7 +60,7 @@ namespace ANX.Framework.Audio
// TODO: lookAheadTime and rendererId // TODO: lookAheadTime and rendererId
Stream loadingStream = AddInSystemFactory.DefaultPlatformCreator.OpenReadFilestream(settingsFile); Stream loadingStream = PlatformSystem.Instance.OpenReadFilestream(settingsFile);
generalSettings = new XactGeneralSettings(loadingStream); generalSettings = new XactGeneralSettings(loadingStream);
loadingStream.Dispose(); loadingStream.Dispose();
} }

View File

@ -66,8 +66,7 @@ namespace ANX.Framework.Content
#region Constructor #region Constructor
private ContentManager() private ContentManager()
{ {
nativeImplementation = nativeImplementation = PlatformSystem.Instance.CreateContentManager();
AddInSystemFactory.DefaultPlatformCreator.CreateContentManager();
loadedAssets = loadedAssets =
new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase); new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase);

View File

@ -76,7 +76,6 @@ namespace ANX.Framework
AddSystemCreator<IInputSystemCreator>(); AddSystemCreator<IInputSystemCreator>();
AddSystemCreator<ISoundSystemCreator>(); AddSystemCreator<ISoundSystemCreator>();
AddSystemCreator<IPlatformSystemCreator>();
AddSystemCreator<IRenderSystemCreator>(); AddSystemCreator<IRenderSystemCreator>();
CreateGameHost(); CreateGameHost();
@ -114,11 +113,7 @@ namespace ANX.Framework
private void CreateGameHost() private void CreateGameHost()
{ {
Logger.Info("creating GameHost"); Logger.Info("creating GameHost");
var creator = AddInSystemFactory.Instance.GetDefaultCreator<IPlatformSystemCreator>(); host = PlatformSystem.Instance.CreateGameHost(this);
if (creator == null)
Logger.ErrorAndThrow<NullReferenceException>("Could not fetch PlatformSystem creator to create a game host.");
host = creator.CreateGameHost(this);
host.Activated += HostActivated; host.Activated += HostActivated;
host.Deactivated += HostDeactivated; host.Deactivated += HostDeactivated;

View File

@ -20,7 +20,7 @@ namespace ANX.Framework
public GameTimer() public GameTimer()
{ {
nativeImplementation = AddInSystemFactory.DefaultPlatformCreator.CreateGameTimer(); nativeImplementation = PlatformSystem.Instance.CreateGameTimer();
nativeImplementation.Reset(); nativeImplementation.Reset();
lastUpdate = nativeImplementation.ElapsedTime; lastUpdate = nativeImplementation.ElapsedTime;

View File

@ -94,13 +94,13 @@ namespace ANX.Framework.Media
#region Constructor #region Constructor
public MediaLibrary() public MediaLibrary()
{ {
nativeLibrary = AddInSystemFactory.DefaultPlatformCreator.CreateMediaPlayer(); nativeLibrary = PlatformSystem.Instance.CreateMediaPlayer();
MediaSource = MediaSource.GetAvailableMediaSources()[0]; MediaSource = MediaSource.GetAvailableMediaSources()[0];
} }
public MediaLibrary(MediaSource setSource) public MediaLibrary(MediaSource setSource)
{ {
nativeLibrary = AddInSystemFactory.DefaultPlatformCreator.CreateMediaPlayer(); nativeLibrary = PlatformSystem.Instance.CreateMediaPlayer();
MediaSource = setSource; MediaSource = setSource;
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using ANX.Framework.NonXNA; using ANX.Framework.NonXNA;
using ANX.Framework.NonXNA.PlatformSystem;
// This file is part of the ANX.Framework created by the // This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license. // "ANX.Framework developer group" and released under the Ms-PL license.
@ -35,7 +36,7 @@ namespace ANX.Framework.Media
#region Constructor #region Constructor
public static IList<MediaSource> GetAvailableMediaSources() public static IList<MediaSource> GetAvailableMediaSources()
{ {
return AddInSystemFactory.DefaultPlatformCreator.GetAvailableMediaSources(); return PlatformSystem.Instance.GetAvailableMediaSources();
} }
#endregion #endregion

View File

@ -18,7 +18,6 @@ namespace ANX.Framework.NonXNA
typeof(IInputSystemCreator), typeof(IInputSystemCreator),
typeof(IRenderSystemCreator), typeof(IRenderSystemCreator),
typeof(ISoundSystemCreator), typeof(ISoundSystemCreator),
typeof(IPlatformSystemCreator),
}; };
#endregion #endregion
@ -44,13 +43,6 @@ namespace ANX.Framework.NonXNA
} }
} }
internal static IPlatformSystemCreator DefaultPlatformCreator
{
get
{
return Instance.GetDefaultCreator<IPlatformSystemCreator>();
}
}
#endregion #endregion
#region Constructor #region Constructor

View File

@ -10,6 +10,5 @@ namespace ANX.Framework.NonXNA
RenderSystem, RenderSystem,
InputSystem, InputSystem,
SoundSystem, SoundSystem,
PlatformSystem,
} }
} }

View File

@ -6,6 +6,7 @@ using System;
namespace ANX.Framework.NonXNA namespace ANX.Framework.NonXNA
{ {
//TODO: remove conditional compilation
public static class OSInformation public static class OSInformation
{ {
#region IsWindows #region IsWindows

View File

@ -9,7 +9,7 @@ using ANX.Framework.Storage;
namespace ANX.Framework.NonXNA.PlatformSystem namespace ANX.Framework.NonXNA.PlatformSystem
{ {
public interface IPlatformSystemCreator : ICreator public interface IPlatformSystem
{ {
GameHost CreateGameHost(Game game); GameHost CreateGameHost(Game game);
INativeStorageDevice CreateStorageDevice(StorageDevice device, PlayerIndex player, int sizeInBytes, int directoryCount); INativeStorageDevice CreateStorageDevice(StorageDevice device, PlayerIndex player, int sizeInBytes, int directoryCount);

View File

@ -0,0 +1,181 @@
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ANX.Framework.Media;
using System.IO;
using ANX.Framework.Storage;
using System.Reflection;
using ANX.Framework.NonXNA.Reflection;
#endregion
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.Framework.NonXNA.PlatformSystem
{
internal class PlatformSystem : IPlatformSystem
{
private static PlatformSystem singletonInstance;
private static IPlatformSystem runtimeInstance;
private const string prefix = "ANX.PlatformSystem.";
private const string suffix = ".dll";
private PlatformSystem()
{
runtimeInstance = CreateRuntimeInstance(OSInformation.GetName());
}
private IPlatformSystem CreateRuntimeInstance(PlatformName platform)
{
string platformAssemblyName = string.Empty;
try
{
platformAssemblyName = GetPlatformAssemblyName(platform);
}
catch (PlatformSystemInstanceException ex)
{
Logger.Error(ex.Message);
return null;
}
Assembly assembly = Assembly.LoadFrom(platformAssemblyName);
foreach (Type type in assembly.GetExportedTypes())
{
if (TypeHelper.IsTypeAssignableFrom(typeof(IPlatformSystem), type))
{
return TypeHelper.Create<IPlatformSystem>(type);
}
}
return null;
}
private string GetPlatformAssemblyName(PlatformName platform)
{
switch (platform)
{
case PlatformName.Windows7:
case PlatformName.WindowsVista:
case PlatformName.WindowsXP:
return prefix + "Windows" + suffix;
case PlatformName.Linux:
case PlatformName.PSVita:
return prefix + platform.ToString() + suffix;
case PlatformName.Windows8:
return prefix + "Metro" + suffix;
default:
throw new PlatformSystemInstanceException("couldn't solve assembly name for platform '" + platform.ToString() + "'");
}
}
public static PlatformSystem Instance
{
get
{
if (singletonInstance == null)
{
singletonInstance = new PlatformSystem();
}
return singletonInstance;
}
}
public GameHost CreateGameHost(Game game)
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateGameHost(game);
}
public INativeStorageDevice CreateStorageDevice(StorageDevice device, PlayerIndex player, int sizeInBytes, int directoryCount)
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateStorageDevice(device, player, sizeInBytes, directoryCount);
}
public INativeStorageContainer CreateStorageContainer(StorageContainer container)
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateStorageContainer(container);
}
public INativeTitleContainer CreateTitleContainer()
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateTitleContainer();
}
public INativeGameTimer CreateGameTimer()
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateGameTimer();
}
public INativeContentManager CreateContentManager()
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateContentManager();
}
public Stream OpenReadFilestream(string filepath)
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.OpenReadFilestream(filepath);
}
public INativeMediaLibrary CreateMediaPlayer()
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.CreateMediaPlayer();
}
public IList<MediaSource> GetAvailableMediaSources()
{
if (runtimeInstance == null)
{
throw new PlatformSystemInstanceException();
}
return runtimeInstance.GetAvailableMediaSources();
}
}
}

View File

@ -0,0 +1,24 @@
#region Using Statements
using System;
#endregion
// This file is part of the ANX.Framework created by the
// "ANX.Framework developer group" and released under the Ms-PL license.
// For details see: http://anxframework.codeplex.com/license
namespace ANX.Framework.NonXNA.PlatformSystem
{
public class PlatformSystemInstanceException : Exception
{
public PlatformSystemInstanceException()
: base()
{
}
public PlatformSystemInstanceException(string message)
: base(message)
{
}
}
}

View File

@ -41,8 +41,7 @@ namespace ANX.Framework.Storage
StorageDevice = device; StorageDevice = device;
DisplayName = displayName; DisplayName = displayName;
nativeImplementation = nativeImplementation = PlatformSystem.Instance.CreateStorageContainer(this);
AddInSystemFactory.DefaultPlatformCreator.CreateStorageContainer(this);
} }
~StorageContainer() ~StorageContainer()

View File

@ -63,9 +63,7 @@ namespace ANX.Framework.Storage
#region Constructor #region Constructor
internal StorageDevice(PlayerIndex player, int sizeInBytes, int directoryCount) internal StorageDevice(PlayerIndex player, int sizeInBytes, int directoryCount)
{ {
nativeImplementation = nativeImplementation = PlatformSystem.Instance.CreateStorageDevice(this, player, sizeInBytes, directoryCount);
AddInSystemFactory.DefaultPlatformCreator.CreateStorageDevice(
this, player, sizeInBytes, directoryCount);
} }
#endregion #endregion

View File

@ -18,16 +18,35 @@ namespace ANX.Framework
static TitleContainer() static TitleContainer()
{ {
nativeImplementation = AddInSystemFactory.DefaultPlatformCreator.CreateTitleContainer(); try
{
nativeImplementation = PlatformSystem.Instance.CreateTitleContainer();
}
catch (PlatformSystemInstanceException ex)
{
//TODO: error handling
}
} }
public static Stream OpenStream(string name) public static Stream OpenStream(string name)
{ {
if (nativeImplementation == null)
{
//TODO: error handling
return null;
}
return nativeImplementation.OpenStream(name); return nativeImplementation.OpenStream(name);
} }
internal static string GetCleanPath(string path) internal static string GetCleanPath(string path)
{ {
if (nativeImplementation == null)
{
//TODO: error handling
return null;
}
return nativeImplementation.GetCleanPath(path); return nativeImplementation.GetCleanPath(path);
} }
} }

View File

@ -41,7 +41,7 @@
<Compile Include="LinuxGameHost.cs" /> <Compile Include="LinuxGameHost.cs" />
<Compile Include="LinuxGameTimer.cs" /> <Compile Include="LinuxGameTimer.cs" />
<Compile Include="LinuxGameWindow.cs" /> <Compile Include="LinuxGameWindow.cs" />
<Compile Include="LinuxPlatformCreator.cs" /> <Compile Include="LinuxPlatformSystem.cs" />
<Compile Include="LinuxStorageContainer.cs" /> <Compile Include="LinuxStorageContainer.cs" />
<Compile Include="LinuxStorageDevice.cs" /> <Compile Include="LinuxStorageDevice.cs" />
<Compile Include="LinuxTitleContainer.cs" /> <Compile Include="LinuxTitleContainer.cs" />

View File

@ -13,35 +13,9 @@ using ANX.Framework.Storage;
namespace ANX.PlatformSystem.Linux namespace ANX.PlatformSystem.Linux
{ {
public class LinuxPlatformCreator : IPlatformSystemCreator public class LinuxPlatformSystem : IPlatformSystem
{ {
#region Public public LinuxPlatformSystem()
public string Name
{
get
{
return "Linux";
}
}
public int Priority
{
get
{
return 100;
}
}
public bool IsSupported
{
get
{
return OSInformation.GetName() == PlatformName.Linux;
}
}
#endregion
public LinuxPlatformCreator()
{ {
} }
@ -49,7 +23,6 @@ namespace ANX.PlatformSystem.Linux
public GameHost CreateGameHost(Game game) public GameHost CreateGameHost(Game game)
{ {
Logger.Info("creating Linux GameHost"); Logger.Info("creating Linux GameHost");
AddInSystemFactory.Instance.PreventSystemChange(AddInType.PlatformSystem);
return new LinuxGameHost(game); return new LinuxGameHost(game);
} }
#endregion #endregion

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.60.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.50.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -14,34 +14,8 @@ using ANX.Framework.Storage;
namespace ANX.PlatformSystem.PsVita namespace ANX.PlatformSystem.PsVita
{ {
public class PsVitaPlatformCreator : IPlatformSystemCreator public class PsVitaPlatformCreator : IPlatformSystem
{ {
#region Public
public string Name
{
get
{
return "Platform.PsVita";
}
}
public int Priority
{
get
{
return 100;
}
}
public bool IsSupported
{
get
{
return OSInformation.GetName() == PlatformName.PSVita;
}
}
#endregion
#region Constructor #region Constructor
public PsVitaPlatformCreator() public PsVitaPlatformCreator()
{ {
@ -52,7 +26,6 @@ namespace ANX.PlatformSystem.PsVita
public GameHost CreateGameHost(Game game) public GameHost CreateGameHost(Game game)
{ {
Logger.Info("creating PsVita GameHost"); Logger.Info("creating PsVita GameHost");
AddInSystemFactory.Instance.PreventSystemChange(AddInType.PlatformSystem);
return new PsVitaGameHost(game); return new PsVitaGameHost(game);
} }
#endregion #endregion

View File

@ -45,7 +45,7 @@
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="WindowsGameHost.cs" /> <Compile Include="WindowsGameHost.cs" />
<Compile Include="WindowsGameWindow.cs" /> <Compile Include="WindowsGameWindow.cs" />
<Compile Include="WindowsPlatformCreator.cs" /> <Compile Include="WindowsPlatformSystem.cs" />
<Compile Include="WindowsStorageDevice.cs" /> <Compile Include="WindowsStorageDevice.cs" />
<Compile Include="WindowsTitleContainer.cs" /> <Compile Include="WindowsTitleContainer.cs" />
</ItemGroup> </ItemGroup>

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern // Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben: // übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.75.0.*")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -13,35 +13,9 @@ using ANX.Framework.Storage;
namespace ANX.PlatformSystem.Windows namespace ANX.PlatformSystem.Windows
{ {
public class WindowsPlatformCreator : IPlatformSystemCreator public class WindowsPlatformSystem : IPlatformSystem
{ {
#region Public public WindowsPlatformSystem()
public string Name
{
get
{
return "Windows";
}
}
public int Priority
{
get
{
return 100;
}
}
public bool IsSupported
{
get
{
return OSInformation.IsWindows;
}
}
#endregion
public WindowsPlatformCreator()
{ {
} }
@ -49,7 +23,6 @@ namespace ANX.PlatformSystem.Windows
public GameHost CreateGameHost(Game game) public GameHost CreateGameHost(Game game)
{ {
Logger.Info("creating Windows GameHost"); Logger.Info("creating Windows GameHost");
AddInSystemFactory.Instance.PreventSystemChange(AddInType.PlatformSystem);
return new WindowsGameHost(game); return new WindowsGameHost(game);
} }
#endregion #endregion