summaryrefslogtreecommitdiff
path: root/render_sdl.c
diff options
context:
space:
mode:
authorMike Pavone <pavone@retrodev.com>2013-05-15 23:32:21 -0700
committerMike Pavone <pavone@retrodev.com>2013-05-15 23:32:21 -0700
commit4ac4182037dad9f6fd1693b1e75cefa9cc60aa7f (patch)
treed497a751f7720edaec0de17001f17dbc28c93d88 /render_sdl.c
parentba79e12a288587fe4be9d562d2552250e089f585 (diff)
Set window title based on ROM header name
Diffstat (limited to 'render_sdl.c')
-rw-r--r--render_sdl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/render_sdl.c b/render_sdl.c
index 5cad352..502cae4 100644
--- a/render_sdl.c
+++ b/render_sdl.c
@@ -15,7 +15,7 @@ uint8_t levels[] = {0, 27, 49, 71, 87, 103, 119, 130, 146, 157, 174, 190, 206, 2
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 @@ void render_init(int width, int height)
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) {