mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Imported transform enums from Android and updated g_gfxQueueBufferData.transform for this.
This commit is contained in:
parent
1d7556f583
commit
4b2a32af59
@ -18,7 +18,7 @@ typedef struct {
|
||||
s32 isAutoTimestamp;
|
||||
bufferProducerRect crop;
|
||||
s32 scalingMode;
|
||||
u32 transform;
|
||||
u32 transform;//See the NATIVE_WINDOW_TRANSFORM_* enums.
|
||||
u32 stickyTransform;
|
||||
u32 unk[2];
|
||||
bufferProducerFence fence;
|
||||
@ -104,6 +104,44 @@ enum {
|
||||
//...
|
||||
};
|
||||
|
||||
//From Android hardware.h.
|
||||
|
||||
/**
|
||||
* Transformation definitions
|
||||
*
|
||||
* IMPORTANT NOTE:
|
||||
* HAL_TRANSFORM_ROT_90 is applied CLOCKWISE and AFTER HAL_TRANSFORM_FLIP_{H|V}.
|
||||
*
|
||||
*/
|
||||
|
||||
enum {
|
||||
/* flip source image horizontally (around the vertical axis) */
|
||||
HAL_TRANSFORM_FLIP_H = 0x01,
|
||||
/* flip source image vertically (around the horizontal axis)*/
|
||||
HAL_TRANSFORM_FLIP_V = 0x02,
|
||||
/* rotate source image 90 degrees clockwise */
|
||||
HAL_TRANSFORM_ROT_90 = 0x04,
|
||||
/* rotate source image 180 degrees */
|
||||
HAL_TRANSFORM_ROT_180 = 0x03,
|
||||
/* rotate source image 270 degrees clockwise */
|
||||
HAL_TRANSFORM_ROT_270 = 0x07,
|
||||
};
|
||||
|
||||
//From Android window.h.
|
||||
/* parameter for NATIVE_WINDOW_SET_BUFFERS_TRANSFORM */
|
||||
enum {
|
||||
/* flip source image horizontally */
|
||||
NATIVE_WINDOW_TRANSFORM_FLIP_H = HAL_TRANSFORM_FLIP_H,
|
||||
/* flip source image vertically */
|
||||
NATIVE_WINDOW_TRANSFORM_FLIP_V = HAL_TRANSFORM_FLIP_V,
|
||||
/* rotate source image 90 degrees clock-wise */
|
||||
NATIVE_WINDOW_TRANSFORM_ROT_90 = HAL_TRANSFORM_ROT_90,
|
||||
/* rotate source image 180 degrees */
|
||||
NATIVE_WINDOW_TRANSFORM_ROT_180 = HAL_TRANSFORM_ROT_180,
|
||||
/* rotate source image 270 degrees clock-wise */
|
||||
NATIVE_WINDOW_TRANSFORM_ROT_270 = HAL_TRANSFORM_ROT_270,
|
||||
};
|
||||
|
||||
Result bufferProducerInitialize(Binder *session);
|
||||
void bufferProducerExit(void);
|
||||
|
||||
|
@ -57,7 +57,7 @@ static bufferProducerQueueBufferInput g_gfxQueueBufferData = {
|
||||
.isAutoTimestamp = 0x1,
|
||||
.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,
|
||||
.transform = NATIVE_WINDOW_TRANSFORM_FLIP_V,
|
||||
.stickyTransform = 0x0,
|
||||
.unk = {0x0, 0x1},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user