Skip to content

Commit

Permalink
Add some crap
Browse files Browse the repository at this point in the history
  • Loading branch information
dd01da0465b4542f8f8af4ecedc149ed committed Jan 11, 2021
1 parent 2703f91 commit 2a4084c
Show file tree
Hide file tree
Showing 43 changed files with 1,419 additions and 1,404 deletions.
6 changes: 3 additions & 3 deletions osu!stream/AssetManager/NativeAssetManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ public NativeAssetManager()

internal virtual bool FileExists(string filename)
{
return File.Exists(filename);
return File.Exists("/sdcard/" + filename);
}

internal virtual Stream GetFileStream(string filename)
{
return File.OpenRead(filename);
return File.OpenRead("/sdcard/" + filename);
}

internal virtual byte[] GetFileBytes(string filename)
{
return File.ReadAllBytes(filename);
return File.ReadAllBytes("/sdcard/" + filename);
}
}
}
Binary file added osu!stream/Bass.Net.Android.dll
Binary file not shown.
7 changes: 7 additions & 0 deletions osu!stream/Graphics/pTexture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,13 @@ public static pTexture FromStream(Stream stream, string assetname, bool saveToFi
pTexture pt;
#if iOS
pt = FromUIImage(UIImage.LoadFromData(NSData.FromStream(stream)),assetname);
#elif ANDROID
using (Android.Graphics.Bitmap b = Android.Graphics.BitmapFactory.DecodeStream(stream))
{
pt = FromRawBytes(b.LockPixels(), b.Width, b.Height);
pt.assetName = assetname;
b.UnlockPixels();
}
#else
using (Bitmap b = (Bitmap)Image.FromStream(stream, false, false))
{
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added osu!stream/Libraries/Android/x86/libbass.so
Binary file not shown.
Binary file added osu!stream/Libraries/Android/x86/libbass_aac.so
Binary file not shown.
Binary file added osu!stream/Libraries/Android/x86_64/libbass.so
Binary file not shown.
Binary file not shown.
13 changes: 12 additions & 1 deletion osu!stream/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,36 @@
namespace osum
{
#if ANDROID
[Activity(Label = "@string/app_name", Theme = "@style/default", MainLauncher = true)]
[Activity(Label = "@string/app_name", Theme = "@style/AppTheme", MainLauncher = true, ScreenOrientation = ScreenOrientation.UserLandscape)]
public class Application : AppCompatActivity
#else
public class Application
#endif
{
#if ANDROID
private static Activity _this;
#endif

private static void Main(string[] args)
{
#if iOS
GameBase game = new GameBaseIphone();
game.Run();
#elif ANDROID
GameBase game = new GameBaseAndroid(_this);
game.Run();
#else
GameBase game = new GameBaseDesktop();
game.Run();
#endif
}

#if ANDROID
public Application()
{
_this = this;
}

protected override void OnCreate(Bundle savedInstanceState)
{
// Hide Status Bar, etc...
Expand Down
16 changes: 7 additions & 9 deletions osu!stream/Properties/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:versionCode="1"
android:versionName="1.0"
package="com.companyname.osu_stream_android">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme">
</application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="sh.ppy.osustream" android:installLocation="auto">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="28" />
<application android:allowBackup="true" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme" android:icon="@drawable/icon"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
</manifest>
6 changes: 3 additions & 3 deletions osu!stream/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("osu_stream_android")]
[assembly: AssemblyTitle("osu!stream")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("osu_stream_android")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyProduct("osu!stream")]
[assembly: AssemblyCopyright("Copyright © peppy 2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
Expand Down
44 changes: 0 additions & 44 deletions osu!stream/Resources/AboutResources.txt

This file was deleted.

Loading

0 comments on commit 2a4084c

Please sign in to comment.