Add support for dynamic docking/undocking (#1147)
* Add support for dynamic docking/undocking As SurfaceFlinger is now working more accurately, we can now support dynamic configuration of docking mode :) * Simplify a bt the code * Fix import ordering * Remove unused argument
This commit is contained in:
@ -10,7 +10,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService
|
||||
// GetCommonStateGetter() -> object<nn::am::service::ICommonStateGetter>
|
||||
public ResultCode GetCommonStateGetter(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new ICommonStateGetter(context.Device.System));
|
||||
MakeObject(context, new ICommonStateGetter());
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
@ -9,14 +9,9 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
||||
{
|
||||
class ICommonStateGetter : IpcService
|
||||
{
|
||||
private KEvent _displayResolutionChangeEvent;
|
||||
|
||||
private CpuBoostMode _cpuBoostMode = CpuBoostMode.Disabled;
|
||||
|
||||
public ICommonStateGetter(Horizon system)
|
||||
{
|
||||
_displayResolutionChangeEvent = new KEvent(system);
|
||||
}
|
||||
public ICommonStateGetter() { }
|
||||
|
||||
[Command(0)]
|
||||
// GetEventHandle() -> handle<copy>
|
||||
@ -108,7 +103,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE.AllSystemAppletProxiesService.Sys
|
||||
// GetDefaultDisplayResolutionChangeEvent() -> handle<copy>
|
||||
public ResultCode GetDefaultDisplayResolutionChangeEvent(ServiceCtx context)
|
||||
{
|
||||
if (context.Process.HandleTable.GenerateHandle(_displayResolutionChangeEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
||||
if (context.Process.HandleTable.GenerateHandle(context.Device.System.DisplayResolutionChangeEvent.ReadableEvent, out int handle) != KernelResult.Success)
|
||||
{
|
||||
throw new InvalidOperationException("Out of handles!");
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService
|
||||
// GetCommonStateGetter() -> object<nn::am::service::ICommonStateGetter>
|
||||
public ResultCode GetCommonStateGetter(ServiceCtx context)
|
||||
{
|
||||
MakeObject(context, new ICommonStateGetter(context.Device.System));
|
||||
MakeObject(context, new ICommonStateGetter());
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
Reference in New Issue
Block a user