mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
Merge branch 'master' into master
This commit is contained in:
commit
54ef8f1399
16 changed files with 265 additions and 48 deletions
|
@ -1,6 +1,7 @@
|
|||
# 1.6.4 (future)
|
||||
|
||||
- ANDROID: Fire Stick & Fire TV remote overrides gamepad port 0 on button press and viceversa like SHIELD devices
|
||||
- ANDROID: Provide default save / system / state / screenshot locations
|
||||
- AUDIO: Audio mixer supports MOD/S3M/XM file types now!
|
||||
- INPUT: input swap override flag (for remotes) is cleared correctly
|
||||
- INPUT: allow specifying libretro device in remap files
|
||||
|
@ -8,14 +9,18 @@
|
|||
- INPUT: allow saving libretro device to remap files
|
||||
- INPUT: allow saving analog dpad mode to remap files
|
||||
- INPUT: allow removing core and game remap files from the menu
|
||||
- COMMON: Add 'Delete Core'option to Core Information menu.
|
||||
- COMMON: Add 'Delete Core' option to Core Information menu.
|
||||
- COMMON: Allow Max Timing Skew to be set to 0.
|
||||
- COMMON: Change the "content dir" behavior so it works on either a flag or an empty directory setting, now platform drivers can provide defaults for save / system / state / screenshot dirs and still allow the content dir functionality, these settings are under settings / saving and flagged as advanced
|
||||
- LOCALIZATION: Update Russian translation
|
||||
- WINDOWS: Provide default save / system / state / screenshot locations
|
||||
- LOBBIES: Show what country the host is in
|
||||
- MENU: Enable OSD text rendering for gdi and libcaca drivers
|
||||
- WINDOWS 98/ME/2K: Set default directory for MSVC 2005 RetroArch version.
|
||||
- WIIU: Exception handler rewritten.
|
||||
|
||||
# 1.6.3
|
||||
- IOS: Fix GL regression - 32bit color format cores were no longer rendering
|
||||
- IOS: Fix GL regression - 32bit color format cores were no longer rendering
|
||||
- CHEEVOS: Add support for N64 cheevos and other small fixes.
|
||||
- CHEEVOS: Add 'Achievements -> Achievements Verbose Mode'. Ability to display cheevos related messages in OSD, useful for RetroAchievements users.
|
||||
- AUDIO: Audio mixer's volume can now be independently increased/decreased, and muted.
|
||||
|
|
|
@ -295,6 +295,11 @@ static bool default_auto_shaders_enable = true;
|
|||
static bool default_sort_savefiles_enable = false;
|
||||
static bool default_sort_savestates_enable = false;
|
||||
|
||||
static bool default_savestates_in_content_dir = false;
|
||||
static bool default_savefiles_in_content_dir = false;
|
||||
static bool default_systemfiles_in_content_dir = false;
|
||||
static bool default_screenshots_in_content_dir = false;
|
||||
|
||||
#if defined(__CELLOS_LV2__) || defined(_XBOX1) || defined(_XBOX360)
|
||||
static unsigned menu_toggle_gamepad_combo = INPUT_TOGGLE_L3_R3;
|
||||
#elif defined(VITA)
|
||||
|
|
|
@ -1259,6 +1259,11 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
|||
SETTING_BOOL("audio_wasapi_float_format", &settings->bools.audio_wasapi_float_format, true, wasapi_float_format, false);
|
||||
#endif
|
||||
|
||||
SETTING_BOOL("savestates_in_content_dir", &settings->bools.savestates_in_content_dir, true, default_savestates_in_content_dir, false);
|
||||
SETTING_BOOL("savefiles_in_content_dir", &settings->bools.savefiles_in_content_dir, true, default_savefiles_in_content_dir, false);
|
||||
SETTING_BOOL("systemfiles_in_content_dir", &settings->bools.systemfiles_in_content_dir, true, default_systemfiles_in_content_dir, false);
|
||||
SETTING_BOOL("screenshots_in_content_dir", &settings->bools.screenshots_in_content_dir, true, default_screenshots_in_content_dir, false);
|
||||
|
||||
if (global)
|
||||
{
|
||||
SETTING_BOOL("custom_bgm_enable", &global->console.sound.system_bgm_enable, true, false, false);
|
||||
|
|
|
@ -209,6 +209,11 @@ typedef struct settings
|
|||
bool sort_savestates_enable;
|
||||
bool config_save_on_exit;
|
||||
bool show_hidden_files;
|
||||
|
||||
bool savefiles_in_content_dir;
|
||||
bool savestates_in_content_dir;
|
||||
bool screenshots_in_content_dir;
|
||||
bool systemfiles_in_content_dir;
|
||||
#ifdef HAVE_LAKKA
|
||||
bool ssh_enable;
|
||||
bool samba_enable;
|
||||
|
|
|
@ -1016,7 +1016,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
|||
break;
|
||||
|
||||
case RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY:
|
||||
if (string_is_empty(settings->paths.directory_system))
|
||||
if (string_is_empty(settings->paths.directory_system) || settings->bools.systemfiles_in_content_dir)
|
||||
{
|
||||
const char *fullpath = path_get(RARCH_PATH_CONTENT);
|
||||
if (!string_is_empty(fullpath))
|
||||
|
@ -1025,8 +1025,9 @@ bool rarch_environment_cb(unsigned cmd, void *data)
|
|||
|
||||
temp_path[0] = '\0';
|
||||
|
||||
RARCH_WARN("SYSTEM DIR is empty, assume CONTENT DIR %s\n",
|
||||
fullpath);
|
||||
if (string_is_empty(settings->paths.directory_system))
|
||||
RARCH_WARN("SYSTEM DIR is empty, assume CONTENT DIR %s\n",
|
||||
fullpath);
|
||||
fill_pathname_basedir(temp_path, fullpath, sizeof(temp_path));
|
||||
dir_set(RARCH_DIR_SYSTEM, temp_path);
|
||||
}
|
||||
|
|
|
@ -1557,18 +1557,6 @@ static void frontend_unix_get_env(int *argc,
|
|||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS],
|
||||
app_dir, "assets/wallpapers",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_WALLPAPERS]));
|
||||
if(!string_is_empty(downloads_dir) && test_permissions(downloads_dir))
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
downloads_dir, "",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
app_dir, "downloads",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
|
||||
__android_log_print(ANDROID_LOG_INFO,
|
||||
"RetroArch", "[ENV]: default download folder: [%s]",
|
||||
|
@ -1576,8 +1564,7 @@ static void frontend_unix_get_env(int *argc,
|
|||
|
||||
switch (perms)
|
||||
{
|
||||
/* Set defaults for this since we can't guarantee
|
||||
* saving on content dir will work in this case */
|
||||
/* only sdcard/Android/data/com.retroarch is writable */
|
||||
case INTERNAL_STORAGE_APPDIR_WRITABLE:
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
internal_storage_app_path, "saves",
|
||||
|
@ -1605,11 +1592,11 @@ static void frontend_unix_get_env(int *argc,
|
|||
internal_storage_app_path, "cheats",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CHEATS]));
|
||||
|
||||
if( !string_is_empty(screenshot_dir)
|
||||
&& test_permissions(screenshot_dir))
|
||||
if(!string_is_empty(screenshot_dir)
|
||||
&& test_permissions(screenshot_dir))
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
||||
screenshot_dir, "",
|
||||
screenshot_dir, "RetroArch",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
}
|
||||
else
|
||||
|
@ -1619,10 +1606,24 @@ static void frontend_unix_get_env(int *argc,
|
|||
sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
}
|
||||
|
||||
if(!string_is_empty(downloads_dir)
|
||||
&& test_permissions(downloads_dir))
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
downloads_dir, "RetroArch",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
internal_storage_app_path, "downloads",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
/* only the internal app dir is writable, this should never happen*/
|
||||
case INTERNAL_STORAGE_NOT_WRITABLE:
|
||||
/* Set defaults for this since we can't guarantee
|
||||
* saving on content dir will work in this case. */
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
app_dir, "saves",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
||||
|
@ -1653,7 +1654,7 @@ static void frontend_unix_get_env(int *argc,
|
|||
&& test_permissions(screenshot_dir))
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
||||
screenshot_dir, "",
|
||||
screenshot_dir, "RetroArch",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
}
|
||||
else
|
||||
|
@ -1663,10 +1664,40 @@ static void frontend_unix_get_env(int *argc,
|
|||
sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
}
|
||||
|
||||
if(!string_is_empty(downloads_dir)
|
||||
&& test_permissions(downloads_dir))
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
downloads_dir, "RetroArch",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
else
|
||||
{
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
app_dir, "downloads",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
}
|
||||
|
||||
break;
|
||||
/* sdcard is writable, this should be the case most of the time*/
|
||||
case INTERNAL_STORAGE_WRITABLE:
|
||||
/* Don't set defaults for saves, states, system or screenshots
|
||||
in this case to be able to honour saving on content dir */
|
||||
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
internal_storage_path, "RetroArch/saves",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
|
||||
internal_storage_path, "RetroArch/states",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
||||
internal_storage_path, "RetroArch/system",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
||||
internal_storage_path, "RetroArch/screenshots",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS],
|
||||
internal_storage_path, "RetroArch/downloads",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
|
||||
fill_pathname_join(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
|
||||
internal_storage_path, "RetroArch/config",
|
||||
sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
||||
|
|
|
@ -278,9 +278,9 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
|
|||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_PLAYLIST],
|
||||
":\\playlists", sizeof(g_defaults.dirs[DEFAULT_DIR_ASSETS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG],
|
||||
":\\records_config", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
|
||||
":\\config\\record", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_CONFIG]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT],
|
||||
":\\records", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
|
||||
":\\recordings", sizeof(g_defaults.dirs[DEFAULT_DIR_RECORD_OUTPUT]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG],
|
||||
":\\config", sizeof(g_defaults.dirs[DEFAULT_DIR_MENU_CONFIG]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_REMAP],
|
||||
|
@ -303,6 +303,12 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
|
|||
":\\downloads", sizeof(g_defaults.dirs[DEFAULT_DIR_CORE_ASSETS]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT],
|
||||
":\\screenshots", sizeof(g_defaults.dirs[DEFAULT_DIR_SCREENSHOT]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
":\\saves", sizeof(g_defaults.dirs[DEFAULT_DIR_SRAM]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
|
||||
":\\states", sizeof(g_defaults.dirs[DEFAULT_DIR_SAVESTATE]));
|
||||
fill_pathname_expand_special(g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
||||
":\\system", sizeof(g_defaults.dirs[DEFAULT_DIR_SYSTEM]));
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
|
||||
|
|
|
@ -42,6 +42,37 @@
|
|||
#include "../../configuration.h"
|
||||
#include "../../driver.h"
|
||||
|
||||
#ifndef _CPU_ISR_Disable
|
||||
#define _CPU_ISR_Disable( _isr_cookie ) \
|
||||
{ register u32 _disable_mask = 0; \
|
||||
_isr_cookie = 0; \
|
||||
__asm__ __volatile__ ( \
|
||||
"mfmsr %0\n" \
|
||||
"rlwinm %1,%0,0,17,15\n" \
|
||||
"mtmsr %1\n" \
|
||||
"extrwi %0,%0,1,16" \
|
||||
: "=&r" ((_isr_cookie)), "=&r" ((_disable_mask)) \
|
||||
: "0" ((_isr_cookie)), "1" ((_disable_mask)) \
|
||||
); \
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef _CPU_ISR_Restore
|
||||
#define _CPU_ISR_Restore( _isr_cookie ) \
|
||||
{ register u32 _enable_mask = 0; \
|
||||
__asm__ __volatile__ ( \
|
||||
" cmpwi %0,0\n" \
|
||||
" beq 1f\n" \
|
||||
" mfmsr %1\n" \
|
||||
" ori %1,%1,0x8000\n" \
|
||||
" mtmsr %1\n" \
|
||||
"1:" \
|
||||
: "=r"((_isr_cookie)),"=&r" ((_enable_mask)) \
|
||||
: "0"((_isr_cookie)),"1" ((_enable_mask)) \
|
||||
); \
|
||||
}
|
||||
#endif
|
||||
|
||||
extern syssram* __SYS_LockSram(void);
|
||||
extern u32 __SYS_UnlockSram(u32 write);
|
||||
|
||||
|
@ -92,6 +123,9 @@ static volatile bool g_draw_done = false;
|
|||
static bool g_vsync = false;
|
||||
static uint32_t g_orientation = 0;
|
||||
|
||||
static uint32_t retraceCount;
|
||||
static uint32_t referenceRetraceCount;
|
||||
|
||||
static uint8_t gx_fifo[256 * 1024] ATTRIBUTE_ALIGN(32);
|
||||
static uint8_t display_list[1024] ATTRIBUTE_ALIGN(32);
|
||||
static size_t display_list_size;
|
||||
|
@ -213,9 +247,15 @@ unsigned menu_gx_resolutions[][2] = {
|
|||
|
||||
static void retrace_callback(u32 retrace_count)
|
||||
{
|
||||
u32 level = 0;
|
||||
|
||||
(void)retrace_count;
|
||||
|
||||
g_draw_done = true;
|
||||
OSSignalCond(g_video_cond);
|
||||
_CPU_ISR_Disable(level);
|
||||
retraceCount = retrace_count;
|
||||
_CPU_ISR_Restore(level);
|
||||
}
|
||||
|
||||
static bool gx_isValidXOrigin(int origin)
|
||||
|
@ -249,7 +289,7 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||
VIDEO_SetPostRetraceCallback(NULL);
|
||||
g_draw_done = false;
|
||||
/* wait for next even field */
|
||||
/* this prevents screen artefacts when switching
|
||||
/* this prevents screen artifacts when switching
|
||||
* between interlaced & non-interlaced modes */
|
||||
do VIDEO_WaitVSync();
|
||||
while (!VIDEO_GetNextField());
|
||||
|
@ -293,13 +333,13 @@ static void gx_set_video_mode(void *data, unsigned fbWidth, unsigned lines,
|
|||
max_height = VI_MAX_HEIGHT_MPAL;
|
||||
break;
|
||||
case VI_EURGB60:
|
||||
max_width = VI_MAX_WIDTH_NTSC;
|
||||
max_height = VI_MAX_HEIGHT_NTSC;
|
||||
max_width = VI_MAX_WIDTH_EURGB60;
|
||||
max_height = VI_MAX_HEIGHT_EURGB60;
|
||||
break;
|
||||
default:
|
||||
tvmode = VI_NTSC;
|
||||
max_width = VI_MAX_WIDTH_EURGB60;
|
||||
max_height = VI_MAX_HEIGHT_EURGB60;
|
||||
max_width = VI_MAX_WIDTH_NTSC;
|
||||
max_height = VI_MAX_HEIGHT_NTSC;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -575,6 +615,10 @@ static void init_vtx(void *data, const video_info_t *video)
|
|||
{
|
||||
Mtx44 m;
|
||||
gx_video_t *gx = (gx_video_t*)data;
|
||||
u32 level = 0;
|
||||
_CPU_ISR_Disable(level);
|
||||
referenceRetraceCount = retraceCount;
|
||||
_CPU_ISR_Restore(level);
|
||||
|
||||
GX_SetCullMode(GX_CULL_NONE);
|
||||
GX_SetClipMode(GX_CLIP_DISABLE);
|
||||
|
@ -1440,6 +1484,7 @@ static bool gx_frame(void *data, const void *frame,
|
|||
char fps_text_buf[128];
|
||||
gx_video_t *gx = (gx_video_t*)data;
|
||||
u8 clear_efb = GX_FALSE;
|
||||
u32 level = 0;
|
||||
|
||||
fps_text_buf[0] = '\0';
|
||||
|
||||
|
@ -1524,6 +1569,12 @@ static bool gx_frame(void *data, const void *frame,
|
|||
gx_render_overlay(gx);
|
||||
#endif
|
||||
|
||||
_CPU_ISR_Disable(level);
|
||||
if (referenceRetraceCount > retraceCount)
|
||||
VIDEO_WaitVSync();
|
||||
referenceRetraceCount = retraceCount;
|
||||
_CPU_ISR_Restore(level);
|
||||
|
||||
GX_DrawDone();
|
||||
|
||||
if (video_info->fps_show)
|
||||
|
@ -1564,6 +1615,10 @@ static bool gx_frame(void *data, const void *frame,
|
|||
VIDEO_SetNextFramebuffer(gx->framebuf[g_current_framebuf]);
|
||||
VIDEO_Flush();
|
||||
|
||||
CPU_ISR_Disable(level);
|
||||
++referenceRetraceCount;
|
||||
_CPU_ISR_Restore(level);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -913,6 +913,14 @@ MSG_HASH(MENU_ENUM_LABEL_SORT_SAVEFILES_ENABLE,
|
|||
"sort_savefiles_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SORT_SAVESTATES_ENABLE,
|
||||
"sort_savestates_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SAVEFILES_IN_CONTENT_DIR_ENABLE,
|
||||
"savefiles_in_content_dir_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SAVESTATES_IN_CONTENT_DIR_ENABLE,
|
||||
"savestates_in_content_dir_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SYSTEMFILES_IN_CONTENT_DIR_ENABLE,
|
||||
"systemfiles_in_content_dir_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SCREENSHOTS_IN_CONTENT_DIR_ENABLE,
|
||||
"screenshots_in_content_dir_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_SSH_ENABLE,
|
||||
"ssh_enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_START_CORE,
|
||||
|
|
|
@ -1327,6 +1327,14 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVEFILES_ENABLE,
|
|||
"Sort Saves In Folders")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SORT_SAVESTATES_ENABLE,
|
||||
"Sort Savestates In Folders")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVESTATES_IN_CONTENT_DIR_ENABLE,
|
||||
"Write Savestates to Content Dir")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE,
|
||||
"Write Saves to Content Dir")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SYSTEMFILES_IN_CONTENT_DIR_ENABLE,
|
||||
"System Files are in Content Dir")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SCREENSHOTS_IN_CONTENT_DIR_ENABLE,
|
||||
"Write Screenshots to Content Dir")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_SSH_ENABLE,
|
||||
"SSH Enable")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_START_CORE,
|
||||
|
|
|
@ -437,11 +437,18 @@ void scond_free(scond_t *cond)
|
|||
#ifdef USE_WIN32_THREADS
|
||||
static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds)
|
||||
{
|
||||
static bool beginPeriod = false;
|
||||
|
||||
struct QueueEntry myentry;
|
||||
struct QueueEntry **ptr;
|
||||
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
static LARGE_INTEGER performanceCounterFrequency;
|
||||
LARGE_INTEGER tsBegin;
|
||||
static bool first_init = true;
|
||||
#else
|
||||
static bool beginPeriod = false;
|
||||
DWORD tsBegin;
|
||||
#endif
|
||||
|
||||
DWORD waitResult;
|
||||
DWORD dwFinalTimeout = dwMilliseconds; /* Careful! in case we begin in the head,
|
||||
we don't do the hot potato stuff,
|
||||
|
@ -453,16 +460,33 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
|||
|
||||
/* since this library is meant for realtime game software
|
||||
* I have no problem setting this to 1 and forgetting about it. */
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
if (first_init)
|
||||
{
|
||||
performanceCounterFrequency.QuadPart = 0;
|
||||
first_init = false;
|
||||
}
|
||||
|
||||
if (performanceCounterFrequency.QuadPart == 0)
|
||||
{
|
||||
QueryPerformanceFrequency(&performanceCounterFrequency);
|
||||
}
|
||||
#else
|
||||
if (!beginPeriod)
|
||||
{
|
||||
beginPeriod = true;
|
||||
timeBeginPeriod(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Now we can take a good timestamp for use in faking the timeout ourselves. */
|
||||
/* But don't bother unless we need to (to save a little time) */
|
||||
if (dwMilliseconds != INFINITE)
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
QueryPerformanceCounter(&tsBegin);
|
||||
#else
|
||||
tsBegin = timeGetTime();
|
||||
#endif
|
||||
|
||||
/* add ourselves to a queue of waiting threads */
|
||||
ptr = &cond->head;
|
||||
|
@ -504,8 +528,16 @@ static bool _scond_wait_win32(scond_t *cond, slock_t *lock, DWORD dwMilliseconds
|
|||
/* Assess the remaining timeout time */
|
||||
if (dwMilliseconds != INFINITE)
|
||||
{
|
||||
DWORD now = timeGetTime();
|
||||
#if _WIN32_WINNT >= 0x0500
|
||||
LARGE_INTEGER now;
|
||||
QueryPerformanceCounter(&now);
|
||||
LONGLONG elapsed = now.QuadPart - tsBegin.QuadPart;
|
||||
elapsed *= 1000;
|
||||
elapsed /= performanceCounterFrequency.QuadPart;
|
||||
#else
|
||||
DWORD now = timeGetTime();
|
||||
DWORD elapsed = now - tsBegin;
|
||||
#endif
|
||||
|
||||
/* Try one last time with a zero timeout (keeps the code simpler) */
|
||||
if (elapsed > dwMilliseconds)
|
||||
|
|
|
@ -4899,6 +4899,18 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data)
|
|||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SAVESTATE_THUMBNAIL_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SAVEFILES_IN_CONTENT_DIR_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SAVESTATES_IN_CONTENT_DIR_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SYSTEMFILES_IN_CONTENT_DIR_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
menu_displaylist_parse_settings_enum(menu, info,
|
||||
MENU_ENUM_LABEL_SCREENSHOTS_IN_CONTENT_DIR_ENABLE,
|
||||
PARSE_ONLY_BOOL, false);
|
||||
|
||||
info->need_refresh = true;
|
||||
info->need_push = true;
|
||||
|
|
|
@ -3048,7 +3048,7 @@ static bool setting_append_list(
|
|||
case SETTINGS_LIST_SAVING:
|
||||
{
|
||||
unsigned i;
|
||||
struct bool_entry bool_entries[7];
|
||||
struct bool_entry bool_entries[11];
|
||||
|
||||
START_GROUP(list, list_info, &group_info, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_SAVING_SETTINGS), parent_group);
|
||||
parent_group = msg_hash_to_str(MENU_ENUM_LABEL_SAVING_SETTINGS);
|
||||
|
@ -3098,6 +3098,30 @@ static bool setting_append_list(
|
|||
bool_entries[6].default_value = savestate_thumbnail_enable;
|
||||
bool_entries[6].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
bool_entries[7].target = &settings->bools.savefiles_in_content_dir;
|
||||
bool_entries[7].name_enum_idx = MENU_ENUM_LABEL_SAVEFILES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[7].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVEFILES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[7].default_value = default_savefiles_in_content_dir;
|
||||
bool_entries[7].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
bool_entries[8].target = &settings->bools.savestates_in_content_dir;
|
||||
bool_entries[8].name_enum_idx = MENU_ENUM_LABEL_SAVESTATES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[8].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SAVESTATES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[8].default_value = default_savestates_in_content_dir;
|
||||
bool_entries[8].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
bool_entries[9].target = &settings->bools.systemfiles_in_content_dir;
|
||||
bool_entries[9].name_enum_idx = MENU_ENUM_LABEL_SYSTEMFILES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[9].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SYSTEMFILES_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[9].default_value = default_systemfiles_in_content_dir;
|
||||
bool_entries[9].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
bool_entries[10].target = &settings->bools.screenshots_in_content_dir;
|
||||
bool_entries[10].name_enum_idx = MENU_ENUM_LABEL_SCREENSHOTS_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[10].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_SCREENSHOTS_IN_CONTENT_DIR_ENABLE;
|
||||
bool_entries[10].default_value = default_screenshots_in_content_dir;
|
||||
bool_entries[10].flags = SD_FLAG_ADVANCED;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(bool_entries); i++)
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
|
@ -6533,13 +6557,14 @@ static bool setting_append_list(
|
|||
sizeof(settings->paths.directory_system),
|
||||
MENU_ENUM_LABEL_SYSTEM_DIRECTORY,
|
||||
MENU_ENUM_LABEL_VALUE_SYSTEM_DIRECTORY,
|
||||
"",
|
||||
g_defaults.dirs[DEFAULT_DIR_SYSTEM],
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
@ -6577,13 +6602,14 @@ static bool setting_append_list(
|
|||
sizeof(settings->paths.directory_dynamic_wallpapers),
|
||||
MENU_ENUM_LABEL_DYNAMIC_WALLPAPERS_DIRECTORY,
|
||||
MENU_ENUM_LABEL_VALUE_DYNAMIC_WALLPAPERS_DIRECTORY,
|
||||
"",
|
||||
g_defaults.dirs[DEFAULT_DIR_WALLPAPERS],
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_DEFAULT,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
@ -6644,6 +6670,7 @@ static bool setting_append_list(
|
|||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
@ -6659,6 +6686,7 @@ static bool setting_append_list(
|
|||
general_write_handler,
|
||||
general_read_handler);
|
||||
menu_settings_list_current_add_cmd(list, list_info, CMD_EVENT_CORE_INFO_INIT);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
#ifdef HAVE_LIBRETRODB
|
||||
CONFIG_DIR(
|
||||
|
@ -6750,6 +6778,7 @@ static bool setting_append_list(
|
|||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
if (string_is_not_equal_fast(settings->arrays.record_driver, "null", 4))
|
||||
{
|
||||
|
@ -6797,6 +6826,7 @@ static bool setting_append_list(
|
|||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
#endif
|
||||
|
||||
CONFIG_DIR(
|
||||
|
@ -6835,13 +6865,14 @@ static bool setting_append_list(
|
|||
sizeof(settings->paths.directory_input_remapping),
|
||||
MENU_ENUM_LABEL_INPUT_REMAPPING_DIRECTORY,
|
||||
MENU_ENUM_LABEL_VALUE_INPUT_REMAPPING_DIRECTORY,
|
||||
"",
|
||||
g_defaults.dirs[DEFAULT_DIR_REMAP],
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_NONE,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
@ -6864,13 +6895,14 @@ static bool setting_append_list(
|
|||
dir_get_size(RARCH_DIR_SAVEFILE),
|
||||
MENU_ENUM_LABEL_SAVEFILE_DIRECTORY,
|
||||
MENU_ENUM_LABEL_VALUE_SAVEFILE_DIRECTORY,
|
||||
"",
|
||||
g_defaults.dirs[DEFAULT_DIR_SRAM],
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
@ -6878,13 +6910,14 @@ static bool setting_append_list(
|
|||
dir_get_size(RARCH_DIR_SAVESTATE),
|
||||
MENU_ENUM_LABEL_SAVESTATE_DIRECTORY,
|
||||
MENU_ENUM_LABEL_VALUE_SAVESTATE_DIRECTORY,
|
||||
"",
|
||||
g_defaults.dirs[DEFAULT_DIR_SAVESTATE],
|
||||
MENU_ENUM_LABEL_VALUE_DIRECTORY_CONTENT,
|
||||
&group_info,
|
||||
&subgroup_info,
|
||||
parent_group,
|
||||
general_write_handler,
|
||||
general_read_handler);
|
||||
(*list)[list_info->index - 1].action_start = directory_action_start_generic;
|
||||
|
||||
CONFIG_DIR(
|
||||
list, list_info,
|
||||
|
|
|
@ -1069,6 +1069,10 @@ enum msg_hash_enums
|
|||
MENU_LABEL(NETPLAY_NAT_TRAVERSAL),
|
||||
MENU_LABEL(SORT_SAVEFILES_ENABLE),
|
||||
MENU_LABEL(SORT_SAVESTATES_ENABLE),
|
||||
MENU_LABEL(SAVEFILES_IN_CONTENT_DIR_ENABLE),
|
||||
MENU_LABEL(SAVESTATES_IN_CONTENT_DIR_ENABLE),
|
||||
MENU_LABEL(SYSTEMFILES_IN_CONTENT_DIR_ENABLE),
|
||||
MENU_LABEL(SCREENSHOTS_IN_CONTENT_DIR_ENABLE),
|
||||
MENU_LABEL(NETPLAY_IP_ADDRESS),
|
||||
MENU_LABEL(NETPLAY_PASSWORD),
|
||||
MENU_LABEL(NETPLAY_SPECTATE_PASSWORD),
|
||||
|
|
15
paths.c
15
paths.c
|
@ -67,6 +67,7 @@ void path_set_redirect(void)
|
|||
const char *old_savefile_dir = dir_get(RARCH_DIR_SAVEFILE);
|
||||
const char *old_savestate_dir = dir_get(RARCH_DIR_SAVESTATE);
|
||||
rarch_system_info_t *info = runloop_get_system_info();
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
new_savefile_dir[0] = new_savestate_dir[0] = '\0';
|
||||
|
||||
|
@ -93,10 +94,8 @@ void path_set_redirect(void)
|
|||
|
||||
if (check_library_name_hash)
|
||||
{
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
/* per-core saves: append the library_name to the save location */
|
||||
if ( settings->bools.sort_savefiles_enable
|
||||
if (settings->bools.sort_savefiles_enable
|
||||
&& !string_is_empty(old_savefile_dir))
|
||||
{
|
||||
fill_pathname_join(
|
||||
|
@ -154,13 +153,21 @@ void path_set_redirect(void)
|
|||
}
|
||||
|
||||
/* Set savefile directory if empty based on content directory */
|
||||
if (string_is_empty(new_savefile_dir))
|
||||
if (string_is_empty(new_savefile_dir) || settings->bools.savefiles_in_content_dir)
|
||||
{
|
||||
strlcpy(new_savefile_dir, path_main_basename,
|
||||
sizeof(new_savefile_dir));
|
||||
path_basedir(new_savefile_dir);
|
||||
}
|
||||
|
||||
/* Set savestate directory if empty based on content directory */
|
||||
if (string_is_empty(new_savestate_dir) || settings->bools.savestates_in_content_dir)
|
||||
{
|
||||
strlcpy(new_savestate_dir, path_main_basename,
|
||||
sizeof(new_savestate_dir));
|
||||
path_basedir(new_savestate_dir);
|
||||
}
|
||||
|
||||
if (global)
|
||||
{
|
||||
if(path_is_directory(new_savefile_dir))
|
||||
|
|
|
@ -211,7 +211,7 @@ static bool screenshot_dump(
|
|||
|
||||
screenshot_path[0] = '\0';
|
||||
|
||||
if (string_is_empty(screenshot_dir))
|
||||
if (string_is_empty(screenshot_dir) || settings->bools.screenshots_in_content_dir)
|
||||
{
|
||||
fill_pathname_basedir(screenshot_path, name_base,
|
||||
sizeof(screenshot_path));
|
||||
|
|
Loading…
Add table
Reference in a new issue