Make file.hpp independent of gfx (#1733)

This commit is contained in:
Rangi
2025-07-08 15:16:16 -04:00
committed by GitHub
parent 5de05e2e4b
commit 6869e4807c
2 changed files with 3 additions and 8 deletions

View File

@@ -4,6 +4,7 @@
#include <algorithm>
#include <charconv>
#include <errno.h>
#include <fstream>
#include <inttypes.h>
#include <limits.h>
@@ -612,7 +613,7 @@ void parseExternalPalSpec(char const *arg) {
std::filebuf file;
// Some parsers read the file in text mode, others in binary mode
if (!file.open(path, std::ios::in | std::get<2>(*iter))) {
error("Failed to open palette file \"%s\"", path);
fatal("Failed to open palette file \"%s\": %s", path, strerror(errno));
return;
}