Created
September 22, 2016 21:18
-
-
Save aaronp24/2d9edefc168adb02d25b81f62a5409b1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void NV_API_CALL os_get_screen_info( | |
NvU64 *pPhysicalAddress, | |
NvU16 *pFbWidth, | |
NvU16 *pFbHeight, | |
NvU16 *pFbDepth, | |
NvU16 *pFbPitch | |
) | |
{ | |
const sc_softc_t *sc = sc_get_softc(0, SC_KERNEL_CONSOLE); | |
if (sc) | |
{ | |
const video_adapter_t *adp = sc->adp; | |
if (adp) | |
{ | |
const struct video_info *vi = &adp->va_info; | |
if (vi && (vi->vi_flags & V_INFO_LINEAR)) | |
{ | |
*pPhysicalAddress = vi->vi_buffer; | |
*pFbWidth = vi->vi_width; | |
*pFbHeight = vi->vi_height; | |
*pFbDepth = vi->vi_depth; | |
*pFbPitch = adp->va_line_width; | |
return; | |
} | |
} | |
} | |
*pPhysicalAddress = 0; | |
*pFbWidth = *pFbHeight = *pFbDepth = *pFbPitch = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment