forked from MonoGame/MonoGame
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GamePlatform.Desktop.cs
49 lines (42 loc) · 1.23 KB
/
GamePlatform.Desktop.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// MonoGame - Copyright (C) The MonoGame Team
// This file is subject to the terms and conditions defined in
// file 'LICENSE.txt', which is part of this source code package.
using System;
#if WINRT
using Windows.UI.ViewManagement;
#endif
namespace Microsoft.Xna.Framework
{
partial class GamePlatform
{
internal static GamePlatform PlatformCreate(Game game)
{
#if MONOMAC
return new MacGamePlatform(game);
#elif DESKTOPGL || ANGLE
return new OpenTKGamePlatform(game);
#elif WINDOWS && DIRECTX
return new MonoGame.Framework.WinFormsGamePlatform(game);
#elif WINDOWS_UAP
return new UAPGamePlatform(game);
#elif WINRT
return new MetroGamePlatform(game);
#endif
}
#if WINDOWS_STOREAPP
public event EventHandler<ViewStateChangedEventArgs> ViewStateChanged;
private ApplicationViewState _viewState;
public ApplicationViewState ViewState
{
get { return _viewState; }
set
{
if (_viewState == value)
return;
Raise(ViewStateChanged, new ViewStateChangedEventArgs(value));
_viewState = value;
}
}
#endif
}
}