-
Notifications
You must be signed in to change notification settings - Fork 1
/
decoderop.cpp
41 lines (38 loc) · 917 Bytes
/
decoderop.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#include "decoderop.hpp"
#include "displayop.hpp"
#include <stdio.h>
void XKey::execute( DecoderState &state )
{
switch ( key ) {
case ' ':
state.playing = !state.playing;
break;
case 'f':
state.fullscreen = !state.fullscreen;
{
FullScreenMode *op = new FullScreenMode( state.fullscreen );
state.oglq->leapfrog_enqueue( op, (DrawAndUnlockFrame*)NULL );
}
break;
case 'q':
state.live = false;
break;
case XK_Left:
state.current_picture--;
state.outputq.flush();
state.outputq.enqueue( new MoveSlider( state.current_picture ) );
break;
case XK_Right:
state.current_picture++;
state.outputq.flush();
state.outputq.enqueue( new MoveSlider( state.current_picture ) );
break;
default:
fprintf( stderr, "key %d hit\n", (int)key );
break;
}
}
void DecoderShutDown::execute( DecoderState &state )
{
state.live = false;
}