fix override support
This commit is contained in:
parent
7d935a6d5b
commit
b61d60f6ce
1 changed files with 1 additions and 2 deletions
|
@ -37,7 +37,7 @@ int main(int argc, char const *argv[]) {
|
|||
SDL_FreeSurface(s);
|
||||
|
||||
// Enregistrement du résultat
|
||||
std::string chemin_image("resultat");
|
||||
std::string chemin_image("resultat " + std::to_string(niveau_compression) + ".png");
|
||||
if(std::ifstream(chemin_image).is_open()) { // demande à l'utilisateur d'écraser ou non le fichier existant
|
||||
char choix;
|
||||
do {
|
||||
|
@ -59,7 +59,6 @@ int main(int argc, char const *argv[]) {
|
|||
|
||||
void enregistrementImage(QuadTree quadtree, std::string chemin, short compression) {
|
||||
SDL_Surface * img = quadtree.image(compression);
|
||||
chemin += " " + std::to_string(compression) + ".png";
|
||||
if(IMG_SavePNG(img, chemin.c_str()) != 0) {
|
||||
std::cerr << "Impossible de sauvegarder l'image (" << SDL_GetError() << ")." << std::endl;
|
||||
} else {
|
||||
|
|
Reference in a new issue