mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-27 23:34:57 -04:00
pview: Add -S
flag to connect to pstats right away
This commit is contained in:
parent
581f374ba6
commit
0c4fe35a5c
@ -355,7 +355,7 @@ main(int argc, char **argv) {
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
static const char *optflags = "acls:DVhiLP:";
|
||||
static const char *optflags = "acls:DVhiLP:S";
|
||||
int flag = getopt(argc, argv, optflags);
|
||||
|
||||
while (flag != EOF) {
|
||||
@ -399,6 +399,14 @@ main(int argc, char **argv) {
|
||||
break;
|
||||
}
|
||||
|
||||
case 'S':
|
||||
if (!PStatClient::connect()) {
|
||||
cerr << "Failed to connect to PStats server." << endl;
|
||||
return 1;
|
||||
}
|
||||
PStatClient::main_tick();
|
||||
break;
|
||||
|
||||
case 'V':
|
||||
report_version();
|
||||
return 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user