Compare commits
2 Commits
1b160c0584
...
ccfd864eab
| Author | SHA1 | Date | |
|---|---|---|---|
| ccfd864eab | |||
| f5b866b8c5 |
@@ -140,14 +140,23 @@ void Screen::blit()
|
||||
// Establece el modo de video
|
||||
void Screen::setVideoMode(int videoMode)
|
||||
{
|
||||
#ifdef ARCADE
|
||||
videoMode = SCREEN_VIDEO_MODE_WINDOW;
|
||||
#endif
|
||||
|
||||
// Si está activo el modo ventana quita el borde
|
||||
if (videoMode == SCREEN_VIDEO_MODE_WINDOW)
|
||||
{
|
||||
// Aplica el modo de video
|
||||
SDL_SetWindowFullscreen(window, 0);
|
||||
|
||||
#ifdef ARCADE
|
||||
// Oculta el puntero
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
#else
|
||||
// Muestra el puntero
|
||||
SDL_ShowCursor(SDL_ENABLE);
|
||||
#endif
|
||||
|
||||
windowWidth = gameCanvasWidth;
|
||||
windowHeight = gameCanvasHeight;
|
||||
@@ -168,7 +177,7 @@ void Screen::setVideoMode(int videoMode)
|
||||
SDL_ShowCursor(SDL_DISABLE);
|
||||
|
||||
// Obten el alto y el ancho de la ventana
|
||||
//SDL_GetWindowSize(window, &windowWidth, &windowHeight);
|
||||
// SDL_GetWindowSize(window, &windowWidth, &windowHeight);
|
||||
|
||||
// Aplica el escalado al rectangulo donde se pinta la textura del juego
|
||||
if (options->video.integerScale)
|
||||
@@ -205,7 +214,7 @@ void Screen::setVideoMode(int videoMode)
|
||||
}
|
||||
else
|
||||
{
|
||||
//dest = {0, 0, windowWidth, windowHeight};
|
||||
// dest = {0, 0, windowWidth, windowHeight};
|
||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||
}
|
||||
}
|
||||
@@ -227,7 +236,7 @@ void Screen::setVideoMode(int videoMode)
|
||||
else
|
||||
{
|
||||
// El renderizador pasa a tener el tamaño de la pantalla en fullscreen o del juego en modo ventana
|
||||
//SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight);
|
||||
// SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight);
|
||||
SDL_RenderSetLogicalSize(renderer, gameCanvasWidth, gameCanvasHeight);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user