some old game’s full screen is broken, just left up corner, so need some tools to scale it.

gamescope

On Linux it’s gamescope, but currently it’s broken.

Other method

we can lower the resolution, for example, 1280x720, then the game window looks larger.
but it’s hard to recover it after using the game.
had better to do it automatically.

xrandr

on Xorg, we use xrandr to adjust resolution, but on Wayland, we use other tools.
this guy give a tool, and it works well, in my case, it’s
but we want archive this:
when click a script
  1. lower resolution
  1. play game
  1. recover it

recover the resolution

Since quit a game is actually “failure”, so use
if a process doesn’t exit successfully, it return any number except 0, so in shell, 0 is true, any other is false, use || to handle this case.
and now it works pretty well, just like some very old game which will try to set the resolution to 800x600 to be fullscreen, but we did it in a linux way :)
 
Loading...
Steven Lynn
Steven Lynn
喂马、劈柴、周游世界
最新发布
我与 Dify 的半年
2025-3-9
我的2022年终小结
2024-11-9
记录雅思考试经历与一点学习心得
2024-11-9
Hackergame 2024 思路小结
2024-11-9
黑客松、日本、入职:我的2024下半年的总结
2024-11-9
NotionNext:基于Notion和NextJS的开源博客
2024-11-9