Previous 15994 Revisions Next

r6834 Thursday 31st December, 2009 at 10:21:38 UTC by Robbbert
This should fix a unicode problem reported by Firewave - take 2.
[src/mess/osd/winui]messui.c

src/mess/osd/winui/messui.c
r6833r6834
873873
874874   /* Get the path to the currently mounted image */
875875   zippath_parent(as, GetSelectedSoftware(drvindex, config, dev));
876   s = (char*)astring_c(as);
876   s = (TCHAR*)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))
r6833r6834
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 = (char*)astring_c(as);
887      s = (TCHAR*)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))
r6833r6834
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 = (char*)astring_c(as);
898         s = (TCHAR*)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))
r6833r6834
903903            /* Default to emu directory */
904904            char mess_directory[1024];
905905            osd_get_emulator_directory(mess_directory, ARRAY_LENGTH(mess_directory));
906            s = mess_directory;
906            s = (TCHAR*)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 = (char*)astring_c(as);
910            if (osd_opendir(astring_c(as))) s = (TCHAR*)astring_c(as);
911911         }
912912      }
913913   }
r6833r6834
945945   /* We only want the first path; throw out the rest */
946946   i = astring_chr(as, 0, ';');
947947   if (i > 0) astring_substr(as, 0, i);
948   s = (char*)astring_c(as);
948   s = (TCHAR*)astring_c(as);
949949
950950   /* Make sure a folder was specified in the tab, and that it exists */
951951   if ((!osd_opendir(astring_c(as))) || (astring_chr(as, 0, ':') == -1))
r6833r6834
956956      /* We only want the first path; throw out the rest */
957957      i = astring_chr(as, 0, ';');
958958      if (i > 0) astring_substr(as, 0, i);
959      s = (char*)astring_c(as);
959      s = (TCHAR*)astring_c(as);
960960
961961      /* Make sure a folder was specified in the tab, and that it exists */
962962      if ((!osd_opendir(astring_c(as))) || (astring_chr(as, 0, ':') == -1))
r6833r6834
964964         /* Default to emu directory */
965965         char mess_directory[1024];
966966         osd_get_emulator_directory(mess_directory, ARRAY_LENGTH(mess_directory));
967         s = mess_directory;
967         s = (TCHAR*) mess_directory;
968968
969969         /* If software folder exists, use it instead */
970970         zippath_combine(as, mess_directory, "software");
971         if (osd_opendir(astring_c(as))) s = (char*)astring_c(as);
971         if (osd_opendir(astring_c(as))) s = (TCHAR*)astring_c(as);
972972      }
973973   }
974974

Previous 15994 Revisions Next


© 1998-2018 The MESS Team