Skip to content

Commit

Permalink
follow how o!f did.
Browse files Browse the repository at this point in the history
  • Loading branch information
andy840119 committed Dec 19, 2022
1 parent 33124df commit 34b74d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
15 changes: 1 addition & 14 deletions osu.Framework.Microphone.Tests.iOS/AppDelegate.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,13 @@
// See the LICENCE file in the repository root for full licence text.

using Foundation;
using osu.Framework.Input.Handlers.Microphone;
using osu.Framework.iOS;
using osu.Framework.iOS.Input;

namespace osu.Framework.Tests
{
[Register("AppDelegate")]
public class AppDelegate : GameAppDelegate
{
protected override Game CreateGame() => new TestingVisualTestGame();

internal class TestingVisualTestGame : VisualTestGame
{
protected override void LoadComplete()
{
base.LoadComplete();

// Need to cache IOSMicrophoneHandler in here to let MicrophoneInputManager knows.
Host.Dependencies.CacheAs(typeof(MicrophoneHandler), new IOSMicrophoneHandler());
}
}
protected override Game CreateGame() => new VisualTestGame();
}
}
6 changes: 1 addition & 5 deletions osu.Framework.Microphone.Tests.iOS/Application.cs
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
// Copyright (c) karaoke.dev <[email protected]>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.iOS;
using UIKit;

namespace osu.Framework.Tests
{
public static class Application
{
// This is the main entry point of the application.
public static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, typeof(GameUIApplication), typeof(AppDelegate));
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
}

0 comments on commit 34b74d4

Please sign in to comment.