mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-31 11:51:04 +00:00
Add configuration system for core renderdoc module
* This allows persistent config storage and registering tweak variables that works independent of the UI's configuration. * Config vars can be debug only, which means they will be compiled out in stable version releases. This allows for debug-logging tweaks that are available in all builds (including nightly builds) for diagnostic purposes, but have zero overhead in stable releases. * Variables have a loose hierarchy defined with _ or . to separate nodes.
This commit is contained in:
@@ -30,10 +30,15 @@
|
||||
#include "common/threading.h"
|
||||
#include "core/core.h"
|
||||
#include "core/remote_server.h"
|
||||
#include "core/settings.h"
|
||||
#include "replay/replay_driver.h"
|
||||
#include "strings/string_utils.h"
|
||||
#include "android_utils.h"
|
||||
|
||||
RDOC_CONFIG(uint32_t, Android_MaxConnectTimeout, 30,
|
||||
"Maximum time in seconds to try connecting to the target app before giving up. "
|
||||
"Useful primarily for apps that take a very long time to start up.");
|
||||
|
||||
namespace Android
|
||||
{
|
||||
void adbForwardPorts(uint16_t portbase, const rdcstr &deviceID, uint16_t jdwpPort, int pid,
|
||||
@@ -1166,10 +1171,7 @@ ExecuteResult AndroidRemoteServer::ExecuteAndInject(const char *a, const char *w
|
||||
|
||||
ret.status = ReplayStatus::InjectionFailed;
|
||||
|
||||
uint32_t elapsed = 0,
|
||||
timeout =
|
||||
1000 *
|
||||
RDCMAX(5, atoi(RenderDoc::Inst().GetConfigSetting("MaxConnectTimeout").c_str()));
|
||||
uint32_t elapsed = 0, timeout = 1000 * RDCMAX(5U, Android_MaxConnectTimeout);
|
||||
while(elapsed < timeout)
|
||||
{
|
||||
// Check if the target app has started yet and we can connect to it.
|
||||
|
||||
Reference in New Issue
Block a user