|
@@ -20,10 +20,11 @@ int main()
|
|
|
|
|
|
/// [2] Create components
|
|
|
// [2.1] Create window
|
|
|
- SDL_Surface* screen = SDL_SetVideoMode(640, 480, 32, SDL_HWSURFACE|SDL_DOUBLEBUF);
|
|
|
+ const int width(640), height(480);
|
|
|
+ SDL_Surface* screen = SDL_SetVideoMode(width, height, 32, SDL_HWSURFACE|SDL_DOUBLEBUF);
|
|
|
if ( !screen )
|
|
|
{
|
|
|
- std::cout << "Unable to set 640x480 video: " << SDL_GetError() << std::endl;
|
|
|
+ std::cout << "Unable to set " << width << "x" << height << " video: " << SDL_GetError() << std::endl;
|
|
|
return 1;
|
|
|
}
|
|
|
|