Hello!
I have started a game project and it is going well. However, when I try to send it to the game's artist, he cannot run it. The direct3D device cannot be created on his computer. For a reason I don't remember, I tought the problem was the PresentationInterval, so I wrote the following code :
D3DCAPS9 cardcaps;
D3DManager.GetCaps(cardcaps);
std::string supportedPresentationIntervals = "This card supports :\n";
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_DEFAULT)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_DEFAULT\n";
}
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_ONE)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_ONE\n";
}
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_TWO)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_TWO\n";
}
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_THREE)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_THREE\n";
}
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_FOUR)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_FOUR\n";
}
if(cardcaps.PresentationIntervals & D3DPRESENT_INTERVAL_IMMEDIATE)
{
supportedPresentationIntervals += "D3DPRESENT_INTERVAL_IMMEDIATE\n";
}
BGL_LOG_USELESSINFO(supportedPresentationIntervals.c_str());
Now, when he runs it, the created log file contains:
This card supports :
D3DPRESENT_INTERVAL_FOUR
And if I set the presentation interval to this value it still does not work at his house (it might be another present_parameter that causes the problem...)
The weird thing is that if I run this at home, where i use D3DPRESENT_INTERVAL_IMMEDIATE, my log file contains:
This card supports :
that's all! But the app works... strange isn't it?
Is my cardcap-checking code right?