DXGL r420 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r419‎ | r420 | r421 >
Date:23:10, 7 April 2014
Author:admin
Status:new
Tags:
Comment:
Fixes to aspect settings.
Modified paths:
  • /dxglcfg/dxglcfg.cpp (modified) (history)

Diff [purge]

Index: dxglcfg/dxglcfg.cpp
@@ -261,7 +261,7 @@
262262 float fract = modf(f, &integer);
263263 if (fract < 0.0001f) //Handle integer aspects
264264 {
265 - _itot(integer, aspect, 10);
 265+ _itot((int)integer, aspect, 10);
266266 _tcscat(aspect, _T(":1"));
267267 }
268268 // Finally try from 2 to 1000
@@ -309,9 +309,9 @@
310310 else
311311 {
312312 FloatToAspect(value, buffer);
313 - SetDlgItemText(hWnd, DlgItem, buffer);
314313 SendDlgItemMessage(hWnd,DlgItem,CB_SETCURSEL,
315314 SendDlgItemMessage(hWnd, DlgItem, CB_FINDSTRING, -1, (LPARAM)buffer), 0);
 315+ SetDlgItemText(hWnd, DlgItem, buffer);
316316 }
317317
318318 }
@@ -541,7 +541,7 @@
542542 SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
543543 _tcscpy(buffer,_T("5:4"));
544544 SendDlgItemMessage(hWnd,IDC_ASPECT,CB_ADDSTRING,0,(LPARAM)buffer);
545 - SendDlgItemMessage(hWnd, IDC_ASPECT, CB_SETCURSEL, cfg->aspect, 0);
 545+ SetAspectCombo(hWnd, IDC_ASPECT, cfg->aspect, cfgmask->aspect, tristate);
546546
547547 // highres
548548 if(cfg->highres) SendDlgItemMessage(hWnd,IDC_HIGHRES,BM_SETCHECK,BST_CHECKED,0);