mirror of
https://github.com/Lime3DS/Lime3DS.git
synced 2024-11-27 12:04:16 +01:00
Fix button state not persisting between loads
This commit is contained in:
parent
34af0d3452
commit
19872b599b
@ -30,7 +30,7 @@ SERIALIZE_EXPORT_IMPL(Service::HID::Module)
|
||||
namespace Service::HID {
|
||||
|
||||
template <class Archive>
|
||||
void Module::serialize(Archive& ar, const unsigned int) {
|
||||
void Module::serialize(Archive& ar, const unsigned int file_version) {
|
||||
ar& shared_mem;
|
||||
ar& event_pad_or_touch_1;
|
||||
ar& event_pad_or_touch_2;
|
||||
@ -46,7 +46,9 @@ void Module::serialize(Archive& ar, const unsigned int) {
|
||||
if (Archive::is_loading::value) {
|
||||
LoadInputDevices();
|
||||
}
|
||||
// Pad state not needed as it's always updated
|
||||
if (file_version >= 1) {
|
||||
ar& state.hex;
|
||||
}
|
||||
// Update events are set in the constructor
|
||||
// Devices are set from the implementation (and are stateless afaik)
|
||||
}
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <boost/serialization/version.hpp>
|
||||
#include "common/bit_field.h"
|
||||
#include "common/common_funcs.h"
|
||||
#include "common/common_types.h"
|
||||
@ -348,3 +349,4 @@ void InstallInterfaces(Core::System& system);
|
||||
|
||||
SERVICE_CONSTRUCT(Service::HID::Module)
|
||||
BOOST_CLASS_EXPORT_KEY(Service::HID::Module)
|
||||
BOOST_CLASS_VERSION(Service::HID::Module, 1)
|
||||
|
Loading…
Reference in New Issue
Block a user