Skip to content

Commit

Permalink
Clean up some more unused test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Aranda committed Jul 28, 2012
1 parent 17f676c commit 93a291a
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 32 deletions.
22 changes: 0 additions & 22 deletions MonoGame.Framework/Android/AndroidGameActivity.cs
Expand Up @@ -72,39 +72,17 @@ protected override void OnResume()
if (Resumed != null)
Resumed(this, EventArgs.Empty);

if (restarting)
{
if (Game.Window.GraphicsContext == null || Game.Window.GraphicsContext.IsDisposed)
{
//Game.Window.GraphicsContext = new OpenTK.Graphics.GraphicsContext(Game.Window.GraphicsMode, Game.Window.WindowInfo);
}
}
restarting = false;

var deviceManager = (IGraphicsDeviceManager)Game.Services.GetService(typeof(IGraphicsDeviceManager));
if (deviceManager == null)
return;
(deviceManager as GraphicsDeviceManager).ForceSetFullScreen();
Game.Window.RequestFocus();
}

bool restarting = false;
protected override void OnRestart()
{
base.OnRestart();
Game.Window.OnRestart();

restarting = true;
}

protected override void OnStart()
{
base.OnStart();
}

protected override void OnStop()
{
base.OnStop();
}
}

Expand Down
11 changes: 1 addition & 10 deletions MonoGame.Framework/Content/ContentManager.cs
Expand Up @@ -68,8 +68,6 @@ public partial class ContentManager : IDisposable
private static object ContentManagerLock = new object();
private static List<ContentManager> ContentManagers = new List<ContentManager>();

private Dictionary<string, string> loadedAssetPaths = new Dictionary<string, string>();

private static void AddContentManager(ContentManager contentManager)
{
lock (ContentManagerLock)
Expand Down Expand Up @@ -193,16 +191,9 @@ protected virtual Stream OpenStream(string assetName)
Stream stream;
try
{
string assetPath;
if (!loadedAssetPaths.TryGetValue(assetName, out assetPath))
{
assetPath = Path.Combine(_rootDirectory, assetName) + ".xnb";
}
string assetPath = Path.Combine(_rootDirectory, assetName) + ".xnb";
stream = TitleContainer.OpenStream(assetPath);

// The stream was opened without exception so the path must be valid
loadedAssetPaths[assetName] = assetPath;

#if ANDROID
// Read the asset into memory in one go. This results in a ~50% reduction
// in load times on Android due to slow Android asset streams.
Expand Down

0 comments on commit 93a291a

Please sign in to comment.