mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Merge branch 'master'
This commit is contained in:
@@ -1,2 +1,4 @@
|
||||
# Normalize all the line endings
|
||||
7a598af5b92ef76e9a542170befd89ba2556a97c
|
||||
# Enabled NRT globally
|
||||
ba1385330cc501f34937e08257e586c84e35d772
|
||||
|
||||
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@@ -31,10 +31,10 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ github.workspace }}/inspectcode
|
||||
key: inspectcode-${{ hashFiles('.config/dotnet-tools.json', '.github/workflows/ci.yml', 'osu-framework.sln*', '.editorconfig', '.globalconfig') }}
|
||||
key: inspectcode-${{ hashFiles('.config/dotnet-tools.json', '.github/workflows/ci.yml', 'osu-framework.sln*', 'osu-framework*.slnf', '.editorconfig', '.globalconfig', 'CodeAnalysis/*', '**/*.csproj', '**/*.props') }}
|
||||
|
||||
- name: Dotnet code style
|
||||
run: dotnet build -c Debug -warnaserror build/Desktop.proj -p:EnforceCodeStyleInBuild=true
|
||||
run: dotnet build -c Debug -warnaserror osu-framework.Desktop.slnf -p:EnforceCodeStyleInBuild=true
|
||||
|
||||
- name: CodeFileSanity
|
||||
run: |
|
||||
@@ -78,20 +78,11 @@ jobs:
|
||||
with:
|
||||
dotnet-version: "6.0.x"
|
||||
|
||||
# FIXME: libavformat is not included in Ubuntu. Let's fix that.
|
||||
# https://github.com/ppy/osu-framework/issues/4349
|
||||
# Remove this once https://github.com/actions/virtual-environments/issues/3306 has been resolved.
|
||||
- name: Install libavformat-dev
|
||||
if: ${{matrix.os.fullname == 'ubuntu-latest'}}
|
||||
run: |
|
||||
sudo apt-get update && \
|
||||
sudo apt-get -y install libavformat-dev
|
||||
|
||||
- name: Compile
|
||||
run: dotnet build -c Debug -warnaserror build/Desktop.proj
|
||||
run: dotnet build -c Debug -warnaserror osu-framework.Desktop.slnf
|
||||
|
||||
- name: Test
|
||||
run: dotnet test $pwd/*.Tests/bin/Debug/*/*.Tests.dll --settings $pwd/build/vstestconfig.runsettings --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx"
|
||||
run: dotnet test $pwd/**/*.Tests/bin/Debug/*/*.Tests.dll --settings $pwd/build/vstestconfig.runsettings --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}-${{matrix.threadingMode}}.trx"
|
||||
shell: pwsh
|
||||
|
||||
# Attempt to upload results even if test fails.
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -335,4 +335,6 @@ fabric.properties
|
||||
|
||||
# inspectcode
|
||||
inspectcodereport.xml
|
||||
inspectcode
|
||||
inspectcode
|
||||
|
||||
.idea/.idea.osu-framework.Desktop/.idea/misc.xml
|
||||
11
.idea/.idea.osu-framework.Desktop/.idea/misc.xml
generated
11
.idea/.idea.osu-framework.Desktop/.idea/misc.xml
generated
@@ -1,11 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="SwUserDefinedSpecifications">
|
||||
<option name="specTypeByUrl">
|
||||
<map />
|
||||
</option>
|
||||
</component>
|
||||
<component name="com.jetbrains.rider.android.RiderAndroidMiscFileCreationComponent">
|
||||
<option name="ENSURE_MISC_FILE_EXISTS" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -5,4 +5,8 @@ T:System.IComparable;Don't use non-generic IComparable. Use generic version inst
|
||||
M:System.Enum.HasFlag(System.Enum);Use osu.Framework.Extensions.EnumExtensions.HasFlagFast<T>() instead.
|
||||
F:System.UriKind.RelativeOrAbsolute;Incompatible results when run on mono (see https://www.mono-project.com/docs/faq/known-issues/urikind-relativeorabsolute/). Use Validation.TryParseUri(string, out Uri?) instead.
|
||||
M:System.Threading.Tasks.Task.Wait();Don't use Task.Wait. Use Task.WaitSafely() to ensure we avoid deadlocks.
|
||||
M:System.Guid.#ctor;Probably meaning to use Guid.NewGuid() instead. If actually wanting empty, use Guid.Empty.
|
||||
P:System.Threading.Tasks.Task`1.Result;Don't use Task.Result. Use Task.GetResultSafely() to ensure we avoid deadlocks.
|
||||
M:System.Threading.ManualResetEventSlim.Wait();Specify a timeout to avoid waiting forever.
|
||||
M:System.String.ToLower();string.ToLower() changes behaviour depending on CultureInfo.CurrentCulture. Use string.ToLowerInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture or use LocalisableString.
|
||||
M:System.String.ToUpper();string.ToUpper() changes behaviour depending on CultureInfo.CurrentCulture. Use string.ToUpperInvariant() instead. If wanting culture-sensitive behaviour, explicitly provide CultureInfo.CurrentCulture or use LocalisableString.
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<!-- Contains required properties for osu!framework projects. -->
|
||||
<Project>
|
||||
<PropertyGroup Label="C#">
|
||||
<LangVersion>8.0</LangVersion>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Label="License">
|
||||
<None Include="$(MSBuildThisFileDirectory)osu-framework.licenseheader">
|
||||
|
||||
@@ -7,7 +7,7 @@ using osu.Framework.Android;
|
||||
|
||||
namespace SampleGame.Android
|
||||
{
|
||||
[Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, LaunchMode = DEFAULT_LAUNCH_MODE, MainLauncher = true)]
|
||||
[Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, Exported = true, LaunchMode = DEFAULT_LAUNCH_MODE, MainLauncher = true)]
|
||||
public class SampleGameActivity : AndroidGameActivity
|
||||
{
|
||||
protected override Game CreateGame() => new SampleGameGame();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Platform;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using Foundation;
|
||||
using osu.Framework;
|
||||
using osu.Framework.iOS;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework.iOS;
|
||||
using UIKit;
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using osu.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osuTK;
|
||||
|
||||
@@ -1,10 +1,50 @@
|
||||
clone_depth: 1
|
||||
version: '{build}'
|
||||
image: Visual Studio 2022
|
||||
test: off
|
||||
skip_non_tags: true
|
||||
build_script:
|
||||
- cmd: PowerShell -Version 2.0 .\build.ps1 -Target DeployFrameworkDesktop
|
||||
|
||||
environment:
|
||||
matrix:
|
||||
- job_name: framework-desktop
|
||||
job_group: framework-base
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||
- job_name: framework-xamarin
|
||||
job_group: framework-base
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
|
||||
- job_name: templates
|
||||
job_depends_on: framework-base
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||
|
||||
nuget:
|
||||
project_feed: true
|
||||
|
||||
for:
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- job_name: framework-desktop
|
||||
build_script:
|
||||
- cmd: PowerShell -Version 2.0 .\build.ps1 -Target DeployFrameworkDesktop
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- job_name: framework-xamarin
|
||||
build_script:
|
||||
- cmd: PowerShell -Version 2.0 .\build.ps1 -Target DeployFrameworkXamarin
|
||||
-
|
||||
matrix:
|
||||
only:
|
||||
- job_name: templates
|
||||
build_script:
|
||||
- cmd: dotnet remove osu.Framework.Templates\templates\template-empty\TemplateGame.Game\TemplateGame.Game.csproj reference osu.Framework\osu.Framework.csproj
|
||||
- cmd: dotnet add osu.Framework.Templates\templates\template-empty\TemplateGame.Game\TemplateGame.Game.csproj package ppy.osu.Framework -v %APPVEYOR_REPO_TAG_NAME%
|
||||
- cmd: dotnet remove osu.Framework.Templates\templates\template-flappy\FlappyDon.Game\FlappyDon.Game.csproj reference osu.Framework\osu.Framework.csproj
|
||||
- cmd: dotnet add osu.Framework.Templates\templates\template-flappy\FlappyDon.Game\FlappyDon.Game.csproj package ppy.osu.Framework -v %APPVEYOR_REPO_TAG_NAME%
|
||||
|
||||
# Can't use `dotnet add` for legacy Xamarin projects. String-replacement happens inside build.cake instead.
|
||||
|
||||
- cmd: PowerShell -Version 2.0 .\build.ps1 -Target DeployFrameworkTemplates
|
||||
|
||||
deploy:
|
||||
- provider: Environment
|
||||
name: nuget
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
clone_depth: 1
|
||||
version: '{build}'
|
||||
image: Visual Studio 2019
|
||||
test: off
|
||||
skip_non_tags: true
|
||||
build_script:
|
||||
- cmd: PowerShell -Version 2.0 .\build.ps1 -Target DeployFrameworkXamarin
|
||||
deploy:
|
||||
- provider: Environment
|
||||
name: nuget
|
||||
- provider: Environment
|
||||
name: github
|
||||
@@ -1,10 +0,0 @@
|
||||
<Project Sdk="Microsoft.Build.Traversal/3.0.2">
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SampleGame.Desktop\SampleGame.Desktop.csproj" />
|
||||
<ProjectReference Include="..\SampleGame\SampleGame.csproj" />
|
||||
<ProjectReference Include="..\osu.Framework.NativeLibs\osu.Framework.NativeLibs.csproj" />
|
||||
<ProjectReference Include="..\osu.Framework.Tests\osu.Framework.Tests.csproj" />
|
||||
<ProjectReference Include="..\osu.Framework.Benchmarks\osu.Framework.Benchmarks.csproj" />
|
||||
<ProjectReference Include="..\osu.Framework\osu.Framework.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.Threading;
|
||||
using System.Text.RegularExpressions;
|
||||
#addin "nuget:?package=Cake.FileHelpers&version=3.2.1"
|
||||
#addin "nuget:?package=CodeFileSanity&version=0.0.36"
|
||||
#tool "nuget:?package=Python&version=3.7.2"
|
||||
var pythonPath = GetFiles("./tools/python.*/tools/python.exe").First();
|
||||
@@ -17,7 +19,6 @@ var tempDirectory = new DirectoryPath("temp");
|
||||
var artifactsDirectory = rootDirectory.Combine("artifacts");
|
||||
|
||||
var sln = rootDirectory.CombineWithFilePath("osu-framework.sln");
|
||||
var desktopBuilds = rootDirectory.CombineWithFilePath("build/Desktop.proj");
|
||||
var desktopSlnf = rootDirectory.CombineWithFilePath("osu-framework.Desktop.slnf");
|
||||
var frameworkProject = rootDirectory.CombineWithFilePath("osu.Framework/osu.Framework.csproj");
|
||||
var iosFrameworkProject = rootDirectory.CombineWithFilePath("osu.Framework.iOS/osu.Framework.iOS.csproj");
|
||||
@@ -82,7 +83,7 @@ Task("RunHttpBin")
|
||||
|
||||
Task("Compile")
|
||||
.Does(() => {
|
||||
DotNetCoreBuild(desktopBuilds.FullPath, new DotNetCoreBuildSettings {
|
||||
DotNetCoreBuild(desktopSlnf.FullPath, new DotNetCoreBuildSettings {
|
||||
Configuration = configuration,
|
||||
Verbosity = DotNetCoreVerbosity.Minimal,
|
||||
});
|
||||
@@ -187,7 +188,21 @@ Task("PackNativeLibs")
|
||||
});
|
||||
|
||||
Task("PackTemplate")
|
||||
.Does(() => {
|
||||
.Does(ctx => {
|
||||
ctx.ReplaceRegexInFiles(
|
||||
$"{rootDirectory.FullPath}/osu.Framework.Templates/**/*.iOS.csproj",
|
||||
"^.*osu.Framework.csproj.*$",
|
||||
$" <PackageReference Include=\"ppy.osu.Framework\" Version=\"{version}\" />",
|
||||
RegexOptions.Multiline
|
||||
);
|
||||
|
||||
ctx.ReplaceRegexInFiles(
|
||||
$"{rootDirectory.FullPath}/osu.Framework.Templates/**/*.iOS.csproj",
|
||||
"^.*osu.Framework.iOS.csproj.*$",
|
||||
$" <PackageReference Include=\"ppy.osu.Framework.iOS\" Version=\"{version}\" />",
|
||||
RegexOptions.Multiline
|
||||
);
|
||||
|
||||
DotNetCorePack(templateProject.FullPath, new DotNetCorePackSettings{
|
||||
OutputDirectory = artifactsDirectory,
|
||||
Configuration = configuration,
|
||||
@@ -227,6 +242,11 @@ Task("DeployFrameworkDesktop")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("DetermineAppveyorDeployProperties")
|
||||
.IsDependentOn("PackFramework")
|
||||
.IsDependentOn("Publish");
|
||||
|
||||
Task("DeployFrameworkTemplates")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("DetermineAppveyorDeployProperties")
|
||||
.IsDependentOn("PackTemplate")
|
||||
.IsDependentOn("Publish");
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@
|
||||
"osu.Framework.Android\\osu.Framework.Android.csproj",
|
||||
"osu.Framework.NativeLibs\\osu.Framework.NativeLibs.csproj",
|
||||
"osu.Framework.Tests.Android\\osu.Framework.Tests.Android.csproj",
|
||||
"osu.Framework\\osu.Framework.csproj"
|
||||
"osu.Framework\\osu.Framework.csproj",
|
||||
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Game\\TemplateGame.Game.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Game\\FlappyDon.Game.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,16 @@
|
||||
"osu.Framework.NativeLibs\\osu.Framework.NativeLibs.csproj",
|
||||
"osu.Framework.Tests\\osu.Framework.Tests.csproj",
|
||||
"osu.Framework\\osu.Framework.csproj",
|
||||
"osu.Framework.Benchmarks\\osu.Framework.Benchmarks.csproj"
|
||||
"osu.Framework.Benchmarks\\osu.Framework.Benchmarks.csproj",
|
||||
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Game\\TemplateGame.Game.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Desktop\\TemplateGame.Desktop.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Game.Tests\\TemplateGame.Game.Tests.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Resources\\TemplateGame.Resources.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Game\\FlappyDon.Game.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Desktop\\FlappyDon.Desktop.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Game.Tests\\FlappyDon.Game.Tests.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Resources\\FlappyDon.Resources.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,12 @@
|
||||
"osu.Framework.iOS\\osu.Framework.iOS.csproj",
|
||||
"osu.Framework.NativeLibs\\osu.Framework.NativeLibs.csproj",
|
||||
"osu.Framework.Tests.iOS\\osu.Framework.Tests.iOS.csproj",
|
||||
"osu.Framework\\osu.Framework.csproj"
|
||||
"osu.Framework\\osu.Framework.csproj",
|
||||
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.Game\\TemplateGame.Game.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-empty\\TemplateGame.iOS\\TemplateGame.iOS.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.Game\\FlappyDon.Game.csproj",
|
||||
"osu.Framework.Templates\\templates\\template-flappy\\FlappyDon.iOS\\FlappyDon.iOS.csproj"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -227,6 +227,108 @@ Global
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Release|iPhone.ActiveCfg = Release|iPhone
|
||||
{48783186-230D-4048-A97A-E4F1DF43BF5C}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{6BEB95A6-0673-4AF5-892E-9146FF8B0948}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{55AB973D-ECA0-422B-B367-24BC47DA081B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{FC0A9040-7BAF-4524-B398-8C7A1C7DDEE9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{7809CB42-8FED-4BB7-8C68-7638357B94A6}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{4C728441-4C3D-4AE4-9C0F-EA91E2C70965}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{0309CF11-621A-4F23-8FBA-A583303A8531}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{9E4B69EE-34E6-47CF-8346-2A66D1714FCD}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -8,11 +8,15 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=D9A367C9_002D4C1A_002D489F_002D9B05_002DA0CEA2B53B58/@EntryIndexedValue">ExplicitlyExcluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/AnalysisEnabled/@EntryValue">SOLUTION</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeAccessorOwnerBody/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeDefaultValueWhenTypeEvident/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeDefaultValueWhenTypeNotEvident/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeMissingParentheses/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeConstructorOrDestructorBody/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeLocalFunctionBody/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeMethodOrOperatorBody/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeModifiersOrder/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeObjectCreationWhenTypeEvident/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeObjectCreationWhenTypeNotEvident/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeRedundantParentheses/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeRedundantParentheses/@EntryIndexRemoved">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=ArrangeTypeMemberModifiers/@EntryIndexedValue">WARNING</s:String>
|
||||
@@ -120,6 +124,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MissingLinebreak/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MissingSpace/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MoreSpecificForeachVariableTypeAvailable/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MoveVariableDeclarationInsideLoopCondition/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MultipleSpaces/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MultipleStatementsOnOneLine/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=MultipleTypeMembersOnOneLine/@EntryIndexedValue">WARNING</s:String>
|
||||
@@ -133,6 +138,8 @@
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleInterfaceMemberAmbiguity/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PossibleMultipleEnumeration/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PrivateVariableCanBeMadeReadonly/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PropertyCanBeMadeInitOnly_002EGlobal/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PropertyCanBeMadeInitOnly_002ELocal/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=PublicConstructorInAbstractClass/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantArgumentDefaultValue/@EntryIndexedValue">HINT</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantArrayCreationExpression/@EntryIndexedValue">WARNING</s:String>
|
||||
@@ -143,6 +150,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInAttributeList/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInEnumDeclaration/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantCommaInInitializer/@EntryIndexedValue">DO_NOT_SHOW</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantDiscardDesignation/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantEmptyObjectCreationArgumentList/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantExplicitParamsArrayCreation/@EntryIndexedValue">WARNING</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=RedundantImmediateDelegateInvocation/@EntryIndexedValue">WARNING</s:String>
|
||||
@@ -261,6 +269,7 @@
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/DEFAULT_INTERNAL_MODIFIER/@EntryValue">Explicit</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/LOCAL_FUNCTION_BODY/@EntryValue">ExpressionBody</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/METHOD_OR_OPERATOR_BODY/@EntryValue">BlockBody</s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/OBJECT_CREATION_WHEN_TYPE_EVIDENT/@EntryValue">ExplicitlyTyped</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/USE_HEURISTICS_FOR_BODY_STYLE/@EntryValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ACCESSOR_DECLARATION_BRACES/@EntryValue">NEXT_LINE</s:String>
|
||||
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/ALIGN_LINQ_QUERY/@EntryValue">True</s:Boolean>
|
||||
@@ -792,6 +801,16 @@ See the LICENCE file in the repository root for full licence text.
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FFIELD/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/UserRules/=XAML_005FRESOURCE/@EntryIndexedValue"><Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /></s:String>
|
||||
<s:String x:Key="/Default/CustomTools/CustomToolsData/@EntryValue"></s:String>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=Java_002EUtil_002ELogging_002E_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=Microsoft_002EExtensions_002ELogging_002E_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=Microsoft_002EToolkit_002EHighPerformance_002EBox_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=NUnit_002EFramework_002EInternal_002ELogger/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=OpenTabletDriver_002EPlugin_002EDependencyInjection_002E_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=Realms_002ELogging_002ELogger/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=System_002EComponentModel_002EContainer/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=System_002ENumerics_002E_002A/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=System_002ESecurity_002ECryptography_002ERSA/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/AutoImport2/=CSHARP/BlackLists/=TagLib_002EMpeg4_002EBox/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EFeature_002EServices_002EDaemon_002ESettings_002EMigration_002ESwaWarningsModeSettingsMigrate/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpAttributeForSingleLineMethodUpgrade/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -10,12 +10,12 @@ using Android.Runtime;
|
||||
using Android.Views;
|
||||
using ManagedBass;
|
||||
using osu.Framework.Bindables;
|
||||
using Debug = System.Diagnostics.Debug;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
|
||||
namespace osu.Framework.Android
|
||||
{
|
||||
// since `ActivityAttribute` can't be inherited, the below is only provided as an illustrative example of how to setup an activity for best compatibility.
|
||||
[Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, LaunchMode = DEFAULT_LAUNCH_MODE, MainLauncher = true)]
|
||||
[Activity(ConfigurationChanges = DEFAULT_CONFIG_CHANGES, Exported = true, LaunchMode = DEFAULT_LAUNCH_MODE, MainLauncher = true)]
|
||||
public abstract class AndroidGameActivity : Activity
|
||||
{
|
||||
protected const ConfigChanges DEFAULT_CONFIG_CHANGES = ConfigChanges.Keyboard
|
||||
@@ -43,23 +43,18 @@ namespace osu.Framework.Android
|
||||
public SystemUiFlags UIVisibilityFlags
|
||||
{
|
||||
#pragma warning disable 618 // SystemUiVisibility is deprecated
|
||||
get
|
||||
{
|
||||
Debug.Assert(Window != null);
|
||||
return (SystemUiFlags)Window.DecorView.SystemUiVisibility;
|
||||
}
|
||||
get => (SystemUiFlags)Window.AsNonNull().DecorView.SystemUiVisibility;
|
||||
set
|
||||
{
|
||||
Debug.Assert(Window != null);
|
||||
systemUiFlags = value;
|
||||
Window.DecorView.SystemUiVisibility = (StatusBarVisibility)value;
|
||||
Window.AsNonNull().DecorView.SystemUiVisibility = (StatusBarVisibility)value;
|
||||
#pragma warning restore 618
|
||||
}
|
||||
}
|
||||
|
||||
private SystemUiFlags systemUiFlags;
|
||||
|
||||
private AndroidGameView gameView;
|
||||
private AndroidGameView gameView = null!;
|
||||
|
||||
public override void OnTrimMemory([GeneratedEnum] TrimMemory level)
|
||||
{
|
||||
@@ -67,7 +62,7 @@ namespace osu.Framework.Android
|
||||
gameView.Host?.Collect();
|
||||
}
|
||||
|
||||
protected override void OnCreate(Bundle savedInstanceState)
|
||||
protected override void OnCreate(Bundle? savedInstanceState)
|
||||
{
|
||||
// The default current directory on android is '/'.
|
||||
// On some devices '/' maps to the app data directory. On others it maps to the root of the internal storage.
|
||||
@@ -80,11 +75,9 @@ namespace osu.Framework.Android
|
||||
|
||||
UIVisibilityFlags = SystemUiFlags.LayoutFlags | SystemUiFlags.ImmersiveSticky | SystemUiFlags.HideNavigation | SystemUiFlags.Fullscreen;
|
||||
|
||||
Debug.Assert(Window != null);
|
||||
|
||||
// Firing up the on-screen keyboard (eg: interacting with textboxes) may cause the UI visibility flags to be altered thus showing the navigation bar and potentially the status bar
|
||||
// This sets back the UI flags to hidden once the interaction with the on-screen keyboard has finished.
|
||||
Window.DecorView.SystemUiVisibilityChange += (_, e) =>
|
||||
Window.AsNonNull().DecorView.SystemUiVisibilityChange += (_, e) =>
|
||||
{
|
||||
if ((SystemUiFlags)e.Visibility != systemUiFlags)
|
||||
{
|
||||
@@ -94,8 +87,7 @@ namespace osu.Framework.Android
|
||||
|
||||
if (OperatingSystem.IsAndroidVersionAtLeast(28))
|
||||
{
|
||||
Debug.Assert(Window.Attributes != null);
|
||||
Window.Attributes.LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode.ShortEdges;
|
||||
Window.AsNonNull().Attributes.AsNonNull().LayoutInDisplayCutoutMode = LayoutInDisplayCutoutMode.ShortEdges;
|
||||
}
|
||||
|
||||
gameView.HostStarted += host =>
|
||||
@@ -105,9 +97,9 @@ namespace osu.Framework.Android
|
||||
RunOnUiThread(() =>
|
||||
{
|
||||
if (!allow.NewValue)
|
||||
Window.AddFlags(WindowManagerFlags.KeepScreenOn);
|
||||
Window?.AddFlags(WindowManagerFlags.KeepScreenOn);
|
||||
else
|
||||
Window.ClearFlags(WindowManagerFlags.KeepScreenOn);
|
||||
Window?.ClearFlags(WindowManagerFlags.KeepScreenOn);
|
||||
});
|
||||
}, true);
|
||||
};
|
||||
@@ -142,17 +134,17 @@ namespace osu.Framework.Android
|
||||
// On some devices and keyboard combinations the OnKeyDown event does not propagate the key event to the view.
|
||||
// Here it is done manually to ensure that the keys actually land in the view.
|
||||
|
||||
public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
return gameView.OnKeyDown(keyCode, e);
|
||||
}
|
||||
|
||||
public override bool OnKeyUp([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyUp([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
return gameView.OnKeyUp(keyCode, e);
|
||||
}
|
||||
|
||||
public override bool OnKeyLongPress([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyLongPress([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
return gameView.OnKeyLongPress(keyCode, e);
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ using osu.Framework.Android.Graphics.Textures;
|
||||
using osu.Framework.Android.Graphics.Video;
|
||||
using osu.Framework.Android.Input;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Graphics.Video;
|
||||
using osu.Framework.Input;
|
||||
@@ -63,7 +64,7 @@ namespace osu.Framework.Android
|
||||
public override IEnumerable<string> UserStoragePaths => new[]
|
||||
{
|
||||
// not null as internal "external storage" is always available.
|
||||
Application.Context.GetExternalFilesDir(string.Empty)!.ToString(),
|
||||
Application.Context.GetExternalFilesDir(string.Empty).AsNonNull().ToString(),
|
||||
};
|
||||
|
||||
public override bool OpenFileExternally(string filename) => false;
|
||||
|
||||
@@ -14,19 +14,19 @@ using Android.Views.InputMethods;
|
||||
using osu.Framework.Android.Input;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Platform;
|
||||
using osuTK.Graphics;
|
||||
using Debug = System.Diagnostics.Debug;
|
||||
|
||||
namespace osu.Framework.Android
|
||||
{
|
||||
public class AndroidGameView : osuTK.Android.AndroidGameView
|
||||
{
|
||||
public AndroidGameHost Host { get; private set; }
|
||||
public AndroidGameHost? Host { get; private set; }
|
||||
|
||||
public AndroidGameActivity Activity { get; }
|
||||
public AndroidGameActivity Activity { get; } = null!;
|
||||
|
||||
public BindableSafeArea SafeAreaPadding { get; } = new BindableSafeArea();
|
||||
|
||||
@@ -61,7 +61,14 @@ namespace osu.Framework.Android
|
||||
}
|
||||
}
|
||||
|
||||
private readonly Game game;
|
||||
private readonly Game game = null!;
|
||||
|
||||
private InputMethodManager? inputMethodManager;
|
||||
|
||||
/// <summary>
|
||||
/// Whether <see cref="AndroidTextInput"/> is active.
|
||||
/// </summary>
|
||||
private bool textInputActive;
|
||||
|
||||
public AndroidGameView(AndroidGameActivity activity, Game game)
|
||||
: base(activity)
|
||||
@@ -93,6 +100,11 @@ namespace osu.Framework.Android
|
||||
// this needs to happen in the constructor
|
||||
Focusable = true;
|
||||
FocusableInTouchMode = true;
|
||||
|
||||
// disable ugly green border when view is focused via hardware keyboard/mouse.
|
||||
DefaultFocusHighlightEnabled = false;
|
||||
|
||||
inputMethodManager = Activity.GetSystemService(Context.InputMethodService) as InputMethodManager;
|
||||
}
|
||||
|
||||
protected override void CreateFrameBuffer()
|
||||
@@ -115,8 +127,10 @@ namespace osu.Framework.Android
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyDown([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
if (e == null) return base.OnKeyDown(keyCode, e);
|
||||
|
||||
switch (keyCode)
|
||||
{
|
||||
// Do not consume Volume keys, so the system can handle them
|
||||
@@ -127,18 +141,29 @@ namespace osu.Framework.Android
|
||||
|
||||
default:
|
||||
KeyDown?.Invoke(keyCode, e);
|
||||
|
||||
// Releasing backspace on a physical keyboard when text input is active will not send a key up event.
|
||||
// Manually send one to prevent the key from getting stuck.
|
||||
// This does mean that key repeat is handled by the OS, instead of by the usual `InputManager` handling.
|
||||
if (keyCode == Keycode.Del && e.IsFromSource(InputSourceType.Keyboard) && textInputActive)
|
||||
KeyUp?.Invoke(Keycode.Del, new KeyEvent(e.DownTime, e.EventTime, KeyEventActions.Up, Keycode.Del, 0, e.MetaState, e.DeviceId, e.ScanCode, e.Flags, e.Source));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnKeyLongPress([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyLongPress([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
if (e == null) return base.OnKeyLongPress(keyCode, e);
|
||||
|
||||
KeyLongPress?.Invoke(keyCode, e);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool OnKeyUp([GeneratedEnum] Keycode keyCode, KeyEvent e)
|
||||
public override bool OnKeyUp([GeneratedEnum] Keycode keyCode, KeyEvent? e)
|
||||
{
|
||||
if (e == null) return base.OnKeyUp(keyCode, e);
|
||||
|
||||
KeyUp?.Invoke(keyCode, e);
|
||||
return true;
|
||||
}
|
||||
@@ -187,13 +212,11 @@ namespace osu.Framework.Android
|
||||
/// </summary>
|
||||
private void updateSafeArea()
|
||||
{
|
||||
Debug.Assert(Display != null);
|
||||
|
||||
// compute the usable screen area.
|
||||
|
||||
var screenSize = new Point();
|
||||
#pragma warning disable 618 // GetRealSize is deprecated
|
||||
Display.GetRealSize(screenSize);
|
||||
Display.AsNonNull().GetRealSize(screenSize);
|
||||
#pragma warning restore 618
|
||||
var screenArea = new RectangleI(0, 0, screenSize.X, screenSize.Y);
|
||||
var usableScreenArea = screenArea;
|
||||
@@ -239,41 +262,91 @@ namespace osu.Framework.Android
|
||||
};
|
||||
}
|
||||
|
||||
public override bool OnCheckIsTextEditor() => true;
|
||||
public override bool OnCheckIsTextEditor() => textInputActive;
|
||||
|
||||
public override IInputConnection OnCreateInputConnection(EditorInfo outAttrs)
|
||||
/// <returns><c>null</c> to disable input methods</returns>
|
||||
public override IInputConnection? OnCreateInputConnection(EditorInfo? outAttrs)
|
||||
{
|
||||
if (outAttrs == null) throw new ArgumentNullException(nameof(outAttrs));
|
||||
|
||||
// Properly disable native input methods so that the software keyboard doesn't unexpectedly open.
|
||||
// Eg. when pressing keys on a hardware keyboard.
|
||||
if (!textInputActive)
|
||||
return null;
|
||||
|
||||
outAttrs.ImeOptions = ImeFlags.NoExtractUi | ImeFlags.NoFullscreen;
|
||||
outAttrs.InputType = InputTypes.TextVariationVisiblePassword | InputTypes.TextFlagNoSuggestions;
|
||||
return new AndroidInputConnection(this, true);
|
||||
}
|
||||
|
||||
internal void StartTextInput()
|
||||
{
|
||||
textInputActive = true;
|
||||
Activity.RunOnUiThread(() =>
|
||||
{
|
||||
inputMethodManager?.RestartInput(this); // this syncs the Android input method state with `OnCreateInputConnection()`.
|
||||
RequestFocus();
|
||||
inputMethodManager?.ShowSoftInput(this, 0);
|
||||
});
|
||||
}
|
||||
|
||||
internal void StopTextInput()
|
||||
{
|
||||
textInputActive = false;
|
||||
Activity.RunOnUiThread(() =>
|
||||
{
|
||||
inputMethodManager?.RestartInput(this);
|
||||
inputMethodManager?.HideSoftInputFromWindow(WindowToken, HideSoftInputFlags.None);
|
||||
ClearFocus();
|
||||
});
|
||||
}
|
||||
|
||||
public override void SwapBuffers()
|
||||
{
|
||||
try
|
||||
{
|
||||
base.SwapBuffers();
|
||||
}
|
||||
catch (GraphicsContextException ex)
|
||||
{
|
||||
// sometimes buffers will spontaneously fail to swap with BAD_SURFACE
|
||||
// just before the activity is suspended to background or just after it has been resumed,
|
||||
// but will continue operating correctly after that transitionary period.
|
||||
// despite some testing it is unclear which view callback can be used to tell whether it is safe to swap buffers,
|
||||
// so for now just catch and suppress these errors.
|
||||
if (ex.Message.Contains("BAD_SURFACE", StringComparison.Ordinal))
|
||||
Logger.Log($"BAD_SURFACE failure in {nameof(SwapBuffers)} suppressed");
|
||||
else
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on a key down event.
|
||||
/// </summary>
|
||||
public new event Action<Keycode, KeyEvent> KeyDown;
|
||||
public new event Action<Keycode, KeyEvent>? KeyDown;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on a key up event.
|
||||
/// </summary>
|
||||
public new event Action<Keycode, KeyEvent> KeyUp;
|
||||
public new event Action<Keycode, KeyEvent>? KeyUp;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked on a key long press event.
|
||||
/// </summary>
|
||||
public event Action<Keycode, KeyEvent> KeyLongPress;
|
||||
public event Action<Keycode, KeyEvent>? KeyLongPress;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when text is committed by an <see cref="AndroidInputConnection"/>.
|
||||
/// </summary>
|
||||
public event Action<string> CommitText;
|
||||
public event Action<string>? CommitText;
|
||||
|
||||
/// <summary>
|
||||
/// Invoked when the <see cref="game"/> has been started on the <see cref="Host"/>.
|
||||
/// </summary>
|
||||
public event Action<AndroidGameHost> HostStarted;
|
||||
public event Action<AndroidGameHost>? HostStarted;
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace osu.Framework.Android
|
||||
set { }
|
||||
}
|
||||
|
||||
public event Action CursorStateChanged;
|
||||
public event Action? CursorStateChanged;
|
||||
|
||||
public override CursorState CursorState
|
||||
{
|
||||
|
||||
@@ -8,6 +8,7 @@ using System.Runtime.InteropServices;
|
||||
using FFmpeg.AutoGen;
|
||||
using Java.Interop;
|
||||
using osu.Framework.Extensions.EnumExtensions;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
using osu.Framework.Graphics.Video;
|
||||
using osu.Framework.Logging;
|
||||
|
||||
@@ -142,7 +143,7 @@ namespace osu.Framework.Android.Graphics.Video
|
||||
: base(videoStream)
|
||||
{
|
||||
// Hardware decoding with MediaCodec requires that we pass a Java VM pointer
|
||||
// to FFmpeg so that it can call the MediaCodec APIs through JNI (as they're Java only)
|
||||
// to FFmpeg so that it can call the MediaCodec APIs through JNI (as they're Java only).
|
||||
|
||||
int result = av_jni_set_java_vm(JniEnvironment.Runtime.InvocationPointer.ToPointer(), null);
|
||||
if (result < 0)
|
||||
|
||||
@@ -9,40 +9,43 @@ namespace osu.Framework.Android.Input
|
||||
{
|
||||
internal class AndroidInputConnection : BaseInputConnection
|
||||
{
|
||||
public AndroidGameView TargetView { get; set; }
|
||||
private readonly AndroidGameView targetView;
|
||||
|
||||
public AndroidInputConnection(AndroidGameView targetView, bool fullEditor)
|
||||
: base(targetView, fullEditor)
|
||||
{
|
||||
TargetView = targetView;
|
||||
this.targetView = targetView;
|
||||
}
|
||||
|
||||
public override bool CommitText(ICharSequence text, int newCursorPosition)
|
||||
public override bool CommitText(ICharSequence? text, int newCursorPosition)
|
||||
{
|
||||
if (text.Length() != 0)
|
||||
if (text?.Length() > 0)
|
||||
{
|
||||
TargetView.OnCommitText(text.ToString());
|
||||
targetView.OnCommitText(text.ToString());
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.CommitText(text, newCursorPosition);
|
||||
}
|
||||
|
||||
public override bool SendKeyEvent(KeyEvent e)
|
||||
public override bool SendKeyEvent(KeyEvent? e)
|
||||
{
|
||||
if (e == null)
|
||||
return base.SendKeyEvent(e);
|
||||
|
||||
switch (e.Action)
|
||||
{
|
||||
case KeyEventActions.Down:
|
||||
TargetView?.OnKeyDown(e.KeyCode, e);
|
||||
targetView.OnKeyDown(e.KeyCode, e);
|
||||
return true;
|
||||
|
||||
case KeyEventActions.Up:
|
||||
TargetView?.OnKeyUp(e.KeyCode, e);
|
||||
targetView.OnKeyUp(e.KeyCode, e);
|
||||
return true;
|
||||
|
||||
case KeyEventActions.Multiple:
|
||||
TargetView?.OnKeyDown(e.KeyCode, e);
|
||||
TargetView?.OnKeyUp(e.KeyCode, e);
|
||||
targetView.OnKeyDown(e.KeyCode, e);
|
||||
targetView.OnKeyUp(e.KeyCode, e);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Views;
|
||||
using osu.Framework.Extensions.EnumExtensions;
|
||||
using osuTK.Input;
|
||||
|
||||
namespace osu.Framework.Android.Input
|
||||
@@ -10,33 +12,27 @@ namespace osu.Framework.Android.Input
|
||||
public static class AndroidInputExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the corresponding <see cref="MouseButton"/> for a mouse button given as a <see cref="MotionEventButtonState"/>.
|
||||
/// Returns the corresponding <see cref="MouseButton"/>s for a mouse button given as a <see cref="MotionEventButtonState"/>.
|
||||
/// </summary>
|
||||
/// <param name="motionEventMouseButton">The given button. Must not be a raw state or a non-mouse button.</param>
|
||||
/// <returns>The corresponding <see cref="MouseButton"/>.</returns>
|
||||
/// <param name="motionEventMouseButton">The given button state. Must not be a raw state or a non-mouse button.</param>
|
||||
/// <returns>The corresponding <see cref="MouseButton"/>s.</returns>
|
||||
/// <exception cref="ArgumentOutOfRangeException">Thrown if the provided button <paramref name="motionEventMouseButton"/> is not a </exception>
|
||||
public static MouseButton ToMouseButton(this MotionEventButtonState motionEventMouseButton)
|
||||
public static IEnumerable<MouseButton> ToMouseButtons(this MotionEventButtonState motionEventMouseButton)
|
||||
{
|
||||
switch (motionEventMouseButton)
|
||||
{
|
||||
case MotionEventButtonState.Primary:
|
||||
return MouseButton.Left;
|
||||
if (motionEventMouseButton.HasFlagFast(MotionEventButtonState.Primary))
|
||||
yield return MouseButton.Left;
|
||||
|
||||
case MotionEventButtonState.Secondary:
|
||||
return MouseButton.Right;
|
||||
if (motionEventMouseButton.HasFlagFast(MotionEventButtonState.Secondary))
|
||||
yield return MouseButton.Right;
|
||||
|
||||
case MotionEventButtonState.Tertiary:
|
||||
return MouseButton.Middle;
|
||||
if (motionEventMouseButton.HasFlagFast(MotionEventButtonState.Tertiary))
|
||||
yield return MouseButton.Middle;
|
||||
|
||||
case MotionEventButtonState.Back:
|
||||
return MouseButton.Button1;
|
||||
if (motionEventMouseButton.HasFlagFast(MotionEventButtonState.Back))
|
||||
yield return MouseButton.Button1;
|
||||
|
||||
case MotionEventButtonState.Forward:
|
||||
return MouseButton.Button2;
|
||||
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(motionEventMouseButton), motionEventMouseButton, "Given button is not a mouse button.");
|
||||
}
|
||||
if (motionEventMouseButton.HasFlagFast(MotionEventButtonState.Forward))
|
||||
yield return MouseButton.Button2;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,8 +9,6 @@ using osu.Framework.Extensions.EnumExtensions;
|
||||
using osu.Framework.Input.Handlers;
|
||||
using osu.Framework.Platform;
|
||||
|
||||
#nullable enable
|
||||
|
||||
namespace osu.Framework.Android.Input
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Views;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.OS;
|
||||
@@ -180,11 +182,13 @@ namespace osu.Framework.Android.Input
|
||||
switch (genericMotionEvent.Action)
|
||||
{
|
||||
case MotionEventActions.ButtonPress:
|
||||
handleMouseDown(genericMotionEvent.ActionButton.ToMouseButton());
|
||||
foreach (var button in genericMotionEvent.ActionButton.ToMouseButtons())
|
||||
handleMouseDown(button);
|
||||
break;
|
||||
|
||||
case MotionEventActions.ButtonRelease:
|
||||
handleMouseUp(genericMotionEvent.ActionButton.ToMouseButton());
|
||||
foreach (var button in genericMotionEvent.ActionButton.ToMouseButtons())
|
||||
handleMouseUp(button);
|
||||
break;
|
||||
|
||||
case MotionEventActions.Scroll:
|
||||
@@ -212,17 +216,21 @@ namespace osu.Framework.Android.Input
|
||||
break;
|
||||
|
||||
case MotionEventActions.ButtonPress:
|
||||
handleMouseDown(capturedPointerEvent.ActionButton.ToMouseButton());
|
||||
foreach (var button in capturedPointerEvent.ActionButton.ToMouseButtons())
|
||||
handleMouseDown(button);
|
||||
break;
|
||||
|
||||
case MotionEventActions.ButtonRelease:
|
||||
handleMouseUp(capturedPointerEvent.ActionButton.ToMouseButton());
|
||||
foreach (var button in capturedPointerEvent.ActionButton.ToMouseButtons())
|
||||
handleMouseUp(button);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private Vector2 getEventScroll(MotionEvent e) => new Vector2(e.GetAxisValue(Axis.Hscroll), e.GetAxisValue(Axis.Vscroll));
|
||||
private Vector2 getEventScroll(MotionEvent e) =>
|
||||
// Android reports horizontal scroll opposite of what framework expects.
|
||||
new Vector2(-e.GetAxisValue(Axis.Hscroll), e.GetAxisValue(Axis.Vscroll));
|
||||
|
||||
private void handleMouseMoveEvent(MotionEvent evt)
|
||||
{
|
||||
|
||||
@@ -1,22 +1,18 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using Android.Content;
|
||||
using Android.Views;
|
||||
using Android.Views.InputMethods;
|
||||
using osu.Framework.Input;
|
||||
|
||||
namespace osu.Framework.Android.Input
|
||||
{
|
||||
public class AndroidTextInput : TextInputSource
|
||||
internal class AndroidTextInput : TextInputSource
|
||||
{
|
||||
private readonly AndroidGameView view;
|
||||
private readonly InputMethodManager inputMethodManager;
|
||||
|
||||
public AndroidTextInput(AndroidGameView view)
|
||||
{
|
||||
this.view = view;
|
||||
inputMethodManager = view.Activity.GetSystemService(Context.InputMethodService) as InputMethodManager;
|
||||
}
|
||||
|
||||
private void commitText(string text)
|
||||
@@ -34,33 +30,19 @@ namespace osu.Framework.Android.Input
|
||||
{
|
||||
view.KeyDown += keyDown;
|
||||
view.CommitText += commitText;
|
||||
|
||||
view.Activity.RunOnUiThread(() =>
|
||||
{
|
||||
view.RequestFocus();
|
||||
inputMethodManager?.ShowSoftInput(view, 0);
|
||||
});
|
||||
view.StartTextInput();
|
||||
}
|
||||
|
||||
protected override void EnsureTextInputActivated(bool allowIme)
|
||||
{
|
||||
view.Activity.RunOnUiThread(() =>
|
||||
{
|
||||
view.RequestFocus();
|
||||
inputMethodManager?.ShowSoftInput(view, 0);
|
||||
});
|
||||
view.StartTextInput();
|
||||
}
|
||||
|
||||
protected override void DeactivateTextInput()
|
||||
{
|
||||
view.KeyDown -= keyDown;
|
||||
view.CommitText -= commitText;
|
||||
|
||||
view.Activity.RunOnUiThread(() =>
|
||||
{
|
||||
inputMethodManager?.HideSoftInputFromWindow(view.WindowToken, HideSoftInputFlags.None);
|
||||
view.ClearFocus();
|
||||
});
|
||||
view.StopTextInput();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,15 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Android.Views;
|
||||
using osu.Framework.Input;
|
||||
using osu.Framework.Input.StateChanges;
|
||||
using osu.Framework.Input.States;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Platform;
|
||||
using osuTK;
|
||||
using osuTK.Input;
|
||||
@@ -48,41 +51,83 @@ namespace osu.Framework.Android.Input
|
||||
|
||||
protected override void OnTouch(MotionEvent touchEvent)
|
||||
{
|
||||
if (touchEvent.Action == MotionEventActions.Move)
|
||||
{
|
||||
for (int i = 0; i < Math.Min(touchEvent.PointerCount, TouchState.MAX_TOUCH_COUNT); i++)
|
||||
{
|
||||
var touch = getEventTouch(touchEvent, i);
|
||||
PendingInputs.Enqueue(new TouchInput(touch, true));
|
||||
}
|
||||
}
|
||||
else if (touchEvent.ActionIndex < TouchState.MAX_TOUCH_COUNT)
|
||||
{
|
||||
var touch = getEventTouch(touchEvent, touchEvent.ActionIndex);
|
||||
Touch touch;
|
||||
|
||||
switch (touchEvent.ActionMasked)
|
||||
{
|
||||
case MotionEventActions.Down:
|
||||
case MotionEventActions.PointerDown:
|
||||
switch (touchEvent.ActionMasked)
|
||||
{
|
||||
// MotionEventActions.Down arrives at the beginning of a touch event chain and implies the 0th pointer is pressed.
|
||||
// ActionIndex is generally not valid here.
|
||||
case MotionEventActions.Down:
|
||||
if (tryGetEventTouch(touchEvent, 0, out touch))
|
||||
PendingInputs.Enqueue(new TouchInput(touch, true));
|
||||
break;
|
||||
break;
|
||||
|
||||
case MotionEventActions.Up:
|
||||
case MotionEventActions.PointerUp:
|
||||
case MotionEventActions.Cancel:
|
||||
PendingInputs.Enqueue(new TouchInput(touch, false));
|
||||
break;
|
||||
}
|
||||
// events that apply only to the ActionIndex pointer (other pointers' states remain unchanged)
|
||||
case MotionEventActions.PointerDown:
|
||||
case MotionEventActions.PointerUp:
|
||||
if (touchEvent.ActionIndex < TouchState.MAX_TOUCH_COUNT)
|
||||
{
|
||||
if (tryGetEventTouch(touchEvent, touchEvent.ActionIndex, out touch))
|
||||
PendingInputs.Enqueue(new TouchInput(touch, touchEvent.ActionMasked == MotionEventActions.PointerDown));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
// events that apply to every pointer (up to PointerCount).
|
||||
case MotionEventActions.Move:
|
||||
case MotionEventActions.Up:
|
||||
case MotionEventActions.Cancel:
|
||||
for (int i = 0; i < Math.Min(touchEvent.PointerCount, TouchState.MAX_TOUCH_COUNT); i++)
|
||||
{
|
||||
if (tryGetEventTouch(touchEvent, i, out touch))
|
||||
PendingInputs.Enqueue(new TouchInput(touch, touchEvent.ActionMasked == MotionEventActions.Move));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
Logger.Log($"Unknown touch event action: {touchEvent.Action}, masked: {touchEvent.ActionMasked}");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnHover(MotionEvent hoverEvent)
|
||||
{
|
||||
PendingInputs.Enqueue(new MousePositionAbsoluteInput { Position = getEventPosition(hoverEvent) });
|
||||
if (tryGetEventPosition(hoverEvent, 0, out var position))
|
||||
PendingInputs.Enqueue(new MousePositionAbsoluteInput { Position = position });
|
||||
PendingInputs.Enqueue(new MouseButtonInput(MouseButton.Right, hoverEvent.IsButtonPressed(MotionEventButtonState.StylusPrimary)));
|
||||
}
|
||||
|
||||
private Touch getEventTouch(MotionEvent e, int index) => new Touch((TouchSource)e.GetPointerId(index), getEventPosition(e, index));
|
||||
private Vector2 getEventPosition(MotionEvent e, int index = 0) => new Vector2(e.GetX(index) * View.ScaleX, e.GetY(index) * View.ScaleY);
|
||||
private bool tryGetEventTouch(MotionEvent e, int index, out Touch touch)
|
||||
{
|
||||
if (tryGetEventPosition(e, index, out var position))
|
||||
{
|
||||
touch = new Touch((TouchSource)e.GetPointerId(index), position);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
touch = new Touch();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private bool tryGetEventPosition(MotionEvent e, int index, out Vector2 position)
|
||||
{
|
||||
float x = e.GetX(index);
|
||||
float y = e.GetY(index);
|
||||
|
||||
// in empirical testing, `MotionEvent.Get{X,Y}()` methods can return NaN positions early on in the android activity's lifetime.
|
||||
// these nonsensical inputs then cause issues later down the line when they are converted into framework inputs.
|
||||
// as there is really nothing to recover from such inputs, drop them entirely.
|
||||
if (float.IsNaN(x) || float.IsNaN(y))
|
||||
{
|
||||
position = Vector2.Zero;
|
||||
return false;
|
||||
}
|
||||
|
||||
position = new Vector2(x * View.ScaleX, y * View.ScaleY);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkBeginAbsoluteSequence : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
@@ -104,9 +104,9 @@ namespace osu.Framework.Benchmarks
|
||||
|
||||
private class TestGame : Game
|
||||
{
|
||||
public Container Flat;
|
||||
public Container VeryNested;
|
||||
public Container SlightlyNested;
|
||||
public Container Flat = null!;
|
||||
public Container VeryNested = null!;
|
||||
public Container SlightlyNested = null!;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
using System;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.ObjectExtensions;
|
||||
|
||||
namespace osu.Framework.Benchmarks
|
||||
{
|
||||
@@ -19,14 +20,14 @@ namespace osu.Framework.Benchmarks
|
||||
[Benchmark(Baseline = true)]
|
||||
public Bindable<int> GetBoundCopyOld() => new BindableOld<int>().GetBoundCopy();
|
||||
|
||||
private class BindableOld<T> : Bindable<T>
|
||||
private class BindableOld<T> : Bindable<T> where T : notnull
|
||||
{
|
||||
public BindableOld(T defaultValue = default)
|
||||
public BindableOld(T defaultValue = default!)
|
||||
: base(defaultValue)
|
||||
{
|
||||
}
|
||||
|
||||
protected override Bindable<T> CreateInstance() => (BindableOld<T>)Activator.CreateInstance(GetType(), Value);
|
||||
protected override Bindable<T> CreateInstance() => (BindableOld<T>)Activator.CreateInstance(GetType(), Value).AsNonNull();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkCompositeDrawableAllocations : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
@@ -63,7 +63,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
base.Update();
|
||||
|
||||
Drawable drawable = null;
|
||||
Drawable? drawable = null;
|
||||
|
||||
switch (Mode)
|
||||
{
|
||||
|
||||
@@ -18,9 +18,9 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkDependencyContainer : GameBenchmark
|
||||
{
|
||||
private Game game;
|
||||
private TestBdlReceiver bdlReceiver;
|
||||
private TestCachedReceiver cachedReceiver;
|
||||
private Game game = null!;
|
||||
private TestBdlReceiver bdlReceiver = null!;
|
||||
private TestCachedReceiver cachedReceiver = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
@@ -63,13 +63,13 @@ namespace osu.Framework.Benchmarks
|
||||
private class TestCachedReceiver : Drawable
|
||||
{
|
||||
[Resolved]
|
||||
private GameHost host { get; set; }
|
||||
private GameHost host { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private FrameworkConfigManager frameworkConfigManager { get; set; }
|
||||
private FrameworkConfigManager frameworkConfigManager { get; set; } = null!;
|
||||
|
||||
[Resolved]
|
||||
private FrameworkDebugConfigManager frameworkDebugConfigManager { get; set; }
|
||||
private FrameworkDebugConfigManager frameworkDebugConfigManager { get; set; } = null!;
|
||||
}
|
||||
|
||||
private class TestGame : Game
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace osu.Framework.Benchmarks
|
||||
|
||||
public bool TransferBetween { get; set; }
|
||||
|
||||
private AudioContainer lastContainer;
|
||||
private AudioContainer? lastContainer;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkDrawableLoad : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
private const int nesting_level = 100;
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkFillFlowContainerAllocations : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Benchmark]
|
||||
public void MultipleComputeLayoutPositions()
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkFontLoading : BenchmarkTest
|
||||
{
|
||||
private NamespacedResourceStore<byte[]> baseResources;
|
||||
private TemporaryNativeStorage sharedTemp;
|
||||
private NamespacedResourceStore<byte[]> baseResources = null!;
|
||||
private TemporaryNativeStorage sharedTemp = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
@@ -30,7 +30,7 @@ namespace osu.Framework.Benchmarks
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
sharedTemp?.Dispose();
|
||||
sharedTemp.Dispose();
|
||||
}
|
||||
|
||||
[Params(1, 10, 100, 1000, 10000)]
|
||||
@@ -91,7 +91,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
foreach (var p in props)
|
||||
{
|
||||
object propValue = p.GetValue(null);
|
||||
object? propValue = p.GetValue(null);
|
||||
Debug.Assert(propValue != null);
|
||||
|
||||
var icon = (IconUsage)propValue;
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace osu.Framework.Benchmarks
|
||||
public class BenchmarkHashing
|
||||
{
|
||||
private const string test_string = @"A string with reasonable length";
|
||||
private MemoryStream memoryStream;
|
||||
private MemoryStream memoryStream = null!;
|
||||
|
||||
[Benchmark]
|
||||
public string StringMD5() => test_string.ComputeMD5Hash();
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkLocalisableDescription
|
||||
{
|
||||
private LocalisableString[] descriptions;
|
||||
private LocalisableString[] descriptions = null!;
|
||||
|
||||
[Params(1, 10, 100, 1000)]
|
||||
public int Times { get; set; }
|
||||
|
||||
@@ -10,8 +10,8 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkLocalisableString
|
||||
{
|
||||
private string string1;
|
||||
private string string2;
|
||||
private string string1 = null!;
|
||||
private string string2 = null!;
|
||||
private LocalisableString localisableString1;
|
||||
private LocalisableString localisableString2;
|
||||
private LocalisableString romanisableString1;
|
||||
|
||||
@@ -12,13 +12,13 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkLocalisedBindableString
|
||||
{
|
||||
private LocalisationManager manager;
|
||||
private TemporaryNativeStorage storage;
|
||||
private LocalisationManager manager = null!;
|
||||
private TemporaryNativeStorage storage = null!;
|
||||
|
||||
[GlobalSetup]
|
||||
public void GlobalSetup()
|
||||
{
|
||||
storage = new TemporaryNativeStorage(new Guid().ToString());
|
||||
storage = new TemporaryNativeStorage(Guid.NewGuid().ToString());
|
||||
manager = new LocalisationManager(new FrameworkConfigManager(storage));
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkManySpinningBoxes : GameBenchmark
|
||||
{
|
||||
private TestGame game;
|
||||
private TestGame game = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
@@ -47,7 +47,7 @@ namespace osu.Framework.Benchmarks
|
||||
|
||||
private class TestGame : Game
|
||||
{
|
||||
public Container MainContent;
|
||||
public Container MainContent = null!;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
|
||||
60
osu.Framework.Benchmarks/BenchmarkScheduler.cs
Normal file
60
osu.Framework.Benchmarks/BenchmarkScheduler.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using BenchmarkDotNet.Attributes;
|
||||
using osu.Framework.Threading;
|
||||
|
||||
namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkScheduler : BenchmarkTest
|
||||
{
|
||||
private Scheduler scheduler = null!;
|
||||
private Scheduler schedulerWithEveryUpdate = null!;
|
||||
private Scheduler schedulerWithManyDelayed = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
base.SetUp();
|
||||
|
||||
scheduler = new Scheduler();
|
||||
|
||||
schedulerWithEveryUpdate = new Scheduler();
|
||||
schedulerWithEveryUpdate.AddDelayed(() => { }, 0, true);
|
||||
|
||||
schedulerWithManyDelayed = new Scheduler();
|
||||
for (int i = 0; i < 1000; i++)
|
||||
schedulerWithManyDelayed.AddDelayed(() => { }, int.MaxValue);
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateEmptyScheduler()
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
scheduler.Update();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateSchedulerWithManyDelayed()
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
schedulerWithManyDelayed.Update();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateSchedulerWithEveryUpdate()
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
schedulerWithEveryUpdate.Update();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateSchedulerWithManyAdded()
|
||||
{
|
||||
for (int i = 0; i < 1000; i++)
|
||||
{
|
||||
scheduler.Add(() => { });
|
||||
scheduler.Update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkScreenExtensions : GameBenchmark
|
||||
{
|
||||
private Screen testScreen;
|
||||
private Screen testScreen = null!;
|
||||
|
||||
[Test]
|
||||
[Benchmark]
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public class BenchmarkStreamExtensions
|
||||
{
|
||||
private MemoryStream memoryStream;
|
||||
private MemoryStream memoryStream = null!;
|
||||
|
||||
[Params(100, 10000, 1000000)]
|
||||
public int Length { get; set; }
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTabletDriver : BenchmarkTest
|
||||
{
|
||||
private TabletDriver driver;
|
||||
private TabletDriver driver = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
private readonly ITexturedGlyphLookupStore store = new TestStore();
|
||||
|
||||
private TextBuilder textBuilder;
|
||||
private TextBuilder textBuilder = null!;
|
||||
|
||||
[Benchmark]
|
||||
public void AddCharacters() => initialiseBuilder(false);
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTransform : BenchmarkTest
|
||||
{
|
||||
private Drawable target;
|
||||
private Drawable target = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -11,7 +11,8 @@ namespace osu.Framework.Benchmarks
|
||||
{
|
||||
public class BenchmarkTransformUpdate : BenchmarkTest
|
||||
{
|
||||
private TestBox target;
|
||||
private TestBox target = null!;
|
||||
private TestBox targetNoTransforms = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
@@ -21,7 +22,8 @@ namespace osu.Framework.Benchmarks
|
||||
|
||||
ManualClock clock;
|
||||
|
||||
target = new TestBox { Clock = new FramedClock(clock = new ManualClock()) };
|
||||
targetNoTransforms = new TestBox { Clock = new FramedClock(clock = new ManualClock()) };
|
||||
target = new TestBox { Clock = new FramedClock(clock) };
|
||||
|
||||
// transform one target member over a long period
|
||||
target.RotateTo(360, transforms_count * 2);
|
||||
@@ -34,6 +36,13 @@ namespace osu.Framework.Benchmarks
|
||||
target.Clock.ProcessFrame();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateTransformsWithNonePresent()
|
||||
{
|
||||
for (int i = 0; i < 10000; i++)
|
||||
targetNoTransforms.UpdateTransforms();
|
||||
}
|
||||
|
||||
[Benchmark]
|
||||
public void UpdateTransformsWithManyPresent()
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace osu.Framework.Benchmarks
|
||||
public int ItemCount { get; set; }
|
||||
|
||||
private readonly object[] objects = new object[1000];
|
||||
private WeakList<object> weakList;
|
||||
private WeakList<object> weakList = null!;
|
||||
|
||||
public override void SetUp()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BenchmarkDotNet.Attributes;
|
||||
@@ -14,9 +15,9 @@ namespace osu.Framework.Benchmarks
|
||||
[MemoryDiagnoser]
|
||||
public abstract class GameBenchmark
|
||||
{
|
||||
private ManualGameHost gameHost;
|
||||
private ManualGameHost gameHost = null!;
|
||||
|
||||
protected Game Game { get; private set; }
|
||||
protected Game Game { get; private set; } = null!;
|
||||
|
||||
[GlobalSetup]
|
||||
[OneTimeSetUp]
|
||||
@@ -29,8 +30,8 @@ namespace osu.Framework.Benchmarks
|
||||
[OneTimeTearDown]
|
||||
public virtual void TearDown()
|
||||
{
|
||||
gameHost?.Exit();
|
||||
gameHost?.Dispose();
|
||||
gameHost.Exit();
|
||||
gameHost.Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -109,7 +110,9 @@ namespace osu.Framework.Benchmarks
|
||||
|
||||
public override void RunMainLoop()
|
||||
{
|
||||
RunOnce.Wait();
|
||||
if (!RunOnce.Wait(10000))
|
||||
throw new TimeoutException("Run request didn't arrive for a long time");
|
||||
|
||||
RunSingleFrame();
|
||||
RunOnce.Reset();
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,17 +12,32 @@ FFMPEG_FLAGS=(
|
||||
--disable-avdevice
|
||||
--disable-swresample
|
||||
--disable-librtmp
|
||||
--disable-alsa
|
||||
--disable-iconv
|
||||
--disable-libxcb
|
||||
--disable-libxcb-shm
|
||||
--disable-libxcb-xfixes
|
||||
--disable-libxcb-shape
|
||||
--disable-sdl2
|
||||
--disable-zlib
|
||||
--disable-bzlib
|
||||
--disable-lzma
|
||||
--disable-xlib
|
||||
--disable-schannel
|
||||
--enable-shared
|
||||
)
|
||||
|
||||
function build_ffmpeg() {
|
||||
echo "-> Downloading source..."
|
||||
|
||||
curl https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.gz | tar zxf -
|
||||
cd ffmpeg-$FFMPEG_VERSION
|
||||
if [ ! -d "ffmpeg-$FFMPEG_VERSION" ]; then
|
||||
echo "-> Downloading source..."
|
||||
curl https://ffmpeg.org/releases/ffmpeg-$FFMPEG_VERSION.tar.gz | tar zxf -
|
||||
else
|
||||
echo "-> ffmpeg-$FFMPEG_VERSION already exists, not re-downloading."
|
||||
fi
|
||||
|
||||
echo "-> Configuring..."
|
||||
|
||||
cd ffmpeg-$FFMPEG_VERSION
|
||||
./configure "${FFMPEG_FLAGS[@]}"
|
||||
|
||||
CORES=0
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace TemplateGame.Desktop
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
using (GameHost host = Host.GetSuitableHost(@"TemplateGame"))
|
||||
using (GameHost host = Host.GetSuitableDesktopHost(@"TemplateGame"))
|
||||
using (osu.Framework.Game game = new TemplateGameGame())
|
||||
host.Run(game);
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace TemplateGame.Game.Tests
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
using (GameHost host = Host.GetSuitableHost("visual-tests"))
|
||||
using (GameHost host = Host.GetSuitableDesktopHost("visual-tests"))
|
||||
using (var game = new TemplateGameTestBrowser())
|
||||
host.Run(game);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Screens;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace TemplateGame.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestSceneMainScreen : TemplateGameTestScene
|
||||
{
|
||||
// Add visual tests to ensure correct behaviour of your game: https://github.com/ppy/osu-framework/wiki/Development-and-Testing
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using osu.Framework.Graphics;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace TemplateGame.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestSceneSpinningBox : TemplateGameTestScene
|
||||
{
|
||||
// Add visual tests to ensure correct behaviour of your game: https://github.com/ppy/osu-framework/wiki/Development-and-Testing
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Platform;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace TemplateGame.Game.Tests.Visual
|
||||
{
|
||||
[TestFixture]
|
||||
public class TestSceneTemplateGameGame : TemplateGameTestScene
|
||||
{
|
||||
// Add visual tests to ensure correct behaviour of your game: https://github.com/ppy/osu-framework/wiki/Development-and-Testing
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
<ProjectReference Include="..\TemplateGame.Resources\TemplateGame.Resources.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1029.0" />
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework\osu.Framework.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.iOS;
|
||||
using UIKit;
|
||||
|
||||
namespace TemplateGame.iOS
|
||||
|
||||
@@ -44,5 +44,9 @@
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<RootNamespace>TemplateGame.iOS</RootNamespace>
|
||||
<AssemblyName>TemplateGame</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Generated via osu.Framework.iOS/generate-symbol-strip-flags.sh -->
|
||||
<GeneratedMtouchSymbolStripFlags>--nosymbolstrip=BASS_FX_BPM_BeatCallbackReset --nosymbolstrip=BASS_FX_BPM_BeatCallbackSet --nosymbolstrip=BASS_FX_BPM_BeatDecodeGet --nosymbolstrip=BASS_FX_BPM_BeatFree --nosymbolstrip=BASS_FX_BPM_BeatGetParameters --nosymbolstrip=BASS_FX_BPM_BeatSetParameters --nosymbolstrip=BASS_FX_BPM_CallbackReset --nosymbolstrip=BASS_FX_BPM_CallbackSet --nosymbolstrip=BASS_FX_BPM_DecodeGet --nosymbolstrip=BASS_FX_BPM_Free --nosymbolstrip=BASS_FX_BPM_Translate --nosymbolstrip=BASS_FX_GetVersion --nosymbolstrip=BASS_FX_ReverseCreate --nosymbolstrip=BASS_FX_ReverseGetSource --nosymbolstrip=BASS_FX_TempoCreate --nosymbolstrip=BASS_FX_TempoGetRateRatio --nosymbolstrip=BASS_FX_TempoGetSource --nosymbolstrip=BASS_Mixer_ChannelFlags --nosymbolstrip=BASS_Mixer_ChannelGetData --nosymbolstrip=BASS_Mixer_ChannelGetEnvelopePos --nosymbolstrip=BASS_Mixer_ChannelGetLevel --nosymbolstrip=BASS_Mixer_ChannelGetLevelEx --nosymbolstrip=BASS_Mixer_ChannelGetMatrix --nosymbolstrip=BASS_Mixer_ChannelGetMixer --nosymbolstrip=BASS_Mixer_ChannelGetPosition --nosymbolstrip=BASS_Mixer_ChannelGetPositionEx --nosymbolstrip=BASS_Mixer_ChannelIsActive --nosymbolstrip=BASS_Mixer_ChannelRemove --nosymbolstrip=BASS_Mixer_ChannelRemoveSync --nosymbolstrip=BASS_Mixer_ChannelSetEnvelope --nosymbolstrip=BASS_Mixer_ChannelSetEnvelopePos --nosymbolstrip=BASS_Mixer_ChannelSetMatrix --nosymbolstrip=BASS_Mixer_ChannelSetMatrixEx --nosymbolstrip=BASS_Mixer_ChannelSetPosition --nosymbolstrip=BASS_Mixer_ChannelSetSync --nosymbolstrip=BASS_Mixer_GetVersion --nosymbolstrip=BASS_Mixer_StreamAddChannel --nosymbolstrip=BASS_Mixer_StreamAddChannelEx --nosymbolstrip=BASS_Mixer_StreamCreate --nosymbolstrip=BASS_Mixer_StreamGetChannels --nosymbolstrip=BASS_Split_StreamCreate --nosymbolstrip=BASS_Split_StreamGetAvailable --nosymbolstrip=BASS_Split_StreamGetSource --nosymbolstrip=BASS_Split_StreamGetSplits --nosymbolstrip=BASS_Split_StreamReset --nosymbolstrip=BASS_Split_StreamResetEx</GeneratedMtouchSymbolStripFlags>
|
||||
<!-- Disable mono-cil-strip (nostrip) to avoid random attributes potentially stripped out from certain members. -->
|
||||
<MtouchExtraArgs>--nolinkaway --nostrip $(GeneratedMtouchSymbolStripFlags)</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<DebugType>full</DebugType>
|
||||
@@ -54,7 +60,6 @@
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -80,7 +85,6 @@
|
||||
<CrashReportingApiKey>
|
||||
</CrashReportingApiKey>
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -98,7 +102,6 @@
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
@@ -106,7 +109,6 @@
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<InterfaceDefinition Include="LaunchScreen.storyboard" />
|
||||
@@ -128,18 +130,6 @@
|
||||
<Project>{6E3EBF71-8664-49D7-BD0D-2B21B3EEC540}</Project>
|
||||
<Name>TemplateGame.Resources</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<NativeReference Include="$(OutputPath)\libbass.a;$(OutputPath)\libbass_fx.a">
|
||||
<Kind>Static</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
</NativeReference>
|
||||
<NativeReference Include="$(OutputPath)\libavcodec.a;$(OutputPath)\libavdevice.a;$(OutputPath)\libavfilter.a;$(OutputPath)\libavformat.a;$(OutputPath)\libavutil.a;$(OutputPath)\libswresample.a;$(OutputPath)\libswscale.a">
|
||||
<Kind>Static</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
</NativeReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@@ -150,11 +140,11 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.428.0" />
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework\osu.Framework.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework.iOS\osu.Framework.iOS.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Transitive Dependencies">
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2022.428.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2022.429.0" ExcludeAssets="all" />
|
||||
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2022.525.0" ExcludeAssets="all" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
||||
|
||||
@@ -34,6 +34,7 @@ Global
|
||||
{AEB3FC89-DC3E-4BC9-9EC7-03B72FC5D849}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AEB3FC89-DC3E-4BC9-9EC7-03B72FC5D849}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AEB3FC89-DC3E-4BC9-9EC7-03B72FC5D849}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Debug|Any CPU.ActiveCfg = Debug|iPhoneSimulator
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Debug|iPhone.ActiveCfg = Debug|iPhone
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Debug|iPhone.Build.0 = Debug|iPhone
|
||||
{7AA1DB5D-78DB-4693-AE50-D6078F5A0CAB}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace FlappyDon.Desktop
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
using (GameHost host = Host.GetSuitableHost(@"FlappyDon"))
|
||||
using (GameHost host = Host.GetSuitableDesktopHost(@"FlappyDon"))
|
||||
using (osu.Framework.Game game = new FlappyDonGame())
|
||||
{
|
||||
host.Run(game);
|
||||
|
||||
@@ -8,7 +8,7 @@ namespace FlappyDon.Game.Tests
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
using (GameHost host = Host.GetSuitableHost("visual-tests"))
|
||||
using (GameHost host = Host.GetSuitableDesktopHost("visual-tests"))
|
||||
using (var game = new FlappyDonTestBrowser())
|
||||
host.Run(game);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using FlappyDon.Game.Elements;
|
||||
using osu.Framework.Allocation;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace FlappyDon.Game.Tests.Visual
|
||||
{
|
||||
@@ -7,6 +8,7 @@ namespace FlappyDon.Game.Tests.Visual
|
||||
/// A test scene for testing the alignment
|
||||
/// and placement of the sprites that make up the backdrop
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class TestSceneBackdrop : FlappyDonTestScene
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Platform;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace FlappyDon.Game.Tests.Visual
|
||||
{
|
||||
@@ -7,6 +8,7 @@ namespace FlappyDon.Game.Tests.Visual
|
||||
/// A test scene wrapping the entire game,
|
||||
/// including audio.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class TestSceneFlappyDonGame : FlappyDonTestScene
|
||||
{
|
||||
private FlappyDonGame game;
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using FlappyDon.Game.Elements;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace FlappyDon.Game.Tests.Visual
|
||||
{
|
||||
/// <summary>
|
||||
/// A scene to test the layout and positioning and rotation of two pipe sprites.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class TestSceneObstacles : FlappyDonTestScene
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
using FlappyDon.Game.Elements;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace FlappyDon.Game.Tests.Visual
|
||||
{
|
||||
/// <summary>
|
||||
/// A scene to test the layout and positioning and rotation of two pipe sprites.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class TestScenePipeObstacle : FlappyDonTestScene
|
||||
{
|
||||
[BackgroundDependencyLoader]
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2021.1029.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\FlappyDon.Resources\FlappyDon.Resources.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework\osu.Framework.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@@ -2,8 +2,6 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.IO.Stores;
|
||||
using osu.Framework.Platform;
|
||||
using osuTK.Graphics.ES30;
|
||||
|
||||
namespace FlappyDon.Game
|
||||
{
|
||||
@@ -12,23 +10,16 @@ namespace FlappyDon.Game
|
||||
/// </summary>
|
||||
public abstract class FlappyDonGameBase : osu.Framework.Game
|
||||
{
|
||||
private TextureStore textures;
|
||||
|
||||
private DependencyContainer dependencies;
|
||||
protected override TextureFilteringMode DefaultTextureFilteringMode
|
||||
// To preserve the 8-bit aesthetic, disable texture filtering
|
||||
// so they won't become blurry when upscaled
|
||||
=> TextureFilteringMode.Nearest;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(GameHost host)
|
||||
private void load()
|
||||
{
|
||||
// Load the assets from our Resources project
|
||||
Resources.AddStore(new DllResourceStore(FlappyDonResources.ResourceAssembly));
|
||||
|
||||
// To preserve the 8-bit aesthetic, disable texture filtering
|
||||
// so they won't become blurry when upscaled
|
||||
textures = new TextureStore(Textures, filteringMode: All.Nearest);
|
||||
dependencies.Cache(textures);
|
||||
}
|
||||
|
||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||
=> dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,12 @@
|
||||
<RootNamespace>FlappyDon.iOS</RootNamespace>
|
||||
<AssemblyName>FlappyDon</AssemblyName>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<!-- Generated via osu.Framework.iOS/generate-symbol-strip-flags.sh -->
|
||||
<GeneratedMtouchSymbolStripFlags>--nosymbolstrip=BASS_FX_BPM_BeatCallbackReset --nosymbolstrip=BASS_FX_BPM_BeatCallbackSet --nosymbolstrip=BASS_FX_BPM_BeatDecodeGet --nosymbolstrip=BASS_FX_BPM_BeatFree --nosymbolstrip=BASS_FX_BPM_BeatGetParameters --nosymbolstrip=BASS_FX_BPM_BeatSetParameters --nosymbolstrip=BASS_FX_BPM_CallbackReset --nosymbolstrip=BASS_FX_BPM_CallbackSet --nosymbolstrip=BASS_FX_BPM_DecodeGet --nosymbolstrip=BASS_FX_BPM_Free --nosymbolstrip=BASS_FX_BPM_Translate --nosymbolstrip=BASS_FX_GetVersion --nosymbolstrip=BASS_FX_ReverseCreate --nosymbolstrip=BASS_FX_ReverseGetSource --nosymbolstrip=BASS_FX_TempoCreate --nosymbolstrip=BASS_FX_TempoGetRateRatio --nosymbolstrip=BASS_FX_TempoGetSource --nosymbolstrip=BASS_Mixer_ChannelFlags --nosymbolstrip=BASS_Mixer_ChannelGetData --nosymbolstrip=BASS_Mixer_ChannelGetEnvelopePos --nosymbolstrip=BASS_Mixer_ChannelGetLevel --nosymbolstrip=BASS_Mixer_ChannelGetLevelEx --nosymbolstrip=BASS_Mixer_ChannelGetMatrix --nosymbolstrip=BASS_Mixer_ChannelGetMixer --nosymbolstrip=BASS_Mixer_ChannelGetPosition --nosymbolstrip=BASS_Mixer_ChannelGetPositionEx --nosymbolstrip=BASS_Mixer_ChannelIsActive --nosymbolstrip=BASS_Mixer_ChannelRemove --nosymbolstrip=BASS_Mixer_ChannelRemoveSync --nosymbolstrip=BASS_Mixer_ChannelSetEnvelope --nosymbolstrip=BASS_Mixer_ChannelSetEnvelopePos --nosymbolstrip=BASS_Mixer_ChannelSetMatrix --nosymbolstrip=BASS_Mixer_ChannelSetMatrixEx --nosymbolstrip=BASS_Mixer_ChannelSetPosition --nosymbolstrip=BASS_Mixer_ChannelSetSync --nosymbolstrip=BASS_Mixer_GetVersion --nosymbolstrip=BASS_Mixer_StreamAddChannel --nosymbolstrip=BASS_Mixer_StreamAddChannelEx --nosymbolstrip=BASS_Mixer_StreamCreate --nosymbolstrip=BASS_Mixer_StreamGetChannels --nosymbolstrip=BASS_Split_StreamCreate --nosymbolstrip=BASS_Split_StreamGetAvailable --nosymbolstrip=BASS_Split_StreamGetSource --nosymbolstrip=BASS_Split_StreamGetSplits --nosymbolstrip=BASS_Split_StreamReset --nosymbolstrip=BASS_Split_StreamResetEx</GeneratedMtouchSymbolStripFlags>
|
||||
<!-- Disable mono-cil-strip (nostrip) to avoid random attributes potentially stripped out from certain members. -->
|
||||
<MtouchExtraArgs>--nolinkaway --nostrip $(GeneratedMtouchSymbolStripFlags)</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' ">
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<DebugType>full</DebugType>
|
||||
@@ -62,7 +68,6 @@
|
||||
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
|
||||
<MtouchEnableSGenConc>true</MtouchEnableSGenConc>
|
||||
<MtouchLink>None</MtouchLink>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
@@ -91,7 +96,6 @@
|
||||
<CrashReportingApiKey>
|
||||
</CrashReportingApiKey>
|
||||
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
@@ -107,14 +111,12 @@
|
||||
<MtouchLink>SdkOnly</MtouchLink>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<CodesignKey>iPhone Developer</CodesignKey>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
<MtouchArch>x86_64</MtouchArch>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<CodesignKey>iPhone Distribution</CodesignKey>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<MtouchExtraArgs>--nolinkaway -gcc_flags "-lstdc++ -lbz2 -framework AudioToolbox -framework AVFoundation -framework CoreMedia -framework VideoToolbox -framework SystemConfiguration -framework CFNetwork -framework Accelerate"</MtouchExtraArgs>
|
||||
<OutputPath>bin\iPhone\Release</OutputPath>
|
||||
<MtouchArch>ARM64</MtouchArch>
|
||||
</PropertyGroup>
|
||||
@@ -139,19 +141,9 @@
|
||||
<ImageAsset Include="Assets.xcassets\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<NativeReference Include="$(OutputPath)\libbass.a;$(OutputPath)\libbass_fx.a">
|
||||
<Kind>Static</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
</NativeReference>
|
||||
<NativeReference Include="$(OutputPath)\libavcodec.a;$(OutputPath)\libavdevice.a;$(OutputPath)\libavfilter.a;$(OutputPath)\libavformat.a;$(OutputPath)\libavutil.a;$(OutputPath)\libswresample.a;$(OutputPath)\libswscale.a">
|
||||
<Kind>Static</Kind>
|
||||
<SmartLink>False</SmartLink>
|
||||
<ForceLoad>True</ForceLoad>
|
||||
</NativeReference>
|
||||
<ImageAsset Include="Assets.xcassets\AppIcon.appiconset\Contents.json">
|
||||
<Visible>false</Visible>
|
||||
</ImageAsset>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@@ -162,11 +154,11 @@
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Package References">
|
||||
<PackageReference Include="ppy.osu.Framework.iOS" Version="2022.428.0" />
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework\osu.Framework.csproj" />
|
||||
<ProjectReference Include="..\..\..\..\osu.Framework.iOS\osu.Framework.iOS.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Label="Transitive Dependencies">
|
||||
<PackageReference Include="ppy.osu.Framework" Version="2022.428.0" />
|
||||
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2022.429.0" ExcludeAssets="all" />
|
||||
<PackageReference Include="ppy.osu.Framework.NativeLibs" Version="2022.525.0" ExcludeAssets="all" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
|
||||
</Project>
|
||||
</Project>
|
||||
@@ -44,5 +44,9 @@
|
||||
</array>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>11.0</string>
|
||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||
<true/>
|
||||
<key>CADisableMinimumFrameDurationOnPhone</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user