Well, after adding my small fix to the toggle_fullscreen function, it won't
just go out of fullscreen if the user presses enter again, however it won't
go out of full screen if the user presses alt-enter. They have to do it
twice then it goes out.
Not too big of a deal, but something still seems to be wrong...
Phil
Phil Hassey <philhassey@xxxxxxxxx> wrote:
get_pressed also reports the incorrect value. I think this is either a
pygame or SDL issue.
However, I found that if I use pygame.key.set_mods(0)
to reset the keyboard mods, that appears to fix the issue for the most part.
Kind of a hack though...
Phil
Luke Paireepinart <rabidpoobear@xxxxxxxxx> wrote:
Phil Hassey wrote:
> Hi,
>
> I noticed that when I used the sample:
>
>
http://www.pygame.org/wiki/toggle_fullscreen?parent=CookBook
>
> To control my fullscreen toggling, after I went into full screen, I
> could often just press enter (without the ALT) to get back to windowed
> mode. After some playing around, it appears that either pygame or SDL
> misses the ALT key-up event while switching into fullscreen mode... I
> was able to reproduce this issue on both a linux and win32 system.
>
> Any suggestions? Am I doing something wrong in my toggle_fullscreen code?
if you're using a separate variable to hold the state of the ALT key,
you could just
reset it to false whenever someone goes fullscreen,
and then do a get_pressed or whatever to find out if alt actually still
is pressed
once you're fullscreened.
>
> Thanks!
> Phil
>
>
------------------------------------------------------------------------
> Do you Yahoo!?
> Everyone is raving about the all-new Yahoo! Mail Beta.
>
________________________________
Get your email and more, right on the new Yahoo.com
________________________________
How low will we go? Check out Yahoo! Messengerïs low PC-to-Phone call rates.