mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-28 07:31:21 -08:00
40 lines
823 B
C#
40 lines
823 B
C#
|
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];
|
||
|
}
|
||
|
}
|
||
|
}
|