Check what is the value of gluErrorString(glGetError()) after the call to glReadBuffer. Overall, the code seems legit, but I'm not an OpenGL expert by any means.
Do you draw something in OpenGL? When do you call this Screenshot function?
Edit: GL_FRONT_AND_BACK seems to be illegal value for glReadBuffer. Try with GL_FRONT_LEFT instead. Quoting the documentation:
mode Specifies a color buffer. Accepted values are GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_FRONT, GL_BACK, GL_LEFT, GL_RIGHT, and GL_AUXi, where i is between 0 and the value of GL_AUX_BUFFERS minus 1. ...
Nonstereo double-buffered configurations have only a front left and a back left buffer
Thank you very much for your help! Me too not a expert of OpenGL but sure, you know it better than me becuse i am new in OpenGL and my English isn't very good to understand everything. Oh, i am an idiot First, I might say thats: Already, I called Screenshot function with screen surface and drew something to screen.The problem weren't them. When i tried GL_FRONT_LEFT, i made it just and i have a question: why doesn't it be when i tried GL_FRONT_RIGHT instead? What is different between LEFT and RIGHT? Does it mean front face and back face. I will try all of them.
You spoke to a interesting point about old games. Why the old games work less quality on newer computers? I think, maybe the reason is developers's a premeditation or mismatchs between old versions and new versions. I don't know which one but me too wonder.