ja funciona el audio
This commit is contained in:
@@ -18,18 +18,15 @@ bool setOptions(const std::string &var, const std::string &value);
|
||||
// Inicializa las opciones del programa
|
||||
void initOptions()
|
||||
{
|
||||
options.window.caption = "Coffee Crisis Arcade Edition";
|
||||
options.window.zoom = 2;
|
||||
|
||||
// Opciones de video
|
||||
#ifdef ANBERNIC
|
||||
options.video.mode = false;
|
||||
options.video.window.size = 3;
|
||||
#else
|
||||
options.video.fullscreen = false;
|
||||
options.video.window.zoom = 2;
|
||||
#endif
|
||||
options.video.filter = ScreenFilter::NEAREST;
|
||||
options.video.v_sync = true;
|
||||
options.video.integer_scale = true;
|
||||
options.video.shaders = true;
|
||||
options.video.shaders = false;
|
||||
|
||||
// Opciones de audio
|
||||
options.audio.enabled = true;
|
||||
@@ -92,13 +89,12 @@ bool loadOptionsFile(std::string file_path)
|
||||
|
||||
// El fichero no existe
|
||||
else
|
||||
{ // Crea el fichero con los valores por defecto
|
||||
{
|
||||
// Crea el fichero con los valores por defecto
|
||||
saveOptionsFile(file_path);
|
||||
}
|
||||
|
||||
// Normaliza los valores
|
||||
options.video.window.zoom = std::clamp(options.video.window.zoom, 1, 4);
|
||||
|
||||
if (options.game.language != lang::Code::en_UK &&
|
||||
options.game.language != lang::Code::ba_BA &&
|
||||
options.game.language != lang::Code::es_ES)
|
||||
@@ -127,8 +123,8 @@ bool saveOptionsFile(std::string file_path)
|
||||
file << "## video.filter [" << static_cast<int>(ScreenFilter::NEAREST) << ": nearest, " << static_cast<int>(ScreenFilter::LINEAL) << ": lineal]\n";
|
||||
file << "\n";
|
||||
|
||||
file << "window.zoom=" << options.window.zoom << "\n";
|
||||
file << "video.fullscreen=" << boolToString(options.video.fullscreen) << "\n";
|
||||
file << "video.window.size=" << options.video.window.zoom << "\n";
|
||||
file << "video.filter=" << static_cast<int>(options.video.filter) << "\n";
|
||||
file << "video.v_sync=" << boolToString(options.video.v_sync) << "\n";
|
||||
file << "video.integer_scale=" << boolToString(options.video.integer_scale) << "\n";
|
||||
@@ -193,12 +189,12 @@ bool setOptions(const std::string &var, const std::string &value)
|
||||
{
|
||||
options.video.fullscreen = stringToBool(value);
|
||||
}
|
||||
else if (var == "video.window.size")
|
||||
else if (var == "window.zoom")
|
||||
{
|
||||
options.video.window.zoom = std::stoi(value);
|
||||
if ((options.video.window.zoom < 1) || (options.video.window.zoom > 4))
|
||||
options.window.zoom = std::stoi(value);
|
||||
if ((options.window.zoom < 1) || (options.window.zoom > 4))
|
||||
{
|
||||
options.video.window.zoom = 3;
|
||||
options.window.zoom = 3;
|
||||
}
|
||||
}
|
||||
else if (var == "video.filter")
|
||||
|
||||
Reference in New Issue
Block a user