mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2024-11-15 17:45:26 +00:00
35e5612766
* Implement Player Select applet * Initialize the Horizon system reference * Tidy up namespaces * Resolve nits * Resolve nits * Rename stack to queue * Implement an applet FIFO * Remove debugging log * Log applet creation events * Reorganise AppletFifo * More reorganisation * Final changes
30 lines
814 B
C#
30 lines
814 B
C#
using Ryujinx.HLE.HOS.Services.Am.AppletAE;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
|
|
namespace Ryujinx.HLE.HOS.Applets
|
|
{
|
|
static class AppletManager
|
|
{
|
|
private static Dictionary<AppletId, Type> _appletMapping;
|
|
|
|
static AppletManager()
|
|
{
|
|
_appletMapping = new Dictionary<AppletId, Type>
|
|
{
|
|
{ AppletId.PlayerSelect, typeof(PlayerSelectApplet) }
|
|
};
|
|
}
|
|
|
|
public static IApplet Create(AppletId applet, Horizon system)
|
|
{
|
|
if (_appletMapping.TryGetValue(applet, out Type appletClass))
|
|
{
|
|
return (IApplet)Activator.CreateInstance(appletClass, system);
|
|
}
|
|
|
|
throw new NotImplementedException($"{applet} applet is not implemented.");
|
|
}
|
|
}
|
|
}
|