Previous 15994 Revisions Next

r7154 Saturday 23rd January, 2010 at 20:38:52 UTC by Miodrag Milanović
Usage of strconv.h functions, but it did not help much.
[src/mess/osd/winui]devview.c messui.c

src/mess/osd/winui/messui.c
r7153r7154
873873
874874   /* Get the path to the currently mounted image */
875875   zippath_parent(&as, GetSelectedSoftware(drvindex, config, dev));
876   s = (TCHAR*)astring_c(&as);
876   s = tstring_from_utf8(astring_c(&as));
877877
878878   /* See if an image was loaded, and that the path still exists */
879879   if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
r7153r7154
884884      /* We only want the first path; throw out the rest */
885885      i = astring_chr(&as, 0, ';');
886886      if (i > 0) astring_substr(&as, 0, i);
887      s = (TCHAR*)astring_c(&as);
887      s = tstring_from_utf8(astring_c(&as));
888888
889889      /* Make sure a folder was specified in the tab, and that it exists */
890890      if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
r7153r7154
895895         /* We only want the first path; throw out the rest */
896896         i = astring_chr(&as, 0, ';');
897897         if (i > 0) astring_substr(&as, 0, i);
898         s = (TCHAR*)astring_c(&as);
898         s = tstring_from_utf8(astring_c(&as));
899899
900900         /* Make sure a folder was specified in the tab, and that it exists */
901901         if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
r7153r7154
903903            /* Default to emu directory */
904904            char mess_directory[1024];
905905            osd_get_emulator_directory(mess_directory, ARRAY_LENGTH(mess_directory));
906            s = (TCHAR*)mess_directory;
906            s = tstring_from_utf8(mess_directory);
907907
908908            /* If software folder exists, use it instead */
909909            zippath_combine(&as, mess_directory, "software");
910            if (osd_opendir(astring_c(&as))) s = (TCHAR*)astring_c(&as);
910            if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as));
911911         }
912912      }
913913   }
r7153r7154
944944   /* We only want the first path; throw out the rest */
945945   i = astring_chr(&as, 0, ';');
946946   if (i > 0) astring_substr(&as, 0, i);
947   s = (TCHAR*)astring_c(&as);
947   s = tstring_from_utf8(astring_c(&as));
948948
949949   /* Make sure a folder was specified in the tab, and that it exists */
950950   if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
r7153r7154
955955      /* We only want the first path; throw out the rest */
956956      i = astring_chr(&as, 0, ';');
957957      if (i > 0) astring_substr(&as, 0, i);
958      s = (TCHAR*)astring_c(&as);
958      s = tstring_from_utf8(astring_c(&as));
959959
960960      /* Make sure a folder was specified in the tab, and that it exists */
961961      if ((!osd_opendir(astring_c(&as))) || (astring_chr(&as, 0, ':') == -1))
r7153r7154
963963         /* Default to emu directory */
964964         char mess_directory[1024];
965965         osd_get_emulator_directory(mess_directory, ARRAY_LENGTH(mess_directory));
966         s = (TCHAR*) mess_directory;
966         s = tstring_from_utf8(mess_directory);
967967
968968         /* If software folder exists, use it instead */
969969         zippath_combine(&as, mess_directory, "software");
970         if (osd_opendir(astring_c(&as))) s = (TCHAR*)astring_c(&as);
970         if (osd_opendir(astring_c(&as))) s = tstring_from_utf8(astring_c(&as));
971971      }
972972   }
973973
src/mess/osd/winui/devview.c
r7153r7154
214214         image_device_info info = image_device_getinfo(pDevViewInfo->config->mconfig, dev);
215215
216216         s = tstring_from_utf8(info.name);
217         ppszDevices[i] = (WCHAR*)alloca((_tcslen(s) + 1) * sizeof(TCHAR));
217         ppszDevices[i] = (WCHAR*)alloca((_tcslen(s) + 1) * sizeof(WCHAR));
218218         _tcscpy(ppszDevices[i], s);
219219         global_free(s);
220220         i++;

Previous 15994 Revisions Next


© 1998-2018 The MESS Team