Merge pull request 'merge sandia' (#2) from sandia into main

Reviewed-on: emilyd/libreshop_client#2
This commit is contained in:
Emily Daemon 2023-07-21 06:00:49 +00:00
commit c6bbfcac10
4 changed files with 13 additions and 2 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "source/sandia"]
path = source/sandia
url = https://git.donut.eu.org/nez/sandia-Wii.git

View File

@ -17,7 +17,7 @@ include $(DEVKITPPC)/wii_rules
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := $(notdir $(CURDIR)) TARGET := $(notdir $(CURDIR))
BUILD := build BUILD := build
SOURCES := source SOURCES := source source/sandia
DATA := data DATA := data
INCLUDES := INCLUDES :=

View File

@ -4,6 +4,8 @@
#include <network.h> #include <network.h>
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include "sandia/sandia.h"
static void *xfb = NULL; static void *xfb = NULL;
static GXRModeObj *rmode = NULL; static GXRModeObj *rmode = NULL;
@ -74,7 +76,12 @@ int main(int argc, char **argv) {
logprint(1, "Initialized successfully!\n"); logprint(1, "Initialized successfully!\n");
logprint(0, "Your Wii's IP address is "); logprint(0, "Your Wii's IP address is ");
printf("%s.\n", localip); printf("%s.\n", localip);
} else {
sandia req = sandia_create("libreshop.donut.eu.org", 80);
sandia_response res = sandia_get_request(&req, "/");
printf("\n%s\n", res.body);
sandia_close(&req);
} else {
logprint(0, "Network configuration failed :(\n"); logprint(0, "Network configuration failed :(\n");
} }

1
source/sandia Submodule

@ -0,0 +1 @@
Subproject commit 9b383cdda825ab4ba2767102b06cbd5dc734dae9