summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorGlenn Rice <glennricster@gmail.com>2011-01-12 18:09:16 +0000
committerGlenn Rice <glennricster@gmail.com>2011-01-12 18:09:16 +0000
commitfcd72bdba93791246445ea2650279c236d597553 (patch)
tree8143ef9fed85f7601713806d0ef17b4217422c02 /Source/Core
parentd5b7c5802edf0331b59f281c2e297a938939fd26 (diff)
Fix the panic alert hack for windows and osx. The macro needed to be defined after HAVE_WX is defined. That explains why windows accepted the string concatenation that I thought it wouldn't.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6829 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Common.h8
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h8
-rw-r--r--Source/Core/DolphinWX/Src/ConfigMain.cpp3
-rw-r--r--Source/Core/DolphinWX/Src/Main.cpp4
-rw-r--r--Source/Core/DolphinWX/Src/MemcardManager.cpp7
-rw-r--r--Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp3
6 files changed, 13 insertions, 20 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 8f08d8d4a7..a130d39e20 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -117,6 +117,14 @@ private:
#include "config.h" // SCons autoconfiguration defines
#endif
+#if defined(HAVE_WX) && HAVE_WX
+// This should be used to mark c strings as translatable in PanicAlerts but only in
+// wxWidgets portions of the code.
+#define _wxt(a) (std::string(wxString(wxGetTranslation(wxT(a))).To8BitData()).c_str())
+#else
+#define _wxt(a) a
+#endif
+
// Windows compatibility
#ifndef _WIN32
#include <limits.h>
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index 6545c4b92e..6fa602a31d 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -122,14 +122,6 @@ inline T max(const T& a, const T& b) {return a > b ? a : b;}
// Defined in Misc.cpp.
const char* GetLastErrorMsg();
-#if defined(HAVE_WX) && HAVE_WX
-// This should be used to mark c strings as translatable in PanicAlerts but only in
-// wxWidgets portions of the code.
-#define _wxt(a) (std::string(wxString(wxGetTranslation(wxT(a))).To8BitData()).c_str())
-#else
-#define _wxt(a) a
-#endif
-
namespace Common
{
inline u8 swap8(u8 _data) {return _data;}
diff --git a/Source/Core/DolphinWX/Src/ConfigMain.cpp b/Source/Core/DolphinWX/Src/ConfigMain.cpp
index 4d136a2a30..010477ca02 100644
--- a/Source/Core/DolphinWX/Src/ConfigMain.cpp
+++ b/Source/Core/DolphinWX/Src/ConfigMain.cpp
@@ -998,8 +998,7 @@ void CConfigMain::ChooseMemcardPath(std::string& strMemcard, bool isSlotA)
}
else
{
- PanicAlert("%s", _wxt("Cannot use that file as a memory card.\n"
- "Are you trying to use the same file in both slots?"));
+ PanicAlert("%s", _wxt("Cannot use that file as a memory card.\nAre you trying to use the same file in both slots?"));
}
}
}
diff --git a/Source/Core/DolphinWX/Src/Main.cpp b/Source/Core/DolphinWX/Src/Main.cpp
index f0f93b4da6..85be330c94 100644
--- a/Source/Core/DolphinWX/Src/Main.cpp
+++ b/Source/Core/DolphinWX/Src/Main.cpp
@@ -182,9 +182,7 @@ bool DolphinApp::OnInit()
// TODO: if First Boot
if (!cpu_info.bSSE2)
{
- PanicAlert("%s", _wxt("Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\n"
- "Unfortunately your CPU does not support them, so Dolphin will not run.\n\n"
- "Sayonara!\n"));
+ PanicAlert("%s", _wxt("Hi,\n\nDolphin requires that your CPU has support for SSE2 extensions.\nUnfortunately your CPU does not support them, so Dolphin will not run.\n\nSayonara!\n"));
return false;
}
diff --git a/Source/Core/DolphinWX/Src/MemcardManager.cpp b/Source/Core/DolphinWX/Src/MemcardManager.cpp
index e3a5b3bf0b..a2b76e7030 100644
--- a/Source/Core/DolphinWX/Src/MemcardManager.cpp
+++ b/Source/Core/DolphinWX/Src/MemcardManager.cpp
@@ -475,8 +475,7 @@ bool CMemcardManager::CopyDeleteSwitch(u32 error, int slot)
PanicAlert(E_SAVEFAILED);
break;
case DELETE_FAIL:
- PanicAlert("%s", _wxt("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 the saves to a new memcard\n"));
+ PanicAlert("%s", _wxt("Order of files in the File Directory do not match the block order\nRight click and export all of the saves,\nand import the the saves to a new memcard\n"));
break;
default:
PanicAlert(E_UNK);
@@ -587,9 +586,7 @@ void CMemcardManager::CopyDeleteClick(wxCommandEvent& event)
SplitPath(mpath, &path1, &path2, NULL);
path1 += path2;
File::CreateDir(path1.c_str());
- if(PanicYesNo(_wxt("Warning: This will overwrite any existing saves "
- "that are in the folder:\n%s\nand have the same name"
- " as a file on your memcard\nContinue?"), path1.c_str()))
+ if(PanicYesNo(_wxt("Warning: This will overwrite any existing saves that are in the folder:\n%s\nand have the same name as a file on your memcard\nContinue?"), path1.c_str()))
for (int i = 0; i < DIRLEN; i++)
{
CopyDeleteSwitch(memoryCard[slot]->ExportGci(i, ".", &path1), -1);
diff --git a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp
index e4670aa21e..b8138cb9ee 100644
--- a/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp
+++ b/Source/Core/DolphinWX/Src/WiimoteConfigDiag.cpp
@@ -115,8 +115,7 @@ void WiimoteConfigDiag::PairUpRealWiimotes(wxCommandEvent&)
UpdateGUI();
}
else if (paired < 0)
- PanicAlert("%s", _wxt("A supported bluetooth device was not found!\n"
- "(Only the Microsoft bluetooth stack is supported.)"));
+ PanicAlert("%s", _wxt("A supported bluetooth device was not found!\n(Only the Microsoft bluetooth stack is supported.)"));
}
#endif