int sf2d_fini() { if (!sf2d_initialized) return 0; //aptUnhook(&apt_hook_cookie); gfxExit(); shaderProgramFree(&shader); DVLB_Free(dvlb); linearFree(pool_addr); linearFree(gpu_cmd); vramFree(gpu_fb_addr); vramFree(gpu_depth_fb_addr); sf2d_initialized = 0; return 1; }
void TestAll() { const std::string tag = "MemoryFills"; u8* buffer = (u8*)vramAlloc(0x400); Test(tag, "Fill24Bits", Fill24Bits(buffer), true); Test(tag, "Fill32Bits", Fill32Bits(buffer), true); vramFree(buffer); }
void C3D_TexDelete(C3D_Tex* tex) { if (!tex->data) return; if (addrIsVRAM(tex->data)) vramFree(tex->data); else linearFree(tex->data); tex->data = NULL; }
void sf2d_free_texture(sf2d_texture *texture) { if (texture) { if (texture->place == SF2D_PLACE_RAM) { linearFree(texture->data); } else if (texture->place == SF2D_PLACE_VRAM) { vramFree(texture->data); } free(texture); } }
void GUIFontDestroy(struct GUIFont* font) { vramFree(font->texture.data); vramFree(font->icons.data); free(font); }
void gpuExit(void) { linearFree(cmdBuf); vramFree(depthBuf); vramFree(colorBuf); }