Canviades certes opcions a parametres i afegides noves opcions
This commit is contained in:
@@ -243,7 +243,7 @@ void Director::initJailAudio()
|
||||
bool Director::initSDL()
|
||||
{
|
||||
// Indicador de éxito
|
||||
bool success = true;
|
||||
auto success = true;
|
||||
|
||||
// Inicializa SDL
|
||||
if (SDL_Init(SDL_INIT_EVERYTHING) < 0)
|
||||
@@ -291,7 +291,7 @@ bool Director::initSDL()
|
||||
#endif // NO_SHADERS
|
||||
// Crea la ventana
|
||||
window = SDL_CreateWindow(WINDOW_CAPTION, SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, param.game.width * options.video.window.size, param.game.height * options.video.window.size, SDL_WINDOW_HIDDEN);
|
||||
if (window == nullptr)
|
||||
if (!window)
|
||||
{
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Window could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
|
||||
@@ -312,7 +312,7 @@ bool Director::initSDL()
|
||||
#endif
|
||||
renderer = SDL_CreateRenderer(window, -1, flags);
|
||||
|
||||
if (renderer == nullptr)
|
||||
if (!renderer)
|
||||
{
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Renderer could not be created!\nSDL Error: " << SDL_GetError() << std::endl;
|
||||
@@ -326,7 +326,7 @@ bool Director::initSDL()
|
||||
|
||||
// Establece el tamaño del buffer de renderizado
|
||||
SDL_RenderSetLogicalSize(renderer, param.game.width, param.game.height);
|
||||
SDL_RenderSetIntegerScale(renderer, SDL_TRUE);
|
||||
SDL_RenderSetIntegerScale(renderer, static_cast<SDL_bool>(options.video.integer_scale));
|
||||
|
||||
// Establece el modo de mezcla
|
||||
SDL_SetRenderDrawBlendMode(renderer, SDL_BLENDMODE_BLEND);
|
||||
@@ -520,7 +520,7 @@ void Director::createSystemFolder(std::string folder)
|
||||
#elif __linux__
|
||||
struct passwd *pw = getpwuid(getuid());
|
||||
const char *homedir = pw->pw_dir;
|
||||
systemFolder = std::string(homedir) + "/." + folder;
|
||||
systemFolder = std::string(homedir) + "/.config/" + folder;
|
||||
#endif
|
||||
|
||||
struct stat st = {0};
|
||||
|
||||
Reference in New Issue
Block a user