forked from jaildesigner-jailgames/jaildoctors_dilemma
Reparada la clase Screen
This commit is contained in:
@@ -72,7 +72,7 @@ void Screen::blit()
|
|||||||
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
|
SDL_RenderCopy(renderer, gameCanvas, nullptr, &dest);
|
||||||
|
|
||||||
// Dibuja las notificaciones
|
// Dibuja las notificaciones
|
||||||
renderNotifications();
|
//renderNotifications();
|
||||||
|
|
||||||
// Muestra por pantalla el renderizador
|
// Muestra por pantalla el renderizador
|
||||||
SDL_RenderPresent(renderer);
|
SDL_RenderPresent(renderer);
|
||||||
@@ -89,21 +89,21 @@ void Screen::setVideoMode(int videoMode)
|
|||||||
{
|
{
|
||||||
if (options->borderEnabled)
|
if (options->borderEnabled)
|
||||||
{
|
{
|
||||||
windowWidth = (gameCanvasWidth + borderWidth) * options->windowSize;
|
windowWidth = gameCanvasWidth + borderWidth;
|
||||||
windowHeight = (gameCanvasHeight + borderHeight) * options->windowSize;
|
windowHeight = gameCanvasHeight + borderHeight;
|
||||||
dest = {0 + (borderWidth / 2), 0 + (borderHeight / 2), gameCanvasWidth, gameCanvasHeight};
|
dest = {0 + (borderWidth / 2), 0 + (borderHeight / 2), gameCanvasWidth, gameCanvasHeight};
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
windowWidth = gameCanvasWidth * options->windowSize;
|
windowWidth = gameCanvasWidth;
|
||||||
windowHeight = gameCanvasHeight * options->windowSize;
|
windowHeight = gameCanvasHeight;
|
||||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Modifica el tamaño del renderizador y de la ventana
|
// Modifica el tamaño del renderizador y de la ventana
|
||||||
SDL_RenderSetLogicalSize(renderer, gameCanvasWidth, gameCanvasHeight);
|
SDL_RenderSetLogicalSize(renderer, windowWidth, windowHeight);
|
||||||
SDL_SetWindowSize(window, windowWidth, windowHeight);
|
SDL_SetWindowSize(window, windowWidth * options->windowSize, windowHeight * options->windowSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si está activo el modo de pantalla completa añade el borde
|
// Si está activo el modo de pantalla completa añade el borde
|
||||||
|
|||||||
Reference in New Issue
Block a user