Make PatchAddEdit complain and not modify entry if fields are invalid instead of just filling in zeros. Fixes issue 4291.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7672 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman committed 2011-07-09 21:00:30 +00:00
1 parent d9ad549349
commit 2b9b4a3306
5 files changed
+68 -11

No files matched your search

+21
View File
@@ -53,6 +53,27 @@ void LoadPatchSection(const char *section, std::vector<Patch> &patches, IniFile
void LoadPatches(const char *gameID);
void ApplyFramePatches();
void ApplyARPatches();
inline int GetPatchTypeCharLength(PatchType type)
{
int size = 8;
switch (type)
{
case PatchEngine::PATCH_8BIT:
size = 2;
break;
case PatchEngine::PATCH_16BIT:
size = 4;
break;
case PatchEngine::PATCH_32BIT:
size = 8;
break;
}
return size;
}
} // namespace
#endif //_PATCHENGINE_H