gitwtfhub

wtf is pad-of-time?

mrnecromancer247/pad-of-time — explained in plain English

Analysis updated 2026-05-18

0C++Audience · generalComplexity · 3/5Setup · moderate

TL;DR

A DLL proxy that gives Prince of Persia: The Sands of Time working modern gamepad support on Steam and GOG.

Mindmap

mindmap
  root((Pad of Time))
    What it does
      Fixes gamepad support
      Intercepts DirectInput
      Adds menu mouse mode
    Tech stack
      C++
      SDL2
      DirectInput
    Use cases
      Play with Xbox controller
      Play with PlayStation controller
      Navigate menus with a pad
    Audience
      PC gamers
      Prince of Persia fans

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Use a modern Xbox or PlayStation controller with Prince of Persia: The Sands of Time

REASON 2

Fix bad deadzones and unresponsive sticks in the game's native controller support

REASON 3

Navigate the game's pause menu with a controller using the built-in mouse mode

REASON 4

Troubleshoot controller detection issues with the bundled logging and raw fallback mode

What's in the stack?

C++SDL2DirectInput

How it stacks up

mrnecromancer247/pad-of-timeachanana/mavsdkalange/llama.cpp
Stars00
LanguageC++C++C++
Last pushed2024-05-20
MaintenanceDormant
Setup difficultymoderatemoderatemoderate
Complexity3/54/54/5
Audiencegeneraldeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires turning off Steam Input and using the bundled SDL2.dll version for controllers to detect correctly.

Wtf does this do

Pad of Time is a small piece of software that adds proper modern gamepad support to the PC release of the classic game Prince of Persia, The Sands of Time, on both Steam and GOG. The game's original code only understands older joystick technology, so modern Xbox and PlayStation style controllers either do not get recognized at all or feel wrong when you try to use them, with bad dead zones and unresponsive sticks. The tool works by pretending to be a system file the game already expects to find, called dinput8.dll, and then quietly stepping in front of the game's real communication with your controller. Rather than replacing how the game talks to controllers entirely, it lets the game create its own normal connection to the controller hardware as usual, then intercepts and corrects a handful of the values passed back and forth, so the game sees clean, properly calibrated input. It never touches the game's keyboard and mouse handling, and it does not modify the game's actual executable file or hardcode anything specific to a particular version, which is why it works on both the Steam and GOG releases without changes. To use it, you download the release from GitHub, drop the files into the same folder as the game's executable, turn off Steam's built in controller remapping so it does not interfere, plug in your controller, and then bind it inside the game's own controller settings menu using the button layout the README provides. Because the original game does not let you navigate its menus with a controller at all, the tool also adds a special mode, toggled with the Select button, that turns the right stick into a virtual mouse for working the pause menu. The project ships with a specific version of a library called SDL2 that handles talking to the controller hardware, and the README is explicit that using an older version of that library will cause controllers to be misdetected. It also includes a settings file for adjusting things like stick dead zones, camera sensitivity, and logging for troubleshooting, along with a fallback mode for controllers that still are not recognized properly.

Yoink these prompts

Prompt 1
Walk me through installing Pad of Time next to POP.exe and turning off Steam Input
Prompt 2
Explain how Pad of Time intercepts DirectInput calls without patching the game executable
Prompt 3
Help me tune the MoveDeadzone and CameraSensitivity settings in PadOfTime.ini
Prompt 4
Show me how the Select button menu mouse mode works for navigating pause menus

Frequently asked questions

wtf is pad-of-time?

A DLL proxy that gives Prince of Persia: The Sands of Time working modern gamepad support on Steam and GOG.

What language is pad-of-time written in?

Mainly C++. The stack also includes C++, SDL2, DirectInput.

How hard is pad-of-time to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is pad-of-time for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.