From cb3092e70d5edc4cfc06ca0aedc36ea26f6c175d Mon Sep 17 00:00:00 2001 From: Chris Danford Date: Sun, 22 Jun 2003 17:45:19 +0000 Subject: [PATCH] revert D3D exception handling (my changes broke it) --- stepmania/src/RageDisplay_D3D.h | 20 ++------------------ stepmania/src/StepMania.cpp | 10 +++++++--- 2 files changed, 9 insertions(+), 21 deletions(-) diff --git a/stepmania/src/RageDisplay_D3D.h b/stepmania/src/RageDisplay_D3D.h index 27a689c4c9..5452c15238 100644 --- a/stepmania/src/RageDisplay_D3D.h +++ b/stepmania/src/RageDisplay_D3D.h @@ -1,24 +1,8 @@ #ifndef RAGEDISPLAY_D3D_H #define RAGEDISPLAY_D3D_H -class RageException_D3DNotInstalled: public exception -{ - const char *what() { return - "DirectX 8.1 or greater is not installed. You can download it from:\n" - "http://search.microsoft.com/gomsuri.asp?n=1&c=rp_BestBets&siteid=us&target=http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en"; } -}; -class RageException_D3DNoAcceleration: public exception -{ - const char *what() { return - "Your system is reporting that Direct3D hardware acceleration is not available. " - "Please obtain an updated driver from your video card manufacturer.\n\n"; } -}; -class RageException_D3DNoPalettedAlpha: public exception -{ - const char *what() { return - "Your video card doesn'thardware acceleration is not available. " - "Please obtain an updated driver from your video card manufacturer.\n\n"; } -}; +class RageException_D3DNotInstalled: public exception { }; +class RageException_D3DNoAcceleration: public exception { }; class RageDisplay_D3D: public RageDisplay diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index cc36f2d3bf..b2871cf6fc 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -267,6 +267,8 @@ static void CheckSettings() #include "archutils/Win32/VideoDriverInfo.h" #include "regex.h" +static const CString D3DURL = "http://search.microsoft.com/gomsuri.asp?n=1&c=rp_BestBets&siteid=us&target=http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en"; + RageDisplay *CreateDisplay() { /* We never want to bother users with having to decide which API to use. @@ -393,9 +395,11 @@ RageDisplay *CreateDisplay() error += "Initializing Direct3D...\n"; try { return new RageDisplay_D3D( params ); - } catch(exception e) { - error += e.what(); - error += "\n\n"; + } catch(RageException_D3DNotInstalled e) { + error += "DirectX 8.1 or greater is not installed. You can download it from:\n"+D3DURL+"\n\n"; + } catch(RageException_D3DNoAcceleration e) { + error += "Your system is reporting that Direct3D hardware acceleration is not available. " + "Please obtain an updated driver from your video card manufacturer.\n\n"; }; #endif }