diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 31914dbed65..b941cf1c328 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -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); diff --git a/Source/Core/Core/Core.cpp b/Source/Core/Core/Core.cpp index 5182ce31ec8..3f929f07508 100644 --- a/Source/Core/Core/Core.cpp +++ b/Source/Core/Core/Core.cpp @@ -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; } diff --git a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp index 2b2b57d41fc..f3c17a69e29 100644 --- a/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp +++ b/Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp @@ -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); } diff --git a/Source/Core/Core/HW/DVDInterface.cpp b/Source/Core/Core/HW/DVDInterface.cpp index 21e767e9d37..7900751060e 100644 --- a/Source/Core/Core/HW/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVDInterface.cpp @@ -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); } diff --git a/Source/Core/Core/NetPlayClient.cpp b/Source/Core/Core/NetPlayClient.cpp index 3177dd193e6..3bf6e743c3f 100644 --- a/Source/Core/Core/NetPlayClient.cpp +++ b/Source/Core/Core/NetPlayClient.cpp @@ -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; } } diff --git a/Source/Core/Core/State.cpp b/Source/Core/Core/State.cpp index 3ef7ba4f8f4..d53cba084ec 100644 --- a/Source/Core/Core/State.cpp +++ b/Source/Core/Core/State.cpp @@ -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!"); } } diff --git a/Source/Core/DiscIO/CompressedBlob.cpp b/Source/Core/DiscIO/CompressedBlob.cpp index 9be86c18ef7..04304b76138 100644 --- a/Source/Core/DiscIO/CompressedBlob.cpp +++ b/Source/Core/DiscIO/CompressedBlob.cpp @@ -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) { diff --git a/Source/Core/DolphinWX/MemcardManager.cpp b/Source/Core/DolphinWX/MemcardManager.cpp index 71123a14db1..8d64a51cdb8 100644 --- a/Source/Core/DolphinWX/MemcardManager.cpp +++ b/Source/Core/DolphinWX/MemcardManager.cpp @@ -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: diff --git a/Source/Core/DolphinWX/MemcardManager.h b/Source/Core/DolphinWX/MemcardManager.h index 8316f3b8547..382f3efbdb4 100644 --- a/Source/Core/DolphinWX/MemcardManager.h +++ b/Source/Core/DolphinWX/MemcardManager.h @@ -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 diff --git a/Source/Core/VideoBackends/D3D/D3DShader.cpp b/Source/Core/VideoBackends/D3D/D3DShader.cpp index 0d2c2c7a8f6..665c0cf644e 100644 --- a/Source/Core/VideoBackends/D3D/D3DShader.cpp +++ b/Source/Core/VideoBackends/D3D/D3DShader.cpp @@ -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(); diff --git a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp index 9bb0a72014d..4ff8bf28de5 100644 --- a/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp +++ b/Source/Core/VideoBackends/OGL/ProgramShaderCache.cpp @@ -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; diff --git a/Source/Core/VideoCommon/AVIDump.cpp b/Source/Core/VideoCommon/AVIDump.cpp index 4a37d2cf223..fe5b0050e79 100644 --- a/Source/Core/VideoCommon/AVIDump.cpp +++ b/Source/Core/VideoCommon/AVIDump.cpp @@ -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; diff --git a/Source/Core/VideoCommon/ImageWrite.cpp b/Source/Core/VideoCommon/ImageWrite.cpp index 8c5284eb579..38ca509c3e8 100644 --- a/Source/Core/VideoCommon/ImageWrite.cpp +++ b/Source/Core/VideoCommon/ImageWrite.cpp @@ -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; }