Add a Skip EFB Access from CPU Hotkey

This commit is contained in:
Losucaru 2020-10-29 21:03:06 -03:00
parent 64f7a4448b
commit 407ef8b596
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);