d2dx
d2dx copied to clipboard
Can't Take Screenshots?
Can't take a screenshot? No screenshot files are created when I press the screenshot button.
Can't take a screenshot? No screenshot files are created when I press the screenshot button.
working fine with me what diablo 2 version are you using?
Hi, I just tested 1.13d + D2DX 0.99.529 and PrintScreen keyboard button doesn't seem to take screenshots for me either. (D2 usually saves screenies to the game folder right ?)
If this helps, in my case I am running 1.14d with PlugY 14.03 on a Win7 64 Ultimate. Tried both F12 and PrintScreen in controls and there are no screenshots saved anywhere (in directory or [username]/Saved Games/Diablo II)
Are you running PlugY?
If so, do not run plugy with the -3dfx flag in the shortcut. Instead, go into the PlugY.ini file and use this line to launch it.
[LAUNCHING] Param=-3dfx Library=PlugY.dll
That fixed the screenshot error for me.
I just tested on a new install (copied D2 {1.14d} into new folder, copied d2dx in, copied PlugY {v14.03) in. added -3dfx to param as above instead. Still no luck. Also tried running on my D2 with BaseMod and that doesn't even recognise the -3dfx in param. Edit: Same thing happens running plain D2 with d2dx, with the command line in shortcut of course.
That was going to be my next check to see if it works with plain D2.
The wrapper and everything works with plain D2, just no screenshot? Strange. And your shortcut looks like the following?
Yep. It had -w too but I just removed that and tested again just in case. Same result. Are you running 1.14d as well or an earlier version?
Yeah, I'm running 1.14d. I installed using the blizzard installer (which installed something like 1.14b), and used the patch to upgrade to 1.14d.
I also installed plugy using the installer, so PlugY is in its own directory.
This is my d2dx.cfg if that helps.
[window] scale=1 # range 1-3, an integer scale factor for the window position=[-1,-1] # if [-1,-1] the window will be centered, otherwise placed at the explicit position given here frameless=false # if true, the window frame (caption bar etc) will be removed
[game] size=[-1,-1] # if [-1,-1] d2dx will decide a suitable game size, otherwise will use the size given here filtering=2 # if 0, will use high quality filtering (sharp, more pixelated) # 1, will use bilinear filtering (blurry) # 2, will use catmull-rom filtering (higher quality than bilinear)
[optouts] noclipcursor=false # if true, will not lock the mouse cursor to the game window nofpsfix=true # if true, will not apply the basic fps fix (precludes high fps support) noresmod=true # if true, will not apply the built-in D2HD resolution mod (precludes widescreen support) nowide=false # if true, will not choose a widescreen resolution (if noresmod is true, this does nothing) nologo=true # if true, will not display the D2DX logo on the title screen novsync=false # if true, will not use vertical sync noaa=false # if true, will not apply anti-aliasing to jagged edges nocompatmodefix=false # if true, will not block the use of "Windows XP compatibility mode" notitlechange=false # if true, will not change the window title text nomotionprediction=true # if true, will not run the game graphics at high fps
Same issue on Windows 7 Pro 64 bit. Hitting print screen, which is bound to screen shot, does not write a screenshot to the game directory. Using 1.13d with basemod and BH Maphack and the uber tristram minion fix.
I've had a quick look at D2DX source code and it doesn't seem to handle screenshots currently.
There's a func that handles alt+enter, mouse movement, etc... and there's no special case for printscreen.
static LRESULT CALLBACK d2dxSubclassWndProc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam,
UINT_PTR uIdSubclass,
DWORD_PTR dwRefData)
{
RenderContext* renderContext = (RenderContext*)dwRefData;
if (uMsg == WM_ACTIVATEAPP)
{
if (wParam)
{
renderContext->ClipCursor();
}
else
{
renderContext->UnclipCursor();
}
}
else if (uMsg == WM_SYSKEYDOWN || uMsg == WM_KEYDOWN)
{
if (wParam == VK_RETURN && (HIWORD(lParam) & KF_ALTDOWN))
{
renderContext->ToggleFullscreen();
return 0;
}
}
else if (uMsg == WM_DESTROY)
{
RemoveWindowSubclass(hWnd, d2dxSubclassWndProc, 1234);
D2DXContextFactory::DestroyInstance();
}
else if (uMsg == WM_NCMOUSEMOVE)
{
ShowCursor_Real(TRUE);
return 0;
}
else if (uMsg >= WM_MOUSEFIRST && uMsg <= WM_MOUSELAST)
{
#ifdef NDEBUG
ShowCursor_Real(FALSE);
#endif
Offset mousePos = { LOWORD(lParam), HIWORD(lParam) };
Size gameSize;
Rect renderRect;
Size desktopSize;
renderContext->GetCurrentMetrics(&gameSize, &renderRect, &desktopSize);
const bool isFullscreen = renderContext->GetScreenMode() == ScreenMode::FullscreenDefault;
const float scale = (float)renderRect.size.height / gameSize.height;
const uint32_t scaledWidth = (uint32_t)(scale * gameSize.width);
const float mouseOffsetX = isFullscreen ? (float)(desktopSize.width / 2 - scaledWidth / 2) : 0.0f;
mousePos.x = (int32_t)(max(0, mousePos.x - mouseOffsetX) / scale);
mousePos.y = (int32_t)(mousePos.y / scale);
lParam = mousePos.x;
lParam |= mousePos.y << 16;
}
return DefSubclassProc(hWnd, uMsg, wParam, lParam);
}
That being said, there's a workaround as the PrintScreen key seems to trigger a "windows screenshot" which is sent to the clipboard, So just hit PrintScreen in game, then fire up GIMP or ms paint and Paste (CTRL + V) and you'll have your screenshot, no ideal but serviceable...