Previous 15994 Revisions Next

r7396 Wednesday 17th February, 2010 at 17:43:59 UTC by Firewave
[MESSUI] Several cleanups:
- use proper returnvalue types
- disabled and removed some unused code
[src/osd/winui]columnedit.c dialogs.c directories.c mkhelp.c mui_audit.c picker.c properties.c treeview.c winui.c

src/osd/winui/columnedit.c
r7395r7396
3838   LV_ITEM lvi;
3939   TCHAR   buf[80];
4040   int    nFrom, nTo;
41   HRESULT res;
41   int    res;
42   BOOL    b_res;
4243
4344   nFrom = ListView_GetItemCount(hFrom);
4445   nTo   = ListView_GetItemCount(hTo);
r7395r7396
5859   if (ListView_GetItem(hFrom, &lvi))
5960   {
6061      // Add this item to the Show and delete it from Available
61      res = ListView_DeleteItem(hFrom, lvi.iItem);
62      b_res = ListView_DeleteItem(hFrom, lvi.iItem);
6263      lvi.iItem = ListView_GetItemCount(hTo);
6364      res = ListView_InsertItem(hTo, &lvi);
6465      ListView_SetItemState(hTo, lvi.iItem,
r7395r7396
7576   LV_ITEM lvi;
7677   TCHAR   buf[80];
7778   int    nMaxpos;
78   HRESULT res;
79   int      res;
80   BOOL    b_res;
7981   
8082   lvi.iItem = ListView_GetNextItem(hWnd, -1, LVIS_SELECTED | LVIS_FOCUSED);
8183   nMaxpos = ListView_GetItemCount(hWnd);
r7395r7396
9496   if (ListView_GetItem(hWnd, &lvi))
9597   {
9698      // Add this item to the Show and delete it from Available
97      res = ListView_DeleteItem(hWnd, lvi.iItem);
99      b_res = ListView_DeleteItem(hWnd, lvi.iItem);
98100      lvi.iItem += (bDown) ? 1 : -1;
99101      res = ListView_InsertItem(hWnd,&lvi);
100102      ListView_SetItemState(hWnd, lvi.iItem,
r7395r7396
127129   int         nAvail;
128130   int         i, nCount = 0;
129131   LV_ITEM     lvi;
130   DWORD dwShowStyle, dwAvailableStyle, dwView;
131   HRESULT res;
132   DWORD      dwShowStyle, dwAvailableStyle, dwView;
133   int         res;
134   BOOL      b_res;
132135
133136   switch (Msg)
134137   {
r7395r7396
411414                  lvi.mask     = LVIF_PARAM;
412415                  lvi.pszText  = 0;
413416                  lvi.iItem    = i;
414                  res = ListView_GetItem(hShown, &lvi);
417                  b_res = ListView_GetItem(hShown, &lvi);
415418                  order[nCount++]   = lvi.lParam;
416419                  shown[lvi.lParam] = TRUE;
417420               }
r7395r7396
421424                  lvi.mask     = LVIF_PARAM;
422425                  lvi.pszText  = 0;
423426                  lvi.iItem    = i;
424                  res = ListView_GetItem(hAvailable, &lvi);
427                  b_res = ListView_GetItem(hAvailable, &lvi);
425428                  order[nCount++]   = lvi.lParam;
426429                  shown[lvi.lParam] = FALSE;
427430               }
src/osd/winui/directories.c
r7395r7396
216216   LV_ITEM Item;
217217   HWND   hList  = GetDlgItem(hDlg, IDC_DIR_LIST);
218218   HWND   hCombo = GetDlgItem(hDlg, IDC_DIR_COMBO);
219   HRESULT res;
219   int      res;
220   BOOL   b_res;
220221
221222   /* Remove previous */
222223
223   res = ListView_DeleteAllItems(hList);
224   b_res = ListView_DeleteAllItems(hList);
224225
225226   /* Update list */
226227
src/osd/winui/picker.c
r7395r7396
336336   int         *widths;
337337   int         *order;
338338   int         *shown;
339   int shown_columns;
339   //int shown_columns;
340340   LVCOLUMN col;
341341   struct PickerInfo *pPickerInfo;
342342   HRESULT res;
r7395r7396
400400      }
401401   }
402402
403   shown_columns = nColumn;
403   //shown_columns = nColumn;
404404
405405   /* Fill this in so we can still sort on columns NOT shown */
406406   for (i = 0; i < pPickerInfo->nColumnCount && nColumn < pPickerInfo->nColumnCount; i++)
src/osd/winui/mui_audit.c
r7395r7396
119119   case NOTFOUND :
120120   case INCORRECT :
121121      return "No";
122      break;
123122
124123   case UNKNOWN :
125124      return "?";
src/osd/winui/mkhelp.c
r7395r7396
9999
100100   /* close the files */
101101   free(buffer);
102//   fclose(dst);
103102   return 0;
104103}
105104
src/osd/winui/dialogs.c
r7395r7396
737737
738738         EndDialog(hDlg, 0);
739739         return TRUE;
740
741         break;
742740      }
743741      case IDCANCEL:
744742         EndDialog(hDlg, 0);
src/osd/winui/treeview.c
r7395r7396
13431343   int i;
13441344   TVITEM tvi;
13451345   TVINSERTSTRUCT   tvs;
1346   HRESULT res;
1346   BOOL res;
13471347
13481348   HTREEITEM shti; // for current child branches
13491349
r7395r7396
14071407
14081408            tvi.hItem = hti_parent;
14091409            tvi.mask = TVIF_PARAM;
1410            res= TreeView_GetItem(hTreeView,&tvi);
1410            res = TreeView_GetItem(hTreeView,&tvi);
14111411            if (((LPTREEFOLDER)tvi.lParam) == treeFolders[treeFolders[i]->m_nParent])
14121412               break;
14131413
r7395r7396
14441444   HWND hTreeView = GetTreeView();
14451445   HTREEITEM hti;
14461446   TVITEM tvi;
1447   HRESULT res;
1447   BOOL res;
14481448
14491449   memset(&tvi,0,sizeof(tvi));
14501450
r7395r7396
18581858
18591859      case WM_ERASEBKGND:
18601860         return TRUE;
1861         break;
18621861
18631862      case WM_PAINT:
18641863         TreeCtrlOnPaint(hWnd, uMsg, wParam, lParam);
src/osd/winui/winui.c
r7395r7396
12631263   int nLeftWindowWidth = 0;
12641264   RECT rect;
12651265   BOOL bVisible;
1266   int nLastOverlap = -1;
1266   //int nLastOverlap = -1;
12671267
12681268   /* Size the List Control in the Picker */
12691269   GetClientRect(hMain, &rect);
r7395r7396
12901290         /* woah?  are we overlapping ourselves? */
12911291         if (nLeftWindowWidth < MIN_VIEW_WIDTH)
12921292         {
1293            nLastOverlap = i;
1293            //nLastOverlap = i;
12941294            nLastWidth = nLastWidth2;
12951295            nLeftWindowWidth = nSplitterOffset[i] - MIN_VIEW_WIDTH - (SPLITTER_WIDTH*3/2) - nLastWidth;
12961296            i--;
r7395r7396
13151315void UpdateScreenShot(void)
13161316{
13171317   RECT rect;
1318   int  nWidth;
1318   //int  nWidth;
13191319   RECT fRect;
13201320   POINT p = {0, 0};
13211321
r7395r7396
13331333
13341334   if (GetShowScreenShot())
13351335   {
1336      nWidth = nSplitterOffset[GetSplitterCount() - 1];
1336      //nWidth = nSplitterOffset[GetSplitterCount() - 1];
13371337      CheckMenuItem(GetMenu(hMain),ID_VIEW_PICTURE_AREA, MF_CHECKED);
13381338      ToolBar_CheckButton(hToolBar, ID_VIEW_PICTURE_AREA, MF_CHECKED);
13391339   }
13401340   else
13411341   {
1342      nWidth = rect.right;
1342      //nWidth = rect.right;
13431343      CheckMenuItem(GetMenu(hMain),ID_VIEW_PICTURE_AREA, MF_UNCHECKED);
13441344      ToolBar_CheckButton(hToolBar, ID_VIEW_PICTURE_AREA, MF_UNCHECKED);
13451345   }
r7395r7396
52425242   case COLUMN_GAMES:
52435243      return mame_stricmp(ModifyThe(drivers[index1]->description),
52445244                  ModifyThe(drivers[index2]->description));
5245      break;
52465245
52475246   case COLUMN_ORIENTATION:
52485247      nTemp1 = DriverIsVertical(index1) ? 1 : 0;
src/osd/winui/properties.c
r7395r7396
19881988
19891989static BOOL ScreenPopulateControl(datamap *map, HWND dialog, HWND control, core_options *opts, const char *option_name)
19901990{
1991   int iMonitors;
1991   //int iMonitors;
19921992   DISPLAY_DEVICE dd;
19931993   int i = 0;
19941994   int nSelection = 0;
r7395r7396
20002000   (void)ComboBox_SetItemData(control, 0, (const char*)mame_strdup("auto"));
20012001
20022002   //Dynamically populate it, by enumerating the Monitors
2003   iMonitors = GetSystemMetrics(SM_CMONITORS); // this gets the count of monitors attached
2003   //iMonitors = GetSystemMetrics(SM_CMONITORS); // this gets the count of monitors attached
20042004   ZeroMemory(&dd, sizeof(dd));
20052005   dd.cb = sizeof(dd);
20062006   for(i=0; EnumDisplayDevices(NULL, i, &dd, 0); i++)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team