src/SDL_log.c
changeset 7343 faf0d8c7dbec
parent 7307 5d6b7b9432d3
child 7344 3d9397262c10
equal deleted inserted replaced
7342:4828e86c6010 7343:faf0d8c7dbec
   387 #elif defined(__PSP__)
   387 #elif defined(__PSP__)
   388     {
   388     {
   389         unsigned int length;
   389         unsigned int length;
   390         char*        output;
   390         char*        output;
   391         FILE*        pFile;
   391         FILE*        pFile;
       
   392         /* !!! FIXME: is there any reason we didn't just use fprintf() here? */
   392         length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
   393         length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
   393         output = SDL_stack_alloc(char, length);
   394         output = SDL_stack_alloc(char, length);
   394         SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);
   395         SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);
   395         pFile = fopen ("SDL_Log.txt", "a");
   396         pFile = fopen ("SDL_Log.txt", "a");
   396         fwrite (output, strlen (output), 1, pFile);
   397         fwrite (output, strlen (output), 1, pFile);