[SDL] Annoying window problem.

Recommended Posts

AntiGuy    267
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?

Share this post

Share on other sites
Drew_Benton    1861
Can we see some code please, this problem sounds like something is happening in there out of place.

Share this post

Share on other sites
AntiGuy    267
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.

Share this post

Share on other sites
Drew_Benton    1861
Quote:
 Original post by AntiGuyI'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.

Share this post

Share on other sites
AntiGuy    267
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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now