summaryrefslogtreecommitdiffstats
path: root/example.c
diff options
context:
space:
mode:
authordscho <dscho>2001-09-26 21:20:27 +0000
committerdscho <dscho>2001-09-26 21:20:27 +0000
commit5c3eae92371309d94a5edd4e35caa71a2e481ab9 (patch)
treefa4389c90f5c4fcade0554568a458c087f5c13e8 /example.c
parentd6082b694129df97fcbe027d30655d2f0225fdca (diff)
downloadlibtdevnc-5c3eae92371309d94a5edd4e35caa71a2e481ab9.tar.gz
libtdevnc-5c3eae92371309d94a5edd4e35caa71a2e481ab9.zip
API corrections
Diffstat (limited to 'example.c')
-rw-r--r--example.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/example.c b/example.c
index 57d0d37..0da149b 100644
--- a/example.c
+++ b/example.c
@@ -30,8 +30,8 @@
#include "rfb.h"
#include "keysym.h"
-const int maxx=641, maxy=480, bpp=4;
-/* TODO: odd maxx doesn't work */
+const int maxx=640, maxy=480, bpp=4;
+/* TODO: odd maxx doesn't work (vncviewer bug) */
/* This initializes a nice (?) background */
@@ -288,7 +288,7 @@ void MakeRichCursor(rfbScreenInfoPtr rfbScreen)
int main(int argc,char** argv)
{
rfbScreenInfoPtr rfbScreen =
- rfbDefaultScreenInit(argc,argv,maxx,maxy,8,3,bpp);
+ rfbGetScreen(argc,argv,maxx,maxy,8,3,bpp);
rfbScreen->desktopName = "LibVNCServer Example";
rfbScreen->frameBuffer = (char*)malloc(maxx*maxy*bpp);
rfbScreen->rfbAlwaysShared = TRUE;
@@ -307,15 +307,17 @@ int main(int argc,char** argv)
MakeRichCursor(rfbScreen);
+ /* initialize the server */
+ rfbInitServer(rfbScreen);
+
/* this is the blocking event loop, i.e. it never returns */
/* 40000 are the microseconds, i.e. 0.04 seconds */
- runEventLoop(rfbScreen,40000,FALSE);
+ rfbRunEventLoop(rfbScreen,40000,FALSE);
/* this is the non-blocking event loop; a background thread is started */
- runEventLoop(rfbScreen,40000,TRUE);
-
+ rfbRunEventLoop(rfbScreen,40000,TRUE);
/* now we could do some cool things like rendering */
- while(1);
+ while(1) /* render() */;
return(0);
}