Homebrew app Can't compile homebrew (hidKeysDown)

ThatBenderGuy

Well-Known Member
OP
Member
Joined
Dec 16, 2013
Messages
150
Trophies
0
Age
31
XP
348
Country
United States
I have recently installed Ubuntu and was setting up my development environment for DevKitPro. My project is to update a dead homebrew for personal use. I have installed all the switch libraries using dkp-pacman, and when I run make in the project's directory I get a bunch of errors but they all stem from the error:
source/main.c:501:33: error: 'CONTROLLER_P1_AUTO' undeclared (first use in this function) u64 kDown = hidKeysDown(CONTROLLER_P1_AUTO);
I have not programmed in C much but I assume due to changes in libraries since this the last time the homebrew was updated that CONTROLLER_P1_AUTO is deprecated now but I have no clue how to figure out what replaced it. The project does use SDL2 but it's not used in the main.c file (which is where this compile error is occuring). Any suggestions or ideas? I'm new to switch homebrew development but I really wanted to update this app because it's useful.

EDIT:
I also noticed I get these compile errors
warning: implicit declaration of function 'hidScanInput' [-Wimplicit-function-declaration]
warning: implicit declaration of function 'hidKeysDown' [-Wimplicit-function-declaration]
 

rash1613

Member
Newcomer
Joined
Apr 16, 2022
Messages
11
Trophies
0
Age
24
Location
New York
XP
114
Country
United States
I have recently installed Ubuntu and was setting up my development environment for DevKitPro. My project is to update a dead homebrew for personal use. I have installed all the switch libraries using dkp-pacman, and when I run make in the project's directory I get a bunch of errors but they all stem from the error:

I have not programmed in C much but I assume due to changes in libraries since this the last time the homebrew was updated that CONTROLLER_P1_AUTO is deprecated now but I have no clue how to figure out what replaced it. The project does use SDL2 but it's not used in the main.c file (which is where this compile error is occuring). Any suggestions or ideas? I'm new to switch homebrew development but I really wanted to update this app because it's useful.

EDIT:
I also noticed I get these compile errors
take a look at this example to see how button presses are read now
https://github.com/switchbrew/switch-examples/blob/master/hid/read-controls/source/main.c
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • S @ salazarcosplay:
    hunter x hunter
  • S @ salazarcosplay:
    he has not allowed anyone to continue it for him for example
  • Xdqwerty @ Xdqwerty:
    @salazarcosplay, theres a dragon ball af mod for budokai 3
  • Xdqwerty @ Xdqwerty:
    updated ship of harkinian, gonna install some hd texture pack
  • Xdqwerty @ Xdqwerty:
    I might download rayman revolution for my ps3
  • BigOnYa @ BigOnYa:
    I may try the new ram site, and download more RAM to my Switch. Not sure if ddr3 is the right ram
    for it tho. Edit- no it uses floppy Ram, just like @AncientBoi
    +1
  • Xdqwerty @ Xdqwerty:
    aeiou
  • BigOnYa @ BigOnYa:
    And sometimes Z
  • SylverReZ @ SylverReZ:
    @K3Nv2, MAGA supporters be wearing tin foil hats lol.
    +1
  • Xdqwerty @ Xdqwerty:
    @SylverReZ, whats maga?
  • BigOnYa @ BigOnYa:
    It stands for Maniacs Against General Acceptance
    +1
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, people rejecting general consensus about stuff?
    +1
  • BigOnYa @ BigOnYa:
    Yup, nuh its really just Trump followers
  • Xdqwerty @ Xdqwerty:
    @BigOnYa, im not american so i dont care about trump
    +1
  • Xdqwerty @ Xdqwerty:
    or us elections
  • BigOnYa @ BigOnYa:
    Me niether, us north Koreans don't care
  • Xdqwerty @ Xdqwerty:
    good night
  • BakerMan @ BakerMan:
    i don't care either, even if i'm american
  • BakerMan @ BakerMan:
    truth be told, i agree with psi, i dislike both candidates, but i'd probably vote trump simply because the economy was better during his presidency
  • AngryCinnabon @ AngryCinnabon:
    Just be careful, if trump ends up winning and using project 2025 America might really change...for the worse.
  • AngryCinnabon @ AngryCinnabon:
    I'm not american and even that sends shivers down my spine.
  • AngryCinnabon @ AngryCinnabon:
    anything that offers trump an opportunity to become an actual dictator
    is bad in my book, i could care less if it wasn't for that...
  • K3Nv2 @ K3Nv2:
    Canada: America's Russia
  • NinStar @ NinStar:
    people are so dramatic that I can't even tell if they are being serious
    NinStar @ NinStar: people are so dramatic that I can't even tell if they are being serious