One user on the GTAForums noted that this method worked for them, though not always consistently: "Often the mouse will work when I make the game run on only one processor. But far from always, the success rate is perhaps around 75%".
GTA San Andreas was designed for single-core processors. Modern PCs use multi-core CPUs. When the game engine tries to process mouse input across multiple cores simultaneously, the timing desynchronizes, causing the mouse to freeze.
Alternatively, download a standalone dinput8.dll mouse fix zip file from reputable community forums. Step 2: Extract the ZIP Archive
Restart the game and check if your mouse works properly.
Grand Theft Auto: San Andreas remains a masterpiece of open-world gaming. However, running this 2004 classic on modern operating systems like Windows 8, 8.1, or Windows 10 frequently introduces a frustrating problem: the mouse completely stops working. You might find yourself able to walk around using the keyboard, but looking around or clicking menus becomes impossible.
Paste it directly into the main GTA San Andreas folder (where gta_sa.exe is located).
Check the boxes for "Disable visual themes" and "Disable desktop composition".