vi: Unify resolutions values and accurate implementation of them. (#2640)
* 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
This commit is contained in:
parent
e17eb7bfaf
commit
40d1acd198
14 changed files with 265 additions and 100 deletions
|
@ -11,6 +11,20 @@ namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService
|
|||
_applicationDisplayService = applicationDisplayService;
|
||||
}
|
||||
|
||||
[CommandHipc(1102)]
|
||||
// GetDisplayResolution(u64 display_id) -> (u64 width, u64 height)
|
||||
public ResultCode GetDisplayResolution(ServiceCtx context)
|
||||
{
|
||||
ulong displayId = context.RequestData.ReadUInt64();
|
||||
|
||||
(ulong width, ulong height) = AndroidSurfaceComposerClient.GetDisplayInfo(context, displayId);
|
||||
|
||||
context.ResponseData.Write(width);
|
||||
context.ResponseData.Write(height);
|
||||
|
||||
return ResultCode.Success;
|
||||
}
|
||||
|
||||
[CommandHipc(2010)]
|
||||
// CreateManagedLayer(u32, u64, nn::applet::AppletResourceUserId) -> u64
|
||||
public ResultCode CreateManagedLayer(ServiceCtx context)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue