src/mess/osd/winui/messui.c
| r7820 | r7821 | |
| 906 | 906 | /* We only want the first path; throw out the rest */ |
| 907 | 907 | i = astring_chr(&as, 0, ';'); |
| 908 | 908 | if (i > 0) astring_substr(&as, 0, i); |
| 909 | global_free(s); |
| 909 | 910 | s = tstring_from_utf8(astring_c(&as)); |
| 910 | 911 | |
| 911 | 912 | /* Make sure a folder was specified in the tab, and that it exists */ |
| r7820 | r7821 | |
| 917 | 918 | /* We only want the first path; throw out the rest */ |
| 918 | 919 | i = astring_chr(&as, 0, ';'); |
| 919 | 920 | if (i > 0) astring_substr(&as, 0, i); |
| 921 | global_free(s); |
| 920 | 922 | s = tstring_from_utf8(astring_c(&as)); |
| 921 | 923 | |
| 922 | 924 | /* Make sure a folder was specified in the tab, and that it exists */ |
| r7820 | r7821 | |
| 926 | 928 | |
| 927 | 929 | osd_get_full_path(&dst,"."); |
| 928 | 930 | /* Default to emu directory */ |
| 931 | global_free(s); |
| 929 | 932 | s = tstring_from_utf8(dst); |
| 930 | 933 | |
| 931 | 934 | /* If software folder exists, use it instead */ |
| 932 | 935 | zippath_combine(&as, dst, "software"); |
| 933 | | if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as)); |
| 936 | if (osd_opendir(astring_c(&as))) |
| 937 | { |
| 938 | global_free(s); |
| 939 | s = tstring_from_utf8(astring_c(&as)); |
| 940 | } |
| 934 | 941 | global_free(dst); |
| 935 | 942 | } |
| 936 | 943 | } |
| r7820 | r7821 | |
| 939 | 946 | SetupImageTypes(config, imagetypes, ARRAY_LENGTH(imagetypes), TRUE, dev); |
| 940 | 947 | bResult = CommonFileImageDialog(s, GetOpenFileName, pszFilename, config, imagetypes); |
| 941 | 948 | |
| 942 | | /* TODO: free() calls? */ |
| 949 | global_free(s); |
| 943 | 950 | |
| 944 | 951 | return bResult; |
| 945 | 952 | } |
| r7820 | r7821 | |
| 981 | 988 | /* We only want the first path; throw out the rest */ |
| 982 | 989 | i = astring_chr(&as, 0, ';'); |
| 983 | 990 | if (i > 0) astring_substr(&as, 0, i); |
| 991 | global_free(s); |
| 984 | 992 | s = tstring_from_utf8(astring_c(&as)); |
| 985 | 993 | |
| 986 | 994 | /* Make sure a folder was specified in the tab, and that it exists */ |
| r7820 | r7821 | |
| 990 | 998 | |
| 991 | 999 | osd_get_full_path(&dst,"."); |
| 992 | 1000 | /* Default to emu directory */ |
| 1001 | global_free(s); |
| 993 | 1002 | s = tstring_from_utf8(dst); |
| 994 | 1003 | |
| 995 | 1004 | /* If software folder exists, use it instead */ |
| 996 | 1005 | zippath_combine(&as, dst, "software"); |
| 997 | | if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as)); |
| 1006 | if (osd_opendir(astring_c(&as))) |
| 1007 | { |
| 1008 | global_free(s); |
| 1009 | s = tstring_from_utf8(astring_c(&as)); |
| 1010 | } |
| 998 | 1011 | global_free(dst); |
| 999 | 1012 | } |
| 1000 | 1013 | } |
| r7820 | r7821 | |
| 1002 | 1015 | SetupImageTypes(config, imagetypes, ARRAY_LENGTH(imagetypes), TRUE, dev); |
| 1003 | 1016 | bResult = CommonFileImageDialog(s, GetSaveFileName, pszFilename, config, imagetypes); |
| 1004 | 1017 | |
| 1005 | | /* TODO: free() calls? */ |
| 1018 | global_free(s); |
| 1006 | 1019 | |
| 1007 | 1020 | return bResult; |
| 1008 | 1021 | } |