• Advertisement
Sign in to follow this  

Background utilities disturb to work of my Direct 3D application

This topic is 4365 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

Maybe somebody know how to solve this problem. During beta-testing we noticed that some (not all!) antiviruses, firewalls, utilities disturb to work of our Direct 3D application with own activity. As result I see short jerks in 3D scenes. Earlier I thought that they should see that CPU is loaded at this moment and at least fact that we initialized fullscreen D3D mode should say that we need all CPU resources at this moment. Please advise, what we can do to improve this situation. Maybe some flags, or Windows API calls. Or at least, explain me how usually such utilities detect unactivity of user to start work in background? [Edited by - Malder1 on May 8, 2006 3:26:13 PM]

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Malder1
Earlier I thought that they should see that CPU is loaded at this moment and at least fact that we initialized fullscreen D3D mode should say that we need all CPU resources at this moment.

No, that is not the case. Just because that you are a big, bad graphics application doesn't mean that everything else should shut down [wink]. Yea, you do have exclusive access to the GPU, and can force the OS to give you most of the CPU, but at some point, it's going to schedule other processes.

Quote:
Please advise, what we can do to improve this situation.
Maybe some flags, or Windows API calls.

Instead of figuring out how to shut everything off, you should instead be playing nice with everyone else. There is nothing worse than a game that makes the rest of the system unusable. The user should be able to alt-tab out, do normal stuff, and come back into the game again.

With that said, I have indeed had my own antivirus software interfere with certain games, and it is pretty annoying. You can advise your users to turn of the scanning functionality of the software while the app is running, or some other alternative.

Share this post


Link to post
Share on other sites
Thanks for the response!
We have multimedia application and I explain again and again every day that user need to disable antivirus if it disturbs to our program. But it seems to be a bad solution,unfortunately.

Share this post


Link to post
Share on other sites
Quote:
Original post by Malder1
Thanks for the response!
We have multimedia application and I explain again and again every day that user need to disable antivirus if it disturbs to our program. But it seems to be a bad solution,unfortunately.

If it is really that troublesome, maybe your message loop structure could be improved a bit. Generally, something like this works well:

// Message Loop
MSG msg;
ZeroMemory( &msg, sizeof(msg) );

while( msg.message != WM_QUIT )
{
if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
// We have a message on the queue, so let Windows deal with it
// This keeps our app responsive to window events
TranslateMessage( &msg );
DispatchMessage( &msg );
}
else
{
// Update your application - draw a frame, ect
app->Update();
}
}

Share this post


Link to post
Share on other sites
Not entirely sure its a good idea to get users to switch off their AV/Firewall's etc... just for a game, but I suppose its upto them [smile]

Anyway, its not gonna be easy - but if you have a list of known "bad" programs then you could try and scan the active threads at application start-up. If you spot one that might be a known problem, pop-up a message saying that the game will still function, but maybe not as well - and recommend that they temporarily disable it.

hth
Jack

Share this post


Link to post
Share on other sites
One our customer wrote me Task Managers shows that "System" process has about 14% of CPU load all time. What it could be? Driver, Windows service? Is there any way to learn it? Any ideas are highly appreciated!

Share this post


Link to post
Share on other sites
I found that we can solve problem if set highest priority to our application:
SetPriorityClass(GetCurrentProcess,HIGH_PRIORITY_CLASS);

Is it good solution?

Share this post


Link to post
Share on other sites
Quote:
Original post by Malder1
I found that we can solve problem if set highest priority to our application:
SetPriorityClass(GetCurrentProcess,HIGH_PRIORITY_CLASS);

Is it good solution?


No because it will make the rest of the system unusable. If the user windows your app or alt-tabs out, then their other applications will be almost completely unusable.

-me

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement