How do I lock the mouse to the screen in Sins of a Solar Empire: Rebellion?

I found a consistent workaround to this issue but for the life of me I can't figure out how to login to the Stardock forum to contribute there. Maybe this'll help someone. I hope google notices the relevance.

Anyway, here's how you can get the cursor to lock into the game screen:

  1. Start the game
  2. Go to options
  3. Go to the Video tab
  4. Check the "Use Window Mode" option
  5. Click the "Apply changes" button
  6. It will change the game into windowed mode and bring up a dialog asking if you want to save the changes
  7. Click "close" instead of "Apply".
  8. The game should go back to fullscreen mode, but now your cursor will be locked to the game screen.