Skip to content

Commit

Permalink
Fix editor screenshot save path (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
AzureBerylBlue authored Oct 13, 2020
1 parent b58baed commit c9a383b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/leveleditor/leveleditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5234,10 +5234,10 @@ void takescreenshot()

#ifdef PNG_SAVE_FORMAT
strcat(szSaveFile, ".png");
IMG_SavePNG(screenshot, szSaveFile);
IMG_SavePNG(screenshot, convertPath(szSaveFile).c_str());
#else
strcat(szSaveFile, ".bmp");
SDL_SaveBMP(screenshot, szSaveFile);
SDL_SaveBMP(screenshot, convertPath(szSaveFile).c_str());
#endif

SDL_FreeSurface(screenshot);
Expand Down
2 changes: 1 addition & 1 deletion src/smw/GSMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,7 @@ void MenuState::update()
#endif

g_map->loadMap((*itr).second->filename, read_type_preview);
g_map->saveThumbnail(szThumbnail, false);
g_map->saveThumbnail(convertPath(szThumbnail), false);

itr++;
}
Expand Down
4 changes: 2 additions & 2 deletions src/worldeditor/worldeditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4857,10 +4857,10 @@ void takescreenshot()

#ifdef PNG_SAVE_FORMAT
strcat(szSaveFile, ".png");
IMG_SavePNG(sScreenshot, szSaveFile);
IMG_SavePNG(sScreenshot, convertPath(szSaveFile).c_str());
#else
strcat(szSaveFile, ".bmp");
SDL_SaveBMP(sScreenshot, szSaveFile);
SDL_SaveBMP(sScreenshot, convertPath(szSaveFile).c_str());
#endif

SDL_FreeSurface(sScreenshot);
Expand Down

0 comments on commit c9a383b

Please sign in to comment.