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

puNES 0.108 fullscreen is wrecked #186

Closed
TCH68k opened this issue Jan 3, 2022 · 15 comments
Closed

puNES 0.108 fullscreen is wrecked #186

TCH68k opened this issue Jan 3, 2022 · 15 comments

Comments

@TCH68k
Copy link

TCH68k commented Jan 3, 2022

If i try to play in fullscreen with puNES 0.108, then i get this result:

http://oscomp.hu/depot/punes_fullscreen_108.png

In 0.107 this works:

http://oscomp.hu/depot/punes_fullscreen_107.png

Fullscreen is set to use "desktop resolution" which is 1920x1080.

@TCH68k
Copy link
Author

TCH68k commented Jan 5, 2022

The function gfx_set_screen() at src/video/opengl/gfx.c:115 fails to set the dimensions of the window to the screen's if the preferred resolution is "desktop" or manually set to the desktop's.
(Also, the puNES.cfg config file has a typo in the variable name "use integer scaliung in fullscreen".)

Update: Or perhaps the Qt5 call showFullscreen(); at src/gui/mainWindow.cpp:1745 fails to set the size correctly...
But one thing is sure: if the preferred fullscreen resolution is equivalent to the desktop's, then the window size will be as the same as it is in windowed mode. If it is set to something else (e.g.: 1280x960), then it works.

@punesemu
Copy link
Owner

punesemu commented Jan 6, 2022

Hi TCH68k, I'll check it out when I get home, I'm out for a few days. Take away a curiosity, what version of QT are you using? I don't want it to be a bug of some old version of the libraries

@TCH68k
Copy link
Author

TCH68k commented Jan 6, 2022

It's Qt 5.7.1, but the very same showFullscreen() works in puNES 0.107. I figured it out that if i "inject" width = 1920, height = 1080; into gfx_set_screen() before the gfx.w[VIDEO_MODE] and gfx.h[VIDEO_MODE] is set, then it will resize the window correctly in fullscreen, but then it will have the same size in windowed mode too. It seems that this (i mean the injection causing a fix size) happens, because VIDEO_MODE is always 3, regardless if i'm in windowed mode, or fullscreen mode and regardless of the physical resolution, whether it is 1920x1080 or 1280x960 or anything else.

@punesemu
Copy link
Owner

I need to recreate the problem, can you kindly tell me your configuration? What OS do you use?

@TCH68k
Copy link
Author

TCH68k commented Jan 10, 2022

Devuan 2 AMD64 (Debian 9 without systemd).
Kernel is "4.9.0-16-amd64 #1 SMP Debian 4.9.272-2 (2021-07-19) x86_64 GNU/Linux"
Qt is 5.7.1
CMake is 3.13.5
GCC is 6.3.0
nVidia driver is 470.57.02

@punesemu
Copy link
Owner

Ok, I'll try to install it on a VM. I will keep you up to date.

@TCH68k
Copy link
Author

TCH68k commented Jan 10, 2022

Thanks.

@punesemu
Copy link
Owner

Which desktop environment do you use?

@TCH68k
Copy link
Author

TCH68k commented Jan 10, 2022

Well, Trinity Desktop Environment, but that should be irrelevant. However what is relevant, that i use X11 and not Wayland.

@punesemu
Copy link
Owner

I installed the Devuan 2.0 ascii with the DE Mate and I couldn't reproduce the problem then, just out of curiosity, I installed Trinity and finally the problem appeared. Now I can finally try to understand.

@punesemu
Copy link
Owner

@TCH68k
Copy link
Author

TCH68k commented Jan 11, 2022

Thank you, it fixes the problem. I am surprised though. What was the bug Trinity caused? puNES uses zero stuff from the Trinity ecosystem and as for the underlying system, it's just X11. What changed since 0.107?

@punesemu
Copy link
Owner

In qt.cpp in the gui_set_window_size() function I set the size of the main window to the size I want. For some reason the trinity WM, only with the switch to fullscreen mode, does not update the size if I don't reset the min and max size of the window with reset_min_max_size (). Compared to 0.107, all the management of the fullscreen has changed to support the change of resolution.

@TCH68k
Copy link
Author

TCH68k commented Jan 11, 2022

That's interesting. If you change the resolution, then it did worked without resetting the min/max sizes. I don't know if it's a bug in Qt5 or Qt3 (more precisely TQt) what the TDE uses. I will report this to them, just in case. And thank you for the fix.

@TCH68k
Copy link
Author

TCH68k commented Jan 11, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants