* Enabled StrIds in language.c for this with some adjustments. * Moved sockets init/exit into netloaderInit/netloaderExit, netloaderInit now returns Result. * Changed the params for netloaderGetState to an output struct. * In netloaderTask(), check netloader_exitflag at the end before clearing it. * Moved code calling loadnro from netloader_loop into netloaderTask. * Call thrd_sleep with the while-loop calling netloader_loop in netloaderTask. * Various other changes.
24 lines
496 B
C
24 lines
496 B
C
#pragma once
|
|
|
|
typedef struct {
|
|
bool activated;
|
|
bool launch_app;
|
|
bool transferring;
|
|
bool sock_connected;
|
|
menuEntry_s *me;
|
|
size_t filelen, filetotal;
|
|
char errormsg[1025];
|
|
} netloaderState;
|
|
|
|
int netloader_activate(void);
|
|
int netloader_deactivate(void);
|
|
int netloader_loop(struct sockaddr_in *sa_remote);
|
|
|
|
Result netloaderInit(void);
|
|
void netloaderExit(void);
|
|
|
|
void netloaderTask(void* arg);
|
|
|
|
void netloaderGetState(netloaderState *state);
|
|
void netloaderSignalExit(void);
|