mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-31 10:09:42 -06:00
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:
@ -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!");
|
||||
}
|
||||
|
Reference in New Issue
Block a user