Corrections, some %i->%d around other code as well.

This commit is contained in:
LunaMoo committed 2017-05-30 13:52:29 +02:00
1 parent 296f724ad1
commit 5e0f8141d2
8 files changed
+25 -27

No files matched your search

+2 -2
View File
@@ -274,9 +274,9 @@ std::string CPUInfo::Summarize()
{
std::string sum;
if (num_cores == 1)
sum = StringFromFormat("%s, %i core", cpu_string, num_cores);
sum = StringFromFormat("%s, %d core", cpu_string, num_cores);
else
sum = StringFromFormat("%s, %i cores", cpu_string, num_cores);
sum = StringFromFormat("%s, %d cores", cpu_string, num_cores);
if (bSwp) sum += ", SWP";
if (bHalf) sum += ", Half";
if (bThumb) sum += ", Thumb";
+2 -2
View File
@@ -267,10 +267,10 @@ std::string CPUInfo::Summarize()
{
std::string sum;
if (num_cores == 1)
sum = StringFromFormat("%s, %i core", cpu_string, num_cores);
sum = StringFromFormat("%s, %d core", cpu_string, num_cores);
else
{
sum = StringFromFormat("%s, %i cores", cpu_string, num_cores);
sum = StringFromFormat("%s, %d cores", cpu_string, num_cores);
if (HTT) sum += StringFromFormat(" (%i logical threads per physical core)", logical_cpu_count);
}
if (bSSE) sum += ", SSE";
+1 -1
View File
@@ -143,7 +143,7 @@ std::string Timer::GetTimeElapsedFormatted() const
// Hours
u32 Hours = Minutes / 60;
std::string TmpStr = StringFromFormat("%02i:%02i:%02i:%03i",
std::string TmpStr = StringFromFormat("%02d:%02d:%02d:%03d",
Hours, Minutes % 60, Seconds % 60, Milliseconds % 1000);
return TmpStr;
}
+1 -1
View File
@@ -288,6 +288,6 @@ std::string ParamSFOData::GenerateFakeID(std::string filename) {
}
file = file.substr(0, 4);
std::string fakeID = file + StringFromFormat("%05i", sumOfAllLetters);
std::string fakeID = file + StringFromFormat("%05d", sumOfAllLetters);
return fakeID;
}
+6 -6
View File
@@ -95,14 +95,14 @@ std::vector<std::string> DisassembleArm2(const u8 *data, int size) {
bkpt_count++;
} else {
if (bkpt_count) {
lines.push_back(StringFromFormat("BKPT 1 (x%i)", bkpt_count));
lines.push_back(StringFromFormat("BKPT 1 (x%d)", bkpt_count));
bkpt_count = 0;
}
lines.push_back(buf);
}
}
if (bkpt_count) {
lines.push_back(StringFromFormat("BKPT 1 (x%i)", bkpt_count));
lines.push_back(StringFromFormat("BKPT 1 (x%d)", bkpt_count));
}
return lines;
}
@@ -157,7 +157,7 @@ std::vector<std::string> DisassembleArm64(const u8 *data, int size) {
bkpt_count++;
} else {
if (bkpt_count) {
lines.push_back(StringFromFormat("BKPT 1 (x%i)", bkpt_count));
lines.push_back(StringFromFormat("BKPT 1 (x%d)", bkpt_count));
bkpt_count = 0;
}
if (true) {
@@ -167,7 +167,7 @@ std::vector<std::string> DisassembleArm64(const u8 *data, int size) {
}
}
if (bkpt_count) {
lines.push_back(StringFromFormat("BKPT 1 (x%i)", bkpt_count));
lines.push_back(StringFromFormat("BKPT 1 (x%d)", bkpt_count));
}
return lines;
}
@@ -235,14 +235,14 @@ std::vector<std::string> DisassembleX86(const u8 *data, int size) {
int3_count++;
} else {
if (int3_count) {
lines.push_back(StringFromFormat("int3 (x%i)", int3_count));
lines.push_back(StringFromFormat("int3 (x%d)", int3_count));
int3_count = 0;
}
lines.push_back(str);
}
}
if (int3_count) {
lines.push_back(StringFromFormat("int3 (x%i)", int3_count));
lines.push_back(StringFromFormat("int3 (x%d)", int3_count));
}
return lines;
}
+11 -13
View File
@@ -188,10 +188,9 @@ bool Load_PSP_ISO(FileLoader *fileLoader, std::string *error_string) {
std::vector<u8> paramsfo;
pspFileSystem.ReadEntireFile(sfoPath, paramsfo);
if (g_paramSFO.ReadSFO(paramsfo)) {
char title[1024];
sprintf(title, "%s : %s", g_paramSFO.GetValueString("DISC_ID").c_str(), g_paramSFO.GetValueString("TITLE").c_str());
INFO_LOG(LOADER, "%s", title);
host->SetWindowTitle(title);
std::string title = StringFromFormat("%s : %s", g_paramSFO.GetValueString("DISC_ID").c_str(), g_paramSFO.GetValueString("TITLE").c_str());
INFO_LOG(LOADER, "%s", title.c_str());
host->SetWindowTitle(title.c_str());
}
}
@@ -326,13 +325,12 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
std::string homebrewName = PSP_CoreParameter().fileToStart;
std::size_t lslash = homebrewName.find_last_of("/");
homebrewName = homebrewName.substr(lslash +1);
homebrewName = homebrewName.substr(lslash + 1);
std::string madeUpID = g_paramSFO.GenerateFakeID();
char title[1024];
sprintf(title, "%s : %s", madeUpID.c_str(), homebrewName.c_str());
INFO_LOG(LOADER, "%s", title);
host->SetWindowTitle(title);
std::string title = StringFromFormat("%s : %s", madeUpID.c_str(), homebrewName.c_str());
INFO_LOG(LOADER, "%s", title.c_str());
host->SetWindowTitle(title.c_str());
// Temporary code
// TODO: Remove this after ~ 1.6
@@ -344,16 +342,16 @@ bool Load_PSP_ELF_PBP(FileLoader *fileLoader, std::string *error_string) {
savestateDir = ReplaceAll(savestateDir, "/", "\\");
#endif
for (int i = 0; i < 5; i += 1) {
std::string oldName = StringFromFormat("%s%s_%i.ppst", savestateDir.c_str(), homebrewName.c_str(), i);
std::string oldName = StringFromFormat("%s%s_%d.ppst", savestateDir.c_str(), homebrewName.c_str(), i);
if (File::Exists(oldName)) {
std::string newName = StringFromFormat("%s%s_1.00_%i.ppst", savestateDir.c_str(), madeUpID.c_str(), i);
std::string newName = StringFromFormat("%s%s_1.00_%d.ppst", savestateDir.c_str(), madeUpID.c_str(), i);
File::Rename(oldName, newName);
}
}
for (int i = 0; i < 5; i += 1) {
std::string oldName = StringFromFormat("%s%s_%i.jpg", savestateDir.c_str(), homebrewName.c_str(), i);
std::string oldName = StringFromFormat("%s%s_%d.jpg", savestateDir.c_str(), homebrewName.c_str(), i);
if (File::Exists(oldName)) {
std::string newName = StringFromFormat("%s%s_1.00_%i.jpg", savestateDir.c_str(), madeUpID.c_str(), i);
std::string newName = StringFromFormat("%s%s_1.00_%d.jpg", savestateDir.c_str(), madeUpID.c_str(), i);
File::Rename(oldName, newName);
}
}
+1 -1
View File
@@ -371,7 +371,7 @@ namespace SaveState
}
fullDiscId = StringFromFormat("%s_%s", discId.c_str(), discVer.c_str());
std::string temp = StringFromFormat("ms0:/PSP/PPSSPP_STATE/%s_%i.%s", fullDiscId.c_str(), slot, extension);
std::string temp = StringFromFormat("ms0:/PSP/PPSSPP_STATE/%s_%d.%s", fullDiscId.c_str(), slot, extension);
std::string hostPath;
if (pspFileSystem.GetHostPath(temp, hostPath)) {
return hostPath;
+1 -1
View File
@@ -188,7 +188,7 @@ SaveSlotView::SaveSlotView(const std::string &gameFilename, int slot, UI::Layout
Add(new Spacer(5));
AsyncImageFileView *fv = Add(new AsyncImageFileView(screenshotFilename_, IS_DEFAULT, wq, new UI::LayoutParams(82 * 2, 47 * 2)));
fv->SetOverlayText(StringFromFormat("%i", slot_ + 1));
fv->SetOverlayText(StringFromFormat("%d", slot_ + 1));
I18NCategory *pa = GetI18NCategory("Pause");