forked from Mirror/Ryujinx
Data should not be public for nvapi unicode string
This commit is contained in:
parent
9e68f5026e
commit
3f126487ab
1 changed files with 3 additions and 3 deletions
|
@ -6,7 +6,7 @@ namespace Ryujinx.Common.GraphicsDriver.NVAPI
|
|||
[StructLayout(LayoutKind.Sequential, Pack = 4)]
|
||||
public unsafe struct NvapiUnicodeString
|
||||
{
|
||||
public fixed byte Data[4096];
|
||||
private fixed byte _data[4096];
|
||||
|
||||
public NvapiUnicodeString(string text)
|
||||
{
|
||||
|
@ -15,7 +15,7 @@ namespace Ryujinx.Common.GraphicsDriver.NVAPI
|
|||
|
||||
public string Get()
|
||||
{
|
||||
fixed (byte* data = Data)
|
||||
fixed (byte* data = _data)
|
||||
{
|
||||
string text = Encoding.Unicode.GetString(data, 4096);
|
||||
|
||||
|
@ -33,7 +33,7 @@ namespace Ryujinx.Common.GraphicsDriver.NVAPI
|
|||
{
|
||||
text += '\0';
|
||||
fixed (char* textPtr = text)
|
||||
fixed (byte* data = Data)
|
||||
fixed (byte* data = _data)
|
||||
{
|
||||
int written = Encoding.Unicode.GetBytes(textPtr, text.Length, data, 4096);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue