mirror of
https://github.com/love2d/love.git
synced 2026-08-17 11:00:31 +02:00
Metal view creation failure shows a relevant error message.
This commit is contained in:
@@ -411,9 +411,9 @@ bool Window::createWindowAndContext(int x, int y, int w, int h, Uint32 windowfla
|
|||||||
|
|
||||||
if (metalView == nullptr && window != nullptr)
|
if (metalView == nullptr && window != nullptr)
|
||||||
{
|
{
|
||||||
|
contexterror = SDL_GetError();
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
window = nullptr;
|
window = nullptr;
|
||||||
// TODO: error message
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -430,13 +430,13 @@ bool Window::createWindowAndContext(int x, int y, int w, int h, Uint32 windowfla
|
|||||||
|
|
||||||
if (failed)
|
if (failed)
|
||||||
{
|
{
|
||||||
std::string title = "Unable to create OpenGL window";
|
std::string title = "Unable to create renderer";
|
||||||
std::string message = "This program requires a graphics card and video drivers which support OpenGL 2.1 or OpenGL ES 2.";
|
std::string message = "This program requires a graphics card and video drivers which support OpenGL 2.1 or OpenGL ES 2.";
|
||||||
|
|
||||||
if (!glversion.empty())
|
if (!glversion.empty())
|
||||||
message += "\n\nDetected OpenGL version:\n" + glversion;
|
message += "\n\nDetected OpenGL version:\n" + glversion;
|
||||||
else if (!contexterror.empty())
|
else if (!contexterror.empty())
|
||||||
message += "\n\nOpenGL context creation error: " + contexterror;
|
message += "\n\nRenderer context creation error: " + contexterror;
|
||||||
else if (!windowerror.empty())
|
else if (!windowerror.empty())
|
||||||
message += "\n\nSDL window creation error: " + windowerror;
|
message += "\n\nSDL window creation error: " + windowerror;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user