1
0
Fork 0
mirror of https://gitlab.com/Syping/gta5view-cmd synced 2024-11-23 22:20:23 +01:00

let -d work like it should

This commit is contained in:
Syping 2018-02-01 02:05:26 +01:00
parent 4c9977307f
commit f54155b484

View file

@ -32,6 +32,7 @@ int main(int argc, char *argv[])
if (args.length() >= 3) if (args.length() >= 3)
{ {
bool isDefault = true;
bool avatarMode = false; bool avatarMode = false;
bool convertToGTA = true; bool convertToGTA = true;
bool customFormat = false; bool customFormat = false;
@ -53,38 +54,50 @@ int main(int argc, char *argv[])
{ {
if (args.at(4) == "-a") if (args.at(4) == "-a")
{ {
isDefault = false;
avatarMode = true; avatarMode = true;
} }
else if (args.at(4) == "-p") else if (args.at(4) == "-p")
{ {
isDefault = false;
avatarMode = false; avatarMode = false;
} }
else if (args.at(4) == "-d")
{
isDefault = true;
}
else if (args.at(4) == "-aiar") else if (args.at(4) == "-aiar")
{ {
isDefault = false;
avatarMode = true; avatarMode = true;
keepAspectRatio = false; keepAspectRatio = false;
} }
else if (args.at(4) == "-akar") else if (args.at(4) == "-akar")
{ {
isDefault = false;
avatarMode = true; avatarMode = true;
keepAspectRatio = true; keepAspectRatio = true;
} }
else if (args.at(4) == "-piar") else if (args.at(4) == "-piar")
{ {
isDefault = false;
avatarMode = false; avatarMode = false;
keepAspectRatio = false; keepAspectRatio = false;
} }
else if (args.at(4) == "-pkar") else if (args.at(4) == "-pkar")
{ {
isDefault = false;
avatarMode = false; avatarMode = false;
keepAspectRatio = true; keepAspectRatio = true;
} }
else if (args.at(4) == "-diar") else if (args.at(4) == "-diar")
{ {
isDefault = true;
keepAspectRatio = false; keepAspectRatio = false;
} }
else if (args.at(4) == "-dkar") else if (args.at(4) == "-dkar")
{ {
isDefault = true;
keepAspectRatio = true; keepAspectRatio = true;
} }
} }
@ -121,6 +134,17 @@ int main(int argc, char *argv[])
int avatarZoneX = 145; int avatarZoneX = 145;
int avatarZoneY = 66; int avatarZoneY = 66;
if (isDefault)
{
if (image.width() == image.height())
{
avatarMode = true;
}
else
{
avatarMode = false;
}
}
if (!avatarMode) if (!avatarMode)
{ {
QImage snapmaticImage(snapmaticRes, QImage::Format_RGB888); QImage snapmaticImage(snapmaticRes, QImage::Format_RGB888);