diff options
| author | emmauss <emmausssss@gmail.com> | 2018-08-11 15:32:56 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-11 15:32:56 +0300 |
| commit | 8482e16dcc18820578726ae5cd8bc1d4a3388615 (patch) | |
| tree | 1fad9306158a0409192c593808ab78744cc7807e | |
| parent | 402a143ae1d25d9680f999bf0ab0af79add9c320 (diff) | |
| parent | 4a3ed0cec791107d1fc49849eec81bf79179db84 (diff) | |
Merge pull request #304 from emmauss/listdisplays
Implemented IApplicationDisplayService:ListDisplays
| -rw-r--r-- | Ryujinx.HLE/OsHle/Services/Vi/IApplicationDisplayService.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/Ryujinx.HLE/OsHle/Services/Vi/IApplicationDisplayService.cs b/Ryujinx.HLE/OsHle/Services/Vi/IApplicationDisplayService.cs index 57848319..17dc47e1 100644 --- a/Ryujinx.HLE/OsHle/Services/Vi/IApplicationDisplayService.cs +++ b/Ryujinx.HLE/OsHle/Services/Vi/IApplicationDisplayService.cs @@ -1,6 +1,8 @@ +using ChocolArm64.Memory; using Ryujinx.HLE.OsHle.Ipc; using System.Collections.Generic; using System.IO; +using System.Text; using static Ryujinx.HLE.OsHle.Services.Android.Parcel; @@ -22,6 +24,7 @@ namespace Ryujinx.HLE.OsHle.Services.Vi { 101, GetSystemDisplayService }, { 102, GetManagerDisplayService }, { 103, GetIndirectDisplayTransactionService }, + { 1000, ListDisplays }, { 1010, OpenDisplay }, { 1020, CloseDisplay }, { 1102, GetDisplayResolution }, @@ -64,6 +67,24 @@ namespace Ryujinx.HLE.OsHle.Services.Vi return 0; } + public long ListDisplays(ServiceCtx Context) + { + long RecBuffPtr = Context.Request.ReceiveBuff[0].Position; + + AMemoryHelper.FillWithZeros(Context.Memory, RecBuffPtr, 0x60); + + //Add only the default display to buffer + Context.Memory.WriteBytes(RecBuffPtr, Encoding.ASCII.GetBytes("Default")); + Context.Memory.WriteInt64(RecBuffPtr + 0x40, 0x1L); + Context.Memory.WriteInt64(RecBuffPtr + 0x48, 0x1L); + Context.Memory.WriteInt64(RecBuffPtr + 0x50, 1920L); + Context.Memory.WriteInt64(RecBuffPtr + 0x58, 1080L); + + Context.ResponseData.Write(1L); + + return 0; + } + public long OpenDisplay(ServiceCtx Context) { string Name = GetDisplayName(Context); |
