Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #9185 from Losuc/skipEFBaccessHotkey
Add a Skip EFB Access Hotkey
  • Loading branch information
leoetlino committed Nov 19, 2020
2 parents c724447 + 407ef8b commit e3247b5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/Core/HotkeyManager.cpp
Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HotkeyManager.h
Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions Source/Core/DolphinQt/HotkeyScheduler.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit e3247b5

Please sign in to comment.