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

Windows scaling issue #6

Open
naymapl opened this issue Mar 9, 2022 · 6 comments
Open

Windows scaling issue #6

naymapl opened this issue Mar 9, 2022 · 6 comments

Comments

@naymapl
Copy link

naymapl commented Mar 9, 2022

Hello.
I have problem with window of app scalling - is so huge. core/app.cpp hot to change there scaling to two times smaller window ? Thank you for any help.

@indianakernick
Copy link
Owner

Hey there. I hope you’re finding this project to be useful and informative.

If the window is so large that it doesn’t quite fit on the screen, then that could be due to using a version of SDL earlier than 2.0.5. If the window fits on your screen and you simply want it to be smaller, you can edit getScaleFactor (inside src/core/app.cpp) to return a smaller scale factor. For example:

int getScaleFactor() {
  return 2;
}

The scale factor that the game is choosing is printed on startup. Hope that helps!

@naymapl
Copy link
Author

naymapl commented Mar 10, 2022

Thanks for reply. I try to change it but always when I try to run game is Using scale factor: 7

Zrzut ekranu 2022-03-10 o 09 12 56

Zrzut ekranu 2022-03-10 o 09 12 38

@indianakernick
Copy link
Owner

I’m sorry. I’m having trouble understanding your problem. Did you edit the file, save the file, and compile? You want the window to be smaller?

@naymapl
Copy link
Author

naymapl commented Mar 13, 2022

I’m sorry. I’m having trouble understanding your problem. Did you edit the file, save the file, and compile? You want the window to be smaller?

Sorry for bad explain. Like you wrote - I want window smaller. Yes - I make changes before compiel and window always use factor scalling:7 ;) So is so big.

Is HDPi screen can make a issue with the scalling ?

@indianakernick
Copy link
Owner

indianakernick commented Mar 13, 2022

The only problem I can see here is that you’re making a mistake with editing the file, saving the file, or compiling. Make sure that after you save the file, you only do cmake --build . and nothing else. The screenshot of the game on top of your terminal window suggests otherwise.

HiDPI is a good point actually. I never tested this on a HiDPI display because I didn't have one at the time. If I look closely at the screenshot, I can see that the edges of the pixels in the game are a bit blurry. The scale factor is 7 but the pixels are actually 14x14. I think I might look into fixing that. However, I don't think this is the problem you're facing.

@indianakernick
Copy link
Owner

Did you manage to solve this? Is there something I can do?

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