From 1cc60594200a651af49bc62289be0a42c23f8e44 Mon Sep 17 00:00:00 2001 From: pjft Date: Sat, 28 Oct 2017 21:21:48 +0100 Subject: [PATCH] Warning Fixes --- es-core/src/components/VideoComponent.cpp | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/es-core/src/components/VideoComponent.cpp b/es-core/src/components/VideoComponent.cpp index b942f2e03..c85092789 100644 --- a/es-core/src/components/VideoComponent.cpp +++ b/es-core/src/components/VideoComponent.cpp @@ -26,9 +26,7 @@ void writeSubtitle(const char* gameName, const char* systemName, bool always) FILE* file = fopen(getTitlePath().c_str(), "w"); int end = (int)(Settings::getInstance()->getInt("ScreenSaverSwapVideoTimeout") / (1000)); if (always) { - fprintf(file, "1\n00:00:01,000 --> 00:00:"); - fprintf(file, std::to_string(end).c_str()); - fprintf(file, ",000\n"); + fprintf(file, "1\n00:00:01,000 --> 00:00:%d,000\n", end); } else { @@ -40,13 +38,7 @@ void writeSubtitle(const char* gameName, const char* systemName, bool always) if (!always) { if (end > 12) { - fprintf(file, "2\n00:00:"); - fprintf(file, std::to_string(end - 4).c_str()); - fprintf(file, ",000 --> 00:00:"); - fprintf(file, std::to_string(end).c_str()); - fprintf(file, ",000\n"); - fprintf(file, "%s\n", gameName); - fprintf(file, "%s\n", systemName); + fprintf(file, "2\n00:00:%d,000 --> 00:00:%d,000\n%s\n%s\n", end-4, end, gameName, systemName); } }