GPU: Properly initialize the newer NDSDisplayInfo fields.

- This has the side-effect of having the Windows port’s display window
start up with a white screen and HUD showing (if enabled) just like
before, rather than a black screen and HUD possibly hidden.
This commit is contained in:
rogerman 2017-11-20 23:51:42 -08:00
parent 25eae6e1ed
commit 4269925258
1 changed files with 15 additions and 6 deletions

View File

@ -7414,22 +7414,31 @@ GPUSubsystem::GPUSubsystem()
_displayInfo.bufferIndex = 0;
_displayInfo.masterFramebufferHead = _masterFramebuffer;
_displayInfo.masterNativeBuffer = _masterFramebuffer;
_displayInfo.nativeBuffer[NDSDisplayID_Main] = _displayInfo.masterNativeBuffer;
_displayInfo.nativeBuffer[NDSDisplayID_Main] = _displayInfo.masterNativeBuffer;
_displayInfo.nativeBuffer[NDSDisplayID_Touch] = (u8 *)_displayInfo.masterNativeBuffer + (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_FRAMEBUFFER_NATIVE_HEIGHT * _displayInfo.pixelBytes);
_displayInfo.masterCustomBuffer = (u8 *)_masterFramebuffer + (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_FRAMEBUFFER_NATIVE_HEIGHT * 2 * _displayInfo.pixelBytes);
_displayInfo.customBuffer[NDSDisplayID_Main] = _displayInfo.masterCustomBuffer;
_displayInfo.customBuffer[NDSDisplayID_Main] = _displayInfo.masterCustomBuffer;
_displayInfo.customBuffer[NDSDisplayID_Touch] = (u8 *)_displayInfo.masterCustomBuffer + (GPU_FRAMEBUFFER_NATIVE_WIDTH * GPU_FRAMEBUFFER_NATIVE_HEIGHT * _displayInfo.pixelBytes);
_displayInfo.didPerformCustomRender[NDSDisplayID_Main] = false;
_displayInfo.didPerformCustomRender[NDSDisplayID_Main] = false;
_displayInfo.didPerformCustomRender[NDSDisplayID_Touch] = false;
_displayInfo.renderedWidth[NDSDisplayID_Main] = GPU_FRAMEBUFFER_NATIVE_WIDTH;
_displayInfo.renderedWidth[NDSDisplayID_Main] = GPU_FRAMEBUFFER_NATIVE_WIDTH;
_displayInfo.renderedWidth[NDSDisplayID_Touch] = GPU_FRAMEBUFFER_NATIVE_WIDTH;
_displayInfo.renderedHeight[NDSDisplayID_Main] = GPU_FRAMEBUFFER_NATIVE_HEIGHT;
_displayInfo.renderedHeight[NDSDisplayID_Main] = GPU_FRAMEBUFFER_NATIVE_HEIGHT;
_displayInfo.renderedHeight[NDSDisplayID_Touch] = GPU_FRAMEBUFFER_NATIVE_HEIGHT;
_displayInfo.renderedBuffer[NDSDisplayID_Main] = _displayInfo.nativeBuffer[NDSDisplayID_Main];
_displayInfo.renderedBuffer[NDSDisplayID_Main] = _displayInfo.nativeBuffer[NDSDisplayID_Main];
_displayInfo.renderedBuffer[NDSDisplayID_Touch] = _displayInfo.nativeBuffer[NDSDisplayID_Touch];
_displayInfo.masterBrightnessDiffersPerLine[NDSDisplayID_Main] = false;
_displayInfo.masterBrightnessDiffersPerLine[NDSDisplayID_Touch] = false;
_displayInfo.backlightIntensity[NDSDisplayID_Main] = 1.0f;
_displayInfo.backlightIntensity[NDSDisplayID_Touch] = 1.0f;
_displayInfo.needConvertColorFormat[NDSDisplayID_Main] = false;
_displayInfo.needConvertColorFormat[NDSDisplayID_Touch] = false;
_displayInfo.needApplyMasterBrightness[NDSDisplayID_Main] = false;
_displayInfo.needApplyMasterBrightness[NDSDisplayID_Touch] = false;
ClearWithColor(0x8000);
}