diff --git a/stepmania/MSVCP60D.DLL b/stepmania/MSVCP60D.DLL new file mode 100644 index 0000000000..899562cfe1 Binary files /dev/null and b/stepmania/MSVCP60D.DLL differ diff --git a/stepmania/MSVCRTD.DLL b/stepmania/MSVCRTD.DLL new file mode 100644 index 0000000000..d24bc0e16c Binary files /dev/null and b/stepmania/MSVCRTD.DLL differ diff --git a/stepmania/src/Actor.cpp b/stepmania/src/Actor.cpp index c3a72e1c2c..06c430cf93 100644 --- a/stepmania/src/Actor.cpp +++ b/stepmania/src/Actor.cpp @@ -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 ); } diff --git a/stepmania/src/NoteField.cpp b/stepmania/src/NoteField.cpp index 51330350e5..6ce32fee80 100644 --- a/stepmania/src/NoteField.cpp +++ b/stepmania/src/NoteField.cpp @@ -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 ) { diff --git a/stepmania/src/NoteField.h b/stepmania/src/NoteField.h index f99d3431ef..0fc614048e 100644 --- a/stepmania/src/NoteField.h +++ b/stepmania/src/NoteField.h @@ -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; diff --git a/stepmania/src/PrefsManager.cpp b/stepmania/src/PrefsManager.cpp index 7c22dd09d3..1b924fd806 100644 --- a/stepmania/src/PrefsManager.cpp +++ b/stepmania/src/PrefsManager.cpp @@ -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). */ diff --git a/stepmania/src/PrefsManager.h b/stepmania/src/PrefsManager.h index f443bde096..a74b7d445a 100644 --- a/stepmania/src/PrefsManager.h +++ b/stepmania/src/PrefsManager.h @@ -82,6 +82,7 @@ public: CString m_sSoundDrivers; float m_fSoundVolume; + bool m_bAllowSoftwareRenderer; /* Game-specific prefs: */ CString m_sDefaultNoteSkin; diff --git a/stepmania/src/ScreenEdit.cpp b/stepmania/src/ScreenEdit.cpp index 81c9eb28d6..55b6bb624f 100644 --- a/stepmania/src/ScreenEdit.cpp +++ b/stepmania/src/ScreenEdit.cpp @@ -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; diff --git a/stepmania/src/ScreenGameplay.cpp b/stepmania/src/ScreenGameplay.cpp index c3e9b5a24a..41525ac1ea 100644 --- a/stepmania/src/ScreenGameplay.cpp +++ b/stepmania/src/ScreenGameplay.cpp @@ -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(); } diff --git a/stepmania/src/ScreenSongOptions.cpp b/stepmania/src/ScreenSongOptions.cpp index c9fb7c08ad..607349f124 100644 --- a/stepmania/src/ScreenSongOptions.cpp +++ b/stepmania/src/ScreenSongOptions.cpp @@ -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 diff --git a/stepmania/src/StepMania.RC b/stepmania/src/StepMania.RC index 47fbe549ab..8fef905491 100644 --- a/stepmania/src/StepMania.RC +++ b/stepmania/src/StepMania.RC @@ -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 diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index bc8b6d44f6..d027184229 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -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" diff --git a/stepmania/src/archutils/Win32/DebugInfoHunt.cpp b/stepmania/src/archutils/Win32/DebugInfoHunt.cpp index e4e9fedfd9..a713c5e471 100644 --- a/stepmania/src/archutils/Win32/DebugInfoHunt.cpp +++ b/stepmania/src/archutils/Win32/DebugInfoHunt.cpp @@ -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; iWarn( "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, ...)