mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Boot: Move StateFlags from Boot_WiiWAD to Boot
It's not specific to WADs. The BS2 emulation boot code will also need to update the state file. Move the struct to Boot and add a helper function that will handle reading + computing the checksum + writing the state file.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdlib>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
@ -128,3 +129,18 @@ public:
|
||||
protected:
|
||||
std::vector<u8> m_bytes;
|
||||
};
|
||||
|
||||
struct StateFlags
|
||||
{
|
||||
void UpdateChecksum();
|
||||
u32 checksum;
|
||||
u8 flags;
|
||||
u8 type;
|
||||
u8 discstate;
|
||||
u8 returnto;
|
||||
u32 unknown[6];
|
||||
};
|
||||
|
||||
// Reads the state file from the NAND, then calls the passed update function to update the struct,
|
||||
// and finally writes the updated state file to the NAND.
|
||||
void UpdateStateFlags(std::function<void(StateFlags*)> update_function);
|
||||
|
Reference in New Issue
Block a user