Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ELY M committed Oct 15, 2024
1 parent b32525d commit 745ce94
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 20 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ LDFLAGS = -specs=$(DEVKITPRO)/libnx/switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*

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`

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

#---------------------------------------------------------------------------------
# list of directories containing libraries, this must be the top level containing
Expand Down
6 changes: 0 additions & 6 deletions git.txt

This file was deleted.

26 changes: 16 additions & 10 deletions source/main.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
/*
Weather app for Nintendo Switch
ELY M.
*/


#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Expand Down Expand Up @@ -113,7 +126,7 @@ void SDL_DrawRect(SDL_Renderer *renderer, int x, int y, int w, int h, SDL_Color
}


/*
/* this crashes
void userAppInit(void)
{
void *addr = NULL;
Expand Down Expand Up @@ -311,13 +324,13 @@ void *getjson(char *JsonString) {
jsmn_init(&p);
r = jsmn_parse(&p, JsonString, strlen(JsonString), t, sizeof(t)/sizeof(t[0]));
if (r < 0) {
printf("Failed to parse JSON: %d\n", r);
//printf("Failed to parse JSON: %d\n", r);
return 0;
}

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

Expand Down Expand Up @@ -430,11 +443,6 @@ char *readWeather(void)
}







int main()
{

Expand Down Expand Up @@ -469,8 +477,6 @@ int main()
weatherImage = IMG_Load(weathericon);
weatherTexture = SDL_CreateTextureFromSurface(renderer, weatherImage);
SDL_FreeSurface(weatherImage);



while (appletMainLoop())
{
Expand Down

0 comments on commit 745ce94

Please sign in to comment.