This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
Blarg.GameFramework/Blarg.GameFramework.SDL2/SDLPlatformServices.cs
2013-08-17 15:15:24 -04:00

39 lines
968 B
C#

using System;
using PortableGL;
using Blarg.GameFramework.Input;
using Blarg.GameFramework.IO;
namespace Blarg.GameFramework
{
public class SDLPlatformServices : IPlatformServices
{
public SDLPlatformServices()
{
if (CurrentOS.IsWindows)
OperatingSystem = PlatformOS.Windows;
else if (CurrentOS.IsLinux)
OperatingSystem = PlatformOS.Linux;
else if (CurrentOS.IsMac)
OperatingSystem = PlatformOS.MacOS;
else
throw new Exception("Unable to determine OS.");
Logger = new SDLLogger();
}
public PlatformOS OperatingSystem { get; private set; }
public PlatformType Type
{
get { return PlatformType.Desktop; }
}
public IPlatformLogger Logger { get; internal set; }
public IFileSystem FileSystem { get; internal set; }
public IKeyboard Keyboard { get; internal set; }
public IMouse Mouse { get; internal set; }
public ITouchScreen TouchScreen { get; internal set; }
public GL20 GL { get; internal set; }
}
}