From 457cae184d47d1068390284ed2fd93fd887a1260 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Wed, 13 Apr 2011 19:20:11 +0200 Subject: wayland: Remove unecessary debug output --- src/video/wayland/SDL_waylandevents.c | 5 ++--- src/video/wayland/SDL_waylandopengl.c | 12 +++--------- src/video/wayland/SDL_waylandvideo.c | 5 ----- src/video/wayland/SDL_waylandwindow.c | 4 +++- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/src/video/wayland/SDL_waylandevents.c b/src/video/wayland/SDL_waylandevents.c index 1a3dce7c..626d4cf0 100644 --- a/src/video/wayland/SDL_waylandevents.c +++ b/src/video/wayland/SDL_waylandevents.c @@ -61,7 +61,7 @@ Wayland_init_xkb(SDL_WaylandData *d) d->xkb = xkb_compile_keymap_from_rules(&names); if (!d->xkb) { - fprintf(stderr, "Failed to compile keymap\n"); + SDL_SetError("failed to compile keymap\n"); exit(1); } @@ -88,7 +88,7 @@ Wayland_PumpEvents(_THIS) retval = select(d->event_fd + 1, &rfds, NULL, NULL, &tv); if (retval < 0) { - fprintf(stderr, "select: %s\n", strerror(errno)); + SDL_SetError("select faild: %s\n", strerror(errno)); break; } if (retval == 1) @@ -287,7 +287,6 @@ Wayland_display_add_input(SDL_WaylandData *d, uint32_t id) wl_input_device_add_listener(input->input_device, &input_device_listener, input); wl_input_device_set_user_data(input->input_device, input); - printf("Add input device\n"); } /* vi: set ts=4 sw=4 expandtab: */ diff --git a/src/video/wayland/SDL_waylandopengl.c b/src/video/wayland/SDL_waylandopengl.c index ec2865c9..163d2ed9 100644 --- a/src/video/wayland/SDL_waylandopengl.c +++ b/src/video/wayland/SDL_waylandopengl.c @@ -59,30 +59,24 @@ Wayland_GL_LoadLibrary(_THIS, const char *path) config_attribs[ 9] = _this->gl_config.depth_size; config_attribs[11] = _this->gl_config.alpha_size; - fprintf(stderr, "start laod library\n"); - data->edpy = eglGetDisplay(data->egl_display); - fprintf(stderr, "after get dispaly\n"); if (!eglInitialize(data->edpy, &major, &minor)) { SDL_SetError("failed to initialize display\n"); return -1; } - fprintf(stderr, "after initiualize\n"); eglBindAPI(EGL_OPENGL_API); if (!eglChooseConfig(data->edpy, config_attribs, &data->econf, 1, &num_config)) { - fprintf(stderr, "failed to choose config\n"); + SDL_SetError("failed to choose a config\n"); return -1; } - fprintf(stderr, "after choose config\n"); if (num_config != 1) { - fprintf(stderr, "got != 1 configs\n"); + SDL_SetError("failed to choose a config\n"); return -1; } - fprintf(stderr, "end load library\n"); Wayland_PumpEvents(_this); return 0; @@ -133,7 +127,6 @@ Wayland_GL_CreateContext(_THIS, SDL_Window * window) { SDL_WaylandData *data = _this->driverdata; - printf("Wayland_GL_CreateContext\n"); data->context = eglCreateContext(data->edpy, data->econf, EGL_NO_CONTEXT, NULL); @@ -152,6 +145,7 @@ int Wayland_GL_MakeCurrent(_THIS, SDL_Window *window, SDL_GLContext context) { printf("Wayland_GL_MakeCurrent\n"); + SDL_WaylandData *data = _this->driverdata; SDL_WaylandWindow *wind = (SDL_WaylandWindow *) window->driverdata; diff --git a/src/video/wayland/SDL_waylandvideo.c b/src/video/wayland/SDL_waylandvideo.c index 3ed09fd8..ea47b64c 100644 --- a/src/video/wayland/SDL_waylandvideo.c +++ b/src/video/wayland/SDL_waylandvideo.c @@ -177,17 +177,13 @@ Wayland_VideoInit(_THIS) { SDL_WaylandData *data; - printf("init\n"); - data = malloc(sizeof *data); if (data == NULL) return 0; _this->driverdata = data; - printf("pre connect\n"); data->display = wl_display_connect(NULL); - printf("post connect\n"); if (data->display == NULL) { SDL_SetError("Failed to connecto to a Wayland display."); return 0; @@ -198,7 +194,6 @@ Wayland_VideoInit(_THIS) display_handle_global, data); wl_display_iterate(data->display, WL_DISPLAY_READABLE); - fprintf(stderr, "after global listener iteration\n"); data->event_fd = wl_display_get_fd(data->display, update_event_mask, data); diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c index 6389407e..3cfb9c49 100644 --- a/src/video/wayland/SDL_waylandwindow.c +++ b/src/video/wayland/SDL_waylandwindow.c @@ -84,9 +84,10 @@ int Wayland_CreateWindow(_THIS, SDL_Window * window) data->egl_window, NULL); if (data->esurf == EGL_NO_SURFACE) { - fprintf(stderr, "failed to create window surface\n"); + SDL_SetError("failed to create a window surface\n"); return -1; } + printf("created window\n"); return 0; @@ -106,6 +107,7 @@ void Wayland_DestroyWindow(_THIS, SDL_Window * window) wl_surface_destroy(wind->surface); SDL_free(wind); } + printf("destroyed window\n"); } -- cgit v1.2.3