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:
Thog 2020-04-23 13:59:11 +02:00 committed by GitHub
parent 21a0b0ebeb
commit cdbb689b80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 11 deletions

View file

@ -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!");
}