- Joined
- Nov 24, 2012
- Messages
- 1,261
- Trophies
- 1
- Location
- Gothenburg, Sweden
- Website
- www.sweetsideofsweden.com
- XP
- 1,749
- Country
just to be sure, top left = 0 right? or do they do it the weird way with bottom left = 0? (Screen cords)
#include "program.h"
#include "draw.h"
//For ctrulib
#include <3ds\types.h>
#include <3ds\services\hid.h>
#include <3ds\gfx.h>
//For sprintF
#include <stdio.h>
void program()
{
touchPosition myTouchPosition;
//As you can see touchPosition is a struct comprised of two 16 bit unsigned integers.
//typedef struct
//{
// u16 px, py;
//} touchPosition;
//Pass pointer to hidTouchRead function which updates values.
hidTouchRead(myTouchPosition);
//Read x cord
u16 posX = myTouchPosition.px;
//Read y cord
u16 posY = myTouchPosition.py;
}
3DS_Touch_Test
program.c
arm-none-eabi-gcc -MMD -MP -MF /c/devkitPro/Projects/3DS/3DS_Touch_Test/build/pr
ogram.d -g -Wall -O2 -mword-relocations -save-temps -fomit-frame-pointer -ffast-
math -mfloat-abi=softfp -march=armv6k -mtune=mpcore -I/c/devkitPro/Projects/3DS/
3DS_Touch_Test/include -IC:\devkitPro\libctru/include -I/c/devkitPro/Projects/3D
S/3DS_Touch_Test/build -DARM11 -D_3DS -c /c/devkitPro/Projects/3DS/3DS_Touch_Tes
t/source/program.c -o program.o
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c: In function 'program'
:
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:23:2: error: incompati
ble type for argument 1 of 'hidTouchRead'
hidTouchRead(myTouchPosition);
^
In file included from C:\devkitPro\libctru/include/3ds.h:21:0,
from c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/draw.h:4,
from c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:
2:
C:\devkitPro\libctru/include/3ds/services/hid.h:79:6: note: expected 'struct tou
chPosition *' but argument is of type 'touchPosition'
void hidTouchRead(touchPosition* pos);
^
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:28:6: warning: unused
variable 'posY' [-Wunused-variable]
u16 posY = myTouchPosition.py;
^
c:/devkitPro/Projects/3DS/3DS_Touch_Test/source/program.c:26:6: warning: unused
variable 'posX' [-Wunused-variable]
u16 posX = myTouchPosition.px;
^
make[1]: *** [program.o] Error 1
make: *** [build] Error 2
Premere un tasto per continuare . . .
hidTouchRead(&myTouchPosition);
if you're using that drawString thing, you'd use sprintf to write the number to a buffer.
sprintf(buffer, "TouchX= %d ", posX);?
I've got always same errors for compil...
'arm-none-eabi-strip' n'est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
Check to make sure arm-none-eabi-strip is working. I think it is missing from your path. You need to strip your elf before you use makerom to build it into .3DS/.CIA.
error: cannot convert 'gfx3dSide_t' to 'gfxScreen_t' for argument '8' to 'void drawString(char*, int, int, char, char, char, u8*, gfxScreen_t)'
drawString(buffer, 5, 28, 255, 255, 255, screenTopLeft, GFX_LEFT);
Everything seems to be fine on my side:Wait what
Code:error: cannot convert 'gfx3dSide_t' to 'gfxScreen_t' for argument '8' to 'void drawString(char*, int, int, char, char, char, u8*, gfxScreen_t)' drawString(buffer, 5, 28, 255, 255, 255, screenTopLeft, GFX_LEFT);
Yep, its DownloadMii.Everything seems to be fine on my side:
EDIT: OOOOOPPPPPSSSS My mistake. I tought this was a reply to my thread...
Is it on the github repo?
wait a second, shouldn't "gfxSwapBuffersGpu();" be enough?
https://github.com/smealum/ctrulib/blob/master/examples/sdmc/source/main.c#L92
You may be right.
@AlbertoSONIC can you see if this is the right way to do it? It would be a lot cleaner.
Just a heads up to anyone having this issue, you have to log off your account then back on for changes to environment variables like PATH to take effect...
Sure, give me a minute!
Wait what
Code:error: cannot convert 'gfx3dSide_t' to 'gfxScreen_t' for argument '8' to 'void drawString(char*, int, int, char, char, char, u8*, gfxScreen_t)' drawString(buffer, 5, 28, 255, 255, 255, screenTopLeft, GFX_LEFT);