commit ffc604fba3ef5f4dd28052323aa74f4f7f587319
parent 2ddc20b1b6acc05a1ce8ab468e407d138ccee581
Author: Derek Stevens <nilix@nilfm.cc>
Date: Fri, 4 Aug 2023 12:10:51 -0600
run: set window title from rom
Signed-off-by: Derek Stevens <nilix@nilfm.cc>
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/uxnemu.c b/src/uxnemu.c
@@ -456,12 +456,12 @@ handle_events(Uxn *u)
}
static int
-run(Uxn *u)
+run(Uxn *u, char *rom)
{
Uint64 next_refresh = 0;
Uint64 frame_interval = SDL_GetPerformanceFrequency() / 60;
window_created = 1;
- emu_window = SDL_CreateWindow("Uxn", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, (uxn_screen.width + PAD2) * zoom, (uxn_screen.height + PAD2) * zoom, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
+ emu_window = SDL_CreateWindow(rom, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, (uxn_screen.width + PAD2) * zoom, (uxn_screen.height + PAD2) * zoom, SDL_WINDOW_SHOWN | SDL_WINDOW_ALLOW_HIGHDPI);
if(emu_window == NULL)
return system_error("sdl_window", SDL_GetError());
emu_renderer = SDL_CreateRenderer(emu_window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_TARGETTEXTURE);
@@ -517,7 +517,7 @@ main(int argc, char **argv)
console_input(&u, '\n', i == argc - 1 ? CONSOLE_END : CONSOLE_EOA);
}
/* start rom */
- run(&u);
+ run(&u, rom_path);
/* finished */
#ifdef _WIN32
#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"