Fixed whitespace
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 285ddb7..a4c6027 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -543,17 +543,17 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
D3D_RenderData *data;
SDL_SysWMinfo windowinfo;
HRESULT result;
- const char *hint;
+ const char *hint;
D3DPRESENT_PARAMETERS pparams;
IDirect3DSwapChain9 *chain;
D3DCAPS9 caps;
- DWORD device_flags;
+ DWORD device_flags;
Uint32 window_flags;
int w, h;
SDL_DisplayMode fullscreen_mode;
int d3dxVersion;
char d3dxDLLFile[50];
- int displayIndex;
+ int displayIndex;
renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));
if (!renderer) {
@@ -568,7 +568,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
return NULL;
}
- if( D3D_LoadDLL( &data->d3dDLL, &data->d3d ) ) {
+ if( D3D_LoadDLL( &data->d3dDLL, &data->d3d ) ) {
for (d3dxVersion=50;d3dxVersion>0;d3dxVersion--) {
LPTSTR dllName;
SDL_snprintf(d3dxDLLFile, sizeof(d3dxDLLFile), "D3DX9_%02d.dll", d3dxVersion);
@@ -600,7 +600,7 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
renderer->WindowEvent = D3D_WindowEvent;
renderer->CreateTexture = D3D_CreateTexture;
renderer->UpdateTexture = D3D_UpdateTexture;
- renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
+ renderer->UpdateTextureYUV = D3D_UpdateTextureYUV;
renderer->LockTexture = D3D_LockTexture;
renderer->UnlockTexture = D3D_UnlockTexture;
renderer->SetRenderTarget = D3D_SetRenderTarget;
@@ -661,22 +661,22 @@ D3D_CreateRenderer(SDL_Window * window, Uint32 flags)
}
/* Get the adapter for the display that the window is on */
- displayIndex = SDL_GetWindowDisplayIndex( window );
+ displayIndex = SDL_GetWindowDisplayIndex( window );
data->adapter = SDL_Direct3D9GetAdapterIndex( displayIndex );
IDirect3D9_GetDeviceCaps(data->d3d, data->adapter, D3DDEVTYPE_HAL, &caps);
- device_flags = D3DCREATE_FPU_PRESERVE;
- if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
- device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
- } else {
- device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
- }
+ device_flags = D3DCREATE_FPU_PRESERVE;
+ if (caps.DevCaps & D3DDEVCAPS_HWTRANSFORMANDLIGHT) {
+ device_flags |= D3DCREATE_HARDWARE_VERTEXPROCESSING;
+ } else {
+ device_flags |= D3DCREATE_SOFTWARE_VERTEXPROCESSING;
+ }
- hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D_THREADSAFE);
- if (hint && SDL_atoi(hint)) {
- device_flags |= D3DCREATE_MULTITHREADED;
- }
+ hint = SDL_GetHint(SDL_HINT_RENDER_DIRECT3D_THREADSAFE);
+ if (hint && SDL_atoi(hint)) {
+ device_flags |= D3DCREATE_MULTITHREADED;
+ }
result = IDirect3D9_CreateDevice(data->d3d, data->adapter,
D3DDEVTYPE_HAL,
@@ -1033,27 +1033,27 @@ D3D_UpdateTextureYUV(SDL_Renderer * renderer, SDL_Texture * texture,
const Uint8 *Uplane, int Upitch,
const Uint8 *Vplane, int Vpitch)
{
- D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
- SDL_bool full_texture = SDL_FALSE;
+ D3D_TextureData *data = (D3D_TextureData *) texture->driverdata;
+ SDL_bool full_texture = SDL_FALSE;
#ifdef USE_DYNAMIC_TEXTURE
- if (texture->access == SDL_TEXTUREACCESS_STREAMING &&
- rect->x == 0 && rect->y == 0 &&
- rect->w == texture->w && rect->h == texture->h) {
- full_texture = SDL_TRUE;
- }
+ if (texture->access == SDL_TEXTUREACCESS_STREAMING &&
+ rect->x == 0 && rect->y == 0 &&
+ rect->w == texture->w && rect->h == texture->h) {
+ full_texture = SDL_TRUE;
+ }
#endif
- if (D3D_UpdateTextureInternal(data->texture, texture->format, full_texture, rect->x, rect->y, rect->w, rect->h, Yplane, Ypitch) < 0) {
- return -1;
- }
- if (D3D_UpdateTextureInternal(data->utexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Uplane, Upitch) < 0) {
- return -1;
- }
- if (D3D_UpdateTextureInternal(data->vtexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Vplane, Vpitch) < 0) {
- return -1;
- }
- return 0;
+ if (D3D_UpdateTextureInternal(data->texture, texture->format, full_texture, rect->x, rect->y, rect->w, rect->h, Yplane, Ypitch) < 0) {
+ return -1;
+ }
+ if (D3D_UpdateTextureInternal(data->utexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Uplane, Upitch) < 0) {
+ return -1;
+ }
+ if (D3D_UpdateTextureInternal(data->vtexture, texture->format, full_texture, rect->x / 2, rect->y / 2, rect->w / 2, rect->h / 2, Vplane, Vpitch) < 0) {
+ return -1;
+ }
+ return 0;
}
static int
@@ -1894,20 +1894,20 @@ D3D_DestroyRenderer(SDL_Renderer * renderer)
IDirect3DDevice9 *
SDL_RenderGetD3D9Device(SDL_Renderer * renderer)
{
- D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
- IDirect3DDevice9 *device;
-
- // Make sure that this is a D3D renderer
- if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
- SDL_SetError("Renderer is not a D3D renderer");
- return NULL;
- }
-
- device = data->device;
- if (device) {
- IDirect3DDevice9_AddRef( device );
- }
- return device;
+ D3D_RenderData *data = (D3D_RenderData *) renderer->driverdata;
+ IDirect3DDevice9 *device;
+
+ // Make sure that this is a D3D renderer
+ if (renderer->DestroyRenderer != D3D_DestroyRenderer) {
+ SDL_SetError("Renderer is not a D3D renderer");
+ return NULL;
+ }
+
+ device = data->device;
+ if (device) {
+ IDirect3DDevice9_AddRef( device );
+ }
+ return device;
}
#endif /* SDL_VIDEO_RENDER_D3D && !SDL_RENDER_DISABLED */