DXGL r416 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r415‎ | r416 | r417 >
Date:01:19, 31 March 2014
Author:admin
Status:new
Tags:
Comment:
Fix per-application DPI scaling.
Make DPI scaling dropdown box require Windows Vista or above.
Modified paths:
  • /dxglcfg/dxglcfg.cpp (modified) (history)

Diff [purge]

Index: dxglcfg/dxglcfg.cpp
@@ -714,6 +714,10 @@
715715 }
716716 }
717717 }
 718+ else
 719+ {
 720+ EnableWindow(GetDlgItem(hWnd, IDC_DPISCALE), FALSE);
 721+ }
718722 if(token) CloseHandle(token);
719723 return true;
720724 case WM_MEASUREITEM:
@@ -811,6 +815,7 @@
812816 SendDlgItemMessage(hWnd,IDC_EXTRAMODES,BM_SETSTYLE,BS_AUTO3STATE,(LPARAM)TRUE);
813817 SendDlgItemMessage(hWnd,IDC_TEXTUREFORMAT,CB_ADDSTRING,0,(LPARAM)strdefault);
814818 SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_ADDSTRING,0,(LPARAM)strdefault);
 819+ SendDlgItemMessage(hWnd, IDC_DPISCALE, CB_ADDSTRING, 0, (LPARAM)strdefault);
815820 }
816821 else if(!current_app && tristate)
817822 {
@@ -839,6 +844,8 @@
840845 SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
841846 SendDlgItemMessage(hWnd,IDC_TEXUPLOAD,CB_DELETESTRING,
842847 SendDlgItemMessage(hWnd,IDC_ASPECT3D,CB_FINDSTRING,-1,(LPARAM)strdefault),0);
 848+ SendDlgItemMessage(hWnd, IDC_DPISCALE, CB_DELETESTRING,
 849+ SendDlgItemMessage(hWnd, IDC_ASPECT3D, CB_FINDSTRING, -1, (LPARAM)strdefault), 0);
843850 }
844851 // Read settings into controls
845852 SetCombo(hWnd,IDC_VIDMODE,cfg->scaler,cfgmask->scaler,tristate);
@@ -856,6 +863,7 @@
857864 SetCombo(hWnd,IDC_TEXUPLOAD,cfg->TexUpload,cfgmask->TexUpload,tristate);
858865 SetCheck(hWnd,IDC_EXTRAMODES,cfg->ExtraModes,cfgmask->ExtraModes,tristate);
859866 SetText(hWnd,IDC_SHADER,cfg->shaderfile,cfgmask->shaderfile,tristate);
 867+ SetCombo(hWnd, IDC_DPISCALE, cfg->DPIScale, cfgmask->DPIScale, tristate);
860868 }
861869 case IDC_VIDMODE:
862870 cfg->scaler = GetCombo(hWnd,IDC_VIDMODE,cfgmask->scaler);