pumpitupdev / pumptools

A collection of tools to run Pump It Up games.
The Unlicense
22 stars 7 forks source link

Prihook: Fix fullscreen bug when running on desktop #21

Open voidderef opened 3 years ago

voidderef commented 3 years ago

In GitLab by @icex2 on Jul 24, 2020, 20:15

The game always goes to fullscreen no matter what and messes up the desktop. It switches to the native resolution but does not show the content of the render window but the desktop in the changed resolution. Furthermore, the game is a bitch and grabs the keyboard which does not allow us to exit it on the same xsession anymore. So we have to get rid of that keyboard grabbing, first. Then, figure out why the game does not properly window.

voidderef commented 3 years ago

In GitLab by @icex2 on Jan 1, 2021, 13:12

Update: Above is not entirely true. If you start the game with a fresh PIUPRIME.INI config file by simply deleting your old one, the game goes into 640x480 in a window on desktop.

Comparing the executables F2 to Prime, the devs added some more code for handling 1280x720 mode which uses some X11 specific features to do...something. This code is located in a function that calls XCreateWindow. This is controlled by two factors:

This needs further investigation how it's done in order to create proper blocking code for desktop machines to run the game properly in window mode. Fortunately, there are just a few new functions added to run the screen resolution switching logic, so the scope is rather small.