diff --git a/stepmania/src/RageDisplay_D3D.h b/stepmania/src/RageDisplay_D3D.h index 1a81e336f1..5d42ac6ac8 100644 --- a/stepmania/src/RageDisplay_D3D.h +++ b/stepmania/src/RageDisplay_D3D.h @@ -1,8 +1,19 @@ #ifndef RAGEDISPLAY_D3D_H #define RAGEDISPLAY_D3D_H -class RageException_D3DNotInstalled: public exception { }; -class RageException_D3DNoAcceleration: public exception { }; +class RageException_D3DNotInstalled: public exception +{ + const char *what() const { return + "DirectX 8.1 or greater is not installed. You can download it from:\n" + "http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en"; } +}; + +class RageException_D3DNoAcceleration: public exception +{ + const char *what() const { 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 RageDisplay_D3D: public RageDisplay diff --git a/stepmania/src/StepMania.cpp b/stepmania/src/StepMania.cpp index ebd138f07f..77429b7079 100644 --- a/stepmania/src/StepMania.cpp +++ b/stepmania/src/StepMania.cpp @@ -407,12 +407,7 @@ RageDisplay *CreateDisplay() error += "Initializing Direct3D...\n"; try { return new RageDisplay_D3D( params ); - } 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"; - } catch(RageException e) { + } catch( const exception &e ) { error += CString(e.what()) + "\n"; }; #endif