MGL: support for absolute paths.
This commit is contained in:
12
menu.cpp
12
menu.cpp
@@ -2383,7 +2383,11 @@ void HandleUI(void)
|
||||
|
||||
case MENU_GENERIC_FILE_SELECTED:
|
||||
{
|
||||
if (!mgl->done) snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(), mgl->item[mgl->current].path);
|
||||
if (!mgl->done)
|
||||
{
|
||||
if(mgl->item[mgl->current].path[0] == '/') snprintf(selPath, sizeof(selPath), "%s", mgl->item[mgl->current].path);
|
||||
else snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(), mgl->item[mgl->current].path);
|
||||
}
|
||||
|
||||
MenuHide();
|
||||
printf("File selected: %s\n", selPath);
|
||||
@@ -2434,7 +2438,11 @@ void HandleUI(void)
|
||||
|
||||
case MENU_GENERIC_IMAGE_SELECTED:
|
||||
{
|
||||
if (!mgl->done) snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(((is_pce() && !strncasecmp(fs_pFileExt, "CUE", 3)) ? PCECD_DIR : NULL)), mgl->item[mgl->current].path);
|
||||
if (!mgl->done)
|
||||
{
|
||||
if (mgl->item[mgl->current].path[0] == '/') snprintf(selPath, sizeof(selPath), "%s", mgl->item[mgl->current].path);
|
||||
else snprintf(selPath, sizeof(selPath), "%s/%s", HomeDir(((is_pce() && !strncasecmp(fs_pFileExt, "CUE", 3)) ? PCECD_DIR : NULL)), mgl->item[mgl->current].path);
|
||||
}
|
||||
|
||||
if (store_name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user