mirror of
https://github.com/martravi/wiiqt.git
synced 2024-11-22 09:09:18 +01:00
nandbin.cpp: add more characters to replace to support lame-ass windows filesystems
This commit is contained in:
parent
12964e5c91
commit
1617433aea
@ -332,7 +332,18 @@ const QString NandBin::FstName( fst_t fst )
|
||||
QByteArray ba( (char*)fst.filename, 0xc );
|
||||
QString ret = QString( ba );
|
||||
if( fatNames )
|
||||
ret.replace( ":", "-" );
|
||||
{
|
||||
ret.replace( ":", "-" );
|
||||
ret.replace( "?", "-" );
|
||||
ret.replace( "<", "-" );
|
||||
ret.replace( ">", "-" );
|
||||
ret.replace( "\\", "-" );
|
||||
ret.replace( ":", "-" );
|
||||
ret.replace( "*", "-" );
|
||||
ret.replace( "|", "-" );
|
||||
ret.replace( "\"", "-" );
|
||||
ret.replace( "^", "-" );
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -1279,7 +1279,7 @@ int main( int argc, char *argv[] )
|
||||
qCritical() << "** nandBinCheck : Wii nand info tool **";
|
||||
qCritical() << " from giantpune";
|
||||
qCritical() << " built:" << __DATE__ << __TIME__;
|
||||
args = QCoreApplication::arguments();
|
||||
args = QCoreApplication::arguments();
|
||||
|
||||
if( args.contains( "-nocolor", Qt::CaseInsensitive ) )
|
||||
color = false;
|
||||
|
@ -285,14 +285,16 @@ void MainWindow::on_actionSetting_txt_triggered()
|
||||
if( !nandInited )
|
||||
return;
|
||||
|
||||
QTreeWidgetItem *it = ItemFromPath( "/title/00000001/00000002/data/setting.txt" );
|
||||
if( !it )
|
||||
{
|
||||
ShowMessage( tr( "<b>There is no setting.txt found in %1</b>" )
|
||||
.arg( QFileInfo( ui->lineEdit_nandPath->text() ).absoluteFilePath() ) );
|
||||
if( !ItemFromPath( "/title/00000001/00000002/data" ) )
|
||||
{
|
||||
ShowMessage( tr( "<b>You need to have a system menu before you can create a setting.txt</b>" ) );
|
||||
return;
|
||||
}
|
||||
QByteArray ba = nand.GetData( "/title/00000001/00000002/data/setting.txt" ); //read the current setting.txt
|
||||
}
|
||||
|
||||
QByteArray ba;
|
||||
if( ItemFromPath( "/title/00000001/00000002/data/setting.txt" ) )
|
||||
ba = nand.GetData( "/title/00000001/00000002/data/setting.txt" ); //read the current setting.txt
|
||||
|
||||
ba = SettingTxtDialog::Edit( this, ba ); //call a dialog to edit that existing file and store the result in the same bytearray
|
||||
if( !ba.isEmpty() ) //if the dialog returned anything ( cancel wasnt pressed ) write that new setting.txt to the nand dump
|
||||
{
|
||||
@ -776,8 +778,7 @@ bool MainWindow::InstallNUSItem( NusJob job )
|
||||
void MainWindow::on_actionAbout_triggered()
|
||||
{
|
||||
QString txt = tr( "This is an example program from WiiQt. It is designed to write titles to a nand.bin and even create one from scratch."
|
||||
"<br><br>PLEASE BE AWARE, THIS IS NOT VERY WELL TESTED AND AS OF RIGHT NOW."
|
||||
" IT SHOULD ONLY BE USED BY PEOPLE THAT KNOW HOW TO VERIFY THE FILES IT PRODUCES. AND HAVE A WAY TO FIX A BRICKED WII SHOULD THIS PROGRAM HAVE BUGS"
|
||||
"<br><br>IT SHOULD ONLY BE USED BY PEOPLE THAT KNOW HOW TO VERIFY THE FILES IT PRODUCES. AND HAVE A WAY TO FIX A BRICKED WII SHOULD THIS PROGRAM HAVE BUGS"
|
||||
"<br><br>YOU HAVE BEEN WARNED"
|
||||
"<br>giantpune" );
|
||||
QMessageBox::critical( this, tr( "About" ), txt );
|
||||
|
Loading…
Reference in New Issue
Block a user