Fix the Exit Crash??

This commit is contained in:
tobid7 2022-04-11 09:50:47 +02:00
parent b5995e2f93
commit aed653f0c8

View File

@ -548,7 +548,15 @@ Result RenderD7::Init::Main(std::string app_name)
mkdir("sdmc:/RenderD7/", 0777); mkdir("sdmc:/RenderD7/", 0777);
mkdir("sdmc:/RenderD7/Apps", 0777); mkdir("sdmc:/RenderD7/Apps", 0777);
mkdir(cfgpath.c_str(), 0777); mkdir(cfgpath.c_str(), 0777);
if (!FS::FileExist(cfgpath + "/config.ini")) bool renew = false;
if (FS::FileExist(cfgpath + "/config.ini"))
{
cfgfile = std::make_unique<INI::INIFile>(cfgpath + "/config.ini");
cfgfile->read(cfgstruct);
int version = (int)RenderD7::Convert::StringtoFloat(cfgstruct["info"]["version"]);
if (versuin != CFGVER) renew = true;
}
if (!FS::FileExist(cfgpath + "/config.ini") || renew)
{ {
cfgfile = std::make_unique<INI::INIFile>(cfgpath+ "/config.ini"); cfgfile = std::make_unique<INI::INIFile>(cfgpath+ "/config.ini");
cfgfile->read(cfgstruct); cfgfile->read(cfgstruct);
@ -598,8 +606,10 @@ void RenderD7::Exit::Main()
C2D_Fini(); C2D_Fini();
C3D_Fini(); C3D_Fini();
aptExit(); aptExit();
gfxExit();
romfsExit(); romfsExit();
cfguExit(); cfguExit();
romfsExit();
} }
void RenderD7::DrawTObjects(std::vector<RenderD7::TObject> tobjects, u32 color, u32 txtcolor, int selection, u32 selbgcolor, u32 selcolor) void RenderD7::DrawTObjects(std::vector<RenderD7::TObject> tobjects, u32 color, u32 txtcolor, int selection, u32 selbgcolor, u32 selcolor)