diff options
| author | Thomas Guillemard <thog@protonmail.com> | 2018-08-04 23:38:49 +0200 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-08-04 18:38:49 -0300 |
| commit | eeb626947eac81b9d9d9a90ad6e29035c21d54a7 (patch) | |
| tree | 4a1f0b2417db6670b098244ef3702f75775c50f6 /Ryujinx.HLE/Hid | |
| parent | 5f34353dce716bca2e3fc1c7e82be6276b95d61a (diff) | |
Implement Shared Fonts (#215)
* Implement Shared Fonts
This fully implements shared fonts.
This commit is provided without fonts.
This commit also add Size to HSharedMem.Positions to be able to add fonts to shared zones when RequestLoad is called.
* Require the user to provide fonts in RyuFS/system
* Use File.Exits instead of relying ona try/catch and change system resource exception format a bit
* Make sure that font sum doesn't exceed 17MB
Also rename font data dictionary for coherence.
Diffstat (limited to 'Ryujinx.HLE/Hid')
| -rw-r--r-- | Ryujinx.HLE/Hid/Hid.cs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Ryujinx.HLE/Hid/Hid.cs b/Ryujinx.HLE/Hid/Hid.cs index 2f007f1f..43c040bb 100644 --- a/Ryujinx.HLE/Hid/Hid.cs +++ b/Ryujinx.HLE/Hid/Hid.cs @@ -67,7 +67,7 @@ namespace Ryujinx.HLE.Input private object ShMemLock; - private (AMemory, long)[] ShMemPositions; + private (AMemory, long, long)[] ShMemPositions; public Hid(Logger Log) { @@ -75,7 +75,7 @@ namespace Ryujinx.HLE.Input ShMemLock = new object(); - ShMemPositions = new (AMemory, long)[0]; + ShMemPositions = new (AMemory, long, long)[0]; } internal void ShMemMap(object sender, EventArgs e) @@ -86,7 +86,7 @@ namespace Ryujinx.HLE.Input { ShMemPositions = SharedMem.GetVirtualPositions(); - (AMemory Memory, long Position) = ShMemPositions[ShMemPositions.Length - 1]; + (AMemory Memory, long Position, long Size) = ShMemPositions[ShMemPositions.Length - 1]; for (long Offset = 0; Offset < Horizon.HidSize; Offset += 8) { @@ -167,7 +167,7 @@ namespace Ryujinx.HLE.Input { lock (ShMemLock) { - foreach ((AMemory Memory, long Position) in ShMemPositions) + foreach ((AMemory Memory, long Position, long Size) in ShMemPositions) { long ControllerOffset = Position + HidControllersOffset; @@ -218,7 +218,7 @@ namespace Ryujinx.HLE.Input { lock (ShMemLock) { - foreach ((AMemory Memory, long Position) in ShMemPositions) + foreach ((AMemory Memory, long Position, long Size) in ShMemPositions) { long TouchScreenOffset = Position + HidTouchScreenOffset; |
