Previous 15994 Revisions Next

r7983 Friday 7th May, 2010 at 14:59:59 UTC by Firewave
[MAMEUI] Screen configuration fixes:
- use maximum of 4 screens like MAME instead of 8
- always enable the screen configuration
- fixed garbage in INI for "Screen" option
[src/osd/winui]properties.c

src/osd/winui/properties.c
r7982r7983
212212/* No longer used by the core, but we need it to predefine configurable screens for all games. */
213213#ifndef MAX_SCREENS
214214/* maximum number of screens for one game */
215#define MAX_SCREENS               8
215#define MAX_SCREENS               4
216216#endif
217217
218218static core_options *pOrigOpts, *pDefaultOpts;
r7982r7983
226226static int  g_nPropertyMode    = 0;
227227static BOOL g_bUseDefaults     = FALSE;
228228static BOOL g_bReset           = FALSE;
229static BOOL  g_bAutoAspect[MAX_SCREENS] = {FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE};
229static BOOL  g_bAutoAspect[MAX_SCREENS] = {FALSE, FALSE, FALSE, FALSE};
230230static BOOL  g_bAutoSnapSize = FALSE;
231231static HICON g_hIcon = NULL;
232232
r7982r7983
357357   HWND hCtrl = GetDlgItem(hWnd, IDC_SCREENSELECT);
358358   if (hCtrl)
359359      nSelectedScreen = ComboBox_GetCurSel(hCtrl);
360   if ((nSelectedScreen < 0) || (nSelectedScreen >= MAX_SCREENS))
360   if ((nSelectedScreen < 0) || (nSelectedScreen >= NUMSELECTSCREEN))
361361      nSelectedScreen = 0;
362362   return nSelectedScreen;
363363
r7982r7983
17821782   EnableWindow(GetDlgItem(hWnd, IDC_SNAPSIZEWIDTH), !g_bAutoSnapSize);
17831783   EnableWindow(GetDlgItem(hWnd, IDC_SNAPSIZEX), !g_bAutoSnapSize);
17841784
1785
17861785   EnableWindow(GetDlgItem(hWnd,IDC_D3D_FILTER),d3d);
17871786   EnableWindow(GetDlgItem(hWnd,IDC_D3D_VERSION),d3d);
17881787   
17891788   //Switchres and D3D or ddraw enable the per screen parameters
17901789
1791   EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENS),                 (ddraw || d3d) && multimon);
1792   EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENSDISP),             (ddraw || d3d) && multimon);
1793   EnableWindow(GetDlgItem(hWnd, IDC_SCREENSELECT),               (ddraw || d3d) && multimon);
1794   EnableWindow(GetDlgItem(hWnd, IDC_SCREENSELECTTEXT),           (ddraw || d3d) && multimon);
1790   EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENS),                 (ddraw || d3d));
1791   EnableWindow(GetDlgItem(hWnd, IDC_NUMSCREENSDISP),             (ddraw || d3d));
1792   EnableWindow(GetDlgItem(hWnd, IDC_SCREENSELECT),               (ddraw || d3d));
1793   EnableWindow(GetDlgItem(hWnd, IDC_SCREENSELECTTEXT),           (ddraw || d3d));
17951794
17961795   EnableWindow(GetDlgItem(hWnd, IDC_ARTWORK_CROP),   useart);
17971796   EnableWindow(GetDlgItem(hWnd, IDC_BACKDROPS),      useart);
r7982r7983
19781977   /* Remove all items in the list. */
19791978   (void)ComboBox_ResetContent(control);
19801979   (void)ComboBox_InsertString(control, 0, TEXT("Auto"));
1981   (void)ComboBox_SetItemData(control, 0, (const char*)mame_strdup("auto"));
1980   (void)ComboBox_SetItemData(control, 0, (void*)tstring_from_utf8("auto"));
19821981
19831982   //Dynamically populate it, by enumerating the Monitors
19841983   //iMonitors = GetSystemMetrics(SM_CMONITORS); // this gets the count of monitors attached
r7982r7983
27792778   {
27802779      int i, curSel;
27812780      curSel = ComboBox_GetCurSel(hCtrl);
2782      if ((curSel < 0) || (curSel >= MAX_SCREENS))
2781      if ((curSel < 0) || (curSel >= NUMSELECTSCREEN))
27832782         curSel = 0;
27842783      (void)ComboBox_ResetContent(hCtrl);
27852784      for (i = 0; i < NUMSELECTSCREEN && i < options_get_int(pCurrentOpts, WINOPTION_NUMSCREENS) ; i++)
r7982r7983
27882787         (void)ComboBox_SetItemData( hCtrl, i, g_ComboBoxSelectScreen[i].m_pData);
27892788      }
27902789      // Smaller Amount of screens was selected, so use 0
2791      if( i< curSel )
2790      if( i < curSel )
27922791         (void)ComboBox_SetCurSel(hCtrl, 0);
27932792      else
27942793         (void)ComboBox_SetCurSel(hCtrl, curSel);

Previous 15994 Revisions Next


© 1998-2018 The MESS Team