Jump to content
  • Advertisement
Sign in to follow this  
Kitasia

[SDL] Annoying window problem.

This topic is 4899 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!