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:
parent
21a0b0ebeb
commit
cdbb689b80
5 changed files with 32 additions and 11 deletions
|
@ -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!");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue