Skip to content

Loading…

Fixes PreviousExecutionState for WindowsStoreXaml template. #1258

Merged
merged 34 commits into from

5 participants

@azchohfi

No description provided.

azchohfi added some commits
@azchohfi azchohfi StorageDevice temporary fix for WINRT. Compiling. edd0e82
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/azchohfi/MonoGame into…
… develop3d
8d2a871
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
7865199
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
b807f91
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
34bbc10
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
0cb4b7c
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
5f75703
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
837b4b4
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
407efad
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
e6a85b9
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
2af6cd6
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
6930dc5
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
cce5918
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
5b1323a
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
20dd0f3
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
536be36
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
ccb807a
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
5173ae7
@azchohfi azchohfi New ctor for XamlGame...
that initilizes MetroGamePlatform.PreviousExecutionState.
a36e819
@azchohfi azchohfi Correct ctor calling for new template. 5930616
@azchohfi azchohfi Changed to send correct params to Create Method. 2bcb982
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d
55356bf
@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/azchohfi/MonoGame into…
… develop3d
c3536d5
@azchohfi azchohfi Forgot to add the using... 3b6ab57
@totallyeviljake totallyeviljake commented on an outdated diff
MonoGame.Framework/Windows8/XamlGame.cs
@@ -48,5 +49,19 @@ static public T Create(string launchParameters, CoreWindow window, SwapChainBack
// Return the created game object.
return game;
}
+
+ /// <summary>
+ /// Creates your Game class initializing it to worth within a XAML application window.

Looks like a literal translation error, can you change this comment to read:

Preserves the previous execution state in MetroGamePlatform and returns the constructed game object initialized with the given window.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@azchohfi

Do I need to change something to allow this to be pushed?

@raistlinthewiz

Maybe it's waiting for an actual review of the code.

@totallyeviljake

Thank you for updating the comment. It is waiting for testing. There is quite a bit of momentum on other aspects of the repository right now and the number of testers for Win8 XAML is very small. I started playing with it last night, but I can't do any more testing until next week. I don't see anything wrong with the code in your PR, but I am a novice in this regard.

@mgbot

Can one of the admins verify this patch?

@tomspilman
Mono Project member

So another complication here. We just applied the branch migration plans:

https://github.com/mono/MonoGame/wiki/Branch-Migration-Strategy

So the develop3d branch will stop being updated and eventually deleted. So that leaves you with a choice here:

  1. Close this PR and resubmit to the develop branch.
  2. Let me merge it with develop3d, but there will be a delay of a few days before it is moved into develop.

Totally your call.

@azchohfi

I vote for option 2, no problem about the delay.

@azchohfi azchohfi Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…
…elop3d

Conflicts:
	MonoGame.Framework/Storage/StorageDevice.cs
c0dd813
@mgbot

Can one of the admins verify this patch?

@tomspilman tomspilman merged commit 1adebbd into mono:develop3d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 21, 2012
  1. @azchohfi
Commits on Nov 22, 2012
  1. @azchohfi
Commits on Nov 26, 2012
  1. @azchohfi
Commits on Nov 27, 2012
  1. @azchohfi
Commits on Nov 28, 2012
  1. @azchohfi
Commits on Nov 30, 2012
  1. @azchohfi
Commits on Dec 3, 2012
  1. @azchohfi
Commits on Dec 7, 2012
  1. @azchohfi
Commits on Dec 11, 2012
  1. @azchohfi
Commits on Dec 12, 2012
  1. @azchohfi
Commits on Dec 15, 2012
  1. @azchohfi
Commits on Dec 29, 2012
  1. @azchohfi
Commits on Jan 8, 2013
  1. @azchohfi
Commits on Jan 10, 2013
  1. @azchohfi
Commits on Jan 15, 2013
  1. @azchohfi
Commits on Jan 24, 2013
  1. @azchohfi
Commits on Jan 25, 2013
  1. @azchohfi
