summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
diff options
context:
space:
mode:
authorDimitriPilot3 <DimitriPilot3@gmail.com>2011-05-29 13:51:42 +0000
committerDimitriPilot3 <DimitriPilot3@gmail.com>2011-05-29 13:51:42 +0000
commit5224a5a007099d46a0537f4af3098d09d1af9600 (patch)
tree250acd566a0d397ab36d9d5a9c860544c5836727 /Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp
parenta80f8c735ea301e812410bebb0549bf75f81a01d (diff)
Cleaned up, and added some error-checking to the CARCodeAddEdit::SaveCheatData() function which deals with the parsing (and decrypting whenever needed) of lines of codes entered in the Add/Edit AR code dialog.
I believe this makes Dolphin more reliable than GCNcrypt v1.1 which seems to add (prepend) a buggy line when decrypting... - Split lines using SplitString() once more (as done with ' ' and '-' already), instead of relying on find() and substr() and the (size_t)line variable. - Rename some variables, use a for() loop instead of a while() loop. - Apply the StripSpaces() function to each line before attempting to parse them as encrypted/decrypted AR code lines. Without this, lines such as "B1PD-DXRQ-GTRKM " (notice the unexpected space character) would be recognized neither as encrypted nor as decrypted, which could result in badly decrypted codes (a problem I had tried to explain here: http://forums.dolphin-emulator.com/showthread.php?pid=153532#pid153532). - For the sake of error-checking, after pressing OK, throw a warning in the following situations: when a line of code is not in a valid encrypted or decrypted format, and whenever the resulting decrypted code doesn't contain any lines. (did I do any mistakes?) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7569 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/InputCommon/Src/ControllerInterface/ControllerInterface.cpp')
0 files changed, 0 insertions, 0 deletions