Support different framebuffer offsets (fixes #59)

This commit is contained in:
gdkchan
2018-03-20 12:18:25 -03:00
parent 4314a8f3e5
commit 1bd99e5597
7 changed files with 82 additions and 14 deletions

View 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];
}
}
}