[SDL] SDL executables behaving strangely on a particular computer.

Started by
4 comments, last by The_Marlboro_Man 16 years, 11 months ago
Hello. I´m not sure if this goes in "For Begginers" but since discussion of game libraries goes here I think I´ll give it a shot. I am much of a beginner programmer and started fiddling with SDL a while, managing to make small demos and a couple of playable ideas. These executables (compiled in DevC++ for Windows) perfectly run in all the WinXP systems I´ve tried, in all but one. Here´s the problem: in this particular computer the window (in any of the projects) won´t show anything most of the time but this nasty effect of Windows showing "what´s behind" in the desktop. Sometimes it may show a frame of what should be happening, but will freeze on that frame... I´ve checked the program works as the events are polled, it is possible to exit and it even writes coherent output to the stdout... It is just that nothing (or nothing right) shows. I´ve tried locking the screen and unlocking it and also fullscreen modes with the same outcome. As said, it works in all computers I´ve tried except that one (I could post some example code if you wish). I tried diverse sdl.dll files to no avail. The computer itself runs applications like ZSnes (wich I think uses SDL?) and has no other problems like that... I could try any suggestions when I get my hands on that computer (not daily) and would really like to see the issue solved. What could the problem be?. Any help is appreciated. Thanks in advance.
Advertisement
I'd recommend you get hold of someone else's simple SDL program to narrow down whether it's your code or a problem with the installation.
Kylotan, thanks for the answer (actually, twice thanks for the answers in both posts). I will start with your idea... I´m not sure of what to get but I think the code from the Lazyfoo tutorials should do: I will copy and paste the first of them and compile something.

Is it possible that it is an error on compile time with the computer I work on?. In that case I should get something already compiled... I think that there was even a Tetris game (on Lazyfoo´s site) I could try in that case but that´s a much more complex code.

I should be able to test that tonight. A problem with the installation?. Should I look for all sdl.dll files in that computer´s system and delete them if there is trouble?.
If you are using hardware acceleration, try switching to software surfaces instead. This solved a similar problem I had.
You mean code like?

SDL_Surface * pantalla=NULL;pantalla=SDL_SetVideoMode(ANCHO, ALTO, BPP, SDL_SWSURFACE);


I´ll change it in the program I am currently trying but already had it non working in a little demo... But being a similar problem, could there be something else you changed Simian Man?. Thanks anyway :).

As for testing, I got a pack of four programs that I will use to test that system: the first Lazyfoo exercise, Lazyfoo´s tetris, my first SDL demo (with SDL_SWSURFACE enabled) and the last one I´m trying. I´ll try and post results later.
Sorry for the long reply but well, this thread is pointless now. It's a shame but I no longer have access to that particular computer so I'm gonna have a hard time trying to figure out what went wrong!.

Thanks for your help and time anyway :).

This topic is closed to new replies.

Advertisement