Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominique Louis committed Jun 24, 2012
2 parents f8255dc + 4952f59 commit 47b6621
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
26 changes: 23 additions & 3 deletions MonoGame.Framework/Android/AndroidGamePlatform.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ additional consumer rights under your local laws which this license cannot

using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Media;

using GL11 = OpenTK.Graphics.ES11.GL;

namespace Microsoft.Xna.Framework
{
Expand All @@ -95,9 +97,13 @@ public AndroidGamePlatform(Game game)
AndroidGameActivity.Resumed += Activity_Resumed;

Window = new AndroidGameWindow(Game.Activity, game);

string model = Android.OS.Build.Model;
runningOnEmulator = string.IsNullOrEmpty(model) ? false : model.Contains("sdk");
}

private bool _initialized;
private bool runningOnEmulator = false;
public static bool IsPlayingVdeo { get; set; }

public override void Exit()
Expand Down Expand Up @@ -230,8 +236,22 @@ public override void ResetElapsedTime ()
public override void Present()
{
try
{
Window.SwapBuffers();
{
if (this.Window.GLContextVersion == OpenTK.Graphics.GLContextVersion.Gles2_0)
{
Window.SwapBuffers();
}
else
{
if (!runningOnEmulator)
{
Window.SwapBuffers();
}
else
{
GL11.Flush();
}
}
}
catch (Exception ex)
{
Expand Down
1 change: 1 addition & 0 deletions MonoGame.Framework/MonoGame.Framework.Linux.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{35253CE1-C864-4CD3-8249-4D1319748E8F}</ProjectGuid>
<OutputType>Library</OutputType>
<CodePage>65001</CodePage>
<RootNamespace>MonoGame.Framework.Linux</RootNamespace>
<AssemblyName>MonoGame.Framework.Linux</AssemblyName>
</PropertyGroup>
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
MonoGame is an OpenSource, OpenGL implementation of Microsoft's XNA 4 APIs that allows developers to build games that run on Android, iPhone, iPad, MacOS, Linux and soon PlayStation Suite and Windows Metro, all reusing their existing XNA code that runs on Xbox 360 or Windows Phone 7.

# LATEST NEWS
v2.5 has been released and is now available for public consumption.
v2.5.1 has been released and is now available for public consumption.

[Infinite Flight](http://itunes.apple.com/us/app/infinite-flight/id471341991?ls=1&mt=8), MonoGame's first 3D powered game, has been released.

Expand Down Expand Up @@ -72,6 +72,8 @@ cadahl
CircleOf14
vostok4
viyano
directhex
danzel

[Team Xamarin](http://www.xamarin.com) for their support and continued great work on all things Mono
and everyone else that submitted patches/fixes and enhancements. Without your contributions this release would not have been possible.
Expand Down

0 comments on commit 47b6621

Please sign in to comment.