dolphin/Source/Core/DolphinWX
DimitriPilot3 5224a5a007 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
2011-05-29 13:51:42 +00:00
..
resources Merge UI related projects into the main DolphinWX project. 2011-02-11 21:37:52 +00:00
Src 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. 2011-05-29 13:51:42 +00:00
CMakeLists.txt Add graphics FIFO recorder and player for debugging the graphics system. 2011-03-27 02:55:08 +00:00
Dolphin.vcxproj - Removed RTTI support 2011-03-28 11:34:27 +00:00
Dolphin.vcxproj.filters Add graphics FIFO recorder and player for debugging the graphics system. 2011-03-27 02:55:08 +00:00
Dolphin.vcxproj.user vs2010: make -d be passed to debugfast builds launched from vs 2011-02-25 04:00:16 +00:00
DolphinWX.rc Hg: 2010-06-09 01:37:08 +00:00
resource.h set svn:eol-style=native for **.h 2008-12-08 04:46:09 +00:00
SConscript Fix scons build. 2011-03-27 09:28:51 +00:00