Unfortunately, this process seems to be very slow (like a slideshow) on a real 060 Amiga. It works instantly on emulation, so it seems to be heavily CPU-bound.
I've tried adding DisableLineHook() and EnableLineHook() once it's done, but I didn't see much of a difference.
Here's the said function:
Code: Select all
Function p_SetPollStatus()
DisableLineHook() ; Temporarily disable this, to increase performance
If poll = True
;show relevant area
moai.Set("txt_poll_choice1", "Hide", False)
moai.Set("txt_poll_choice2", "Hide", False)
moai.Set("grp_poll_options", "Hide", False)
moai.Set("cmb_poll_duration", "Value", "1 day")
poll_options_num = 2
;when a poll is active, media cannot be used
moai.Set("btn_addmedia", "Hide", True)
Else
;hide relevant area
moai.Set("txt_poll_choice1", "Hide", True)
moai.Set("txt_poll_choice2", "Hide", True)
moai.Set("grp_poll_choice3", "Hide", True)
moai.Set("grp_poll_choice4", "Hide", True)
moai.Set("grp_poll_options", "Hide", True)
;clear any poll variables
moai.Set("txt_poll_choice1", "Text", Nil)
moai.Set("txt_poll_choice2", "Text", Nil)
moai.Set("txt_poll_choice3", "Text", Nil)
moai.Set("txt_poll_choice4", "Text", Nil)
poll_options = Nil
poll_options_num = 0
poll_expires = 0
poll_multi = False
;re-enable the Add Choice button
moai.Set("btn_add_poll_choice", "Disabled", False)
;re-enable the media button
moai.Set("btn_addmedia", "Hide", False)
EndIf
EnableLineHook()
EndFunction