Skip to content

Commit

Permalink
coreinit/launch: Add OSLaunchTitle* functions
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryOderNichts authored and fincs committed Feb 4, 2023
1 parent 7530dd5 commit a53d2bd
Showing 1 changed file with 115 additions and 1 deletion.
116 changes: 115 additions & 1 deletion include/coreinit/launch.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,129 @@
extern "C" {
#endif

/**
* Magic title ID used for launching the current coldboot title.
*/
#define OS_TITLE_ID_COLDBOOT 0xFFFFFFFFFFFFFFFDllu

/**
* Magic title ID used for triggering a full system reboot.
*/
#define OS_TITLE_ID_REBOOT 0xFFFFFFFFFFFFFFFEllu

/**
* Forces a OS relaunch on the next title launch.
*/
void
OSForceFullRelaunch();

/**
* Restarts the currently running title.
*
* \param argc
* The amount of arguments in \p argv.
*
* \param argv
* An array of argument strings.
*/
void
OSRestartGame(int argc, char *argv[]);
OSRestartGame(int argc,
char *argv[]);

/**
* Shuts down the system.
*/
BOOL
OSShutdown();

/**
* Launches a title by path.
*
* \param path
* The path to launch the title from.
*
* \param pathSize
* The size of the path string.
*
* \param argc
* The amount of argument strings.
*
* \param ...
* Argument strings passed to the title as \c argv.
*
* \note
* Prefer using sysapp to launch titles instead.
*/
void
OSLaunchTitleByPathl(const char *path,
uint32_t pathSize,
int argc,
...);

/**
* Launches a title by path.
*
* \param path
* The path to launch the title from.
*
* \param pathSize
* The size of the path string.
*
* \param argc
* The amount of arguments in \p argv.
*
* \param argv
* An array of argument strings.
*
* \note
* Prefer using sysapp to launch titles instead.
*/
void
OSLaunchTitleByPathv(const char *path,
uint32_t pathSize,
int argc,
char *argv[]);

/**
* Launches a title by its title ID.
*
* \param titleId
* The ID of the title to launch.
*
* \param argc
* The amount of argument strings.
*
* \param ...
* Argument strings passed to the title as \c argv.
*
* \note
* Prefer using sysapp to launch titles instead.
*/
void
OSLaunchTitlel(uint64_t titleId,
int argc,
...);

/**
* Launches a title by its title ID.
*
* \param titleId
* The ID of the title to launch.
*
* \param argc
* The amount of arguments in \p argv.
*
* \param argv
* An array of argument strings.
*
* \note
* Prefer using sysapp to launch titles instead.
*/
void
OSLaunchTitlev(uint64_t titleId,
int argc,
char *argv[]);

#ifdef __cplusplus
}
#endif
Expand Down

0 comments on commit a53d2bd

Please sign in to comment.