MCPcopy Create free account
hub / github.com/devkitPro/libctru / gfxExit

Function gfxExit

libctru/source/gfx.c:165–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165void gfxExit(void)
166{
167 if (screenFree == NULL)
168 return;
169
170 if (gspHasGpuRight())
171 {
172 // Wait for VBlank and turn the LCD off
173 gspWaitForVBlank();
174 GSPGPU_SetLcdForceBlack(0x1);
175 }
176
177 // Free framebuffers
178 screenFree(gfxTopFramebuffers[0]);
179 screenFree(gfxTopFramebuffers[1]);
180 screenFree(gfxBottomFramebuffers[0]);
181 screenFree(gfxBottomFramebuffers[1]);
182 gfxTopFramebuffers[0] = gfxTopFramebuffers[1] = NULL;
183 gfxBottomFramebuffers[0] = gfxBottomFramebuffers[1] = NULL;
184 gfxTopFramebufferMaxSize = gfxBottomFramebufferMaxSize = 0;
185
186 // Deinitialize GSP
187 gspExit();
188
189 screenFree = NULL;
190}
191
192u8* gfxGetFramebuffer(gfxScreen_t screen, gfx3dSide_t side, u16* width, u16* height)
193{

Callers

nothing calls this directly

Calls 3

gspHasGpuRightFunction · 0.85
GSPGPU_SetLcdForceBlackFunction · 0.85
gspExitFunction · 0.85

Tested by

no test coverage detected