2
0
mirror of https://github.com/raylib-cs/raylib-cs synced 2025-04-05 11:19:39 -04:00
raylib-cs/Raylib-cs.Android/RaylibActivity.cs
Angga Permana c5560664ed
Fix unable to run Raylib-cs.Android on debug mode (#193)
* Call `RaylibSetAndroidCallback` before `OnCreate`
* CI: pack `Raylib-cs.Android` package
2023-08-27 08:12:46 +01:00

18 lines
480 B
C#

using System.Runtime.InteropServices;
namespace Raylib_cs;
public abstract class RaylibActivity : NativeActivity
{
protected override void OnCreate(Bundle? savedInstanceState)
{
RaylibSetAndroidCallback(OnReady);
base.OnCreate(savedInstanceState);
}
protected abstract void OnReady();
[DllImport(Raylib.NativeLibName, CallingConvention = CallingConvention.Cdecl)]
private static extern void RaylibSetAndroidCallback(Action callback);
}