From 37464daf0a267e09db2aa31ed9500534a3e2cf21 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Fri, 18 Aug 2023 19:26:03 +1000 Subject: [PATCH] 3DS: Increase deadzone for circle stick, also try to enable new 3DS's greater processing power --- src/Platform_3DS.c | 5 ++++- src/SSL.c | 9 ++++++++- src/Window_3DS.c | 4 ++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/Platform_3DS.c b/src/Platform_3DS.c index 691a6c08d..9a2ef34b4 100644 --- a/src/Platform_3DS.c +++ b/src/Platform_3DS.c @@ -427,7 +427,10 @@ static void CreateRootDirectory(const char* path) { Platform_Log2("mkdir %c FAILED: %i", path, &err); } -void Platform_Init(void) { +void Platform_Init(void) { + // Take full advantage of new 3DS if running on it + osSetSpeedupEnable(true); + // create root directories (no permissions anyways) CreateRootDirectory("sdmc:/3ds"); CreateRootDirectory("sdmc:/3ds/ClassiCube"); diff --git a/src/SSL.c b/src/SSL.c index 5550e1db0..da69348dc 100644 --- a/src/SSL.c +++ b/src/SSL.c @@ -461,26 +461,33 @@ cc_result SSL_Init(cc_socket socket, const cc_string* host_, void** out_ctx) { int opts = _verifyCerts ? SSLCOPT_Default : SSLCOPT_DisableVerify; if ((ret = sslcCreateContext(ctx, socket, opts, host))) return ret; + Platform_LogConst("--ssl context create--"); sslcContextSetRootCertChain(ctx, certChainHandle); + Platform_LogConst("--ssl root chain added--"); // detect lack of proper SSL support in Citra if (!ctx->sslchandle) return HTTP_ERR_NO_SSL; if ((ret = sslcStartConnection(ctx, NULL, NULL))) return ret; + Platform_LogConst("--ssl connection started--"); return 0; } cc_result SSL_Read(void* ctx_, cc_uint8* data, cc_uint32 count, cc_uint32* read) { + Platform_Log1("<< IN: %i", &count); sslcContext* ctx = (sslcContext*)ctx_; int ret = sslcRead(ctx, data, count, false); + Platform_Log1("--ssl read-- = %i", &ret); if (ret < 0) return ret; *read = ret; return 0; } -cc_result SSL_Write(void* ctx_, const cc_uint8* data, cc_uint32 count, cc_uint32* wrote) { +cc_result SSL_Write(void* ctx_, const cc_uint8* data, cc_uint32 count, cc_uint32* wrote) { + Platform_Log1(">> OUT: %i", &count); sslcContext* ctx = (sslcContext*)ctx_; int ret = sslcWrite(ctx, data, count); + Platform_Log1("--ssl write-- = %i", &ret); if (ret < 0) return ret; *wrote = ret; return 0; } diff --git a/src/Window_3DS.c b/src/Window_3DS.c index d4ce7e309..beb57f9a7 100644 --- a/src/Window_3DS.c +++ b/src/Window_3DS.c @@ -110,8 +110,8 @@ static void ProcessJoystickInput(circlePosition* pos, double delta) { float scale = (delta * 60.0) / 8.0f; // May not be exactly 0 on actual hardware - if (Math_AbsI(pos->dx) <= 4) pos->dx = 0; - if (Math_AbsI(pos->dy) <= 4) pos->dy = 0; + if (Math_AbsI(pos->dx) <= 8) pos->dx = 0; + if (Math_AbsI(pos->dy) <= 8) pos->dy = 0; Event_RaiseRawMove(&PointerEvents.RawMoved, pos->dx * scale, -pos->dy * scale); }