diff --git a/src/spice2x/cfg/configurator.cpp b/src/spice2x/cfg/configurator.cpp index d8b9792..549e672 100644 --- a/src/spice2x/cfg/configurator.cpp +++ b/src/spice2x/cfg/configurator.cpp @@ -9,6 +9,7 @@ namespace cfg { // globals bool CONFIGURATOR_STANDALONE = false; + bool CONFIGURATOR_FORCE_SOFTWARE_RENDER = false; ConfigType CONFIGURATOR_TYPE = ConfigType::Config; Configurator::Configurator() { @@ -26,6 +27,10 @@ namespace cfg { // that environments without D3D9 (Wine without dxvk, headless test boxes, // GPUs whose drivers reject HAL) still get a working configurator. static bool try_init_d3d9(ConfiguratorWindow &wnd) { + if (cfg::CONFIGURATOR_FORCE_SOFTWARE_RENDER) { + return false; + } + if (wnd.hWnd == nullptr) { return false; } diff --git a/src/spice2x/cfg/configurator.h b/src/spice2x/cfg/configurator.h index e6ed509..2053dd4 100644 --- a/src/spice2x/cfg/configurator.h +++ b/src/spice2x/cfg/configurator.h @@ -11,6 +11,7 @@ namespace cfg { // globals extern bool CONFIGURATOR_STANDALONE; extern ConfigType CONFIGURATOR_TYPE; + extern bool CONFIGURATOR_FORCE_SOFTWARE_RENDER; class Configurator { private: diff --git a/src/spice2x/launcher/launcher.cpp b/src/spice2x/launcher/launcher.cpp index 633103b..bd066ab 100644 --- a/src/spice2x/launcher/launcher.cpp +++ b/src/spice2x/launcher/launcher.cpp @@ -1358,6 +1358,10 @@ int main_implementation(int argc, char *argv[]) { timeutils::TIMER_HACKS_DISABLE = true; } + if (options[launcher::Options::CfgForceSoftwareRender].value_bool()) { + cfg::CONFIGURATOR_FORCE_SOFTWARE_RENDER = true; + } + // API debugging if (api_debug && !cfg::CONFIGURATOR_STANDALONE) { API_CONTROLLER = std::make_unique(api_port, api_pass, api_pretty); diff --git a/src/spice2x/launcher/options.cpp b/src/spice2x/launcher/options.cpp index 7c94878..13259de 100644 --- a/src/spice2x/launcher/options.cpp +++ b/src/spice2x/launcher/options.cpp @@ -2927,6 +2927,15 @@ static const std::vector OPTION_DEFINITIONS = { {"user", ""}, }, }, + { + // CfgForceSoftwareRender + .title = "Configurator Force Software Rendering", + .name = "forcesoftware", + .desc = "Forces the use of software rendering instead of hardware acceleration for " + "the configurator.", + .type = OptionType::Bool, + .category = "Development", + }, }; const std::vector &launcher::get_categories(Options::OptionsCategory category) { diff --git a/src/spice2x/launcher/options.h b/src/spice2x/launcher/options.h index 6e86c92..c67c326 100644 --- a/src/spice2x/launcher/options.h +++ b/src/spice2x/launcher/options.h @@ -291,6 +291,7 @@ namespace launcher { DisableHighResTimer, EnableICMPHook, AutoElevate, + CfgForceSoftwareRender }; enum class OptionsCategory {