Hello,
im not necessarily new to c++ but i cant seem to find a good way to get input from other devices other then the keyboard. To get keyboard input i have been using GetAsyncKeyState(); i was wondering if there was a similar function to get input from other input devices such as game pads or the proprietary buttons found on most laptops and keyboards these days (Media Direct buttons, volume up, down, skip, launch internet browser, etc)
i read somewhere about DirectInput(); but i dont no if its exactly what im looking for, any incite?

thank you in advance,
--twek

Recommended Answers

All 2 Replies

You can use SDL:

Simple DirectMedia Layer (SDL) is a cross-platform, free and open source software multimedia library written in C that presents a simple interface to various platforms' graphics, sound, and input devices, allowing a developer to write a computer game or other multimedia application that can run on many operating systems including Linux, Syllable, Haiku/BeOS, Windows, Mac OS X, AmigaOS and its clone MorphOS. It manages video, events, digital audio, CD-ROM, sound, threads, shared object loading, networking and timers[1].

This site has tutorials about it.

thanks, ill look at it tmrw this does look like a better alternative then directx lol but can i use it to access my media direct hardware button on my laptop?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.