mirror of
https://github.com/libretro/RetroArch
synced 2025-04-01 13:20:43 +00:00
use filestream_write_file instead
This commit is contained in:
parent
a865720d25
commit
faef304755
@ -2576,7 +2576,6 @@ static int cheevos_iterate(coro_t* coro)
|
|||||||
size_t to_read = 4096;
|
size_t to_read = 4096;
|
||||||
uint8_t *buffer = NULL;
|
uint8_t *buffer = NULL;
|
||||||
const char *end = NULL;
|
const char *end = NULL;
|
||||||
RFILE* file;
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@ -3220,9 +3219,8 @@ static int cheevos_iterate(coro_t* coro)
|
|||||||
CORO_GOSUB(HTTP_GET);
|
CORO_GOSUB(HTTP_GET);
|
||||||
if (CHEEVOS_VAR_JSON != NULL)
|
if (CHEEVOS_VAR_JSON != NULL)
|
||||||
{
|
{
|
||||||
file = filestream_open(CHEEVOS_VAR_BADGE_PATH, RFILE_MODE_WRITE, -1);
|
if (filestream_write_file(CHEEVOS_VAR_BADGE_PATH, CHEEVOS_VAR_JSON, CHEEVOS_VAR_K))
|
||||||
filestream_write(file, CHEEVOS_VAR_JSON, CHEEVOS_VAR_K);
|
RARCH_ERR("[CHEEVOS]: error writing badge %s\n", CHEEVOS_VAR_BADGE_PATH);
|
||||||
filestream_close(file);
|
|
||||||
#ifdef CHEEVOS_LOG_BADGES
|
#ifdef CHEEVOS_LOG_BADGES
|
||||||
RARCH_LOG("[CHEEVOS]: downloaded badge %s\n", CHEEVOS_VAR_BADGE_PATH);
|
RARCH_LOG("[CHEEVOS]: downloaded badge %s\n", CHEEVOS_VAR_BADGE_PATH);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user