mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-14 01:59:34 +01:00
Various struct viewer fixes and improvements
- Can't add multiple watches at once from globals - Removing watch incorrectly affects tree state - Fix formatting bitfield enum member with 0 value - Better formatting for non bitfield enums - More accurate setup instructions - Improved UI for setting number of pointer elements - Chunked display for large arrays and pointers
This commit is contained in:
1 parent
41c53bbb7a
commit
bf0b8b59a5
4 files changed
+171
-80
No files matched your search
@@ -18,6 +18,17 @@ static GhidraTypeKind ResolveTypeKind(const std::string& kind) {
|
||||
return UNKNOWN;
|
||||
}
|
||||
|
||||
static bool IsBitfieldEnum(const std::vector<GhidraEnumMember>& enumMembers) {
|
||||
u64 previousValues = 0;
|
||||
for (const auto& member : enumMembers) {
|
||||
if (previousValues & member.value) {
|
||||
return false;
|
||||
}
|
||||
previousValues |= member.value;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
GhidraClient::~GhidraClient() {
|
||||
if (thread_.joinable()) {
|
||||
thread_.join();
|
||||
@@ -131,6 +142,7 @@ bool GhidraClient::FetchTypes() {
|
||||
member.comment = enumEntry.getStringOr("comment", "");
|
||||
type.enumMembers.push_back(member);
|
||||
}
|
||||
type.enumBitfield = IsBitfieldEnum(type.enumMembers);
|
||||
break;
|
||||
}
|
||||
case TYPEDEF:
|
||||
|
||||
Reference in new issue
Block a user