diff --git a/nx/include/switch/gfx/buffer_producer.h b/nx/include/switch/gfx/buffer_producer.h index 02ca6cd9..fd977648 100644 --- a/nx/include/switch/gfx/buffer_producer.h +++ b/nx/include/switch/gfx/buffer_producer.h @@ -7,10 +7,17 @@ typedef struct { nvioctl_fence nv_fences[4]; } PACKED bufferProducerFence; +typedef struct { + s32 left; + s32 top; + s32 right; + s32 bottom; +} PACKED bufferProducerRect; + typedef struct { s64 timestamp; s32 isAutoTimestamp; - u32 crop[4];//Rect + bufferProducerRect crop; s32 scalingMode; u32 transform; u32 stickyTransform; diff --git a/nx/source/gfx/gfx.c b/nx/source/gfx/gfx.c index 555592f2..eed3ce8f 100644 --- a/nx/source/gfx/gfx.c +++ b/nx/source/gfx/gfx.c @@ -31,13 +31,13 @@ extern nvioctl_fence g_nvgfx_nvhostgpu_gpfifo_fence; //static Result _gfxGetDisplayResolution(u64 *width, u64 *height); -//TODO: Figure out what all is required to use non-720p width/height. +//TODO: Implement support for non-720p width/height. //TODO: Let the user configure some of this? static bufferProducerQueueBufferInput g_gfxQueueBufferData = { .timestamp = 0x0, .isAutoTimestamp = 0x1, - .crop = {0x0, 0x0, 0x0, 0x0}, + .crop = {0x0, 0x0, 0x0, 0x0}, //Official apps which use multiple resolutions configure this for the currently used resolution, depending on the current appletOperationMode. .scalingMode = 0x0, .transform = 0x2, .stickyTransform = 0x0,