mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
I18N: Switch to getting categories by index instead of by string lookup
Also gets rid of the shared_ptr usage, and generally makes things nicer. Needed for later config refactorings, good to get in early.
This commit is contained in:
@@ -2651,7 +2651,7 @@ void FramebufferManagerCommon::UpdateFramebufUsage(VirtualFramebuffer *vfb) {
|
||||
}
|
||||
|
||||
void FramebufferManagerCommon::ShowScreenResolution() {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
|
||||
std::ostringstream messageStream;
|
||||
messageStream << gr->T("Internal Resolution") << ": ";
|
||||
|
||||
@@ -284,7 +284,7 @@ bool TextureReplacer::LoadIniValues(IniFile &ini, bool isOverride) {
|
||||
}
|
||||
|
||||
if (filenameWarning) {
|
||||
auto err = GetI18NCategory("Error");
|
||||
auto err = GetI18NCategory(I18NCat::ERRORS);
|
||||
System_NotifyUserMessage(err->T("textures.ini filenames may not be cross-platform (banned characters)"), 6.0f);
|
||||
}
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ GPU_DX9::GPU_DX9(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
||||
if (g_Config.bHardwareTessellation) {
|
||||
// Disable hardware tessellation bacause DX9 is still unsupported.
|
||||
ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation");
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
System_NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -600,7 +600,7 @@ VSShader *ShaderManagerDX9::ApplyShader(bool useHWTransform, bool useHWTessellat
|
||||
vs = new VSShader(device_, VSID, codeBuffer_, useHWTransform);
|
||||
}
|
||||
if (!vs || vs->Failed()) {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
if (!vs) {
|
||||
// TODO: Report this?
|
||||
ERROR_LOG(G3D, "Shader generation failed, falling back to software transform");
|
||||
|
||||
@@ -121,7 +121,7 @@ GPU_GLES::GPU_GLES(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
|
||||
// Disable hardware tessellation if device is unsupported.
|
||||
if (!drawEngine_.SupportsHWTessellation()) {
|
||||
ERROR_LOG(G3D, "Hardware Tessellation is unsupported, falling back to software tessellation");
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
System_NotifyUserMessage(gr->T("Turn off Hardware Tessellation - unsupported"), 2.5f, 0xFF3030FF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ Shader *ShaderManagerGLES::ApplyVertexShader(bool useHWTransform, bool useHWTess
|
||||
// Vertex shader not in cache. Let's compile it.
|
||||
vs = CompileVertexShader(*VSID);
|
||||
if (!vs || vs->Failed()) {
|
||||
auto gr = GetI18NCategory("Graphics");
|
||||
auto gr = GetI18NCategory(I18NCat::GRAPHICS);
|
||||
ERROR_LOG(G3D, "Vertex shader generation failed, falling back to software transform");
|
||||
if (!g_Config.bHideSlowWarnings) {
|
||||
System_NotifyUserMessage(gr->T("hardware transform error - falling back to software"), 2.5f, 0xFF3030FF);
|
||||
|
||||
@@ -148,7 +148,7 @@ void TextureCacheGLES::StartFrame() {
|
||||
lowMemoryMode_ = true;
|
||||
decimationCounter_ = 0;
|
||||
|
||||
auto err = GetI18NCategory("Error");
|
||||
auto err = GetI18NCategory(I18NCat::ERRORS);
|
||||
if (standardScaleFactor_ > 1) {
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
} else {
|
||||
|
||||
@@ -511,7 +511,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) {
|
||||
// TODO: We should stall the GPU here and wipe things out of memory.
|
||||
// As is, it will almost definitely fail the second time, but next frame it may recover.
|
||||
|
||||
auto err = GetI18NCategory("Error");
|
||||
auto err = GetI18NCategory(I18NCat::ERRORS);
|
||||
if (plan.scaleFactor > 1) {
|
||||
System_NotifyUserMessage(err->T("Warning: Video memory FULL, reducing upscaling and switching to slow caching mode"), 2.0f);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user