Add RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY

This commit is contained in:
AndresSM 2014-02-07 01:56:41 -05:00
parent 22bcb8aeab
commit 0428b44e94
2 changed files with 10 additions and 1 deletions

View File

@ -1,4 +1,4 @@
/* RetroArch - A frontend for libretro.
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
@ -616,6 +616,11 @@ bool rarch_environment_cb(unsigned cmd, void *data)
RARCH_LOG("Environ SYSTEM_DIRECTORY: \"%s\".\n", g_settings.system_directory);
break;
case RETRO_ENVIRONMENT_GET_SRAM_DIRECTORY:
*(const char **)data = g_extern.savefile_dir ? g_extern.savefile_dir : NULL;
RARCH_LOG("Environ SAVE_DIRECTORY: \"%s\".\n", g_extern.savefile_dir);
break;
case RETRO_ENVIRONMENT_SET_PIXEL_FORMAT:
{
enum retro_pixel_format pix_fmt = *(const enum retro_pixel_format*)data;

View File

@ -575,6 +575,10 @@ enum retro_mod
// If so, no such directory is defined,
// and it's up to the implementation to find a suitable directory.
//
#define RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY 31
// const char ** --
// Returns the "save" directory of the frontend.
// This directory can be used to store SRAM, memory cards, high scores, etc
enum retro_log_level
{