Skip to content

Commit bc0829d

Browse files
committed
Fix antialiasing in windowed mode
1 parent 5f63785 commit bc0829d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Dllmain/BuildNo.rc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
#define BUILD_NUMBER 8120
1+
#define BUILD_NUMBER 8121

ddraw/IDirectDrawX.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3484,7 +3484,7 @@ HRESULT m_IDirectDrawX::CreateD9Device(char* FunctionName)
34843484
}
34853485

34863486
// Enable antialiasing (only works when using discard swap effect)
3487-
if (Device.AntiAliasing && !presParams.Windowed)
3487+
if (Device.AntiAliasing)
34883488
{
34893489
for (int x = D9SampleType; x > 0; x--)
34903490
{
@@ -3495,6 +3495,7 @@ HRESULT m_IDirectDrawX::CreateD9Device(char* FunctionName)
34953495
{
34963496
presParams.MultiSampleType = Samples;
34973497
presParams.MultiSampleQuality = (QualityLevels > 0) ? QualityLevels - 1 : 0;
3498+
presParams.SwapEffect = D3DSWAPEFFECT_DISCARD;
34983499
LOG_ONCE(__FUNCTION__ << " Enabling antialiasing " << presParams.MultiSampleType << " samples " << presParams.MultiSampleQuality << " quality!");
34993500
break;
35003501
}
@@ -5220,7 +5221,7 @@ HRESULT m_IDirectDrawX::PresentScene(m_IDirectDrawSurfaceX* pPrimarySurface, REC
52205221
LOG_LIMIT(100, __FUNCTION__ << " Error: failed to get present rect!");
52215222
return DDERR_GENERIC;
52225223
}
5223-
if (presParams.SwapEffect == D3DSWAPEFFECT_COPY)
5224+
if (presParams.Windowed && !FullScreenWindowed)
52245225
{
52255226
pDestRect = &DestRect;
52265227
}

0 commit comments

Comments
 (0)