mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Allow choosing activities for an android program. Closes #1387
This commit is contained in:
@@ -108,12 +108,20 @@ void CaptureDialog::PopulateMostRecent()
|
||||
if(!settings.executable.isEmpty())
|
||||
{
|
||||
ui->loadLastCapture->setEnabled(true);
|
||||
if(settings.executable.indexOf('/') < 0 && settings.executable.indexOf('\\') < 0)
|
||||
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(QString(settings.executable)));
|
||||
|
||||
QString exe = settings.executable;
|
||||
|
||||
// if the executable isn't a path, display the full name
|
||||
bool fullName = (exe.indexOf(QLatin1Char('/')) < 0 && exe.indexOf(QLatin1Char('\\')) < 0);
|
||||
|
||||
// if it's not a windows path and only contains one '/', it's an android package so also
|
||||
// display the full name
|
||||
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(QString(settings.executable)).completeBaseName()));
|
||||
ui->loadLastCapture->setText(tr("Load Last Settings - %1").arg(QFileInfo(exe).fileName()));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user