Cambiado el modo de fullscreen a SDL_WINDOW_FULLSCREEN_DESKTOP (como estaba en el CC original)

This commit is contained in:
2024-08-27 09:37:16 +02:00
parent 49cffb3669
commit 7a3c2ffe71
4 changed files with 21 additions and 46 deletions

View File

@@ -458,7 +458,7 @@ void Director::initOptions()
// Opciones de video
options->video.mode = 0;
options->video.window.size = 3;
options->video.filter = FILTER_NEAREST;
options->video.filter = SCREEN_FILTER_NEAREST;
options->video.vSync = true;
options->video.integerScale = true;
options->video.keepAspect = true;
@@ -633,7 +633,7 @@ bool Director::loadConfigFile()
const bool c = options->video.mode == SDL_WINDOW_FULLSCREEN_DESKTOP;
if (!(a || b || c))
{
options->video.mode = 0;
options->video.mode = SCREEN_VIDEO_MODE_WINDOW;
}
if (options->video.window.size < 1 || options->video.window.size > 4)
@@ -675,19 +675,19 @@ bool Director::saveConfigFile()
file << "## video.filter [0: nearest, 1: lineal]\n";
file << "\n";
if (options->video.mode == VIDEO_MODE_WINDOW)
if (options->video.mode == SCREEN_VIDEO_MODE_WINDOW)
{
file << "video.mode=0\n";
}
else if (options->video.mode == VIDEO_MODE_FULLSCREEN)
else if (options->video.mode == SCREEN_VIDEO_MODE_FULLSCREEN)
{
file << "video.mode=1\n";
}
file << "video.window.size=" + std::to_string(options->video.window.size) + "\n";
options->video.filter == FILTER_NEAREST ? file << "video.filter=0\n" : file << "video.filter=1\n";
options->video.filter == SCREEN_FILTER_NEAREST ? file << "video.filter=0\n" : file << "video.filter=1\n";
file << "video.shaders=" + boolToString(options->video.shaders) + "\n";
file << "video.vSync=" + boolToString(options->video.vSync) + "\n";
@@ -937,14 +937,7 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
// Opciones de video
if (var == "video.mode")
{
if (value == "0")
{
options->video.mode = VIDEO_MODE_WINDOW;
}
else
{
options->video.mode = VIDEO_MODE_FULLSCREEN;
}
options->video.mode = value == std::to_string(SCREEN_VIDEO_MODE_WINDOW) ? SCREEN_VIDEO_MODE_WINDOW : SCREEN_VIDEO_MODE_FULLSCREEN;
}
else if (var == "video.window.size")
@@ -958,14 +951,7 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
else if (var == "video.filter")
{
if (value == "0")
{
options->video.filter = FILTER_NEAREST;
}
else
{
options->video.filter = FILTER_LINEAL;
}
options->video.filter = value == std::to_string(SCREEN_FILTER_NEAREST) ? SCREEN_FILTER_NEAREST : SCREEN_FILTER_LINEAL;
}
else if (var == "video.shaders")
@@ -1022,14 +1008,7 @@ bool Director::setOptions(options_t *options, std::string var, std::string value
else if (var == "notification.posV")
{
if (value == "pos_top")
{
options->notification.posV = pos_top;
}
else
{
options->notification.posV = pos_bottom;
}
options->notification.posV = value == "pos_top" ? pos_top : pos_bottom;
}
else if (var == "notification.sound")