NativeFile: Do not check if SDL_GetError() is empty string.

This commit is contained in:
Miku AuahDark
2025-01-04 12:15:22 +08:00
parent 8beb7f0e4b
commit 1a61f631e4
+2 -7
View File
@@ -91,14 +91,9 @@ bool NativeFile::open(Mode newmode)
file = SDL_IOFromFile(filename.c_str(), getModeString(newmode));
if (file == nullptr)
{
std::string err = SDL_GetError();
throw love::Exception("Could not open file %s: %s", filename.c_str(), SDL_GetError());
if (err != "")
throw love::Exception("Could not open file %s: %s", filename.c_str(), err.c_str());
}
else
mode = newmode;
mode = newmode;
return file != nullptr;
}