Hero Background

Overlay Input Freeze Fix

How We Fixed the Overlay Input Freeze in the THGL Companion App

Published on 9/12/2025

🧩 The Issue

After releasing the rewritten THGL Companion App, some users began reporting that the overlay would stop responding to clicks after a few minutes — even though:

  • Hotkeys still worked perfectly
  • The map was still updating in real time
  • Restarting sometimes helped, but only for a few minutes

Interestingly, this problem wasn’t universal:

  • It happened frequently for some users while playing Dune Awakening
  • Others only saw it in Palia
  • Most players never experienced it at all

This made it very hard to reproduce and fix.

🕵️ What We Discovered

The overlay depends on low-level mouse input events from WM_INPUT.
However, these messages are posted to the same message queue as everything else in the overlay — including rendering, UI logic, and other work.

If the overlay process gets slightly overloaded (for example while rendering large map updates), the message queue can start backing up.
Once it fills up far enough, WM_INPUT stops being dispatched entirely, even though the rest of the app keeps running.

This explains:

  • Why it happened more often in heavier games like Dune Awakening
  • Why it sometimes showed up in lighter games like Palia
  • Why it never happened at all on faster PCs
  • Why the freeze didn’t occur immediately — the backlog slowly built up

⚡ The Fix

The solution was to move input handling into its own dedicated thread.

  • The input thread now receives all WM_INPUT events directly
  • It forwards them to the overlay window using PostMessage
  • This keeps input processing smooth and isolated from heavy rendering work

Since implementing this, testers have reported no further freezes — even after hours of use.

💡 Lessons Learned

  • Don’t run time-critical input logic on the same thread as rendering/UI
  • WM_INPUT can silently stop arriving if the main queue is congested
  • Having a community willing to test builds is invaluable 🧡

📦 THGL Companion App Rewrite

This fix shipped as part of the larger rewrite of the THGL Companion App:

  • 🧠 No more game injection (safer, more stable)
  • 🎯 Much lower memory usage and CPU load
  • 🗺️ Support for new games like Dune Awakening
  • 🐛 Fixes for various issues (like missing fish locations and weekly wants)

If you’re happy with the Overwolf version, you can keep using it —
but if you want the new architecture and fixes, try the Companion App!

Referenced topics

  • WM_INPUT
  • PostMessage
  • RegisterRawInputDevices
  • message queue
  • input thread
  • THGL Companion App
  • Dune Awakening
  • Palia
  • Overwolf
← Back to Blog