chenall/grub4dos

grub4dos: splashimage only changes background once if animation was playing

steve6375 opened this issue · 13 comments

graphicsmode -1 800
set ANIMFD3=/ShuffleDancer.ima
set last=23
# 1st param - use 0x90 for looping+transparent background, use 0x10 for opaque background
# 2nd param is delay (1\18th second), 3rd is last frame number, 4th is x pos, 5th is y pos (in pixels), 6th is path to first frame
set ANIMATE=0x90=2=%last%=540=360 (fd3)/E2B/GrippingJampackedEthiopianwolf-max-1mb_frame_0001.BMP
map --mem  %ANIMFD3% (fd3)
map --hook
splashimage --animated=%ANIMATE%
splashimage /cat2.jpg

title  cat2
splashimage /cat2.jpg
errorcheck off
boot

title  wolf1
splashimage /wolf1.jpg
errorcheck off
boot

title reboot
chainloader /grldr
errorcheck off
boot

  1. Boot to menu - you will see cat2 and animation

image

  1. Now select wolf1 in menu
    background is changed and animation has stopped
    image

  2. Now select cat2 menu entry
    cat 2 is briefly displayed but then wolf1 is displayed again

image

It does work OK if you disable animation first:

  1. Reboot and press F2 to stop animation
  2. Select any background and it updates OK.

ANIMTEST.zip

When you are not using animation, you should turn it off.

You can add the command to close animation in the first sentence of the relevant menu.

How to?

  1. stop animation (same as press F2)
  2. change splashimage background picture
  3. re-enable animation on new background - (without needing to know original splashimage --animated=xxx command)
  4. Animation now plays on new background

????

command 'splashimage [file] or [fillcolour]' should do this automatically ???

title wolf1
splashimage --animated=0
splashimage /wolf1.jpg
errorcheck off
boot

After executing the "title xxx" menu, the animation stops. If you want to play it, you have to reload it.

Did you actually test my supplied files and see the reported problem?
Did you see the problem of 2nd splashimage working and it stops animation, but 3rd splashimage does not work and it restores first image?
If you will not fix the bug (step 3 original first post above - changing background for 3rd time causes background of 2nd time to be re-drawn), then please at least change the splashimage command so that it automatically disables animation whenever the background is changed and also change the help text to mention that any animation is disabled.

Is it difficult to add a command "splash image -- animated=0" to the menu?

Follow the menu I modified. Is the result different from what you expected?

The 2nd splashimage command already appears to stop the current animation. i.e. when you run the second splashimage command then the animation disappears and the background changes to image no. 2. However, if you then do a 3rd splashimage command, the background briefly changes to image no. 3 and then changes to image no. 1 !!! This is not expected behaviour.

So you are saying that every splashimage command given in any menu example ever published should be always preceded by a splashimage --animated=0 command because the user may or may not have an animation playing? All submenus that change the background must also precede it with a splashimage --animated=0 command.?

The splashimage command already seems to stop the animation, but a third splashimage command seems to not work. So whatever code is used in grub4dos to stop the animation seems to have a bug, because although the animation is stopped and the background image is changed successfully, if you do a third splashimage background change then the first background image is redrawn. Surely you can see that this is a bug? The safest thing to do is for the grub4dos splashimage command to fully disable the animation code.

My current method is definitely not the best solution. But meet your requirements. Execute the second menu, stop the animation and change the background image. Then execute the first menu to successfully change the background image. It will not change briefly and return to the original picture.

The splashimage xxx.jpg command should then always automatically disable animation? Then there is no need for extra commands. It ALREADY does seem to stop animation but there is a problem with a 3rd splashimage yyy.jpg command.
Do you not see that there is a bug in that the animation has not been fully disabled when the background has been changed for a 3rd time?

i.e. in the grub4dos source code, set animated-type=0 for a splashimage (bitmap) or (fill-color) command.
although there does not seem to be a problem with multiple fill-color commands.

Seems to be solved
grldr.rar.txt

Wow! That's great! No animation works even if background changed. Fantastic.

@steve6375 I am trying to report an issue with your e2b.

I tried describing the issue on forums, after signing up.
cannot post a new message as new user.
tried commenting to one of your posts.

all I wrote was lost, forum replied with "You must enter a message." tried posting again without the links. again, same refusal from your forums.

tried commenting on your blogspot. log in with google, comments are not allowed.

I don't see any other method to contact you.

@ grub4dos please accept my apologies for busting into your repo but this person seem very difficult to be contacted by new users.

@steve6375 please fix your forums to accept messages from new users. please fix e2b/ventoy, it throws an error when installing. screen recordings from beginning until the error:

https://transfer.sh/hjGkdd/explorer_QttBGfPxtk.mp4

https://transfer.sh/Voga4T/explorer_ZM2O0faWgp.mp4