From 5c8b535fe456812e9fa9a652ff2f1e45c3a6cf3e Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 4 Mar 2023 12:10:16 +0100 Subject: [PATCH] fixed issues in the android demo's release mode --- Demos.Android/Activity1.cs | 5 +++-- Demos.Android/AndroidManifest.xml | 7 +++---- Demos.Android/Demos.Android.csproj | 6 +++--- Demos/UiDemo.cs | 5 ++++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Demos.Android/Activity1.cs b/Demos.Android/Activity1.cs index 3c17b8d..af0713d 100644 --- a/Demos.Android/Activity1.cs +++ b/Demos.Android/Activity1.cs @@ -1,3 +1,4 @@ +using Android.App; using Android.Content; using Android.Content.PM; using Android.OS; @@ -47,10 +48,10 @@ public class Activity1 : AndroidGameActivity { base.OnWindowFocusChanged(hasFocus); // hide the status bar if (hasFocus) { - #pragma warning disable CS0618 +#pragma warning disable CS0618 // TODO this is deprecated, find out how to replace it this.Window.DecorView.SystemUiVisibility = (StatusBarVisibility) (SystemUiFlags.ImmersiveSticky | SystemUiFlags.LayoutStable | SystemUiFlags.LayoutHideNavigation | SystemUiFlags.LayoutFullscreen | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen); - #pragma warning restore CS0618 +#pragma warning restore CS0618 } } diff --git a/Demos.Android/AndroidManifest.xml b/Demos.Android/AndroidManifest.xml index 3c6d7d6..5cac9f4 100644 --- a/Demos.Android/AndroidManifest.xml +++ b/Demos.Android/AndroidManifest.xml @@ -1,6 +1,5 @@  - - - - + + + diff --git a/Demos.Android/Demos.Android.csproj b/Demos.Android/Demos.Android.csproj index 87ec7ba..fa74022 100644 --- a/Demos.Android/Demos.Android.csproj +++ b/Demos.Android/Demos.Android.csproj @@ -4,9 +4,9 @@ 31 Exe de.ellpeck.mlem.demos.android - 1 - 1.0 - true + 100 + 1.0.0 + false false diff --git a/Demos/UiDemo.cs b/Demos/UiDemo.cs index fef30a1..5fb7503 100644 --- a/Demos/UiDemo.cs +++ b/Demos/UiDemo.cs @@ -242,7 +242,10 @@ namespace Demos { this.root.AddChild(new VerticalSpace(3)); this.root.AddChild(new Paragraph(Anchor.AutoLeft, 1, "MLEM.Ui also contains a simple Markdown parser, which can be useful for displaying things like changelogs in your game.")); this.root.AddChild(new VerticalSpace(3)); - var parser = new UiMarkdownParser {GraphicsDevice = this.GraphicsDevice}; + var parser = new UiMarkdownParser { + GraphicsDevice = this.GraphicsDevice, + ImageExceptionHandler = (s, e) => Console.Error.WriteLine($"Couldn't load image {s}: {e}") + }; using (var reader = new StreamReader(TitleContainer.OpenStream("Content/Markdown.md"))) parser.ParseInto(reader.ReadToEnd(), this.root);