Merge pull request #13168 from Dentomologist/generalwidget_recommend_default_video_backend
Generalwidget: Recommend default video backend
This commit is contained in:
commit
6a59e83bbb
|
@ -302,7 +302,7 @@ public final class NativeLibrary
|
||||||
|
|
||||||
public static native int DefaultCPUCore();
|
public static native int DefaultCPUCore();
|
||||||
|
|
||||||
public static native String GetDefaultGraphicsBackendName();
|
public static native String GetDefaultGraphicsBackendConfigName();
|
||||||
|
|
||||||
public static native int GetMaxLogLevel();
|
public static native int GetMaxLogLevel();
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ enum class StringSetting(
|
||||||
Settings.FILE_DOLPHIN,
|
Settings.FILE_DOLPHIN,
|
||||||
Settings.SECTION_INI_CORE,
|
Settings.SECTION_INI_CORE,
|
||||||
"GFXBackend",
|
"GFXBackend",
|
||||||
NativeLibrary.GetDefaultGraphicsBackendName()
|
NativeLibrary.GetDefaultGraphicsBackendConfigName()
|
||||||
),
|
),
|
||||||
MAIN_DUMP_PATH(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GENERAL, "DumpPath", ""),
|
MAIN_DUMP_PATH(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GENERAL, "DumpPath", ""),
|
||||||
MAIN_LOAD_PATH(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GENERAL, "LoadPath", ""),
|
MAIN_LOAD_PATH(Settings.FILE_DOLPHIN, Settings.SECTION_INI_GENERAL, "LoadPath", ""),
|
||||||
|
|
|
@ -408,9 +408,10 @@ JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_DefaultCPUCo
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jstring JNICALL
|
JNIEXPORT jstring JNICALL
|
||||||
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDefaultGraphicsBackendName(JNIEnv* env, jclass)
|
Java_org_dolphinemu_dolphinemu_NativeLibrary_GetDefaultGraphicsBackendConfigName(JNIEnv* env,
|
||||||
|
jclass)
|
||||||
{
|
{
|
||||||
return ToJString(env, VideoBackendBase::GetDefaultBackendName());
|
return ToJString(env, VideoBackendBase::GetDefaultBackendConfigName());
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetMaxLogLevel(JNIEnv*, jclass)
|
JNIEXPORT jint JNICALL Java_org_dolphinemu_dolphinemu_NativeLibrary_GetMaxLogLevel(JNIEnv*, jclass)
|
||||||
|
|
|
@ -212,7 +212,7 @@ const Info<bool> MAIN_RAM_OVERRIDE_ENABLE{{System::Main, "Core", "RAMOverrideEna
|
||||||
const Info<u32> MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL};
|
const Info<u32> MAIN_MEM1_SIZE{{System::Main, "Core", "MEM1Size"}, Memory::MEM1_SIZE_RETAIL};
|
||||||
const Info<u32> MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL};
|
const Info<u32> MAIN_MEM2_SIZE{{System::Main, "Core", "MEM2Size"}, Memory::MEM2_SIZE_RETAIL};
|
||||||
const Info<std::string> MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"},
|
const Info<std::string> MAIN_GFX_BACKEND{{System::Main, "Core", "GFXBackend"},
|
||||||
VideoBackendBase::GetDefaultBackendName()};
|
VideoBackendBase::GetDefaultBackendConfigName()};
|
||||||
const Info<HSP::HSPDeviceType> MAIN_HSP_DEVICE{{System::Main, "Core", "HSPDevice"},
|
const Info<HSP::HSPDeviceType> MAIN_HSP_DEVICE{{System::Main, "Core", "HSPDevice"},
|
||||||
HSP::HSPDeviceType::None};
|
HSP::HSPDeviceType::None};
|
||||||
const Info<u32> MAIN_ARAM_EXPANSION_SIZE{{System::Main, "Core", "ARAMExpansionSize"}, 0x400000};
|
const Info<u32> MAIN_ARAM_EXPANSION_SIZE{{System::Main, "Core", "ARAMExpansionSize"}, 0x400000};
|
||||||
|
|
|
@ -239,7 +239,7 @@ void GeneralWidget::AddDescriptions()
|
||||||
"recommended. Different games and different GPUs will behave differently on each "
|
"recommended. Different games and different GPUs will behave differently on each "
|
||||||
"backend, so for the best emulation experience it is recommended to try each and "
|
"backend, so for the best emulation experience it is recommended to try each and "
|
||||||
"select the backend that is least problematic.<br><br><dolphin_emphasis>If unsure, "
|
"select the backend that is least problematic.<br><br><dolphin_emphasis>If unsure, "
|
||||||
"select OpenGL.</dolphin_emphasis>");
|
"select %1.</dolphin_emphasis>");
|
||||||
static const char TR_FULLSCREEN_DESCRIPTION[] =
|
static const char TR_FULLSCREEN_DESCRIPTION[] =
|
||||||
QT_TR_NOOP("Uses the entire screen for rendering.<br><br>If disabled, a "
|
QT_TR_NOOP("Uses the entire screen for rendering.<br><br>If disabled, a "
|
||||||
"render window will be created instead.<br><br><dolphin_emphasis>If "
|
"render window will be created instead.<br><br><dolphin_emphasis>If "
|
||||||
|
@ -311,7 +311,9 @@ void GeneralWidget::AddDescriptions()
|
||||||
"unsure, leave this unchecked.</dolphin_emphasis>");
|
"unsure, leave this unchecked.</dolphin_emphasis>");
|
||||||
|
|
||||||
m_backend_combo->SetTitle(tr("Backend"));
|
m_backend_combo->SetTitle(tr("Backend"));
|
||||||
m_backend_combo->SetDescription(tr(TR_BACKEND_DESCRIPTION));
|
m_backend_combo->SetDescription(
|
||||||
|
tr(TR_BACKEND_DESCRIPTION)
|
||||||
|
.arg(QString::fromStdString(VideoBackendBase::GetDefaultBackendDisplayName())));
|
||||||
|
|
||||||
m_adapter_combo->SetTitle(tr("Adapter"));
|
m_adapter_combo->SetTitle(tr("Adapter"));
|
||||||
|
|
||||||
|
|
|
@ -222,12 +222,18 @@ static VideoBackendBase* GetDefaultVideoBackend()
|
||||||
return backends.front().get();
|
return backends.front().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string VideoBackendBase::GetDefaultBackendName()
|
std::string VideoBackendBase::GetDefaultBackendConfigName()
|
||||||
{
|
{
|
||||||
auto* default_backend = GetDefaultVideoBackend();
|
auto* default_backend = GetDefaultVideoBackend();
|
||||||
return default_backend ? default_backend->GetName() : "";
|
return default_backend ? default_backend->GetName() : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string VideoBackendBase::GetDefaultBackendDisplayName()
|
||||||
|
{
|
||||||
|
auto* const default_backend = GetDefaultVideoBackend();
|
||||||
|
return default_backend ? default_backend->GetDisplayName() : "";
|
||||||
|
}
|
||||||
|
|
||||||
const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvailableBackends()
|
const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvailableBackends()
|
||||||
{
|
{
|
||||||
static auto s_available_backends = [] {
|
static auto s_available_backends = [] {
|
||||||
|
|
|
@ -64,7 +64,8 @@ public:
|
||||||
u32 Video_GetQueryResult(PerfQueryType type);
|
u32 Video_GetQueryResult(PerfQueryType type);
|
||||||
u16 Video_GetBoundingBox(int index);
|
u16 Video_GetBoundingBox(int index);
|
||||||
|
|
||||||
static std::string GetDefaultBackendName();
|
static std::string GetDefaultBackendConfigName();
|
||||||
|
static std::string GetDefaultBackendDisplayName();
|
||||||
static const std::vector<std::unique_ptr<VideoBackendBase>>& GetAvailableBackends();
|
static const std::vector<std::unique_ptr<VideoBackendBase>>& GetAvailableBackends();
|
||||||
static void ActivateBackend(const std::string& name);
|
static void ActivateBackend(const std::string& name);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue