Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TIP] Adding Pre-Set Screen res for 4k Display (Fixes no run older Games) #3496

Open
LiveFreeDead opened this issue Sep 10, 2024 · 0 comments
Labels
Feedback Feedback from the community.

Comments

@LiveFreeDead
Copy link

LiveFreeDead commented Sep 10, 2024

I've made a script that allows me to run Old games, so many of my old games are 640x480 or low res and due to having a 4K screen it would either crash, not bring up anything at all or be a tiny windows in the centre of the screen.

  • NOTE: This is mainly for nVidia users as AMD and Intel do not have problems with mode setting like nVidia seems to with WINE. But could be useful for other uses, such as making FPS faster by reducing the desktop res in newer games also.
#!/bin/bash

# Resolution Fix
WID=$(xrandr --current | grep current | awk '{print $8}')
HIT=$(xrandr --current | grep current | awk '{print $10}')
Res="${WID}x${HIT}"

BINARY="$HOME/.wine/drive_c/ppGames/Insaniquarium/Insaniquarium.exe"

cd "$HOME/.wine/drive_c/ppGames/Insaniquarium"

xrandr -s 800x600
$(wine explorer /desktop=name,800x600 "$BINARY")

xrandr -s $Res
exit 0

What this script does is;

  1. Gets the current desktop Screen Resolution
  2. Changes the screen resolution to 800x600
  3. Runs the game and waits for it to close
  4. Return the screen resolution back to the original desktop res.

This has fixed MANY of the older games I have, due to me making my own Launcher I don't have hard coded paths to things and I allow the user to pick 640x480, 800x600, 1024x768, 1920x1080, Desktop and a few other standard resolutions. This make a majority of WINE apps run that otherwise would not have done, unless I manually changed the screen resolution prior to running my game. This will be a bigger problem in the future as more people get higher DPI screens and I thought I;d offer a solution so that Bottles users could make use of it in the mean time and so the Bottles Devs could consider a better way to include these kinds of options in their Launcher. Of cause this wont be a problem for the high refresh rate users who still run FHD 1920x1080 screens, but those who have a 2k or 4k screen may not have known why so many more of their WINE apps that work on low end laptops or older PC's were working fine.

I hope this is useful to someone.

@LiveFreeDead LiveFreeDead added the Feedback Feedback from the community. label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Feedback from the community.
Projects
None yet
Development

No branches or pull requests

1 participant