From 13d5b854bccaf6b55a6d97c181bef67b37fca294 Mon Sep 17 00:00:00 2001 From: Steven Smith Date: Mon, 11 Jul 2016 14:37:53 -0700 Subject: [PATCH] Adjust camera resolution. (thanks @ksanislo for the suggestion) --- source/ui/section/task/capturecam.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ui/section/task/capturecam.c b/source/ui/section/task/capturecam.c index 89fd173..39398df 100644 --- a/source/ui/section/task/capturecam.c +++ b/source/ui/section/task/capturecam.c @@ -25,7 +25,7 @@ static void task_capture_cam_thread(void* arg) { u16* buffer = (u16*) calloc(1, bufferSize); if(buffer != NULL) { if(R_SUCCEEDED(res = camInit())) { - if(R_SUCCEEDED(res = CAMU_SetSize(SELECT_OUT1, SIZE_VGA, CONTEXT_A)) + if(R_SUCCEEDED(res = CAMU_SetSize(SELECT_OUT1, SIZE_CTR_TOP_LCD, CONTEXT_A)) && R_SUCCEEDED(res = CAMU_SetOutputFormat(SELECT_OUT1, OUTPUT_RGB_565, CONTEXT_A)) && R_SUCCEEDED(res = CAMU_SetFrameRate(SELECT_OUT1, FRAME_RATE_30)) && R_SUCCEEDED(res = CAMU_SetNoiseFilter(SELECT_OUT1, true)) @@ -36,7 +36,7 @@ static void task_capture_cam_thread(void* arg) { if(R_SUCCEEDED(res = CAMU_GetBufferErrorInterruptEvent(&events[EVENT_BUFFER_ERROR], PORT_CAM1)) && R_SUCCEEDED(res = CAMU_SetTrimming(PORT_CAM1, true)) - && R_SUCCEEDED(res = CAMU_SetTrimmingParamsCenter(PORT_CAM1, data->width, data->height, 640, 480)) + && R_SUCCEEDED(res = CAMU_SetTrimmingParamsCenter(PORT_CAM1, data->width, data->height, 400, 240)) && R_SUCCEEDED(res = CAMU_GetMaxBytes(&transferUnit, data->width, data->height)) && R_SUCCEEDED(res = CAMU_SetTransferBytes(PORT_CAM1, transferUnit, data->width, data->height)) && R_SUCCEEDED(res = CAMU_ClearBuffer(PORT_CAM1))