| 399 | } |
| 400 | |
| 401 | void cWindow::RenderShrunk( cSurface* pImage ) { |
| 402 | SDL_Rect Src, Dest; |
| 403 | Src.w = (int) pImage->GetWidth(); |
| 404 | Src.h = (int) pImage->GetHeight(); |
| 405 | Src.x = 0; |
| 406 | Src.y = 0; |
| 407 | |
| 408 | Dest.w = GetWindowSize().mWidth; |
| 409 | Dest.h = GetWindowSize().mHeight; |
| 410 | |
| 411 | if (mWindowMode) { |
| 412 | Dest.x = 0; |
| 413 | Dest.y = 0; |
| 414 | } |
| 415 | else { |
| 416 | SDL_DisplayMode current; |
| 417 | SDL_GetCurrentDisplayMode(0, ¤t); |
| 418 | |
| 419 | Dest.x = (current.w - Dest.w) / 2; |
| 420 | Dest.y = (current.h - Dest.h) / 2; |
| 421 | } |
| 422 | |
| 423 | SDL_RenderCopy( mRenderer, pImage->GetTexture(), &Src, &Dest); |
| 424 | } |
| 425 | |
| 426 | void cWindow::SetCursor() { |
| 427 |
no test coverage detected