mirror of
https://github.com/amhndu/SimpleNES.git
synced 2024-05-15 19:04:27 -04:00
Fix build error
Signed-off-by: JaySon-Huang <tshent@qq.com>
This commit is contained in:
parent
4b467d200e
commit
10887bdcfe
|
@ -23,6 +23,13 @@ namespace sn
|
|||
JOY1 = 0x4016,
|
||||
JOY2 = 0x4017,
|
||||
};
|
||||
struct IORegistersHasher
|
||||
{
|
||||
std::size_t operator()(sn::IORegisters const & reg) const noexcept
|
||||
{
|
||||
return std::hash<std::uint32_t>{}(reg);
|
||||
}
|
||||
};
|
||||
|
||||
class MainBus
|
||||
{
|
||||
|
@ -39,8 +46,8 @@ namespace sn
|
|||
std::vector<Byte> m_extRAM;
|
||||
Mapper* m_mapper;
|
||||
|
||||
std::unordered_map<IORegisters, std::function<void(Byte)>> m_writeCallbacks;
|
||||
std::unordered_map<IORegisters, std::function<Byte(void)>> m_readCallbacks;;
|
||||
std::unordered_map<IORegisters, std::function<void(Byte)>, IORegistersHasher> m_writeCallbacks;
|
||||
std::unordered_map<IORegisters, std::function<Byte(void)>, IORegistersHasher> m_readCallbacks;;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue