WindowController, AudioController
This commit is contained in:
parent
836a8d725a
commit
ad8eef7d92
12 changed files with 176 additions and 24 deletions
49
src/Ryujinx.Horizon/Am/Ipc/Controllers/AudioController.cs
Normal file
49
src/Ryujinx.Horizon/Am/Ipc/Controllers/AudioController.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
57
src/Ryujinx.Horizon/Am/Ipc/Controllers/WindowController.cs
Normal file
57
src/Ryujinx.Horizon/Am/Ipc/Controllers/WindowController.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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)]
|
||||
|
|
|
@ -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();
|
||||
|
|
13
src/Ryujinx.Horizon/Sdk/Am/IAudioController.cs
Normal file
13
src/Ryujinx.Horizon/Sdk/Am/IAudioController.cs
Normal 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);
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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();
|
||||
|
|
17
src/Ryujinx.Horizon/Sdk/Am/IWindowController.cs
Normal file
17
src/Ryujinx.Horizon/Sdk/Am/IWindowController.cs
Normal 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);
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue