DXGL r602 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
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 @@
1377
1377
threadsafe = false;
1378
1378
nowindowchanges = false;
1379
1379
cooplevel = 0;
1380
- timer = timeGetTime();
1381
1380
ZeroMemory(&oldmode,sizeof(DEVMODE));
1382
1381
surfaces = (glDirectDrawSurface7 **)malloc(1024*sizeof(glDirectDrawSurface7 *));
1383
1382
if(!surfaces) TRACE_RET(HRESULT,23,DDERR_OUTOFMEMORY);
Index: ddraw/glDirectDraw.h
—
—
@@ -136,7 +136,6 @@
137
137
glDirect3D3 *glD3D3;
138
138
glDirect3D2 *glD3D2;
139
139
glDirect3D1 *glD3D1;
140
- DWORD timer;
141
140
bool devwnd;
142
141
DWORD cooplevel;
143
142
};
Index: ddraw/timer.c
—
—
@@ -28,10 +28,10 @@
29
29
QueryPerformanceFrequency(&freq);
30
30
if (!freq.QuadPart)
31
31
{
32
- timeGetDevCaps(&mmcaps, sizeof(TIMECAPS));
32
+ /*timeGetDevCaps(&mmcaps, sizeof(TIMECAPS));
33
33
timeBeginPeriod(mmcaps.wPeriodMin);
34
34
timer->timer_frequency = ((double) mmcaps.wPeriodMin / 1.0) * 1000.0;
35
- timer->timertype = 2;
35
+ timer->timertype = 2;*/
36
36
}
37
37
else
38
38
{
—
—
@@ -52,7 +52,7 @@
53
53
}
54
54
else
55
55
{
56
- timer->timer_base.QuadPart = timeGetTime();
56
+ //timer->timer_base.QuadPart = timeGetTime();
57
57
linesperms = (double) lines / ((1.0 / (double) frequency) * 1000.0);
58
58
timer->vsync_lines = (unsigned int)(linesperms * (frequency / 1000.0));
59
59
timer->lines = lines + timer->vsync_lines;
—
—
@@ -65,7 +65,7 @@
66
66
double sync_pos;
67
67
double milliseconds;
68
68
if (timer->timertype == 1) QueryPerformanceCounter(&timerpos);
69
- else timerpos.QuadPart = timeGetTime();
69
+ //else timerpos.QuadPart = timeGetTime();
70
70
timerpos.QuadPart -= timer->timer_base.QuadPart;
71
71
if (timer->timertype == 1) milliseconds = ((double) timerpos.QuadPart / (double)timer->timer_frequency) * 1000.0;
72
72
else milliseconds = (double) timerpos.QuadPart;
Navigation menu
Personal tools
Log in
Namespaces
Special page
English
expanded
collapsed
Views
More
expanded
collapsed
Search
Navigation
Home
Main page
Recent changes
Random page
MediaWiki help
Introduction
Progress
Downloads
Source code
Build from source
AppDB
Bug reports
Forums
Tools
Special pages
Printable version