src/osd/winui/datafile.c
| r7814 | r7815 | |
| 60 | 60 | static const char *DATAFILE_TAG_BIO = "$bio"; |
| 61 | 61 | static const char *DATAFILE_TAG_MAME = "$mame"; |
| 62 | 62 | |
| 63 | | const char *history_filename = NULL; |
| 64 | | const char *mameinfo_filename = NULL; |
| 63 | char *g_history_filename = NULL; |
| 64 | char *g_mameinfo_filename = NULL; |
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | /**************************************************************************** |
| r7814 | r7815 | |
| 606 | 606 | *buffer = 0; |
| 607 | 607 | |
| 608 | 608 | |
| 609 | | if (!history_filename || !*history_filename) |
| 610 | | history_filename = "history.dat"; |
| 609 | if (!g_history_filename || !*g_history_filename) |
| 610 | g_history_filename = mame_strdup("history.dat"); |
| 611 | 611 | |
| 612 | 612 | /* try to open history datafile */ |
| 613 | | if (ParseOpen (history_filename)) |
| 613 | if (ParseOpen (g_history_filename)) |
| 614 | 614 | { |
| 615 | 615 | /* create index if necessary */ |
| 616 | 616 | if (hist_idx) |
| r7814 | r7815 | |
| 638 | 638 | ParseClose (); |
| 639 | 639 | } |
| 640 | 640 | |
| 641 | | if (!mameinfo_filename || !*mameinfo_filename) |
| 642 | | mameinfo_filename = "mameinfo.dat"; |
| 641 | if (!g_mameinfo_filename || !*g_mameinfo_filename) |
| 642 | g_mameinfo_filename = mame_strdup("mameinfo.dat"); |
| 643 | 643 | |
| 644 | 644 | /* try to open mameinfo datafile */ |
| 645 | | if (ParseOpen (mameinfo_filename)) |
| 645 | if (ParseOpen (g_mameinfo_filename)) |
| 646 | 646 | { |
| 647 | 647 | /* create index if necessary */ |
| 648 | 648 | if (mame_idx) |
src/osd/winui/winui.c
| r7814 | r7815 | |
| 238 | 238 | extern const ICONDATA g_iconData[]; |
| 239 | 239 | extern const TCHAR g_szPlayGameString[]; |
| 240 | 240 | extern const char g_szGameCountString[]; |
| 241 | extern char *g_history_filename; |
| 242 | extern char *g_mameinfo_filename; |
| 241 | 243 | |
| 242 | 244 | typedef struct _play_options play_options; |
| 243 | 245 | struct _play_options |
| r7814 | r7815 | |
| 1722 | 1724 | int i, nSplitterCount; |
| 1723 | 1725 | extern const FOLDERDATA g_folderData[]; |
| 1724 | 1726 | extern const FILTER_ITEM g_filterList[]; |
| 1725 | | extern const char *history_filename; |
| 1726 | | extern const char *mameinfo_filename; |
| 1727 | 1727 | LONG common_control_version = GetCommonControlVersion(); |
| 1728 | 1728 | int validity_failed = 0; |
| 1729 | 1729 | TCHAR* t_inpdir = NULL; |
| r7814 | r7815 | |
| 1893 | 1893 | hTreeView = GetDlgItem(hMain, IDC_TREE); |
| 1894 | 1894 | hwndList = GetDlgItem(hMain, IDC_LIST); |
| 1895 | 1895 | |
| 1896 | | history_filename = mame_strdup(GetHistoryFileName()); |
| 1897 | | mameinfo_filename = mame_strdup(GetMAMEInfoFileName()); |
| 1896 | g_history_filename = mame_strdup(GetHistoryFileName()); |
| 1897 | g_mameinfo_filename = mame_strdup(GetMAMEInfoFileName()); |
| 1898 | 1898 | |
| 1899 | 1899 | if (!InitSplitters()) |
| 1900 | 1900 | return FALSE; |
| r7814 | r7815 | |
| 2159 | 2159 | |
| 2160 | 2160 | HelpExit(); |
| 2161 | 2161 | |
| 2162 | osd_free(g_mameinfo_filename); |
| 2163 | osd_free(g_history_filename); |
| 2164 | |
| 2162 | 2165 | pool_free_lib(mameui_pool); |
| 2163 | 2166 | mameui_pool = NULL; |
| 2164 | 2167 | } |