service: acc: Ensure proper profile size
This commit is contained in:
parent
3bf61e6f3a
commit
65b1508d0d
2 changed files with 50 additions and 12 deletions
|
@ -306,10 +306,10 @@ void ConfigureProfileManager::SetUserImage() {
|
|||
return;
|
||||
}
|
||||
|
||||
// Some games crash when the profile image is too big. Resize any image bigger than 256x256
|
||||
// Profile image must be 256x256
|
||||
QImage image(image_path);
|
||||
if (image.width() > 256 || image.height() > 256) {
|
||||
image = image.scaled(256, 256, Qt::KeepAspectRatio);
|
||||
if (image.width() != 256 || image.height() != 256) {
|
||||
image = image.scaled(256, 256, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
if (!image.save(image_path)) {
|
||||
QMessageBox::warning(this, tr("Error resizing user image"),
|
||||
tr("Unable to resize image"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue