Fix saving PNG screenshots
This commit is contained in:
parent
ff0a484fb2
commit
491edbd34c
1 changed files with 1 additions and 1 deletions
|
@ -67,7 +67,7 @@ void save_png_data(const std::string& file, uint8_t* data24, uint32_t width, uin
|
||||||
std::runtime_error)
|
std::runtime_error)
|
||||||
{
|
{
|
||||||
char* data = reinterpret_cast<char*>(data24);
|
char* data = reinterpret_cast<char*>(data24);
|
||||||
std::ofstream filp(file.c_str());
|
std::ofstream filp(file.c_str(), std::ios_base::binary);
|
||||||
if(!filp)
|
if(!filp)
|
||||||
throw std::runtime_error("Can't open target PNG file");
|
throw std::runtime_error("Can't open target PNG file");
|
||||||
char png_magic[] = {-119, 80, 78, 71, 13, 10, 26, 10};
|
char png_magic[] = {-119, 80, 78, 71, 13, 10, 26, 10};
|
||||||
|
|
Loading…
Add table
Reference in a new issue