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;
|
||||
windowHeight = gameCanvasHeight;
|
||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||
dest = {0, 0, windowWidth, windowHeight};
|
||||
|
||||
// Modifica el tamaño de la ventana
|
||||
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);
|
||||
|
||||
// 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,9 +205,8 @@ void Screen::setVideoMode(int videoMode)
|
||||
}
|
||||
else
|
||||
{
|
||||
dest.w = windowWidth;
|
||||
dest.h = windowHeight;
|
||||
dest.x = dest.y = 0;
|
||||
//dest = {0, 0, windowWidth, windowHeight};
|
||||
dest = {0, 0, gameCanvasWidth, gameCanvasHeight};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -228,7 +227,8 @@ 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