diff options
Diffstat (limited to 'xorg-server/hw/kdrive/ephyr')
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.c | 13 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyr.h | 6 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrinit.c | 12 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/ephyrlog.h | 4 | ||||
-rwxr-xr-x[-rw-r--r--] | xorg-server/hw/kdrive/ephyr/hostx.c | 28 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/hostx.h | 4 | ||||
-rw-r--r-- | xorg-server/hw/kdrive/ephyr/makefile | 6 |
7 files changed, 68 insertions, 5 deletions
diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.c b/xorg-server/hw/kdrive/ephyr/ephyr.c index d57e9f33c..76cc47efd 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.c +++ b/xorg-server/hw/kdrive/ephyr/ephyr.c @@ -82,8 +82,11 @@ host_has_extension(xcb_extension_t *extension) Bool ephyrInitialize(KdCardInfo * card, EphyrPriv * priv) { +#ifdef _MSC_VER + __asm int 3; +#else OsSignal(SIGUSR1, hostx_handle_signal); - +#endif priv->base = 0; priv->bytes_per_line = 0; return TRUE; @@ -816,6 +819,14 @@ ephyrUpdateModifierState(unsigned int state) } } +#ifdef _MSC_VER + __asm int 3; +#else +#endif +#ifdef _MSC_VER + __asm int 3; +#else +#endif static Bool ephyrCursorOffScreen(ScreenPtr *ppScreen, int *x, int *y) { diff --git a/xorg-server/hw/kdrive/ephyr/ephyr.h b/xorg-server/hw/kdrive/ephyr/ephyr.h index dfd93c9bc..59e202095 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyr.h +++ b/xorg-server/hw/kdrive/ephyr/ephyr.h @@ -26,9 +26,11 @@ #ifndef _EPHYR_H_ #define _EPHYR_H_ #include <stdio.h> +#ifndef _MSC_VER #include <unistd.h> -#include <signal.h> #include <libgen.h> +#endif +#include <signal.h> #include <xcb/xcb_image.h> #include "os.h" /* for OsSignal() */ @@ -198,6 +200,8 @@ extern void ephyrCursorEnable(ScreenPtr pScreen); extern int ephyrBufferHeight(KdScreenInfo * screen); +extern int ephyrBufferHeight(KdScreenInfo *screen); + /* ephyr_draw.c */ Bool diff --git a/xorg-server/hw/kdrive/ephyr/ephyrinit.c b/xorg-server/hw/kdrive/ephyr/ephyrinit.c index fc0001012..8fe45d575 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrinit.c +++ b/xorg-server/hw/kdrive/ephyr/ephyrinit.c @@ -56,6 +56,7 @@ InitCard(char *name) KdCardInfoAdd(&ephyrFuncs, 0); } +#ifndef _MSC_VER static const ExtensionModule ephyrExtensions[] = { #ifdef GLXEXT { GlxExtensionInit, "GLX", &noGlxExtension }, @@ -152,6 +153,7 @@ ddxUseMsg(void) ("-title [title] set the window title in the WM_NAME property\n"); ErrorF("\n"); } +#endif void processScreenArg(const char *screen_size, char *parent_id) @@ -182,6 +184,7 @@ processScreenArg(const char *screen_size, char *parent_id) } } +#ifndef _MSC_VER int ddxProcessArgument(int argc, char **argv, int i) { @@ -350,6 +353,15 @@ OsVendorInit(void) KdOsInit(&EphyrOsFuncs); } +#ifdef DDXOSFATALERROR +void +OsVendorFatalError(void) +{ +} +#endif + +#endif + /* 'Fake' cursor stuff, could be improved */ static Bool diff --git a/xorg-server/hw/kdrive/ephyr/ephyrlog.h b/xorg-server/hw/kdrive/ephyr/ephyrlog.h index 0da0a2518..6671c4779 100644 --- a/xorg-server/hw/kdrive/ephyr/ephyrlog.h +++ b/xorg-server/hw/kdrive/ephyr/ephyrlog.h @@ -43,14 +43,14 @@ #ifndef EPHYR_LOG #define EPHYR_LOG(...) \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, "in %s:%d:%s: ",\ - __FILE__, __LINE__, __func__) ; \ + __FILE__, __LINE__, __FUNCTION__) ; \ LogMessageVerb(X_NOTICE, INFO_LOG_LEVEL, __VA_ARGS__) #endif /*nomadik_log */ #ifndef EPHYR_LOG_ERROR #define EPHYR_LOG_ERROR(...) \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, "Error:in %s:%d:%s: ",\ - __FILE__, __LINE__, __func__) ; \ + __FILE__, __LINE__, __FUNCTION__) ; \ LogMessageVerb(X_NOTICE, ERROR_LOG_LEVEL, __VA_ARGS__) #endif /*EPHYR_LOG_ERROR */ diff --git a/xorg-server/hw/kdrive/ephyr/hostx.c b/xorg-server/hw/kdrive/ephyr/hostx.c index 1c759743d..3048cd087 100644..100755 --- a/xorg-server/hw/kdrive/ephyr/hostx.c +++ b/xorg-server/hw/kdrive/ephyr/hostx.c @@ -38,9 +38,11 @@ #include <time.h> #include <err.h> +#ifndef _MSC_VER #include <sys/ipc.h> #include <sys/shm.h> #include <sys/time.h> +#endif #include <X11/keysym.h> #include <xcb/xcb.h> @@ -136,7 +138,11 @@ hostx_add_screen(KdScreenInfo *screen, unsigned long win_id, int screen_num) void hostx_set_display_name(char *name) { +#ifdef _MSC_VER + __asm int 3; +#else HostX.server_dpy_name = strdup(name); +#endif } void @@ -486,6 +492,9 @@ hostx_init(void) xcb_free_pixmap(HostX.conn, cursor_pxm); } +#ifdef _MSC_VER + __asm int 3; +#else /* Try to get share memory ximages for a little bit more speed */ shm_rep = xcb_get_extension_data(HostX.conn, &xcb_shm_id); if (!shm_rep || !shm_rep->present || getenv("XEPHYR_NO_SHM")) { @@ -518,6 +527,7 @@ hostx_init(void) shmdt(shminfo.shmaddr); shmctl(shminfo.shmid, IPC_RMID, 0); } +#endif xcb_flush(HostX.conn); @@ -644,7 +654,7 @@ hostx_screen_init(KdScreenInfo *screen, Bool shm_success = FALSE; if (!scrpriv) { - fprintf(stderr, "%s: Error in accessing hostx data\n", __func__); + fprintf(stderr, "%s: Error in accessing hostx data\n", __FUNCTION__); exit(1); } @@ -657,10 +667,14 @@ hostx_screen_init(KdScreenInfo *screen, */ if (HostX.have_shm) { +#ifdef _MSC_VER + __asm int 3; +#else xcb_shm_detach(HostX.conn, scrpriv->shminfo.shmseg); xcb_image_destroy(scrpriv->ximg); shmdt(scrpriv->shminfo.shmaddr); shmctl(scrpriv->shminfo.shmid, IPC_RMID, 0); +#endif } else { free(scrpriv->ximg->data); @@ -671,6 +685,9 @@ hostx_screen_init(KdScreenInfo *screen, } if (!ephyr_glamor && HostX.have_shm) { +#ifdef _MSC_VER +__asm int 3; +#else scrpriv->ximg = xcb_image_create_native(HostX.conn, width, buffer_height, @@ -703,6 +720,7 @@ hostx_screen_init(KdScreenInfo *screen, FALSE); shm_success = TRUE; } +#endif } if (!ephyr_glamor && !shm_success) { @@ -864,10 +882,14 @@ hostx_paint_rect(KdScreenInfo *screen, } if (HostX.have_shm) { +#ifdef _MSC_VER + __asm int 3; +#else xcb_image_shm_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg, scrpriv->shminfo, sx, sy, dx, dy, width, height, FALSE); +#endif } else { xcb_image_put(HostX.conn, scrpriv->win, HostX.gc, scrpriv->ximg, @@ -881,6 +903,9 @@ static void hostx_paint_debug_rect(KdScreenInfo *screen, int x, int y, int width, int height) { +#ifdef _MSC_VER + __asm int 3; +#else EphyrScrPriv *scrpriv = screen->driver; struct timespec tspec; xcb_rectangle_t rect = { .x = x, .y = y, .width = width, .height = height }; @@ -902,6 +927,7 @@ hostx_paint_debug_rect(KdScreenInfo *screen, /* nanosleep seems to work better than usleep for me... */ nanosleep(&tspec, NULL); +#endif } void diff --git a/xorg-server/hw/kdrive/ephyr/hostx.h b/xorg-server/hw/kdrive/ephyr/hostx.h index e83323a0c..f2350efba 100644 --- a/xorg-server/hw/kdrive/ephyr/hostx.h +++ b/xorg-server/hw/kdrive/ephyr/hostx.h @@ -37,8 +37,12 @@ #define EPHYR_DBG(x, a...) \ fprintf(stderr, __FILE__ ":%d,%s() " x "\n", __LINE__, __func__, ##a) #else +#ifdef _MSC_VER +#define EPHYR_DBG() +#else #define EPHYR_DBG(x, a...) do {} while (0) #endif +#endif typedef struct EphyrHostXVars EphyrHostXVars; diff --git a/xorg-server/hw/kdrive/ephyr/makefile b/xorg-server/hw/kdrive/ephyr/makefile new file mode 100644 index 000000000..eba9a93e1 --- /dev/null +++ b/xorg-server/hw/kdrive/ephyr/makefile @@ -0,0 +1,6 @@ +LIBRARY = libxephyr + +CSRCS=ephyrinit.c ephyr.c hostx.c + +INCLUDES += ..\src ..\..\..\exa + |