Fixed size of bufferProducerGraphicBuffer and removed the union for it. Removed an invalid comment from gfx.c, since bufferProducerRequestBuffer() is used after bufferProducerGraphicBufferInit().

This commit is contained in:
yellows8 2018-02-17 19:35:04 -05:00
parent 0e40828c19
commit a1462c8b0b
2 changed files with 32 additions and 37 deletions

View File

@ -45,10 +45,7 @@ typedef struct {
u32 numFds; u32 numFds;
u32 numInts; u32 numInts;
union { struct {//Actual size is numFds*4 + numInts*4.
u32 rawdata[0x144>>2];//Actual size is numFds*4 + numInts*4.
struct {
u32 unk_x0; u32 unk_x0;
u32 nvmap_handle0; u32 nvmap_handle0;
u32 unk_x8; u32 unk_x8;
@ -78,9 +75,8 @@ typedef struct {
u32 unk_x68; u32 unk_x68;
u32 buffer_size1; u32 buffer_size1;
u32 unk_x70[0x33];//Normally all-zero. u32 unk_x70[0x33];//Normally all-zero.
u64 timestamp;//Unknown, some timestamp perhaps? u64 timestamp;
} data; } PACKED data;
};
} PACKED bufferProducerGraphicBuffer; } PACKED bufferProducerGraphicBuffer;
//From Android window.h. //From Android window.h.

View File

@ -78,7 +78,6 @@ static bufferProducerQueueBufferInput g_gfxQueueBufferData = {
}; };
//Some of this struct is based on tegra_dc_ext_flip_windowattr. //Some of this struct is based on tegra_dc_ext_flip_windowattr.
//TODO: How much of this struct do official apps really set? Most of it seems to be used as-is from the bufferProducerRequestBuffer() output.
static bufferProducerGraphicBuffer g_gfx_BufferInitData = { static bufferProducerGraphicBuffer g_gfx_BufferInitData = {
.magic = 0x47424652,//"RFBG"/'GBFR' .magic = 0x47424652,//"RFBG"/'GBFR'
.format = 0x1, .format = 0x1,