[SDL] Annoying window problem.

Started by
3 comments, last by Kitasia 18 years, 10 months ago
When I start an application in fullscreen eventually it minimizes itself (I think as soon as the title and icon hit the task bar in windows). I'm pretty sure this has something to do with polling. Any suggestions?
Advertisement
Can we see some code please, this problem sounds like something is happening in there out of place.
Here's my setup

#include "Main.h"//includes all the needed filesfloat Timer; float timedelta; Uint32 lasttickcount;int main(int argc, char* argv[])  {LoadGame();//Setup window//LoadIMGsfor(;;){//Timer is incremented by timedelta (that is, the time it took the last frame to draw)Timer += timedelta;timedelta = float (SDL_GetTicks() - lasttickcount) / 1000;lasttickcount = SDL_GetTicks();//if the timer is larger than the time for each frameif (Timer >= 0.0)//usually 0.20f{SDL_PollEvent(&event);//Check controls//Draw IMGs//Flip ScreenCalculateFrameRate();Timer = 0.0f;}//Check Exit}//FreeIMGSQuitGame();SDL_Quit();return(0);}


Ignore the weird order, I was just doing some tests.

I'll also note that the same thing happens when I load marius' lesson6 on cone3d.
Quote:Original post by AntiGuy
I'll also note that the same thing happens when I load marius' lesson6 on cone3d.


I have not looked at your code yet, but if it is happening there as well, then you might want to try and update your video drivers as well as make sure you are using the latest version of SDL (1.2.8). It should not happen on Cone3D's tutorials.
I just updated my drivers today and it's been happening since SDL 1.2.7[grin]. It really isn't a big deal though it's just annoying how windows pulls away from the game just to put the application into the task bar.

This topic is closed to new replies.

Advertisement