Use PanicAlertT instead of PanicAlert when appropriate
I tried to change messages that contained instructions for users, while avoiding messages that are so technical that most users wouldn't understand them even if they were in the right language.
This commit is contained in:
parent
98ed5881ab
commit
95a2abc1ce
|
@ -179,13 +179,14 @@ bool CBoot::Load_BS2(const std::string& _rBootROMFilename)
|
|||
ipl_region = EUR_DIR;
|
||||
break;
|
||||
default:
|
||||
PanicAlert("IPL with unknown hash %x", ipl_hash);
|
||||
PanicAlertT("IPL with unknown hash %x", ipl_hash);
|
||||
break;
|
||||
}
|
||||
|
||||
std::string BootRegion = _rBootROMFilename.substr(_rBootROMFilename.find_last_of(DIR_SEP) - 3, 3);
|
||||
if (BootRegion != ipl_region)
|
||||
PanicAlert("%s IPL found in %s directory. The disc may not be recognized", ipl_region.c_str(), BootRegion.c_str());
|
||||
PanicAlertT("%s IPL found in %s directory. The disc might not be recognized",
|
||||
ipl_region.c_str(), BootRegion.c_str());
|
||||
|
||||
// Run the descrambler over the encrypted section containing BS1/BS2
|
||||
CEXIIPL::Descrambler((u8*)data.data() + 0x100, 0x1AFE00);
|
||||
|
|
|
@ -430,7 +430,7 @@ void EmuThread()
|
|||
{
|
||||
HW::Shutdown();
|
||||
g_video_backend->Shutdown();
|
||||
PanicAlert("Failed to initialize DSP emulator!");
|
||||
PanicAlert("Failed to initialize DSP emulation!");
|
||||
Host_Message(WM_USER_STOP);
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -87,12 +87,14 @@ UCodeInterface* UCodeFactory(u32 crc, DSPHLE* dsphle, bool wii)
|
|||
default:
|
||||
if (wii)
|
||||
{
|
||||
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AXWii.\n\nTry LLE emulator if this is homebrew.", crc);
|
||||
PanicAlertT("This title might be incompatible with DSP HLE emulation. Try using LLE if this is homebrew.\n\n"
|
||||
"Unknown ucode (CRC = %08x) - forcing AXWii.", crc);
|
||||
return new AXWiiUCode(dsphle, crc);
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("DSPHLE: Unknown ucode (CRC = %08x) - forcing AX.\n\nTry LLE emulator if this is homebrew.", crc);
|
||||
PanicAlertT("This title might be incompatible with DSP HLE emulation. Try using LLE if this is homebrew.\n\n"
|
||||
"DSPHLE: Unknown ucode (CRC = %08x) - forcing AX.", crc);
|
||||
return new AXUCode(dsphle, crc);
|
||||
}
|
||||
|
||||
|
|
|
@ -532,7 +532,8 @@ void ChangeDisc(const std::string& newFileName)
|
|||
auto sizeofpath = fileName.find_last_of("/\\") + 1;
|
||||
if (fileName.substr(sizeofpath).length() > 40)
|
||||
{
|
||||
PanicAlert("Saving iso filename to .dtm failed; max file name length is 40 characters.");
|
||||
PanicAlertT("The disc change to \"newFileName\" could not be saved in the .dtm.\n"
|
||||
"The filename of the disc image must not be longer than 40 characters.");
|
||||
}
|
||||
Movie::g_discChange = fileName.substr(sizeofpath);
|
||||
}
|
||||
|
|
|
@ -929,7 +929,7 @@ bool NetPlayClient::WiimoteUpdate(int _number, u8* data, const u8 size)
|
|||
// If it still mismatches, it surely desynced
|
||||
if (size != nw.size())
|
||||
{
|
||||
PanicAlert("Netplay has desynced. There is no way to recover from this.");
|
||||
PanicAlertT("Netplay has desynced. There is no way to recover from this.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -683,12 +683,12 @@ void UndoLoadState()
|
|||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("No undo.dtm found, aborting undo load state to prevent movie desyncs");
|
||||
PanicAlertT("No undo.dtm found, aborting undo load state to prevent movie desyncs");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PanicAlert("There is nothing to undo!");
|
||||
PanicAlertT("There is nothing to undo!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,10 +107,10 @@ void CompressedBlobReader::GetBlock(u64 block_num, u8 *out_ptr)
|
|||
// First, check hash.
|
||||
u32 block_hash = HashAdler32(source, comp_block_size);
|
||||
if (block_hash != m_hashes[block_num])
|
||||
PanicAlert("Hash of block %" PRIu64 " is %08x instead of %08x.\n"
|
||||
"Your ISO, \"%s\", is corrupt.",
|
||||
block_num, block_hash, m_hashes[block_num],
|
||||
m_file_name.c_str());
|
||||
PanicAlertT("The disc image \"%s\" is corrupt.\n"
|
||||
"Hash of block %" PRIu64 " is %08x instead of %08x.",
|
||||
m_file_name.c_str(),
|
||||
block_num, block_hash, m_hashes[block_num]);
|
||||
|
||||
if (uncompressed)
|
||||
{
|
||||
|
|
|
@ -421,7 +421,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
|||
if (slot != -1)
|
||||
{
|
||||
memoryCard[slot]->FixChecksums();
|
||||
if (!memoryCard[slot]->Save()) PanicAlertT(E_SAVEFAILED);
|
||||
if (!memoryCard[slot]->Save()) PanicAlertT("File write failed");
|
||||
page[slot] = FIRSTPAGE;
|
||||
ReloadMemcard(WxStrToStr(m_MemcardPath[slot]->GetPath()), slot);
|
||||
}
|
||||
|
@ -435,7 +435,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
|||
case OUTOFBLOCKS:
|
||||
if (slot == -1)
|
||||
{
|
||||
WxUtils::ShowErrorDialog(_(E_UNK));
|
||||
WxUtils::ShowErrorDialog(_("Unknown memory card error"));
|
||||
break;
|
||||
}
|
||||
wxMessageBox(wxString::Format(_("Only %d blocks available"), memoryCard[slot]->GetFreeBlocks()));
|
||||
|
@ -467,14 +467,14 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
|
|||
WxUtils::ShowErrorDialog(_("Invalid bat.map or dir entry."));
|
||||
break;
|
||||
case WRITEFAIL:
|
||||
WxUtils::ShowErrorDialog(_(E_SAVEFAILED));
|
||||
WxUtils::ShowErrorDialog(_("File write failed"));
|
||||
break;
|
||||
case DELETE_FAIL:
|
||||
WxUtils::ShowErrorDialog(_("Order of files in the File Directory do not match the block order\n"
|
||||
"Right click and export all of the saves,\nand import the saves to a new memcard\n"));
|
||||
break;
|
||||
default:
|
||||
WxUtils::ShowErrorDialog(_(E_UNK));
|
||||
WxUtils::ShowErrorDialog(_("Unknown memory card error"));
|
||||
break;
|
||||
}
|
||||
SetFocus();
|
||||
|
@ -515,7 +515,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
|
|||
}
|
||||
else
|
||||
{
|
||||
WxUtils::ShowErrorDialog(_(E_SAVEFAILED));
|
||||
WxUtils::ShowErrorDialog(_("File write failed"));
|
||||
}
|
||||
break;
|
||||
case ID_CONVERTTOGCI:
|
||||
|
|
|
@ -21,8 +21,6 @@ class wxStaticText;
|
|||
#define MEMCARD_MANAGER_STYLE wxCAPTION | wxSYSTEM_MENU | wxDIALOG_NO_PARENT | wxCLOSE_BOX | wxRESIZE_BORDER | wxMAXIMIZE_BOX
|
||||
#define MEMCARDMAN_TITLE _trans("Memory Card Manager WARNING-Make backups before using, should be fixed but could mangle stuff!")
|
||||
|
||||
#define E_SAVEFAILED "File write failed"
|
||||
#define E_UNK "Unknown error"
|
||||
#define FIRSTPAGE 0
|
||||
|
||||
class CMemcardManager : public wxDialog
|
||||
|
|
|
@ -54,10 +54,8 @@ bool CompileVertexShader(const std::string& code, D3DBlob** blob)
|
|||
file << code;
|
||||
file.close();
|
||||
|
||||
PanicAlert("Failed to compile vertex shader!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s):\n%s",
|
||||
filename.c_str(),
|
||||
D3D::VertexShaderVersionString(),
|
||||
(const char*)errorBuffer->GetBufferPointer());
|
||||
PanicAlert("Failed to compile vertex shader: %s\nDebug info (%s):\n%s",
|
||||
filename.c_str(), D3D::VertexShaderVersionString(), (const char*)errorBuffer->GetBufferPointer());
|
||||
|
||||
*blob = nullptr;
|
||||
errorBuffer->Release();
|
||||
|
@ -110,10 +108,8 @@ bool CompileGeometryShader(const std::string& code, D3DBlob** blob, const D3D_SH
|
|||
file << code;
|
||||
file.close();
|
||||
|
||||
PanicAlert("Failed to compile geometry shader!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s):\n%s",
|
||||
filename.c_str(),
|
||||
D3D::GeometryShaderVersionString(),
|
||||
(const char*)errorBuffer->GetBufferPointer());
|
||||
PanicAlert("Failed to compile geometry shader: %s\nDebug info (%s):\n%s",
|
||||
filename.c_str(), D3D::GeometryShaderVersionString(), (const char*)errorBuffer->GetBufferPointer());
|
||||
|
||||
*blob = nullptr;
|
||||
errorBuffer->Release();
|
||||
|
@ -168,10 +164,8 @@ bool CompilePixelShader(const std::string& code, D3DBlob** blob, const D3D_SHADE
|
|||
file << code;
|
||||
file.close();
|
||||
|
||||
PanicAlert("Failed to compile pixel shader!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s):\n%s",
|
||||
filename.c_str(),
|
||||
D3D::PixelShaderVersionString(),
|
||||
(const char*)errorBuffer->GetBufferPointer());
|
||||
PanicAlert("Failed to compile pixel shader: %s\nDebug info (%s):\n%s",
|
||||
filename.c_str(), D3D::PixelShaderVersionString(), (const char*)errorBuffer->GetBufferPointer());
|
||||
|
||||
*blob = nullptr;
|
||||
errorBuffer->Release();
|
||||
|
|
|
@ -312,12 +312,10 @@ bool ProgramShaderCache::CompileShader(SHADER& shader, const char* vcode, const
|
|||
|
||||
if (linkStatus != GL_TRUE)
|
||||
{
|
||||
PanicAlert("Failed to link shaders!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s, %s, %s):\n%s",
|
||||
filename.c_str(),
|
||||
g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer,
|
||||
g_ogl_config.gl_version,
|
||||
infoLog);
|
||||
PanicAlert("Failed to link shaders: %s\n"
|
||||
"Debug info (%s, %s, %s):\n%s",
|
||||
filename.c_str(),
|
||||
g_ogl_config.gl_vendor, g_ogl_config.gl_renderer, g_ogl_config.gl_version, infoLog);
|
||||
}
|
||||
|
||||
delete [] infoLog;
|
||||
|
@ -371,13 +369,11 @@ GLuint ProgramShaderCache::CompileSingleShader(GLuint type, const char* code)
|
|||
|
||||
if (compileStatus != GL_TRUE)
|
||||
{
|
||||
PanicAlert("Failed to compile %s shader!\nThis usually happens when trying to use Dolphin with an outdated GPU or integrated GPU like the Intel GMA series.\n\nIf you're sure this is Dolphin's error anyway, post the contents of %s along with this error message at the forums.\n\nDebug info (%s, %s, %s):\n%s",
|
||||
type == GL_VERTEX_SHADER ? "vertex" : type==GL_FRAGMENT_SHADER ? "pixel" : "geometry",
|
||||
filename.c_str(),
|
||||
g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer,
|
||||
g_ogl_config.gl_version,
|
||||
infoLog);
|
||||
PanicAlert("Failed to compile %s shader: %s\n"
|
||||
"Debug info (%s, %s, %s):\n%s",
|
||||
type == GL_VERTEX_SHADER ? "vertex" : type==GL_FRAGMENT_SHADER ? "pixel" : "geometry",
|
||||
filename.c_str(),
|
||||
g_ogl_config.gl_vendor, g_ogl_config.gl_renderer, g_ogl_config.gl_version, infoLog);
|
||||
}
|
||||
|
||||
delete[] infoLog;
|
||||
|
|
|
@ -192,9 +192,9 @@ void AVIDump::StoreFrame(const void* data)
|
|||
else
|
||||
{
|
||||
free(s_stored_frame);
|
||||
PanicAlert("Something has gone seriously wrong.\n"
|
||||
"Stopping video recording.\n"
|
||||
"Your video will likely be broken.");
|
||||
PanicAlertT("Something has gone seriously wrong.\n"
|
||||
"Stopping video recording.\n"
|
||||
"Your video will likely be broken.");
|
||||
Stop();
|
||||
}
|
||||
s_stored_frame_size = s_bitmap.biSizeImage;
|
||||
|
@ -219,9 +219,9 @@ void AVIDump::AddFrame(const u8* data, int w, int h)
|
|||
static bool shown_error = false;
|
||||
if ((w != s_bitmap.biWidth || h != s_bitmap.biHeight) && !shown_error)
|
||||
{
|
||||
PanicAlert("You have resized the window while dumping frames.\n"
|
||||
"Nothing sane can be done to handle this.\n"
|
||||
"Your video will likely be broken.");
|
||||
PanicAlertT("You have resized the window while dumping frames.\n"
|
||||
"Nothing can be done to handle this properly.\n"
|
||||
"Your video will likely be broken.");
|
||||
shown_error = true;
|
||||
|
||||
s_bitmap.biWidth = w;
|
||||
|
|
|
@ -43,7 +43,7 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
|
|||
File::IOFile fp(filename, "wb");
|
||||
if (!fp.IsOpen())
|
||||
{
|
||||
PanicAlert("Screenshot failed: Could not open file %s %d\n", filename.c_str(), errno);
|
||||
PanicAlertT("Screenshot failed: Could not open file \"%s\" (error %d)", filename.c_str(), errno);
|
||||
goto finalise;
|
||||
}
|
||||
|
||||
|
@ -51,23 +51,22 @@ bool TextureToPng(u8* data, int row_stride, const std::string& filename, int wid
|
|||
png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr);
|
||||
if (png_ptr == nullptr)
|
||||
{
|
||||
PanicAlert("Screenshot failed: Could not allocate write struct\n");
|
||||
PanicAlert("Screenshot failed: Could not allocate write struct");
|
||||
goto finalise;
|
||||
|
||||
}
|
||||
|
||||
// Initialize info structure
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
if (info_ptr == nullptr)
|
||||
{
|
||||
PanicAlert("Screenshot failed: Could not allocate info struct\n");
|
||||
PanicAlert("Screenshot failed: Could not allocate info struct");
|
||||
goto finalise;
|
||||
}
|
||||
|
||||
// Setup Exception handling
|
||||
if (setjmp(png_jmpbuf(png_ptr)))
|
||||
{
|
||||
PanicAlert("Screenshot failed: Error during png creation\n");
|
||||
PanicAlert("Screenshot failed: Error during PNG creation");
|
||||
goto finalise;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue