Skip to content

Commit 745ce94

Browse files
author
ELY M
committed
update
1 parent b32525d commit 745ce94

File tree

3 files changed

+16
-20
lines changed

3 files changed

+16
-20
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*
5959

6060
LIBS := `aarch64-none-elf-pkg-config SDL2_ttf vorbisidec ogg SDL2_image --libs` -lcurl -lmbedtls -lmbedx509 -lmbedcrypto -lmodplug -lmpg123 -lpng -lz -ljpeg -lglad -lEGL -lglapi -ldrm_nouveau -lstdc++ -lturbojpeg -lSDL2 -lnx -lm -lwebp -lfreetype -lbz2 `sdl2-config --libs` `freetype-config --libs`
6161

62-
###old
63-
#LIBS := -lsdl2 -lSDL2_mixer -lSDL2_image -lSDL2_ttf -lcurl -lmbedtls -lmbedx509 -lmbedcrypto \
64-
# -lpng -lz -ljpeg -lglad -lEGL -lglapi -ldrm_nouveau -lstdc++ \
65-
# -lvorbisidec -logg -lmpg123 -lmodplug -lnx -lm -lwebp -lfreetype -lbz2
6662

6763
#---------------------------------------------------------------------------------
6864
# list of directories containing libraries, this must be the top level containing

git.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

source/main.c

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
/*
2+
3+
4+
Weather app for Nintendo Switch
5+
6+
7+
ELY M.
8+
9+
10+
11+
*/
12+
13+
114
#include <stdio.h>
215
#include <stdlib.h>
316
#include <string.h>
@@ -113,7 +126,7 @@ void SDL_DrawRect(SDL_Renderer *renderer, int x, int y, int w, int h, SDL_Color
113126
}
114127

115128

116-
/*
129+
/* this crashes
117130
void userAppInit(void)
118131
{
119132
void *addr = NULL;
@@ -311,13 +324,13 @@ void *getjson(char *JsonString) {
311324
jsmn_init(&p);
312325
r = jsmn_parse(&p, JsonString, strlen(JsonString), t, sizeof(t)/sizeof(t[0]));
313326
if (r < 0) {
314-
printf("Failed to parse JSON: %d\n", r);
327+
//printf("Failed to parse JSON: %d\n", r);
315328
return 0;
316329
}
317330

318331
/* Assume the top-level element is an object */
319332
if (r < 1 || t[0].type != JSMN_OBJECT) {
320-
printf("Object expected\n");
333+
//printf("Object expected\n");
321334
return 0;
322335
}
323336

@@ -430,11 +443,6 @@ char *readWeather(void)
430443
}
431444

432445

433-
434-
435-
436-
437-
438446
int main()
439447
{
440448

@@ -469,8 +477,6 @@ int main()
469477
weatherImage = IMG_Load(weathericon);
470478
weatherTexture = SDL_CreateTextureFromSurface(renderer, weatherImage);
471479
SDL_FreeSurface(weatherImage);
472-
473-
474480

475481
while (appletMainLoop())
476482
{

0 commit comments

Comments
 (0)