make hard-coded strings localizable
This commit is contained in:
@@ -1519,3 +1519,12 @@ Song=Song
|
||||
Steps=Steps
|
||||
Course=Course
|
||||
Modifier=Modifier
|
||||
|
||||
[RageDisplay_OGL]
|
||||
Obtain an updated driver from your video card manufacturer.=Obtain an updated driver from your video card manufacturer.
|
||||
GLDirect was detected. GLDirect is not compatible with this game and should be disabled.=GLDirect was detected. GLDirect is not compatible with this game and should be disabled.
|
||||
|
||||
[RageDisplay_D3D]
|
||||
DirectX 8.1 or greater is not installed. You can download it from:=DirectX 8.1 or greater is not installed. You can download it from:
|
||||
Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer.=Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer.
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "RageSurfaceUtils.h"
|
||||
#include "EnumHelper.h"
|
||||
#include "DisplayResolutions.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#include <D3D8.h>
|
||||
#include <D3dx8math.h>
|
||||
@@ -203,10 +204,11 @@ RageDisplay_D3D::RageDisplay_D3D()
|
||||
|
||||
}
|
||||
|
||||
#define D3D_NOT_INSTALLED \
|
||||
"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"
|
||||
|
||||
static LocalizedString D3D_NOT_INSTALLED ( "RageDisplay_D3D", "DirectX 8.1 or greater is not installed. You can download it from:" );
|
||||
const RString D3D_URL = "http://www.microsoft.com/downloads/details.aspx?FamilyID=a19bed22-0b25-4e5d-a584-6389d8a3dad0&displaylang=en";
|
||||
static LocalizedString HARDWARE_ACCELERATION_NOT_AVAILABLE ( "RageDisplay_D3D",
|
||||
"Your system is reporting that Direct3D hardware acceleration is not available. Please obtain an updated driver from your video card manufacturer." );
|
||||
RString RageDisplay_D3D::Init( const VideoModeParams &p, bool bAllowUnacceleratedRenderer )
|
||||
{
|
||||
GraphicsWindow::Initialize( true );
|
||||
@@ -221,7 +223,7 @@ RString RageDisplay_D3D::Init( const VideoModeParams &p, bool bAllowUnaccelerate
|
||||
#else
|
||||
g_D3D8_Module = LoadLibrary("D3D8.dll");
|
||||
if(!g_D3D8_Module)
|
||||
return D3D_NOT_INSTALLED;
|
||||
return D3D_NOT_INSTALLED.GetValue() + "\n" + D3D_URL;
|
||||
|
||||
pDirect3DCreate8 = (Direct3DCreate8_t) GetProcAddress(g_D3D8_Module, "Direct3DCreate8");
|
||||
if(!pDirect3DCreate8)
|
||||
@@ -239,9 +241,8 @@ RString RageDisplay_D3D::Init( const VideoModeParams &p, bool bAllowUnaccelerate
|
||||
}
|
||||
|
||||
if( FAILED( g_pd3d->GetDeviceCaps(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &g_DeviceCaps) ) )
|
||||
return
|
||||
"Your system is reporting that Direct3D hardware acceleration is not available. "
|
||||
"Please obtain an updated driver from your video card manufacturer.\n\n";
|
||||
return HARDWARE_ACCELERATION_NOT_AVAILABLE;
|
||||
|
||||
|
||||
D3DADAPTER_IDENTIFIER8 identifier;
|
||||
g_pd3d->GetAdapterIdentifier( D3DADAPTER_DEFAULT, 0, &identifier );
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "Foreach.h"
|
||||
#include "ProductInfo.h"
|
||||
#include "DisplayResolutions.h"
|
||||
#include "LocalizedString.h"
|
||||
|
||||
#include "arch/LowLevelWindow/LowLevelWindow.h"
|
||||
|
||||
@@ -387,6 +388,8 @@ void InitScalingScript()
|
||||
GLExt.glVertexAttrib2fARB( ATTRIB_TEXTURE_MATRIX_SCALE, 1, 1 );
|
||||
}
|
||||
|
||||
static LocalizedString OBTAIN_AN_UPDATED_VIDEO_DRIVER ( "RageDisplay_OGL", "Obtain an updated driver from your video card manufacturer." );
|
||||
static LocalizedString GLDIRECT_IS_NOT_COMPATIBLE ( "RageDisplay_OGL", "GLDirect was detected. GLDirect is not compatible with this game and should be disabled." );
|
||||
RString RageDisplay_OGL::Init( const VideoModeParams &p, bool bAllowUnacceleratedRenderer )
|
||||
{
|
||||
g_pWind = MakeLowLevelWindow();
|
||||
@@ -408,7 +411,7 @@ RString RageDisplay_OGL::Init( const VideoModeParams &p, bool bAllowUnaccelerate
|
||||
if( g_pWind->IsSoftwareRenderer(sError) )
|
||||
{
|
||||
if( !bAllowUnacceleratedRenderer )
|
||||
return sError + " Please obtain an updated driver from your video card manufacturer.\n\n";
|
||||
return sError + " " + OBTAIN_AN_UPDATED_VIDEO_DRIVER.GetValue() + "\n\n";
|
||||
LOG->Warn( "Low-performance OpenGL renderer: " + sError );
|
||||
}
|
||||
|
||||
@@ -418,7 +421,7 @@ RString RageDisplay_OGL::Init( const VideoModeParams &p, bool bAllowUnaccelerate
|
||||
* too using Direct3D directly. (If we can't, it's a bug that we can work
|
||||
* around--if GLDirect can do it, so can we!) */
|
||||
if( !strncmp( (const char *) glGetString(GL_RENDERER), "GLDirect", 8 ) )
|
||||
return "GLDirect was detected. GLDirect is not compatible with " PRODUCT_NAME ", and should be disabled.\n";
|
||||
return GLDIRECT_IS_NOT_COMPATIBLE.GetValue() + "\n";
|
||||
#endif
|
||||
|
||||
/* Log this, so if people complain that the radar looks bad on their
|
||||
|
||||
Reference in New Issue
Block a user