I have a strange result:
- when vsync is ON, DXUTIsVsyncEnabled() returns FALSE
- when vsync is OFF, DXUTIsVsyncEnabled() returns TRUE
I read the source:
bool WINAPI DXUTIsVsyncEnabled()
{
DXUTDeviceSettings* pDS = GetDXUTState().GetCurrentDeviceSettings();
if( pDS )
{
if( DXUTIsD3D9( pDS ) )
return ( pDS->d3d9.pp.PresentationInterval == D3DPRESENT_INTERVAL_IMMEDIATE );
else
return ( pDS->d3d10.SyncInterval == 0 );
}
else
{
return true;
}
};
Microsoft developers seem to have made a big error
They should have called it DXUTIsVsyncDisabled()
( or they should have returned a != test ... )
I hope this error has been fixed in later versions...
Is there a more direct way to get the presentation interval of a d3d9 device ?