mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-13 13:30:44 +00:00
Warn user if layer config application failed before JDWP failure
This commit is contained in:
committed by
Baldur Karlsson
parent
fa22effc77
commit
b031e69597
@@ -1459,11 +1459,14 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const rdcstr &packageAndActi
|
||||
{
|
||||
info =
|
||||
"Do you have a strange device that requires extra setup?\n"
|
||||
"E.g. Xiaomi requires a developer account and \"USB debugging (Security Settings)\"\n";
|
||||
"E.g. Xiaomi requires a developer account and \"USB debugging (Security Settings)\"";
|
||||
|
||||
RDCERR("Couldn't verify that debug settings are set:\n%s\n%s", inString.c_str(),
|
||||
info.c_str());
|
||||
|
||||
result = RDResult(ResultCode::AndroidLayerConfFailed);
|
||||
result.message = info;
|
||||
|
||||
hookWithJDWP = true;
|
||||
|
||||
// need to tell the hooks to ignore the fact that layers are present because they're not
|
||||
@@ -1601,11 +1604,17 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const rdcstr &packageAndActi
|
||||
{
|
||||
RDCERR("Failed to inject using JDWP");
|
||||
ident = 0;
|
||||
result = RDResult(ResultCode::JDWPFailure);
|
||||
result.message = StringFormat::Fmt(
|
||||
"Failed to inject using JDWP when launching '%s' with activity '%s' and intent args "
|
||||
"'%s'",
|
||||
packageName.c_str(), activityName.c_str(), intentArgs.c_str());
|
||||
|
||||
// If layer configuration failed first, then report that to the user as it is usually easier
|
||||
// to fix
|
||||
if(result.code != ResultCode::AndroidLayerConfFailed)
|
||||
{
|
||||
result = RDResult(ResultCode::JDWPFailure);
|
||||
result.message = StringFormat::Fmt(
|
||||
"Failed to inject using JDWP when launching '%s' with activity '%s' and intent args "
|
||||
"'%s'",
|
||||
packageName.c_str(), activityName.c_str(), intentArgs.c_str());
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +100,8 @@ rdcstr DoStringise(const ResultCode &el)
|
||||
STRINGISE_ENUM_CLASS_NAMED(InvalidParameter,
|
||||
"An invalid parameter was passed to RenderDoc's API");
|
||||
STRINGISE_ENUM_CLASS_NAMED(CompressionFailed, "Compression or decompression failed");
|
||||
STRINGISE_ENUM_CLASS_NAMED(AndroidLayerConfFailed,
|
||||
"Debug layer configuration failed on Android");
|
||||
}
|
||||
END_ENUM_STRINGISE();
|
||||
}
|
||||
|
||||
@@ -4216,6 +4216,10 @@ a remote server.
|
||||
.. data:: CompressionFailed
|
||||
|
||||
Compression or decompression failed.
|
||||
|
||||
.. data:: AndroidLayerConfFailed
|
||||
|
||||
Debug layer configuration failed on Android.
|
||||
)");
|
||||
enum class ResultCode : uint32_t
|
||||
{
|
||||
@@ -4251,6 +4255,7 @@ enum class ResultCode : uint32_t
|
||||
DataNotAvailable,
|
||||
InvalidParameter,
|
||||
CompressionFailed,
|
||||
AndroidLayerConfFailed,
|
||||
};
|
||||
|
||||
DECLARE_REFLECTION_ENUM(ResultCode);
|
||||
|
||||
Reference in New Issue
Block a user