SurfaceFlinger: fix some bugs (#1262)
* SurfaceFlinger: fix some bugs This fixes some bugs in the current implementation and make it closer to the real implementation. * Fix align of some variables
This commit is contained in:
parent
44d7fcff39
commit
bcb7761eac
6 changed files with 138 additions and 59 deletions
|
@ -72,6 +72,20 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
public uint Height;
|
||||
public NativeWindowTransform TransformHint;
|
||||
public uint NumPendingBuffers;
|
||||
public ulong FrameNumber;
|
||||
|
||||
public void WriteToParcel(Parcel parcel)
|
||||
{
|
||||
parcel.WriteUInt32(Width);
|
||||
parcel.WriteUInt32(Height);
|
||||
parcel.WriteUnmanagedType(ref TransformHint);
|
||||
parcel.WriteUInt32(NumPendingBuffers);
|
||||
|
||||
if (TransformHint.HasFlag(NativeWindowTransform.ReturnFrameNumber))
|
||||
{
|
||||
parcel.WriteUInt64(FrameNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ResultCode AdjustRefcount(int addVal, int type)
|
||||
|
@ -174,7 +188,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
|
||||
status = QueueBuffer(slot, ref queueInput, out queueOutput);
|
||||
|
||||
outputParcel.WriteUnmanagedType(ref queueOutput);
|
||||
queueOutput.WriteToParcel(outputParcel);
|
||||
|
||||
outputParcel.WriteStatus(status);
|
||||
|
||||
|
@ -214,7 +228,7 @@ namespace Ryujinx.HLE.HOS.Services.SurfaceFlinger
|
|||
|
||||
status = Connect(listener, api, producerControlledByApp, out queueOutput);
|
||||
|
||||
outputParcel.WriteUnmanagedType(ref queueOutput);
|
||||
queueOutput.WriteToParcel(outputParcel);
|
||||
|
||||
outputParcel.WriteStatus(status);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue