File tree 3 files changed +20
-1
lines changed
3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,16 @@ MetaData getMetaData(){
120
120
return meta ;
121
121
}
122
122
123
+ bool getIsProgramOpen (u64 id )
124
+ {
125
+ u64 pid = 0 ;
126
+ Result rc = pmdmntGetProcessId (& pid , id );
127
+ if (pid == 0 || R_FAILED (rc ))
128
+ return false;
129
+
130
+ return true;
131
+ }
132
+
123
133
void initController ()
124
134
{
125
135
if (bControllerIsInitialised ) return ;
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ u64 getHeapBase(Handle handle);
44
44
u64 getTitleId (u64 pid );
45
45
void getBuildID (MetaData * meta , u64 pid );
46
46
MetaData getMetaData (void );
47
+ bool getIsProgramOpen (u64 id );
47
48
48
49
void poke (u64 offset , u64 size , u8 * val );
49
50
void writeMem (u64 offset , u64 size , u8 * val );
Original file line number Diff line number Diff line change @@ -453,6 +453,14 @@ int argmain(int argc, char **argv)
453
453
printf ("%016lX\n" , meta .heap_base );
454
454
}
455
455
456
+ if (!strcmp (argv [0 ], "isProgramRunning" )){
457
+ if (argc != 2 )
458
+ return 0 ;
459
+ u64 programId = parseStringToInt (argv [1 ]);
460
+ bool isRunning = getIsProgramOpen (programId );
461
+ printf ("%d\n" , isRunning );
462
+ }
463
+
456
464
if (!strcmp (argv [0 ], "pixelPeek" )){
457
465
//errors with 0x668CE, unless debugunit flag is patched
458
466
u64 bSize = 0x7D000 ;
@@ -475,7 +483,7 @@ int argmain(int argc, char **argv)
475
483
}
476
484
477
485
if (!strcmp (argv [0 ], "getVersion" )){
478
- printf ("2.0 \n" );
486
+ printf ("2.1 \n" );
479
487
}
480
488
481
489
// follow pointers and print absolute offset (little endian, flip it yourself if required)
You can’t perform that action at this time.
0 commit comments