mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
NativeFile: Do not check if SDL_GetError() is empty string.
This commit is contained in:
@@ -91,14 +91,9 @@ bool NativeFile::open(Mode newmode)
|
|||||||
|
|
||||||
file = SDL_IOFromFile(filename.c_str(), getModeString(newmode));
|
file = SDL_IOFromFile(filename.c_str(), getModeString(newmode));
|
||||||
if (file == nullptr)
|
if (file == nullptr)
|
||||||
{
|
throw love::Exception("Could not open file %s: %s", filename.c_str(), SDL_GetError());
|
||||||
std::string err = SDL_GetError();
|
|
||||||
|
|
||||||
if (err != "")
|
mode = newmode;
|
||||||
throw love::Exception("Could not open file %s: %s", filename.c_str(), err.c_str());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
mode = newmode;
|
|
||||||
|
|
||||||
return file != nullptr;
|
return file != nullptr;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user