kroyee / SpeedBlocks

Fast paced tetris game cloned from Cultris II
GNU Lesser General Public License v3.0
11 stars 7 forks source link

[FN] If Fullscreen and Screen Resolution to high - > Game is inaccessible #8

Open zDEFz opened 7 years ago

zDEFz commented 7 years ago

Steps to reproduce

  1. Make sure you have a very high Screen Resolution (in my case i use the DSR factors)
  2. Tick Fullscreen
  3. Click Apply
  4. Open Cultris II Fullscreen Game with another resolution than the game has
  5. Alt Tab to the game

Expected result

I can set options use the sliders and so on

Actual result

I need very large distance in order to change settings. Users who have DSR Factors activated can't set another settings properly.

kroyee commented 7 years ago

Could you clarify this a bit. What are you seeing/not seeing and what is not working?

kb1900 commented 7 years ago

here is a video of the issue: https://www.youtube.com/watch?v=_GVFLcphg5c&feature=youtu.be

@kroyee

kroyee commented 7 years ago

Not sure if this is something I can fix, but I will pass the question on to someone with more insight. If this bricked the game just remove the config.cfg and restart the game. This should restore standard settings.

zDEFz commented 7 years ago

It does indeed brick the game. Whatever - config.cfg doesn't get recreated if i change settings. So basically at the moment we are also missing an option to save Configurations Removing the config file will load default settings.

kb1900 commented 7 years ago

my config settings do get saved. it se\ms that this only happens if there is a crash. crash = config needs to be deleted and settings need to be reinputted.

zDEFz commented 7 years ago

Other problem reported by angsthas3 https://www.youtube.com/watch?v=3czt2kZDqlA

kroyee commented 7 years ago

Is he changing resolution or just tabbing back and forth between two windows?

zDEFz commented 7 years ago

He is just tabbing to the cultris window which has another resolution.

If you look at my issue that is bricking the game - it seems a general scaling problem - i could move the window further than my game was. -> Could move mouse cursor into the void.

kroyee commented 7 years ago

I can't reproduce this. Your issue is most definitely connected to the DSR factors. I'm not sure if it is a problem with SFML or just TGUI though. We would need to do a simple test with the mapPixelToCoord function on your computer to establish that.

Angstahs issue on the other hand seems to be with something else. Possibly the "resizing" function that tries to keep the aspect ratio of the window. It's very hard for me to tell when I can't reproduce it on my own computer.

kroyee commented 7 years ago

You could tell him to comment out this section of the code in main.cpp

else if (event.type == sf::Event::Resized && gui.options->currentmode == -1) {
    resizeWindow(view, event);
    window.setView(view);
    gui.gui.setView(view);
}

it should appear 4 times in the main event loop. See if that removes the issue.

zDEFz commented 7 years ago

@kroyee i can give you access to my some windows machine if you want. DSR Factors does just mean that the default resolution can be very high.

The real problem here is that you exclude people with multi monitor setups. Please understand this and try to fix it.

Why don't you use the actual resolution? Instead using the highest available in the system ?

I go ahead and try myself.

kroyee commented 7 years ago

I'm not excluding anyone. I simply don't know how to fix it.

zDEFz commented 7 years ago

Can you rerender - automatically fit the window to the current used resolution after getting the game in focus / refocus? And after the screen resolution has changed as well

It did not fix it.

After going into the cultris window and switching back your game thinks we are on the low resolution. So it displays only a part of the actual game instead of applying the lower resolution.

This is happening:

C2 = 800x600 Fullscreen

Speedblocks = 2560x1440 Borderless Fullscreen

Open C2 (800x600) ALT TAB to Speedblocks

Speedblocks is not refitting it's content to the actual window resolution -> FAIL

Speedblocks should re-fit its content after each re-focus

Do you want access to a real machine ? Can we share screens somehow? If that helps? I could possibly give you remote access to my system.

jefgenowitsch commented 7 years ago

I did try the bugfix from @zDEFz and the problem still exists.

kroyee commented 7 years ago

@texus would you have any ideas about this?

texus commented 7 years ago

I have no idea. I tried earlier but I couldn't reproduce what what was shown in the youtube link that kb1900 posted.

zDEFz commented 7 years ago

@kroyee please create a windows installation as second boot option or ask us. We have sufficient systems to test on.

I reproduced this issue on Windows 7 x64, Windows 8.1 x64 and Windows 10 x64

texus commented 7 years ago

Maybe https://github.com/SFML/SFML/issues/679 is related? The issue was solved for windowed mode but apparently there is still an issue in fullscreen.

zDEFz commented 7 years ago

With DSR Factors disabled i can go into fullscreen BUT if i switch to cultris II which has lower res for example and reopen the game again it has the wrong scaling!

I don't quite get how this is Hardware related if i can reproduce it on many devices already + the device of angsthas3.

Another issue: Change your OS resolution while the game is running and get it to focus again. The game will flicker like hell lot but with right scaling though.

kroyee commented 7 years ago

In this post I found the following information:

Disabling autoscaling in the programs properties menu resolves these issues.

You can see the flag by right clicking on an exe or shortcut: Properties -> Compatibility -> Disable display scaling on high DPI settings

Maybe you can try this. They are also currently working on a solution for this in the SFML repo.