From 40d1acd1982705224413bc882f6ae25d4bf8ee1a Mon Sep 17 00:00:00 2001 From: Ac_K Date: Sun, 19 Sep 2021 12:57:39 +0200 Subject: 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 --- .../AndroidSurfaceComposerClient.cs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs (limited to 'Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs') diff --git a/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs new file mode 100644 index 00000000..1fa99e65 --- /dev/null +++ b/Ryujinx.HLE/HOS/Services/Vi/RootService/ApplicationDisplayService/AndroidSurfaceComposerClient.cs @@ -0,0 +1,19 @@ +namespace Ryujinx.HLE.HOS.Services.Vi.RootService.ApplicationDisplayService +{ + static class AndroidSurfaceComposerClient + { + // NOTE: This is android::SurfaceComposerClient::getDisplayInfo. + public static (ulong, ulong) GetDisplayInfo(ServiceCtx context, ulong displayId = 0) + { + // TODO: This need to be REd, it should returns the driver resolution and more. + if (context.Device.System.State.DockedMode) + { + return (1920, 1080); + } + else + { + return (1280, 720); + } + } + } +} \ No newline at end of file -- cgit v1.2.3