Haciendo pruebas con el modo de video a pantalla completa
This commit is contained in:
@@ -151,7 +151,7 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
|
|
||||||
windowWidth = gameCanvasWidth;
|
windowWidth = gameCanvasWidth;
|
||||||
windowHeight = gameCanvasHeight;
|
windowHeight = gameCanvasHeight;
|
||||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
dest = {0, 0, windowWidth, windowHeight};
|
||||||
|
|
||||||
// Modifica el tamaño de la ventana
|
// Modifica el tamaño de la ventana
|
||||||
SDL_SetWindowSize(window, windowWidth * options->video.window.size, windowHeight * options->video.window.size);
|
SDL_SetWindowSize(window, windowWidth * options->video.window.size, windowHeight * options->video.window.size);
|
||||||
@@ -168,7 +168,7 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
SDL_ShowCursor(SDL_DISABLE);
|
SDL_ShowCursor(SDL_DISABLE);
|
||||||
|
|
||||||
// Obten el alto y el ancho de la ventana
|
// 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
|
// Aplica el escalado al rectangulo donde se pinta la textura del juego
|
||||||
if (options->video.integerScale)
|
if (options->video.integerScale)
|
||||||
@@ -205,9 +205,8 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dest.w = windowWidth;
|
//dest = {0, 0, windowWidth, windowHeight};
|
||||||
dest.h = windowHeight;
|
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||||
dest.x = dest.y = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -228,7 +227,8 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// El renderizador pasa a tener el tamaño de la pantalla en fullscreen o del juego en modo ventana
|
// 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
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user