Previous 15994 Revisions Next

r7100 Thursday 21st January, 2010 at 13:43:55 UTC by Miodrag Milanović
UI is working quite fine now, but still some memory allocation errors
[src/emu]inputseq.c
[src/mess/osd/windows]mess.rc messres.h
[src/mess/osd/winui]messui.c messui.rc resourcems.h softwarepicker.c
[src/osd/winui]columnedit.c mui_util.c picker.c tabview.c winui.c

src/osd/winui/tabview.c
r7099r7100
292292            return;
293293         tci.pszText = t_text;
294294         TabCtrl_InsertItem(hwndTabView, i, &tci);
295//         global_free(t_text);
295         global_free(t_text);
296296      }
297297   }
298298   TabView_UpdateSelection(hwndTabView);
src/osd/winui/columnedit.c
r7099r7100
114114
115115INT_PTR InternalColumnDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam,
116116   int nColumnMax, int *shown, int *order,
117   LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *),
117   const LPCTSTR *names, void (*pfnGetRealColumnOrder)(int *),
118118   void (*pfnGetColumnInfo)(int *pnOrder, int *pnShown),
119119   void (*pfnSetColumnInfo)(int *pnOrder, int *pnShown))
120120{
src/osd/winui/picker.c
r7099r7100
11691169
11701170
11711171/* Add ... to Items in ListView if needed */
1172static LPCTSTR MakeShortString(HDC hDC, LPCTSTR lpszLong, int nColumnLen, int nOffset)
1173{
1174   static const TCHAR szThreeDots[] = TEXT("...");
1175   static TCHAR szShort[MAX_PATH];
1176   int nStringLen = lstrlen(lpszLong);
1177   int nAddLen;
1178   SIZE size;
1179   int i;
11721180
1181   GetTextExtentPoint32(hDC, lpszLong, nStringLen, &size);
1182   if (nStringLen == 0 || size.cx + nOffset <= nColumnLen)
1183      return lpszLong;
11731184
1185   lstrcpy(szShort, lpszLong);
1186   GetTextExtentPoint32(hDC, szThreeDots, sizeof(szThreeDots), &size);
1187   nAddLen = size.cx;
11741188
1189   for (i = nStringLen - 1; i > 0; i--)
1190   {
1191      szShort[i] = 0;
1192      GetTextExtentPoint32(hDC, szShort, i, &size);
1193      if (size.cx + nOffset + nAddLen <= nColumnLen)
1194         break;
1195   }
1196
1197   lstrcat(szShort, szThreeDots);
1198
1199   return szShort;
1200}
1201
1202#define ListView_GetItemRect_Modified(hwnd,i,prc,code) (WINBOOL)SNDMSG((hwnd),LVM_GETITEMRECT,(WPARAM)(int)(i),(((RECT *)(prc))->left = (code),(LPARAM)(RECT *)(prc)))
1203
11751204void Picker_HandleDrawItem(HWND hWnd, LPDRAWITEMSTRUCT lpDrawItemStruct)
11761205{
1206   struct PickerInfo *pPickerInfo;
1207   HDC         hDC = lpDrawItemStruct->hDC;
1208   RECT        rcItem = lpDrawItemStruct->rcItem;
1209   UINT        uiFlags = ILD_TRANSPARENT;
1210   HIMAGELIST  hImageList;
1211   int         nItem = lpDrawItemStruct->itemID;
1212   COLORREF    clrTextSave = 0;
1213   COLORREF    clrBkSave = 0;
1214   COLORREF    clrImage = GetSysColor(COLOR_WINDOW);
1215   static TCHAR szBuff[MAX_PATH];
1216   BOOL        bFocus = (GetFocus() == hWnd);
1217   LPCTSTR     pszText;
1218   UINT        nStateImageMask;
1219   BOOL        bSelected;
1220   LV_COLUMN   lvc;
1221   LV_ITEM     lvi;
1222   RECT        rcAllLabels;
1223   RECT        rcLabel;
1224   RECT        rcIcon;
1225   int         offset;
1226   SIZE        size;
1227   int         i, j;
1228   int         nColumn;
1229   int         nColumnMax = 0;
1230   int         *order;
1231   BOOL        bDrawAsChild;
1232   int         indent_space;
1233   BOOL      bColorChild = FALSE;
1234   BOOL      bParentFound = FALSE;
1235   int         nParent;
1236   HBITMAP      hBackground = GetBackgroundBitmap();
1237   MYBITMAPINFO *pbmDesc = GetBackgroundInfo();
1238
1239   pPickerInfo = GetPickerInfo(hWnd);
1240
1241   order = (int*)malloc(pPickerInfo->nColumnCount * sizeof(*order));
1242   if (!order)
1243      return;
1244   nColumnMax = Picker_GetNumColumns(hWnd);
1245
1246   if (GetUseOldControl())
1247   {
1248      pPickerInfo->pCallbacks->pfnGetColumnOrder(order);
1249   }
1250   else
1251   {
1252      /* Get the Column Order and save it */
1253      ListView_GetColumnOrderArray(hWnd, nColumnMax, order);
1254
1255      /* Disallow moving column 0 */
1256      if (order[0] != 0)
1257      {
1258         for (i = 0; i < nColumnMax; i++)
1259         {
1260            if (order[i] == 0)
1261            {
1262               order[i] = order[0];
1263               order[0] = 0;
1264            }
1265         }
1266         ListView_SetColumnOrderArray(hWnd, nColumnMax, order);
1267      }
1268   }
1269
1270   /* Labels are offset by a certain amount */
1271   /* This offset is related to the width of a space character */
1272   GetTextExtentPoint32(hDC, TEXT(" "), 1 , &size);
1273   offset = size.cx;
1274
1275   lvi.mask      = LVIF_TEXT | LVIF_IMAGE | LVIF_STATE | LVIF_PARAM;
1276   lvi.iItem      = nItem;
1277   lvi.iSubItem   = order[0];
1278   lvi.pszText      = szBuff;
1279   lvi.cchTextMax = sizeof(szBuff) / sizeof(szBuff[0]);
1280   lvi.stateMask  = 0xFFFF;      /* get all state flags */
1281   ListView_GetItem(hWnd, &lvi);
1282
1283   bSelected = ((lvi.state & LVIS_DROPHILITED) || ( (lvi.state & LVIS_SELECTED)
1284      && ((bFocus) || (GetWindowLong(hWnd, GWL_STYLE) & LVS_SHOWSELALWAYS))));
1285
1286   /* figure out if we indent and draw grayed */
1287   if (pPickerInfo->pCallbacks->pfnFindItemParent)
1288      nParent = pPickerInfo->pCallbacks->pfnFindItemParent(hWnd, lvi.lParam);
1289   else
1290      nParent = -1;
1291   bDrawAsChild = (pPickerInfo->pCallbacks->pfnGetViewMode() == VIEW_GROUPED && (nParent >= 0));
1292
1293   /* only indent if parent is also in this view */
1294   if ((nParent >= 0) && bDrawAsChild)
1295   {
1296      for (i = 0; i < ListView_GetItemCount(hWnd); i++)
1297      {
1298         lvi.mask = LVIF_PARAM;
1299         lvi.iItem = i;
1300         ListView_GetItem(hWnd, &lvi);
1301
1302         if (lvi.lParam == nParent)
1303         {
1304            bParentFound = TRUE;
1305            break;
1306         }
1307      }
1308   }
1309
1310   if (pPickerInfo->pCallbacks->pfnGetOffsetChildren && pPickerInfo->pCallbacks->pfnGetOffsetChildren())
1311   {
1312      if (!bParentFound && bDrawAsChild)
1313      {
1314         /*Reset it, as no Parent is there*/
1315         bDrawAsChild = FALSE;
1316         bColorChild = TRUE;
1317      }
1318      else
1319      {
1320         nParent = -1;
1321         bParentFound = FALSE;
1322      }
1323   }
1324
1325   ListView_GetItemRect_Modified(hWnd, nItem, &rcAllLabels, LVIR_BOUNDS);
1326   ListView_GetItemRect_Modified(hWnd, nItem, &rcLabel, LVIR_LABEL);
1327
1328   rcAllLabels.left = rcLabel.left;
1329
1330   if (hBackground != NULL)
1331   {
1332      RECT      rcClient;
1333      HRGN      rgnBitmap;
1334      RECT      rcTmpBmp = rcItem;
1335      RECT      rcFirstItem;
1336      HPALETTE   hPAL;
1337      HDC       htempDC;
1338      HBITMAP    oldBitmap;
1339
1340      htempDC = CreateCompatibleDC(hDC);
1341
1342      oldBitmap = (HBITMAP)SelectObject(htempDC, hBackground);
1343
1344      GetClientRect(hWnd, &rcClient);
1345      rcTmpBmp.right = rcClient.right;
1346      /* We also need to check whether it is the last item
1347         The update region has to be extended to the bottom if it is */
1348      if (nItem == ListView_GetItemCount(hWnd) - 1)
1349         rcTmpBmp.bottom = rcClient.bottom;
1350
1351      rgnBitmap = CreateRectRgnIndirect(&rcTmpBmp);
1352      SelectClipRgn(hDC, rgnBitmap);
1353      DeleteBitmap(rgnBitmap);
1354
1355      hPAL = GetBackgroundPalette();
1356      if (hPAL == NULL)
1357         hPAL = CreateHalftonePalette(hDC);
1358
1359      if (GetDeviceCaps(htempDC, RASTERCAPS) & RC_PALETTE && hPAL != NULL)
1360      {
1361         SelectPalette(htempDC, hPAL, FALSE);
1362         RealizePalette(htempDC);
1363      }
1364
1365      ListView_GetItemRect_Modified(hWnd, 0, &rcFirstItem, LVIR_BOUNDS);
1366
1367      for (i = rcFirstItem.left; i < rcClient.right; i += pbmDesc->bmWidth)
1368         for (j = rcFirstItem.top; j < rcClient.bottom; j +=  pbmDesc->bmHeight)
1369            BitBlt(hDC, i, j, pbmDesc->bmWidth, pbmDesc->bmHeight, htempDC, 0, 0, SRCCOPY);
1370
1371      SelectObject(htempDC, oldBitmap);
1372      DeleteDC(htempDC);
1373
1374      if (GetBackgroundPalette() == NULL)
1375      {
1376         DeletePalette(hPAL);
1377         hPAL = NULL;
1378      }
1379   }
1380
1381   indent_space = 0;
1382
1383   if (bDrawAsChild)
1384   {
1385      RECT rect;
1386
1387      ListView_GetItemRect_Modified(hWnd, nItem, &rect, LVIR_ICON);
1388
1389      /* indent width of icon + the space between the icon and text
1390       * so left of clone icon starts at text of parent
1391         */
1392      indent_space = rect.right - rect.left + offset;
1393   }
1394
1395   rcAllLabels.left += indent_space;
1396
1397   if (bSelected)
1398   {
1399      HBRUSH hBrush;
1400      HBRUSH hOldBrush;
1401
1402      if (bFocus)
1403      {
1404         clrTextSave = SetTextColor(hDC, GetSysColor(COLOR_HIGHLIGHTTEXT));
1405         clrBkSave   = SetBkColor(hDC, GetSysColor(COLOR_HIGHLIGHT));
1406         hBrush      = CreateSolidBrush(GetSysColor(COLOR_HIGHLIGHT));
1407      }
1408      else
1409      {
1410         clrTextSave = SetTextColor(hDC, GetSysColor(COLOR_BTNTEXT));
1411         clrBkSave   = SetBkColor(hDC, GetSysColor(COLOR_BTNFACE));
1412         hBrush      = CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
1413      }
1414
1415      hOldBrush = (HBRUSH)SelectObject(hDC, hBrush);
1416      FillRect(hDC, &rcAllLabels, hBrush);
1417      SelectObject(hDC, hOldBrush);
1418      DeleteBrush(hBrush);
1419   }
1420   else
1421   {
1422      if (hBackground == NULL)
1423      {
1424         HBRUSH hBrush;
1425
1426         hBrush = CreateSolidBrush(GetSysColor(COLOR_WINDOW));
1427         FillRect(hDC, &rcAllLabels, hBrush);
1428         DeleteBrush(hBrush);
1429      }
1430
1431      if (pPickerInfo->pCallbacks->pfnGetOffsetChildren && pPickerInfo->pCallbacks->pfnGetOffsetChildren())
1432      {
1433         if (bDrawAsChild || bColorChild)
1434            clrTextSave = SetTextColor(hDC, GetListCloneColor());
1435         else
1436            clrTextSave = SetTextColor(hDC, GetListFontColor());
1437      }
1438      else
1439      {
1440         if (bDrawAsChild)
1441            clrTextSave = SetTextColor(hDC, GetListCloneColor());
1442         else
1443            clrTextSave = SetTextColor(hDC, GetListFontColor());
1444      }
1445
1446      clrBkSave = SetBkColor(hDC, GetSysColor(COLOR_WINDOW));
1447   }
1448
1449
1450   if (lvi.state & LVIS_CUT)
1451   {
1452      clrImage = GetSysColor(COLOR_WINDOW);
1453      uiFlags |= ILD_BLEND50;
1454   }
1455   else if (bSelected)
1456   {
1457      if (bFocus)
1458         clrImage = GetSysColor(COLOR_HIGHLIGHT);
1459      else
1460         clrImage = GetSysColor(COLOR_BTNFACE);
1461
1462      uiFlags |= ILD_BLEND50;
1463   }
1464
1465   nStateImageMask = lvi.state & LVIS_STATEIMAGEMASK;
1466
1467   if (nStateImageMask)
1468   {
1469      int nImage = (nStateImageMask >> 12) - 1;
1470      hImageList = ListView_GetImageList(hWnd, LVSIL_STATE);
1471      if (hImageList)
1472         ImageList_Draw(hImageList, nImage, hDC, rcItem.left, rcItem.top, ILD_TRANSPARENT);
1473   }
1474
1475   ListView_GetItemRect_Modified(hWnd, nItem, &rcIcon, LVIR_ICON);
1476
1477   rcIcon.left += indent_space;
1478
1479   ListView_GetItemRect_Modified(hWnd, nItem, &rcItem, LVIR_LABEL);
1480
1481   hImageList = ListView_GetImageList(hWnd, LVSIL_SMALL);
1482   if (hImageList)
1483   {
1484      UINT nOvlImageMask = lvi.state & LVIS_OVERLAYMASK;
1485      if (rcIcon.left + 16 + indent_space < rcItem.right)
1486      {
1487         ImageList_DrawEx(hImageList, lvi.iImage, hDC, rcIcon.left, rcIcon.top, 16, 16,
1488                      GetSysColor(COLOR_WINDOW), clrImage, uiFlags | nOvlImageMask);
1489      }
1490   }
1491
1492   ListView_GetItemRect_Modified(hWnd, nItem, &rcItem, LVIR_LABEL);
1493
1494   pszText = MakeShortString(hDC, szBuff, rcItem.right - rcItem.left, 2*offset + indent_space);
1495
1496   rcLabel = rcItem;
1497   rcLabel.left  += offset + indent_space;
1498   rcLabel.right -= offset;
1499
1500   DrawText(hDC, pszText, -1, &rcLabel,
1501          DT_LEFT | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER);
1502
1503   for (nColumn = 1; nColumn < nColumnMax; nColumn++)
1504   {
1505      int    nRetLen;
1506      UINT   nJustify;
1507      LV_ITEM lvItem;
1508
1509      lvc.mask = LVCF_FMT | LVCF_WIDTH;
1510      ListView_GetColumn(hWnd, order[nColumn], &lvc);
1511
1512      lvItem.mask      = LVIF_TEXT;
1513      lvItem.iItem     = nItem;
1514      lvItem.iSubItem   = order[nColumn];
1515      lvItem.pszText     = szBuff;
1516      lvItem.cchTextMax = sizeof(szBuff) / sizeof(szBuff[0]);
1517
1518      if (ListView_GetItem(hWnd, &lvItem) == FALSE)
1519         continue;
1520
1521      rcItem.left   = rcItem.right;
1522      rcItem.right += lvc.cx;
1523
1524      nRetLen = _tcslen(szBuff);
1525      if (nRetLen == 0)
1526         continue;
1527
1528      pszText = MakeShortString(hDC, szBuff, rcItem.right - rcItem.left, 2 * offset);
1529
1530      nJustify = DT_LEFT;
1531
1532      if (pszText == szBuff)
1533      {
1534         switch (lvc.fmt & LVCFMT_JUSTIFYMASK)
1535         {
1536         case LVCFMT_RIGHT:
1537            nJustify = DT_RIGHT;
1538            break;
1539
1540         case LVCFMT_CENTER:
1541            nJustify = DT_CENTER;
1542            break;
1543
1544         default:
1545            break;
1546         }
1547      }
1548
1549      rcLabel = rcItem;
1550      rcLabel.left  += offset;
1551      rcLabel.right -= offset;
1552      DrawText(hDC, pszText, -1, &rcLabel,
1553             nJustify | DT_SINGLELINE | DT_NOPREFIX | DT_VCENTER);
1554   }
1555
1556   if (lvi.state & LVIS_FOCUSED && bFocus)
1557      DrawFocusRect(hDC, &rcAllLabels);
1558
1559   SetTextColor(hDC, clrTextSave);
1560   SetBkColor(hDC, clrBkSave);
1561   global_free(order);
11771562}
11781563
11791564
11801565
1566
11811567const struct PickerCallbacks *Picker_GetCallbacks(HWND hwndPicker)
11821568{
11831569   struct PickerInfo *pPickerInfo;
src/osd/winui/mui_util.c
r7099r7100
642642   result = CreateFile(t_filename, desiredmode, sharemode, securityattributes, creationdisposition,
643643                  flagsandattributes, templatehandle);
644644
645//   free(t_filename);
645   global_free(t_filename);
646646                 
647647   return result;
648648}
src/osd/winui/winui.c
r7099r7100
17821782      return FALSE;
17831783
17841784   _tcscpy(last_directory,t_inpdir);
1785   //free(t_inpdir);
1785   global_free(t_inpdir);
17861786   hMain = CreateDialog(hInstance, MAKEINTRESOURCE(IDD_MAIN), 0, NULL);
17871787   if (hMain == NULL)
17881788   {
r7099r7100
19761976      const input_seq *is1;
19771977      input_seq *is2;
19781978      is1 = &(GUISequenceControl[i].is);
1979      //is2 = GUISequenceControl[i].getiniptr(); // MICKO-FIX
1979      is2 = GUISequenceControl[i].getiniptr();
19801980      // FIXME
19811981      //input_seq_copy(is1, is2);
19821982      //dprintf("seq =%s is: %4i %4i %4i %4i\n",GUISequenceControl[i].name, (*is1)[0], (*is1)[1], (*is1)[2], (*is1)[3]);
src/emu/inputseq.c
r7099r7100
505505
506506int input_seq_from_tokens(running_machine *machine, const char *string, input_seq *seq)
507507{
508   char *strcopy = auto_alloc_array(machine, char, strlen(string) + 1);
508   char *strcopy = global_alloc_array_clear(char, strlen(string) + 1);
509509   char *str = strcopy;
510510   int result = FALSE;
511511
r7099r7100
559559      str = strtemp + 1;
560560   }
561561
562   auto_free(machine, strcopy);
562   global_free(strcopy);
563563   return result;
564564}
565565
src/mess/osd/windows/messres.h
r7099r7100
22// Microsoft Visual C++ generated include file.
33// Used by mess.rc
44//
5#define ID_FILE_LOADSTATE               101
5#define ID_FILE_LOADSTATE_NEWUI         101
66#define ID_FILE_SAVESTATE               102
77#define ID_FILE_SAVESTATE_AS            103
88#define ID_FILE_SAVESCREENSHOT          104
9#define ID_FILE_EXIT                    105
9#define ID_FILE_EXIT_NEWUI              105
1010#define ID_EDIT_PASTE                   106
1111#define ID_OPTIONS_HIDEMENUBAR          107
1212#define ID_OPTIONS_KEYBOARD             108
r7099r7100
4040#define ID_THROTTLE_UNTHROTTLED         136
4141#define ID_FRAMESKIP_AUTO               137
4242#define ID_DEVICES                      138
43#define ID_HELP_ABOUT                   139
43#define ID_HELP_ABOUT_NEWUI             139
4444#define ID_HELP_ABOUTSYSTEM             140
4545#define IDD_TAPEDIALOG                  500
4646#define IDI_ICON_CART                   1000
r7099r7100
5252#define IDI_ICON_SNAP                   1006
5353#define IDR_RUNTIME_MENU                6000
5454#define IDC_SLIDER                      6000
55#define IDC_PLAY                        6001
55#define IDC_PLAY_NEWUI                  6001
5656#define IDC_STOP                        6002
5757#define IDC_PAUSE                       6003
5858#define IDC_CAPTION                     6004
src/mess/osd/windows/mess.rc
r7099r7100
2929BEGIN
3030    POPUP "&File"
3131    BEGIN
32        MENUITEM "&Load State...",              ID_FILE_LOADSTATE
32        MENUITEM "&Load State...",              ID_FILE_LOADSTATE_NEWUI
3333        MENUITEM "&Save State",                 ID_FILE_SAVESTATE
3434        MENUITEM "S&ave State As...",           ID_FILE_SAVESTATE_AS
3535        MENUITEM SEPARATOR
3636        MENUITEM "Save Sc&reenshot",            ID_FILE_SAVESCREENSHOT
3737        MENUITEM SEPARATOR
38        MENUITEM "&Exit",                       ID_FILE_EXIT
38        MENUITEM "&Exit",                       ID_FILE_EXIT_NEWUI
3939    END
4040    POPUP "&Edit"
4141    BEGIN
r7099r7100
9595    POPUP "&Help"
9696    BEGIN
9797        MENUITEM "About This System...",        ID_HELP_ABOUTSYSTEM
98        MENUITEM "&About MESS...",              ID_HELP_ABOUT
98        MENUITEM "&About MESS...",              ID_HELP_ABOUT_NEWUI
9999    END
100100END
101101
r7099r7100
139139BEGIN
140140    CONTROL         "",IDC_SLIDER,"msctls_trackbar32",TBS_BOTH |
141141                    TBS_NOTICKS | WS_TABSTOP,6,24,162,15
142    PUSHBUTTON      "Play",IDC_PLAY,6,41,35,17
142    PUSHBUTTON      "Play",IDC_PLAY_NEWUI,6,41,35,17
143143    PUSHBUTTON      "Stop",IDC_STOP,72,41,35,17
144144    PUSHBUTTON      "Pause",IDC_PAUSE,132,41,35,17
145145    LTEXT           "",IDC_CAPTION,12,6,102,12
src/mess/osd/winui/messui.c
r7099r7100
11241124static HWND MyColumnDialogProc_hwndPicker;
11251125static int *MyColumnDialogProc_order;
11261126static int *MyColumnDialogProc_shown;
1127/*
1127
11281128static void MyGetRealColumnOrder(int *order)
11291129{
11301130   int i, nColumnCount;
r7099r7100
11531153   pCallbacks->pfnSetColumnShown(shown);
11541154}
11551155
1156   */
1156
11571157static INT_PTR CALLBACK MyColumnDialogProc(HWND hDlg, UINT Msg, WPARAM wParam, LPARAM lParam)
11581158{
11591159   INT_PTR result = 0;
1160   //int nColumnCount = Picker_GetColumnCount(MyColumnDialogProc_hwndPicker);
1161   //const LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker);
1160   int nColumnCount = Picker_GetColumnCount(MyColumnDialogProc_hwndPicker);
1161   const LPCTSTR *ppszColumnNames = Picker_GetColumnNames(MyColumnDialogProc_hwndPicker);
11621162
1163   /*result = InternalColumnDialogProc(hDlg, Msg, wParam, lParam, nColumnCount,
1163   result = InternalColumnDialogProc(hDlg, Msg, wParam, lParam, nColumnCount,
11641164      MyColumnDialogProc_shown, MyColumnDialogProc_order, ppszColumnNames,
11651165      MyGetRealColumnOrder, MyGetColumnInfo, MySetColumnInfo);
1166*/
1166
11671167   return result;
11681168}
11691169
src/mess/osd/winui/messui.rc
r7099r7100
33#include "windows.h"
44#include "commctrl.h"
55
6// Microsoft Visual C++ generated resource script.
7//
8
9#define APSTUDIO_READONLY_SYMBOLS
610/////////////////////////////////////////////////////////////////////////////
711//
12// Generated from the TEXTINCLUDE 2 resource.
13//
14#include <windows.h>
15/////////////////////////////////////////////////////////////////////////////
16#undef APSTUDIO_READONLY_SYMBOLS
17
18/////////////////////////////////////////////////////////////////////////////
19// English (U.S.) resources
20
21#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
22#ifdef _WIN32
23LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
24#pragma code_page(1252)
25#endif //_WIN32
26
27/////////////////////////////////////////////////////////////////////////////
28//
29// Menu
30//
31
32IDR_RUNTIME_MENU MENU
33BEGIN
34    POPUP "&File"
35    BEGIN
36        MENUITEM "&Load State...",              ID_FILE_LOADSTATE_NEWUI
37        MENUITEM "&Save State",                 ID_FILE_SAVESTATE
38        MENUITEM "S&ave State As...",           ID_FILE_SAVESTATE_AS
39        MENUITEM SEPARATOR
40        MENUITEM "Save Sc&reenshot",            ID_FILE_SAVESCREENSHOT
41        MENUITEM SEPARATOR
42        MENUITEM "&Exit",                       ID_FILE_EXIT_NEWUI
43    END
44    POPUP "&Edit"
45    BEGIN
46        MENUITEM "Paste",                       ID_EDIT_PASTE
47    END
48    POPUP "&Options"
49    BEGIN
50        MENUITEM "&Pause",                      ID_OPTIONS_PAUSE, GRAYED
51        MENUITEM "Soft &Reset",                 ID_OPTIONS_SOFTRESET
52        MENUITEM "Ha&rd Reset",                 ID_OPTIONS_HARDRESET
53        MENUITEM SEPARATOR
54        POPUP "&Keyboard"
55        BEGIN
56            MENUITEM "Emulated",                    ID_KEYBOARD_EMULATED
57            MENUITEM "Natural",                     ID_KEYBOARD_NATURAL
58            MENUITEM SEPARATOR
59            MENUITEM "Customize Emulated Keyboard...",     ID_KEYBOARD_CUSTOMIZE
60        END
61        MENUITEM "&Joysticks",                  ID_OPTIONS_JOYSTICKS, GRAYED
62        POPUP "&Video"
63        BEGIN
64          MENUITEM SEPARATOR
65          MENUITEM "Rotate 0 degrees",        ID_VIDEO_ROTATE_0
66          MENUITEM "Rotate 90 degrees",       ID_VIDEO_ROTATE_90
67          MENUITEM "Rotate 180 degrees",      ID_VIDEO_ROTATE_180
68          MENUITEM "Rotate 270 degrees",      ID_VIDEO_ROTATE_270
69        END
70        MENUITEM "&Configuration...",           ID_OPTIONS_CONFIGURATION
71        MENUITEM "&DIP Switches...",            ID_OPTIONS_DIPSWITCHES
72        MENUITEM "&Miscellaneous Inputs...",    ID_OPTIONS_MISCINPUT
73        MENUITEM "&Analog Controls...",         ID_OPTIONS_ANALOGCONTROLS
74        MENUITEM SEPARATOR
75        POPUP "&Frameskip"
76        BEGIN
77            MENUITEM "Auto",                        ID_FRAMESKIP_AUTO
78        END
79        POPUP "Maximum &Speed"
80        BEGIN
81            MENUITEM "50%",                         ID_THROTTLE_50
82            MENUITEM "100%",                        ID_THROTTLE_100
83            MENUITEM "200%",                        ID_THROTTLE_200
84            MENUITEM "500%",                        ID_THROTTLE_500
85            MENUITEM "1000%",                       ID_THROTTLE_1000
86            MENUITEM "Unlimited",                   ID_THROTTLE_UNTHROTTLED
87        END
88        MENUITEM "Show &FPS",                   ID_OPTIONS_TOGGLEFPS
89        MENUITEM SEPARATOR
90        MENUITEM "&Hide Menubar\tScrLk",        ID_OPTIONS_TOGGLEMENUBAR
91        MENUITEM "&Full Screen\tAlt+Enter",     ID_OPTIONS_FULLSCREEN
92        MENUITEM "Show P&rofiler",              ID_OPTIONS_PROFILER, GRAYED
93        MENUITEM "&Debugger...",                ID_OPTIONS_DEBUGGER
94    END
95    POPUP "&Devices"
96    BEGIN
97        MENUITEM SEPARATOR
98    END
99    POPUP "&Help"
100    BEGIN
101        MENUITEM "About This System...",        ID_HELP_ABOUTSYSTEM
102        MENUITEM "&About MESS...",              ID_HELP_ABOUT_NEWUI
103    END
104END
105
106
107#ifdef APSTUDIO_INVOKED
108/////////////////////////////////////////////////////////////////////////////
109//
110// TEXTINCLUDE
111//
112
1131 TEXTINCLUDE
114BEGIN
115    "messres.h\0"
116END
117
1182 TEXTINCLUDE
119BEGIN
120    "#include <windows.h>\0"
121END
122
1233 TEXTINCLUDE
124BEGIN
125    "\r\n"
126    "\0"
127END
128
129#endif    // APSTUDIO_INVOKED
130
131
132/////////////////////////////////////////////////////////////////////////////
133//
8134// Dialog
9135//
10136
137#ifndef UNDER_CE
138IDD_TAPEDIALOG DIALOGEX 0, 0, 172, 65
139STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION |
140    WS_SYSMENU
141CAPTION "Tape Control"
142FONT 8, "MS Shell Dlg", 400, 0, 0x1
143BEGIN
144    CONTROL         "",IDC_SLIDER,"msctls_trackbar32",TBS_BOTH |
145                    TBS_NOTICKS | WS_TABSTOP,6,24,162,15
146    PUSHBUTTON      "Play",IDC_PLAY_NEWUI,6,41,35,17
147    PUSHBUTTON      "Stop",IDC_STOP,72,41,35,17
148    PUSHBUTTON      "Pause",IDC_PAUSE,132,41,35,17
149    LTEXT           "",IDC_CAPTION,12,6,102,12
150    LTEXT           "",IDC_STATUS,126,6,42,12
151END
152#endif
153
154
155
156/////////////////////////////////////////////////////////////////////////////
157//
158// Icon
159//
160
161IDI_ICON_MESS           ICON    DISCARDABLE     "../../osd/winui/res/mess.ico"
162IDI_ICON_CART           ICON    DISCARDABLE     "../../osd/winui/res/cpu.ico"
163IDI_ICON_HARD           ICON    DISCARDABLE     "../../osd/winui/res/harddisk.ico"
164IDI_ICON_CASS           ICON    DISCARDABLE     "../../mess/osd/winui/res/win_cass.ico"
165IDI_ICON_FLOP           ICON    DISCARDABLE     "../../mess/osd/winui/res/win_flop.ico"
166IDI_ICON_PRIN           ICON    DISCARDABLE     "../../mess/osd/winui/res/win_prin.ico"
167IDI_ICON_SERL           ICON    DISCARDABLE     "../../mess/osd/winui/res/win_serl.ico"
168IDI_ICON_SNAP           ICON    DISCARDABLE     "../../mess/osd/winui/res/win_snap.ico"
169
170
171/////////////////////////////////////////////////////////////////////////////
172//
173// DESIGNINFO
174//
175
176#ifdef APSTUDIO_INVOKED
177GUIDELINES DESIGNINFO
178BEGIN
179    IDD_TAPEDIALOG, DIALOG
180    BEGIN
181        LEFTMARGIN, 7
182        RIGHTMARGIN, 165
183        TOPMARGIN, 7
184        BOTTOMMARGIN, 58
185    END
186END
187#endif    // APSTUDIO_INVOKED
188
189#endif    // English (U.S.) resources
190/////////////////////////////////////////////////////////////////////////////
191
192
193
194#ifndef APSTUDIO_INVOKED
195/////////////////////////////////////////////////////////////////////////////
196//
197// Generated from the TEXTINCLUDE 3 resource.
198//
199
200
201/////////////////////////////////////////////////////////////////////////////
202#endif    // not APSTUDIO_INVOKED
203
204/////////////////////////////////////////////////////////////////////////////
205//
206// Dialog
207//
208
11209IDD_PROP_SOFTWARE DIALOGEX 0, 0, 220, 220
12210STYLE WS_CHILD | WS_CAPTION
13211CAPTION "Software"
src/mess/osd/winui/softwarepicker.c
r7099r7100
423423   else
424424      pInfo->base_name = pInfo->file_name;
425425
426   ppNewIndex = (file_info**)malloc((pPickerInfo->file_index_length + 1) * sizeof(*pPickerInfo->file_index));
427   memcpy(ppNewIndex,pPickerInfo->file_index,pPickerInfo->file_index_length * sizeof(*pPickerInfo->file_index));   
426428   if (pPickerInfo->file_index) free(pPickerInfo->file_index);
427   ppNewIndex = (file_info**)malloc((pPickerInfo->file_index_length + 1) * sizeof(*pPickerInfo->file_index));
428429   if (!ppNewIndex)
429430      goto error;
430431
src/mess/osd/winui/resourcems.h
r7099r7100
33
44#include "resource.h"
55
6//{{NO_DEPENDENCIES}}
7// Microsoft Visual C++ generated include file.
8// Used by mess.rc
9//
10#define ID_FILE_LOADSTATE_NEWUI         101
11#define ID_FILE_SAVESTATE               102
12#define ID_FILE_SAVESTATE_AS            103
13#define ID_FILE_SAVESCREENSHOT          104
14#define ID_FILE_EXIT_NEWUI              105
15#define ID_EDIT_PASTE                   106
16#define ID_OPTIONS_HIDEMENUBAR          107
17#define ID_OPTIONS_KEYBOARD             108
18#define ID_OPTIONS_CONFIGURATION        109
19#define ID_OPTIONS_DIPSWITCHES          110
20#define ID_OPTIONS_MISCINPUT            111
21#define ID_OPTIONS_USEMOUSE             112
22#define ID_OPTIONS_TOGGLEMENUBAR        113
23#define ID_OPTIONS_SOFTRESET            114
24#define ID_OPTIONS_HARDRESET            115
25#define ID_OPTIONS_FRAMESKIP            116
26#define ID_OPTIONS_PAUSE                117
27#define ID_OPTIONS_JOYSTICKS            118
28#define ID_OPTIONS_ANALOGCONTROLS       119
29#define ID_OPTIONS_FULLSCREEN           120
30#define ID_OPTIONS_PROFILER             121
31#define ID_OPTIONS_TOGGLEFPS            122
32#define ID_OPTIONS_DEBUGGER             123
33#define ID_KEYBOARD_EMULATED            124
34#define ID_KEYBOARD_NATURAL             125
35#define ID_KEYBOARD_CUSTOMIZE           126
36#define ID_VIDEO_ROTATE_0               127
37#define ID_VIDEO_ROTATE_90              128
38#define ID_VIDEO_ROTATE_180             129
39#define ID_VIDEO_ROTATE_270             130
40#define ID_THROTTLE_50                  131
41#define ID_THROTTLE_100                 132
42#define ID_THROTTLE_200                 133
43#define ID_THROTTLE_500                 134
44#define ID_THROTTLE_1000                135
45#define ID_THROTTLE_UNTHROTTLED         136
46#define ID_FRAMESKIP_AUTO               137
47#define ID_DEVICES                      138
48#define ID_HELP_ABOUT_NEWUI             139
49#define ID_HELP_ABOUTSYSTEM             140
50#define IDD_TAPEDIALOG                  500
51#define IDI_ICON_CART                   1000
52#define IDI_ICON_HARD                   1001
53#define IDI_ICON_CASS                   1002
54#define IDI_ICON_FLOP                   1003
55#define IDI_ICON_PRIN                   1004
56#define IDI_ICON_SERL                   1005
57#define IDI_ICON_SNAP                   1006
58#define IDR_RUNTIME_MENU                6000
59#define IDC_SLIDER                      6000
60#define IDC_PLAY_NEWUI                  6001
61#define IDC_STOP                        6002
62#define IDC_PAUSE                       6003
63#define IDC_CAPTION                     6004
64#define IDC_STATUS                      6005
65
66// Next default values for new objects
67//
68#ifdef APSTUDIO_INVOKED
69#ifndef APSTUDIO_READONLY_SYMBOLS
70#define _APS_NEXT_RESOURCE_VALUE        129
71#define _APS_NEXT_COMMAND_VALUE         40008
72#define _APS_NEXT_CONTROL_VALUE         6006
73#define _APS_NEXT_SYMED_VALUE           101
74#endif
75#endif
76
677#define IDC_SPLITTER3                2000
778#define IDC_SWTAB                       2001
879#define IDC_SWLIST                      2002

Previous 15994 Revisions Next


© 1998-2018 The MESS Team