comparison src/video/win32/SDL_d3drender.c @ 3519:1374f9275de9

Fixed compiling the D3D renderer
author Sam Lantinga <slouken@libsdl.org>
date Fri, 04 Dec 2009 08:26:32 +0000
parents 1b22878e04d0
children 83518f8fcd61
comparison
equal deleted inserted replaced
3518:abefdc334970 3519:1374f9275de9
389 SDL_zero(pparams); 389 SDL_zero(pparams);
390 pparams.BackBufferWidth = window->w; 390 pparams.BackBufferWidth = window->w;
391 pparams.BackBufferHeight = window->h; 391 pparams.BackBufferHeight = window->h;
392 if (window->flags & SDL_WINDOW_FULLSCREEN) { 392 if (window->flags & SDL_WINDOW_FULLSCREEN) {
393 pparams.BackBufferFormat = 393 pparams.BackBufferFormat =
394 PixelFormatToD3DFMT(display->fullscreen_mode.format); 394 PixelFormatToD3DFMT(window->fullscreen_mode.format);
395 } else { 395 } else {
396 pparams.BackBufferFormat = D3DFMT_UNKNOWN; 396 pparams.BackBufferFormat = D3DFMT_UNKNOWN;
397 } 397 }
398 if (flags & SDL_RENDERER_PRESENTFLIP2) { 398 if (flags & SDL_RENDERER_PRESENTFLIP2) {
399 pparams.BackBufferCount = 2; 399 pparams.BackBufferCount = 2;
409 pparams.SwapEffect = D3DSWAPEFFECT_DISCARD; 409 pparams.SwapEffect = D3DSWAPEFFECT_DISCARD;
410 } 410 }
411 if (window->flags & SDL_WINDOW_FULLSCREEN) { 411 if (window->flags & SDL_WINDOW_FULLSCREEN) {
412 pparams.Windowed = FALSE; 412 pparams.Windowed = FALSE;
413 pparams.FullScreen_RefreshRateInHz = 413 pparams.FullScreen_RefreshRateInHz =
414 display->fullscreen_mode.refresh_rate; 414 window->fullscreen_mode.refresh_rate;
415 } else { 415 } else {
416 pparams.Windowed = TRUE; 416 pparams.Windowed = TRUE;
417 pparams.FullScreen_RefreshRateInHz = 0; 417 pparams.FullScreen_RefreshRateInHz = 0;
418 } 418 }
419 if (flags & SDL_RENDERER_PRESENTVSYNC) { 419 if (flags & SDL_RENDERER_PRESENTVSYNC) {
548 548
549 data->pparams.BackBufferWidth = window->w; 549 data->pparams.BackBufferWidth = window->w;
550 data->pparams.BackBufferHeight = window->h; 550 data->pparams.BackBufferHeight = window->h;
551 if (window->flags & SDL_WINDOW_FULLSCREEN) { 551 if (window->flags & SDL_WINDOW_FULLSCREEN) {
552 data->pparams.BackBufferFormat = 552 data->pparams.BackBufferFormat =
553 PixelFormatToD3DFMT(display->fullscreen_mode.format); 553 PixelFormatToD3DFMT(window->fullscreen_mode.format);
554 } else { 554 } else {
555 data->pparams.BackBufferFormat = D3DFMT_UNKNOWN; 555 data->pparams.BackBufferFormat = D3DFMT_UNKNOWN;
556 } 556 }
557 return D3D_Reset(renderer); 557 return D3D_Reset(renderer);
558 } 558 }