mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-11 16:49:28 +02:00
Another small DSP HLE update.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1123 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -371,3 +371,26 @@ int ChooseStringFrom(const char* str, const char* * items)
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// Thousand separator. Turns 12345678 into 12,345,678.
|
||||
std::string ThS(int a, bool b)
|
||||
{
|
||||
char cbuf[20]; int j = 0;
|
||||
|
||||
// determine treatment of signed or unsigned
|
||||
if(b) sprintf(cbuf, "%u", a); else sprintf(cbuf, "%i", a);
|
||||
|
||||
|
||||
std::string sbuf = cbuf;
|
||||
for (int i = 0; i < sbuf.length(); ++i)
|
||||
{
|
||||
if((i & 3) == 3)
|
||||
{
|
||||
sbuf.insert(sbuf.length() - i, ",");
|
||||
}
|
||||
}
|
||||
return sbuf;
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user