Permalink
Browse files

winport: fix crash with HD prescale and --num-cores 1. OSD is messed …

…up in this case. Not going to fix that now since --num-cores 1 is a very old quirks hack anyway. Fixes #20
1 parent 1213deb commit ae37e1259edcc17eae317e03f8f67faa93c9d789 @zeromus zeromus committed Dec 28, 2016
Showing with 3 additions and 3 deletions.
  1. +3 −3 desmume/src/frontend/windows/main.cpp
@@ -2059,7 +2059,7 @@ void Display()
if(CommonSettings.single_core())
{
- video.srcBuffer = (u8*)dispInfo.masterNativeBuffer;
+ video.srcBuffer = (u8*)dispInfo.masterCustomBuffer;
video.srcBufferSize = dispInfo.customWidth*dispInfo.customHeight*2*2;
DoDisplay(true);
}
@@ -2209,7 +2209,7 @@ static void StepRunLoop_Paused()
// periodically update single-core OSD when paused and in the foreground
if(CommonSettings.single_core() && GetActiveWindow() == mainLoopData.hwnd)
{
- video.srcBuffer = (u8*)GPU->GetDisplayInfo().masterNativeBuffer;
+ video.srcBuffer = (u8*)GPU->GetDisplayInfo().masterCustomBuffer;
DoDisplay(true);
}
@@ -5025,7 +5025,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
if(CommonSettings.single_core())
{
const NDSDisplayInfo &dispInfo = GPU->GetDisplayInfo();
- video.srcBuffer = (u8*)dispInfo.masterNativeBuffer;
+ video.srcBuffer = (u8*)dispInfo.masterCustomBuffer;
DoDisplay(true);
}
}

0 comments on commit ae37e12

Please sign in to comment.