+BitJag Posted February 6, 2021 Share Posted February 6, 2021 I have ran into this problem a few times running VJ in Linux, specifically Kubuntu 18.04 and later over the last few years, where the image of the game being played doesn't fill the window size or fullscreen properly. I have found a solution modifying the source for VJ, but I wanted to ask if there might be a simpler way of altering the code to achieve the same fix. I also wanted to make this post with the solution I have been using in case anyone else out there might be running into the same problem, and there isn't a better way to do this currently. Below is an image of what I am experiencing when opening VJ, and it holds true when playing a game windowed or in full screen. I am using version 2.1.3(final) source from the git repository. Here is a solution I am currently using to fix this. Before building Virtual Jaguar perform the following modifications to the source code: /src/gui/mainwin.cpp - Add the following line in the function MainWin::SetFullScreen, below the line where int newWidth is initialized. The line looks like this "int newWidth = (int)(aspectRatio * (double)r.height());". newWidth *= 2.2; Then alter the line just below, that looks like this "videoWidget->offset = (r.width() - newWidth) / 2;", multiplying r.width() by 2.2. It should now look like the line below. videoWidget->offset = ((r.width() * 2.2) - newWidth) / 2; /src/gui/glwidget.cpp - Now we need to multiply width() and hieght() function calls by 2.2, do this by altering the following lines. outputWidth = width(); --> changes to --> outputWidth = width() * 2.2; unsigned outputHeight = height(); --> changes to --> unsigned outputHeight = height() * 2.2; EDIT: I forgot to mention that the value 2.2 is a bit arbitrary according the the global scaling on your desktop. I actually don't know how to find the exact value you need according to a specific global desktop scaling. But raising and lowering the value should get what you are looking for. For example, 2.2 is scales the image a bit beyond the window and fullscreen borders, so I dropped it down to 1.75, and if fits great now. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.