DXGL r602 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r601‎ | r602 | r603 >
Date:23:54, 10 March 2015
Author:admin
Status:new
Tags:
Comment:
Disable winmm support
Modified paths:
  • /ddraw/glDirectDraw.cpp (modified) (history)
  • /ddraw/glDirectDraw.h (modified) (history)
  • /ddraw/timer.c (modified) (history)

Diff [purge]

Index: ddraw/glDirectDraw.cpp
@@ -1376,7 +1376,6 @@
13771377 threadsafe = false;
13781378 nowindowchanges = false;
13791379 cooplevel = 0;
1380 - timer = timeGetTime();
13811380 ZeroMemory(&oldmode,sizeof(DEVMODE));
13821381 surfaces = (glDirectDrawSurface7 **)malloc(1024*sizeof(glDirectDrawSurface7 *));
13831382 if(!surfaces) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
Index: ddraw/glDirectDraw.h
@@ -136,7 +136,6 @@
137137 glDirect3D3 *glD3D3;
138138 glDirect3D2 *glD3D2;
139139 glDirect3D1 *glD3D1;
140 - DWORD timer;
141140 bool devwnd;
142141 DWORD cooplevel;
143142 };
Index: ddraw/timer.c
@@ -28,10 +28,10 @@
2929 QueryPerformanceFrequency(&freq);
3030 if (!freq.QuadPart)
3131 {
32 - timeGetDevCaps(&mmcaps, sizeof(TIMECAPS));
 32+ /*timeGetDevCaps(&mmcaps, sizeof(TIMECAPS));
3333 timeBeginPeriod(mmcaps.wPeriodMin);
3434 timer->timer_frequency = ((double) mmcaps.wPeriodMin / 1.0) * 1000.0;
35 - timer->timertype = 2;
 35+ timer->timertype = 2;*/
3636 }
3737 else
3838 {
@@ -52,7 +52,7 @@
5353 }
5454 else
5555 {
56 - timer->timer_base.QuadPart = timeGetTime();
 56+ //timer->timer_base.QuadPart = timeGetTime();
5757 linesperms = (double) lines / ((1.0 / (double) frequency) * 1000.0);
5858 timer->vsync_lines = (unsigned int)(linesperms * (frequency / 1000.0));
5959 timer->lines = lines + timer->vsync_lines;
@@ -65,7 +65,7 @@
6666 double sync_pos;
6767 double milliseconds;
6868 if (timer->timertype == 1) QueryPerformanceCounter(&timerpos);
69 - else timerpos.QuadPart = timeGetTime();
 69+ //else timerpos.QuadPart = timeGetTime();
7070 timerpos.QuadPart -= timer->timer_base.QuadPart;
7171 if (timer->timertype == 1) milliseconds = ((double) timerpos.QuadPart / (double)timer->timer_frequency) * 1000.0;
7272 else milliseconds = (double) timerpos.QuadPart;