src/osd/winui/winui.c
| r2748 | r2749 | |
| 777 | 777 | { RA_ID, { IDC_SSPICTURE },FALSE, RA_RIGHT | RA_BOTTOM | RA_TOP, NULL }, |
| 778 | 778 | { RA_ID, { IDC_HISTORY }, TRUE, RA_RIGHT | RA_BOTTOM | RA_TOP, NULL }, |
| 779 | 779 | { RA_ID, { IDC_SSTAB }, FALSE, RA_RIGHT | RA_TOP, NULL }, |
| 780 | #ifdef MESS |
| 781 | { RA_ID, { IDC_SWLIST }, TRUE, RA_RIGHT | RA_BOTTOM | RA_TOP, NULL }, |
| 782 | { RA_ID, { IDC_SPLITTER3 },FALSE, RA_RIGHT | RA_BOTTOM | RA_TOP, NULL }, |
| 783 | #endif /* MESS */ |
| 780 | 784 | { RA_END, { 0 }, FALSE, 0, NULL } |
| 781 | 785 | }; |
| 782 | 786 | |
| r2748 | r2749 | |
| 818 | 822 | /* List view Column text */ |
| 819 | 823 | const LPCTSTR column_names[COLUMN_MAX] = |
| 820 | 824 | { |
| 825 | #ifdef MESS |
| 826 | TEXT("System"), |
| 827 | #else |
| 821 | 828 | TEXT("Game"), |
| 829 | #endif |
| 822 | 830 | TEXT("Screen"), |
| 823 | 831 | //TEXT("ROMs"), |
| 824 | 832 | TEXT("Samples"), |
| r2748 | r2749 | |
| 914 | 922 | // Tell mame were to get the INIs |
| 915 | 923 | options_set_string(mame_opts, OPTION_INIPATH, GetIniDir(), OPTION_PRIORITY_CMDLINE); |
| 916 | 924 | |
| 925 | #ifdef MESS |
| 926 | // add MESS specific device options |
| 927 | mess_add_device_options(mame_opts, drivers[nGameIndex]); |
| 928 | #endif // MESS |
| 929 | |
| 917 | 930 | // set any specified play options |
| 918 | 931 | if (playopts != NULL) |
| 919 | 932 | { |
| r2748 | r2749 | |
| 1301 | 1314 | |
| 1302 | 1315 | if (have_selection) |
| 1303 | 1316 | { |
| 1317 | #ifdef MESS |
| 1318 | if (!g_szSelectedItem[0] || !LoadScreenShotEx(Picker_GetSelectedItem(hwndList), g_szSelectedItem, |
| 1319 | TabView_GetCurrentTab(hTabCtrl))) |
| 1320 | #endif |
| 1304 | 1321 | // load and set image, or empty it if we don't have one |
| 1305 | 1322 | LoadScreenShot(Picker_GetSelectedItem(hwndList), TabView_GetCurrentTab(hTabCtrl)); |
| 1306 | 1323 | } |
| r2748 | r2749 | |
| 1717 | 1734 | |
| 1718 | 1735 | RegisterClass(&wndclass); |
| 1719 | 1736 | |
| 1737 | #ifdef MESS |
| 1738 | DevView_RegisterClass(); |
| 1739 | #endif //MESS |
| 1740 | |
| 1720 | 1741 | InitCommonControls(); |
| 1721 | 1742 | |
| 1722 | 1743 | // Are we using an Old comctl32.dll? |
| r2748 | r2749 | |
| 1902 | 1923 | dprintf("did init tree"); |
| 1903 | 1924 | |
| 1904 | 1925 | /* Initialize listview columns */ |
| 1926 | #ifdef MESS |
| 1927 | InitMessPicker(); |
| 1928 | #endif |
| 1905 | 1929 | InitListView(); |
| 1906 | 1930 | SetFocus(hwndList); |
| 1907 | 1931 | |
| r2748 | r2749 | |
| 3136 | 3160 | HMENU hMenu = GetMenu(hMain); |
| 3137 | 3161 | TCHAR* t_description; |
| 3138 | 3162 | |
| 3163 | #ifdef MESS |
| 3164 | MyFillSoftwareList(nGame, FALSE); |
| 3165 | #endif |
| 3139 | 3166 | |
| 3140 | 3167 | t_description = tstring_from_utf8(ConvertAmpersandString(ModifyThe(drivers[nGame]->description))); |
| 3141 | 3168 | if( !t_description ) |
| r2748 | r2749 | |
| 4292 | 4319 | { |
| 4293 | 4320 | folder = GetFolderByName(FOLDER_SOURCE, GetDriverFilename(Picker_GetSelectedItem(hwndList)) ); |
| 4294 | 4321 | InitPropertyPage(hInst, hwnd, GetSelectedPickItemIcon(), OPTIONS_GAME, folder->m_nFolderId, Picker_GetSelectedItem(hwndList)); |
| 4322 | #ifdef MESS |
| 4323 | { |
| 4324 | extern BOOL g_bModifiedSoftwarePaths; |
| 4325 | if (g_bModifiedSoftwarePaths) { |
| 4326 | g_bModifiedSoftwarePaths = FALSE; |
| 4327 | MessUpdateSoftwareList(); |
| 4328 | } |
| 4329 | } |
| 4330 | #endif |
| 4295 | 4331 | } |
| 4296 | 4332 | /* Just in case the toggle MMX on/off */ |
| 4297 | 4333 | UpdateStatusBar(); |
| r2748 | r2749 | |
| 4367 | 4403 | int nResult; |
| 4368 | 4404 | BOOL bUpdateRoms; |
| 4369 | 4405 | BOOL bUpdateSamples; |
| 4406 | #ifdef MESS |
| 4407 | BOOL bUpdateSoftware; |
| 4408 | #endif |
| 4370 | 4409 | |
| 4371 | 4410 | nResult = DialogBox(GetModuleHandle(NULL), |
| 4372 | 4411 | MAKEINTRESOURCE(IDD_DIRECTORIES), |
| r2748 | r2749 | |
| 4377 | 4416 | |
| 4378 | 4417 | bUpdateRoms = ((nResult & DIRDLG_ROMS) == DIRDLG_ROMS) ? TRUE : FALSE; |
| 4379 | 4418 | bUpdateSamples = ((nResult & DIRDLG_SAMPLES) == DIRDLG_SAMPLES) ? TRUE : FALSE; |
| 4419 | #ifdef MESS |
| 4420 | bUpdateSoftware = ((nResult & DIRDLG_SOFTWARE) == DIRDLG_SOFTWARE) ? TRUE : FALSE; |
| 4380 | 4421 | |
| 4422 | if (bUpdateSoftware) |
| 4423 | MessUpdateSoftwareList(); |
| 4424 | #endif /* MESS */ |
| 4425 | |
| 4381 | 4426 | if (s_pWatcher) |
| 4382 | 4427 | { |
| 4383 | 4428 | if (bUpdateRoms) |
| r2748 | r2749 | |
| 4602 | 4647 | return FALSE; |
| 4603 | 4648 | } |
| 4604 | 4649 | } |
| 4650 | #ifdef MESS |
| 4651 | return MessCommand(hwnd, id, hwndCtl, codeNotify); |
| 4652 | #else |
| 4605 | 4653 | break; |
| 4654 | #endif |
| 4606 | 4655 | } |
| 4607 | 4656 | |
| 4608 | 4657 | return FALSE; |
| r2748 | r2749 | |
| 5036 | 5085 | // restore our view |
| 5037 | 5086 | SetWindowLong(hwndList,GWL_STYLE,dwStyle); |
| 5038 | 5087 | |
| 5088 | #ifdef MESS |
| 5089 | CreateMessIcons(); |
| 5090 | #endif |
| 5091 | |
| 5039 | 5092 | // Now set up header specific stuff |
| 5040 | 5093 | hHeaderImages = ImageList_Create(8,8,ILC_COLORDDB | ILC_MASK,2,2); |
| 5041 | 5094 | hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_HEADER_UP)); |
| r2748 | r2749 | |
| 5809 | 5862 | { |
| 5810 | 5863 | DWORD dwExitCode; |
| 5811 | 5864 | |
| 5865 | #ifdef MESS |
| 5866 | if (!MessApproveImageList(hMain, nGame)) |
| 5867 | return; |
| 5868 | #endif |
| 5869 | |
| 5812 | 5870 | if (g_pJoyGUI != NULL) |
| 5813 | 5871 | KillTimer(hMain, JOYGUI_TIMER); |
| 5814 | 5872 | if (GetCycleScreenshot() > 0) |