DXGL r706 - Code Review
For
DXGL
(
recent comments
|
status changes
|
tags
|
authors
|
states
|
release notes
|
statistics
)
Jump to navigation
Jump to search
Repository:
DXGL
Revision:
<
r705
|
r706
|
r707
>
Date:
19:10, 29 May 2017
Author:
admin
Status:
new
Tags:
Comment:
Fix First scale in stretch and aspect modes.
Modified paths:
/ddraw/glDirectDraw.cpp
(modified) (
history
)
/ddraw/glRenderer.cpp
(modified) (
history
)
Diff
[
purge
]
Index: ddraw/glDirectDraw.cpp
—
—
@@ -1698,8 +1698,10 @@
1699
1699
{
1700
1700
case DISP_CHANGE_SUCCESSFUL:
1701
1701
if (fullscreen) this->currmode = newmode;
1702
- primaryx = screenx = newmode.dmPelsWidth / xscale;
1703
- primaryy = screeny = newmode.dmPelsHeight / yscale;
1702
+ primaryx = newmode.dmPelsWidth / xscale;
1703
+ screenx = newmode.dmPelsWidth;
1704
+ primaryy = newmode.dmPelsHeight / yscale;
1705
+ screeny = newmode.dmPelsHeight;
1704
1706
internalx = newmode.dmPelsWidth;
1705
1707
internaly = newmode.dmPelsHeight;
1706
1708
internalbpp = screenbpp = newmode.dmBitsPerPel;
Index: ddraw/glRenderer.cpp
—
—
@@ -3356,12 +3356,12 @@
3357
3357
This->firstscaley = dxglcfg.firstscaley;
3358
3358
}
3359
3359
viewport[0] = viewport[1] = 0;
3360
- viewport[2] = sizes[4]*This->firstscalex;
3361
- viewport[3] = sizes[5]*This->firstscaley;
3362
- view[0] = (GLfloat)-((sizes[4]*This->firstscalex)-sizes[0])/2;
3363
- view[1] = (GLfloat)((sizes[4]*This->firstscalex)-sizes[0])/2+sizes[0];
3364
- view[2] = (GLfloat)((sizes[5]*This->firstscaley)-sizes[1])/2+sizes[1];
3365
- view[3] = (GLfloat)-((sizes[5]*This->firstscaley)-sizes[1])/2;
3360
+ viewport[2] = sizes[4];
3361
+ viewport[3] = sizes[5];
3362
+ view[0] = (GLfloat)-(sizes[4]-sizes[0])/2;
3363
+ view[1] = (GLfloat)(sizes[4]-sizes[0])/2+sizes[0];
3364
+ view[2] = (GLfloat)(sizes[5]-sizes[1])/2+sizes[1];
3365
+ view[3] = (GLfloat)-(sizes[5]-sizes[1])/2;
3366
3366
}
3367
3367
else
3368
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