DXGL r704 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r703
|
r704
|
r705
>
Date:
04:13, 21 May 2017
Author:
admin
Status:
new
Tags:
Comment:
Make automatic pixel doubling work.
Modified paths:
/ddraw/glDirectDraw.cpp
(modified) (
history
)
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDraw.cpp
—
—
@@ -235,6 +235,11 @@
236
236
*count += newcount;
237
237
}
238
238
239
+void AddDoubledResolutions(DEVMODE **array, DWORD *count)
240
+{
241
+//#error Add doubled resolutions
242
+}
243
+
239
244
void AddExtraColorModes(DEVMODE **array, DWORD *count)
240
245
{
241
246
DEVMODE *array2 = (DEVMODE *)malloc(sizeof(DEVMODE)*(7*(*count)));
—
—
@@ -253,7 +258,7 @@
254
259
count2++;
255
260
}
256
261
break;
257
-/* case 16:
262
+/* case 16: //FIXME: Temporarily removed for compatibility.
258
263
compmode = (*array)[i];
259
264
compmode.dmBitsPerPel = 15;
260
265
if(!ScanModeList(*array,compmode,*count))
—
—
@@ -287,7 +292,7 @@
288
293
count2++;
289
294
}
290
295
compmode = (*array)[i];
291
-/* compmode.dmBitsPerPel = 15;
296
+/* compmode.dmBitsPerPel = 15; // FIXME: Temporarily removed for compatibility.
292
297
if(!ScanModeList(*array,compmode,*count))
293
298
{
294
299
array2[count2] = compmode;
—
—
@@ -381,6 +386,9 @@
382
387
if(dxglcfg.AddColorDepths) AddExtraColorModes(&modes,&modenum); // FIXME: Add color depths by bitmask
383
388
DiscardDuplicateModes(&modes,&modenum);
384
389
if(dxglcfg.AddModes && (dxglcfg.scaler != 0)) AddExtraResolutions(&modes,&modenum); // FIXME: Add modes by bitmask
390
+ if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
391
+ (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
392
+ AddDoubledResolutions(&modes, &modenum);
385
393
modenum--;
386
394
switch(dxglcfg.SortModes)
387
395
{
Index: ddraw/glRenderer.cpp
—
—
@@ -2793,10 +2793,8 @@
2794
2794
if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
2795
2795
(dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
2796
2796
{
2797
- if (width <= 400) This->firstscalex = 2.0f;
2798
- else This->firstscaley = 1.0f;
2799
- if (height <= 240) This->firstscaley = 2;
2800
- else This->firstscaley = 1;
2797
+ This->firstscalex = 1.0f;
2798
+ This->firstscaley = 1.0f;
2801
2799
}
2802
2800
else
2803
2801
{
—
—
@@ -3351,6 +3349,19 @@
3352
3350
view[1] = (GLfloat)(sizes[4]-sizes[0])/2+sizes[0];
3353
3351
view[2] = (GLfloat)(sizes[5]-sizes[1])/2+sizes[1];
3354
3352
view[3] = (GLfloat)-(sizes[5]-sizes[1])/2;
3353
+ if (_isnan(dxglcfg.firstscalex) || _isnan(dxglcfg.firstscaley) ||
3354
+ (dxglcfg.firstscalex < 0.25f) || (dxglcfg.firstscaley < 0.25f))
3355
+ {
3356
+ if (sizes[2] <= 400) This->firstscalex = 2.0f;
3357
+ else This->firstscalex = 1.0f;
3358
+ if (sizes[3] <= 240) This->firstscaley = 2.0f;
3359
+ else This->firstscaley = 1.0f;
3360
+ }
3361
+ else
3362
+ {
3363
+ This->firstscalex = dxglcfg.firstscalex;
3364
+ This->firstscaley = dxglcfg.firstscaley;
3365
+ }
3355
3366
}
3356
3367
else
3357
3368
{
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