Jump to content

[Fix] Highres Scalings


efuturetoday
 Share

Recommended Posts

Hello all,

ich discovered a strange issue with the scaling of the assests:

i had the feeling, that the game scaling multiplier for highres assests was one level to low.

So i checked the code and found this:

 for (var i = 2; i <= game.System.hires; i *= 2) {            if (window.innerWidth >= width * i && window.innerHeight >= height * i) {                this.hires = true;                game.scale = i;            }}

i think there is a semantic issue: when u check if the current hires that the loop checkes is to LOW then apply this hires.

I fixed this issue with this code:

        for (var i = 1; i <= game.System.hires - 2; i *= 2) {            if (window.innerWidth >= width * i && window.innerHeight >= height * i) {                this.hires = true;                game.scale = i * 2;            }        }

and now all is working as expected!

Was this a bug or do i use the engine scaling wrong? 

 

Sorry for my english. Hope this helps

 

Greetings from Germany!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...