mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 18:40:49 +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 "system.h"
|
||||||
#include "retroarch.h"
|
#include "retroarch.h"
|
||||||
#include "command_event.h"
|
#include "command_event.h"
|
||||||
|
#include "file_path_special.h"
|
||||||
#include "libretro_version_1.h"
|
#include "libretro_version_1.h"
|
||||||
#include "verbosity.h"
|
#include "verbosity.h"
|
||||||
|
|
||||||
@ -978,19 +979,15 @@ static bool dump_to_file_desperate(const void *data,
|
|||||||
{
|
{
|
||||||
time_t time_;
|
time_t time_;
|
||||||
char timebuf[256];
|
char timebuf[256];
|
||||||
|
char application_data[PATH_MAX_LENGTH];
|
||||||
char path[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;
|
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_);
|
time(&time_);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user