Villacaleb / slimdx

Automatically exported from code.google.com/p/slimdx
MIT License
0 stars 0 forks source link

Code for Direct3D9 WPF interopt sample is incompatible with VS2012, fix provided #887

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using the Jan2012 release of SlimDX, and tutorial code checked out from svn. In 
the InitializeDevice() method of 
samples.Direct3D9.WPFInteropt.SlimDX.WPF.SlimDXControl.xaml.cs line 310 and 311 
needs to be changed from"

<code>
_presentParameters.BackBufferWidth = ((int) ActualWidth < 0) ? 1 : (int) 
ActualWidth;
_presentParameters.BackBufferHeight = ((int) ActualHeight < 0) ? 1 : (int) 
ActualHeight;
</code>

to :

<code>
_presentParameters.BackBufferWidth = ((int) ActualWidth <= 0) ? 1 : (int) 
ActualWidth;
_presentParameters.BackBufferHeight = ((int) ActualHeight <= 0) ? 1 : (int) 
ActualHeight;
</code>

in order to be compatible with visual studio 2012. I am running currently in 
NET 4.0 mode, with windows 7.  The old code worked fine with vs 2010 in the 
configuration, but breaks in vs2012.

Original issue reported on code.google.com by sphad...@gmail.com on 8 Nov 2012 at 7:02

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2211.

Original comment by Mike.Popoloski on 24 Jan 2013 at 4:04