mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-11-28 23:02:21 -05:00
Support different framebuffer offsets (fixes #59)
This commit is contained in:
40
Ryujinx.Core/OsHle/Services/Nv/NvMapFb.cs
Normal file
40
Ryujinx.Core/OsHle/Services/Nv/NvMapFb.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Ryujinx.Core.OsHle.IpcServices.NvServices
|
||||
{
|
||||
class NvMapFb
|
||||
{
|
||||
private List<long> BufferOffs;
|
||||
|
||||
public NvMapFb()
|
||||
{
|
||||
BufferOffs = new List<long>();
|
||||
}
|
||||
|
||||
public void AddBufferOffset(long Offset)
|
||||
{
|
||||
BufferOffs.Add(Offset);
|
||||
}
|
||||
|
||||
public bool HasBufferOffset(int Index)
|
||||
{
|
||||
if ((uint)Index >= BufferOffs.Count)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public long GetBufferOffset(int Index)
|
||||
{
|
||||
if ((uint)Index >= BufferOffs.Count)
|
||||
{
|
||||
throw new ArgumentOutOfRangeException(nameof(Index));
|
||||
}
|
||||
|
||||
return BufferOffs[Index];
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user