Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
478 stars 77 forks source link

rttr graphics/resolution problems on windows 10 #235

Closed kyromaster closed 8 years ago

kyromaster commented 9 years ago

rttr works fine on linux but on windows there're problems:

When I start it it's in 800x600 windowed winapi mode which is the only resolution working.

When I switch to 1366x768 resolution windowed I get this: winapi_windowed_1366x768

When switching to fullscreen I get this: winapi_fullscreen_1336x768

When trying out sdl it works only windowed (fullscreen isn't saved until next start of rttr) and gives this: sdl_1366x768

I've an acer notebook with windows 10 x64. Integrated intel graphics and discrete nvidia 840m graphics card. I haven't had any similar issues with other games.

Flow86 commented 9 years ago

since I dont use windows 10 yet, I cant reproduce the problem here.

Most of these problem occur if the installed graphics driver does not have a correct opengl support. Try to install the latest proprietary graphics driver package for your graphic card(s), perhaps the issue is resolved then.

whats your native display resolution?

kyromaster commented 9 years ago

The native resolution is 1366x768. The newest graphics drivers are installed and I didn't have the problems with any other games. Fortunately it works on linux :)

Flamefire commented 9 years ago

Would you happen to be able to help us with that? You'd need a Visual Studio version on your windows 10 PC and try to compile the program yourself. The instructions should be sufficient to do so, if anything is missing or you have problems tell us so we can extend the manual. After it compiled I'd like to go through some debugging with you (I don't have a Win 10 PC here so I can't test it myself but this should be fixed before release)

kyromaster commented 9 years ago

Good idea, that's what I also wanted to propose ;) I'll install the free VS2015 Community Edition and try to compile rttr.

Flamefire commented 9 years ago

I'll be home in about 6.5-7.5 hours. Where are you from? Would you happen to be able to join IRC at that time? Just tell me your name or PM me in IRC then.

kyromaster commented 9 years ago

I searched the site but I just can't find the instructions for compiling rttr. Where are they? I just have one or two hours per day time at a computer, and no IRC client installed or ever used. But I can of course install it.

Flamefire commented 9 years ago

Check the readme: https://github.com/Return-To-The-Roots/s25client (scroll down to "How to build")

IRC: You can use the web client at: http://siedler25.org/index.php?com=dynamic&mod=3

kyromaster commented 9 years ago

Unfortunately the build didn't work. I chose the configuration "debug->x64" and got about 500 errors divided into:

Severity Code Description Project File Line Error C1189 #error: Macro definition of snprintf conflicts with Standard Library function declaration s25util C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h 1927

Severity Code Description Project File Line Error C2220 warning treated as error - no 'object' file generated (compiling source file C:\Users\Michael\Desktop\s25client\src\CatapultStone.cpp) s25client C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h 1925

And then some linker errors which are IMHO caused by the above errors.

Flamefire commented 9 years ago

Got to check those, but need VS2015 first. I think @Spikeone compiled rttr with VS2015 successfully before?

Spikeone commented 9 years ago

No, I didn't but I may use my VM to compile RttR then - On the other hand, got no graphics card then

Flamefire commented 9 years ago

@kyromaster The latest version can be compiled with VS2015 now. You have to unpack the contrib archive again. Try again please. BTW: Don't use x64 (in cmake and VS) I'm pretty sure this won't work ATM as all libraries in the contrib folder are x86.

kyromaster commented 9 years ago

I finally managed to compile rttr in x86 mode :) The executable is now in build/src/Debug, where do I have to copy the contents from s2?

Flamefire commented 9 years ago

Into the build folder. Then you can simply run rttr (ALL_BUILD should be marked in bold)

kyromaster commented 9 years ago

Finally it works. So now we can start debugging this.

kyromaster commented 9 years ago

I found a fix :) In the "compatibility" tab of s25client.exe, enable "disable scaling with high DPI" and everything works fine.

Flow86 commented 9 years ago

ah, okay we should perhaps add it in the application manifest, or using the winapi to disable that automatically

http://stackoverflow.com/questions/13858665/disable-dpi-awareness-for-wpf-application

https://msdn.microsoft.com/de-de/library/windows/desktop/ms633543%28v=vs.85%29.aspx

Flamefire commented 9 years ago

Can't this be solved "correctly" in the code? Otherwise I'd choose the manifest.

Flow86 commented 9 years ago

in the msdn article they say that the manifest is the prefered method

Flamefire commented 8 years ago

@kyromaster Can you try again with new version and without the compatibility setting?

kyromaster commented 8 years ago

Everything works fine now :) Thanks for fixing this!

Flamefire commented 8 years ago

You are welcome! Happy new year!