Previous 15994 Revisions Next

r7345 Saturday 13th February, 2010 at 21:32:59 UTC by Miodrag Milanović
Fix initial folder setup.
[src/mess]image.c
[src/mess/osd/winui]messui.c

src/mess/image.c
r7344r7345
16371637static void setup_working_directory(image_slot_data *image)
16381638{
16391639    const game_driver *gamedrv;
1640   char *dst = NULL;
1641   
1642   osd_get_full_path(&dst,".");
1643    /* first set up the working directory to be the MESS directory */   
1644    astring_cpyc(image->working_directory, dst);
16401645
1641    /* first set up the working directory to be the MESS directory */
1642    astring_cpyc(image->working_directory, ".");
1643
16441646    /* now try browsing down to "software" */
16451647    if (try_change_working_directory(image, "software"))
16461648    {
r7344r7345
16511653            gamedrv = driver_get_compatible(gamedrv);
16521654        }
16531655    }
1656   global_free(dst);
16541657}
16551658
16561659
src/mess/osd/winui/messui.c
r7344r7345
926926         /* Make sure a folder was specified in the tab, and that it exists */
927927         if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
928928         {
929            char *dst = NULL;
930   
931            osd_get_full_path(&dst,".");
929932            /* Default to emu directory */
930            s = tstring_from_utf8(".");
933            s = tstring_from_utf8(dst);
931934
932935            /* If software folder exists, use it instead */
933            zippath_combine(&as, ".", "software");
936            zippath_combine(&as, dst, "software");
934937            if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as));
938            global_free(dst);
935939         }
936940      }
937941   }
r7344r7345
984988      /* Make sure a folder was specified in the tab, and that it exists */
985989      if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
986990      {
991         char *dst = NULL;
992
993         osd_get_full_path(&dst,".");
987994         /* Default to emu directory */
988         s = tstring_from_utf8(".");
995         s = tstring_from_utf8(dst);
989996
990997         /* If software folder exists, use it instead */
991         zippath_combine(&as, ".", "software");
998         zippath_combine(&as, dst, "software");
992999         if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as));
1000         global_free(dst);
9931001      }
9941002   }
9951003

Previous 15994 Revisions Next


© 1998-2018 The MESS Team