void x_exit(int ret) { MyString str; str.Format("Critical Error : %d",ret); x_fatal_exit(str.c_str()); }
void showProgress(const char* file,int percent) { MyString progress; if (percent>=0) progress.Format("Downloading: %s (%3d%%)",getfile(file),percent); else progress.Format("Downloading: %s (%4dK)",getfile(file),(int)(-percent/1024)); // outputInfoInternal(progress.c_str()); CEmulator* emu = CEmulator::theEmulator; if (emu) emu->showStatus(progress.c_str()); #ifdef DRIVER_IOS extern void x_downloadinginprogress(int); x_downloadinginprogress(percent); #endif }
MyString CDownload::getPersistentDir(const char* url) { MyString dir; // dir.Format("%s"ACTIVEGS_DIRECTORY_SEPARATOR"%s.%08X",getPersistentPath(),getfilenoext(url),calcCRC(url)); dir = getPersistentPath(); dir += ACTIVEGS_DIRECTORY_SEPARATOR; dir += getfilenoext(url) ; /* MyString urldir; getdir(url,urldir); */ MyString temp; temp.Format(".%08X",calcCRC(url)); dir += temp.c_str(); return dir ; }