From 862470c89c0175f0811d42c915d2022395537e57 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Wed, 26 Jan 2011 20:12:22 +0000 Subject: [PATCH] neutrino: start even with missing LCD skin files on TripleDragon git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@1074 e54a6e83-5905-42d5-8d5c-058d10e6a962 Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/e147a0b910872aa7676499f6728f10e4e41a4d73 Author: Stefan Seyfried Date: 2011-01-26 (Wed, 26 Jan 2011) --- src/driver/newclock.cpp | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/driver/newclock.cpp b/src/driver/newclock.cpp index a2b71d91b..061549eae 100644 --- a/src/driver/newclock.cpp +++ b/src/driver/newclock.cpp @@ -54,20 +54,24 @@ void loadSkin(char * const filename, char * const backup_filename, const unsigne unsigned char BMPWidth; unsigned char BMPHeight; char line_buffer[4]; - file = filename; digit_pos = modify_char_filename; for (i = 0; i < count; i++) { + bool retried = false; retry: if ((fd = fopen(file, "rb")) == 0) { - printf("[lcdd] %s-skin not found -> using default...\n", name); + printf("[lcdd] %s-skin not found (%s) -> using default...\n", name, file); file = backup_filename; digit_pos = modify_char_backup_filename; i = 0; - goto retry; + if (!retried) { + retried = true; + goto retry; + } + break; } fseek(fd, 0x12, SEEK_SET); @@ -82,7 +86,10 @@ void loadSkin(char * const filename, char * const backup_filename, const unsigne file = backup_filename; digit_pos = modify_char_backup_filename; i = 0; - goto retry; + if (!retried) { + retried = true; + goto retry; + } } fseek(fd, 0x3E, SEEK_SET);