From ba1decf7bc84d63fa148b0c4e5b930c3c6a7c53f Mon Sep 17 00:00:00 2001 From: degasus Date: Fri, 27 Jan 2017 07:43:54 +0100 Subject: [PATCH] PixelEngine: Use a DirectRead for the token. No need to call a std::function, and a few games poll this value very often. --- Source/Core/VideoCommon/PixelEngine.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/PixelEngine.cpp b/Source/Core/VideoCommon/PixelEngine.cpp index 8a29f152e9..9c4282170b 100644 --- a/Source/Core/VideoCommon/PixelEngine.cpp +++ b/Source/Core/VideoCommon/PixelEngine.cpp @@ -224,8 +224,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base) })); // Token register, readonly. - mmio->Register(base | PE_TOKEN_REG, MMIO::ComplexRead([](u32) { return s_token; }), - MMIO::InvalidWrite()); + mmio->Register(base | PE_TOKEN_REG, MMIO::DirectRead(&s_token), MMIO::InvalidWrite()); // BBOX registers, readonly and need to update a flag. for (int i = 0; i < 4; ++i)