Merge pull request #9185 from Losuc/skipEFBaccessHotkey

Add a Skip EFB Access Hotkey
This commit is contained in:
Léo Lam 2020-11-19 17:28:45 +01:00 committed by GitHub
commit e3247b567d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 1 deletions

View File

@ -24,7 +24,7 @@
#include "InputCommon/GCPadStatus.h"
// clang-format off
constexpr std::array<const char*, 138> s_hotkey_labels{{
constexpr std::array<const char*, 139> s_hotkey_labels{{
_trans("Open"),
_trans("Change Disc"),
_trans("Eject Disc"),
@ -104,6 +104,7 @@ constexpr std::array<const char*, 138> s_hotkey_labels{{
_trans("Toggle Crop"),
_trans("Toggle Aspect Ratio"),
_trans("Toggle Skip EFB Access"),
_trans("Toggle EFB Copies"),
_trans("Toggle XFB Copies"),
_trans("Toggle XFB Immediate Mode"),

View File

@ -90,6 +90,7 @@ enum Hotkey
HK_TOGGLE_CROP,
HK_TOGGLE_AR,
HK_TOGGLE_SKIP_EFB_ACCESS,
HK_TOGGLE_EFBCOPIES,
HK_TOGGLE_XFBCOPIES,
HK_TOGGLE_IMMEDIATE_XFB,

View File

@ -391,6 +391,15 @@ void HotkeyScheduler::Run()
break;
}
}
if (IsHotkey(HK_TOGGLE_SKIP_EFB_ACCESS))
{
const bool new_value = !Config::Get(Config::GFX_HACK_EFB_ACCESS_ENABLE);
Config::SetCurrent(Config::GFX_HACK_EFB_ACCESS_ENABLE, new_value);
OSD::AddMessage(
StringFromFormat("%s EFB Access from CPU", new_value ? "Skip" : "Don't skip"));
}
if (IsHotkey(HK_TOGGLE_EFBCOPIES))
{
const bool new_value = !Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM);