src/mess/image.c
| r7344 | r7345 | |
| 1637 | 1637 | static void setup_working_directory(image_slot_data *image) |
| 1638 | 1638 | { |
| 1639 | 1639 | 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); |
| 1640 | 1645 | |
| 1641 | | /* first set up the working directory to be the MESS directory */ |
| 1642 | | astring_cpyc(image->working_directory, "."); |
| 1643 | | |
| 1644 | 1646 | /* now try browsing down to "software" */ |
| 1645 | 1647 | if (try_change_working_directory(image, "software")) |
| 1646 | 1648 | { |
| r7344 | r7345 | |
| 1651 | 1653 | gamedrv = driver_get_compatible(gamedrv); |
| 1652 | 1654 | } |
| 1653 | 1655 | } |
| 1656 | global_free(dst); |
| 1654 | 1657 | } |
| 1655 | 1658 | |
| 1656 | 1659 | |
src/mess/osd/winui/messui.c
| r7344 | r7345 | |
| 926 | 926 | /* Make sure a folder was specified in the tab, and that it exists */ |
| 927 | 927 | if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1)) |
| 928 | 928 | { |
| 929 | char *dst = NULL; |
| 930 | |
| 931 | osd_get_full_path(&dst,"."); |
| 929 | 932 | /* Default to emu directory */ |
| 930 | | s = tstring_from_utf8("."); |
| 933 | s = tstring_from_utf8(dst); |
| 931 | 934 | |
| 932 | 935 | /* If software folder exists, use it instead */ |
| 933 | | zippath_combine(&as, ".", "software"); |
| 936 | zippath_combine(&as, dst, "software"); |
| 934 | 937 | if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as)); |
| 938 | global_free(dst); |
| 935 | 939 | } |
| 936 | 940 | } |
| 937 | 941 | } |
| r7344 | r7345 | |
| 984 | 988 | /* Make sure a folder was specified in the tab, and that it exists */ |
| 985 | 989 | if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1)) |
| 986 | 990 | { |
| 991 | char *dst = NULL; |
| 992 | |
| 993 | osd_get_full_path(&dst,"."); |
| 987 | 994 | /* Default to emu directory */ |
| 988 | | s = tstring_from_utf8("."); |
| 995 | s = tstring_from_utf8(dst); |
| 989 | 996 | |
| 990 | 997 | /* If software folder exists, use it instead */ |
| 991 | | zippath_combine(&as, ".", "software"); |
| 998 | zippath_combine(&as, dst, "software"); |
| 992 | 999 | if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as)); |
| 1000 | global_free(dst); |
| 993 | 1001 | } |
| 994 | 1002 | } |
| 995 | 1003 | |