jcaishere
jcaishere
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
so that i can try reducing cpu usage
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
feels like i have to make a custom event-driven system in my program
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
i learned something here
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
but
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
2+ joysticks just don't work
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
i got back to that old error
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
yeah
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
hm
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
yep
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
let me try to put it on the test.
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
hm
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
it did somehow work but i have a bad feeling that SDL.SDL_JoystickGetButton(_joystick, 0); will be also detected by other joysticks
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
im using specific buttons only
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
well, this is like
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
does this work fine?
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
@R
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
this is kind of what i did:
void OnPressed(int button)
{
if (_productId = 1111)
{
for (int i = 0; i < 27; i++)
{
byte button0 = SDL.SDL_JoystickGetButton(_joystick, 0);
byte button1 = SDL.SDL_JoystickGetButton(_joystick, 1);
byte button2 = SDL.SDL_JoystickGetButton(_joystick, 2);
byte button3 = SDL.SDL_JoystickGetButton(_joystick, 3);

if (button0 == 1) { Console.Write("\nOff"); }
if (button1 == 1) { Console.Write("\nLeft"); }
if (button2 == 1) { Console.Write("\nCenter"); }
if (button3 == 1) { Console.Write("\nRight"); }

}
}

}
void OnPressed(int button)
{
if (_productId = 1111)
{
for (int i = 0; i < 27; i++)
{
byte button0 = SDL.SDL_JoystickGetButton(_joystick, 0);
byte button1 = SDL.SDL_JoystickGetButton(_joystick, 1);
byte button2 = SDL.SDL_JoystickGetButton(_joystick, 2);
byte button3 = SDL.SDL_JoystickGetButton(_joystick, 3);

if (button0 == 1) { Console.Write("\nOff"); }
if (button1 == 1) { Console.Write("\nLeft"); }
if (button2 == 1) { Console.Write("\nCenter"); }
if (button3 == 1) { Console.Write("\nRight"); }

}
}

}
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
let me try to clear something up
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
okay
319 replies
CC#
Created by jcaishere on 3/20/2024 in #help
SDL2 Joystick issues
rather than getting the i
319 replies