Added detection of buggy Voodoo3 drivers, then found a hack that fixes the problems. Sigh...
This commit is contained in:
@@ -256,6 +256,9 @@ If you experience any visual errors, please visit your video card manufacturer's
|
|||||||
web site and download the latest Direct3D 8.1 drivers. Below is a list of known
|
web site and download the latest Direct3D 8.1 drivers. Below is a list of known
|
||||||
issues that are thought to be video card driver bugs:<br>
|
issues that are thought to be video card driver bugs:<br>
|
||||||
<br>
|
<br>
|
||||||
|
* <a name="Voodoo3">Voodoo 3</a><br>
|
||||||
|
Blah<br>
|
||||||
|
<br>
|
||||||
* S3 Savage family cards (e.g. Diamond Stealth)<br>
|
* S3 Savage family cards (e.g. Diamond Stealth)<br>
|
||||||
Symptom: The right edge of some graphics appears "cut off".<br>
|
Symptom: The right edge of some graphics appears "cut off".<br>
|
||||||
Explanation: Drivers do not properly handle textures >= 512x512, resulting in
|
Explanation: Drivers do not properly handle textures >= 512x512, resulting in
|
||||||
|
|||||||
@@ -143,9 +143,13 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
|
|||||||
DISPLAY->Translate( m_temp.pos.x, m_temp.pos.y, m_temp.pos.z );
|
DISPLAY->Translate( m_temp.pos.x, m_temp.pos.y, m_temp.pos.z );
|
||||||
DISPLAY->Scale( m_temp.scale.x, m_temp.scale.y, m_temp.scale.z );
|
DISPLAY->Scale( m_temp.scale.x, m_temp.scale.y, m_temp.scale.z );
|
||||||
|
|
||||||
if( m_temp.rotation.x != 0 ) DISPLAY->RotateX( m_temp.rotation.x );
|
|
||||||
if( m_temp.rotation.y != 0 ) DISPLAY->RotateY( m_temp.rotation.y );
|
if( m_temp.rotation.x != 0 )
|
||||||
if( m_temp.rotation.z != 0 ) DISPLAY->RotateZ( m_temp.rotation.z );
|
DISPLAY->RotateX( m_temp.rotation.x );
|
||||||
|
if( m_temp.rotation.y != 0 )
|
||||||
|
DISPLAY->RotateY( m_temp.rotation.y );
|
||||||
|
if( m_temp.rotation.z != 0 )
|
||||||
|
DISPLAY->RotateZ( m_temp.rotation.z );
|
||||||
}
|
}
|
||||||
|
|
||||||
void Actor::EndDraw()
|
void Actor::EndDraw()
|
||||||
|
|||||||
@@ -284,6 +284,8 @@ void Player::DrawPrimitives()
|
|||||||
|
|
||||||
DISPLAY->LookAt(Eye, At, Up);
|
DISPLAY->LookAt(Eye, At, Up);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
DISPLAY->PushMatrix();
|
||||||
|
|
||||||
m_GrayArrowRow.Draw();
|
m_GrayArrowRow.Draw();
|
||||||
m_NoteField.Draw();
|
m_NoteField.Draw();
|
||||||
@@ -294,6 +296,8 @@ void Player::DrawPrimitives()
|
|||||||
DISPLAY->ExitPerspective();
|
DISPLAY->ExitPerspective();
|
||||||
DISPLAY->PopMatrix();
|
DISPLAY->PopMatrix();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
DISPLAY->PopMatrix();
|
||||||
|
|
||||||
m_Judgment.Draw();
|
m_Judgment.Draw();
|
||||||
|
|
||||||
|
|||||||
@@ -780,7 +780,10 @@ void RageDisplay::RotateY( float r )
|
|||||||
|
|
||||||
void RageDisplay::RotateZ( float r )
|
void RageDisplay::RotateZ( float r )
|
||||||
{
|
{
|
||||||
glRotatef(r* 180/PI, 0, 0, 1);
|
// HACK: Rotation about (0,0,1) seems to be broken in many Voodoo3 drivers,
|
||||||
|
// but only while using orthographic projections. Strange...
|
||||||
|
// Adding a tiny X component fixes the problem. -Chris
|
||||||
|
glRotatef(r* 180/PI, 0.00001f, 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RageDisplay::smPostMultMatrixf( const RageMatrix &f )
|
void RageDisplay::smPostMultMatrixf( const RageMatrix &f )
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ DSound::DSound()
|
|||||||
HRESULT hr;
|
HRESULT hr;
|
||||||
|
|
||||||
// Initialize COM
|
// Initialize COM
|
||||||
if( hr = CoInitialize( NULL ) )
|
if( FAILED( hr = CoInitialize( NULL ) ) )
|
||||||
RageException::ThrowNonfatal(hr_ssprintf(hr, "CoInitialize"));
|
RageException::ThrowNonfatal(hr_ssprintf(hr, "CoInitialize"));
|
||||||
|
|
||||||
// Create IDirectSound using the primary sound device
|
// Create IDirectSound using the primary sound device
|
||||||
|
|||||||
@@ -2,56 +2,134 @@
|
|||||||
#include "DebugInfoHunt.h"
|
#include "DebugInfoHunt.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
|
#include "../../archutils/Win32/GotoURL.h"
|
||||||
|
|
||||||
|
|
||||||
void PrintDebugInfoWin9x()
|
struct VideoDriverInfo
|
||||||
|
{
|
||||||
|
CString sProvider;
|
||||||
|
CString sDescription;
|
||||||
|
CString sVersion;
|
||||||
|
CString sDate;
|
||||||
|
CString sDeviceID;
|
||||||
|
};
|
||||||
|
|
||||||
|
CString GetRegValue( HKEY hKey, CString sName )
|
||||||
|
{
|
||||||
|
char szBuffer[MAX_PATH];
|
||||||
|
DWORD nSize = sizeof(szBuffer)-1;
|
||||||
|
if( RegQueryValueEx(hKey, sName, NULL, NULL, (LPBYTE)szBuffer, &nSize) == ERROR_SUCCESS )
|
||||||
|
return szBuffer;
|
||||||
|
else
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
|
bool GetDebugInfoWin9x( VideoDriverInfo& infoOut )
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Class\\Display\\0000", &hkey) != ERROR_SUCCESS)
|
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Class\\Display\\0000", &hkey) != ERROR_SUCCESS)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
char szBuffer[MAX_PATH];
|
infoOut.sDate = GetRegValue( hkey, "DriverDate");
|
||||||
DWORD nSize;
|
infoOut.sDescription = GetRegValue( hkey, "DriverDesc");
|
||||||
|
infoOut.sDeviceID = GetRegValue( hkey, "MatchingDeviceId");
|
||||||
#define GETSZ2(a) nSize = sizeof(szBuffer)-1; if( RegQueryValueEx(hkey, a, NULL, NULL, (LPBYTE)szBuffer, &nSize) == ERROR_SUCCESS ) LOG->Info("%-15s:\t%s", a, szBuffer);
|
infoOut.sProvider = GetRegValue( hkey, "ProviderName");
|
||||||
|
infoOut.sVersion = GetRegValue( hkey, "Ver");
|
||||||
LOG->Info("Video Driver Information (win9x):");
|
|
||||||
GETSZ2("DriverDate");
|
|
||||||
GETSZ2("DriverDesc");
|
|
||||||
GETSZ2("MatchingDeviceId");
|
|
||||||
GETSZ2("ProviderName");
|
|
||||||
GETSZ2("Ver");
|
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void PrintDebugInfoWinNT()
|
bool GetDebugInfoWinNT( VideoDriverInfo& infoOut )
|
||||||
{
|
{
|
||||||
HKEY hkey;
|
HKEY hkey;
|
||||||
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000", &hkey) != ERROR_SUCCESS)
|
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000", &hkey) != ERROR_SUCCESS)
|
||||||
return;
|
return false;
|
||||||
|
|
||||||
char szBuffer[MAX_PATH];
|
infoOut.sDate = GetRegValue( hkey, "DriverDate");
|
||||||
DWORD nSize;
|
infoOut.sDescription = GetRegValue( hkey, "DriverDesc");
|
||||||
|
infoOut.sDeviceID = GetRegValue( hkey, "MatchingDeviceId");
|
||||||
#define GETSZ2(a) nSize = sizeof(szBuffer)-1; if( RegQueryValueEx(hkey, a, NULL, NULL, (LPBYTE)szBuffer, &nSize) == ERROR_SUCCESS ) LOG->Info("%-15s:\t%s", a, szBuffer);
|
infoOut.sProvider = GetRegValue( hkey, "ProviderName");
|
||||||
|
infoOut.sVersion = GetRegValue( hkey, "DriverVersion");
|
||||||
LOG->Info("Video Driver Information (winnt):");
|
|
||||||
GETSZ2("DriverDate");
|
|
||||||
GETSZ2("DriverDesc");
|
|
||||||
GETSZ2("DriverVersion");
|
|
||||||
GETSZ2("InfSection");
|
|
||||||
GETSZ2("ProviderName");
|
|
||||||
GETSZ2("MatchingDeviceId");
|
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HandleKnownTerribleDriver( VideoDriverInfo info )
|
||||||
|
{
|
||||||
|
struct ProblemAndBookmark
|
||||||
|
{
|
||||||
|
char szProblemProvider[1024];
|
||||||
|
char szProblemDescription[1024];
|
||||||
|
char szReadMeBookmark[64];
|
||||||
|
};
|
||||||
|
ProblemAndBookmark ENTRIES[] =
|
||||||
|
{
|
||||||
|
// Hacked around the bug in the V3 driver. -Chris
|
||||||
|
// {"3dfx Interactive, Inc. (Optimized by Amigamerlin)", "Voodoo3 PCI", "Voodoo3"},
|
||||||
|
{"blah", "blah", "Voodoo3"},
|
||||||
|
};
|
||||||
|
const int NUM_ENTRIES = sizeof(ENTRIES) / sizeof(ENTRIES[0]);
|
||||||
|
|
||||||
|
for( int i=0; i<NUM_ENTRIES; i++ )
|
||||||
|
{
|
||||||
|
if( info.sProvider == ENTRIES[i].szProblemProvider &&
|
||||||
|
info.sDescription == ENTRIES[i].szProblemDescription )
|
||||||
|
{
|
||||||
|
CString sQuestion = ssprintf(
|
||||||
|
"Video Driver Information:\n\n"
|
||||||
|
"Provider: %s\n"
|
||||||
|
"Description: %s\n"
|
||||||
|
"Version: %s\n"
|
||||||
|
"Date: %s\n"
|
||||||
|
"DeviceID: %s\n"
|
||||||
|
"\n"
|
||||||
|
"This video driver is known to have bugs that make StepMania unplayable.\n"
|
||||||
|
"Click OK to see information on where to find a newer driver.\n"
|
||||||
|
"Click Cancel to dismiss this warning and continue playing.",
|
||||||
|
info.sProvider.GetString(),
|
||||||
|
info.sDescription.GetString(),
|
||||||
|
info.sVersion.GetString(),
|
||||||
|
info.sDate.GetString(),
|
||||||
|
info.sDeviceID.GetString() );
|
||||||
|
if( IDOK == MessageBox(NULL, sQuestion, "Known problem driver", MB_ICONHAND|MB_OKCANCEL) )
|
||||||
|
{
|
||||||
|
char szBuffer[MAX_PATH];
|
||||||
|
GetCurrentDirectory( MAX_PATH, szBuffer );
|
||||||
|
GotoURL( ssprintf("%s/README-FIRST.html#%s", szBuffer, ENTRIES[i].szReadMeBookmark) );
|
||||||
|
exit(1); // Is there a better way to clean up? -Chris
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void GetDisplayDriverDebugInfo()
|
static void GetDisplayDriverDebugInfo()
|
||||||
{
|
{
|
||||||
PrintDebugInfoWin9x(); // will print nothing if not 9x
|
VideoDriverInfo info;
|
||||||
PrintDebugInfoWinNT(); // will print nothing if not NT
|
|
||||||
|
if( GetDebugInfoWin9x(info) )
|
||||||
|
goto got_debug_info;
|
||||||
|
if( GetDebugInfoWinNT(info) )
|
||||||
|
goto got_debug_info;
|
||||||
|
|
||||||
|
LOG->Warn( "Failed to get video card driver info." );
|
||||||
|
return;
|
||||||
|
|
||||||
|
got_debug_info:
|
||||||
|
|
||||||
|
LOG->Info("Video Driver Information:");
|
||||||
|
LOG->Info("%-15s:\t%s", "Provider", info.sProvider.GetString());
|
||||||
|
LOG->Info("%-15s:\t%s", "Description", info.sDescription.GetString());
|
||||||
|
LOG->Info("%-15s:\t%s", "Version", info.sVersion.GetString());
|
||||||
|
LOG->Info("%-15s:\t%s", "Date", info.sDate.GetString());
|
||||||
|
LOG->Info("%-15s:\t%s", "DeviceID", info.sDeviceID.GetString());
|
||||||
|
|
||||||
|
HandleKnownTerribleDriver( info );
|
||||||
}
|
}
|
||||||
|
|
||||||
static CString wo_ssprintf( MMRESULT err, const char *fmt, ...)
|
static CString wo_ssprintf( MMRESULT err, const char *fmt, ...)
|
||||||
|
|||||||
Reference in New Issue
Block a user