some more formatting fixes and proper rename
This commit is contained in:
parent
69f5df40f9
commit
d194ca58c4
5 changed files with 7 additions and 6 deletions
|
@ -257,7 +257,7 @@ void RestoreGlobalState(bool is_powered_on) {
|
|||
|
||||
// this function only makes sense with integrated devices
|
||||
|
||||
u64 RamPercentToBytes(u8 percent) {
|
||||
u64 RamPercentageToBytes(u8 percent) {
|
||||
// total RAM in bytes
|
||||
u64 total_ram = Common::GetMemInfo().TotalPhysicalMemory;
|
||||
|
||||
|
|
|
@ -615,6 +615,6 @@ void UpdateRescalingInfo();
|
|||
// Restore the global state of all applicable settings in the Values struct
|
||||
void RestoreGlobalState(bool is_powered_on);
|
||||
|
||||
u64 RamPercentToBytes(u8 percent);
|
||||
u64 RamPercentageToBytes(u8 percent);
|
||||
|
||||
} // namespace Settings
|
||||
|
|
|
@ -292,7 +292,7 @@ u64 Device::GetTotalDedicatedVideoMemory() const {
|
|||
|
||||
if (Settings::values.use_vram_percentage.GetValue()) {
|
||||
u8 percent = Settings::values.vram_percentage.GetValue();
|
||||
return Settings::RamPercentToBytes(percent);
|
||||
return Settings::RamPercentageToBytes(percent);
|
||||
} else {
|
||||
// this is according to both former settings in the gl_buffer_cache
|
||||
// and gl_texture_cache, regarding device_access_memory
|
||||
|
|
|
@ -1042,7 +1042,7 @@ void Device::CollectPhysicalMemoryInfo() {
|
|||
const u8 percent = Settings::values.vram_percentage.GetValue();
|
||||
const s64 available_memory = static_cast<s64>(device_access_memory - device_initial_usage);
|
||||
const s64 limit = Settings::values.use_vram_percentage.GetValue()
|
||||
? Settings::RamPercentToBytes(percent)
|
||||
? Settings::RamPercentageToBytes(percent)
|
||||
: 4_GiB;
|
||||
device_access_memory = static_cast<u64>(std::max<s64>(
|
||||
std::min<s64>(available_memory - 8_GiB, 4_GiB), std::min<s64>(local_memory, limit)));
|
||||
|
|
|
@ -180,8 +180,9 @@ void ConfigureGraphicsAdvanced::SetupPerGameUI() {
|
|||
ui->use_vram_percentage, Settings::values.use_vram_percentage, use_vram_percentage);
|
||||
|
||||
connect(ui->use_vram_percentage, &QCheckBox::clicked, ui->vram_percentage, [this]() {
|
||||
ui->vram_percentage->setEnabled(ui->use_vram_percentage->isChecked() &&
|
||||
(use_vram_percentage != ConfigurationShared::CheckState::Global));
|
||||
ui->vram_percentage->setEnabled(
|
||||
ui->use_vram_percentage->isChecked() &&
|
||||
(use_vram_percentage != ConfigurationShared::CheckState::Global));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue