SetWindowDisplayAffinity() causes nvidia instant replay to turn off - c

SetWindowDisplayAffinity(hwnd, WDA_EXCLUDEFROMCAPTURE); causes nvidia shadowplay to turn off. This code is supposed to make the window transparent to captures, which it does, but also disables geforce experience entirely until the window is closed.
The documentation doesn't state this and any fixes couldn't be found online.
Is there any way I can adjust the code to stop this, or adjust nvidia shadowplay?
Geforce driver - 526.98
OS - windows 10
Thanks for the help in advance!

Related

Terminal window on vscodium appears pixelated

The terminal window on vscodium looks so pixelated that its not practical to work on it (see screenshot).
I am using windows 10 pro 22h2 os build 19045.2604 feature pack Windows Feature Experience Pack 120.2212.4190.0. I am using Intel(R) Core(TM) i7-2630QM CPU # 2.00GHz 2.00 GHz with 8 gb ram.
I used chocolatey to install vscodium using powershell opened in administrator mode.
Would appreciate any suggestions on how to solve it. I am relatively inexperienced.
enter image description here
I have no idea what to try to solve it.
Try the two solutions below:
In Settings->Features, change the Terminal>Integrated>Renderer to canvas or dom.
In Properties, Under the Compatibility tab, click on Change high DPI settings and check the Override high DPI scaling behavior option.
Good luck.

D3D Shared surface not working in windows 7

I'm a newbie to Direct3D technology. And was trying out D3D shared surface code found at Direct3D10, 11 and D2D in WPF - Round 2 DEMO! by Jeremiah morrill Interop.D3DImage.rename2zp. I was able to compile the code without any issues but when I run it I see a blank screen Output window
I'm using VS2013, DirectX SDK(June 2010) and windows 7 OS.
D3D is often pretty good at telling you what the problem is. If you go into the project properties, and enable native debugging, you might see messages in the output window which which will give you a clue - as long as you're running the debug version of the app of course.
There are many reasons it might be failing though - it could be that your graphics card doesn't support what the demo is doing, or that it's starting up with the wrong device settings.

WPF crash with Intel HD video cards

I have a problem with my WPF application using the Intel HD video cards. The application crashes at starting time with a NullReferenceException within the PresentationCore.ni.dll - the system dll. With ATI HD video cards it works without problems.
Just a guess, but this seems to be a driver problem. You can try software rendering to avoid using hardware acceleration.

WPF rendering freeze

I'm experiencing a GUI freeze problem, related to hard vs. software UI rendering.
The context : 2 WPF apps (.NET 3.5 SP1) running on a dual-display XP Embedded machine (DirectX 9.0c).
At some point, one of these app freezes. But only the rendering : the GUI stays active (message pump is active, the application is responsive), but the rendering is not done.
The freeze can last seconds or forever.
The 2nd app keeps running normally. The bug occurs only in a dual-display configuration, the 2nd app being a kind of catalyst (more memory and CPU usage...)
Using Perforator, I see that Video Memory Usage is continuously going up & down in spikes (cf : screenshot).
During that time, one native thread is consuming 100% of a CPU (the stack-trace involves WPFgfx, DirectX, GDI, and video driver)
Usually, when the app unfreeze, it's fully software rendered (purple tint with Perforator).
Also, de-activating hardware rendering unfreeze the app.
My conclusion, so far, is that I'm facing an out of video memory (as described at point #14 in this post), with an attempt to fallback to software rendering, but there is a loop somewhere trying again in hardware mode.
Am i right ?
Would it be more a WPF problem, or a video driver problem ? or even DirectX ?
Are there some parameters I can tune around this ?
Am i right ? Would it be more a WPF problem, or a video driver problem ? or even DirectX ? Are there some parameters I can tune around this ?
This sounds like a driver issue. I would start with seeing if there are driver updates. The best option might just be to disable hardware acceleration altogether, as WPF (on XP especially) really relies on the graphics drivers.
Visual Studio 2010 sp1 disabled hardware acceleration for itself on XP for exactly this reason...

How can I speed up Visual Studio 2010 text editor render speed?

Visual Studio 2010 moved to using WPF for rendering the editor. This is leading to slowdowns while I am editing code, especially if I'm running something else that uses other video capabilities.
How can I speed this up? A new video card? New drivers? Settings?
What technologies does WPF use to render and what video card would complement it?
WPF uses DirectX for rendering, so a new top of the line video card would certainly help you out here. Any solid ATI or Nvidia card nowadays supports the latest and greatest DirectX.
The answer from #Charlie is absolutely spot on; and I thought about saying this on a comment but then figured I should put it as an answer.
Under certain circumstances (certainly on my desktop at work, which uses a workstation NVidia card), which are listed in the installation issues (connected with Hyper-V in particular), VS2010 fails to enable video acceleration even if it is available.
Open up Tools->Options, and on the very first options panel you'll see a group in the middle 'Visual Experience'. Just make sure that everything is checked in there and that it says 'Visual Studio is currently using hardware-accelerated rendering...'.
I don't think the hardware requirements for VS2010 are particularly heavy - but your card certainly must be DX capable.

Resources