src/video/win32/SDL_d3drender.c
changeset 1901 f1828a500391
parent 1900 5c6bdbf3aadf
child 1903 f132024010be
--- a/src/video/win32/SDL_d3drender.c	Wed Jul 12 09:25:17 2006 +0000
+++ b/src/video/win32/SDL_d3drender.c	Thu Jul 13 08:13:02 2006 +0000
@@ -287,6 +287,7 @@
         pparams.Windowed = TRUE;
     }
     pparams.FullScreen_RefreshRateInHz = 0;     /* FIXME */
+    pparams.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
 
     result = IDirect3D9_CreateDevice(videodata->d3d, D3DADAPTER_DEFAULT,        /* FIXME */
                                      D3DDEVTYPE_HAL,
@@ -431,6 +432,7 @@
                    Uint32 color)
 {
     SDL_D3D_RenderData *data = (SDL_D3D_RenderData *) renderer->driverdata;
+    D3DRECT d3drect;
     HRESULT result;
 
     if (data->beginScene) {
@@ -438,9 +440,12 @@
         data->beginScene = SDL_FALSE;
     }
 
-    result =
-        IDirect3DDevice9_Clear(data->device, 0, NULL, D3DCLEAR_TARGET,
-                               (D3DCOLOR) color, 1.0f, 0);
+    d3drect.x1 = rect->x;
+    d3drect.x2 = rect->x+rect->w;
+    d3drect.y1 = rect->y;
+    d3drect.y2 = rect->y+rect->h;
+
+    result = IDirect3DDevice9_Clear(data->device, 1, &d3drect, D3DCLEAR_TARGET, (D3DCOLOR) color, 1.0f, 0);
     if (FAILED(result)) {
         D3D_SetError("Clear()", result);
         return -1;