aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-03 17:57:51 +0200
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-10-03 17:57:51 +0200
commitd5dcc19a006f898f21a5b081180a132c9dc6e638 (patch)
treef0e155c31bf098133e7ceafa2fa6272608589304 /src/main.cpp
parentbb65f0fc2176b2ebf0f1be682008609e8bd2cb0a (diff)
downloadosc-graphics-d5dcc19a006f898f21a5b081180a132c9dc6e638.tar.gz
use ffmpeg API to set a recorded frames presentation timestamp
* fixes asynchronity of displayed and recorded graphics * also use the configured framerate instead of a hardcoded one
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 8fd714f..d353a52 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -56,6 +56,7 @@ static Recorder recorder;
LayerList layers;
int config_dump_osc = 0;
+int config_framerate = DEFAULT_FRAMERATE;
void
rgba_blit_with_alpha(SDL_Surface *src_surf, SDL_Surface *dst_surf, Uint8 alpha)
@@ -240,11 +241,10 @@ main(int argc, char **argv)
int width = DEFAULT_SCREEN_WIDTH;
int height = DEFAULT_SCREEN_HEIGHT;
int bpp = DEFAULT_SCREEN_BPP;
- int framerate = DEFAULT_FRAMERATE;
parse_options(argc, argv,
port, sdl_flags, show_cursor,
- width, height, bpp, framerate);
+ width, height, bpp, config_framerate);
if (SDL_Init(SDL_INIT_VIDEO)) {
SDL_ERROR("SDL_Init");
@@ -279,7 +279,7 @@ main(int argc, char **argv)
osc_server.start();
SDL_initFramerate(&fpsm);
- SDL_setFramerate(&fpsm, framerate);
+ SDL_setFramerate(&fpsm, config_framerate);
for (;;) {
sdl_process_events();