Skip to content

Commit

Permalink
Make things ready for the final release
Browse files Browse the repository at this point in the history
- Remove screenshot function since rosalina can now be used.
- Fixed device ID display on GUI.
- Lowered size for WiFi and Storage menu in GUI
- Console will now exit with any button excluding the rosalina activation buttons.
  • Loading branch information
joel16 committed Aug 3, 2018
1 parent f7ded94 commit bdf282a
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 286 deletions.
29 changes: 0 additions & 29 deletions common/fs.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,6 @@ Result FS_CloseArchive(FS_Archive archive)
return 0;
}

Result FS_MakeDir(FS_Archive archive, const char *path)
{
Result ret = 0;

u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, path, strlen(path) + 1);

if (R_FAILED(ret = FSUSER_CreateDirectory(archive, fsMakePath(PATH_UTF16, path_u16), 0)))
return ret;

return 0;
}

bool FS_FileExists(FS_Archive archive, const char *path)
{
Handle handle;
Expand All @@ -52,19 +39,3 @@ bool FS_FileExists(FS_Archive archive, const char *path)

return true;
}

bool FS_DirExists(FS_Archive archive, const char *path)
{
Handle handle;

u16 path_u16[strlen(path) + 1];
Utils_U8_To_U16(path_u16, path, strlen(path) + 1);

if (R_FAILED(FSUSER_OpenDirectory(&handle, archive, fsMakePath(PATH_UTF16, path_u16))))
return false;

if (R_FAILED(FSDIR_Close(handle)))
return false;

return true;
}
4 changes: 1 addition & 3 deletions common/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ FS_Archive archive;

Result FS_OpenArchive(FS_Archive *archive, FS_ArchiveID archiveID);
Result FS_CloseArchive(FS_Archive archive);
Result FS_MakeDir(FS_Archive archive, const char *path);
bool FS_FileExists(FS_Archive archive, const char *path);
bool FS_DirExists(FS_Archive archive, const char *path);

#endif
#endif
143 changes: 0 additions & 143 deletions common/screenshot.c

This file was deleted.

6 changes: 0 additions & 6 deletions common/screenshot.h

This file was deleted.

19 changes: 4 additions & 15 deletions console/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@

#include "ac.h"
#include "actu.h"
#include "fs.h"
#include "hardware.h"
#include "kernel.h"
#include "misc.h"
#include "screenshot.h"
#include "storage.h"
#include "system.h"
#include "utils.h"
#include "wifi.h"

#define ANY_KEY (KEY_TOUCH | KEY_A | KEY_B | KEY_X | KEY_Y | KEY_START | \
KEY_UP | KEY_DOWN | KEY_LEFT | KEY_RIGHT | KEY_ZL | KEY_ZR | \
#define ANY_KEY (KEY_TOUCH | KEY_A | KEY_B | KEY_X | KEY_Y | KEY_START | KEY_R | \
KEY_UP | KEY_CPAD_DOWN | KEY_LEFT | KEY_RIGHT | KEY_ZL | KEY_ZR | \
KEY_CSTICK_UP | KEY_CSTICK_DOWN | KEY_CSTICK_LEFT | KEY_CSTICK_RIGHT)

static u32 cpu_time_limit = 0;
Expand Down Expand Up @@ -45,14 +43,10 @@ void Init_Services(void)

APT_GetAppCpuTimeLimit(&cpu_time_limit);
APT_SetAppCpuTimeLimit(30);

FS_OpenArchive(&archive, ARCHIVE_SDMC);
}

void Term_Services(void)
{
FS_CloseArchive(archive);

{
if (cpu_time_limit != UINT32_MAX)
APT_SetAppCpuTimeLimit(cpu_time_limit);

Expand Down Expand Up @@ -292,13 +286,8 @@ int main(int argc, char *argv[])

gspWaitForVBlank();
hidScanInput();
u32 kDown = hidKeysDown();
u32 kHeld = hidKeysHeld();

if (((kHeld & KEY_L) && (kDown & KEY_R)) || ((kHeld & KEY_R) && (kDown & KEY_L)))
Screenshot_Capture();

else if (kDown & ANY_KEY)
if (hidKeysDown() & ANY_KEY)
break;

gfxFlushBuffers();
Expand Down
5 changes: 0 additions & 5 deletions gui/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "actu.h"
#include "C2D_helper.h"
#include "common.h"
#include "fs.h"
#include "menus.h"
#include "sprites.h"
#include "textures.h"
Expand Down Expand Up @@ -37,8 +36,6 @@ static void Init_Services(void)
APT_GetAppCpuTimeLimit(&cpu_time_limit);
APT_SetAppCpuTimeLimit(30);

FS_OpenArchive(&archive, ARCHIVE_SDMC);

staticBuf = C2D_TextBufNew(4096);
dynamicBuf = C2D_TextBufNew(4096);
sizeBuf = C2D_TextBufNew(4096);
Expand All @@ -57,8 +54,6 @@ static void Term_Services(void)
C2D_TextBufDelete(dynamicBuf);
C2D_TextBufDelete(staticBuf);

FS_CloseArchive(archive);

if (cpu_time_limit != UINT32_MAX)
APT_SetAppCpuTimeLimit(cpu_time_limit);

Expand Down
Loading

0 comments on commit bdf282a

Please sign in to comment.