mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 14:50:41 -07:00
overlay: option to force software renderer in configurator (#721)
## Link to GitHub Issue or related Pull Request, if one exists chicken bit for #720
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace cfg {
|
||||
// globals
|
||||
extern bool CONFIGURATOR_STANDALONE;
|
||||
extern ConfigType CONFIGURATOR_TYPE;
|
||||
extern bool CONFIGURATOR_FORCE_SOFTWARE_RENDER;
|
||||
|
||||
class Configurator {
|
||||
private:
|
||||
|
||||
@@ -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::Controller>(api_port, api_pass, api_pretty);
|
||||
|
||||
@@ -2927,6 +2927,15 @@ static const std::vector<OptionDefinition> 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<std::string> &launcher::get_categories(Options::OptionsCategory category) {
|
||||
|
||||
@@ -291,6 +291,7 @@ namespace launcher {
|
||||
DisableHighResTimer,
|
||||
EnableICMPHook,
|
||||
AutoElevate,
|
||||
CfgForceSoftwareRender
|
||||
};
|
||||
|
||||
enum class OptionsCategory {
|
||||
|
||||
Reference in New Issue
Block a user