mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 01:20:42 +00:00
Calculate basename by hand, for windows paths on linux
This commit is contained in:
@@ -119,9 +119,19 @@ void CaptureDialog::PopulateMostRecent()
|
||||
fullName |= (exe.indexOf(QLatin1Char('\\')) < 0 && exe.count(QLatin1Char('/')) == 1);
|
||||
|
||||
if(fullName)
|
||||
{
|
||||
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(exe));
|
||||
}
|
||||
else
|
||||
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(QFileInfo(exe).fileName()));
|
||||
{
|
||||
int offs = exe.lastIndexOf(QLatin1Char('\\'));
|
||||
if(offs > 0)
|
||||
exe.remove(0, offs + 1);
|
||||
offs = exe.lastIndexOf(QLatin1Char('/'));
|
||||
if(offs > 0)
|
||||
exe.remove(0, offs + 1);
|
||||
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(exe));
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user