Index: emu/all.h
===================================================================
--- emu/all.h	(revision a6da9fbb12405ec31a8be2050dbf6bfe4990f2aa)
+++ emu/all.h	(revision caff4914edce0b543d571453cecab105d16d5b36)
@@ -61,7 +61,4 @@
 extern int32_t led_verbose;
 extern int32_t kbd_verbose;
-
-extern SDL_Window *sdl_win;
-extern SDL_Renderer *sdl_ren;
 
 extern void sdl_init(void);
Index: emu/sdl.c
===================================================================
--- emu/sdl.c	(revision a6da9fbb12405ec31a8be2050dbf6bfe4990f2aa)
+++ emu/sdl.c	(revision caff4914edce0b543d571453cecab105d16d5b36)
@@ -24,7 +24,4 @@
 #define ver3(...) _ver(sdl_verbose, 2, __VA_ARGS__)
 
-SDL_Window *sdl_win;
-SDL_Renderer *sdl_ren;
-
 void sdl_init(void)
 {
@@ -41,18 +38,4 @@
 
 	SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");
-
-	sdl_win = SDL_CreateWindow("Emu", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
-			WIN_W, WIN_H, 0);
-
-	if (sdl_win == NULL) {
-		fail("SDL_CreateWindow() failed: %s", SDL_GetError());
-	}
-
-	sdl_ren = SDL_CreateRenderer(sdl_win, -1, 0);
-
-	if (sdl_ren == NULL) {
-		fail("SDL_CreateRenderer() failed: %s", SDL_GetError());
-	}
-
 	SDL_StartTextInput();
 }
@@ -60,6 +43,4 @@
 void sdl_quit(void)
 {
-	SDL_DestroyRenderer(sdl_ren);
-	SDL_DestroyWindow(sdl_win);
 	TTF_Quit();
 	SDL_Quit();
Index: emu/ser.c
===================================================================
--- emu/ser.c	(revision a6da9fbb12405ec31a8be2050dbf6bfe4990f2aa)
+++ emu/ser.c	(revision caff4914edce0b543d571453cecab105d16d5b36)
@@ -55,4 +55,7 @@
 static uint8_t mem[CON_H][CON_W + 1];
 
+static SDL_Window *win;
+static SDL_Renderer *ren;
+
 static TTF_Font *fon;
 static int32_t fon_w, fon_h;
@@ -63,11 +66,4 @@
 static int32_t cur_x = 0, cur_y = 0;
 static int32_t bel = 0;
-
-static void out(int32_t un, uint8_t c)
-{
-	state[un].rdr = c;
-	state[un].rdr_ok = true;
-	state[un].irq_r = true;
-}
 
 static void update(void)
@@ -105,5 +101,5 @@
 	}
 
-	SDL_Texture *tex = SDL_CreateTextureFromSurface(sdl_ren, sur);
+	SDL_Texture *tex = SDL_CreateTextureFromSurface(ren, sur);
 
 	if (tex == NULL) {
@@ -111,10 +107,10 @@
 	}
 
-	if (SDL_RenderCopy(sdl_ren, tex, NULL, NULL) < 0) {
+	if (SDL_RenderCopy(ren, tex, NULL, NULL) < 0) {
 		fail("SDL_RenderCopy() failed: %s", SDL_GetError());
 	}
 
 	SDL_DestroyTexture(tex);
-	SDL_RenderPresent(sdl_ren);
+	SDL_RenderPresent(ren);
 }
 
@@ -201,4 +197,11 @@
 }
 
+static void out(int32_t un, uint8_t c)
+{
+	state[un].rdr = c;
+	state[un].rdr_ok = true;
+	state[un].irq_r = true;
+}
+
 void ser_key(SDL_KeyboardEvent *ev)
 {
@@ -233,4 +236,17 @@
 	ver("ser init");
 
+	win = SDL_CreateWindow("Serial Console", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
+			WIN_W, WIN_H, 0);
+
+	if (win == NULL) {
+		fail("SDL_CreateWindow() failed: %s", SDL_GetError());
+	}
+
+	ren = SDL_CreateRenderer(win, -1, 0);
+
+	if (ren == NULL) {
+		fail("SDL_CreateRenderer() failed: %s", SDL_GetError());
+	}
+
 	SDL_RWops *ops = SDL_RWFromFile(CON_FONT, "rb");
 
@@ -277,4 +293,7 @@
 	SDL_FreeSurface(sur);
 	TTF_CloseFont(fon);
+
+	SDL_DestroyRenderer(ren);
+	SDL_DestroyWindow(win);
 }
 
Index: misc/buchla.supp
===================================================================
--- misc/buchla.supp	(revision a6da9fbb12405ec31a8be2050dbf6bfe4990f2aa)
+++ misc/buchla.supp	(revision caff4914edce0b543d571453cecab105d16d5b36)
@@ -28,7 +28,7 @@
 
 {
-	sdl_init
+	SDL_CreateRenderer_REAL
 	Memcheck:Leak
 	...
-	fun:sdl_init
+	fun:SDL_CreateRenderer_REAL
 }
