Example #1
0
int main()
{
	static bool bActive = false;

	if (bActive)
	{
		GetGuiManagerChecked()->SwitchTo(nullptr);
		return 0;
	}

	bActive = true;
	int rc = DSRequestHardware(hwMainFunc, NULL, hwReqFunction);
	switch (rc)
	{
		default: break;
		case -1:
			printf(ANSIESC_RED "Failure to use hardware!" ANSIESC_DEFAULT "\n");
			break;
		case ERR_NOMEM:
			printf(ANSIESC_RED "Out of memory!" ANSIESC_DEFAULT "\n");
			break;
		case ERR_NOLOAD:
			printf(ANSIESC_RED "Could not load resources!" ANSIESC_DEFAULT "\n");
			break;
		case ERR_NOAPPS:
			printf(ANSIESC_RED "No applications present!" ANSIESC_DEFAULT "\n");
			break;
	}

	return rc;
}
Example #2
0
int main(int argc, char *argv[]) {
  return DSRequestHardware(play, NULL, NULL);
}