-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CWC improvements/fixes #8818
CWC improvements/fixes #8818
Conversation
19c347e
to
17a3a92
Compare
@@ -40,10 +41,69 @@ static bool enableAll = false; | |||
static std::vector<std::string> cheatList; | |||
static CWCheatEngine *cheatEngine2; | |||
static std::deque<bool> bEnableCheat; | |||
std::string gamePath_; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a class member of CwCheatScreen
probably, or otherwise it should be static
.
For non-class members, static
means that other cpp files can't see it (e.g. if two files had std::string gamePath_
in them without static
, they would conflict, or be the same variable.)
-[Unknown]
5a9af62
to
53f3205
Compare
Cool, since with this cheat file creation is handled better passing info from UI - #8448 was also fixed. The only thing it still generates nameless ini file anyway since we generate them on boot as well, I'll just disable it for homebrew. Those files are created when opening cheat menu anyway. |
Invalidate JIT for 0xE/0xD checks And big thanks to [Unknown] for help:3
a9fdd70
to
f853176
Compare
Limit homebrew ini file generation to UI.
I think everything is done here now, or at least I hope so, to sum it up - this now fixes: Potentially Cheat related issues which people report are commonly caused by either:
|
Blah, I thought we generate ID's using filename for homebrew, but we do use filename, just for some reason homebrew like to display a legit ID, except all of them use same one? :C |
I don't know of any reliable way to generate IDs for homebrew, unfortunately. Hashing the executable might come close but the filenames won't exactly be legible. If you want to do something about it before merge, that's fine - I'm happy to merge this as is, too, looks good. |
I'll try to set homebrew through filename as well, just need to test how it works. |
std::vector<std::string> CWCheatEngine::GetCodesList() { //Reads the entire cheat list from the appropriate .ini. | ||
std::vector<std::string> CWCheatEngine::GetCodesList(std::string file) { //Reads the entire cheat list from the appropriate .ini. | ||
if (file.empty()) { | ||
file = activeCheatFile; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I suppose this isn't doing anything since activeCheatFile
is being set otherwise.
-[Unknown]
Yeah, looks okay to me. I think we have similar logic for homebrew savestates. By the way, edited with "fixes ####" so that it auto-closes. -[Unknown] |
Oh yeah, I ended setting it up during cheat file creation and never used that one;c. Thanks for edit as well, I don't know most of git power. |
This solves #8658 althrough I would be lazy to do it just because of the argument mentioned there about someone being lazy to restart emulation when it's required by cheat, my own argument for adding it is for cases where broken cheats crash PPSSPP on boot which might suck on non windows platforms currently.
It additionally fixes a small problem where first line was removed from newly created files, it could remove first cheat if someone opened automatically created file and added cheats without _S/_G lines that we usually add as PSP legacy, but not actually use them.
Also invalidates JIT for reading values via 0xE/0xD multi-line skip codes, in some cases where code is moved around/loaded in modules those codes can't read original values otherwise. I don't think that's particulary common issue since people rarely ever used those cheats that way on psp, I do it all the time since they're great to stop long scripts from being written constantly as well as for safety checks.
Saying so I can't really find any more issues with CWC, people will continue to have problems with PSP cheats where address differs and we can't do much about it, so I guess #7375 could also be closed.
Edit: sorry for pushing it like few times in a row;p I'm quite literally on drugs(well eye drops count as drugs I guess;p) and my vision is quite blurry. Should be fine now.
Fixes #8448, fixes #8658, fixes #8023. Fixes #7375 (remaining jit invalidations.)