src/SDL_log.c
changeset 7009 161b7b6a5303
parent 6885 700f1b25f77f
child 7191 75360622e65f
child 8460 f483e8bdae3c
     1.1 --- a/src/SDL_log.c	Sat Mar 16 11:00:04 2013 -0700
     1.2 +++ b/src/SDL_log.c	Sun Mar 17 20:07:02 2013 +0800
     1.3 @@ -327,6 +327,20 @@
     1.4              return;
     1.5          }
     1.6      }
     1.7 +#elif defined(__PSP__)
     1.8 +//Simple Log System for PSP
     1.9 +	{
    1.10 +		unsigned int length;
    1.11 +		char*		 output;
    1.12 +		FILE*		 pFile;
    1.13 +		length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1;
    1.14 +        output = SDL_stack_alloc(char, length);
    1.15 +		SDL_snprintf(output, length, "%s: %s", SDL_priority_prefixes[priority], message);
    1.16 +		pFile = fopen ("SDL_Log.txt", "a");
    1.17 +		fwrite (output, strlen (output), 1, pFile);
    1.18 +		SDL_stack_free(output);
    1.19 +		fclose (pFile);
    1.20 +	}
    1.21  #endif
    1.22  #if HAVE_STDIO_H
    1.23      fprintf(stderr, "%s: %s\n", SDL_priority_prefixes[priority], message);