The iPhone and iPad are fantastic gaming devices, but unfortunately a lot of games still try to emulate gamepads with onscreen buttons on the touch screen and it just doesn't work that well. Thankfully, a jailbreak app called Blutrol lets you turn a handful of different gamepads into controllers for any game with touchscreen buttons. Here's how to set it up.

What You'll Need

A PS3 Dualshock controller (note: you also need the SixPair tool for Mac or the SixaxisPairTool for Windows to pair the PS3 controller with your iOS device), Bluetooth Keyboard, Wiimote, Phonejoy, iCade, iControlPad, or iMpulse controller.

That's it. Now we just need to get your controller paired up with your device and working with your games.

Pair You Gamepad with Your iOS Device

First things first, we need to get the gamepad paired with your iOS device. We'll be using a PS3 controller, which takes an extra step. So, if you're using a different gamepad, skip this part.

How to Setup a PS3 Controller

The PS3 controller takes one additional step to get it working with your iOS device, but it's not complicated, and you only have to do it once. When you're done, your controller is paired with your iOS device every time.

Connect your PS3 controller to your computer with a USB cable and wait for the Bluetooth address to come up.

Once it's paired with your computer, get your iOS device's Bluetooth address by heading into Settings > About > Bluetooth. Enter that address into SixaxisPairTool and click update. Now your iOS device should be linked to your PS3 controller.

When it's successful, open Blutrol on your iOS device, tap the controller tab, select the PS3 controller, and tap "Connect." When it's connected, you can disconnect the PS3 controller from your Mac.

Now you can select your PS3 controller inside Blutrol as a Bluetooth device (if it doesn't appear right away, head into Settings > BTStack and select "BTStack" as the active Bluetooth system).

Pair Other Controller to Your iOS Device

Thankfully, other controllers don't take the extra step that a PS3 controller does. For the rest of the supported devices, just follow the directions for pairing that are included with the device (or just head into Settings > General > Bluetooth and make sure they're already recognized). Then open the Blutrol app, tap "Controller" and select your gamepad.

Set Up Blutrol for Any Game

Now that your iOS and gamepad are paired up together it's time to start playing games. Thankfully, this part's easy too, and you only have to do this once for each game.

Open up the game you want to use the controller for (obviously it makes the most sense to pick a game with onscreen buttons. We'll be using Sonic CD).

Take a screenshot of the game when the controls are displayed (tap the home button and power button at the same time).

Exit the game and open up Blutrol.

Tap the "Games" tab, and then the "+" sign.

Select the game you just took a screenshot of.

Tap either portrait or landscape (depending on how you took the screenshot), and select the screenshot you just took.

Tap "Add," select the controller of your choice, and then tap either landscape or portrait.

You'll now see your screenshot with your gamepad's buttons laid over it. Here, you're essentially assigning a button combination, so when you push a button on the controller, it "taps" the screen for you. Move the gamepad buttons to cover up the on-screen controls however you like (you can also resize the analog stick or d-pad with pinch and zoom). When you're happy with the setup, tap "done."

Now open up the game again, and start playing the game with the controller (if it has trouble, just force-quit the game and start over).

That's it! From now on you'll be able to easily pair your controller with your iOS device and start playing games. Just don't tell any of your friends on the leaderboards why you're doing so well. It also works with any app you want (not just games), so you might be able to come up with some other creative uses.