Skip to content

Commit

Permalink
NES.emu updates
Browse files Browse the repository at this point in the history
* Imagine: Add support for different serialized and value types to Property class
* NES.emu: Update core to FCEUX GIT 798c5a1 (2024.03.03), including Mapper 413
* NES.emu: Add console option to use the P2 start button as the Famicom microphone and add a virtual controller preset for it
  • Loading branch information
Robert Broglia committed Mar 4, 2024
1 parent 91e4700 commit 0c46e13
Show file tree
Hide file tree
Showing 35 changed files with 940 additions and 442 deletions.
6 changes: 3 additions & 3 deletions EmuFramework/include/emuframework/Option.hh
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ inline bool readOptionValue(Readable auto &io, T &output)
template<PropertyOption Prop>
inline bool readOptionValue(Readable auto &io, Prop &output)
{
using T = Prop::Type;
using T = Prop::SerializedType;
auto bytesToRead = io.size();
if(bytesToRead != sizeof(T))
{
logMsg("skipping %zu byte option value, expected %zu bytes", bytesToRead, sizeof(T));
return false;
}
return output.set(io.template get<T>());
return output.unserialize(io.template get<T>());
}

template <Container T>
Expand Down Expand Up @@ -176,7 +176,7 @@ inline void writeOptionValueIfNotDefault(Writable auto &io, PropertyOption auto
{
if(p.isDefault())
return;
writeOptionValue(io, p.uid, p.value());
writeOptionValue(io, p.uid, p.serialize());
}

inline void writeStringOptionValueAllowEmpty(Writable auto &io, uint16_t key, std::string_view s)
Expand Down
Loading

0 comments on commit 0c46e13

Please sign in to comment.