mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Simplify dump_to_file_desperate
This commit is contained in:
parent
4372d55325
commit
f59420094a
15
content.c
15
content.c
@ -62,6 +62,7 @@
|
||||
#include "system.h"
|
||||
#include "retroarch.h"
|
||||
#include "command_event.h"
|
||||
#include "file_path_special.h"
|
||||
#include "libretro_version_1.h"
|
||||
#include "verbosity.h"
|
||||
|
||||
@ -978,19 +979,15 @@ static bool dump_to_file_desperate(const void *data,
|
||||
{
|
||||
time_t time_;
|
||||
char timebuf[256];
|
||||
char application_data[PATH_MAX_LENGTH];
|
||||
char path[PATH_MAX_LENGTH];
|
||||
#if defined(_WIN32) && !defined(_XBOX)
|
||||
const char *base = getenv("APPDATA");
|
||||
#elif defined(__CELLOS_LV2__) || defined(_XBOX)
|
||||
const char *base = NULL;
|
||||
#else
|
||||
const char *base = getenv("HOME");
|
||||
#endif
|
||||
|
||||
if (!base)
|
||||
if (!fill_pathname_application_data(application_data,
|
||||
sizeof(application_data)))
|
||||
return false;
|
||||
|
||||
snprintf(path, sizeof(path), "%s/RetroArch-recovery-%u", base, type);
|
||||
snprintf(path, sizeof(path), "%s/RetroArch-recovery-%u",
|
||||
application_data, type);
|
||||
|
||||
time(&time_);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user