gfx: Remove gfxSetDrawFlip. Make 0 the default transform instead of FLIP_V.

This commit is contained in:
fincs 2018-08-31 20:14:50 +02:00
parent 0d1b8bd723
commit e3a7187973
2 changed files with 3 additions and 17 deletions

View File

@ -90,10 +90,7 @@ u32 gfxGetFramebufferPitch(void);
/// Sets the \ref GfxMode.
void gfxSetMode(GfxMode mode);
/// Controls whether a vertical-flip is done when determining the pixel-offset within the actual framebuffer. By default this is enabled.
void gfxSetDrawFlip(bool flip);
/// Configures transform. See the NATIVE_WINDOW_TRANSFORM_* enums in buffer_producer.h. The default is NATIVE_WINDOW_TRANSFORM_FLIP_V.
/// Configures transform. See the NATIVE_WINDOW_TRANSFORM_* enums in buffer_producer.h. The default is 0.
void gfxConfigureTransform(u32 transform);
/// Flushes the framebuffer in the data cache. When \ref GfxMode is GfxMode_LinearDouble, this also transfers the linear-framebuffer to the actual framebuffer.
@ -106,13 +103,9 @@ static inline u32 gfxGetFramebufferDisplayOffset(u32 x, u32 y) {
u32 tmp_pos;
extern size_t g_gfx_framebuf_aligned_width;
extern size_t g_gfx_framebuf_display_height;
extern bool g_gfx_drawflip;
//if (x >= g_gfx_framebuf_width || y >= g_gfx_framebuf_display_height) return (gfxGetFramebufferSize()-4)/4;//Return the last pixel-offset in the buffer, the data located here is not displayed due to alignment. (Disabled for perf)
if (g_gfx_drawflip) y = g_gfx_framebuf_display_height-1-y;
tmp_pos = ((y & 127) / 16) + (x/16*8) + ((y/16/8)*(g_gfx_framebuf_aligned_width/16*8));
tmp_pos *= 16*16 * 4;

View File

@ -38,8 +38,6 @@ size_t g_gfx_framebuf_display_width=0, g_gfx_framebuf_display_height=0;
size_t g_gfx_singleframebuf_size=0;
size_t g_gfx_singleframebuf_linear_size=0;
bool g_gfx_drawflip = true;
static AppletHookCookie g_gfx_autoresolution_applethookcookie;
static bool g_gfx_autoresolution_enabled;
@ -60,7 +58,7 @@ static BqQueueBufferInput 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 = NATIVE_WINDOW_TRANSFORM_FLIP_V,
.transform = 0,
.stickyTransform = 0x0,
.unk = 0x0,
.swapInterval = 0x1,
@ -174,8 +172,7 @@ Result gfxInitDefault(void) {
g_gfxFramebufHandle = 0;
g_gfxMode = GfxMode_LinearDouble;
g_gfx_drawflip = true;
g_gfxQueueBufferData.transform = NATIVE_WINDOW_TRANSFORM_FLIP_V;
g_gfxQueueBufferData.transform = 0;
//memset(g_gfx_ProducerSlotsRequested, 0, sizeof(g_gfx_ProducerSlotsRequested));
g_gfx_ProducerSlotsRequested = 0;
@ -476,10 +473,6 @@ void gfxSetMode(GfxMode mode) {
g_gfxMode = mode;
}
void gfxSetDrawFlip(bool flip) {
g_gfx_drawflip = flip;
}
void gfxConfigureTransform(u32 transform) {
g_gfxQueueBufferData.transform = transform;
}