PixelEngine: Use a DirectRead for the token.

No need to call a std::function, and a few games poll this value very often.
This commit is contained in:
degasus 2017-01-27 07:43:54 +01:00
parent 017e8050b6
commit ba1decf7bc
1 changed files with 1 additions and 2 deletions

View File

@ -224,8 +224,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
})); }));
// Token register, readonly. // Token register, readonly.
mmio->Register(base | PE_TOKEN_REG, MMIO::ComplexRead<u16>([](u32) { return s_token; }), mmio->Register(base | PE_TOKEN_REG, MMIO::DirectRead<u16>(&s_token), MMIO::InvalidWrite<u16>());
MMIO::InvalidWrite<u16>());
// BBOX registers, readonly and need to update a flag. // BBOX registers, readonly and need to update a flag.
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)