Updated the delay code in gfx-init and removed disabled get-{width/height} code.

This commit is contained in:
yellows8 2017-12-24 23:29:55 -05:00
parent 3c297c2a14
commit 02ec6d5c8a

View File

@ -15,8 +15,6 @@ static bool g_gfx_ProducerConnected = 0;
static bool g_gfx_ProducerSlotsRequested[2] = {0, 0}; static bool g_gfx_ProducerSlotsRequested[2] = {0, 0};
static u8 *g_gfxFramebuf; static u8 *g_gfxFramebuf;
static size_t g_gfxFramebufSize; static size_t g_gfxFramebufSize;
/*static u64 g_gfx_DisplayResolution_width, g_gfx_DisplayResolution_height;
static s32 g_gfx_Query_width, g_gfx_Query_height;*/
static bufferProducerFence g_gfx_DequeueBuffer_fence; static bufferProducerFence g_gfx_DequeueBuffer_fence;
static bufferProducerQueueBufferOutput g_gfx_Connect_QueueBufferOutput; static bufferProducerQueueBufferOutput g_gfx_Connect_QueueBufferOutput;
static bufferProducerQueueBufferOutput g_gfx_QueueBuffer_QueueBufferOutput; static bufferProducerQueueBufferOutput g_gfx_QueueBuffer_QueueBufferOutput;
@ -247,18 +245,16 @@ static Result _gfxInit(viServiceType servicetype, const char *DisplayName, u32 L
} }
} }
if (R_SUCCEEDED(rc)) svcSleepThread(3000000000);
if (R_SUCCEEDED(rc)) rc = _gfxDequeueBuffer(); if (R_SUCCEEDED(rc)) rc = _gfxDequeueBuffer();
/*if (R_SUCCEEDED(rc)) rc = _gfxGetDisplayResolution(&g_gfx_DisplayResolution_width, &g_gfx_DisplayResolution_height); if (R_SUCCEEDED(rc)) {
if(__nx_applet_type == APPLET_TYPE_Application) { //It's unknown whether there's a better way to handle this.
if (R_SUCCEEDED(rc)) rc = bufferProducerQuery(NATIVE_WINDOW_WIDTH, &g_gfx_Query_width); svcSleepThread(2000000000);
if (R_SUCCEEDED(rc)) rc = bufferProducerQuery(NATIVE_WINDOW_HEIGHT, &g_gfx_Query_height);*/ }
else {
/*if (R_SUCCEEDED(rc)) { //Workaround a gfx display issue.
for(i=0; i<2; i++) gfxWaitForVsync(); for(i=0; i<2; i++) gfxWaitForVsync();
}*/ }
}
if (R_FAILED(rc)) { if (R_FAILED(rc)) {
_gfxQueueBuffer(g_gfxCurrentProducerBuffer); _gfxQueueBuffer(g_gfxCurrentProducerBuffer);