Skip to content

Commit

Permalink
now using svcSleepThread
Browse files Browse the repository at this point in the history
  • Loading branch information
yourWaifu committed Nov 18, 2017
1 parent f2c54e9 commit 3bbd039
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions source/3ds_websocket.cpp
Expand Up @@ -117,10 +117,7 @@ void ThreeDSWebsocketClient::onError(SleepyDiscord::ErrorCode errorCode, const s
}

void ThreeDSWebsocketClient::sleep(const unsigned int milliseconds) {
//I really don't know how to make the 3ds sleep
for (float i = 0; i < (milliseconds / 60) + 1 && aptMainLoop(); i++) {
gspWaitForVBlank();
}
svcSleepThread(1e6 * milliseconds);
}

bool sslErrorCheck(const char* functionName, const Result returnValue, int sockfd, sslcContext *context = nullptr) {
Expand Down
5 changes: 1 addition & 4 deletions source/main.cpp
Expand Up @@ -58,10 +58,7 @@ int main() {
std::unique_ptr<u32> socketsBuffer((u32*)memalign(align, socketBufferSize));
if (!R_SUCCEEDED(socInit(socketsBuffer.get(), socketBufferSize))) {
printf("error could not start sockets");
//I don't know if this is the right way to wait a sec, but oh well
for (int i = 0; i < 60 && aptMainLoop(); i++) {
gspWaitForVBlank();
}
svcSleepThread(1e9);
return EXIT_FAILURE;
}

Expand Down

0 comments on commit 3bbd039

Please sign in to comment.