mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-01 22:30:42 -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
|
// globals
|
||||||
bool CONFIGURATOR_STANDALONE = false;
|
bool CONFIGURATOR_STANDALONE = false;
|
||||||
|
bool CONFIGURATOR_FORCE_SOFTWARE_RENDER = false;
|
||||||
ConfigType CONFIGURATOR_TYPE = ConfigType::Config;
|
ConfigType CONFIGURATOR_TYPE = ConfigType::Config;
|
||||||
|
|
||||||
Configurator::Configurator() {
|
Configurator::Configurator() {
|
||||||
@@ -26,6 +27,10 @@ namespace cfg {
|
|||||||
// that environments without D3D9 (Wine without dxvk, headless test boxes,
|
// that environments without D3D9 (Wine without dxvk, headless test boxes,
|
||||||
// GPUs whose drivers reject HAL) still get a working configurator.
|
// GPUs whose drivers reject HAL) still get a working configurator.
|
||||||
static bool try_init_d3d9(ConfiguratorWindow &wnd) {
|
static bool try_init_d3d9(ConfiguratorWindow &wnd) {
|
||||||
|
if (cfg::CONFIGURATOR_FORCE_SOFTWARE_RENDER) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (wnd.hWnd == nullptr) {
|
if (wnd.hWnd == nullptr) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace cfg {
|
|||||||
// globals
|
// globals
|
||||||
extern bool CONFIGURATOR_STANDALONE;
|
extern bool CONFIGURATOR_STANDALONE;
|
||||||
extern ConfigType CONFIGURATOR_TYPE;
|
extern ConfigType CONFIGURATOR_TYPE;
|
||||||
|
extern bool CONFIGURATOR_FORCE_SOFTWARE_RENDER;
|
||||||
|
|
||||||
class Configurator {
|
class Configurator {
|
||||||
private:
|
private:
|
||||||
|
|||||||
@@ -1358,6 +1358,10 @@ int main_implementation(int argc, char *argv[]) {
|
|||||||
timeutils::TIMER_HACKS_DISABLE = true;
|
timeutils::TIMER_HACKS_DISABLE = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (options[launcher::Options::CfgForceSoftwareRender].value_bool()) {
|
||||||
|
cfg::CONFIGURATOR_FORCE_SOFTWARE_RENDER = true;
|
||||||
|
}
|
||||||
|
|
||||||
// API debugging
|
// API debugging
|
||||||
if (api_debug && !cfg::CONFIGURATOR_STANDALONE) {
|
if (api_debug && !cfg::CONFIGURATOR_STANDALONE) {
|
||||||
API_CONTROLLER = std::make_unique<api::Controller>(api_port, api_pass, api_pretty);
|
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", ""},
|
{"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) {
|
const std::vector<std::string> &launcher::get_categories(Options::OptionsCategory category) {
|
||||||
|
|||||||
@@ -291,6 +291,7 @@ namespace launcher {
|
|||||||
DisableHighResTimer,
|
DisableHighResTimer,
|
||||||
EnableICMPHook,
|
EnableICMPHook,
|
||||||
AutoElevate,
|
AutoElevate,
|
||||||
|
CfgForceSoftwareRender
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class OptionsCategory {
|
enum class OptionsCategory {
|
||||||
|
|||||||
Reference in New Issue
Block a user