Fixed windows build
This commit is contained in:
parent
f78db24f49
commit
da1a1c26cb
7 changed files with 11 additions and 11 deletions
|
|
@ -70,7 +70,7 @@ void ImageEditTool::edit_gui() {
|
|||
);
|
||||
#endif
|
||||
t.open_file_selector("Download File", {{"Any File", "*"}}, [resourceData](const std::filesystem::path& p, const auto& e) {
|
||||
SDL_SaveFile(p.c_str(), resourceData->data->c_str(), resourceData->data->size());
|
||||
SDL_SaveFile(p.string().c_str(), resourceData->data->c_str(), resourceData->data->size());
|
||||
}, resourceData->name, true);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -352,7 +352,7 @@ void ScreenshotTool::take_screenshot(const std::filesystem::path& filePath, Scre
|
|||
#ifndef __EMSCRIPTEN__
|
||||
try {
|
||||
auto skData = out.detachAsData();
|
||||
if(!SDL_SaveFile(filePath.c_str(), skData->bytes(), skData->size()))
|
||||
if(!SDL_SaveFile(filePath.string().c_str(), skData->bytes(), skData->size()))
|
||||
throw std::runtime_error("SDL_SaveFile failed with error: " + std::string(SDL_GetError()));
|
||||
}
|
||||
catch(const std::exception& e) {
|
||||
|
|
@ -382,7 +382,7 @@ void ScreenshotTool::take_screenshot(const std::filesystem::path& filePath, Scre
|
|||
#ifndef __EMSCRIPTEN__
|
||||
try {
|
||||
auto skData = out.detachAsData();
|
||||
if(!SDL_SaveFile(filePath.c_str(), skData->bytes(), skData->size()))
|
||||
if(!SDL_SaveFile(filePath.string().c_str(), skData->bytes(), skData->size()))
|
||||
throw std::runtime_error("SDL_SaveFile failed with error: " + std::string(SDL_GetError()));
|
||||
}
|
||||
catch(const std::exception& e) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue