DXGL r665 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r664‎ | r665 | r666 >
Date:23:57, 9 June 2016
Author:admin
Status:new
Tags:
Comment:
Fix creation and upload of primary in "Adjust primary resolution" mode.
Modified paths:
  • /ddraw/glTexture.cpp (modified) (history)

Diff [purge]

Index: ddraw/glTexture.cpp
@@ -605,7 +605,7 @@
606606 break;
607607 }
608608 glTexture__Upload2(This, level,
609 - This->levels[level].ddsd.dwWidth, This->levels[level].ddsd.dwHeight, FALSE, FALSE, This->renderer->util);
 609+ bigx, bigy, FALSE, FALSE, This->renderer->util);
610610 }
611611 }
612612 BOOL glTexture__Repair(glTexture *This, BOOL preserve)
@@ -982,8 +982,16 @@
983983 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, This->wraps);
984984 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, This->wrapt);
985985 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, This->miplevel - 1);
986 - x = This->levels[0].ddsd.dwWidth;
987 - y = This->levels[0].ddsd.dwHeight;
 986+ if ((This->levels[0].ddsd.dwWidth != This->bigwidth) || (This->levels[0].ddsd.dwHeight != This->bigheight))
 987+ {
 988+ x = This->bigwidth;
 989+ y = This->bigheight;
 990+ }
 991+ else
 992+ {
 993+ x = This->levels[0].ddsd.dwWidth;
 994+ y = This->levels[0].ddsd.dwHeight;
 995+ }
988996 for (i = 0; i < This->miplevel; i++)
989997 {
990998 do