Skip to content

Commit ae4fd18

Browse files
committed
use SYS_MainLoop
1 parent 65afeb0 commit ae4fd18

26 files changed

Lines changed: 28 additions & 28 deletions

File tree

audio/modplay/source/template.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ int main(int argc, char **argv) {
6666
MODPlay_SetVolume(&play,63,63);
6767
MODPlay_Start(&play);
6868

69-
while(1) {
69+
while(SYS_MainLoop()) {
7070

7171
// Call WPAD_ScanPads each loop, this reads the latest controller states
7272
WPAD_ScanPads();

audio/mp3player/source/template.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ int main(int argc, char **argv) {
6262

6363
MP3Player_PlayBuffer(sample_mp3, sample_mp3_size, NULL);
6464

65-
while(1) {
65+
while(SYS_MainLoop()) {
6666

6767
// Call WPAD_ScanPads each loop, this reads the latest controller states
6868
WPAD_ScanPads();

audio/oggplayer/source/template.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ int main(int argc, char **argv) {
6767

6868
PlayOgg(sample_ogg, sample_ogg_size, 0, OGG_ONE_TIME);
6969

70-
while(1) {
70+
while(SYS_MainLoop()) {
7171

7272
// Call WPAD_ScanPads each loop, this reads the latest controller states
7373
WPAD_ScanPads();

crypto/source/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ static const u32 expectedDecryptedSha1[4] = { 0xB3440B4A, 0xE59A2FB4, 0x1A52DEB
1919
static u32 hash[4] = {};
2020
void wait_for_input()
2121
{
22-
while(1) {
22+
while(SYS_MainLoop()) {
2323

2424
// Call WPAD_ScanPads each loop, this reads the latest controller states
2525
WPAD_ScanPads();

devices/network/sockettest/source/sockettest.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main(int argc, char **argv) {
4949
printf ("network configuration failed!\n");
5050
}
5151

52-
while(1) {
52+
while(SYS_MainLoop()) {
5353

5454
VIDEO_WaitVSync();
5555
WPAD_ScanPads();
@@ -115,13 +115,13 @@ void *httpd (void *arg) {
115115
perror("listen");
116116
} else {
117117

118-
while(1) {
118+
while(SYS_MainLoop()) {
119119

120120
csock = accept (sock, (struct sockaddr *) &client, &clientlen);
121121

122122
if ( csock < 0 ) {
123123
perror("accept");
124-
while(1);
124+
continue;
125125
}
126126

127127
printf("Connecting port %d from %s\n", client.sin_port, inet_ntoa(client.sin_addr));

devices/network/udptest/source/udptest.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ int main(int argc, char **argv) {
146146
printf ("network configuration failed!\n");
147147
}
148148

149-
while (1) {
149+
while(SYS_MainLoop()) {
150150
VIDEO_WaitVSync();
151151
WPAD_ScanPads();
152152

devices/usbgecko/gdbstub/source/gdbstub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ int main() {
3939

4040
printf("debugger connected ...\n");
4141

42-
while(1) {
42+
while(SYS_MainLoop()) {
4343

4444
VIDEO_WaitVSync();
4545
WPAD_ScanPads();

devices/wiimote/source/wiimote.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ int main(int argc, char **argv) {
5959
printf("to toggle searching for guest wiimotes, press +\n");
6060
printf("to exit, press the home\n");
6161

62-
while(1)
62+
while(SYS_MainLoop())
6363
{
6464
//reset console location to 8th row
6565
printf("\x1b[8;0H");

filesystem/directory/sd/source/directory.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ int main(int argc, char **argv) {
8585
closedir(pdir);
8686

8787
error:
88-
while(1) {
88+
while(SYS_MainLoop()) {
8989

9090
// Call WPAD_ScanPads each loop, this reads the latest controller states
9191
WPAD_ScanPads();

graphics/gx/gxSprites/source/gxsprites.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ int main( int argc, char **argv ){
140140
sprites[i].dy = -sprites[i].dy;
141141
}
142142

143-
while(1) {
143+
while(SYS_MainLoop()) {
144144

145145
WPAD_ScanPads();
146146

0 commit comments

Comments
 (0)