This repository has been archived by the owner on Mar 18, 2023. It is now read-only.
Add support for read-only and read-write databases. #14
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Originally the path to a single read/write database was set with the "database" setting. If a game, cheat, or code line was created, modified, or deleted, the entire database was rewritten. Now there can be a read-only database in addition to a read/write one, specified by the "databaseReadOnly" and "databaseReadWrite" settings, respectively. If a game, cheat, or code line is created, modified, or deleted, it is written to the read/write database rather than rewriting the whole database. The read-only database won't be written to by CheatDevice. Loading works, still need to implement saving only modified games/cheats to the read/write database.
Add preliminary menu awareness for read/write vs. read-only games. Idealy if a read-only game is currently highlighted in the mnu, the context menu will only have the "Add Game" and "Cancel" options. The context menus for cheats and code lines of read-only games would behave similarly.
If a cheat is read-only, its title and code lines cannot be modified. If a game is read-only, its title and read-only cheats cannot be modified. You can, however, add additional cheats.
If a game only has read-only cheats, its game title won't be written. Draw progress bar less often.
Fix "(null)" from being written by fprintf() when a database path is NULL.
Use lookup-table to decode hex string. It seems to be a little faster than before.
…aded, add the new cheats to the existing game. Otherwise, create a new game.
This format has been made obsolete by zipped txt files.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Originally the path to a single read/write database was set with the
database
setting inCheatDevicePS2.ini
. If a game, cheat, or code line was created, modified, or deleted in Cheat Device, the entire database needed to be rewritten.Now there can be a read-only database in addition to a read/write one, specified by the
databaseReadOnly
anddatabaseReadWrite
settings, respectively. Cheats and codelines from the read-only database cannot be modified after being loaded. Games from the read-only database cannot be deleted or renamed either, but additional cheats can be added.Any changes made to the in-memory database will be written to the read/write database rather than rewriting the whole database, as was the old behavior. The read-only database won't be written to by Cheat Device; it is designed to be managed outside of Cheat Device.