diff --git a/main.cpp b/main.cpp index 1bad84c..e69d8ae 100755 --- a/main.cpp +++ b/main.cpp @@ -25,8 +25,10 @@ #include "SavegameData.h" #include #include +#include #include #include +#include #include int main(int argc, char *argv[]) @@ -58,10 +60,22 @@ int main(int argc, char *argv[]) else if (selectedAction == "") { QFile argumentFile(currentArg); + QFileInfo argumentFileInfo(argumentFile); if (argumentFile.exists()) { - arg1 = currentArg; - selectedAction = "showpic"; + QString argumentFileName = argumentFileInfo.fileName(); + QString argumentFileType = argumentFileName.left(4); + + if (argumentFileType == "PGTA") + { + arg1 = currentArg; + selectedAction = "showpic"; + } + else if (argumentFileType == "SGTA") + { + arg1 = currentArg; + selectedAction = "showsgd"; + } } } }