File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,6 +120,16 @@ MetaData getMetaData(){
120120 return meta ;
121121}
122122
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+
123133void initController ()
124134{
125135 if (bControllerIsInitialised ) return ;
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ u64 getHeapBase(Handle handle);
4444u64 getTitleId (u64 pid );
4545void getBuildID (MetaData * meta , u64 pid );
4646MetaData getMetaData (void );
47+ bool getIsProgramOpen (u64 id );
4748
4849void poke (u64 offset , u64 size , u8 * val );
4950void 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)
453453 printf ("%016lX\n" , meta .heap_base );
454454 }
455455
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+
456464 if (!strcmp (argv [0 ], "pixelPeek" )){
457465 //errors with 0x668CE, unless debugunit flag is patched
458466 u64 bSize = 0x7D000 ;
@@ -475,7 +483,7 @@ int argmain(int argc, char **argv)
475483 }
476484
477485 if (!strcmp (argv [0 ], "getVersion" )){
478- printf ("2.0 \n" );
486+ printf ("2.1 \n" );
479487 }
480488
481489 // 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