Fix some signed/unsigned conversions that could lead to incorrect sign extension.

Fixes CID 1222029.
Lower the probability of buffer overflows when possible.

Convert to 64-bit integer before performing arithmetic operations on 64-bit builds.

Fixes CID 1222022 and 1222023.
Remember window position: Ensure the window can't be completely hidden after restoring it.

Restore the window at its latest position only it the window is at least partially visible on one enabled monitor.

Fixes #4408.
EVR renderers: Query the IBaseFilter interface of the EVR only once.

Calling QueryInterface insides those functions led to deadlocks in some cases.

Refs: #4213.
DX9 Allocator-Presenter: correctly signal the pending device reset.
Sync renderer: Reset the device on display change.

Refs: #4213.
Avoid extra repaint when resetting the video device.

Update the OSD before pausing and after unpausing.

Refs: #4213.
Fix a deadlock when starting MPC-HC in D3D fullscreen and auto-changing the monitor mode.

Refs: #4213.
D3D fullscreen: Obey "Apply default monitor mode on fullscreen exit" option.

Refs: #4213.
Don't force any background color for the Shockwave graph.

This commit fixes #1747.
ISR: Render text subtitles relative to the video frame when in doubt.
Why "C:\tmp.srt"?
WebUI: Inform the web interface that no audio stream is available.
WebUI: Make use of new [hasaudio] info.
What the hell was intended here?!

Trying to make some sense of that code. Without much luck so far...
Fix: x86 and x64 versions conflicted over file associations.

4f465cf8b81f1da800b1bfc57cc48e317d24fbb5 was incomplete for Vista+.

This commit fixes #4064.
Auto mode for relative to.
Cosmetics: Use better IDs from the resource strings.