Hi everyone,
I’m attempting a Windows port of a program I have originally written for
Linux, by using mingw + gcc 3.2 + pthread-win32 + libsdl 1.25. I managed
to compile run the program successfully, but when I set a windowed video
mode, Windows XP thinks the window is frozen and displays “Not
responding” on the title bar, even if I am drawing to the surface and I
see what I expect. I cannot move the window (an hourglass cursor appears
when I move the mouse pointer over the window), but I get everything
drawn onto the surface and the keyboard responds correctly. I am
initializing SDL as follows:
int InitSDL(int videoWidth, int videoHeight)
{
if(SDL_Init(SDL_INIT_VIDEO) < 0)
{
fprintf(stderr,
“Could not initialize SDL: %s\n”, SDL_GetError());
return 0;
}
SDL_WM_SetCaption("Video Device", " ");
if(!SDL_VideoModeOK(videoWidth, videoHeight,
SCREEN_DEPTH, SDL_SWSURFACE))
{
fprintf(stderr,
"Video mode not supported: %s\n", SDL_GetError());
return 0;
}
if((screen = SDL_SetVideoMode(videoWidth, videoHeight,
SCREEN_DEPTH, SDL_SWSURFACE)) == NULL)
{
fprintf(stderr,
"Could not set video mode!: %s\n", SDL_GetError());
return 0;
}
InitColorPalette();
/* if(SDL_EnableKeyRepeat(700, 700) < 0)
{
fprintf(stderr,
“Could not set keyboard values!: %s\n”, SDL_GetError());
return 0;
}
*/
return 1;
}
I am using the windows 1.25a version of the SDL runtime DLL, not the DLL
I compiled myself on MinGW. Any help would be much appreciated.
Best Regards,–
Claudio Alvarez