Commits on Jan 29, 2013
  1. @azchohfi
  2. @azchohfi

    New ctor for XamlGame...

    azchohfi committed
    that initilizes MetroGamePlatform.PreviousExecutionState.
  3. @azchohfi
  4. @azchohfi
  5. @azchohfi
  6. @azchohfi
  7. @azchohfi

    Forgot to add the using...

    azchohfi committed
  8. @azchohfi

    Improved summary for new ctor.

    azchohfi committed
Commits on Feb 1, 2013
  1. @azchohfi
Commits on Feb 4, 2013
  1. @azchohfi
  2. @azchohfi
Commits on Feb 5, 2013
  1. @azchohfi
Commits on Feb 7, 2013
  1. @azchohfi
Commits on Feb 11, 2013
  1. @azchohfi
Commits on Feb 12, 2013
  1. @azchohfi
Commits on Feb 14, 2013
  1. @azchohfi
Commits on Feb 18, 2013
  1. @azchohfi

    Merge branch 'develop3d' of https://github.com/mono/MonoGame into dev…

    azchohfi committed
    …elop3d
    
    Conflicts:
    	MonoGame.Framework/Storage/StorageDevice.cs
View
6 MonoGame.Framework/Storage/StorageDevice.cs
@@ -434,21 +434,21 @@ public static StorageDevice EndShowSelector (IAsyncResult result)
{
if (!result.IsCompleted) {
- // Wait for the WaitHandle to become signaled.
+ // Wait for the WaitHandle to become signaled.
try {
result.AsyncWaitHandle.WaitOne ();
} finally {
#if !WINRT
result.AsyncWaitHandle.Close ();
#endif
- }
+ }
}
#if WINRT
var del = showDelegate;
showDelegate = null;
#else
// Retrieve the delegate.
- AsyncResult asyncResult = (AsyncResult)result;
+ AsyncResult asyncResult = (AsyncResult)result;
var del = asyncResult.AsyncDelegate;
#endif
View
17 MonoGame.Framework/Windows8/XamlGame.cs
@@ -2,6 +2,7 @@
using Microsoft.Xna.Framework;
using Windows.UI.Core;
using Windows.UI.Xaml.Controls;
+using Windows.ApplicationModel.Activation;
namespace MonoGame.Framework
{
@@ -48,5 +49,19 @@ static public T Create(string launchParameters, CoreWindow window, SwapChainBack
// Return the created game object.
return game;
}
+
+ /// <summary>
+ /// Preserves the previous execution state in MetroGamePlatform and returns the constructed game object initialized with the given window.
+ /// </summary>
+ /// <param name="launchParameters">The command line arguments from launch.</param>
+ /// <param name="window">The core window object.</param>
+ /// <param name="swapPanel">The XAML swapchain panel to which we render the scene and recieve input events.</param>
+ /// <returns></returns>
+ static public T Create(LaunchActivatedEventArgs args, CoreWindow window, SwapChainBackgroundPanel swapPanel)
+ {
+ MetroGamePlatform.PreviousExecutionState = args.PreviousExecutionState;
+
+ return Create(args.Arguments, window, swapPanel);
+ }
}
-}
+}
View
2 ProjectTemplates/VisualStudio2012/WindowsStoreXaml/App.xaml.cs
@@ -36,7 +36,7 @@ protected override void OnLaunched(LaunchActivatedEventArgs args)
if (gamePage == null)
{
// Create a main GamePage
- gamePage = new GamePage(args.Arguments);
+ gamePage = new GamePage(args);
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
View
5 ProjectTemplates/VisualStudio2012/WindowsStoreXaml/GamePage.xaml.cs
@@ -1,6 +1,7 @@
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using MonoGame.Framework;
+using Windows.ApplicationModel.Activation;
namespace $safeprojectname$
@@ -12,12 +13,12 @@ public sealed partial class GamePage : SwapChainBackgroundPanel
{
readonly Game1 _game;
- public GamePage(string launchArguments)
+ public GamePage(LaunchActivatedEventArgs args)
{
this.InitializeComponent();
// Create the game.
- _game = XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, this);
+ _game = XamlGame<Game1>.Create(args, Window.Current.CoreWindow, this);
}
}
}
Something went wrong with that request. Please try again.