speed up editor beat bar drawing (frame rate is not 3x as fast!)

fixed inaccurate 2k/xp video card detection
This commit is contained in:
Chris Danford
2003-02-22 00:22:27 +00:00
parent 5a4d403daf
commit 294144575c
13 changed files with 149 additions and 165 deletions
Binary file not shown.
Binary file not shown.
+3 -3
View File
@@ -144,11 +144,11 @@ void Actor::BeginDraw() // set the world matrix and calculate actor properties
DISPLAY->Scale( m_temp.scale.x, m_temp.scale.y, m_temp.scale.z );
// if( m_temp.rotation.x != 0 )
if( m_temp.rotation.x != 0 )
DISPLAY->RotateX( m_temp.rotation.x );
// if( m_temp.rotation.y != 0 )
if( m_temp.rotation.y != 0 )
DISPLAY->RotateY( m_temp.rotation.y );
// if( m_temp.rotation.z != 0 )
if( m_temp.rotation.z != 0 )
DISPLAY->RotateZ( m_temp.rotation.z );
}
+30 -34
View File
@@ -38,6 +38,9 @@ NoteField::NoteField()
m_rectMarkerBar.TurnShadowOff();
m_rectMarkerBar.SetEffectDiffuseShift( 2, RageColor(1,1,1,0.5f), RageColor(0.5f,0.5f,0.5f,0.5f) );
m_sprBars.Load( THEME->GetPathTo("Graphics","edit bars") );
m_sprBars.StopAnimating();
m_fBeginMarker = m_fEndMarker = -1;
m_fPercentFadeToFail = -1;
@@ -91,48 +94,41 @@ void NoteField::DrawBeatBar( const float fBeat )
NoteType nt = BeatToNoteType( fBeat );
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
const float fYOffset = ArrowGetYOffset( m_PlayerNumber, fBeat );
const float fYPos = ArrowGetYPos( m_PlayerNumber, fYOffset );
RageVertex v[4]; // upper-left, upper-right, lower-right, lower-left
memset( v, 0, sizeof(v) );
int iSegWidth;
int iSpaceWidth;
float fBrightness;
float fScrollSpeed = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fScrollSpeed;
switch( nt )
float fAlpha;
int iState;
if( bIsMeasure )
{
default: ASSERT(0);
case NOTE_TYPE_4TH: iSegWidth = 16; iSpaceWidth = 0; fBrightness = 1; break;
case NOTE_TYPE_8TH: iSegWidth = 12; iSpaceWidth = 4; fBrightness = SCALE(fScrollSpeed,1.f,2.f,0.f,1.f); break;
case NOTE_TYPE_16TH:iSegWidth = 4; iSpaceWidth = 4; fBrightness = SCALE(fScrollSpeed,2.f,4.f,0.f,1.f); break;
fAlpha = 1;
iState = 0;
}
else
{
float fScrollSpeed = GAMESTATE->m_PlayerOptions[m_PlayerNumber].m_fScrollSpeed;
switch( nt )
{
default: ASSERT(0);
case NOTE_TYPE_4TH: fAlpha = 1; iState = 1; break;
case NOTE_TYPE_8TH: fAlpha = SCALE(fScrollSpeed,1.f,2.f,0.f,1.f); iState = 2; break;
case NOTE_TYPE_16TH:fAlpha = SCALE(fScrollSpeed,2.f,4.f,0.f,1.f); iState = 3; break;
}
CLAMP( fAlpha, 0, 1 );
}
CLAMP( fBrightness, 0, 1 );
DISPLAY->SetTexture( NULL );
DISPLAY->SetTextureModeModulate();
DISPLAY->SetBlendModeNormal();
float fWidth = GetWidth();
for( float f=-fWidth/2; f<+fWidth/2; )
{
v[0].c = v[1].c = v[2].c = v[3].c = RageColor(1,1,1,0.5f*fBrightness);
float fFrameWidth = m_sprBars.GetUnzoomedWidth();
float fLeft = f;
float fRight = f+iSegWidth;
float fHeight = bIsMeasure ? 6.f : 3.f;
v[0].p = RageVector3( fLeft, fYPos-fHeight/2, 0 ); // upper-left
v[1].p = RageVector3( fRight, fYPos-fHeight/2, 0 ); // upper-right
v[2].p = RageVector3( fRight, fYPos+fHeight/2, 0 ); // lower-right
v[3].p = RageVector3( fLeft, fYPos+fHeight/2, 0 ); // lower-left
m_sprBars.SetX( 0 );
m_sprBars.SetY( fYPos );
m_sprBars.SetDiffuse( RageColor(1,1,1,fAlpha) );
m_sprBars.SetState( iState );
m_sprBars.SetCustomTextureRect( RectF(0,SCALE(iState,0.f,4.f,0.f,1.f), fWidth/fFrameWidth, SCALE(iState+1,0.f,4.f,0.f,1.f)) );
m_sprBars.SetZoomX( fWidth/m_sprBars.GetUnzoomedWidth() );
m_sprBars.Draw();
DISPLAY->DrawQuad( v );
f += iSegWidth + iSpaceWidth;
}
if( bIsMeasure )
{
+1
View File
@@ -60,6 +60,7 @@ protected:
NoteDisplay m_NoteDisplay[MAX_NOTE_TRACKS];
// used in MODE_EDIT
Sprite m_sprBars; // 4 frames: Measure, 4th, 8th, 16th
BitmapText m_textMeasureNumber;
Quad m_rectMarkerBar;
Quad m_rectAreaHighlight;
+5
View File
@@ -102,6 +102,8 @@ PrefsManager::PrefsManager()
m_sSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
m_bAllowSoftwareRenderer = false;
m_sDefaultNoteSkin = "default";
ReadGlobalPrefsFromDisk( true );
@@ -173,6 +175,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame )
ini.GetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.GetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.GetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
ini.GetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.GetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
@@ -247,8 +250,10 @@ void PrefsManager::SaveGlobalPrefsToDisk()
ini.SetValueF( "Options", "MarathonVerSeconds", m_fMarathonVerSongSeconds );
ini.SetValueB( "Options", "ShowSongOptions", m_bShowSongOptions );
ini.SetValueI( "Options", "DefaultFailType", (int&)m_DefaultFailType );
ini.SetValueB( "Options", "bAllowSoftwareRenderer", m_bAllowSoftwareRenderer );
ini.SetValueB( "Options", "DDRExtremeDifficultySelect", m_bDDRExtremeDifficultySelect );
/* Only write these if they aren't the default. This ensures that we can change
* the default and have it take effect for everyone (except people who
* tweaked this value). */
+1
View File
@@ -82,6 +82,7 @@ public:
CString m_sSoundDrivers;
float m_fSoundVolume;
bool m_bAllowSoftwareRenderer;
/* Game-specific prefs: */
CString m_sDefaultNoteSkin;
+8 -29
View File
@@ -338,18 +338,8 @@ void ScreenEdit::Update( float fDeltaTime )
GAMESTATE->m_PlayerOptions[PLAYER_1].m_fScrollSpeed += fToMove;
}
float fPositionSeconds = m_soundMusic.GetPositionSeconds();
float fSongBeat, fBPS;
bool bFreeze;
m_pSong->GetBeatAndBPSFromElapsedTime( fPositionSeconds, fSongBeat, fBPS, bFreeze );
// update the global music statistics for other classes to access
GAMESTATE->m_fMusicSeconds = fPositionSeconds;
GAMESTATE->m_fCurBPS = fBPS;
GAMESTATE->m_bFreeze = bFreeze;
if(m_soundMusic.IsPlaying())
GAMESTATE->UpdateSongPosition(m_soundMusic.GetPositionSeconds());
if( m_EditMode == MODE_RECORDING )
{
@@ -381,7 +371,7 @@ void ScreenEdit::Update( float fDeltaTime )
if( m_EditMode == MODE_RECORDING || m_EditMode == MODE_PLAYING )
{
GAMESTATE->m_fSongBeat = fSongBeat;
// GAMESTATE->m_fSongBeat = fSongBeat;
if( GAMESTATE->m_fSongBeat > m_NoteFieldEdit.m_fEndMarker + 4 ) // give a one measure lead out
{
@@ -624,7 +614,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
m_fDestinationScrollSpeed = 2;
m_soundMarker.Play();
}
else // if( m_fDestinationScrollSpeed == 2 )
else if( m_fDestinationScrollSpeed == 2 )
{
m_fDestinationScrollSpeed = 1;
m_soundMarker.Play();
@@ -638,7 +628,7 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
m_fDestinationScrollSpeed = 4;
m_soundMarker.Play();
}
else //if( m_fDestinationScrollSpeed == 1 )
else if( m_fDestinationScrollSpeed == 1 )
{
m_fDestinationScrollSpeed = 2;
m_soundMarker.Play();
@@ -753,20 +743,8 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
}
else // both markers are laid
{
if( GAMESTATE->m_fSongBeat == m_NoteFieldEdit.m_fBeginMarker )
{
m_NoteFieldEdit.m_fBeginMarker = m_NoteFieldEdit.m_fEndMarker;
m_NoteFieldEdit.m_fEndMarker = -1;
}
else if( GAMESTATE->m_fSongBeat == m_NoteFieldEdit.m_fEndMarker )
{
m_NoteFieldEdit.m_fEndMarker = -1;
}
else
{
m_NoteFieldEdit.m_fBeginMarker = GAMESTATE->m_fSongBeat;
m_NoteFieldEdit.m_fEndMarker = -1;
}
m_NoteFieldEdit.m_fBeginMarker = GAMESTATE->m_fSongBeat;
m_NoteFieldEdit.m_fEndMarker = -1;
}
m_soundMarker.Play();
break;
@@ -1294,6 +1272,7 @@ void ScreenEdit::HandleAreaMenuChoice( AreaMenuChoice c, int* iAnswers )
case quick: NoteDataUtil::Quick( m_Clipboard ); break;
case left: NoteDataUtil::Turn( m_Clipboard, NoteDataUtil::left ); break;
case right: NoteDataUtil::Turn( m_Clipboard, NoteDataUtil::right ); break;
case mirror: NoteDataUtil::Turn( m_Clipboard, NoteDataUtil::mirror ); break;
case shuffle: NoteDataUtil::Turn( m_Clipboard, NoteDataUtil::shuffle ); break;
case super_shuffle: NoteDataUtil::Turn( m_Clipboard, NoteDataUtil::super_shuffle ); break;
case backwards: NoteDataUtil::Backwards( m_Clipboard ); break;
+4 -11
View File
@@ -660,15 +660,9 @@ bool ScreenGameplay::IsTimeToPlayTicks() const
// Sound cards have a latency between when a sample is Play()ed and when the sound
// will start coming out the speaker. Compensate for this by boosting
// fPositionSeconds ahead
if( GAMESTATE->m_SongOptions.m_AssistType != SongOptions::ASSIST_TICK )
return false;
float fPositionSeconds = GAMESTATE->m_fMusicSeconds;
// HACK: Play the sound a little bit early to account for the fact that the middle of the tick sounds occurs 0.015 seconds into playing.
fPositionSeconds += (SOUNDMAN->GetPlayLatency()+g_fTickEarlySecondsCache) * m_soundMusic.GetPlaybackRate();
float fSongBeat=GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
float fSongBeat = GAMESTATE->m_pCurSong->GetBeatFromElapsedTime( fPositionSeconds );
int iRowNow = BeatToNoteRowNotRounded( fSongBeat );
iRowNow = max( 0, iRowNow );
@@ -701,7 +695,6 @@ void ScreenGameplay::Update( float fDeltaTime )
* If you don't do this first, the classes are all acting on old
* information and will lag. -Chris */
// update the global music statistics for other classes to access
/* If ScreenJukebox is changing screens, it'll stop m_soundMusic to tell
* us not to update the time here. (In that case, we've already created
* a new ScreenJukebox and reset music statistics, and if we do this then
@@ -709,7 +702,6 @@ void ScreenGameplay::Update( float fDeltaTime )
if(m_soundMusic.IsPlaying())
GAMESTATE->UpdateSongPosition(m_soundMusic.GetPositionSeconds());
Screen::Update( fDeltaTime );
@@ -850,8 +842,9 @@ void ScreenGameplay::Update( float fDeltaTime )
m_iRowLastCrossed = iRowNow;
}
if(IsTimeToPlayTicks())
m_soundAssistTick.Play();
if( GAMESTATE->m_SongOptions.m_AssistType == SongOptions::ASSIST_TICK )
if( IsTimeToPlayTicks() )
m_soundAssistTick.Play();
}
-2
View File
@@ -107,7 +107,6 @@ void ScreenSongOptions::ExportOptions()
void ScreenSongOptions::GoToPrevState()
{
SOUNDMAN->StopMusic();
if( GAMESTATE->m_bEditing )
SCREENMAN->PopTopScreen( SM_None );
else
@@ -116,7 +115,6 @@ void ScreenSongOptions::GoToPrevState()
void ScreenSongOptions::GoToNextState()
{
SOUNDMAN->StopMusic();
if( GAMESTATE->m_bEditing )
SCREENMAN->PopTopScreen();
else
+20 -21
View File
@@ -138,33 +138,32 @@ BEGIN
CTEXT "line3",IDC_STATIC_MESSAGE3,0,65,310,10,SS_CENTERIMAGE
END
IDD_DISASM_CRASH DIALOGEX 0, 0, 399, 286
IDD_DISASM_CRASH DIALOG DISCARDABLE 0, 0, 399, 271
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION
CAPTION "StepMania Error"
FONT 8, "MS Sans Serif", 0, 0, 0x1
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,348,270,50,15
LISTBOX IDC_ASMBOX,7,58,279,100,LBS_OWNERDRAWVARIABLE |
DEFPUSHBUTTON "Close",IDC_BUTTON_CLOSE,348,255,50,15
LTEXT "crash reason: programmer needs good whack on head",
IDC_STATIC_BOMBREASON,8,240,219,8
PUSHBUTTON "View Log",IDC_VIEW_LOG,1,255,70,15
PUSHBUTTON "View crash dump",IDC_CRASH_SAVE,75,255,70,15
PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,210,255,76,15
PUSHBUTTON "Restart",IDC_BUTTON_RESTART,348,238,50,15
CONTROL 121,IDC_STATIC,"Static",SS_BITMAP,1,2,396,36
LTEXT "StepMania has crashed due to a program error. Diagnostic information has been saved to a file called ""crashinfo.txt"" in the StepMania program directory. Hit ""View crash dump"" to view it. Please include this file in all bug reports.",
IDC_STATIC,8,41,382,19
LTEXT "Program disassembly",IDC_STATIC,7,64,66,8
LISTBOX IDC_ASMBOX,7,76,279,101,LBS_OWNERDRAWVARIABLE |
LBS_USETABSTOPS | LBS_NOINTEGRALHEIGHT | LBS_NODATA |
LBS_NOSEL | WS_VSCROLL | WS_TABSTOP
LTEXT "crash reason: programmer needs good whack on head",
IDC_STATIC_BOMBREASON,8,222,219,8
LISTBOX IDC_REGDUMP,291,58,101,158,NOT LBS_NOTIFY |
LISTBOX IDC_CALL_STACK,7,196,279,38,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
LTEXT "CPU registers",IDC_STATIC,292,64,44,8
LISTBOX IDC_REGDUMP,291,76,101,158,NOT LBS_NOTIFY |
LBS_NOINTEGRALHEIGHT | LBS_NOSEL | WS_VSCROLL |
WS_HSCROLL | WS_TABSTOP
LTEXT "Program disassembly",IDC_STATIC,7,46,66,8
LTEXT "CPU registers",IDC_STATIC,292,46,44,8
LTEXT "StepMania has crashed due to a program error. Diagnostic information has been saved to a file called ""crashinfo.txt"" in the StepMania program directory. Hit ""View crash dump"" to view it. Please include this file in all bug reports.",
IDC_STATIC,7,238,319,25
PUSHBUTTON "View crash dump",IDC_CRASH_SAVE,76,270,70,15
LISTBOX IDC_CALL_STACK,7,178,279,38,LBS_NOINTEGRALHEIGHT |
WS_VSCROLL | WS_TABSTOP
LTEXT "Estimated call stack",IDC_STATIC,7,167,64,8
CONTROL 121,IDC_STATIC,"Static",SS_BITMAP,1,2,396,36
PUSHBUTTON "View Log",IDC_VIEW_LOG,1,270,70,15
PUSHBUTTON "Restart",IDC_BUTTON_RESTART,348,254,50,15
PUSHBUTTON "Report the Error",IDC_BUTTON_REPORT,207,270,76,15
PUSHBUTTON "Close",IDC_BUTTON_CLOSE,348,238,50,15
LTEXT "Estimated call stack",IDC_STATIC,7,184,64,8
END
@@ -189,7 +188,7 @@ BEGIN
LEFTMARGIN, 1
RIGHTMARGIN, 398
VERTGUIDE, 286
BOTTOMMARGIN, 285
BOTTOMMARGIN, 270
END
END
#endif // APSTUDIO_INVOKED
+1 -1
View File
@@ -325,7 +325,7 @@ int main(int argc, char* argv[])
BoostAppPri();
ResetGame();
if( DISPLAY->IsSoftwareRenderer() )
if( DISPLAY->IsSoftwareRenderer() && !PREFSMAN->m_bAllowSoftwareRenderer )
SCREENMAN->Prompt(
SM_None,
"OpenGL hardware acceleration\n"
+76 -64
View File
@@ -14,6 +14,17 @@ struct VideoDriverInfo
CString sDeviceID;
};
void LogVideoDriverInfo( VideoDriverInfo 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());
}
CString GetRegValue( HKEY hKey, CString sName )
{
char szBuffer[MAX_PATH];
@@ -24,10 +35,11 @@ CString GetRegValue( HKEY hKey, CString sName )
return "";
}
bool GetDebugInfoWin9x( VideoDriverInfo& infoOut )
bool GetVideoDriverInfo9x( int iIndex, VideoDriverInfo& infoOut )
{
HKEY hkey;
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Services\\Class\\Display\\0000", &hkey) != ERROR_SUCCESS)
CString sKey = ssprintf("SYSTEM\\CurrentControlSet\\Services\\Class\\Display\\%04d",iIndex);
if (RegOpenKey(HKEY_LOCAL_MACHINE, sKey, &hkey) != ERROR_SUCCESS)
return false;
infoOut.sDate = GetRegValue( hkey, "DriverDate");
@@ -41,10 +53,11 @@ bool GetDebugInfoWin9x( VideoDriverInfo& infoOut )
}
bool GetDebugInfoWinNT( VideoDriverInfo& infoOut )
bool GetVideoDriverInfo2k( int iIndex, VideoDriverInfo& infoOut )
{
HKEY hkey;
if (RegOpenKey(HKEY_LOCAL_MACHINE, "SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\0000", &hkey) != ERROR_SUCCESS)
CString sKey = ssprintf("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D36E968-E325-11CE-BFC1-08002BE10318}\\%04d",iIndex);
if (RegOpenKey(HKEY_LOCAL_MACHINE, sKey, &hkey) != ERROR_SUCCESS)
return false;
infoOut.sDate = GetRegValue( hkey, "DriverDate");
@@ -57,79 +70,78 @@ bool GetDebugInfoWinNT( VideoDriverInfo& infoOut )
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++ )
CString GetPrimaryVideoName9xAnd2k() // this will not work on 95 and NT b/c of EnumDisplayDevices
{
typedef BOOL (WINAPI* pfnEnumDisplayDevices)(PVOID,DWORD,PDISPLAY_DEVICE,DWORD);
pfnEnumDisplayDevices EnumDisplayDevices;
HINSTANCE hInstUser32;
hInstUser32 = LoadLibrary("User32.DLL");
if( !hInstUser32 )
return "";
// VC6 don't have a stub to static link with, so link dynamically.
EnumDisplayDevices = (pfnEnumDisplayDevices)GetProcAddress(hInstUser32,"EnumDisplayDevicesA");
if( EnumDisplayDevices == NULL )
{
if( info.sProvider == ENTRIES[i].szProblemProvider &&
info.sDescription == ENTRIES[i].szProblemDescription )
FreeLibrary(hInstUser32);
return "";
}
CString sPrimaryDeviceName;
for( DWORD i=0; true; i++ )
{
DISPLAY_DEVICE dd;
ZERO( dd );
dd.cb = sizeof(dd);
if( !EnumDisplayDevices(NULL, i, &dd, 0) )
break;
if( dd.StateFlags & DISPLAY_DEVICE_PRIMARY_DEVICE )
{
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;
sPrimaryDeviceName = (char*)dd.DeviceString;
break;
}
}
FreeLibrary(hInstUser32);
return sPrimaryDeviceName;
}
static void GetDisplayDriverDebugInfo()
{
VideoDriverInfo info;
if( GetDebugInfoWin9x(info) )
goto got_debug_info;
if( GetDebugInfoWinNT(info) )
goto got_debug_info;
CString sPrimaryDeviceName = GetPrimaryVideoName9xAnd2k();
LOG->Warn( "Failed to get video card driver info." );
return;
if( sPrimaryDeviceName == "" )
LOG->Info( "Primary display driver could not be determined." );
else
LOG->Info( "Primary display driver: %s", sPrimaryDeviceName.GetString() );
got_debug_info:
OSVERSIONINFO version;
version.dwOSVersionInfoSize=sizeof(version);
GetVersionEx(&version);
bool bIsWin9x = version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS;
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 );
for( int i=0; true; i++ )
{
VideoDriverInfo info;
if( ! (bIsWin9x ? GetVideoDriverInfo9x : GetVideoDriverInfo2k)(i,info) )
break;
if( sPrimaryDeviceName == "" ) // failed to get primary disaply name (NT4)
{
LogVideoDriverInfo( info );
}
else if( info.sDescription == sPrimaryDeviceName )
{
LogVideoDriverInfo( info );
break;
}
}
}
static CString wo_ssprintf( MMRESULT err, const char *fmt, ...)