mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-12 03:48:23 -05:00
shared_widget: Refactor helpers
Makes checkbox creation an option as opposed to a label.
This commit is contained in:
@ -165,6 +165,11 @@ void ConfigureGraphics::PopulateVSyncModeSelection() {
|
||||
: vsync_mode_combobox_enum_map[current_index];
|
||||
int index{};
|
||||
const int device{vulkan_device_combobox->currentIndex()}; //< current selected Vulkan device
|
||||
if (device == -1) {
|
||||
// Invalid device
|
||||
return;
|
||||
}
|
||||
|
||||
const auto& present_modes = //< relevant vector of present modes for the selected device or API
|
||||
backend == Settings::RendererBackend::Vulkan ? device_present_modes[device]
|
||||
: default_present_modes;
|
||||
@ -236,11 +241,11 @@ void ConfigureGraphics::Setup() {
|
||||
return new ConfigurationShared::Widget(
|
||||
setting, translations, this, runtime_lock, apply_funcs,
|
||||
ConfigurationShared::RequestType::ReverseSlider, true, 0.5f);
|
||||
} else if (setting->Id() == Settings::values.use_speed_limit.Id()) {
|
||||
} else if (setting->Id() == Settings::values.speed_limit.Id()) {
|
||||
return new ConfigurationShared::Widget(
|
||||
setting, translations, this, runtime_lock, apply_funcs,
|
||||
ConfigurationShared::RequestType::SpinBox, true, 1.0f,
|
||||
&Settings::values.speed_limit, "%");
|
||||
&Settings::values.use_speed_limit, "%");
|
||||
} else {
|
||||
return new ConfigurationShared::Widget(setting, translations, this, runtime_lock,
|
||||
apply_funcs);
|
||||
|
Reference in New Issue
Block a user