#SCALEMODE_NONE resizing takes effect with delay, expected behavior?

Discuss any general programming issues here
Post Reply
Bugala
Posts: 1329
Joined: Sun Feb 14, 2010 7:11 pm

#SCALEMODE_NONE resizing takes effect with delay, expected behavior?

Post by Bugala »

I am not putting example code yet, as I am first checking if this is simply expected behavior, plus, this isn't causing any actual problems at this point to me yet, although it might in future.

I have a program that is expected to be run on 1920x1080.

I noticed that if I choose Scalemode as #SCALEMODE_NONE (or at least I suppose this is the cause), and if I then choose to run it on a window of, for example, size 640x480, then it shows only part of the screen, just like expected.

As in, If I am drawing graphics to 1920x1080 area, and I am having a display of 640x480 window, and #SCALEMODE_NONE, then I should only see the 640x480 part of graphics, and not see anything beyond X640 and Y480.

I have this double buffered display and using SetInterval, it keeps drawing the screen continously.

Now odd thing is that when I also have a Resizing as an option, and I then resize the window to for example 1920x1080 size, I still only see 640x480, which might well be intended behavior, but strange part is, that If I then continue to next part of the game, clicking "New Game", suddenly it then shows the 1920x1080.

I am wondering if this is intended behavior, or if this is caused by for example because of Ending and Starting DoubleBuffering or something like that. That by Ending and Starting Double Buffering it perhaps checks the size of the window again and hence starts showing it as it should?

And tested on Windows 11 Hollywood 10.
plouf
Posts: 613
Joined: Sun Feb 04, 2018 11:51 pm
Location: Athens,Greece

Re: #SCALEMODE_NONE resizing takes effect with delay, expected behavior?

Post by plouf »

if you use #SCALEMODE_NONE , means you have NOT enable scaling engine
the scaling engine is what it is keep display size "fixed" programmatically but change physical size and resize content but scaled (internal done by hollywood)
so in this case if you resize prommatically or user resize window with mouse, @DISPLAY size change and new size over "1920x1080" dispayed

so it depends in this "resize option" where it is, and what it does :)
Christos
Post Reply