Skip to content

Commit

Permalink
Release v1.1.0
Browse files Browse the repository at this point in the history
- DSES is now self-cleaning. Press SELECT to clean up the application after setting your EULAs!
- Works on both 3DSX and CIA builds. Also tested application with 3dslink.

Non-code changes:
- Updated username in smdh.
- Clarified minor README ambiguity/errors.
  • Loading branch information
noirscape committed Oct 12, 2018
1 parent c7a1625 commit 178e953
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ include $(DEVKITARM)/3ds_rules
# Your values.
APP_TITLE := DSES
APP_DESCRIPTION := Dead Simple Eula Set
APP_AUTHOR := ev1l0rd
APP_AUTHOR := noirscape


TARGET := $(subst $e ,_,$(notdir $(APP_TITLE)))
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Note that when unaccepting the EULA, you will need to reaccept it the next time

## Usage

Download the CIA/3DSX from the releases page and open it with FBI. Press A to change your EULA. After that you can remove the application.
Download the CIA from the releases page and open it with FBI. Press A to change your EULA. Press SELECT to remove the program after running it.

If for whatever reason you need to reset the EULA to its initial values, rerun the application again.

There is also a 3DSX option available for those who prefer 3DSX homebrew. Put it on your SD card and run it with the Homebrew Launcher or with 3dslink. Press SELECT to remove the program after running it.
35 changes: 31 additions & 4 deletions source/main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// DSES - Dead Simple EULA Set
// Copyright (C) 2018 Valentijn "ev1l0rd" V.
// Copyright (C) 2018 Valentijn "noirscape" V.
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand All @@ -16,9 +16,14 @@
#include <stdio.h>
#include <stdlib.h>
#include <3ds.h>
#define TITLEID 0x000400000EF10200
#define SLEEPTIME 5000000000

int main()
int main(int argc, char* argv[])
{
// noop call to shut up the compiler
(void)argc;

// Service initialization
aptInit();
gfxInitDefault();
Expand All @@ -33,7 +38,7 @@ int main()
consoleInit(GFX_TOP, &topScreen);
consoleSelect(&topScreen);

printf("Dead Simple EULA Set - v1.0.0\n\n");
printf("Dead Simple EULA Set - v1.1.0\n\n");

// read magic
res = CFGU_GetConfigInfoBlk2(4, 0xD0000, eulaData);
Expand Down Expand Up @@ -61,14 +66,36 @@ int main()
printf("Something went wrong...\n\n");
else
printf(eulaData[0] == 0xFF ? "Setting the EULA succeeded.\n\n" : "Unsetting the EULA succeeded.\n\n");
printf("Press START to exit.\n");
printf("Press START to exit.\nPress Select to exit + remove application.\n");
done = true;
}
if (kDown & KEY_START)
{
printf("Exiting...\n");
break;
}
if (kDown & KEY_SELECT)
{
char* endmsg = "Successfully removed application.\n";
printf("Removing application and exiting...\n");
if (envIsHomebrew())
{
remove(argv[0]);
printf(endmsg);
}
else
{
amInit();
res = AM_DeleteAppTitle(MEDIATYPE_SD, (u64)TITLEID);
if(R_FAILED(res))
printf("Couldn\'t remove DSES. Try removing it manually through System Settings.\n");
else
printf(endmsg);
}
amExit();
svcSleepThread(SLEEPTIME);
break;
}
}

aptExit();
Expand Down

0 comments on commit 178e953

Please sign in to comment.