use relative paths whenever possible in the windows platform driver

This commit is contained in:
radius 2016-04-30 10:04:04 -05:00
parent f9417b9442
commit 0ef416970c

View File

@ -21,6 +21,7 @@
#include <retro_miscellaneous.h>
#include <dynamic/dylib.h>
#include <lists/file_list.h>
#include <file/file_path.h>
#include "../frontend_driver.h"
#include "../../general.h"
@ -237,34 +238,53 @@ static void frontend_win32_environment_get(int *argc, char *argv[],
{
gfx_set_dwm();
strlcpy(g_defaults.dir.assets, ":\\assets", sizeof(g_defaults.dir.assets));
strlcpy(g_defaults.dir.audio_filter, ":\\filters\\audio", sizeof(g_defaults.dir.audio_filter));
strlcpy(g_defaults.dir.video_filter, ":\\filters\\video", sizeof(g_defaults.dir.video_filter));
strlcpy(g_defaults.dir.cheats, ":\\cheats", sizeof(g_defaults.dir.cheats));
strlcpy(g_defaults.dir.database, ":\\database\\rdb", sizeof(g_defaults.dir.database));
strlcpy(g_defaults.dir.cursor, ":\\database\\cursors", sizeof(g_defaults.dir.cursor));
strlcpy(g_defaults.dir.playlist, ":\\playlists", sizeof(g_defaults.dir.playlist));
strlcpy(g_defaults.dir.remap, ":\\config\\remap", sizeof(g_defaults.dir.remap));
strlcpy(g_defaults.dir.wallpapers, ":\\wallpapers", sizeof(g_defaults.dir.wallpapers));
strlcpy(g_defaults.dir.thumbnails, ":\\thumbnails", sizeof(g_defaults.dir.thumbnails));
strlcpy(g_defaults.dir.overlay, ":\\overlays", sizeof(g_defaults.dir.overlay));
strlcpy(g_defaults.dir.osk_overlay, ":\\overlays", sizeof(g_defaults.dir.osk_overlay));
strlcpy(g_defaults.dir.core, ":\\cores", sizeof(g_defaults.dir.core));
strlcpy(g_defaults.dir.core_info, ":\\info", sizeof(g_defaults.dir.core_info));
strlcpy(g_defaults.dir.autoconfig, ":\\autoconfig", sizeof(g_defaults.dir.autoconfig));
strlcpy(g_defaults.dir.system, ":\\system", sizeof(g_defaults.dir.system));
strlcpy(g_defaults.dir.sram, ":\\saves", sizeof(g_defaults.dir.sram));
strlcpy(g_defaults.dir.savestate, ":\\states", sizeof(g_defaults.dir.savestate));
strlcpy(g_defaults.dir.menu_config, ":\\config", sizeof(g_defaults.dir.menu_config));
strlcpy(g_defaults.dir.shader, ":\\shaders", sizeof(g_defaults.dir.shader));
strlcpy(g_defaults.dir.core_assets, ":\\downloads", sizeof(g_defaults.dir.core_assets));
strlcpy(g_defaults.dir.screenshot, ":\\screenshots", sizeof(g_defaults.dir.screenshot));
fill_pathname_expand_special(g_defaults.dir.assets,
":/assets", sizeof(g_defaults.dir.assets));
fill_pathname_expand_special(g_defaults.dir.audio_filter,
":/filters/audio", sizeof(g_defaults.dir.audio_filter));
fill_pathname_expand_special(g_defaults.dir.video_filter,
":/filters/video", sizeof(g_defaults.dir.video_filter));
fill_pathname_expand_special(g_defaults.dir.cheats,
":/cheats", sizeof(g_defaults.dir.cheats));
fill_pathname_expand_special(g_defaults.dir.database,
":/database/rdb", sizeof(g_defaults.dir.database));
fill_pathname_expand_special(g_defaults.dir.cursor,
":/database/cursors", sizeof(g_defaults.dir.cursor));
fill_pathname_expand_special(g_defaults.dir.playlist,
":/playlists", sizeof(g_defaults.dir.assets));
fill_pathname_expand_special(g_defaults.dir.remap,
":/config/remap", sizeof(g_defaults.dir.remap));
fill_pathname_expand_special(g_defaults.dir.wallpapers,
":/wallpapers", sizeof(g_defaults.dir.wallpapers));
fill_pathname_expand_special(g_defaults.dir.thumbnails,
":/thumbnails", sizeof(g_defaults.dir.thumbnails));
fill_pathname_expand_special(g_defaults.dir.overlay,
":/overlays", sizeof(g_defaults.dir.overlay));
fill_pathname_expand_special(g_defaults.dir.osk_overlay,
":/overlays", sizeof(g_defaults.dir.osk_overlay));
fill_pathname_expand_special(g_defaults.dir.osk_overlay,
":/overlays", sizeof(g_defaults.dir.osk_overlay));
fill_pathname_expand_special(g_defaults.dir.core,
":/cores", sizeof(g_defaults.dir.core));
fill_pathname_expand_special(g_defaults.dir.core_info,
":/info", sizeof(g_defaults.dir.core_info));
fill_pathname_expand_special(g_defaults.dir.autoconfig,
":/autoconfig", sizeof(g_defaults.dir.autoconfig));
fill_pathname_expand_special(g_defaults.dir.menu_config,
":/config", sizeof(g_defaults.dir.menu_config));
fill_pathname_expand_special(g_defaults.dir.shader,
":/shaders", sizeof(g_defaults.dir.shader));
fill_pathname_expand_special(g_defaults.dir.core_assets,
":/downloads", sizeof(g_defaults.dir.core_assets));
fill_pathname_expand_special(g_defaults.dir.screenshot,
":/screenshots", sizeof(g_defaults.dir.screenshot));
#ifdef HAVE_MENU
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES)
snprintf(g_defaults.settings.menu, sizeof(g_defaults.settings.menu), "xmb");
#endif
#endif
}
frontend_ctx_driver_t frontend_ctx_win32 = {