1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2025-12-24 00:03:11 +01:00

Merge pull request #16724 from Gymnasiast/refactor/remove-path_get_filename

Remove four old path functions
This commit is contained in:
Michael Steenbeek
2022-03-02 22:25:08 +01:00
committed by GitHub
14 changed files with 36 additions and 101 deletions

View File

@@ -20,6 +20,7 @@
#include "../core/Console.hpp"
#include "../core/File.h"
#include "../core/Imaging.h"
#include "../core/Path.hpp"
#include "../drawing/Drawing.h"
#include "../drawing/X8DrawingEngine.h"
#include "../localisation/Formatter.h"
@@ -415,9 +416,10 @@ void screenshot_giant()
WriteDpiToFile(path.value(), &dpi, gPalette);
// Show user that screenshot saved successfully
const auto filename = Path::GetFileName(path.value());
Formatter ft;
ft.Add<rct_string_id>(STR_STRING);
ft.Add<char*>(path_get_filename(path->c_str()));
ft.Add<const utf8*>(filename.c_str());
context_show_error(STR_SCREENSHOT_SAVED_AS, STR_NONE, ft);
}
catch (const std::exception& e)