summaryrefslogtreecommitdiffhomepage
path: root/nGenEx/VideoDX9.cpp
diff options
context:
space:
mode:
authorFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-09 14:12:12 +0000
committerFWoltermann@gmail.com <FWoltermann@gmail.com@076cb2c4-205e-83fd-5cf3-1be9aa105544>2011-12-09 14:12:12 +0000
commitc45ce5cc4e54bdae2fd45a130d8957ec55b51b1b (patch)
treee7ac533ff4006d455246d4e6d85a87f1966b9dd4 /nGenEx/VideoDX9.cpp
parentef83cdced6bc0fd4ee94f03237ad0201ef012a6b (diff)
downloadstarshatter-c45ce5cc4e54bdae2fd45a130d8957ec55b51b1b.zip
starshatter-c45ce5cc4e54bdae2fd45a130d8957ec55b51b1b.tar.gz
starshatter-c45ce5cc4e54bdae2fd45a130d8957ec55b51b1b.tar.bz2
A few fixes recommended by PVS Studio
Diffstat (limited to 'nGenEx/VideoDX9.cpp')
-rw-r--r--nGenEx/VideoDX9.cpp26
1 files changed, 9 insertions, 17 deletions
diff --git a/nGenEx/VideoDX9.cpp b/nGenEx/VideoDX9.cpp
index 5b6984b..d54ae1e 100644
--- a/nGenEx/VideoDX9.cpp
+++ b/nGenEx/VideoDX9.cpp
@@ -265,6 +265,10 @@ VideoDX9::VideoDX9(const HWND& window, VideoSettings* vs)
d3d = Direct3DCreate9(D3D_SDK_VERSION);
dx9enum = new(__FILE__,__LINE__) VideoDX9Enum(d3d);
+ // DEBUG
+ vs->is_windowed = true;
+ // DEBUG
+
if (d3d && dx9enum) {
if (vs) {
dx9enum->req_fullscreen = vs->is_windowed ? false : true;
@@ -3364,24 +3368,12 @@ VideoDX9::SetupPass(int pass)
current_texture = texture_0;
if (tex_bmp_1) {
- if (strategy >= DX9_STRATEGY_BLEND) {
- texture_1 = texcache->FindTexture(tex_bmp_1);
- hr = d3ddevice->SetTexture(1, texture_1);
-
- if (tex_bmp_2) {
- texture_2 = texcache->FindTexture(tex_bmp_2);
- hr = d3ddevice->SetTexture(2, texture_2);
- }
- }
+ texture_1 = texcache->FindTexture(tex_bmp_1);
+ hr = d3ddevice->SetTexture(1, texture_1);
- else {
- texture_1 = texcache->FindTexture(tex_bmp_1);
- hr = d3ddevice->SetTexture(1, texture_1);
-
- if (tex_bmp_2) {
- texture_2 = texcache->FindTexture(tex_bmp_2);
- hr = d3ddevice->SetTexture(2, texture_2);
- }
+ if (tex_bmp_2) {
+ texture_2 = texcache->FindTexture(tex_bmp_2);
+ hr = d3ddevice->SetTexture(2, texture_2);
}
}
}