コード例 #1
0
ファイル: audio.py プロジェクト: remro/ksalpha-repair
def event(ev):
    """
    Handles an event generated by pss (really, the ffdecode
    module). Returns true if we've handled it, or false if we should
    be pushing it to another module for further handling.
    """

    if not pcm_ok:
        return False

    
    if ev.type == ALLOC_EVENT:
        if renpy.display.video.fullscreen or not renpy.display.video.surface:
            surf = pygame.display.get_surface()
        else:
            surf = renpy.display.video.surface

        pss.alloc_event(renpy.display.scale.real(surf))
            
        return True

    if ev.type == REFRESH_EVENT:
        if renpy.audio.music.get_playing("movie"):
            pss.refresh_event()

        # Return False, as a Movie should get this to know when to
        # redraw itself.
        return False
        
    return False
コード例 #2
0
def event(ev):
    """
    Handles an event generated by pss (really, the ffdecode
    module). Returns true if we've handled it, or false if we should
    be pushing it to another module for further handling.
    """

    if not pcm_ok:
        return False

    if ev.type == ALLOC_EVENT:
        if renpy.display.video.fullscreen or not renpy.display.video.surface:
            surf = pygame.display.get_surface()
        else:
            surf = renpy.display.video.surface

        pss.alloc_event(renpy.display.scale.real(surf))

        return True

    if ev.type == REFRESH_EVENT:
        if renpy.audio.music.get_playing("movie"):
            pss.refresh_event()

        # Return False, as a Movie should get this to know when to
        # redraw itself.
        return False

    return False
コード例 #3
0
def alloc_surface(force):

    global last_alloc_surface
    
    if renpy.display.video.fullscreen and renpy.display.draw.fullscreen_surface:
        surf = renpy.display.draw.fullscreen_surface
    else:
        surf = renpy.display.video.surface

        # Get the real surface, not the scaled one.    
        surf = renpy.display.scale.real(surf)
        
    if (surf is not last_alloc_surface) or force:
        last_alloc_surface = surf
        pss.alloc_event(surf)           
コード例 #4
0
def alloc_surface(force):

    global last_alloc_surface

    if renpy.display.video.fullscreen and renpy.display.draw.fullscreen_surface:
        surf = renpy.display.draw.fullscreen_surface
    else:
        surf = renpy.display.video.surface

        # Get the real surface, not the scaled one.
        surf = renpy.display.scale.real(surf)

    if (surf is not last_alloc_surface) or force:
        last_alloc_surface = surf
        pss.alloc_event(surf)