Sign in to follow this  
AntiGuy

[SDL] Annoying window problem.

Recommended Posts

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


Link to post
Share on other sites
Here's my setup


#include "Main.h"//includes all the needed files

float Timer; float timedelta; Uint32 lasttickcount;
int main(int argc, char* argv[])
{
LoadGame();

//Setup window

//LoadIMGs
for(;;)
{


//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 frame

if (Timer >= 0.0)//usually 0.20f
{
SDL_PollEvent(&event);




//Check controls
//Draw IMGs
//Flip Screen

CalculateFrameRate();


Timer = 0.0f;
}
//Check Exit

}
//FreeIMGS
QuitGame();
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


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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

Sign in to follow this