Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Detecting Game Controller after program has started.

Author
Message
PeteyM5
17
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Buffalo NY USA
Posted: 19th Apr 2010 00:40
I am trying to set up an auto-detection subroutine for game controllers and joysticks. One issue I cannot figure out is how to detect a joystick after my program has started. Is there a way of re-polling the present game controllers during game play or when the game title screen is up? I am searching this thread to see if its possible. Otherwise I have to note that make sure your game controllers are plugged in before running a game.
The Viking
17
Years of Service
User Offline
Joined: 21st Oct 2008
Location: Asgard
Posted: 19th Apr 2010 05:23
At one point I too was trying to figure that out, and the only way I could figure out is to run a check for devices every second loop. Which I found to be a little overkill. But, if you want to only do it on the title screen, that could be do-able, though probably not during game play.

www.myspace.com/norseblod
SoftMotion3D
AGK Developer
20
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 19th Apr 2010 12:06
I think the only way is to restart your program.

If you start a program without devices installed they will not work untill your program gets restarted.

Development & Editting

Login to post a reply

Server time is: 2026-07-26 07:36:13
Your offset time is: 2026-07-26 07:36:13