src/video/win32/SDL_d3drender.c
changeset 3519 1374f9275de9
parent 3495 1b22878e04d0
child 3520 83518f8fcd61
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 }