Changeset 70cd338dfab3e7e6938968287b177381e5ad94c7

Show
Ignore:
Timestamp:
14/05/06 17:21:25 (2 years ago)
Author:
Cyril Deguet <asmax@videolan.org>
git-committer:
Cyril Deguet <asmax@videolan.org> 1147620085 +0000
git-parent:

[04630cb913554782a9f0d1e03d3a59f95ada0ecc]

git-author:
Cyril Deguet <asmax@videolan.org> 1147620085 +0000
Message:

* vlcproc.cpp: fixed detection of play/pause status (when the popup menu or
keyboard shortcut is used to toggle pause instead of a skin button)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/gui/skins2/src/vlcproc.cpp

    r5225074 r70cd338  
    301301void VlcProc::refreshPlaylist() 
    302302{ 
    303     // Get the status of the playlist 
    304     VarBoolImpl *pVarPlaying = (VarBoolImpl*)m_cVarPlaying.get(); 
    305     VarBoolImpl *pVarStopped = (VarBoolImpl*)m_cVarStopped.get(); 
    306     VarBoolImpl *pVarPaused = (VarBoolImpl*)m_cVarPaused.get(); 
    307     playlist_status_t status = 
    308              getIntf()->p_sys->p_playlist->status.i_status; 
    309  
    310     pVarPlaying->set( status == PLAYLIST_RUNNING ); 
    311     pVarStopped->set( status == PLAYLIST_STOPPED ); 
    312     pVarPaused->set( status == PLAYLIST_PAUSED ); 
    313  
    314303    // Refresh the random variable 
    315304    VarBoolImpl *pVarRandom = (VarBoolImpl*)m_cVarRandom.get(); 
     
    339328    VarText *pSampleRate = (VarText*)m_cVarStreamSampleRate.get(); 
    340329    VarBoolImpl *pVarFullscreen = (VarBoolImpl*)m_cVarFullscreen.get(); 
     330    VarBoolImpl *pVarPlaying = (VarBoolImpl*)m_cVarPlaying.get(); 
     331    VarBoolImpl *pVarStopped = (VarBoolImpl*)m_cVarStopped.get(); 
     332    VarBoolImpl *pVarPaused = (VarBoolImpl*)m_cVarPaused.get(); 
     333 
     334    input_thread_t *pInput = getIntf()->p_sys->p_input; 
    341335 
    342336    // Update the input 
     
    353347    } 
    354348 
    355     input_thread_t *pInput = getIntf()->p_sys->p_input; 
    356349 
    357350    if( pInput && !pInput->b_die ) 
     
    392385            vlc_object_release( pVout ); 
    393386        } 
     387 
     388        // Refresh play/pause status 
     389        int state = var_GetInteger( pInput, "state" ); 
     390        pVarStopped->set( false ); 
     391        pVarPlaying->set( state != PAUSE_S ); 
     392        pVarPaused->set( state == PAUSE_S ); 
    394393    } 
    395394    else 
     
    401400        pVarHasAudio->set( false ); 
    402401        pVarHasVout->set( false ); 
     402        pVarStopped->set( true ); 
     403        pVarPlaying->set( false ); 
     404        pVarPaused->set( false ); 
    403405    } 
    404406}