Homebrew Help updating touchscreen faster?

Moocow9m

Member
OP
Newcomer
Joined
Dec 29, 2016
Messages
8
Trophies
0
Age
25
XP
56
Country
United States
I am trying to be able to "color" on the touch screen by updating the touched pixels however it "jumps" positions when moving too fast. is there a way to tell when and where the screen is touched/pen moves along screen? Or a way to update touchPosition faster?

More Info EDIT:
Currently I am running the code below (which was found in ctrulib's hidScanInput) about 700 times a frame on a new thread with no ill effects to get touchPosition without checking others as to not disturb the checks on main thread. However even with this the problem is it doesn't check fast enough or the code is missing something.

Code:
touchPosition tPos;
u32 Id = hidSharedMem[42 + 4];
if(Id>7)Id=7;
  memset(&tPos, 0, sizeof(touchPosition));
  tPos = *(touchPosition*)&hidSharedMem[42 + 8 + Id*2];
return tPos;

END EDIT

Couldn't focus the camera but here is a picture of moving too fast with 3 attempts:
fXiKtr9.jpg
 
Last edited by Moocow9m,

Moocow9m

Member
OP
Newcomer
Joined
Dec 29, 2016
Messages
8
Trophies
0
Age
25
XP
56
Country
United States
i dont know much about programming and all that but could you make it so that it jumps between the 2 last points to make a line?
What if it wasn't a line between the points? That would be inaccurate. Thanks for suggestion though.
 

Moocow9m

Member
OP
Newcomer
Joined
Dec 29, 2016
Messages
8
Trophies
0
Age
25
XP
56
Country
United States
iirc, there is a function to know if the screen is being pressed. You can just draw a line if that's true.
I do not see such a function and I also need to know where the touch was. I am currently running some code that checks every 10000 nanoseconds.
 
Last edited by Moocow9m,

mironicurse

Well-Known Member
Member
Joined
Sep 28, 2015
Messages
141
Trophies
0
Age
31
XP
601
Country
Russia
Displaying a line instead of dots while freehand drawing is common practice in drawing apps, such as colors on DS. Why not try both reduce the timer and draw the line? I think that'll do nicely
 

Moocow9m

Member
OP
Newcomer
Joined
Dec 29, 2016
Messages
8
Trophies
0
Age
25
XP
56
Country
United States
Displaying a line instead of dots while freehand drawing is common practice in drawing apps, such as colors on DS. Why not try both reduce the timer and draw the line? I think that'll do nicely
they become dots because it does not detect the next movement fast enough. I did move across the screen in a line (2nd attempt was not straight). My timer checks every 10000 nanoseconds which should be more than enough I think considering any lower freezes the 3DS.
 
Last edited by Moocow9m,

Moocow9m

Member
OP
Newcomer
Joined
Dec 29, 2016
Messages
8
Trophies
0
Age
25
XP
56
Country
United States
they become dots because it does not detect the next movement fast enough. I did move across the screen in a line (2nd attempt was not straight). My timer checks every 10000 nanoseconds which should be more than enough I think considering any lower freezes the 3DS.
I believe something else is not updating as fast as I execute the code. My guess is that hidSharedMem has something to do with it however I don't see where it is updated, only where it is initialized. Can anyone tell me what updates this?
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • K3Nv2 @ K3Nv2:
    They should've just made it a movie at 50 minutes
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    No from Paramount Plus or whatever it is
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Psi now has access to every streaming and cable channel out
  • K3Nv2 @ K3Nv2:
    Eh I'd rather just download and delete is it already up on paramount?
  • Psionic Roshambo @ Psionic Roshambo:
    Yeah it's on now
  • Xdqwerty @ Xdqwerty:
    @Psionic Roshambo, why are most new south park episodes half hour specials?
    +1
  • K3Nv2 @ K3Nv2:
    @Psionic Roshambo, let me get a Netflix account I've always been nice to you
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    I made a honey pepper glazed turkey breast for dinner turned out pretty bomb
  • K3Nv2 @ K3Nv2:
    We can Netflix and chill
  • Xdqwerty @ Xdqwerty:
    Nvm not half hour, but hour long
  • Xdqwerty @ Xdqwerty:
    Normal south park episodes are already half hour
  • Psionic Roshambo @ Psionic Roshambo:
    Got 2 free Xumo boxes they work pretty good
  • K3Nv2 @ K3Nv2:
    I'm happy to get anything most series don't make it pass 6 seasons
  • Psionic Roshambo @ Psionic Roshambo:
    Except Stars and Encore those are being a bitch lol
  • K3Nv2 @ K3Nv2:
    I may consider that onn pro box finally a media box with type A ;O
    +1
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, cuz the companies don't want em to
  • K3Nv2 @ K3Nv2:
    No it's revenue and demand south park could argue has a bigger audience than family guy about the same
    +1
  • K3Nv2 @ K3Nv2:
    Family guy is worth 300mill south parks worth 1Bill according to the interwebs
  • Xdqwerty @ Xdqwerty:
    @K3Nv2, probably cuz family guy is more disliked compared to south park
  • K3Nv2 @ K3Nv2:
    It just does the same formula south park can press buttons without going overboard
  • Xdqwerty @ Xdqwerty:
    And bc most of the family guy budget is spent on the voice actors rather than on the animation
  • K3Nv2 @ K3Nv2:
    Southpark could spend 30k on a animated dick and people would laugh at it
    +2
  • K3Nv2 @ K3Nv2:
    lol one prescription to Lizzo
  • Xdqwerty @ Xdqwerty:
    who is lizzo?
  • Xdqwerty @ Xdqwerty:
    yawn
    Xdqwerty @ Xdqwerty: yawn