WindowController, AudioController

This commit is contained in:
Isaac Marovitz 2023-10-21 10:30:03 -04:00
parent 836a8d725a
commit ad8eef7d92
No known key found for this signature in database
GPG key ID: 97250B2B09A132E1
12 changed files with 176 additions and 24 deletions

View file

@ -0,0 +1,49 @@
using Ryujinx.Horizon.Common;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.Sdk.Sf;
namespace Ryujinx.Horizon.Am.Ipc.Controllers
{
partial class AudioController : IAudioController
{
private float _mainAppletVolume;
private float _libraryAppletVolume;
[CmifCommand(0)]
public Result SetExpectedMasterVolume(float mainAppletVolume, float libraryAppletVolume)
{
_mainAppletVolume = mainAppletVolume;
_libraryAppletVolume = libraryAppletVolume;
return Result.Success;
}
[CmifCommand(1)]
public Result GetMainAppletExpectedMasterVolume(out float mainAppletVolume)
{
mainAppletVolume = _mainAppletVolume;
return Result.Success;
}
[CmifCommand(2)]
public Result GetLibraryAppletExpectedMasterVolume(out float libraryAppletVolume)
{
libraryAppletVolume = _libraryAppletVolume;
return Result.Success;
}
[CmifCommand(3)]
public Result ChangeMainAppletMasterVolume(float volume, ulong value)
{
return Result.Success;
}
[CmifCommand(4)]
public Result SetTransparentVolumeRate(float volume)
{
return Result.Success;
}
}
}

View file

@ -0,0 +1,57 @@
using Ryujinx.Horizon.Common;
using Ryujinx.Horizon.Sdk.Am;
using Ryujinx.Horizon.Sdk.Sf;
namespace Ryujinx.Horizon.Am.Ipc.Controllers
{
partial class WindowController : IWindowController
{
[CmifCommand(0)]
public Result CreateWindow()
{
throw new System.NotImplementedException();
}
[CmifCommand(1)]
public Result GetAppletResourceUserId()
{
throw new System.NotImplementedException();
}
[CmifCommand(2)]
public Result GetAppletResourceUserIdOfCallerApplet()
{
throw new System.NotImplementedException();
}
[CmifCommand(10)]
public Result AcquireForegroundRights()
{
throw new System.NotImplementedException();
}
[CmifCommand(11)]
public Result ReleaseForegroundRights()
{
throw new System.NotImplementedException();
}
[CmifCommand(12)]
public Result RejectToChangeIntoBackground()
{
throw new System.NotImplementedException();
}
[CmifCommand(20)]
public Result SetAppletWindowVisibility(bool visibility)
{
throw new System.NotImplementedException();
}
[CmifCommand(21)]
public Result SetAppletGpuTimeSlice(long gpuTime)
{
throw new System.NotImplementedException();
}
}
}

View file

@ -24,15 +24,19 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
}
[CmifCommand(2)]
public Result GetWindowController()
public Result GetWindowController(out IWindowController windowController)
{
throw new System.NotImplementedException();
windowController = new WindowController();
return Result.Success;
}
[CmifCommand(3)]
public Result GetAudioController()
public Result GetAudioController(out IAudioController audioController)
{
throw new System.NotImplementedException();
audioController = new AudioController();
return Result.Success;
}
[CmifCommand(4)]

View file

@ -24,15 +24,19 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
}
[CmifCommand(2)]
public Result GetWindowController()
public Result GetWindowController(out IWindowController windowController)
{
throw new System.NotImplementedException();
windowController = new WindowController();
return Result.Success;
}
[CmifCommand(3)]
public Result GetAudioController()
public Result GetAudioController(out IAudioController audioController)
{
throw new System.NotImplementedException();
audioController = new AudioController();
return Result.Success;
}
[CmifCommand(4)]

View file

@ -24,15 +24,19 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
}
[CmifCommand(2)]
public Result GetWindowController()
public Result GetWindowController(out IWindowController windowController)
{
throw new System.NotImplementedException();
windowController = new WindowController();
return Result.Success;
}
[CmifCommand(3)]
public Result GetAudioController()
public Result GetAudioController(out IAudioController audioController)
{
throw new System.NotImplementedException();
audioController = new AudioController();
return Result.Success;
}
[CmifCommand(4)]

View file

@ -24,15 +24,19 @@ namespace Ryujinx.Horizon.Am.Ipc.Proxies
}
[CmifCommand(2)]
public Result GetWindowController()
public Result GetWindowController(out IWindowController windowController)
{
throw new System.NotImplementedException();
windowController = new WindowController();
return Result.Success;
}
[CmifCommand(3)]
public Result GetAudioController()
public Result GetAudioController(out IAudioController audioController)
{
throw new System.NotImplementedException();
audioController = new AudioController();
return Result.Success;
}
[CmifCommand(4)]

View file

@ -6,8 +6,8 @@ namespace Ryujinx.Horizon.Sdk.Am
{
Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter);
Result GetSelfController(out ISelfController selfController);
Result GetWindowController();
Result GetAudioController();
Result GetWindowController(out IWindowController windowController);
Result GetAudioController(out IAudioController audioController);
Result GetDisplayController();
Result GetProcessWindingController();
Result GetLibraryAppletCreator();

View file

@ -0,0 +1,13 @@
using Ryujinx.Horizon.Common;
namespace Ryujinx.Horizon.Sdk.Am
{
public interface IAudioController
{
Result SetExpectedMasterVolume(float mainAppletVolume, float libraryAppletVolume);
Result GetMainAppletExpectedMasterVolume(out float mainAppletVolume);
Result GetLibraryAppletExpectedMasterVolume(out float libraryAppletVolume);
Result ChangeMainAppletMasterVolume(float volume, ulong value);
Result SetTransparentVolumeRate(float volume);
}
}

View file

@ -6,8 +6,8 @@ namespace Ryujinx.Horizon.Sdk.Am
{
Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter);
Result GetSelfController(out ISelfController selfController);
Result GetWindowController();
Result GetAudioController();
Result GetWindowController(out IWindowController windowController);
Result GetAudioController(out IAudioController audioController);
Result GetDisplayController();
Result GetProcessWindingController();
Result GetLibraryAppletCreator();

View file

@ -6,8 +6,8 @@ namespace Ryujinx.Horizon.Sdk.Am
{
Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter);
Result GetSelfController(out ISelfController selfController);
Result GetWindowController();
Result GetAudioController();
Result GetWindowController(out IWindowController windowController);
Result GetAudioController(out IAudioController audioController);
Result GetDisplayController();
Result GetProcessWindingController();
Result GetLibraryAppletCreator();

View file

@ -6,8 +6,8 @@ namespace Ryujinx.Horizon.Sdk.Am
{
Result GetCommonStateGetter(out ICommonStateGetter commonStateGetter);
Result GetSelfController(out ISelfController selfController);
Result GetWindowController();
Result GetAudioController();
Result GetWindowController(out IWindowController windowController);
Result GetAudioController(out IAudioController audioController);
Result GetDisplayController();
Result GetProcessWindingController();
Result GetLibraryAppletCreator();

View file

@ -0,0 +1,17 @@
using Ryujinx.Horizon.Common;
using System;
namespace Ryujinx.Horizon.Sdk.Am
{
public interface IWindowController
{
Result CreateWindow();
Result GetAppletResourceUserId();
Result GetAppletResourceUserIdOfCallerApplet();
Result AcquireForegroundRights();
Result ReleaseForegroundRights();
Result RejectToChangeIntoBackground();
Result SetAppletWindowVisibility(bool visibility);
Result SetAppletGpuTimeSlice(Int64 gpuTime);
}
}