int searchflags = SDL_HWSURFACE;// | SDL_FULLSCREEN;
SDL_Rect **modes = SDL_ListModes(NULL, searchflags);
if (modes == NULL)
- throw "Impossible to get the screen resolution !";
+ throw "Impossible to get the screen resolution !";
else if (modes == (SDL_Rect **)-1)
{
resolution_x = 1280;
else
{
int i;
+ resolution_x = 1024;
+ resolution_y = 768;
for (i=0 ; modes[i] ; i++)
{
cout << "Resolution available: " << modes[i]->w << "x" << modes[i]->h << endl;
- if (modes[i]->w == 1280 && modes[i]->h == 1024)
+ if (modes[i]->w > resolution_x)//== 1280 && modes[i]->h == 1024)
{
- resolution_x = modes[i]->w;
- resolution_y = modes[i]->h;
- break;
+ resolution_x = modes[i]->w;
+ resolution_y = modes[i]->h;
+ //break;
}
}
- if (!modes[i])
+/* if (!modes[i])
{
cout << "Resolution wanted not available" << endl;
resolution_x = 1024;
resolution_y = 768;
- }
+ }*/
}
\r
#if 0//SDL_VERSION_ATLEAST(1,3,0)\r
SDL_GL_SetAttribute(SDL_GL_ACCUM_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ACCUM_ALPHA_SIZE, 8);
- int flags = SDL_OPENGL | SDL_OPENGL | SDL_HWSURFACE;// | SDL_FULLSCREEN;
+ int flags = SDL_OPENGL | SDL_OPENGL | SDL_HWSURFACE | SDL_FULLSCREEN;
glEnable(GL_MULTISAMPLE);