mirror of
https://github.com/GreemDev/Ryujinx
synced 2024-11-27 03:59:13 +01:00
40d1acd198
* vi: Unify resolutions values and accurate implementation of them. To continue what was made in #2618, I've REd `vi` service a bit. Now values and checks related to displays are more accurate. - `am` GetDefaultDisplayResolution / GetDefaultDisplayResolutionChangeEvent have more informations on what the service does. - `vi:u/vi:m/vi:s` GetDisplayService are now accurate. - `IApplicationDisplay` GetRelayService, GetSystemDisplayService, GetManagerDisplayService, GetIndirectDisplayTransactionService, ListDisplays, OpenDisplay, OpenDefaultDisplay, CloseDisplay, GetDisplayResolution are now properly implemented. - Some other calls are cleaned or have extra checks accordingly to RE. Additionnaly, `IFriendService` have some wrong aligned things, and `pm:info` service placeholder was missing. * just use _openedDisplayInfo.Remove() * use context.Memory.Fill() * fix some casting * remove unneeded comment * cleanup * uses TryAdd * displayId > ulong * GetDisplayResolution > ulong * UL
28 lines
No EOL
946 B
C#
28 lines
No EOL
946 B
C#
using Ryujinx.HLE.HOS.Services.Vi.RootService;
|
|
using Ryujinx.HLE.HOS.Services.Vi.Types;
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Vi
|
|
{
|
|
[Service("vi:s")]
|
|
class ISystemRootService : IpcService
|
|
{
|
|
// vi:u/m/s aren't on 3 separate threads but we can't put them together with the current ServerBase
|
|
public ISystemRootService(ServiceCtx context) : base(context.Device.System.ViServerS) { }
|
|
|
|
[CommandHipc(1)]
|
|
// GetDisplayService(u32) -> object<nn::visrv::sf::IApplicationDisplayService>
|
|
public ResultCode GetDisplayService(ServiceCtx context)
|
|
{
|
|
ViServiceType serviceType = (ViServiceType)context.RequestData.ReadInt32();
|
|
|
|
if (serviceType != ViServiceType.System)
|
|
{
|
|
return ResultCode.InvalidRange;
|
|
}
|
|
|
|
MakeObject(context, new IApplicationDisplayService(serviceType));
|
|
|
|
return ResultCode.Success;
|
|
}
|
|
}
|
|
} |