DXGL r750 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r749‎ | r750 | r751 >
Date:01:37, 8 October 2017
Author:admin
Status:new
Tags:
Comment:
Fix interactive graphics tests.
Fix interactive tests crashing on close.
Allow starting a graphics test by double-clicking the item in the list.
Modified paths:
  • /dxgltest/dxgltest.cpp (modified) (history)
  • /dxgltest/tests.cpp (modified) (history)

Diff [purge]

Index: dxgltest/dxgltest.cpp
@@ -345,6 +345,19 @@
346346 SendDlgItemMessage(hWnd,IDC_FRAMERATE,WM_SETTEXT,0,(LPARAM)frameratestring);
347347 }
348348 }
 349+ else if (HIWORD(wParam) == LBN_DBLCLK)
 350+ {
 351+ if (SendDlgItemMessage(hWnd, IDC_RESIZABLE, BM_GETCHECK, 0, 0)) resizable = true;
 352+ else resizable = false;
 353+ if (buffer < minbuffer) buffer = minbuffer;
 354+ if (buffer > maxbuffer) buffer = maxbuffer;
 355+ i = SendDlgItemMessage(hWnd, IDC_VIDMODES, LB_GETCURSEL, 0, 0);
 356+ SendDlgItemMessage(hWnd, IDC_VIDMODES, LB_GETTEXT, i, (LPARAM)tmpstring);
 357+ TranslateResolutionString(tmpstring, width, height, bpp, refresh);
 358+ RunDXGLTest(currenttest, width, height, bpp, refresh, buffer, api,
 359+ filter, msaa, framerate, fullscreen, resizable, Tests[currenttest].is3d);
 360+ break;
 361+ }
349362 break;
350363 case IDC_FRAMERATE:
351364 if(HIWORD(wParam) == EN_CHANGE)
Index: dxgltest/tests.cpp
@@ -2173,7 +2173,7 @@
21742174 DDSCAPS2 caps;
21752175 DDSURFACEDESC2 ddsd;
21762176 DDPIXELFORMAT ddpfz;
2177 - testnum = 2;
 2177+ testnum = 14;
21782178 ddinterface = new MultiDirectDraw(7, &error, NULL);
21792179 hDisplay = GetDlgItem(hWnd, IDC_DISPLAY);
21802180 ::hWnd = hDisplay;
@@ -2579,6 +2579,7 @@
25802580 }
25812581 break;
25822582 case WM_CLOSE:
 2583+ StopTimer();
25832584 if (d3d7dev)
25842585 {
25852586 d3d7dev->Release();
@@ -2662,7 +2663,7 @@
26632664 DDSCAPS2 caps;
26642665 DDSURFACEDESC2 ddsd;
26652666 DDPIXELFORMAT ddpfz;
2666 - testnum = 3;
 2667+ testnum = 15;
26672668 ddinterface = new MultiDirectDraw(7, &error, NULL);
26682669 hDisplay = GetDlgItem(hWnd, IDC_DISPLAY);
26692670 ::hWnd = hDisplay;
@@ -3099,6 +3100,7 @@
31003101 }
31013102 break;
31023103 case WM_CLOSE:
 3104+ StopTimer();
31033105 if (d3d7dev)
31043106 {
31053107 d3d7dev->Release();