Hello Guys,
First: I am new to SFML and already love it! So I want to contribute with a small Feature-Request
I had a small issue today. My Applicatio crashed with the message:
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 12 (X_ConfigureWindow)
Value in failed request: 0x0
Serial number of failed request: 64
Current serial number in output stream: 64
After one hour work I figured out I accidentally called Widnow::SetSize with width==0 and height==0
It's no problem for me anymore, but for other new users it could be nice if some sort af error message (warning in console?) could telll them illegal size values has been used. Maybe we could use in Window.cpp something like this?
////////////////////////////////////////////////////////////
void Window::SetSize(unsigned int width, unsigned int height)
{
if(width <= 0)
Err() << "Window width must be > 0" << std::endl;
if(height <= 0)
Err() << "Window height must be > 0" << std::endl;
if (myWindow)
myWindow->SetSize(width, height);
}
PS: I could reproduce it on two different Linux-Computers (one with NVidia and one with Intel GPU) so I don't think this to be a problem of my drivers.
best regards,
Robert