diff --git a/README.md b/README.md index 9d1e17c..f1351db 100644 --- a/README.md +++ b/README.md @@ -2,4 +2,8 @@ =============== RFB server library =============== - +
+mkdir build +cd build +cmake .. +diff --git a/src/fb.c b/src/fb.c index 7bc8cc6..53562ca 100644 --- a/src/fb.c +++ b/src/fb.c @@ -299,12 +299,14 @@ trfb_framebuffer_t* trfb_framebuffer_create_of_format(unsigned width, unsigned h return NULL; } + fmt->bpp /= 8; + if (fmt->bpp != 1 && fmt->bpp != 2 && fmt->bpp != 4) { trfb_msg("Invalid format: BPP = %d", fmt->bpp); return NULL; } - fb = trfb_framebuffer_create(width, height, fmt->bpp / 8); + fb = trfb_framebuffer_create(width, height, fmt->bpp); if (!fb) { return NULL; } diff --git a/src/server.c b/src/server.c index b335d1c..485f22c 100644 --- a/src/server.c +++ b/src/server.c @@ -219,7 +219,7 @@ static void stop_all_connections(trfb_server_t *srv) } } - trfb_msg("I:all clients have been stoped..."); + trfb_msg("I:all clients have been stopped."); return; }