Skip to content

Commit

Permalink
Merge pull request #249 from ThKattanek/issue#233
Browse files Browse the repository at this point in the history
  • Loading branch information
ThKattanek committed Jul 1, 2023
2 parents 1a6aee8 + d385e57 commit 6ee5ea4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/AppRun
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
SELF=$(readlink -f "$0")
HERE=${SELF%/*}
EXEC="${HERE}/usr/bin/emu64"
exec "${EXEC}" --data-path ${HERE}/usr/share/emu64
exec "${EXEC}" $* --data-path ${HERE}/usr/share/emu64
9 changes: 8 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,18 @@ int main(int argc, char *argv[])
QObject::connect(app,SIGNAL(messageAvailable(QStringList)),w,SLOT(OnMessage(QStringList)));

w->SetCustomDataPath("");

// Der erste Parameter "--data-path" ist der prioresierte alle nachfolgenden zuweisungen werden ignoriert
// Kommt in der regel nicht vor, wird aber für das linux appimage benötigt, da dort im .AppRun
// --data-path zwingend übergeben werden muss.

bool data_path_found = false;
for(int i=0; i<cmd_line->GetCommandCount(); i++)
{
if(cmd_line->GetCommand(i) == CMD_DATA_PATH)
if((cmd_line->GetCommand(i) == CMD_DATA_PATH) && (!data_path_found))
{
w->SetCustomDataPath(QString(cmd_line->GetArg(i+1)));
data_path_found = true;
}
}

Expand Down

0 comments on commit 6ee5ea4

Please sign in to comment.