loveplus: add printer options (#325)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Add the same options as SDVX printer.

## Testing
Tested all options with LP.
This commit is contained in:
bicarus-dev
2025-05-09 09:48:00 -07:00
committed by GitHub
parent 257afe0cd3
commit 66b3de8e5c
4 changed files with 73 additions and 5 deletions
+1 -1
View File
@@ -294,7 +294,7 @@ namespace games::shared {
// error
if (!clear) {
log_fatal("sdvx", "could not find path");
log_fatal("printer", "could not find path");
}
return "DUMMY";
+23 -2
View File
@@ -662,21 +662,42 @@ int main_implementation(int argc, char *argv[]) {
if (options[launcher::Options::SDVXPrinterEmulation].value_bool()) {
attach_cpusbxpkm_printer = true;
}
if (options[launcher::Options::SDVXPrinterOutputOverwrite].value_bool()) {
// printer overwrite
if (options[launcher::Options::SDVXPrinterOutputOverwrite].value_bool() ||
options[launcher::Options::LovePlusPrinterOutputOverwrite].value_bool()) {
games::shared::PRINTER_OVERWRITE_FILE = true;
}
// printer output path
for (auto &path : options[launcher::Options::SDVXPrinterOutputPath].values_text()) {
games::shared::PRINTER_PATH.push_back(path);
}
for (auto &path : options[launcher::Options::LovePlusPrinterOutputPath].values_text()) {
games::shared::PRINTER_PATH.push_back(path);
}
// printer file format
for (auto &path : options[launcher::Options::SDVXPrinterOutputFormat].values_text()) {
games::shared::PRINTER_FORMAT.push_back(path);
}
for (auto &path : options[launcher::Options::LovePlusPrinterOutputFormat].values_text()) {
games::shared::PRINTER_FORMAT.push_back(path);
}
// printer JPG quality
if (options[launcher::Options::SDVXPrinterJPGQuality].is_active()) {
games::shared::PRINTER_JPG_QUALITY = options[launcher::Options::SDVXPrinterJPGQuality].value_uint32();
} else if (options[launcher::Options::LovePlusPrinterJPGQuality].is_active()) {
games::shared::PRINTER_JPG_QUALITY = options[launcher::Options::LovePlusPrinterJPGQuality].value_uint32();
}
if (options[launcher::Options::SDVXPrinterOutputClear].value_bool()) {
// printer output clear
if (options[launcher::Options::SDVXPrinterOutputClear].value_bool() ||
options[launcher::Options::LovePlusPrinterOutputClear].value_bool()) {
games::shared::PRINTER_CLEAR = true;
}
if (options[launcher::Options::HTTP11].is_active()) {
avs::ea3::HTTP11 = options[launcher::Options::HTTP11].value_uint32();
}
+44 -2
View File
@@ -694,7 +694,7 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
{
.title = "SDVX Printer Output Format",
.name = "printerformat",
.desc = "Path to folder where images will be stored",
.desc = "File format for printer output",
.type = OptionType::Text,
.setting_name = "(png/bmp/tga/jpg)",
.game_name = "Sound Voltex",
@@ -2258,7 +2258,49 @@ static const std::vector<OptionDefinition> OPTION_DEFINITIONS = {
.type = OptionType::Bool,
.game_name = "LovePlus",
.category = "Game Options",
}
},
{
.title = "LovePlus Printer Output Path",
.name = "lpprinterpath",
.desc = "Path to folder where images will be stored",
.type = OptionType::Text,
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
},
{
.title = "LovePlus Printer Output Clear",
.name = "lpprinterclear",
.desc = "Clean up saved images in the output directory on startup",
.type = OptionType::Bool,
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
},
{
.title = "LovePlus Printer Output Overwrite",
.name = "lpprinteroverwrite",
.desc = "Always overwrite the same file in output directory",
.type = OptionType::Bool,
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
},
{
.title = "LovePlus Printer Output Format",
.name = "lpprinterformat",
.desc = "File format for printer output",
.type = OptionType::Text,
.setting_name = "(png/bmp/tga/jpg)",
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
},
{
.title = "LovePlus Printer JPG Quality",
.name = "lpprinterjpgquality",
.desc = "Quality setting in percent if JPG format is used",
.type = OptionType::Integer,
.setting_name = "(0-100)",
.game_name = "LovePlus",
.category = "Game Options (Advanced)",
},
};
const std::vector<std::string> &launcher::get_categories(Options::OptionsCategory category) {
+5
View File
@@ -241,6 +241,11 @@ namespace launcher {
SDVXWindowedSubscreenBorderless,
SDVXWindowedSubscreenAlwaysOnTop,
LovePlusCamEnable,
LovePlusPrinterOutputPath,
LovePlusPrinterOutputClear,
LovePlusPrinterOutputOverwrite,
LovePlusPrinterOutputFormat,
LovePlusPrinterJPGQuality,
};
enum class OptionsCategory {