~ubuntu-branches/ubuntu/saucy/vdr-plugin-skinenigmang/saucy

« back to all changes in this revision

Viewing changes to logo.c

  • Committer: Bazaar Package Importer
  • Author(s): Tobias Grimm
  • Date: 2010-05-06 19:09:09 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20100506190909-ncmhjfk6a0y453zw
Tags: upstream-0.1.1
ImportĀ upstreamĀ versionĀ 0.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
    return false;
50
50
 
51
51
  char *strFilename = NULL;
52
 
  asprintf(&strFilename, "%s/%d.%s", EnigmaConfig.GetImagesDir(), Event->EventID(), EnigmaConfig.GetImageExtension());
53
 
  int rc = DrawImage(strFilename, x, y, w, h, c, bmp);
54
 
  free (strFilename);
 
52
  int rc = false;
 
53
  if (-1 != asprintf(&strFilename, "%s/%d.%s", EnigmaConfig.GetImagesDir(), Event->EventID(), EnigmaConfig.GetImageExtension())) {
 
54
    rc = DrawImage(strFilename, x, y, w, h, c, bmp);
 
55
    free (strFilename);
 
56
  }
55
57
  return rc;
56
58
}
57
59
 
61
63
    return false;
62
64
 
63
65
  char *strFilename = NULL;
64
 
  asprintf(&strFilename, "%s/%s.%s", Recording->FileName(), RECORDING_COVER, EnigmaConfig.GetImageExtension());
65
 
  int rc = DrawImage(strFilename, x, y, w, h, c, bmp);
66
 
  free (strFilename);
 
66
  int rc = false;
 
67
  if (-1 != asprintf(&strFilename, "%s/%s.%s", Recording->FileName(), RECORDING_COVER, EnigmaConfig.GetImageExtension())) {
 
68
    rc = DrawImage(strFilename, x, y, w, h, c, bmp);
 
69
    free (strFilename);
 
70
  }
67
71
  return rc;
68
72
}
69
73
 
144
148
  if (fileNameP == NULL)
145
149
    return false;
146
150
 
147
 
  char *strFilename;
148
 
  asprintf(&strFilename, "%s/%s.xpm", EnigmaConfig.GetLogoDir(), fileNameP);
149
 
  if (strFilename == NULL)
 
151
  char *strFilename = NULL;
 
152
  if (-1 == asprintf(&strFilename, "%s/%s.xpm", EnigmaConfig.GetLogoDir(), fileNameP))
150
153
    return false;
151
154
 
152
155
  debug("cPluginSkinEnigma::Load(%s)", strFilename);