Previous 15994 Revisions Next

r9098 Sunday 12th September, 2010 at 06:35:52 UTC by Robbbert
[MESSUI] fixed bug 1980 - crash when default options selected.
[src/osd/winui]properties.c

src/osd/winui/properties.c
r9097r9098
385385   memset(pspages, 0, sizeof(PROPSHEETPAGE) * possiblePropSheets);
386386
387387   maxPropSheets = 0;
388   
388
389389   i = ( isGame ) ? 0 : 2;
390390
391391   for (; g_propSheets[i].pfnDlgProc; i++)
392392   {
393      if (!gamedrv)
394      {
395         if (g_propSheets[i].bOnDefaultPage)
396         {
397            pspages[maxPropSheets].dwSize      = sizeof(PROPSHEETPAGE);
398            pspages[maxPropSheets].dwFlags     = 0;
399            pspages[maxPropSheets].hInstance   = hInst;
400            pspages[maxPropSheets].pszTemplate = MAKEINTRESOURCE(g_propSheets[i].dwDlgID);
401            pspages[maxPropSheets].pfnCallback = NULL;
402            pspages[maxPropSheets].lParam      = 0;
403            pspages[maxPropSheets].pfnDlgProc  = g_propSheets[i].pfnDlgProc;
404            maxPropSheets++;
405         }
406      }
407      else
393408      if ((gamedrv != NULL) || g_propSheets[i].bOnDefaultPage)
394409      {
395410         machine_config config(*gamedrv);
396         
411
397412         if (!gamedrv || !g_propSheets[i].pfnFilterProc || g_propSheets[i].pfnFilterProc(&config, gamedrv))
398413         {
399414            pspages[maxPropSheets].dwSize      = sizeof(PROPSHEETPAGE);
r9097r9098
407422         }
408423      }
409424   }
410   
425
411426   if (pnMaxPropSheets)
412427      *pnMaxPropSheets = maxPropSheets;
413428

Previous 15994 Revisions Next


© 1998-2018 The MESS Team