diff render_sdl.c @ 340:58a085cfc6bd

Set window title based on ROM header name
author Mike Pavone <pavone@retrodev.com>
date Wed, 15 May 2013 23:32:21 -0700
parents 80d934369fd5
children 13f994c88c34
line wrap: on
line diff
--- a/render_sdl.c	Wed May 15 22:39:36 2013 -0700
+++ b/render_sdl.c	Wed May 15 23:32:21 2013 -0700
@@ -15,7 +15,7 @@
 
 uint32_t min_delay;
 
-void render_init(int width, int height)
+void render_init(int width, int height, char * title)
 {
 	if (SDL_Init(SDL_INIT_VIDEO) < 0) {
         fprintf(stderr, "Unable to init SDL: %s\n", SDL_GetError());
@@ -32,6 +32,7 @@
     	fprintf(stderr, "BlastEm requires at least a 16-bit surface, SDL returned a %d-bit surface\n", screen->format->BytesPerPixel * 8);
     	exit(1);
     }
+    SDL_WM_SetCaption(title, title);
     uint8_t b,g,r;
     for (uint16_t color = 0; color < (1 << 12); color++) {
     	if (color & FBUF_SHADOW) {